Parallelization of EnergyPlus simulations and ExpandObjects error
I'm running EnergyPlus simulations using subprocess.call()
in Python and it all works well when I run the simulations one by one in some kind of a for loop. However, I wanted to run multiple simulations at once using multiprocessing
or joblib.Parallel
and I keep getting an error related to ExpandObjects. Somehow the preprocessing is not performed for some of the .idf files and the .expidf file is not created, resulting in a fatal error. Interestingly, some of the simulations are completed successfully, so it seems to be related with the way the parallelization is done. I tried to play with different parameters (e.g. backend implementation type) but it didn't help.
The problem disappears when I use just one core by setting joblib.Parallel(n_jobs=1)
, but of course it makes the whole parallelization useless.
Are you using the command line to run ExpandObjects using -x option or are you using the RunEPlus.bat file or something else?
I'm using
subprocess.call()
with -x option included