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

Parallelization of EnergyPlus simulations and ExpandObjects error

asked 2020-05-21 12:22:13 -0500

kamilitsa's avatar

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.

edit retag flag offensive close merge delete

Comments

Are you using the command line to run ExpandObjects using -x option or are you using the RunEPlus.bat file or something else?

JasonGlazer's avatar JasonGlazer  ( 2020-05-22 08:09:58 -0500 )edit

I'm using subprocess.call() with -x option included

kamilitsa's avatar kamilitsa  ( 2020-05-24 17:10:14 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
2

answered 2020-05-25 08:28:48 -0500

You might want to try using ExpandObjects as a first step on all your files to create all the detailed HVAC IDF files one at a time, not in parallel. ExpandObjects uses specific file names that are probably being overwritten when used in parallel. Fortunately, ExpandObjects runs quickly.

edit flag offensive delete link more

Comments

Thanks so much, it worked! It didn't occur to me that you could run ExpandObjects by itself and only then run the simulations. And indeed, it runs quite fast, so it's not an issue that this part is not parallelized.

kamilitsa's avatar kamilitsa  ( 2020-05-25 12:04:24 -0500 )edit

The alternative is to restructure your project and work in unique subfolders. instead of having all .idf in the same folder and calling energyplus -x -d {unique_name} {unique_name}.idf, do something like mkdir {unique_name} && mv {uniqe_name}.idf {unique_name}/in.idf && cd {unique_name} && energyplus -x

Julien Marrec's avatar Julien Marrec  ( 2021-07-29 08:23:52 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Careers

Question Tools

3 followers

Stats

Asked: 2020-05-21 10:38:53 -0500

Seen: 235 times

Last updated: May 25 '20