Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when running Create Typical Building from Model Measures #695

Closed
bwinsatt opened this issue Mar 25, 2024 · 11 comments · Fixed by #699
Closed

Error when running Create Typical Building from Model Measures #695

bwinsatt opened this issue Mar 25, 2024 · 11 comments · Fixed by #699

Comments

@bwinsatt
Copy link

bwinsatt commented Mar 25, 2024

Issue overview

Error when running create typical building measures, specifically Create Typical Building from Model and Create DOE Prototype Building.

Current Behavior

The above measures result in an error when running withing OpenStudio Application, however, no error result if running the workflow file created from the Application directly in CLI.

Expected Behavior

Create Typical Building Model measure should create a building with loads from the Space Type and Construction Set Wizard.

Steps to Reproduce

ModelTest.zip

  1. Create a box model
  2. Run measures in succession: 1. Space Type and Construction Set Wizard, 2. Create Typical Building from Model.

Possible Solution

Running the OpenStudio Application generated workflow file in the CLI results in NO error.

Details

Full error text file attached, but the specific portion where the error seems to occur is here. Running this same command but inserting "openstudio" in the "" runs fine with no error:

DEBUG - Running with OS 2.x WorkflowJSON.
[openstudio.standards.command] Error running command: '"" run -w "/private/var/folders/sc/plzbznf500sbbdjc5hppgxl40000gn/T/osmodel-9898-b823-4fdf-acbe-1711363291-0/resources/run/001_CreateTypicalBuildingFromModel/SRvt/in.osw"'
[openstudio.standards.command] stdout:
[openstudio.standards.command] stderr: sh: : command not found
[openstudio.standards.command] command's modified ENV:

Environment

Some additional details about your environment for this issue (if relevant):

  • Platform (Operating system, version): MacOS14
  • Version of OpenStudioApplication (if using an intermediate build, include SHA): 1.7.0

Context

Error File: ModelTest_Debug.txt

@bwinsatt bwinsatt added the Triage Issue needs to be assessed and labeled, further information on reported might be needed label Mar 25, 2024
@jmarrec
Copy link
Collaborator

jmarrec commented Mar 26, 2024

Can't reproduce on Ubuntu. Your zipped model runs fine...

This is the bit that triggers the run_command (OSApp 1.7.0 uses OS SDK 3.7.0, which embeds openstudio standards 0.5.0)

https://github.com/NREL/openstudio-standards/blob/v0.5.0/lib/openstudio-standards/utilities/simulation.rb#L108-L114

Permalink: https://github.com/NREL/openstudio-standards/blob/18e3a888f58191a8dcd75a9749f639a4619340b6/lib/openstudio-standards/utilities/simulation.rb#L108-L114

OpenStudio.getOpenStudioCLI would be empty apparently, which I don't understand.

@jmarrec
Copy link
Collaborator

jmarrec commented Mar 26, 2024

@bwinsatt Could you run this model in the OSapp and report what you get please? I created a dummy measure that will print out the getOpenStudioCLI

test_os_cli.zip

On my machine:

Class Name: TestGetOpenStudioCLI
Measure Type: ModelMeasure
Measure Language: Ruby
Current step has 0 arguments
argumentMap={}
Searching for CLI in '/usr/local/openstudioapplication-1.7.0/lib/../openstudio'
Searching for CLI in '/usr/local/openstudioapplication-1.7.0/lib/../bin/openstudio'
Found CLI at '/usr/local/openstudioapplication-1.7.0/bin/openstudio'
OpenStudio.getOpenStudioCLI=/usr/local/openstudioapplication-1.7.0/bin/openstudio

image

@jmarrec jmarrec self-assigned this Mar 26, 2024
@bwinsatt
Copy link
Author

bwinsatt commented Mar 26, 2024

@jmarrec Thanks for the quick help. It seems that it can't find CLI?:

Class Name: TestGetOpenStudioCLI
Measure Type: ModelMeasure
Measure Language: Ruby
Current step has 0 arguments
argumentMap={}
Searching for CLI in '/Applications/OpenStudioApplication-1.7.0/lib/../openstudio'
Searching for CLI in '/Applications/OpenStudioApplication-1.7.0/lib/../bin/openstudio'
OpenStudio.getOpenStudioCLI=
Step Result: Success
Finished applying OpenStudio Measures.

@bwinsatt
Copy link
Author

bwinsatt commented Mar 26, 2024

@jmarrec It seems there is an openstudio Unix file in the bin folder of OSApp 1.6 but not 1.7? Do you think that could be the issue? For reference the measure runs fine in OSApp 1.6

UPDATE: I copied the Unix file from OSApp 1.6 into the bin folder in 1.7 and the Create Typical Building from Model measure runs normally. I am curious why it wasn't there since I did not remove it.

@macumber
Copy link
Collaborator

macumber commented Mar 26, 2024

This looks like an issue in https://github.com/openstudiocoalition/OpenStudioApplication/blob/develop/src/utilities/OpenStudioApplicationPathHelpers.cxx.in

I can take a look. I see, the issue is when the measure tries to call the OpenStudio CLI.

@macumber
Copy link
Collaborator

It seems like #664 was the reason for the regression.

@jmarrec
Copy link
Collaborator

jmarrec commented Mar 26, 2024

Way to throw me under the bus @macumber 👎
Joke aside, this is indeed a problem that should be fixed. Once again bit by the macos bundle shenanigans.

@jmarrec
Copy link
Collaborator

jmarrec commented Mar 26, 2024

If you can take a crack at it @macumber go ahead, otherwise I'll do it. Shouldn't be too hard to fix, but I've got too much things on my plate to know if I can get to it before end of the week

@jmarrec
Copy link
Collaborator

jmarrec commented Mar 26, 2024

And of course @bwinsatt thanks for the report and trying the debugging steps so quickly. Much appreciated. We can't improve if we don't know the issues!

@macumber
Copy link
Collaborator

I wasn't throwing you under the bus by name @jmarrec ;-) Besides if you were thrown under the bus you'd just be there with me, I've caused some new issues myself. I tested that #699 fixes this for now. I think we might need an OS SDK change to getOpenStudioCLI before we can remove this extra binary. In short term it seems like it's best to just put it back.

@jmarrec
Copy link
Collaborator

jmarrec commented Mar 27, 2024

We should really address the mess that is the macos bundle (not the first time I say this).

Either we commit to using a bundle fully, or we don't. Having a mix of both is painful and confusing

@macumber macumber added component - Installer/Platform 📦 Platform - Mac and removed Triage Issue needs to be assessed and labeled, further information on reported might be needed labels Mar 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants