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

# PAT fails as soon as I add the OpenStudio Results Measure

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" :
[
"C:/Data/small_hotel/temp_data/analysis_2ee9883c-1dd6-4400-b53d-d3856b3f8c6d/data_point_491e53af-ef07-4421-b8a0-af722af2af46/generated_files",
"../weather",
"../seeds",
"../seed",
"./files",
"./weather",
"../../files",
"../../weather",
"./"
],
"hash" : "4E37D3B4",
"measure_paths" :
[
"../measures"
],
"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,
"interior_lighting_section" : true,
"measure_warning_section" : true,
"monthly_overview_section" : true,
"outdoor_air_section" : true,
"plant_loops_detail_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 ...

edit retag 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.

( 2020-06-24 11:46:07 -0600 )edit

Hi David,

I'm running PAT 3.0.0.0 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.

( 2020-06-24 19:19:09 -0600 )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.

( 2020-06-24 19:25:47 -0600 )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.
Failed.


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.

( 2020-06-24 20:52:18 -0600 )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?

( 2020-06-25 02:19:09 -0600 )edit

Sort by » oldest newest most voted

I think I have the issue narrowed down to something happing on upload to BCL. I filed an issue here https://github.com/NREL/openstudio-co...

To test this, if you are comfortable with GitHub, can you checkout this repository and then set the lib/measures`directory 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. https://github.com/NREL/openstudio-co...

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.

( 2020-06-26 04:18:21 -0600 )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.

( 2020-06-26 17:47:08 -0600 )edit