NREL / OpenStudio-server

The OpenStudio Server is a docker or Helm deployable instance which allows for large-scale parametric analyses of building energy models using the OpenStudio or URBANopt CLIs.
http://www.openstudio.net/
Other
46 stars 20 forks source link

Two analyses at a time #755

Closed brianlball closed 7 months ago

brianlball commented 7 months ago

https://github.com/NREL/OpenStudio-server/issues/717 https://github.com/NREL/OpenStudio-server/issues/753

Running 2 analyses Resque queues in the web-background container can cause out of order ResqueJobs::RunAnalysis jobs. For example, when an LHS analysis is submitted to OSAF, it is actually two jobs. The first is analysis_type='lhs' followed by analysis_type='batch_run'. see batch_run_methods. They are both Resque.enqueue'd right after each other, but there are no hooks or requirements that one goes before the other. With only 1 Resque Worker in the web-background container, only one job in the analyses queue is run at a time, the first being the non-batch_run analysis_type.

If there are 2 Resque workers in the web-background container, either by changing start-web-background.sh or helm-chart, batch_run.perform can start before lhs.perform can complete which results in datapoints trying to be run before they are made.

This is how it should work, where LHS generates the datapoints and batch_run then data_point.submit_simulation:

orig_order

VS

This is what can happen with 2 analysis queues right now, batch_run has no datapoints to submit because lhs has not created them yet:

2wb_order

brianlball commented 7 months ago

image

brianlball commented 7 months ago

parallel analyses with the new test

image

brianlball commented 7 months ago

https://github.com/NREL/OpenStudio-server/issues/618