Commit 08b72baf authored by Lars Bilke's avatar Lars Bilke
Browse files

[ML] Preload mfront libraries on Linux.

Fixes #3073.
parent 8576730c
......@@ -9,6 +9,10 @@
#include "CreateMFront.h"
#ifndef _WIN32
#include <dlfcn.h>
#endif
#include "BaseLib/FileTools.h"
#include "MFront.h"
#include "ParameterLib/Utils.h"
......@@ -94,6 +98,14 @@ std::unique_ptr<MechanicsBase<DisplacementDim>> createMFront(
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 =
mgis::behaviour::load(lib_path, behaviour_name, hypothesis);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment