Compiling preCICE3.2.0 with petsc and openmp error in WSL

When I was installing the preCICE library, I got the following error “PETSc was configured with OpenMPI but now appears to be compiling using a non-OpenMPI mpi.h“, I have installed the dependencies by

sudo apt update && \
sudo apt install build-essential cmake libeigen3-dev libxml2-dev libboost-all-dev petsc-dev python3-dev python3-numpy
  • preCICE version: 3.2.0
  • Operating system or platform Ubuntu 22.04, WSL
  • Installation method :building with CMake

Here is the compiling log:

[  0%] Building CXX object thirdparty/fmt/CMakeFiles/fmtlib-static.dir/src/format.cc.o
[  1%] Building CXX object thirdparty/fmt/CMakeFiles/fmtlib-static.dir/src/os.cc.o
-- Found Git: /usr/bin/git (found version "2.34.1")
fatal: not a git repository (or any of the parent directories): .git
-- Revision status: Detection failed
[  1%] Built target GitRevision
[  2%] Linking CXX static library libfmtlib-static.a
[  2%] Built target fmtlib-static
[  4%] Building CXX object CMakeFiles/preciceCore.dir/Unity/unity_partition_cxx.cxx.o
[  4%] Building CXX object CMakeFiles/preciceCore.dir/Unity/unity_action_cxx.cxx.o
[  4%] Building CXX object CMakeFiles/preciceCore.dir/Unity/unity_io_cxx.cxx.o
[  5%] Building CXX object CMakeFiles/preciceCore.dir/Unity/unity_profiling_cxx.cxx.o
[  6%] Building CXX object CMakeFiles/preciceCore.dir/Unity/unity_mapping_cxx.cxx.o
[  7%] Building CXX object CMakeFiles/preciceCore.dir/Unity/unity_mesh_cxx.cxx.o
[  8%] Building CXX object CMakeFiles/preciceCore.dir/Unity/unity_time_cxx.cxx.o
[  8%] Building CXX object CMakeFiles/preciceCore.dir/Unity/unity_m2n_cxx.cxx.o
In file included from /usr/lib/petscdir/petsc3.15/x86_64-linux-gnu-real/include/petscis.h:7,
                 from /usr/lib/petscdir/petsc3.15/x86_64-linux-gnu-real/include/petscao.h:8,
                 from /home/zwg/precice-3.2.0/src/utils/Petsc.hpp:40,
                 from /home/zwg/precice-3.2.0/src/mapping/PetRadialBasisFctMapping.hpp:17,
                 from /home/zwg/precice-3.2.0/src/mapping/config/MappingConfiguration.cpp:19,
                 from /home/zwg/precice-3.2.0/build/CMakeFiles/preciceCore.dir/Unity/unity_mapping_cxx.cxx:23:
/usr/lib/petscdir/petsc3.15/x86_64-linux-gnu-real/include/petscsys.h:217:6: error: #error "PETSc was configured with OpenMPI but now appears to be compiling using a non-OpenMPI mpi.h"
  217 | #    error "PETSc was configured with OpenMPI but now appears to be compiling using a non-OpenMPI mpi.h"
      |      ^~~~~
[  9%] Building CXX object CMakeFiles/preciceCore.dir/Unity/unity_math_cxx.cxx.o
[ 10%] Building CXX object CMakeFiles/preciceCore.dir/Unity/unity_cplscheme_cxx.cxx.o
[ 11%] Building CXX object CMakeFiles/preciceCore.dir/Unity/unity_logging_cxx.cxx.o
[ 12%] Building CXX object CMakeFiles/preciceCore.dir/Unity/unity_precice_cxx.cxx.o
[ 12%] Building CXX object CMakeFiles/preciceCore.dir/Unity/unity_acceleration_cxx.cxx.o
In file included from /usr/lib/petscdir/petsc3.15/x86_64-linux-gnu-real/include/petscis.h:7,
                 from /usr/lib/petscdir/petsc3.15/x86_64-linux-gnu-real/include/petscao.h:8,
                 from /home/zwg/precice-3.2.0/src/utils/Petsc.hpp:40,
                 from /home/zwg/precice-3.2.0/src/precice/Tooling.cpp:7,
                 from /home/zwg/precice-3.2.0/build/CMakeFiles/preciceCore.dir/Unity/unity_precice_cxx.cxx:5:
