Error when running the Quickstart case

Hi everyone,

I am new to preCICE. I have just installed preCICE using spack, and then installed the OpenFOAM-preCICE adapter. My openfoam version is 2206. When I followed the tutorials of the Quickstart case (Quickstart | preCICE - The Coupling Library), the solid-cpp windows freezes at “—[precice] Setting up primary communication to coupling partner/s”, and the fluid-openfoam windows shows the following error. Could anyone give me some hint on the cause of these errors? Thank you.

---[preciceAdapter] Loaded the OpenFOAM-preCICE adapter - v1.1.0.
---[preciceAdapter] Reading preciceDict...
#0  Foam::error::printStack(Foam::Ostream&) at ??:?
#1  Foam::sigSegv::sigHandler(int) at ??:?
#2  ? in /lib/x86_64-linux-gnu/libpthread.so.0
#3  MPI_Comm_rank in /usr/local/lib/libmpi.so.40
#4  precice::utils::Parallel::CommState::rank() const in ~/Tools/spack/opt/spack/linux-ubuntu20.04-zen2/gcc-9.4.0/precice-2.4.0-4r6pvylnklgr5g5dpjzjogz5yjwnzopk/lib/libprecice.so.2
#5  precice::impl::SolverInterfaceImpl::configure(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) in ~/Tools/spack/opt/spack/linux-ubuntu20.04-zen2/gcc-9.4.0/precice-2.4.0-4r6pvylnklgr5g5dpjzjogz5yjwnzopk/lib/libprecice.so.2
#6  precice::impl::SolverInterfaceImpl::SolverInterfaceImpl(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int, int, void*) in ~/Tools/spack/opt/spack/linux-ubuntu20.04-zen2/gcc-9.4.0/precice-2.4.0-4r6pvylnklgr5g5dpjzjogz5yjwnzopk/lib/libprecice.so.2
#7  precice::impl::SolverInterfaceImpl::SolverInterfaceImpl(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int, int) in ~/Tools/spack/opt/spack/linux-ubuntu20.04-zen2/gcc-9.4.0/precice-2.4.0-4r6pvylnklgr5g5dpjzjogz5yjwnzopk/lib/libprecice.so.2
#8  precice::SolverInterface::SolverInterface(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int, int) in ~/Tools/spack/opt/spack/linux-ubuntu20.04-zen2/gcc-9.4.0/precice-2.4.0-4r6pvylnklgr5g5dpjzjogz5yjwnzopk/lib/libprecice.so.2
#9  preciceAdapter::Adapter::configure() at ??:?
#10  Foam::functionObjects::preciceAdapterFunctionObject::read(Foam::dictionary const&) at ??:?
#11  Foam::functionObjects::preciceAdapterFunctionObject::preciceAdapterFunctionObject(Foam::word const&, Foam::Time const&, Foam::dictionary const&) at ??:?
#12  Foam::functionObject::adddictionaryConstructorToTable<Foam::functionObjects::preciceAdapterFunctionObject>::New(Foam::word const&, Foam::Time const&, Foam::dictionary const&) at ??:?
#13  Foam::functionObject::New(Foam::word const&, Foam::Time const&, Foam::dictionary const&) at ??:?
#14  Foam::functionObjectList::read() at ??:?
#15  Foam::Time::run() const at ??:?
#16  ? in ~/Tools/OpenFOAM-2206/OpenFOAM-2206/platforms/linux64GccDPInt32Opt/bin/pimpleFoam
#17  __libc_start_main in /lib/x86_64-linux-gnu/libc.so.6
#18  ? in ~/Tools/OpenFOAM-2206/OpenFOAM-2206/platforms/linux64GccDPInt32Opt/bin/pimpleFoam
../../tools/run-openfoam.sh: line 15: 795425 Segmentation fault      (core dumped) ${solver}

Hi @jianzhou722 :wave:

Looks to me like OpenFOAM and preCICE use different MPI versions.

Which system are you on? Which MPI do you use with spack? How did you get OpenFOAM?

1 Like

Thank you. I followed your suggestions and it turns out that openfoam was compiled with openmpi, while preCICE is compiled with mpich. After using the same MPI library the issue has been resolved.

4 Likes

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