Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linking error during FMU export of Geothermal Borefields OneUTubes / TwoUTubes, undefined reference to `dgetri_' #1955

Closed
tinoetzold opened this issue Jan 28, 2025 · 2 comments

Comments

@tinoetzold
Copy link

Bug description

Trying to export the Example "IBPSA/Fluid/Geothermal/Borefields/Examples/RectangularBorefield.mo" as FMU unfortunatelly fails. The error message indicates the the linking process fails while trying to link the function `dgetri_'.

Same behaviour appears when exporting models including OneUTube and TwoUTubes as FMU, that work fine while simulationg within Omedit.

To reproduce:

  1. Open example IPBSA/Fluid/Geothermal/Borefields/Examples/RectangularBorefield.mo
  2. Right-click on example and choose Export -> FMU
  3. FMU creation fails with error message (complete error message attached): C:/Users/ETZOLD/Programs/OpenModelica/tools/msys/ucrt64/bin/ld: CMakeFiles/RectangularBorefield.dir/objects.a(RectangularBorefield_functions.c.obj):RectangularBorefield_functions.c:(.text+0x1dd99): undefined reference to `dgetri_'
    clang: error: linker command failed with exit code 1 (use -v to see invocation)

Expected behavior
It is expected that the linking process during FMU export is set up to find the library containing the referenced function `dgetri_'

Desktop

  • OpenModelica Omedit v1.24.3
  • IBPSA Main Branch (downloaded January 28th 2025)
  • Windows11

(similar issue appears on Ubuntu Linux 24.04 LTS with same version of OpenModelica and IBPSA. Under Linux, the libraries are dynamically linked, so the error appears when calling the FMU, but the error message indicates that the same function dgetri_ cannot be found.)

IBPSA_borefield_FMU_error_message.txt

Thank you very much!
Best regards
Tino

@mwetter
Copy link
Contributor

mwetter commented Jan 30, 2025

This model should work for the FMI export, see
https://libraries.openmodelica.org/branches/master-fmi/Buildings_latest/Buildings_latest.html
for the flags.

If it won't work please report it to the OpenModelica issue tracker unless you see something wrong with the model implementation.

@mwetter mwetter closed this as completed Jan 30, 2025
@tinoetzold
Copy link
Author

When checking the results of the FMU rund shown in the Link "sim" it shows that the simulation fails:

https://libraries.openmodelica.org/branches/master-fmi/Buildings_latest/files/Buildings_latest_Buildings.Fluid.Geothermal.Borefields.Examples.RectangularBorefield.sim

Building the FMU under Linux works since the libraries are dynamically linked, therefore the FMU fails when running it, this is how the FMU was compiled in the OpenModelica-Test. Under Windows somehow libraries are statically linked, therefore the issue appears during FMU generation.

I'll create a report in openmodelica.

Best regards!
Tino

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants