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

Run reporting measure even if datapoint fails

asked 2020-03-02 21:22:10 -0500

antonszilasi's avatar

updated 2020-07-31 10:36:01 -0500

I am writing a reporting measure to scrape files from a datapoint and place them in a amazon s3 bucket. Since this measure will be the last measure to run for the datapoint I would like this reporting measure to run even if the datapoint fails.

What is the best way to go about this? I've discovered that currently if a measure fails in the workflow, the datapoint breaks and the report measure will not run.

edit retag flag offensive close merge delete

Comments

@antonszilasi if the datapoint fails you won't have the EnergyPlus SQL file, so are you just reporting information about the model? If that is the case there then maybe you make this a model measure, and not a reporting measure. There is nothing saying that a model measure (a) has to change the model and (b) can't write an HTML (or send to s3). This is how the "ViewModel" measure works.

David Goldwasser's avatar David Goldwasser  ( 2020-03-03 11:02:33 -0500 )edit

@David Goldwasser correct I am trying to report out.osw and any other logs which exist even if the E+ run fails, im thinking the easiest way maybe to just have a "push to s3" function which is called in every measure if the measure fails and the reporting measure cant run. What do you think?

antonszilasi's avatar antonszilasi  ( 2020-03-03 11:22:29 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted
2

answered 2020-03-03 11:51:51 -0500

If you are running in Algorithmic mode, one option is to write a "Server Finalization Script". This would be a bash script that loops through all the datapoints on the OpenStudio-Server filesystem and uploads them to s3. This script should still run even if there are datapoint failures.

(You might be able to use the "Worker Finalization Script" instead, but it runs once per datapoint and I'm guessing it doesn't run if the datapoint has a failure? I'm not positive.)

edit flag offensive delete link more
1

answered 2020-03-03 04:07:00 -0500

updated 2020-03-03 04:09:01 -0500

There's no built-in way to do that, you'll have to patch OpenStudio-workflow-gem and manage to call your own version.

If the failed measure is a reporting measure it's another story. I recently added capability for reporting measures to fail, so we collect any HTML files that actually worked (this isn't released yet in any OpenStudio installer though).

In any case, the PR in question would be a good starting point for your own patch, cf NREL/OpenStudio-workflow-gem#92 (don't get scared by the 20k lines added, the PR has only a few changes to lib/openstudio/workflow/run.rb which I link directly to, the rest is mostly testing)

edit flag offensive delete link more

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

1 follower

Stats

Asked: 2020-03-02 21:22:10 -0500

Seen: 105 times

Last updated: Mar 03 '20