run simulations in series automatically in windows



I would like to run my simulations in series and not parallel with fdtd-engine. At the moment I’m able to run one simulation vie the windows console:

“C:\Program Files\Lumerical\MPICH2\mpiexec.exe” -n 9 -localonly “C:\Program Files\Lumerical\FDTD\bin\fdtd-engine”

But I want to choose all simulations in the folder porter and start them in series. I tried the following:

“C:\Program Files\Lumerical\MPICH2\mpiexec.exe” -n 9 -localonly “C:\Program Files\Lumerical\FDTD\bin\fdtd-engine”

but there was an error.

Can someone explain me, how I can fix the Problem? My idea was to create a batch-file with a loop. But the important thing is that the first simulation has to be ended/closed before the next simulation is going to be started. So only one license is needed.



I think you somehow need to know when a simulation finishes. I guess the easiest way could be using a .lsf script file to construct a for loop, and use the run command. That way, the run command will only start the next simulation when the previous simulation is done, and thus only requires one engine license. Note, since this is running a script file, this will also require access to a CAD license.

KB page about running a script using command line


Thank you for your answer :wink:

Is it also possible to solve my problem only with a lumerical engine license? Because I need the CAD license for working with it on another PC.


Hi John. There is a way to run your simulations serially using engine license only. This KB page describes how you can use the command prompt or the run_simulations.bat file (which comes with the installation of FDTD) to run all your simulation files in Windows. As mentioned on this page under the “Using batch files to run simulations more easily” tab, you can use the following command in the command prompt to run all FDTD project files in the ‘current’ folder using 4 processes (as denoted by -n 4):

“C:\Program Files\Lumerical\FDTD\bin\fdtd-run-local.bat” -n 4 *.fsp

Alternatively, you can put the run_simulations.bat file in the same folder as your simulation files and run it to run all the .fsp files one after the other.