Skip to content
Snippets Groups Projects
Commit 08b72baf authored by Lars Bilke's avatar Lars Bilke
Browse files

[ML] Preload mfront libraries on Linux.

Fixes #3073.
parent 8576730c
No related branches found
No related tags found
No related merge requests found
...@@ -9,6 +9,10 @@ ...@@ -9,6 +9,10 @@
#include "CreateMFront.h" #include "CreateMFront.h"
#ifndef _WIN32
#include <dlfcn.h>
#endif
#include "BaseLib/FileTools.h" #include "BaseLib/FileTools.h"
#include "MFront.h" #include "MFront.h"
#include "ParameterLib/Utils.h" #include "ParameterLib/Utils.h"
...@@ -94,6 +98,14 @@ std::unique_ptr<MechanicsBase<DisplacementDim>> createMFront( ...@@ -94,6 +98,14 @@ std::unique_ptr<MechanicsBase<DisplacementDim>> createMFront(
hypothesis = mgis::behaviour::Hypothesis::TRIDIMENSIONAL; hypothesis = mgis::behaviour::Hypothesis::TRIDIMENSIONAL;
} }
// Fix for https://gitlab.opengeosys.org/ogs/ogs/-/issues/3073
// Pre-load dependencies of mfront lib
#ifndef _WIN32
dlopen("libTFELNUMODIS.so", RTLD_NOW);
dlopen("libTFELUtilities.so", RTLD_NOW);
dlopen("libTFELException.so", RTLD_NOW);
#endif
auto behaviour = auto behaviour =
mgis::behaviour::load(lib_path, behaviour_name, hypothesis); mgis::behaviour::load(lib_path, behaviour_name, hypothesis);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment