Rcontrib: fatal - unexpected EOF on input

I am getting rcontrib: fatal - unexpected EOF on input when using rfluxmtx:

The full command is:

c:\radiance\bin\rfluxmtx -n 8 -y 144 -aa 0.25 -ab 3 -ad 5000 -ar 16 -as 128 -dc 0.25 -dj 0.0 -dp 64 -ds 0.5 -dr 0 -dt 0.5 -I -lr 4 -lw 2e-06 -c 1 -ss 0.0 -st 0.85 - sky\rfluxSky.rad scene\glazing\4..glz.mat scene\glazing\4..glz.rad scene\opaque\4..opq.mat scene\opaque\4..opq.rad < 4.pts > result\matrix\normal_4..scene..default.dc 

This command works on my workstation but throw error when I run this using my laptop. I have the same installaiotn and same set of files, but just different environemenet (both windows 7 though). Did I not install something that is supposed to be installed?

Any help is appreciated.

Thanks,

Shen

It may have something to do with your input file “4.pts”. There are occasional translation errors going between Unix and Windows that will cause the input parser to reject the input. Can you upload the file here to look at, or just check yourself that it doesn’t contain any stray characters that shouldn’t be in it?

Hello @Greg_Ward,

Thank you for your reply. I have uploaded the file to my google drive:
https://drive.google.com/drive/folders/1rlytTAlTyT6WJJq7nYHJQAz4QyFk6hh7?usp=sharing

I don’t think the problem is coming from 4.pts since the following command runs fine:

c:\radiance\bin\rcontrib -aa 0.0 -ab 0 -ad 512 -ar 16 -as 128 -dc 1.0 -dj 0.0 -dp 64 -ds 0.5 -dr 0 -dt 0.0 -I -lr 4 -lw 0.05 -M .\sky\analemma.mod -ss 0.0 -st 0.85 analemma.oct < 4.pts > result\matrix\sun_4..scene..default.dc

but the one with using rfluxmtx will give me the EOF error.

I also tried the same stuff on my other laptop, and it works absolutely fine. So this is an isolated case. Do you happen to know what might cause this?

Hi Shen,

I looked at your 4.pts file and it seems fine. It has ‘\r\n’ EOL sequences, but this should be fine in both Windows and Unix.

This leaves us with the unsavory possibility there is a bug in the Windows version of rfluxmtx. I’m thinking from this that the Windows version of system() may not share the caller’s stdin stream as it does under Unix. I have not been able to find anything confirming or disagreeing with this hypothesis online, though I have looked. I do not have access to a Windows machine (or a compiler) to test this theory, unfortunately. I have only the data point you have provided.

Is there someone with Windows programming experience who can confirm? The operations necessary to put this right if the Windows system() call does not share stdin will be painful, and I’d rather not make the effort if I don’t have to.

-Greg

Hi Greg and Shen,

The files appear to be working alright on my machine (Windows 10). Below is the getinfo of one of the files written by rfluxmtx.

The folder with the full run can be found here: https://www.dropbox.com/s/9272ogp9bhj3iwn/gridbased_annual.zip?dl=0

I am wondering if this is a version issue where the rcontrib being called is from one of the earlier versions of Radiance (in case you have multiple versions installed). @zha can you run the following commands (where rcontrib and rcontrib -version ) and see if you are calling the right version of rcontrib?