[Radiance-general] Five-phase Method Tutorial: Errors in generating direct sun coefficient matrix

Greg Ward gregoryjward at gmail.com
Sun Mar 6 08:53:32 PST 2016


Hi Alireza,

Thanks for including your commands and the full errors reported -- this is helpful.  I will offer my suggestions inline, below:

> From: Alireza Hashemloo <alireh at uw.edu>
> Subject: [Radiance-general] Five-phase Method Tutorial: Errors in generating direct sun coefficient matrix
> Date: March 5, 2016 8:59:34 PM PST
> 
> Hello,
> 
> I am pursuing the Five-phase Method Tutorial (http://www.radiance-online.org/learning/tutorials/fivephasetutorialfiles/Tutorial-FivePhaseMethod_v2.pdf) and I have encountered the following errors in my attempt to generate Direct sun coefficient matrix in Example 2:
> 
> Question/Error #1:
> 
> OS: Windows 7 (64-bit)
> Radiance: 5.08
> Command Line Environment: Git Bash
> 
> Command:
> 
> $ vwrays -c 4 -pj 1 -fa -vf views/view_A.vf -x 600 -y 600 | rtrace -h -opn -fa -ab 0 model_nosuns.oct | rcontrib `vwrays -vf views/view_A.vf -x 600 -y 600 -d` -fac -fo -o viewpics_ds/back_%04d.hdr -e MF:6 -f reinhart.cal -b rbin -bn Nrbins -m solar -c 4 -I -ab 1 -ad 100 -dt 0 -dc 1 -lw 1e-2 model_suns.oct
> 
> Error: 
> rtrace: warning - no light sources found
> rtrace: system - write error: Invalid argument

The warning from the first rtrace command is nothing to worry about.  You are using it to compute positions and normals, not values, so it doesn't matter.  You can use the -w- on that command to avoid the warning.  I also recommend using -opN rather than -opn for efficiency reasons.

The "Invalid argument" error is mysterious.  I'm not sure why rtrace would report that unless the pipe to rcontrib was not being opened.  Do the single back-quotes work in Git Bash?  What happens if you leave off the  `vwrays -vf views/view_A.vf -x 600 -y 600 -d` part?  (It wouldn't be correct -- just wondering if that has something to do with the failure.)

> Description: I have tested the same command on Windows shell (cmd.exe), and I receive an 'rcontrib' error in addition to the 'rtrace' errors that I encounter in Git Bash:
> 
> OS: Windows 7 (64-bit)
> Radiance: 5.08
> Command Line Environment: Windows shell (cmd.exe)
> 
> Command:
> 
> vwrays -c 4 -pj 1 -fa -vf views/view_A.vf -x 600 -y 600 | rtrace -h -opn -fa -ab 0 model_nosuns.oct | rcontrib `vwrays -vf views/view_A.vf -x 600 -y 600 -d` -fac -fo -o viewpics_ds/back_%04d.hdr -e MF:6 -f reinhart.cal -b rbin -bn Nrbins -m solar -c 4 -I -ab 1 -ad 100 -dt 0 -dc 1 -lw 1e-2 model_suns.oct
> 
> Error: 
> rcontrib: fatal - missing required modifier argument
> rtrace: warning - no light sources found
> rtrace: system - write error: Invalid argument

My guess is that your command-line is too long for cmd.exe, so the rcontrib command is getting truncated before it gets to its -m argument.  Try running it as two commands, i.e.:

vwrays -c 4 -pj 1 -fa -vf views/view_A.vf -x 600 -y 600 | rtrace -h -w -opN -fa -ab 0 model_nosuns.oct > points.txt
rcontrib -x 600 -y 600 -fac -fo -o viewpics_ds/back_%04d.hdr -e MF:6 -f reinhart.cal -b rbin -bn Nrbins -m solar -c 4 -I -ab 1 -ad 100 -dt 0 -dc 1 -lw 1e-2 model_suns.oct < points.txt

(Replace the "-x 600 -y 600" with the output of "vwrays -vf views/view_A.vf -x 600 -y 600 -d" as I'm pretty sure back-quotes don't work with cmd.exe.)

> Question #2:
> 
> The original command  in the tutorial includes the "-n $procs" as part of the options passed to the 'rcontrib' call. However, I do not know where I can find the definition for "$procs" ? 
> According to the Radiance documentation available for rcontrib, the -n option is specified for multiple processes to accelerate computation on a shared memory machine. The Git Bash on Windows can handle 3200 open files as the maximum value passed to a "ulimit" call. But apparently,  windows shell (cmd.exe) must be able to handle more open processes.

You will have to go from MF:6 to MF:4 using Git Bash, since MF:6 corresponds to over 5000 open files.  I do not think you can have multiple processes under Windows using rcontrib, no matter which shell you use, so -n 1 (the default) is all you get.

Good luck!
-Greg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.radiance-online.org/pipermail/radiance-general/attachments/20160306/986211d2/attachment-0001.html>


More information about the Radiance-general mailing list