Error with OpenFOAM adapter: undefined symbol: ompi_instance_count

Hi there, the following errors come out in a cluster:

--> FOAM Warning :
    From void* Foam::dlLibraryTable::openLibrary(const Foam::fileName&, bool)
    in file db/dynamicLibrary/dlLibraryTable/dlLibraryTable.C at line 188
    Could not load "libpreciceAdapterFunctionObject.so"
/path/to/Software/spack/opt/spack/linux-zen2/openmpi-5.0.7-sqeayamv3bgdkgz4r3g6fcxxispyjowt/lib/libmpi_mpifh.so.40: undefined symbol: ompi_instance_count
--> FOAM Warning :
Unknown function type preciceAdapterFunctionObject

I installed preCICE by spack and build ccx_preCICE from source. It may be because of the openmpi version? But I am not sure about that.

In the cluster, the openmpi version is 4.1.4 and it is 5.0.7 in spack.

Thanks in advance!

This problem is solved by adding openmpi path into the bashrc file.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.