Opened 6 years ago

Last modified 3 years ago

#5421 new defect

New FMU (OMEdit 1.13.2) failed load from cffi in lisp

Reported by: FBXon2ROX Owned by: Lennart Ochel
Priority: high Milestone:
Component: FMI Version: v1.13.2
Keywords: FMU CFFI Cc:

Description

Thank you for your great work.

I am working on Debian 64bit on a personal project creating a lisp package that loads FMU using cffi interface (similar to the python). For info I am working with emacs+slime+sbcl last year.

This all worked well so far and managed to connect to the fmu instance and fmi2-get-real or get-differential :-) if I may say.

The instantiation of a model exchange interface worked fine until some modifications in the FMU export (I am working with me and cs exports) in OMEdit 1.13.2.

Thank you for your support

I am not asking about lisp and cffi here as it already worked with a previous fmu in an older OMEdit but could you give me some ideas about what has been modified in the new version ?

I have checked the fmi2Functions.h of both FMUs the old and the new and nothing has changed here. The fmu2_model_interface.c has changed.
Are you aware of any issues that might help me here to go a little bit further ?

PS : Sorry I didn't track the previous OMEdit version that used to work :-( but it was definitely working last year.


Attachments (4)

Modelica.Blocks.Continuous.FirstOrder.fmu (1.2 MB ) - added by anonymous 6 years ago.
First order is not working
Modelica_Blocks_Continuous_SecondOrder_64bits.fmu (1.2 MB ) - added by anonymous 6 years ago.
2nd order is working
FMU-WORKING-EXAMPLE.txt (5.7 KB ) - added by FBXon2ROX 6 years ago.
FMU access working session
STRANGE-OCCURENCE-LOAD.txt (6.7 KB ) - added by FBXon2ROX 6 years ago.
Detailed steps fo the callbackfunctions fmu instantiation (static not working case)

Change History (16)

by anonymous, 6 years ago

First order is not working

by anonymous, 6 years ago

2nd order is working

comment:1 by Francesco Casella, 6 years ago

Milestone: Future1.14.0

comment:2 by Adrian Pop, 6 years ago

What is the actual problem? What is the error? Not working how?

  • Does the .so in the fmu is loaded properly in the process?
  • Does the FMU instantiates fine?

in reply to:  2 comment:3 by anonymous, 6 years ago

Replying to adrpo:

What is the actual problem? What is the error? Not working how?

  • Does the .so in the fmu is loaded properly in the process?
  • Does the FMU instantiates fine?

Sorry for the late reply but I was expecting an email warning .

Well it seems that warnings are somehow erratic or even inexistent. A late attempt lead to the following warnings ... with missing access to LAPACK functions.

In the following case the old fmu works fine.

Here are the first lines of the warning :
The first line is my command line to create a model exchange object from another instance containing the description.xml data. The following are the warning messages.

So my guess is that the new .so file doesn't point or contain the lapack functions (? not sure)
REMARK: By the way it's emacs+slime+sbcl

BEGINING OF THE TEST ERROR MESSAGE
FMI> (defparameter fmu-test (make-instance-me fmu-info ))

STYLE-WARNING: Undefined alien: "cgbrfsx_"
STYLE-WARNING: Undefined alien: "cgbsvxx_"
STYLE-WARNING: Undefined alien: "cgerfsx_"
STYLE-WARNING: Undefined alien: "cgesvxx_"
STYLE-WARNING: Undefined alien: "cherfsx_"
STYLE-WARNING: Undefined alien: "chesvxx_"
STYLE-WARNING: Undefined alien: "cla_gbamv_"
STYLE-WARNING: Undefined alien: "cla_gbrcond_c_"
STYLE-WARNING: Undefined alien: "cla_gbrcond_x_"
STYLE-WARNING: Undefined alien: "cla_gbrfsx_extended_"
STYLE-WARNING: Undefined alien: "cla_gbrpvgrw_"
STYLE-WARNING: Undefined alien: "cla_geamv_"
STYLE-WARNING: Undefined alien: "cla_gercond_c_"
STYLE-WARNING: Undefined alien: "cla_gercond_x_"
STYLE-WARNING: Undefined alien: "cla_gerfsx_extended_" ........

by FBXon2ROX, 6 years ago

Attachment: FMU-WORKING-EXAMPLE.txt added

FMU access working session

comment:4 by Adrian Pop, 6 years ago

How did you compiled the FMU?
From OMEdit Tools->Options->FMI, choose Platform: Static.

by FBXon2ROX, 6 years ago

Attachment: STRANGE-OCCURENCE-LOAD.txt added

Detailed steps fo the callbackfunctions fmu instantiation (static not working case)

in reply to:  4 comment:5 by FBXon2ROX, 6 years ago

Replying to adrpo:

How did you compiled the FMU?
From OMEdit Tools->Options->FMI, choose Platform: Static.

Seems like my previous answer didn't register.

I have used both type of compilation and labriry format static and dynamic.

Please also find for your information a detailed description of the callback functions fmu instantiation process.

comment:6 by FBXon2ROX, 6 years ago

Another info for you ?

I can load the new fmu in OMEdit and use it in a model.
So it seems that any changes are followed by the OMEdit protocol and working.
I have no options to test the fmu loading process with another fmu loader.
Could you recommend a tool I may use in order to check that the fmu produced is correct ?
I gladly could use it to give you more data.

Thank you for you support

comment:7 by FBXon2ROX, 6 years ago

The previous version that used to work is OMEdit v 1.12.0

comment:8 by Martin Sjölund, 6 years ago

Do you get those lapack warnings for the attached FMUs? They do not have any references to these functions, so the message shouldn't appear. OMSimulator also loads the FMUs just fine.

From your txt-file it seems that the error is that the simulation just freezes? I think 1.12.0 already contained some of the fixes for making sure the garbage collector never runs, and to statically link the executable by default.

comment:9 by Francesco Casella, 5 years ago

Milestone: 1.14.01.16.0

Releasing 1.14.0 which is stable and has many improvements w.r.t. 1.13.2. This issue is rescheduled to 1.16.0

comment:10 by Francesco Casella, 4 years ago

Milestone: 1.16.01.17.0

Retargeted to 1.17.0 after 1.16.0 release

comment:11 by Francesco Casella, 4 years ago

Milestone: 1.17.01.18.0

Retargeted to 1.18.0 because of 1.17.0 timed release.

comment:12 by Francesco Casella, 3 years ago

Milestone: 1.18.0

Ticket retargeted after milestone closed

Note: See TracTickets for help on using tickets.