Installation

The compiler

Montjoie is supposed to be fully compliant with the C++ standard. Therefore, it can be compiled by GNU GCC and by the Intel C++ compiler icc. No tests were conducted with proprietary compilers under Unix, but the compliance with the C++ standard should ensure portability.

Getting started

Montjoie can be retrieved by cloning its Git repository (available in https://gitlab.inria.fr/durufle/montjoie ):

git clone git@gitlab.inria.fr:durufle/montjoie.git

After cloning, the code is present in the directory montjoie/MONTJOIE. Then, you can copy a Makefile, two Makefiles are proposed : one for Linux (Makefile.LINUX), one for Plafrim (Makefile.PLAFRIM). The advantage of this last Makefile is that you do not need to compile external libraries manually, since they are already compiled in Plafrim. If you want to start from the generic Makefile for Linux, you can type

cp Makefile.LINUX Makefile

Then, if you choose to not link with external libraries, you can put USE_BLAS := NO and USE_MUMPS := NO in this Makefile. However Metis is the only external library needed to compile Montjoie. You can look at the section devoted to Metis to look how to install Metis. The installation path should be provided in the variable CHEMETIS of the Makefile. You can compile any target of Montjoie by typing for example

make acous2D

This target solves the wave equation (modelling acoustics) in two dimensions. A comprehensive list of available targets is given in the section Compilation. The compilation produces an executable (here acous2D.x). You can launch a simulation by giving a data file:

./acous2D.x example/acous2D/time_carre.ini

If you have compiled Montjoie in parallel (USE_MPI := YES in the Makefile), you can also launch the simulation in parallel

mpirun -np 8 ./acous2D.x example/acous2D/time_carre.ini

The partitioning of the mesh is done automatically at the beginning of the simulation by Metis or Scotch. The output files can be read by Matlab/Python, for instance:

ipython3 --pylab
from MATLAB.visuND import *
X, Y, Z, coor, V = loadND('totalTimeCarre0002.dat')
plot2dinst(X, Y, real(V))

This sequence works if ipython3 has been installed along with matplotlib. Under linux, you can install them by typing

sudo apt install ipython3 python3-matplotlib python3-numpy python3-scipy

The documentation about Montjoie data files (e.g. the file example/acous2D/time_carre.ini) is given in the section Data file. The different output files are discussed in the section Post-processing. The general structure of the code is given in the section Overview while other sections of the left menu detail functions and classes of Montjoie.

For efficient simulations (particularly for equations solves in time-harmonic domain), Montjoie relies on third-party libraries (mainly direct solvers and eigenvalue solvers). Not all of them are essential, we advise you to set at least

You will have to install Blas/Cblas, Lapack, Metis and Mumps. In parallel, you should also install Blacs/Scalapack, Scotch and ParMetis.

Compiling only targets related to meshes

If you want to compile only targets that are related to meshes such as convert_mesh, sym_mesh, you do not need any external library. The compilation is made with Makefile.mesh, for instance

  make -f Makefile.mesh convert

Installation of third-party libraries

You can compile Montjoie with or without any of this library (only Metis is needed), but some functionalities may be missing. For Ubuntu users, a list of commands to execute most of external libraries is recalled in this section.

Prerequisites

It is advised to know some basic notions about the Makefiles. You also need to install basic packages (in order to use makefile, and compile C++/Fortran). For instance, in Linux, you can type

sudo apt install make cmake
sudo apt install gfortran g++

If you plan to run Montjoie in parallel, a MPI library is needed (such as openMPI)~:

sudo apt install libopenmpi-dev

We recommend to install all the external libraries in an independent folder (for instance Solve)

cd
mkdir Solve
cd Solve

Blas/CBlas

Blas (Basic Linear Algebra Subroutines) is a set of basic functions such as matrix-vector or matrix-matrix products. It is strongly recommended to compile Montjoie with Blas in order to have an efficient code. Moreover other external libraries (such as Arpack, Mumps, Pastix, etc) will also need to be linked with Blas. It is advised to use optimized versions of Blas (such as MKL, GotoBlas, Atlas, etc). If your system (like in Plafrim) is already installed with MKL for example, Blas is already provided and you only have to modify the paths in the section ifeq ($(USE_BLAS),YES) of the Makefile.

If you want to compile manually Blas/Cblas, you can type

wget http://www.netlib.org/blas/blas.tgz
tar zxvf blas.tgz
cd BLAS-3.8.0
make
mv blas_LINUX.a libblas.a
cd ..

wget http://www.netlib.org/blas/blast-forum/cblas.tgz
tar zxvf cblas.tgz
cd CBLAS
# Modify the path where Blas is installed (variable BLLIB) in the file Makefile.in
# for instance you can write BLLIB = /home/durufle/Solve/BLAS-3.8.0/libblas.a
make
mv lib/cblas_LINUX.a libcblas.a
ar rv libcblas_mkl.a src/zdotcsub.o src/zdotusub.o src/cdotcsub.o src/cdotusub.o
cd ..

Once Blas is installed, you can set USE_BLAS := YES in the makefile of Montjoie. You have to provide the correct paths in this Makefile (in the section ifeq ($(USE_BLAS),YES)).

Lapack

Lapack regroups functions for solving linear equations or finding eigenvalues of dense matrices. In Montjoie, Lapack will be used for each call to functions like GetLU, GetInverse, GetEigenvalues, GetQR, etc. Lapack is automatically provided if MKL is installed in your system. In Linux, you can also install it by typing

sudo apt install liblapack-dev

If you want to compile it manually, you can type

wget http://www.netlib.org/lapack/lapack-3.5.0.tgz
tar zxvf lapack-3.5.0.tgz
cd lapack-3.5.0
cmake .
make
mv lib/liblapack.a liblapack.a

Once Lapack is installed, you have to provide the correct paths in the Makefile (in the section ifeq ($(USE_BLAS),YES)).

Metis

Metis is used to partition meshes, therefore it is mandatory to install this library. It is also used by most of direct solvers (Mumps, Pastix, etc). To install it, you can type the following commands

wget http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/metis-5.1.0.tar.gz
tar zxvf metis-5.1.0.tar.gz 
cd metis-5.1.0
make config
make
mv build/Linux-x86_64/libmetis/libmetis.a .
cd ..

Once Metis is installed, you can provide the folder where Metis is installed in the variable CHEMETIS in the Makefile.

Scotch

Metis can be used to partition meshes and by direct solvers (such as Pastix). The last release can be downloaded on the official site :

Download Scotch

Then, in the folder src you have to create a file Makefile.inc (you can start from a model on the directory Make.inc) in order to specify the compiler and the paths you are using for your compiler. Scotch is also using zlib library (argument -lz) and real time library (argument -lrt). If you are using Ubuntu, you can install these libraries by typing :

sudo apt install zlib1g-dev
sudo apt install libc6-dev

Then type make scotch esmumps if you want to compile the sequential version or make scotch ptscotch esmumps ptesmumps if you want to compile the parallel version. The list of commands to install Scotch is listed below:

wget https://gitlab.inria.fr/scotch/scotch/-/archive/v6.1.1/scotch-v6.1.1.tar.bz2
tar scotch-v6.1.1.tar.bz2
sudo apt install zlib1g-dev
cd scotch-v6.1.1/src
cp Make.inc/Makefile.inc.i686_pc_linux2 Makefile.inc
// Remove the threads in Makefile.inc for a single-threaded execution and put -Drestrict=
// make ptscotch is executed to obtain the parallel version (put mpicc if the compiler does not find mpi.h)
// make esmumps and make ptesmumps are needed for Mumps
make scotch ptscotch esmumps ptesmumps

Once Scotch installed, you can set USE_SCOTCH := YES in the Makefile of Montjoie. The installation path of Scotch is provided in the variable CHESCOTCH.

ParMetis

ParMetis is a parallel ordering used by direct solvers such as Mumps or Pastix. We list below the commands to type in order to install this library

wget http://glaros.dtc.umn.edu/gkhome/fetch/sw/parmetis/parmetis-4.0.3.tar.gz
tar zxvf parmetis-4.0.3.tar.gz
cd parmetis-4.0.3
make config
make
// the next folder depends on the architecture
mv build/Linux-x86_64/libparmetis/libparmetis.a .

Mumps

Mumps is used as a direct solver for large linear systems. Therefore, you will need it if you are selecting a direct solver, sometimes preconditioning need also the use of a direct solver (like multigrid preconditioning to solve the coarsest level). If you are using iterative solver with multigrid preconditioning, you can avoid the use of Mumps, if you have selected incomplete factorization as a direct solver. Mumps can also be used in parallel with Montjoie, the compilation in parallel may be tricky, it is advised to compile by your-self Blacs and Scalapack.

A tarball can be downloaded on the official site :

Download Mumps

Then, you have to create a file Makefile.inc (you can start from a model of the directory Make.inc) in order to specify the compiler you are using and the reordering libraries (Scotch, Metis), if you are using sequential or parallel compilation, etc. Once this file created, you can compile the library by typing make alllib. Below, we list the commands needed to compile Mumps:

wget http://graal.ens-lyon.fr/MUMPS/MUMPS_5.4.0.tar.gz
tar zxvf MUMPS_5.4.0.tar.gz
cd MUMPS_5.4.0
cp Make.inc/Makefile.debian.SEQ Makefile.inc (or .PAR in parallel)
// Modify Makefile.inc to specify the chosen orderings

// In sequential (Metis and Pord are selected) :
ISCOTCH =
IMETIS = -I/home/durufle/Solve/metis-5.1.0/include
ORDERINGSF = -Dmetis -Dpord 

// In parallel (all orderings are selected) :
LSCOTCHDIR = /home/durufle/Solve/scotch-v6.1.1/
ISCOTCH   = -I$(LSCOTCHDIR)/include # only needed for ptscotch
LMETISDIR = /home/durufle/Solve/parmetis-4.0.3/
IMETIS    = -I$(LMETISDIR)/include -I$(LMETISDIR)/metis/include
ORDERINGSF = -Dscotch -Dmetis -Dpord -Dptscotch -Dparmetis
// In parallel you can also replace compilers with mpicc and mpif90

// in parallel or sequential
// Execute the following command in order to compile only the library:
make alllib

If you have installed Mumps, you can set USE_MUMPS := YES in the makefile of Montjoie. The variables CHEMUMPS_SEQ and CHEMUMPS_PAR have to be modified in this Makefile. They store the path where Mumps has been installed (respectively sequential and parallel version).

Blacs/Scalapack

These libraries are the distributed versions of Blas/Lapack. They are used mainly by Mumps in parallel. Depending on your system, they may be already present. If you want to compile them manually, you have to type the following lines :

wget http://www.netlib.org/blacs/mpiblacs.tgz
wget http://www.netlib.org/blacs/mpiblacs-patch03.tgz
tar zxvf mpiblacs.tgz
tar zxvf mpiblacs-patch03.tgz
cd BLACS
cp BMAKES/Bmake.MPI-LINUX Bmake.inc
// Modify Bmake.inc :
// BTOPdir contains the root directory where BLACS is present
// in MPIdir, put the directory where MPI is installed
// for instance /usr/lib/openmpi with openmpi basic install
// and set MPILIB = $(MPILIBdir)/libmpi.so
// replace F77 = g77 by F77 = mpif77 and set CC = mpicc

// Then compile
make mpi

// group all the archives .a :
cd LIB
ar xv blacsCinit_MPI-LINUX-0.a
ar xv blacs_MPI-LINUX-0.a
ar rv libblacs.a *.o *.C
rm *.o *.C
mv libblacs.a ../
cd ../..

// Download Scalapack:
wget http://www.netlib.org/scalapack/scalapack-2.0.2.tgz
tar zxvf scalapack-2.0.2.tgz
cd scalapack-2.0.2
// Compile:
cp SLmake.inc.example SLmake.inc
make lib

Pastix (usable only for parallel version)

Pastix is used as a direct solver for large linear systems. A tarball can be downloaded on the official site :

Download Pastix

Then, you can compile it with cmake. Below, we list the commands needed to compile Pastix:

sudo apt install liblapacke-dev
wget https://gitlab.inria.fr/solverstack/pastix//uploads/3fc798eb3ca6282e21506349df7f9da2/pastix-6.2.1.tar.gz
tar zxvf pastix-v6.2.1.tar.gz
cd pastix-6.2.1
mkdir build; cd build/
cmake .. -DPASTIX_INT64=OFF -DPASTIX_WITH_MPI=ON -DCMAKE_INSTALL_PREFIX=/home/durufle/Solve/pastix-v6.2.1/build -DPASTIX_ORDERING_METIS=ON -DPASTIX_ORDERING_PTSCOTCH=OFF
make
make install

Once Pastix has been installed, you can set USE_PASTIX := YES in the makefile of Montjoie. The variable CHEPASTIX needs to be modified with the path where Pastix is installed.

Umfpack/Cholmod

Umfpack and Cholmod are part of SuiteSparse. Umfpack can be used as a direct solver although it is less efficient than Mumps or Pastix. Cholmod is a Cholesky sparse solver, mainly used for the research of eigenvalues. Below, we list the commands to install SuiteSparse:

wget https://github.com/DrTimothyAldenDavis/SuiteSparse/archive/refs/tags/v5.10.0.tar.gz
tar zxvf SuiteSparse-5-10.0.tar.gz
cd SuiteSparse/SuiteSparse_config
// In the file SuiteSparse_config.mk, modify SUITESPARSE and manage field containing ?=
cd ..
make library
cd ../

Once SuiteSparse installed, you can set USE_UMFPACK := YES and/or USE_CHOLMOD := YES. The installation path of SuiteSparse has to be provided in the variable CHE_SUITE_SPARSE.

Pardiso

Pardiso is a direct solver that can be used in Montjoie. We interfaced the version present in MKL. If you have installed the MKL, and modified the Blas section of the Makefile to specify the location of MKL library, then you can set USE_PARDISO := YES.

Arpack

In Montjoie, Arpack is used for the computation of eigenvalues and eigenmodes. It is also used when you select a modal source in 3-D (it is then necessary to compute the mode on the section before further computation).

The archive can be downloaded and uncompressed by typing :

wget https://www.math.u-bordeaux.fr/~durufle/parpack.tar.bz2
tar jxvf parpack.tar.bz2

The directory Parpack is created, it contains both Arpack and Parpack. You will need to modify the file ARmake.inc such that the variable home is set with the directory where you have installed Parpack. If you want to compile in sequential, you have to type

make lib

If you want to compile in parallel (Parpack will be compiled), you have to type

make lib plib

Once Parpack installed, you can set USE_ARPACK := YES in the makefile of Montjoie. The paths are specified in the section ifeq ($(USE_ARPACK),YES).

Feast

Feast is an eigenvalue solver mainly interesting in parallel. It is used in Montjoie to compute eigenmodes. You download Feast in Feast website and type the following commands:

tar zxvf feast_4.0.tgz
cd FEAST/4.0/src
export FEASTROOT=/home/durufle/Solve/FEAST/4.0
make F90=gfortran MPI=openmpi MKL=no feast pfeast

Once Feast has been installed, you can set USE_FEAST := YES in the Makefile of Montjoie. The installation path of Feast has to be provided in the variable CHE_FEAST of this Makefile.

Slepc

SLEPc is an eigenvalue solver for large sparse linear systems. It is used by Montjoie to compute eigenmodes (similarly to Arpack). You can follow the different steps to install SLEPc

Once Slepc installed you can set USE_SLEPC := YES in the Makefile of Montjoie. The installation path is assumed to be equal to $(SLEPC_DIR)/$(PETSC_ARCH), since the environment variables SLEPC_DIR and PETSC_ARCH have been set during the installation.

Fftw

FFTW is a library implementing Fast Fourier Transform, an interface is proposed in Montjoie. If you do not use FFTW, Montjoie will try to use FFT proposed in MKL or GSL (if available) otherwise a naive (slow) algorithm. In Linux, the installation is straightforward :

sudo apt install libfftw3-dev

Once FFTW installed, tou can set USE_FFTW := YES in the Makefile of Montjoie. You can check in the section ifeq ($(USE_FFTW),YES) that the paths are correctly provided.

Mpfr

Mpfr may be used if you want to conduct computation in multiple precision. However, the computational time is usually much slower. In the Makefile, when mpfr is selected, it disables other libraries, such as Lapack, Blas, and so on (which are written for single and double precision). In Linux, the installation of mpfr is done by typing

sudo apt install libgmp3-dev libmpfr-dev

Once Mpfr installed, you can set USE_MPFR := YES, and recompile Montjoie. The compilation may be slower and produce object files larger. If you want to use intermediate precision, you can set USE_MPFR := FLOAT80 for long double (extended precision needing 80 bits) or USE_MPFR := FLOAT128 for quadruple precision. For these two last choices, Mpfr is not used, Montjoie is just compiled with long double or __float128 instead of double.

Gsl

This library is used for optimisation algorithms and FFT (if FFTW or MKL is not available). Under linux, the installation is straightforward by typing:

sudo apt install libgsl-dev

Hypre (only in parallel)

This library proposes efficient preconditionings in parallel. This library can be retrieved here :

Download Hypre Once installed, you can set USE_HYPRE := YES in the makefile of Montjoie. The variable CHE_HYPRE has to be modified with the path where Hypre has been installed

List of commands to execute in Ubuntu

These commands are available in the file INSTALL.txt

// basic packages for compilation and usage of svn
sudo apt-get install make cmake
sudo apt-get install gfortran g++
sudo apt-get install subversion ssh

For a compilation/execution in parallel, install a MPI library:
sudo apt-get install libopenmpi-dev

We assume that montjoie is located in ~/montjoie/MONTJOIE and external libraries in ~/Solve

/*  BLAS, CBLAS, LAPACK */


// Comments are preceded with //
// Download Blas in netlib.org:
wget http://www.netlib.org/blas/blas.tgz
tar zxvf blas.tgz
cd BLAS-3.8.0
make
mv blas_LINUX.a libblas.a
cd ..

// Download Cblas in netlib.org:
wget http://www.netlib.org/blas/blast-forum/cblas.tgz
tar zxvf cblas.tgz
cd CBLAS
// Modify the path where Blas is (variable BLLIB) in Makefile.in
make
mv lib/cblas_LINUX.a libcblas.a
// In order to avoid the MKL bug, create an archive libcblas_mkl.a:
ar rv libcblas_mkl.a src/zdotcsub.o src/zdotusub.o src/cdotcsub.o src/cdotusub.o
cd ..

// Download Lapack:
wget http://www.netlib.org/lapack/lapack-3.5.0.tgz
tar zxvf lapack-3.5.0.tgz
cd lapack-3.5.0
cmake .
make
mv lib/liblapack.a liblapack.a

cd  ~/montjoie/MONTJOIE
// You can test this first step :
// cp Makefile.LINUX Makefile
// In the Makefile, set USE_BLAS := YES (NO for all the other libs)
// You will let OPTIMIZATION to FASTER, USE_OPENMP and USE_MPI to YES if you compile in parallel, and USE_VERBOSE to YES
// ifeq($(USE_BLAS), YES), modify the pathes if needed
// You can check that the target "make acous2D" compiles correctly
make acous2D
You can type "make -j8 acous2D" if you are using a machine with at least 8 cores. The compilation should be eight times faster
// prior to launching the code, you will need to add the folder lib in the environment variable LD_LIBRARY_PATH
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:`pwd`/lib
// a good idea would bee to add this line (by replacing `pwd` by the folder where Montjoie is) in .bashrc or .bash_profile for the next connections
./acous2D.x example/acous2D/time_carre.ini

/* MUMPS */


// Download metis:
cd ~/Solve/
wget http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/metis-5.1.0.tar.gz
tar zxvf metis-5.1.0.tar.gz 
cd metis-5.1.0
make config
make
// the path here can depend on the architecture
mv build/Linux-x86_64/libmetis/libmetis.a .
cd ..

// Download scotch 
wget https://gitlab.inria.fr/scotch/scotch/-/archive/v6.1.1/scotch-v6.1.1.tar.bz2
tar scotch-v6.1.1.tar.bz2
sudo apt install zlib1g-dev
cd scotch-v6.1.1/src
cp Make.inc/Makefile.inc.i686_pc_linux2 Makefile.inc
// Remove the threads in Makefile.inc for a single-threaded execution and put -Drestrict=
// make ptscotch is executed to obtain the parallel version (put mpicc if the compiler does not find mpi.h)
// make esmumps and make ptesmumps are needed for Mumps
make scotch ptscotch esmumps ptesmumps
cd ../..

// Download ParMetis:
wget http://glaros.dtc.umn.edu/gkhome/fetch/sw/parmetis/parmetis-4.0.3.tar.gz
tar zxvf parmetis-4.0.3.tar.gz
cd parmetis-4.0.3
make config
make
// the next folder depends on the architecture
mv build/Linux-x86_64/libparmetis/libparmetis.a .
cd ..

// Download Mumps on http://graal.ens-lyon.fr/MUMPS/
wget http://graal.ens-lyon.fr/MUMPS/MUMPS_5.4.0.tar.gz
tar zxvf MUMPS_5.4.0.tar.gz
cd MUMPS_5.4.0
cp Make.inc/Makefile.debian.SEQ Makefile.inc (or .PAR in parallel)
// Modify Makefile.inc to specify the chosen orderings

// In sequential (Metis and Pord are selected) :
ISCOTCH =
IMETIS = -I/home/durufle/Solve/metis-5.1.0/include
ORDERINGSF = -Dmetis -Dpord 

// In parallel (all orderings are selected) :
LSCOTCHDIR = /home/durufle/Solve/scotch-v6.1.1/
ISCOTCH   = -I$(LSCOTCHDIR)/include # only needed for ptscotch
LMETISDIR = /home/durufle/Solve/parmetis-4.0.3/
IMETIS    = -I$(LMETISDIR)/include -I$(LMETISDIR)/metis/include
ORDERINGSF = -Dscotch -Dmetis -Dpord -Dptscotch -Dparmetis
// In parallel you can also replace compilers with mpicc and mpif90

// in parallel or sequential
// Execute the following command in order to compile only the library:
make alllib
cd ..


/* Blacs (parallel execution) */

// Download Blacs:
wget http://www.netlib.org/blacs/mpiblacs.tgz
wget http://www.netlib.org/blacs/mpiblacs-patch03.tgz
tar zxvf mpiblacs.tgz
tar zxvf mpiblacs-patch03.tgz
cd BLACS
cp BMAKES/Bmake.MPI-LINUX Bmake.inc
// Modify Bmake.inc :
// BTOPdir contains the root directory where BLACS is present
// in MPIdir, put the directory where MPI is installed
// for instance /usr/lib/openmpi with openmpi basic install
// and set MPILIB = $(MPILIBdir)/libmpi.so
// replace F77 = g77 by F77 = mpif77 and set CC = mpicc

// Then compile
make mpi

// group all the archives .a :
cd LIB
ar xv blacsCinit_MPI-LINUX-0.a
ar xv blacs_MPI-LINUX-0.a
ar rv libblacs.a *.o *.C
rm *.o *.C
mv libblacs.a ../
cd ../..

/* Scalapack (parallel execution) */

// Download Scalapack:
wget http://www.netlib.org/scalapack/scalapack-2.0.2.tgz
tar zxvf scalapack-2.0.2.tgz
cd scalapack-2.0.2
// Compile:
cp SLmake.inc.example SLmake.inc
make lib
cd ../


/* PASTIX */


// Download Pastix on gforge.inria.fr
sudo apt install liblapacke-dev
wget https://gitlab.inria.fr/solverstack/pastix//uploads/3fc798eb3ca6282e21506349df7f9da2/pastix-6.2.1.tar.gz
tar zxvf pastix-v6.2.1.tar.gz
cd pastix-6.2.1
mkdir build; cd build/
cmake .. -DPASTIX_INT64=OFF -DPASTIX_WITH_MPI=ON -DCMAKE_INSTALL_PREFIX=/home/durufle/Solve/pastix-v6.2.1/build -DPASTIX_ORDERING_METIS=ON -DPASTIX_ORDERING_PTSCOTCH=OFF
make
make install
cd ../..


4/* Arpack */


// Download Arpack/Parpack :
wget https://www.math.u-bordeaux.fr/~durufle/parpack.tar.bz2
tar jxvf parpack.tar.bz2
cd Parpack
// in the file ARmake.inc, change the variable home in order to provide the directory where Arpack has been uncompressed
// in sequential :
make lib
// in parallel
make lib plib
cd ..

/* MPFR */

Mpfr

// You just need to install gmp and mpfr:
sudo apt install libgmp3-dev libmpfr-dev
// In the Makefile of Montjoie, you can set USE_MPFR := YES for multiple precision computation
// of course not all the targets compile with MPFR
// and no fast direct solver is available in arbitrary precision


/* SuperLU */


// Download SuperLU:
wget https://github.com/xiaoyeli/superlu/archive/refs/tags/v5.2.2.tar.gz
tar zxvf v5.2.2.tar.gz
cd superlu-5.2.2
mkdir build; cd build
cmake .. -DCMAKE_INSTALL_PREFIX=../build -DCMAKE_INSTALL_INCLUDEDIR=../build
make
make install
cd ../

// version in parallel
wget https://github.com/xiaoyeli/superlu_dist/archive/refs/tags/v7.0.0.tar.gz
tar zxvf v7.0.0.tar.gz
cd superlu_dist-7.0.0
mkdir build; cd build
cmake .. -DTPL_PARMETIS_INCLUDE_DIRS="/home/durufle/Solve/parmetis-4.0.3/include;/home/durufle/Solve/parmetis-4.0.3/metis/include" \
   -DTPL_PARMETIS_LIBRARIES="/home/durufle/Solve/parmetis-4.0.3/libparmetis.a;/home/durufle/Solve/metis-5.1.0/libmetis.a"
make
cd ..


/* UmfPack/Cholmod */

// Download SuiteSparse where both UmfPack and Cholmod are available
wget https://github.com/DrTimothyAldenDavis/SuiteSparse/archive/refs/tags/v5.10.0.tar.gz
tar zxvf SuiteSparse-5-10.0.tar.gz
cd SuiteSparse/SuiteSparse_config
// In the file SuiteSparse_config.mk, modify SUITESPARSE and manage field containing ?=
cd ..
make library
cd ../

/* Gsl */


// To install it under Linux
sudo apt install libgsl-dev

/* Fftw */


// Download fftw:
sudo apt install libfftw3-dev


/*  Montjoie */

cd ~/montjoie/MONTJOIE
The following command removes the previous .o and .a files:
make cleanlib
This command should be executed if you change of configuration (by example compiling with MPI, or with another library)
If you have installed all the libraries in this page, you should be able to set
USE_MUMPS := YES
USE_PASTIX := YES
USE_ARPACK := YES
USE_SLEPC := YES
USE_GSL := YES
USE_FFTW := YES
USE_SCOTCH := YES (in parallel)
USE_UMFPACK := YES
USE_SUPERLU := YES
USE_CHOLMOD := YES
You correct all the paths for these libraries in the Makefile, then you should be able to compile helm2D :
make -j8 helm2D


USE_PARDISO and USE_MKL can be set to YES, if you link with MKL library (see section devoted to BLAS/LAPACK in the Makefile)
USE_OPENCV can be set to YES is you have opencv installed
USE_WSMP can be set to YES if you have wsmp installed (Watson Sparse Matrix Package)