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

PAT fails as soon as I add the OpenStudio Results Measure

asked 2020-06-24 06:40:05 -0500

Optimulate gravatar image

updated 2020-06-24 20:56:24 -0500

I'm running PAT and am trying to include the OpenStudio Reporting measure. However, every run will fail as soon as I assign the reporting measure. Without it, everything runs fine.

I think (but I'm not exactly sure) that I didn't have this problem a few days ago. A new version of the OpenStudio Results reporting measure came out 1-2 days ago. Not sure is that is related?

The failure gives no output at all. Status is Completed Fail, without listing any warnings or errors. The log files are likewise empty. Further debugging is impossible (or at least, I don't know how), since no results are generated with the reporting measure, as that is actually what seems to be causing the problem.

Any help would be much appreciated. Thank you in advance.

Update 1: the final OSW for one of the failed runs:

   "completed_at" : "20200624T113041Z",
   "completed_status" : "Fail",
   "created_at" : "2020-06-24 19:30:28 +0800",
   "current_step" : 0,
   "description" : "Autogenerated 0",
   "file_format_version" : "0.0.1",
   "file_paths" : 
   "hash" : "4E37D3B4",
   "measure_paths" : 
   "name" : "Alternative 1",
   "osa_id" : "2ee9883c-1dd6-4400-b53d-d3856b3f8c6d",
   "osd_id" : "491e53af-ef07-4421-b8a0-af722af2af46",
   "run_directory" : "./run",
   "seed_file" : "small_hotel.osm",
   "started_at" : "20200624T113031Z",
   "steps" : 
         "arguments" : 
            "air_loops_detail_section" : true,
            "annual_overview_section" : true,
            "building_summary_section" : true,
            "cost_summary_section" : true,
            "envelope_section_section" : true,
            "exterior_light_section" : true,
            "hvac_load_profile" : true,
            "interior_lighting_section" : true,
            "measure_warning_section" : true,
            "monthly_overview_section" : true,
            "outdoor_air_section" : true,
            "plant_loops_detail_section" : true,
            "plug_loads_section" : true,
            "reg_monthly_details" : false,
            "schedules_overview_section" : true,
            "source_energy_section" : true,
            "space_type_breakdown_section" : true,
            "space_type_details_section" : true,
            "units" : "IP",
            "utility_bills_rates_section" : true,
            "water_use_section" : true,
            "zone_condition_section" : true,
            "zone_equipment_detail_section" : true,
            "zone_summary_section" : true
         "description" : "Option 1 Description: This measure creates high level tables and charts pulling both from model inputs and EnergyPlus results. It has building level information as well as detail on space types, thermal zones, HVAC systems, envelope characteristics, and economics. Click the heading above a chart to view a table of the chart data.",
         "measure_dir_name" : "eff4e7ba-120b-4942-af85-91ee98cefc1d",
         "name" : "Option 1 Name"
   "updated_at" : "20200624T113041Z",
   "weather_file" : "NLD_Amsterdam.062400_IWEC.epw"

No warnings or errors...

Update 2: Running the model in OpenStudio (v1.0.0), using only the OpenStudio reporting measure fails (for message see comment below). The run.log file shows the following trace:

[09:45:59.636175 ERROR] undefined method measure_warning_section' for OsLib_Reporting:Module C:/Users/PAULBO~1/AppData/Local/Temp/osmodel-1593049438-1/resources/measures/OpenStudioResults/measure.rb:143:ineval' C:/Users/PAULBO~1/AppData/Local/Temp/osmodel-1593049438-1/resources/measures/OpenStudioResults/measure.rb:143:in eval' C:/Users/PAULBO~1/AppData/Local/Temp/osmodel-1593049438-1/resources/measures/OpenStudioResults/measure.rb:143:inblock in arguments' C:/Users/PAULBO~1/AppData/Local/Temp/osmodel-1593049438-1/resources/measures/OpenStudioResults/measure.rb:140:in each' C:/Users/PAULBO~1/AppData/Local/Temp/osmodel-1593049438-1/resources/measures/OpenStudioResults/measure.rb:140:inarguments' :/ruby/2.5.0/gems/openstudio-workflow-2.0.0/lib/openstudio/workflow/util/measure.rb:368:in apply_measure' :/ruby/2.5.0/gems/openstudio-workflow-2.0.0/lib/openstudio/workflow/util/measure.rb:92:inblock in apply_measures' :/ruby/2.5.0/gems/openstudio-workflow-2.0.0/lib/openstudio/workflow/util/measure.rb:67:in each_index' :/ruby/2.5.0/gems/openstudio-workflow-2 ... (more)

edit retag flag offensive close merge delete


Can you provide a few more details. What version of OpenStudio you are using, what your computer operating system is, if you are doing a local or cloud run, and if you updated any other measures?

If you are familiar with how to look at the server, looking in the datapoint JSON file would be helpful, you can search for "ERROR]" in the file. This link shows how to view the final OSW, there is also a link to the JSON.

David Goldwasser gravatar imageDavid Goldwasser ( 2020-06-24 11:46:07 -0500 )edit

Hi David,

Thank you for your help. Sorry, I should have indeed included some more information.

I'm running PAT on Windows 10, using a local run. I have tried the OpenStudio reporting measuring both in combination with my own measure, but also without. Both with the same issue.

I had also previously gone through the steps of inspecting the final OSW, but I don't see any hints in there of what may be the issue.

Is the previous version of the reporting measure available for download somewhere? Then I could check if that has something to do with it.

Optimulate gravatar imageOptimulate ( 2020-06-24 19:19:09 -0500 )edit

I have updated my original post with one of the final OSW's (it was too large to fit in a comment). Also maybe worth mentioning: I have changed the 'My Measures' folder. This initially also gave quite some issues as I changed it to a One Drive synced path (the path name being quite long and with spaces). Currently, it resides in C:\Code\EnergyPlus\Measures.

Optimulate gravatar imageOptimulate ( 2020-06-24 19:25:47 -0500 )edit

One more potential hint: I'm trying to run the simulation now in the OpenStudio Application (v1.0.0) OpenStudio itself is version 3.0.0), with the reporting measure. Here too, it won't work:

Initializing workflow.
Processing OpenStudio Measures.
Translating the OpenStudio Model to EnergyPlus.
Processing EnergyPlus Measures.

And now, I am able to find a hint, in the generated run.log file: undefined method `measure_warning_section' for OsLib_Reporting:Module

I'll update the original post with the log file for more information.

Optimulate gravatar imageOptimulate ( 2020-06-24 20:52:18 -0500 )edit

I found a work-around!!

After inspection of the source code of the measure, I found the following on r115-116 on measure.rb of the OpenStudioResults measure:

# TODO: - add in section to report warnings for this and other measures
result << 'measure_warning_section'

Commenting out "result << 'measure_warning_section'" allows the simulation to run.

Could this have been introduced by the new version? The 'TODO' kinda hints that way? Or is something else wrong?

Optimulate gravatar imageOptimulate ( 2020-06-25 02:19:09 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2020-06-25 15:57:53 -0500

I think I have the issue narrowed down to something happing on upload to BCL. I filed an issue here

To test this, if you are comfortable with GitHub, can you checkout this repository and then set the lib/measuresdirectory to your MyMeasures directory. OpenStudio Results should be one of the measures. You may have to remove the measure first and make sure it is cleaned out of your project.

edit flag offensive delete link more


Thank you David, that works! It's a bit tricky now since I was using the MyMeasures directory to develop my own measures. I guess I'll have to temporarily store those in the lib/measures folder for now, until I convert back to the BCL route again.

Optimulate gravatar imageOptimulate ( 2020-06-26 04:18:21 -0500 )edit

@Optimulate updated OpenStudio Results is on BCL now and should work, so you can free up your MyMeasures directory. We never got to it but a feature we considered was supporting multiple MyMeasure directories or at least a single one, but with support for nested directories. This would make it much easier when working with multiple GitHub repositories, it is a bit of a dance to keep changing it and updating them and not forgetting. Thanks again for pointing this out.

David Goldwasser gravatar imageDavid Goldwasser ( 2020-06-26 17:47:08 -0500 )edit

Your Answer

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

Add Answer


Question Tools



Asked: 2020-06-24 06:40:05 -0500

Seen: 74 times

Last updated: Jun 25