Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#4899 closed defect (fixed)

FMU Export of Multibody Models crash

Reported by: julius.martensen@… Owned by: sjoelund.se
Priority: blocker Milestone: maint/1.12
Component: FMI Version: v1.13.0-dev-nightly
Keywords: Cc:

Description

I can not simulate any FMU exported from OMEdit containing parts of the Multibody Library. This is limited to FMUs generated in Ubuntu; models exported in windows work.

A minimal output of the FMUChecker shows the error:

[FATAL][FMICAPI] Could not load the DLL: /media/jmartensen/Data/general/test/fmu_test/fmucktmpwPvnKY/binaries/linux64/Modelica_Mechanics_MultiBody_Examples_Elementary_DoublePendulum.so: undefined symbol: mmc_mk_modelica_array
[FATAL][FMUCHK] Could not create the DLL loading mechanism(C-API) for ME.
[FATAL][FMICAPI] Could not load the DLL: /media/jmartensen/Data/general/test/fmu_test/fmucktmpwPvnKY/binaries/linux64/Modelica_Mechanics_MultiBody_Examples_Elementary_DoublePendulum.so: undefined symbol: mmc_mk_modelica_array
[FATAL][FMUCHK] Could not create the DLL loading mechanism(C-API) for CoSimulation.
FMU check summary:
FMU reported:
	0 warning(s) and error(s)
Checker reported:
	Warnings and non-critical errors were ignored (log level: FATAL)
	4 Fatal error(s) occurred during processing

I tried FMI 1.0 / 2.0 with different linking options. None seems to work.

Change History (13)

comment:1 follow-up: Changed 6 years ago by casella

  • Milestone changed from Future to 1.13.0
  • Priority changed from high to blocker

Even though most people use FMI under Windows, this seems like a fairly critical issue, particularly if this used to work in previous versions.

@julius.martensen, can you check whether this worked with the 1.12.0 stable release?

comment:2 Changed 6 years ago by sjoelund.se

The same error would occur under Windows unless shipping Boehm GC together with the FMU. 1.13 nightlies catch the error for statically linked FMUs:

/tmp/Modelica_Mechanics_MultiBody_Examples_Elementary_DoublePendulum.fmutmp/sources/Modelica_Mechanics_MultiBody_Examples_Elementary_DoublePendulum_functions.c:147: undefined reference to `mmc_mk_modelica_array'

Fixing the problem would be trivial here since the function pointers actually are unused and don't need to be generated. But I suppose it's better to fix the underlying error...

comment:3 Changed 6 years ago by sjoelund.se

  • Owner changed from lochel to sjoelund.se
  • Status changed from new to accepted

comment:4 in reply to: ↑ 1 Changed 6 years ago by julius.martensen@…

Replying to casella:

Even though most people use FMI under Windows, this seems like a fairly critical issue, particularly if this used to work in previous versions.

@julius.martensen, can you check whether this worked with the 1.12.0 stable release?

Thanks for the quick response!

The error occured also using 1.12.0 stable.

comment:5 Changed 6 years ago by casella

@julius.martensen, PR #2393 was merged into master. Please check with tomorrow's nightly build (or right away if you want to recompile omc from sources) if the problem is fixed and close the ticket in that case.

comment:6 Changed 6 years ago by sjoelund.se

I believe this should probably be merged into 1.12 maintenance as well...

comment:7 Changed 6 years ago by julius.martensen@…

Works like a charm!

Thanks!

comment:8 Changed 6 years ago by casella

  • Resolution set to fixed
  • Status changed from accepted to closed

comment:9 Changed 6 years ago by sjoelund.se

  • Milestone changed from 1.13.0 to maint/1.12
  • Resolution fixed deleted
  • Status changed from closed to reopened

comment:10 Changed 6 years ago by casella

Are we actually planning a 1.12.1 maintenance release?

comment:11 Changed 6 years ago by sjoelund.se

I continuously build the 1.12 branch for the Linux users... We really should have a 1.12.1 official release though: the fixes are mostly for the GUI: https://github.com/OpenModelica/OMCompiler/compare/v1.12.0...maintenance/v1.12 (Adeel also has some fixes in OMEdit that should be merged into the maintenance release)

comment:12 Changed 6 years ago by sjoelund.se

  • Resolution set to fixed
  • Status changed from reopened to closed

comment:13 Changed 6 years ago by casella

Can you bring 1.12.1 up at the next devmeeting?

Note: See TracTickets for help on using tickets.