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

# How to block the 'EnergyPlus Run Status' dialogue in group simulation

Hi, everyone.

I'm running group simulations with EnergyPlus 8.8. The group includes 1008 IDF files. After running about each 50 IDF files, the 'EnergyPlus Run Status' dialogue (showing the numbers of warming & errors, elapsed time) pops up. The simulation pauses and will not continue until I clicked the OK button.

This problem keeps me beside the computer, and I cannot leave the simulation running for the whole night. So, is there anyway to block this dialogue from popping up?

Thank you.

edit retag close merge delete

That should not be happening so you might want to post a bug report here. Have you looked at script-for-multiple-simulations?

( 2018-01-09 09:28:38 -0500 )edit

Thank you, Joson! Python is a good choice. I've made it.

( 2018-03-04 18:55:41 -0500 )edit

@Mark Kou I am having this exact problem for EnergyPlus 9.3 on our 16 core Windows Server OS. Unfortunately, I cannot easily use a python script like @JasonGlazer recommended because each IDF is paired with an EPW and the parametric generation pairs runs with some technologies in some climate zones, but not others, like heat pump water heaters in Miami vs New York, so the IDFs and EPWs pairs don't follow a simple pattern. Did you ever submit an issue on github?

( 2020-06-12 16:51:28 -0500 )edit

@JasonGlazer I am able to reproduce the behavior consistently. The problem goes away if the individual simulations take longer to run, like a run period of one week vs one year. A strange thing I noticed is new simulation terminals take a while to display for the one week run period. I allow my server to run 24 simultaneous IDFs, but there are usually only 2 or 3 simulation terminals, and sometimes zero simulations running. Looks like the interruptions occur when there are no simulations running for half a second (best guess). Does the code use the nonexistence of running simulations to exit?

( 2020-06-12 17:14:20 -0500 )edit

@mldichter you may be right, EP-Launch does use a timer to manage the queue of simulations and if simulations run for a very short time, that process may get messed up. I do believe the timer is set to 0.5 seconds. I am not sure that is responsible for the issue you are seeing but it is very likely related. Unfortunately, I'm not sure I can change that timer without it creating other issues. I would encourage you to reconsider using Python or another scripting tool to run simulations. You can certainly pair weather files with specific simulations.

( 2020-06-18 06:12:45 -0500 )edit

Sort by » oldest newest most voted

I got something working in python with a few blemishes. Python's recommended subprocess was interfering with multiprocessing, so I had to use the ill advised os instead.

rungroup.py

from multiprocessing import Pool
import os
import time

def run_energyplus_cmd(command_string):
print('starting ' + command_string)
start_seconds = time.time()
os.system(command_string + ' >NUL 2>&1') #concatenated string for suppressing energyplus output
elapsed_minutes = int((time.time() - start_seconds)/60*100.0)/100.0 #two decimal places
print(str(elapsed_minutes) + ' min for ' + command_string)

if __name__ == '__main__':
number_of_simultaneous_simulations = 4

#read commands.txt and split lines into array
commands_file = open('commands.txt', 'r')
commands_file.close()
commands_array = commands_array.splitlines()

#run all commands in parallel up to number_of_simultaneous_simulations at a time
with Pool(number_of_simultaneous_simulations) as p:
p.map(run_energyplus_cmd, commands_array)

#using energyplus on the command line versus EP-Launch had different output
#this is to remove all the "out" strings from the output files
folder = 'runs'
for filename in os.listdir(folder):
filename = os.path.join(folder,filename)
if not os.path.isfile(filename): continue
new_filename = filename.replace('out.', '.')
try:
os.rename(filename, new_filename)
except WindowsError:
os.remove(new_filename)
os.rename(filename, new_filename)


Here is my file organization. Folder "runs" contains all my IDFs, "weather files" contained my EPWs, and commands.txt contains the Windows cmd input.

commands.txt

C:/EnergyPlusV9-3-0/energyplus -w "weather files/CZ03/CZ03.epw" -p run0 -d runs runs/run0.idf C:/EnergyPlusV9-3-0/energyplus -w "weather files/CZ03/CZ03.epw" -p run1 -d runs runs/run1.idf C:/EnergyPlusV9-3-0/energyplus -w "weather files/CZ03/CZ03.epw" -p run2 -d runs runs/run2.idf C:/EnergyPlusV9-3-0/energyplus -w "weather files/CZ03/CZ03.epw" -p run3 -d runs runs/run3.idf C:/EnergyPlusV9-3-0/energyplus -w "weather files/CZ03/CZ03.epw" -p run4 -d runs runs/run4.idf

Lastly, the output.

C:\Users\<YOUR NAME>\Desktop\multiprocessing>python rungroup.py
starting C:/EnergyPlusV9-3-0/energyplus -w "weather files/CZ03/CZ03.epw" -p run0 -d runs runs/run0.idf
starting C:/EnergyPlusV9-3-0/energyplus -w "weather files/CZ03/CZ03.epw" -p run1 -d runs runs/run1.idf
starting C:/EnergyPlusV9-3-0/energyplus -w "weather files/CZ03/CZ03.epw" -p run2 -d runs runs/run2.idf
starting C:/EnergyPlusV9-3-0/energyplus -w "weather files/CZ03/CZ03.epw" -p run3 -d runs runs/run3.idf
0.26 min for C:/EnergyPlusV9-3-0/energyplus -w "weather files/CZ03/CZ03.epw" -p run2 -d runs runs/run2.idf
starting C:/EnergyPlusV9-3-0/energyplus -w "weather files/CZ03/CZ03.epw" -p run4 -d runs runs/run4.idf
0.27 min for C:/EnergyPlusV9-3-0/energyplus -w "weather files/CZ03/CZ03.epw" -p run3 -d runs runs/run3.idf
0.27 min for C:/EnergyPlusV9-3-0/energyplus -w "weather files/CZ03/CZ03.epw" -p run0 -d runs runs/run0.idf
0.27 min for C:/EnergyPlusV9-3-0/energyplus -w "weather files/CZ03/CZ03.epw" -p run1 -d runs runs/run1.idf
0.16 min for C:/EnergyPlusV9-3-0/energyplus -w "weather files/CZ03/CZ03.epw" -p run4 -d runs runs/run4.idf



more

Interesting answer. I wonder if the question and title should be changed to match it?

( 2020-06-23 06:25:07 -0500 )edit

@JasonGlazer Eh... Using EP-Launch is much easier. Even writing the energyplus run group file is easy with a script. This solves the OP's problem, but it's still a kluge. I could see this being useful with some modifications to run on a DIY high performance computer setup, but then there's Slurm for actual high performance computers.

The one nice feature is the combined error file is not generated. Running 10,000 simulations made this huge error file and adding to the error file seemed to go slower and slower as the file size increased with each simulation.

( 2020-06-23 13:59:11 -0500 )edit