Segmentation error using precice in local machine

Hello Everyone,

I have been using precice with some in house c++ code. When I want to run the code in my own local machine with two mpirun command for the two different solver. I get Signal 11 error (segmentation fault). When I run both solvers in sequental mode, there is no problem and the coupling is fine. I was wondering could this be beacuse of the different versions of ompi in the solvers and precice and do I need to compile precice from source code?
Thanks

Welcome, @Moe_dae!

Could you please provide more details? Do you have the complete log files or error messages?

Using the same MPI version is indeed important. If you cannot use the default MPI version of your system (that the preCICE binaries are built with), then you need to build it from source.

Hello @Makis ,
Thanks a lot for your reply.
The two codes that I am using are both fluid solver (Lattice Boltzmann solver). So they are the same solver but with different resolutions. The solver uses OpenMPI for paralellization within itself. So the precice is used for data transfer across the interface of the two solvers. Even when I run only one of the solvers with mpirun, I get the error. It happens exactly after precice initialization. The following is the output log that I get:

[prepareLattice] Prepare Lattice ... OK
preCICE: This is preCICE version 2.3.0
preCICE: Revision info: v2.3.0
preCICE: Configuration: Release (Debug and Trace log unavailable)
preCICE: Configuring preCICE with configuration "precice-config.xml"
preCICE: I am participant "cavity3d"
[Poiseuelle9:182953] *** Process received signal ***
[Poiseuelle9:182953] Signal: Segmentation fault (11)
[Poiseuelle9:182953] Signal code: Address not mapped (1)
[Poiseuelle9:182953] Failing at address: (nil)
[Poiseuelle9:182953] [ 0] /lib/x86_64-linux-gnu/libc.so.6(+0x43090)[0x14ac35bae090]
[Poiseuelle9:182953] [ 1] /lib/x86_64-linux-gnu/libprecice.so.2(_ZN7precice4impl19SolverInterfaceImpl15setMeshVerticesEiiPKdPi+0x198)[0x14ac36582758]
[Poiseuelle9:182953] [ 2] ./Coarse(+0x30d88)[0x5603590c0d88]
[Poiseuelle9:182953] [ 3] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf3)[0x14ac35b8f083]
[Poiseuelle9:182953] [ 4] ./Coarse(+0x3215e)[0x5603590c215e]
[Poiseuelle9:182953] *** End of error message ***
preCICE: This is preCICE version 2.3.0
preCICE: Revision info: v2.3.0
preCICE: Configuration: Release (Debug and Trace log unavailable)
preCICE: Configuring preCICE with configuration "precice-config.xml"
preCICE: I am participant "cavity3d"
[main] 51
preCICE: Setting up master communication to coupling partner/s
--------------------------------------------------------------------------
Primary job  terminated normally, but 1 process returned
a non-zero exit code. Per user-direction, the job has been aborted.
--------------------------------------------------------------------------
--------------------------------------------------------------------------
mpirun noticed that process rank 1 with PID 0 on node Poiseuelle9 exited on signal 11 (Segmentation fault).

Thanks again,
Moe

Looking at this line of the output:

[Poiseuelle9:182953] [ 1] /lib/x86_64-linux-gnu/libprecice.so.2(_ZN7precice4impl19SolverInterfaceImpl15setMeshVerticesEiiPKdPi+0x198)[0x14ac36582758]

I understand that the issue appears in the setMeshVertices. Are you maybe accessing the mesh correctly? Are the sizes you give to setMeshVertices correct?