Cluster from source files¶
The following installation procedure describes how to install SLOTH
from source files on a supercomputer. Here, the description is based on an installation done on CCRT Topaze.
This procedure is mainly based on the installation procedure from source files on local computer.
Getting source files on local computer¶
The first step consists in cloning MFEM
, METIS
, HYPRE
and SuiteSparse
.
Clone of the default branch
- The current installation procedure assumes that the clone of the source files is based on the default branch of each repository.
- Users are free to consider different branches for their installation.
All sources are collected in a global directory called MFEM4SLOTH
.
MFEM¶
MFEM's source files are obtained by running the following command:
HYPRE¶
HYPRE's source files are obtained by running the following command:
METIS¶
METIS's source files are obtained by running the following commands:
git clone https://github.com/mfem/tpls.git
mv tpls/metis-4.0.3.tar.gz .
tar -zxvf metis-4.0.3.tar.gz
rm -fr metis-4.0.3.tar.gz tpls
SuiteSparse¶
SuiteSparse's source files are obtained by running the following command:
Copy of source files on the supercomputer¶
Copy of the MFEM4SLOTH
folder on the supercomputer by running the following command:
Building dependencies on the supercomputer¶
The second step consists in building METIS
, HYPRE
and SuiteSparse
on the supercomputer.
From now, all command are run on the supercomputer.
Load required modules¶
Before building dependencies, it is necessary to load some modules. Please keep in mind that versions depend on the targeted environment.
gnu
, mpi
, cmake
are required to build MFEM with METIS
, HYPRE
and SuiteSparse
.
For SuiteSparse
, blas
and mpfr
are also needed.
module load gnu/11.1.0
module load mpi/openmpi/4.1.4
module load cmake/3.29.6
module load blas/openblas/0.3.26
module load mpfr/4.2.0
Find available modules
The list of available modules can be obtained using the following command:
where an optional string can be specified to refine the search for modules. This string can be a partial name.METIS¶
To build METIS
, the following command must be run:
cd metis-4.0.3
make OPTFLAGS=-Wno-error=implicit-function-declaration
mkdir include
cp Lib/*.h include/
cd ..
ln -s metis-4.0.3 metis-4.0
The fourth instruction differs from the installation procedure from source files on local computer.
HYPRE¶
To build HYPRE
, the following command must be run:
N
is a user defined number of CPUs.
SuiteSparse¶
To build SuiteSparse
, the following commands must be run:
cd SuiteSparse/
make -j N
make install DESTDIR=$PWD/INSTALLDIR
mv INSTALLDIR/usr/local/lib64/* lib/
mv INSTALLDIR/usr/local/include/suitesparse/* include/
mv INSTALLDIR/usr/local/bin/* bin/
cd ..
N
is a user defined number of CPUs.
The fourth instruction differs from the installation procedure from source files on local computer.
Building MFEM with dependencies¶
Here, we assume that all dependencies are well built according to the previous directives.
At this stage, MFEM
can be installed by running the following commands:
SLOTH compilation¶
Once MFEM
is installed, priori to compile SLOTH
, several environment variables must be defined:
export MFEM_DIR="$MFEM4SLOTH/mfem/INSTALLDIR/"
export HYPRE_DIR="$MFEM4SLOTH/hypre/src/hypre/"
export METIS_DIR="$MFEM4SLOTH/metis-4.0/"
export SuiteSparse_DIR="$MFEM4SLOTH/SuiteSparse/"
On the use of the envSloth.sh
configuration file
These definitions are written into the configuration file envSloth.sh
located in the root directory of the SLOTH
repository.
The use of this file is recommended to load the MFEM
environment before compilling SLOTH
.
- Load the
SLOTH
configuration file: where$MFEM4SLOTH
is a variable associated with the path towards theMFEM
installation (ie$HOME/MFEM4SLOTH
in the current description) and [OPTIONS] are:--release to build SLOTH with Release compiler options --optim to build SLOTH with Optim compiler options --debug to build SLOTH with Debug compiler options --coverage to build SLOTH with Coverage compiler options --minsizerel to build with MinSizeRel compiler options --relwithdebinfo to build with RelWithDebInfo compiler options --external to built SLOTH with an external package
By default, SLOTH
is built with release compiler options.
- Finally, compile with N the number of jobs.