#4130 closed defect (worksforme)
FMI ModelExchange export - blocked to fmi2EnterInitializationMode with checker - simple case with loop
Reported by: | Owned by: | Adeel Asghar | |
---|---|---|---|
Priority: | high | Milestone: | Future |
Component: | FMI | Version: | v1.9.4-v1.9.x |
Keywords: | FMI ME loop | Cc: | audrey.jardin@…, jean-philippe.tavella@… |
Description
For the simple example attached, the FMU Model Exchange doesn't work with the checker.
The checker crashes and the end of the log is the following :
[FMU][logFmi2Call][FMU status:OK] fmi2Instantiate: GUID={8c4e810f-3df3-4a00-8276-176fa3c9f9e0}
[VERBOSE][FMICAPI] Calling fmi2SetupExperiment
[FMU][logFmi2Call][FMU status:OK] fmi2SetupExperiment: toleranceDefined=0 tolerance=1e-006 startTime=0 stopTimeDefined=0 stopTime=0
[VERBOSE][FMICAPI] Calling fmi2EnterInitializationMode
[FMU][logFmi2Call][FMU status:OK] fmi2EnterInitializationMode...
Attachments (5)
Change History (18)
by , 8 years ago
Attachment: | Test_2.fmu added |
---|
by , 8 years ago
by , 8 years ago
by , 8 years ago
Attachment: | Test_2.2.mo added |
---|
comment:1 by , 8 years ago
follow-up: 7 comment:2 by , 8 years ago
Just had a quick look using the current nightly build of OpenModelica under Linux64. Everything works fine. Your log says:
FMI compliance checker 2.0.1 [FMILibrary: 2.0.1] build date: Oct 24 2014
Did you try the new version 2.0.3 that was released in September 2016?
follow-up: 6 comment:3 by , 8 years ago
Under Windows I get the same segfault. You may try the Cpp runtime by selecting:
OMEdit: Tools->Options->Simulation->Target Language: Cpp
or
setCommandLineOptions("+simCodeTarget=Cpp")
Then it works under Windows as well. Restricted to ME:
fmuCheck.win32.exe -k me Test_2.fmu
(at the benefit of significantly smaller FMU size -- 716 KB instead of 8297 KB for your example using a recent nightly build of OpenModelica -- down to 99 KB when using msvc instead of gcc)
The reported error appears irrelevant for typical uses, but will be fixed soon:
[ERROR][FMUCHK] FMU does not make an internal copy of provided instance name (violation of fmiString handling)
follow-up: 8 comment:5 by , 8 years ago
I tried the example with the latest nightly build version of OpenModelica. I created the fmu using Test_2.2.mo
and then used the latest fmuchecker version 2.0.3. Attached the log file when I run the fum with it. Everything seems fine.
Note that I am using the 64-bit version of OpenModelica and fmuchecker.
by , 8 years ago
Attachment: | log_2_1.txt added |
---|
comment:6 by , 8 years ago
Thank you very much, this solution solves my problem. It works with the checker and with my code.
Replying to rfranke:
Under Windows I get the same segfault. You may try the Cpp runtime by selecting:
OMEdit: Tools->Options->Simulation->Target Language: Cpp
or
setCommandLineOptions("+simCodeTarget=Cpp")
Then it works under Windows as well. Restricted to ME:
fmuCheck.win32.exe -k me Test_2.fmu
(at the benefit of significantly smaller FMU size -- 716 KB instead of 8297 KB for your example using a recent nightly build of OpenModelica -- down to 99 KB when using msvc instead of gcc)
The reported error appears irrelevant for typical uses, but will be fixed soon:
[ERROR][FMUCHK] FMU does not make an internal copy of provided instance name (violation of fmiString handling)
comment:7 by , 8 years ago
If I keep :
OMEdit: Tools->Options->Simulation->Target Language: C
The FMU doesnt work with the last version of the checker. I get the same error message
Replying to rfranke:
Just had a quick look using the current nightly build of OpenModelica under Linux64. Everything works fine. Your log says:
FMI compliance checker 2.0.1 [FMILibrary: 2.0.1] build date: Oct 24 2014
Did you try the new version 2.0.3 that was released in September 2016?
comment:8 by , 8 years ago
Thank you very much for your answer.
It works when I choose Cpp runtime (solution proposed by rfranke) :
OMEdit: Tools->Options->Simulation->Target Language: Cpp
Replying to adeas31:
I tried the example with the latest nightly build version of OpenModelica. I created the fmu using
Test_2.2.mo
and then used the latest fmuchecker version 2.0.3. Attached the log file when I run the fum with it. Everything seems fine.
Note that I am using the 64-bit version of OpenModelica and fmuchecker.
follow-up: 10 comment:9 by , 8 years ago
OK. Its up to what you want to use. I tested it with C runtime and it works.
comment:10 by , 8 years ago
It is weird, it doesnt work on my computer (windows 8 - openModelica 1.9.6 - FMU 32 bits)
Thank you very much for your time
Replying to adeas31:
OK. Its up to what you want to use. I tested it with C runtime and it works.
follow-up: 12 comment:11 by , 8 years ago
Resolution: | → worksforme |
---|---|
Status: | new → closed |
You need to install new versions of OpenModelica & FMUChecker.
comment:12 by , 8 years ago
1.9.6 is not the last version of OpenModelica? how can I get the last version?
C runtime doesnt work for all cases on my computer.
Cpp runtime doesnt work in some cases.
In some cases, both runtimes doesnt work !
Replying to adeas31:
You need to install new versions of OpenModelica & FMUChecker.
comment:13 by , 8 years ago
I'm having a not so old version under Windows:
OMEdit v1.10.0-dev-170-gaf701af
Connected to OpenModelica v1.11.0-dev-73-g8c6ebff
Still can reproduce the crash using the latest FMUChecker.
File Test_2.2.mo is the file to generate the FMU.
Thank you in advance