CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Pre-Processing

Dynamic library not loading

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By olesen
  • 1 Post By olesen

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 22, 2023, 04:21
Default Dynamic library not loading
  #1
New Member
 
Mukul Chandra
Join Date: May 2023
Location: India
Posts: 4
Rep Power: 3
risktaker5 is on a distinguished road
Could not load "dynamicCode/platforms/linux64GccDPInt32Opt/lib/libcodeStream_124637ec1044e3706f08a6b9fff6f2dacd9f 4cba.so" , this is the error i am getting while running the simulation. Please help.
risktaker5 is offline   Reply With Quote

Old   July 24, 2023, 06:00
Default
  #2
Senior Member
 
Domenico Lahaye
Join Date: Dec 2013
Posts: 770
Blog Entries: 1
Rep Power: 17
dlahaye is on a distinguished road
Use -L option to specify path to the shared library file.

See manual of compiler that you are using.
dlahaye is offline   Reply With Quote

Old   July 24, 2023, 14:22
Default
  #3
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,714
Rep Power: 40
olesen has a spectacular aura aboutolesen has a spectacular aura about
Quote:
Originally Posted by risktaker5 View Post
Could not load "dynamicCode/platforms/linux64GccDPInt32Opt/lib/libcodeStream_124637ec1044e3706f08a6b9fff6f2dacd9f 4cba.so" , this is the error i am getting while running the simulation. Please help.

Are you certain that this is an error message and not just a warning? With dynamic code compilation it will first attempt to load a library corresponding to the SHA1 of the source code contents (and context). If this fails, it should normally go off and compile the code and then try again. If this doesn't success it could be that you are missing make, wmake src/OpenFOAM or something else on that particular node. You'll need to search a bit more.
saeed jamshidi likes this.
olesen is offline   Reply With Quote

Old   July 24, 2023, 14:25
Default
  #4
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,714
Rep Power: 40
olesen has a spectacular aura aboutolesen has a spectacular aura about
Quote:
Originally Posted by dlahaye View Post
Use -L option to specify path to the shared library file.

See manual of compiler that you are using.

None of this will help since the message (or error) is coming from the dynamic code compilation and loading. The load library routine and underlying dlopen within OpenFOAM should already be receiving the fully resolved path to load. Fiddling with any '-L' option will do absolutely nothing since the solver is already running and loaded - you need to be injecting new symbol resolution dynamically, not at link time.
dlahaye likes this.
olesen is offline   Reply With Quote

Old   July 25, 2023, 03:55
Default
  #5
Senior Member
 
Domenico Lahaye
Join Date: Dec 2013
Posts: 770
Blog Entries: 1
Rep Power: 17
dlahaye is on a distinguished road
@olesen: thx for clarifying.
dlahaye is offline   Reply With Quote

Old   October 25, 2023, 14:57
Default
  #6
New Member
 
Prom
Join Date: Aug 2023
Posts: 7
Rep Power: 3
gbope7 is on a distinguished road
I am also having a similar issue. I want to load a library from $FOAM_USER_LIBBIN so that I can use some of its functions in a codedFixedValue boundary condition. I am referencing the library in controlDict like this.

Code:
libs
(
     "$(FOAM_USER_LIBBIN)/libinterpolateTemperature.dylib"
);
The library has been compiled and is in that path, however, I always get a warning that it cannot be loaded. Since it won't load openFOAM tries to build another library in the case directory which leads to an error. Below is the warning that I keep getting. Can you advise on what my issue is please?

Code:
--> FOAM Warning : 
    From void *Foam::dlLibraryTable::openLibrary(const Foam::fileName &, bool)
    in file db/dynamicLibrary/dlLibraryTable/dlLibraryTable.C at line 188
    Could not load "$(FOAM_USER_LIBBIN)/libinterpolateTemperature.dylib"
dlopen($(FOAM_USER_LIBBIN)/libinterpolateTemperature.dylib, 0x0009): tried: '/Volumes/OpenFOAM-v2306/platforms/darwin64ClangDPInt32Opt/lib/openmpi/libinterpolateTemperature.dylib' (no such file), '/Volumes/OpenFOAM-v2306/platforms/darwin64ClangDPInt32Opt/lib/libinterpolateTemperature.dylib' (no such file), '/Volumes/OpenFOAM-v2306/usr/opt/fftw/lib/libinterpolateTemperature.dylib' (no such file), '/Volumes/OpenFOAM-v2306/usr/opt/mpfr/lib/libinterpolateTemperature.dylib' (no such file), '/Volumes/OpenFOAM-v2306/usr/opt/gmp/lib/libinterpolateTemperature.dylib' (no such file), '/Volumes/OpenFOAM-v2306/usr/opt/cgal/lib/libinterpolateTemperature.dylib' (no such file), '/Volumes/OpenFOAM-v2306/usr/opt/boost/lib/libinterpolateTemperature.dylib' (no such file), '/Volumes/OpenFOAM-v2306/usr/opt/open-mpi/lib/libinterpolateTemperature.dylib' (no such file), '/Volumes/OpenFOAM-v2306/platforms/darwin64ClangDPInt32Opt/lib/dummy/libinterpolateTemperature.dylib' (no such file), '$(FOAM_USER_LIBBIN)/libinterpolateTemperature.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS$(FOAM_USER_LIBBIN)/libinterpolateTemperature.dylib' (no such file), '/usr/lib/$(FOAM_USER_LIBBIN)/libinterpolateTemperature.dylib' (no such file, not in dyld cache), '$(FOAM_USER_LIBBIN)/libinterpolateTemperature.dylib' (no such file)
gbope7 is offline   Reply With Quote

Old   May 19, 2024, 09:48
Default
  #7
New Member
 
Join Date: Dec 2019
Posts: 5
Rep Power: 6
moh raafat is on a distinguished road
I face similar problem, when I try to doing blockMesh, error appears like this:

--> FOAM FATAL IO ERROR: (openfoam-2312)
Failed loading library "dynamicCode/_1046a627e95cf41b09672fbbb6b71d2c23de0441/platforms/linuxARM64GccDPInt32Opt/lib/libcodeStream_1046a627e95cf41b09672fbbb6b71d2c23de 0441.so" on some processors.Did you add all libraries to the 'libs' entry in system/controlDict?
moh raafat is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[OpenFOAM.com] Compiling Scotch library error fedez91 OpenFOAM Installation 6 March 2, 2022 23:25
Compile boundary condition as a new dynamic library mohanphy OpenFOAM Programming & Development 22 January 21, 2021 05:53
Pressure drop with filter dynamic loading akaobi STAR-CCM+ 4 March 30, 2018 10:08
Forcing a solver to use your custom library. cdunn6754 OpenFOAM Programming & Development 0 March 30, 2017 16:05
error in loading valve.c of dynamic mesh Pavan FLUENT 4 February 25, 2009 00:22


All times are GMT -4. The time now is 20:32.