Parallel computing of scripts


#1

Is it possible to use parallel computing of a script (not simulation)?
E.g. if I waned to do something similar to Matlab parallel loop “parfor”, where the same loop runs at the same time for a few independent values.
Or maybe does FDTD/MODE Solutions already use all possible threads as a default when running a script?


#2

Hi. The script environment uses the CAD license in all products which does not support parallel computing. As a result, any script command including “for” loops will use a single process. So, (for example) the “for” loops are always executed serially.


#3

Thank you for clarification.


#4

Hi,

As far as I know, the only way to use parallel computing is using Optimization and parameter sweep window and defining multiple resources in Resources (for example 4 threads of 4 instead of one thread of 16). This way it runs 4 simulations simultaneously which is much faster.
However, this way you can’t create good figures like scripting (like the last figure in : https://kb.lumerical.com/en/metamaterials_plasmonic_absorber.html).
Please let me know if there is any other way.