I have a question about running a .bat file on a Windows server that has a 32 CPUs. The server is a virtual one hosted by Amazon's cloud service. Will running 3200 glare simulations from a .bat file on the server take the same time as if I run them on my Dell laptop that has an Intel Core i7-6700HQ processor (6M Cache, up to 3.50GHz)?

Views: 810

Reply to This

Replies to This Discussion

Depends on the batch file.  If you're using the v4 GH components, you can use the Batch Runner to specify the number of processes to run in parallel (NP):

This will write a batch file that executes on 16 threads.  The AWS virtual machines are hyperthreaded, and I doubt you'll get much speedup going past 16 on the vCPU-32 instance.  But yes, that should outpace your laptop by a wide margin.  This presumes you have DIVA 4 installed on the VM...


Jon, thanks for your help. I'm little confused by the files produced by the Batch Runner component, it writes two .bat files; one is called RunName.group.bat and the other one is called RunName.part-00.bat. So, which one should  I double click to start my runs. 

One more question, I have Diva 4 installed on my laptop and the server as well. I'm working with my grasshopper file on my laptop.  Do I need to copy specific files to the server in addition to the batch file to be able to start the simulations? I opened the batch file and I read some reference to the .dlt file so I'm guessing I have to copy the .dlt file too, any other files?

You should actually copy the whole RunName folder to the server.  Then launch the RunName.group.bat file from inside it.  All the file paths are relative, so it should work regardless of where the folder sits on the server.


Got it. Thanks!

So I tried to follow what was decribed above and the Batch Run produced .dat files in the original folder - containing the results.

Now I want to load the produced results and view them - how can you import them to Grasshopper and see the falscolors and so on - unfortunately I could not figure that out - maybe you can help.

Thank you very much

Cheers Thomas

Hi Thomas,

It's the same as if you had run the simulation locally.  Just overwrite the folder you exported with the one containing all the results.  Then your original Grasshopper definition will be able to find them.  (Or simply use the Name parameter of an appropriate simulation component to point to the correct project name or directory.)



Hi Jon,

thank you very much Jon! Did not know that just have to input the Name into the calculation component and the results get passed through =)



Has anyone got an example file of this batch runner ?

Hi Jon,

My group.bat file refers to the subfolders just fine, but inside my subfolders paths don't seem relative. Let me give an example:

SET inputfile="C:\Users\mathias.nielsen\Documents\DIVA\GH_Data\Misc-_SS_II\scene10\AnnualDaylight\scene10.dlt"
SET epwfile="c:\ladybug\DNK_Copenhagen.061800_IWEC\DNK_Copenhagen.061800_IWEC.epw"
SET type=2
SET np=7
SET gr=0.2
SET rp="-aa .1 -ab 6 -ad 1024 -ar 256 -as 256 -dr 2 -ds .2 -lr 12 -lw .004 -dj 0 -lr 6 -sj 1 -st 0.15"
SET bc=1
SET export=-ill
SET errfile="C:\Users\mathias.nielsen\Documents\DIVA\GH_Data\Misc-_SS_II\scene10\AnnualDaylight\scene10.err"

cd C:\DIVA\bin
diva annualdaylight %inputfile% %epwfile% -type %type% -np %np% -gr %gr% -rp %rp% -bc %bc% -err %errfile% %export%

Will this still work if I move the entire folder to another diva computer, where the username is not mathias.nielsen, or do I need to find/replace the path inside every bat file?

I'm running 6 scenes, see following screenshot:

Also,  when the run parameter is set to false in the daylight component, my output shows same name for all of the files, but it shows the correct name when its set to true! Not sure if it affects anything. See the bug below and compare to image above:

Lastly, the initial bat file sets NP=7,  but as you can see on the screenshot, I've set NP to 12 in the batch component, as my external computer has 12 cores. This is bugging me quite a bit! :-)

Reply to Discussion


© 2019   Created by jeff niemasz.   Powered by

Badges  |  Report an Issue  |  Terms of Service