Skip to content

PETSc compilation with MUMPS support

Alberto F. Martin edited this page Sep 8, 2021 · 10 revisions

Compilation instructions

  1. Download the latest version of PETSc source codes here. Ensure that your system fulfills the pre-requisites here

  2. Ensure that you have an installation of Python 3 in your system. Run python --version to retrieve the Python interpreter version.

  3. Configure sources of PETSc and compile them. We used in particular the following set of commands. If we want to compile PETSc in release mode, then use --with-debugging=0.

    cd petsc-3.15.4
    export PETSC_DIR=`pwd`
    export PETSC_ARCH=x86_64       # or any other identifying text for your machine
    ./configure --with-cc=mpicc --with-cxx=mpicxx \
    --with-fc=mpif90 -with-blas-lapack-dir=$MKLROOT \
    --download-mumps --download-scalapack --download-parmetis \
    --download-metis --download-ptscotch --with-debugging \
    --with-x=0 --with-shared=1 --with-mpi=1 --with-64-bit-indices  
    make                           #  compile PETSc

IMPORTANT NOTE: Grab the values of the PETSC_DIR and PETSC_ARCH variables. They will be required later on. See here for more details.

IMPORTANT NOTE: I have tested PETSc 3.15.4 + MUMPs 5.3.5 along with GridapDistributed.jl Poisson driver as in this commit https://github.com/gridap/GridapDistributed.jl/commit/7a4b7364e2dc295ddcd9a162e43314a3f880bbdb and it seems to work smoothly.

IMPORTANT NOTE: PETSC_jll does not currently come with MUMPS support. See https://github.com/JuliaParallel/PETSc.jl/issues/146 and https://github.com/gridap/GridapDistributed.jl/runs/3540494221#step:7:69

References