/usr/lib/petscdir/petsc3.15/x86_64-linux-gnu-real/include/petscsys.h:217:6: error: #error "PETSc was configured with OpenMPI but now appears to be compiling using a non-OpenMPI mpi.h"
  217 | #    error "PETSc was configured with OpenMPI but now appears to be compiling using a non-OpenMPI mpi.h"
      |      ^~~~~
[ 13%] Building CXX object CMakeFiles/preciceCore.dir/Unity/unity_com_cxx.cxx.o
[ 14%] Building CXX object CMakeFiles/preciceCore.dir/Unity/unity_query_cxx.cxx.o
[ 15%] Building CXX object CMakeFiles/preciceCore.dir/Unity/unity_utils_cxx.cxx.o
In file included from /usr/lib/petscdir/petsc3.15/x86_64-linux-gnu-real/include/petscis.h:7,
                 from /usr/lib/petscdir/petsc3.15/x86_64-linux-gnu-real/include/petscao.h:8,
                 from /home/zwg/precice-3.2.0/src/utils/Petsc.hpp:40,
                 from /home/zwg/precice-3.2.0/src/utils/Petsc.cpp:1,
                 from /home/zwg/precice-3.2.0/build/CMakeFiles/preciceCore.dir/Unity/unity_utils_cxx.cxx:17:
/usr/lib/petscdir/petsc3.15/x86_64-linux-gnu-real/include/petscsys.h:217:6: error: #error "PETSc was configured with OpenMPI but now appears to be compiling using a non-OpenMPI mpi.h"
  217 | #    error "PETSc was configured with OpenMPI but now appears to be compiling using a non-OpenMPI mpi.h"
      |      ^~~~~
make[2]: *** [CMakeFiles/preciceCore.dir/build.make:230: CMakeFiles/preciceCore.dir/Unity/unity_precice_cxx.cxx.o] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from /usr/include/boost/math/tools/cxx03_warn.hpp:9,
                 from /usr/include/boost/math/constants/constants.hpp:11,
                 from /usr/include/boost/geometry/util/math.hpp:29,
                 from /usr/include/boost/geometry/core/radian_access.hpp:33,
                 from /usr/include/boost/geometry/geometry.hpp:51,
                 from /usr/include/boost/geometry.hpp:17,
                 from /home/zwg/precice-3.2.0/src/query/impl/RTreeAdapter.hpp:4,
                 from /home/zwg/precice-3.2.0/src/query/Index.cpp:11,
                 from /home/zwg/precice-3.2.0/build/CMakeFiles/preciceCore.dir/Unity/unity_query_cxx.cxx:3:
/usr/include/boost/detail/no_exceptions_support.hpp:17:1: note: ‘#pragma message: This header is deprecated. Use <boost/core/no_exceptions_support.hpp> instead.’
   17 | BOOST_HEADER_DEPRECATED("<boost/core/no_exceptions_support.hpp>")
      | ^~~~~~~~~~~~~~~~~~~~~~~
make[2]: *** [CMakeFiles/preciceCore.dir/build.make:286: CMakeFiles/preciceCore.dir/Unity/unity_utils_cxx.cxx.o] Error 1
make[2]: *** [CMakeFiles/preciceCore.dir/build.make:146: CMakeFiles/preciceCore.dir/Unity/unity_mapping_cxx.cxx.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:170: CMakeFiles/preciceCore.dir/all] Error 2
make: *** [Makefile:166: all] Error 2

Thank you! :hugs:

Hi,

I don’t see OpenMPI dev in the dependencies, can you install libopenmpi-dev and try again?

Which MPI was detected in the CMake output?

It did not work. I have tried to install the package, by using pip install pyprecice=2.5.0.4 . the python version is 3.10.12.

pip3 install pyprecice=2.5.0.4

,and get the following error

