No support for MPI parallel build in the cmake build system for GetFEM. I would recommend you to succeed in building the sequential version first before trying anything else.
As a second step you can try to build with OpenMP parallelization, which is theoretically supported in the cmake build.
Then for adding MPI support to the cmake build system we need to edit the CMakeList.txt file accordingly.
It sounds like cmake on your system picks up the MPI version of the compilers as your default C++/Fortran compilers. This is not GetFEM specific. If this is the case, you need to tell cmake what compiler to use
Use the cmake options: -DCMAKE_C_COMPILER=... -DCMAKE_CXX_COMPILER=...
…
It turned out that I needed an additional option on cmake, -DMUMPS_parallel=no, in addition to -Dparallel=OFF, since the CMakeLists.txt file required MPI components of C and Fortran if it was not given as no on lines 49-50.
My code for this step was
C:\Users\Admin\Documents\Important Files\GT\Research\getfem_windows_no_edits\mumps>cmake -B build -Dparallel=OFF -DBUILD_COMPLEX=ON -DBUILD_COMPLEX16=ON -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="E:\\opt" -DMUMPS_parallel=no
-- MUMPS 5.7.3.2 upstream 5.7.3 install prefix: E:/opt
-- CMake 4.0.1 Toolchain
-- MKL_VERSION: 2025.1.0
-- MKL_ROOT: C:/Program Files (x86)/Intel/oneAPI/mkl/latest
-- MKL_ARCH: intel64
-- MKL_LINK: None, set to ` dynamic` by default
-- MKL_INTERFACE_FULL: intel_lp64
-- MKL_THREADING: sequential
-- MKL_MPI: None, set to ` intelmpi` by default
-- Found C:/Program Files (x86)/Intel/oneAPI/mkl/latest/lib/mkl_scalapack_lp64_dll.lib
-- Found DLL: C:/Program Files (x86)/Intel/oneAPI/mkl/latest/bin/mkl_scalapack_lp64.2.dll
-- Found C:/Program Files (x86)/Intel/oneAPI/mkl/latest/lib/mkl_cdft_core_dll.lib
-- Found DLL: C:/Program Files (x86)/Intel/oneAPI/mkl/latest/bin/mkl_cdft_core.2.dll
-- Found C:/Program Files (x86)/Intel/oneAPI/mkl/latest/lib/mkl_intel_lp64_dll.lib
-- Found C:/Program Files (x86)/Intel/oneAPI/mkl/latest/lib/mkl_sequential_dll.lib
-- Found DLL: C:/Program Files (x86)/Intel/oneAPI/mkl/latest/bin/mkl_sequential.2.dll
-- Found C:/Program Files (x86)/Intel/oneAPI/mkl/latest/lib/mkl_core_dll.lib
-- Found DLL: C:/Program Files (x86)/Intel/oneAPI/mkl/latest/bin/mkl_core.2.dll
-- Found C:/Program Files (x86)/Intel/oneAPI/mkl/latest/lib/mkl_blacs_lp64_dll.lib
-- Found DLL: C:/Program Files (x86)/Intel/oneAPI/mkl/latest/bin/mkl_blacs_lp64.2.dll
-- Performing Test LAPACK_s_FOUND
-- Performing Test LAPACK_s_FOUND - Success
-- Performing Test LAPACK_d_FOUND
-- Performing Test LAPACK_d_FOUND - Success
-- Found LAPACK: $<IF:$<BOOL:OFF>,,>;MKL::mkl_intel_lp64;MKL::mkl_sequential;MKL::mkl_core found components: MKL
-- Performing Test BLAS_HAVE_dGEMMT
-- Performing Test BLAS_HAVE_dGEMMT - Success
-- Performing Test BLAS_HAVE_sGEMMT
-- Performing Test BLAS_HAVE_sGEMMT - Success
-- Performing Test BLAS_HAVE_cGEMMT
-- Performing Test BLAS_HAVE_cGEMMT - Success
-- Performing Test BLAS_HAVE_zGEMMT
-- Performing Test BLAS_HAVE_zGEMMT - Success
-- MUMPS ORDERING_DEFS: pord
-- MUMPS ORDERING_LIBS: pord
-- MUMPS LAPACK_VENDOR: MKL
-- MUMPS SCALAPACK_VENDOR:
-- [download 0% complete]
...
-- [download 100% complete]
-- Configured MUMPS 5.7.3 source in C:/Users/Admin/Documents/Important Files/GT/Research/getfem_windows_no_edits/mumps/build/mumps-src
-- The following features have been enabled:
* GEMMT, use GEMMT for symmetric matrix-matrix multiplication
* ScalaPACK, Scalapack linear algebra library https://www.netlib.org/scalapack/
* real32, Build with single precision
* real64, Build with double precision
* complex32, Build with complex precision
* complex64, Build with complex16 precision
-- The following features have been disabled:
* Parallel, parallel MUMPS (using MPI and Scalapack)
* 64-bit-integer, use 64-bit integers in C and Fortran
* METIS, METIS graph partitioning https://github.com/KarypisLab/METIS
* parMETIS, parMETIS parallel graph partitioning
* Scotch, Scotch graph partitioning https://www.labri.fr/perso/pelegrin/scotch/
* Openmp, OpenMP API https://www.openmp.org/
* shared, Build shared libraries
-- Configuring done (26.9s)
-- Generating done (0.2s)
-- Build files have been written to: C:/Users/Admin/Documents/Important Files/GT/Research/getfem_windows_no_edits/mumps/build
However, I got an error at the next step, cmake --build build, which gives the error
C:/Users/Admin/Documents/Important Files/GT/Research/getfem_windows_no_edits/mumps/build/mumps-src/src/mumps_io_err.h:20:22: fatal error: pthread.h: No such file or directory
# include <pthread.h>
^
compilation terminated.
I am unsure why this is being called, since my installation is not using the parallel versions of anything. Do you know how to get around this?
Oh, I misunderstood your question entirely. I missed that you are still in the compilation of MUMPS, you have not started trying anything with GetFEM yet.
The cmake system that you use for building MUMPS is not the official system of MUMPS, it is created by scivision, and since my post they have changed quite a bit their cmake options.
I can see parallel was replaced with MUMPS_parallel here:
Regarding the pthread.h issue, it might be related to this change:
If you cannot build MUMPS on your system, you should rather ask scivision directly