Question-and-Answer Resource for the Building Energy Modeling Community
Get started with the Help page
Ask Your Question

Revision history [back]

Ambient files in parallel computations

Dear Radiance community.

Since you have been kind enough give me a quick and very relevant answer to my previous question, a ask a subsequent one.

If I understand correctly, in the last versions of Radiance, it is safe to use ambient files in parallel computations. I assume threads wait for each other before adding new results to the ambient file. However, the order, in which the different runs execute, seems to affect the final result, which is problematic, since the order of execution of parallel cases may vary from one run to another.

In order to illustrate the problem, I have created a small case with two zones. In each of them, a single measurement point is placed. The scene files are compressed into the attached file. The extension .bmp needs to be removed from the file name since the forum would not allow to .zip attachment [Dear moderators, please forgive me if I thereby break your rules. Feel free to delete this post. I will then try to rewrite it is a correct way]. In the archive, the file run2.bat starts the simulations and writes the results to file res.txt.

C:\fakepath\ambient files test.zip.bmp

In the first part of the experiment, I start with an empty ambient file and call rtrace for zone 1 first and then for zone 2 (run 1). Then, using the same ambient file, I call the same rtrace again for zone 1 first and then for zone 2 (run 2). I get different results in run 1 and run 2, which is expected, since the ambient files is being populated in run 1. Now, I call rtrace with the same ambient file for zone 2 first and then for zone 1 (run 3), but I get the same results as in in run 2. This is also expected, since the ambient file does not change during run 2 and run 3.

Now, I reset the ambient file and make runs 4,5 and 6 the same way as runs 1,2,and 3 but with reversed zone order.

As it turns out, the results are the same in run 5 and 6 (as expected), but not the same in runs 3 and 6, as I would hope they would.

As stated previously, this illustrates that the order of execution is crucial for the way the ambient file is populated. This means, one may obtain different results if one runs the same set of radiance commands in parallel. However, it is absolutely non-negotiable for me that the results are exactly the same from one simulation to another. The users get unhappy otherwise. The only way to achieve that, I as see it now, is to completely abandon the ambient files, at the cost of much longer simulation times.

So here finally comes the question: Do you know another workaround?

Ambient files in parallel computations

Dear Radiance community.

Since you have been kind enough give me a quick and very relevant answer to my previous question, a ask a subsequent one.

If I understand correctly, in the last versions of Radiance, it is safe to use ambient files in parallel computations. I assume threads wait for each other before adding new results to the ambient file. However, the order, in which the different runs execute, seems to affect the final result, which is problematic, since the order of execution of parallel cases may vary from one run to another.

In order to illustrate the problem, I have created a small case with two zones. In each of them, a single measurement point is placed. The scene files are compressed into the attached file. The extension .bmp needs to be removed from the file name since the forum would not allow to .zip attachment [Dear moderators, please forgive me if I thereby break your rules. Feel free to delete this post. I will then try to rewrite it is a correct way]. In the archive, the file run2.bat starts the simulations and writes the results to file res.txt.

C:\fakepath\ambient files test.zip.bmp

In the first part of the experiment, I start with an empty ambient file and call rtrace for zone 1 first and then for zone 2 (run 1). Then, using the same ambient file, I call the same rtrace again for zone 1 first and then for zone 2 (run 2). I get different results in run 1 and run 2, which is expected, since the ambient files is being populated in run 1. Now, I call rtrace with the same ambient file for zone 2 first and then for zone 1 (run 3), but I get the same results as in in run 2. This is also expected, since the ambient file does not change during run 2 and run 3.

Now, I reset the ambient file and make runs 4,5 and 6 the same way as runs 1,2,and 3 but with reversed zone order.

As it turns out, the results are the same in run 5 and 6 (as expected), but not the same in runs 3 and 6, as I would hope they would.

As stated previously, this illustrates that the order of execution is crucial for the way the ambient file is populated. This means, one may obtain different results if one runs the same set of radiance commands in parallel. However, it is absolutely non-negotiable for me that the results are exactly the same from one simulation to another. The users get unhappy otherwise. The only way to achieve that, I as see it now, is to completely abandon the ambient files, at the cost of much longer simulation times.

So here finally comes the question: Do you know another workaround?