~$ pip3 install pyprecice==2.5.0.4
Looking in indexes: https://mirrors.ustc.edu.cn/pypi/simple
Collecting pyprecice==2.5.0.4
  Using cached https://mirrors.ustc.edu.cn/pypi/packages/20/2c/a9864b808df7c85126c86bf210bb66bb26163d4f30af3b94eafb556983c5/pyprecice-2.5.0.4.tar.gz (48 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: numpy in ./.venv/lib/python3.10/site-packages (from pyprecice==2.5.0.4) (1.26.4)
Requirement already satisfied: mpi4py in ./.venv/lib/python3.10/site-packages (from pyprecice==2.5.0.4) (4.1.0)
Building wheels for collected packages: pyprecice
  Building wheel for pyprecice (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for pyprecice (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [181 lines of output]
      <string>:49: SetuptoolsDeprecationWarning: The test command is disabled and references to it are deprecated.
      !!

              ********************************************************************************
              Please remove any references to `setuptools.command.test` in all supported versions of the affected package.

              This deprecation is overdue, please update your project and remove deprecated
              calls to avoid build errors in the future.
              ********************************************************************************

      !!
      Failed to load config from /tmp/pip-install-dyd9bd0e/pyprecice_ea49ebcdaf724127b0564fc3437f46a2/pyproject.toml: 'tool'
      Try to load it from setup.cfg
      running bdist_wheel
      /tmp/pip-build-env-_ah71s6n/overlay/lib/python3.10/site-packages/setuptools/_distutils/cmd.py:135: SetuptoolsDeprecationWarning: bdist_wheel.universal is deprecated
      !!

              ********************************************************************************
              With Python 2.7 end-of-life, support for building universal wheels
              (i.e., wheels that support both Python 2 and Python 3)
              is being obviated.
              Please discontinue using this option, or if you still need it,
              file an issue with pypa/setuptools describing your use case.

              This deprecation is overdue, please update your project and remove deprecated
              calls to avoid build errors in the future.
              ********************************************************************************

      !!
        self.finalize_options()
      running build
      running build_py
      Failed to load config from /tmp/pip-install-dyd9bd0e/pyprecice_ea49ebcdaf724127b0564fc3437f46a2/pyproject.toml: 'tool'
      Try to load it from setup.cfg
      Failed to load config from /tmp/pip-install-dyd9bd0e/pyprecice_ea49ebcdaf724127b0564fc3437f46a2/pyproject.toml: 'tool'
      Try to load it from setup.cfg
      creating build/lib/precice
      copying precice/_version.py -> build/lib/precice
      copying precice/__init__.py -> build/lib/precice
      UPDATING build/lib/precice/_version.py
      set build/lib/precice/_version.py to '2.5.0.4'
      installing to build/bdist.linux-x86_64/wheel
      running install
      warning: cyprecice/cyprecice.pyx:1231:61: local variable '_value' referenced before assignment
      warning: cyprecice/cyprecice.pyx:1233:81: local variable '_value' referenced before assignment
      warning: cyprecice/cyprecice.pyx:1235:15: local variable '_value' referenced before assignment
      Compiling /tmp/pip-install-dyd9bd0e/pyprecice_ea49ebcdaf724127b0564fc3437f46a2/cyprecice/cyprecice.pyx because it changed.
      [1/1] Cythonizing /tmp/pip-install-dyd9bd0e/pyprecice_ea49ebcdaf724127b0564fc3437f46a2/cyprecice/cyprecice.pyx
      running install_lib
      running build_ext
      Failed to load config from /tmp/pip-install-dyd9bd0e/pyprecice_ea49ebcdaf724127b0564fc3437f46a2/pyproject.toml: 'tool'
      Try to load it from setup.cfg
      Failed to load config from /tmp/pip-install-dyd9bd0e/pyprecice_ea49ebcdaf724127b0564fc3437f46a2/pyproject.toml: 'tool'
      Try to load it from setup.cfg
      building 'cyprecice' extension
      creating build/temp.linux-x86_64-cpython-310/tmp/pip-install-dyd9bd0e/pyprecice_ea49ebcdaf724127b0564fc3437f46a2/cyprecice
      x86_64-linux-gnu-g++ -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -I/home/zwg/.venv/include -I/usr/include/python3.10 -c /tmp/pip-install-dyd9bd0e/pyprecice_ea49ebcdaf724127b0564fc3437f46a2/cyprecice/cyprecice.cpp -o build/temp.linux-x86_64-cpython-310/tmp/pip-install-dyd9bd0e/pyprecice_ea49ebcdaf724127b0564fc3437f46a2/cyprecice/cyprecice.o -std=c++11 -I/tmp/pip-build-env-_ah71s6n/overlay/lib/python3.10/site-packages/numpy/_core/include
      In file included from /usr/include/python3.10/numpy/ndarraytypes.h:1969,
                       from /usr/include/python3.10/numpy/ndarrayobject.h:12,
                       from /usr/include/python3.10/numpy/arrayobject.h:4,
                       from /tmp/pip-install-dyd9bd0e/pyprecice_ea49ebcdaf724127b0564fc3437f46a2/cyprecice/cyprecice.cpp:1159:
      /usr/include/python3.10/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
         17 | #warning "Using deprecated NumPy API, disable it with " \
            |  ^~~~~~~
      /tmp/pip-install-dyd9bd0e/pyprecice_ea49ebcdaf724127b0564fc3437f46a2/cyprecice/cyprecice.cpp: In function ‘npy_intp __pyx_f_5numpy_5dtype_8itemsize_itemsize(PyArray_Descr*)’:
      /tmp/pip-install-dyd9bd0e/pyprecice_ea49ebcdaf724127b0564fc3437f46a2/cyprecice/cyprecice.cpp:4134:13: error: ‘PyDataType_ELSIZE’ was not declared in this scope; did you mean ‘PyDataType_ISUNSIZED’?
       4134 |   __pyx_r = PyDataType_ELSIZE(__pyx_v_self);
            |             ^~~~~~~~~~~~~~~~~
            |             PyDataType_ISUNSIZED
      /tmp/pip-install-dyd9bd0e/pyprecice_ea49ebcdaf724127b0564fc3437f46a2/cyprecice/cyprecice.cpp: In function ‘npy_intp __pyx_f_5numpy_5dtype_9alignment_alignment(PyArray_Descr*)’:
      /tmp/pip-install-dyd9bd0e/pyprecice_ea49ebcdaf724127b0564fc3437f46a2/cyprecice/cyprecice.cpp:4168:13: error: ‘PyDataType_ALIGNMENT’ was not declared in this scope; did you mean ‘PyDataType_ISSIGNED’?
       4168 |   __pyx_r = PyDataType_ALIGNMENT(__pyx_v_self);
            |             ^~~~~~~~~~~~~~~~~~~~
            |             PyDataType_ISSIGNED
      /tmp/pip-install-dyd9bd0e/pyprecice_ea49ebcdaf724127b0564fc3437f46a2/cyprecice/cyprecice.cpp: In function ‘PyObject* __pyx_f_5numpy_5dtype_6fields_fields(PyArray_Descr*)’:
      /tmp/pip-install-dyd9bd0e/pyprecice_ea49ebcdaf724127b0564fc3437f46a2/cyprecice/cyprecice.cpp:4206:15: error: ‘PyDataType_FIELDS’ was not declared in this scope; did you mean ‘PyDataType_HASFIELDS’?
       4206 |   __pyx_t_1 = PyDataType_FIELDS(__pyx_v_self);
            |               ^~~~~~~~~~~~~~~~~
            |               PyDataType_HASFIELDS
      /tmp/pip-install-dyd9bd0e/pyprecice_ea49ebcdaf724127b0564fc3437f46a2/cyprecice/cyprecice.cpp: In function ‘PyObject* __pyx_f_5numpy_5dtype_5names_names(PyArray_Descr*)’:
      /tmp/pip-install-dyd9bd0e/pyprecice_ea49ebcdaf724127b0564fc3437f46a2/cyprecice/cyprecice.cpp:4248:15: error: ‘PyDataType_NAMES’ was not declared in this scope; did you mean ‘PyDataType_ISNUMBER’?
       4248 |   __pyx_t_1 = PyDataType_NAMES(__pyx_v_self);
            |               ^~~~~~~~~~~~~~~~
            |               PyDataType_ISNUMBER
      /tmp/pip-install-dyd9bd0e/pyprecice_ea49ebcdaf724127b0564fc3437f46a2/cyprecice/cyprecice.cpp: In function ‘PyArray_ArrayDescr* __pyx_f_5numpy_5dtype_8subarray_subarray(PyArray_Descr*)’:
      /tmp/pip-install-dyd9bd0e/pyprecice_ea49ebcdaf724127b0564fc3437f46a2/cyprecice/cyprecice.cpp:4286:13: error: ‘PyDataType_SUBARRAY’ was not declared in this scope; did you mean ‘PyDataType_HASSUBARRAY’?
       4286 |   __pyx_r = PyDataType_SUBARRAY(__pyx_v_self);
            |             ^~~~~~~~~~~~~~~~~~~
            |             PyDataType_HASSUBARRAY
      /tmp/pip-install-dyd9bd0e/pyprecice_ea49ebcdaf724127b0564fc3437f46a2/cyprecice/cyprecice.cpp: In function ‘npy_uint64 __pyx_f_5numpy_5dtype_5flags_flags(PyArray_Descr*)’:
      /tmp/pip-install-dyd9bd0e/pyprecice_ea49ebcdaf724127b0564fc3437f46a2/cyprecice/cyprecice.cpp:4320:13: error: ‘PyDataType_FLAGS’ was not declared in this scope; did you mean ‘PyDataType_FLAGCHK’?
       4320 |   __pyx_r = PyDataType_FLAGS(__pyx_v_self);
            |             ^~~~~~~~~~~~~~~~
            |             PyDataType_FLAGCHK
      /tmp/pip-install-dyd9bd0e/pyprecice_ea49ebcdaf724127b0564fc3437f46a2/cyprecice/cyprecice.cpp: In function ‘int __pyx_f_5numpy_9broadcast_7numiter_numiter(PyArrayMultiIterObject*)’:
      /tmp/pip-install-dyd9bd0e/pyprecice_ea49ebcdaf724127b0564fc3437f46a2/cyprecice/cyprecice.cpp:4354:13: error: ‘PyArray_MultiIter_NUMITER’ was not declared in this scope; did you mean ‘PyArray_MultiIter_NEXTi’?
       4354 |   __pyx_r = PyArray_MultiIter_NUMITER(__pyx_v_self);
            |             ^~~~~~~~~~~~~~~~~~~~~~~~~
            |             PyArray_MultiIter_NEXTi
      /tmp/pip-install-dyd9bd0e/pyprecice_ea49ebcdaf724127b0564fc3437f46a2/cyprecice/cyprecice.cpp: In function ‘npy_intp __pyx_f_5numpy_9broadcast_4size_size(PyArrayMultiIterObject*)’:
      /tmp/pip-install-dyd9bd0e/pyprecice_ea49ebcdaf724127b0564fc3437f46a2/cyprecice/cyprecice.cpp:4388:13: error: ‘PyArray_MultiIter_SIZE’ was not declared in this scope; did you mean ‘PyArray_MultiIter_GOTO’?
       4388 |   __pyx_r = PyArray_MultiIter_SIZE(__pyx_v_self);
            |             ^~~~~~~~~~~~~~~~~~~~~~
            |             PyArray_MultiIter_GOTO
      /tmp/pip-install-dyd9bd0e/pyprecice_ea49ebcdaf724127b0564fc3437f46a2/cyprecice/cyprecice.cpp: In function ‘npy_intp __pyx_f_5numpy_9broadcast_5index_index(PyArrayMultiIterObject*)’:
      /tmp/pip-install-dyd9bd0e/pyprecice_ea49ebcdaf724127b0564fc3437f46a2/cyprecice/cyprecice.cpp:4422:13: error: ‘PyArray_MultiIter_INDEX’ was not declared in this scope; did you mean ‘PyArray_MultiIter_NEXT’?
       4422 |   __pyx_r = PyArray_MultiIter_INDEX(__pyx_v_self);
            |             ^~~~~~~~~~~~~~~~~~~~~~~
            |             PyArray_MultiIter_NEXT
      /tmp/pip-install-dyd9bd0e/pyprecice_ea49ebcdaf724127b0564fc3437f46a2/cyprecice/cyprecice.cpp: In function ‘int __pyx_f_5numpy_9broadcast_2nd_nd(PyArrayMultiIterObject*)’:
      /tmp/pip-install-dyd9bd0e/pyprecice_ea49ebcdaf724127b0564fc3437f46a2/cyprecice/cyprecice.cpp:4456:13: error: ‘PyArray_MultiIter_NDIM’ was not declared in this scope; did you mean ‘PyArray_MultiIter_NEXT’?
       4456 |   __pyx_r = PyArray_MultiIter_NDIM(__pyx_v_self);
            |             ^~~~~~~~~~~~~~~~~~~~~~
            |             PyArray_MultiIter_NEXT
      /tmp/pip-install-dyd9bd0e/pyprecice_ea49ebcdaf724127b0564fc3437f46a2/cyprecice/cyprecice.cpp: In function ‘npy_intp* __pyx_f_5numpy_9broadcast_10dimensions_dimensions(PyArrayMultiIterObject*)’:
      /tmp/pip-install-dyd9bd0e/pyprecice_ea49ebcdaf724127b0564fc3437f46a2/cyprecice/cyprecice.cpp:4490:13: error: ‘PyArray_MultiIter_DIMS’ was not declared in this scope; did you mean ‘PyArray_MultiIter_DATA’?
       4490 |   __pyx_r = PyArray_MultiIter_DIMS(__pyx_v_self);
            |             ^~~~~~~~~~~~~~~~~~~~~~
            |             PyArray_MultiIter_DATA
      /tmp/pip-install-dyd9bd0e/pyprecice_ea49ebcdaf724127b0564fc3437f46a2/cyprecice/cyprecice.cpp: In function ‘void** __pyx_f_5numpy_9broadcast_5iters_iters(PyArrayMultiIterObject*)’:
      /tmp/pip-install-dyd9bd0e/pyprecice_ea49ebcdaf724127b0564fc3437f46a2/cyprecice/cyprecice.cpp:4524:13: error: ‘PyArray_MultiIter_ITERS’ was not declared in this scope; did you mean ‘PyArray_MultiIter_NEXT’?
       4524 |   __pyx_r = PyArray_MultiIter_ITERS(__pyx_v_self);
            |             ^~~~~~~~~~~~~~~~~~~~~~~
            |             PyArray_MultiIter_NEXT
      /tmp/pip-install-dyd9bd0e/pyprecice_ea49ebcdaf724127b0564fc3437f46a2/cyprecice/cyprecice.cpp: In function ‘PyObject* __pyx_pf_9cyprecice_9Interface_18is_read_data_available(__pyx_obj_9cyprecice_Interface*)’:
      /tmp/pip-install-dyd9bd0e/pyprecice_ea49ebcdaf724127b0564fc3437f46a2/cyprecice/cyprecice.cpp:7324:79: warning: ‘bool precice::SolverInterface::isReadDataAvailable() const’ is deprecated: Will be removed in 3.0.0. See https://github.com/precice/precice/issues/1223 and comment, if you need this function. [-Wdeprecated-declarations]
       7324 |   __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->thisptr->isReadDataAvailable()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 246, __pyx_L1_error)
            |                                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
      In file included from /tmp/pip-install-dyd9bd0e/pyprecice_ea49ebcdaf724127b0564fc3437f46a2/cyprecice/cyprecice.cpp:1184:
      /usr/include/precice/SolverInterface.hpp:244:143: note: declared here
        244 |   [[deprecated("Will be removed in 3.0.0. See https://github.com/precice/precice/issues/1223 and comment, if you need this function.")]] bool isReadDataAvailable() const;
            |                                                                                                                                               ^~~~~~~~~~~~~~~~~~~
      /tmp/pip-install-dyd9bd0e/pyprecice_ea49ebcdaf724127b0564fc3437f46a2/cyprecice/cyprecice.cpp: In function ‘PyObject* __pyx_pf_9cyprecice_9Interface_20is_write_data_required(__pyx_obj_9cyprecice_Interface*, double)’:
      /tmp/pip-install-dyd9bd0e/pyprecice_ea49ebcdaf724127b0564fc3437f46a2/cyprecice/cyprecice.cpp:7460:79: warning: ‘bool precice::SolverInterface::isWriteDataRequired(double) const’ is deprecated: Will be removed in 3.0.0. See https://github.com/precice/precice/issues/1223 and comment, if you need this function. [-Wdeprecated-declarations]
       7460 |   __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->thisptr->isWriteDataRequired(__pyx_v_computed_timestep_length)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 273, __pyx_L1_error)
            |                                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      In file included from /tmp/pip-install-dyd9bd0e/pyprecice_ea49ebcdaf724127b0564fc3437f46a2/cyprecice/cyprecice.cpp:1184:
      /usr/include/precice/SolverInterface.hpp:266:143: note: declared here
        266 |   [[deprecated("Will be removed in 3.0.0. See https://github.com/precice/precice/issues/1223 and comment, if you need this function.")]] bool isWriteDataRequired(double computedTimestepLength) const;
            |                                                                                                                                               ^~~~~~~~~~~~~~~~~~~
      /tmp/pip-install-dyd9bd0e/pyprecice_ea49ebcdaf724127b0564fc3437f46a2/cyprecice/cyprecice.cpp: In function ‘PyObject* __pyx_pf_9cyprecice_9Interface_24has_to_evaluate_surrogate_model(__pyx_obj_9cyprecice_Interface*)’:
      /tmp/pip-install-dyd9bd0e/pyprecice_ea49ebcdaf724127b0564fc3437f46a2/cyprecice/cyprecice.cpp:7646:87: warning: ‘bool precice::SolverInterface::hasToEvaluateSurrogateModel() const’ is deprecated: The manifold mapping feature is no longer supported. [-Wdeprecated-declarations]
       7646 |   __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->thisptr->hasToEvaluateSurrogateModel()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 307, __pyx_L1_error)
            |                                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
      In file included from /tmp/pip-install-dyd9bd0e/pyprecice_ea49ebcdaf724127b0564fc3437f46a2/cyprecice/cyprecice.cpp:1184:
      /usr/include/precice/SolverInterface.hpp:297:79: note: declared here
        297 |   [[deprecated("The manifold mapping feature is no longer supported.")]] bool hasToEvaluateSurrogateModel() const;
            |                                                                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~
      /tmp/pip-install-dyd9bd0e/pyprecice_ea49ebcdaf724127b0564fc3437f46a2/cyprecice/cyprecice.cpp: In function ‘PyObject* __pyx_pf_9cyprecice_9Interface_26has_to_evaluate_fine_model(__pyx_obj_9cyprecice_Interface*)’:
      /tmp/pip-install-dyd9bd0e/pyprecice_ea49ebcdaf724127b0564fc3437f46a2/cyprecice/cyprecice.cpp:7739:82: warning: ‘bool precice::SolverInterface::hasToEvaluateFineModel() const’ is deprecated: The manifold mapping feature is no longer supported. [-Wdeprecated-declarations]
       7739 |   __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->thisptr->hasToEvaluateFineModel()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 321, __pyx_L1_error)
            |                                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
      In file included from /tmp/pip-install-dyd9bd0e/pyprecice_ea49ebcdaf724127b0564fc3437f46a2/cyprecice/cyprecice.cpp:1184:
      /usr/include/precice/SolverInterface.hpp:313:79: note: declared here
        313 |   [[deprecated("The manifold mapping feature is no longer supported.")]] bool hasToEvaluateFineModel() const;
            |                                                                               ^~~~~~~~~~~~~~~~~~~~~~
      /tmp/pip-install-dyd9bd0e/pyprecice_ea49ebcdaf724127b0564fc3437f46a2/cyprecice/cyprecice.cpp: In function ‘PyObject* __pyx_pf_9cyprecice_9Interface_36get_mesh_ids(__pyx_obj_9cyprecice_Interface*)’:
      /tmp/pip-install-dyd9bd0e/pyprecice_ea49ebcdaf724127b0564fc3437f46a2/cyprecice/cyprecice.cpp:8385:76: warning: ‘std::set<int> precice::SolverInterface::getMeshIDs() const’ is deprecated: Use getMeshID() for specific mesh names instead. [-Wdeprecated-declarations]
       8385 |   __pyx_t_1 = __pyx_convert_set_to_py_int(__pyx_v_self->thisptr->getMeshIDs()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 414, __pyx_L1_error)
            |                                           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
      In file included from /tmp/pip-install-dyd9bd0e/pyprecice_ea49ebcdaf724127b0564fc3437f46a2/cyprecice/cyprecice.cpp:1184:
      /usr/include/precice/SolverInterface.hpp:392:84: note: declared here
        392 |   [[deprecated("Use getMeshID() for specific mesh names instead.")]] std::set<int> getMeshIDs() const;
            |                                                                                    ^~~~~~~~~~
      /tmp/pip-install-dyd9bd0e/pyprecice_ea49ebcdaf724127b0564fc3437f46a2/cyprecice/cyprecice.cpp: In function ‘PyObject* __pyx_pf_9cyprecice_9Interface_66map_read_data_to(__pyx_obj_9cyprecice_Interface*, PyObject*)’:
      /tmp/pip-install-dyd9bd0e/pyprecice_ea49ebcdaf724127b0564fc3437f46a2/cyprecice/cyprecice.cpp:12113:39: warning: ‘void precice::SolverInterface::mapReadDataTo(int)’ is deprecated: Will be removed in 3.0.0. See https://github.com/precice/precice/issues/859 and comment, if you need this function. [-Wdeprecated-declarations]
      12113 |   __pyx_v_self->thisptr->mapReadDataTo(__pyx_t_1);
            |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
      In file included from /tmp/pip-install-dyd9bd0e/pyprecice_ea49ebcdaf724127b0564fc3437f46a2/cyprecice/cyprecice.cpp:1184:
      /usr/include/precice/SolverInterface.hpp:650:142: note: declared here
        650 |   [[deprecated("Will be removed in 3.0.0. See https://github.com/precice/precice/issues/859 and comment, if you need this function.")]] void mapReadDataTo(int toMeshID);
            |                                                                                                                                              ^~~~~~~~~~~~~
      /tmp/pip-install-dyd9bd0e/pyprecice_ea49ebcdaf724127b0564fc3437f46a2/cyprecice/cyprecice.cpp: In function ‘PyObject* __pyx_pf_9cyprecice_9Interface_68map_write_data_from(__pyx_obj_9cyprecice_Interface*, PyObject*)’:
      /tmp/pip-install-dyd9bd0e/pyprecice_ea49ebcdaf724127b0564fc3437f46a2/cyprecice/cyprecice.cpp:12246:42: warning: ‘void precice::SolverInterface::mapWriteDataFrom(int)’ is deprecated: Will be removed in 3.0.0. See https://github.com/precice/precice/issues/859 and comment, if you need this function. [-Wdeprecated-declarations]
      12246 |   __pyx_v_self->thisptr->mapWriteDataFrom(__pyx_t_1);
            |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
      In file included from /tmp/pip-install-dyd9bd0e/pyprecice_ea49ebcdaf724127b0564fc3437f46a2/cyprecice/cyprecice.cpp:1184:
      /usr/include/precice/SolverInterface.hpp:662:142: note: declared here
        662 |   [[deprecated("Will be removed in 3.0.0. See https://github.com/precice/precice/issues/859 and comment, if you need this function.")]] void mapWriteDataFrom(int fromMeshID);
            |                                                                                                                                              ^~~~~~~~~~~~~~~~
      error: command '/usr/bin/x86_64-linux-gnu-g++' failed with exit code 1
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for pyprecice
Failed to build pyprecice
error: failed-wheel-build-for-install

× Failed to build installable wheels for some pyproject.toml based projects

pip3 install pyprecice=2.5.0.4

This is an unrelated error. The version of the python bindings need to match the version of the installed preCICE.

For preCICE version 3.2, you need pyprecice version 3.2

On second read it looks like there is an issue with the numpy version. Try disabling the python actions feature when configuring precice.