Install deal II with PETSc and MPICH

178 views
Skip to first unread message

Giselle Sosa Jones

unread,
Sep 1, 2023, 2:13:45 PM9/1/23
to deal.II User Group
Hello,

I have a PETSc installation that uses mpich. I am trying to install deal II with:

cmake -DDEAL_II_WITH_PETSC=ON -DCMAKE_INSTALL_PREFIX=/Users/gisellesosajones/Documents/deal_ii_95 -DPETSC_DIR=$PETSC_DIR -DPETSC_ARCH=$PETSC_ARCH -DDEAL_II_WITH_MPICH=ON -DDEAL_II_WITH_HDF5=OFF


However, I get the error message

PETSc was configured with MPICH but now appears to be compiling using a non-MPICH mpi.h


when trying to install. Is there any workaround for this?

Thank you in advance.

Giselle

Bruno Turcksin

unread,
Sep 1, 2023, 2:30:59 PM9/1/23
to deal.II User Group
Giselle,

You have multiple versions of MPI installed on your computer. I would strongly advise that you remove the extra MPI libraries and keep only one of them. Anyway to fix your issue, you can use `-DMPI_CXX_COMPILER=/path/to/mpich/mpicxx` to tell CMake which MPI compiler to use.

Best,

Bruno
Reply all
Reply to author
Forward
0 new messages