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

Revision history [back]

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.