Opened 7 years ago
Closed 6 years ago
#4959 closed defect (fixed)
Exited with code -1 when simulating FMU
Reported by: | Owned by: | Adeel Asghar | |
---|---|---|---|
Priority: | normal | Milestone: | 1.13.0 |
Component: | OMEdit | Version: | v1.13.0-dev-nightly |
Keywords: | code -1, simulation terminated, invalid argument | Cc: |
Description
I have made 2 small test models, TestModel1 and TestModel3 in OMEdit, I then exported them as 2.0 ME FMUs.
I then import these 2 FMUs back into OMEdit and attempt to simulate them.
If I import TestModel1 first, then import TestModel3, and attempt to simulate them, TestModel1 will run fine, while TestModel3 will error out with the following messages:
fmi2GetContinuousStates failed with status : Error module = TestModel3, log level = ERROR: [logStatusError][FMU status:Error] fmi2GetContinuousStates: Invalid argument nx = 1. Expected 0. simulation terminated by an assertion at initialization module = TestModel3, log level = ERROR: [logStatusError][FMU status:Error] fmi2Terminate: Illegal call sequence. fmi2Terminate is not allowed in Error state. Simulation process failed. Exited with code -1.
If I now delete remove TestModel3 FMU from inside OMEdit (Delete), and import it again fresh. It will now simulate successfully, but TestModel1 now instead gives this error:
fmi2SetReal failed with status : Error simulation terminated by an assertion at initialization module = TestModel1, log level = ERROR: [logStatusError][FMU status:Error] fmi2Terminate: Illegal call sequence. fmi2Terminate is not allowed in Instantiated state. Simulation process failed. Exited with code -1.
From this point on this can be repeated as much as you want, by simply importing a fresh version of the model FMU that is giving errors, it will break the other one. Meaning I can never make a model including both these FMUs.
Attachments (2)
Change History (4)
by , 7 years ago
Attachment: | TestModel1.fmu added |
---|
comment:1 by , 6 years ago
Milestone: | Future → 1.13.0 |
---|---|
Status: | new → accepted |
I think the problem is that by default we are importing the both FMUs at the same place which creates a mess. We should generate a new folder for each FMU. I will try to fix it. Meanwhile as a workaround you can select an output directory when importing the FMU and make sure you choose different output directories for both FMUs.
comment:2 by , 6 years ago
Resolution: | → fixed |
---|---|
Status: | accepted → closed |
Fixed in bcacb27/OMEdit. OMEdit now generates a new directory when importing a FMU. The directory will be deleted automatically if the option Delete FMU directory and generated model when OMEdit is closed
is selected in the Options Dialog > FMI > Import
.
TestModel1 FMU file for the example above