Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#4899 closed defect (fixed)

FMU Export of Multibody Models crash

Reported by: julius.martensen@… Owned by: Martin Sjölund
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 by Francesco Casella, 7 years ago

Milestone: Future1.13.0
Priority: highblocker

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 by Martin Sjölund, 7 years ago

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 by Martin Sjölund, 7 years ago

Owner: changed from Lennart Ochel to Martin Sjölund
Status: newaccepted

in reply to:  1 comment:4 by julius.martensen@…, 7 years ago

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 by Francesco Casella, 7 years ago

@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 by Martin Sjölund, 7 years ago

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

comment:7 by julius.martensen@…, 7 years ago

Works like a charm!

Thanks!

comment:8 by Francesco Casella, 7 years ago

Resolution: fixed
Status: acceptedclosed

comment:9 by Martin Sjölund, 7 years ago

Milestone: 1.13.0maint/1.12
Resolution: fixed
Status: closedreopened

comment:10 by Francesco Casella, 7 years ago

Are we actually planning a 1.12.1 maintenance release?

comment:11 by Martin Sjölund, 7 years ago

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 by Martin Sjölund, 7 years ago

Resolution: fixed
Status: reopenedclosed

comment:13 by Francesco Casella, 7 years ago

Can you bring 1.12.1 up at the next devmeeting?

Note: See TracTickets for help on using tickets.