PETSc error when compiling preCICE from source

Hi all, I’m trying to compile preCICE 2.3.0 from source on a large server (Ubuntu 20.04). I’ve installed the dependencies by using:

sudo apt install build-essential cmake libeigen3-dev libxml2-dev libboost-all-dev petsc-dev python3-dev python3-numpy

Everything looks fine during the configuration using cmake. However, there seems to be an OpenMPI version issue in the building process:

PETSc was configured with one OpenMPI mpi.h version but now appears to be compiling using a different OpenMPI mpi.h version.

cmake.log (4.4 KB)
make.log (13.2 KB)
In the make.log file, it looks like OpenMPI 4.0.0 is used to configure preCICE. How can I change the OpenMPI version used for compiling to solve this problem?

If you have called cmake before you installed all the dependencies with apt, you could try deleting the old build directory for preCICE. Afterwards create a build directory again and call cmake to configure preCICE. CMake is not always updating all paths if the environment (e.g., software installation) changes.

If you do not need PETSc for your debugging, i.e. you do not need RBF mappings for large cases, you could turn of PETSc (-DPRECICE_PETScMapping=off) as described in the documentation.

If you want to install PETSc from the Ubuntu package repository (i.e. via apt) then you should use the OpenMPI version that was installed via apt during the installation process. Then make sure that no other OpenMPI version is loaded. If you have a larger server, check whether you have any modules loaded or similar. This is a bit hart to debug since we do not know the configuration of your server.

You could also try to specify the paths to your OpenMPI compiler when calling CMake for building preCICE. This blog post has some examples. Note that the actual paths depend on your installation and linux. For me (also on Ubuntu 20.04), the library lives in /usr/lib/x86_64-linux-gnu/ while the compilers live in /usr/bin, for example.

If you really want to use your existing OpenMPI installation, the you might have to compile PETSc from source using the OpenMPI that you want to use with preCICE.

Hi @ajaust ,
Thanks for your reply. I’ve tried to specify the paths to our OpenMPI compiler but without success. Pevious users installed various versions of OpenMPI which made it hard to deal with… So I decided to give up RBF mapping at present. The compilation process and the make test_install were both fine.
Thanks again for your generous help!

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