Cluster
Installing SLOTH On Supercomputers Without Internet Access¶
This guide provides detailed steps to install SLOTH on a supercomputer without internet access using provided scripts. It includes using Spack for package management and compiling dependencies required by SLOTH.
Installing SLOTH on a supercomputer without internet access involves preparing the environment, downloading necessary components, creating a local Spack mirror, and building SLOTH with all dependencies.
Use And Adapt Scripts¶
The installation is performed in two parts, with the scripts provided in the scripts directory of SLOTH:
sloth-topaze-part1.sh: run on a local machine with internet access. It gathers Spack, its package recipes, the sources of MFEM and its dependencies, and SLOTH into an archive, and copies it to the supercomputer.sloth-topaze-part2.sh: run on the supercomputer. It installs MFEM with Spack from this archive, then builds and tests SLOTH.
Adapt the variables at the top of sloth-topaze-part1.sh (MY_LOG, DEST_DIR, SLOTH_TAG) and the modules loaded in sloth-topaze-part2.sh to your own settings.
On your local machine:
On the supercomputer (Topaze in our example), in DEST_DIR:
Same MFEM specification in both parts
Both scripts define the same MFEM_SPEC (by default mfem@4.9.0+mpi+mumps): the mirror created in part 1 only contains the sources needed by this specification.
For problems with more than about 2 billion unknowns, add ^hypre+mixedint (64-bit global indices) to MFEM_SPEC in both scripts.
Part 1: Preparing the Archive (sloth-topaze-part1.sh)¶
-
Spack and its package recipes. Spack is cloned, together with the
spack-packagesrepository: since Spack 1.0, package recipes are no longer shipped with Spack and would otherwise be downloaded at first use, which is impossible on the supercomputer. -
SLOTH, at the tag given by
SLOTH_TAG: -
Bootstrap mirror: binary packages of the tools Spack needs to work offline.
-
Source mirror of MFEM and all its dependencies:
-
Archive and copy to the supercomputer:
Part 2: Building on the Supercomputer (sloth-topaze-part2.sh)¶
-
Extract the archive and use the package recipes it contains:
-
Offline bootstrap: the local bootstrap mirror is added and the online sources are disabled.
The names of the bootstrap sources depend on the Spack version: check them withspack bootstrap reset -y spack bootstrap add --scope=site --trust local-binaries $PWD/my_bootstrap/metadata/binaries/ spack bootstrap disable --scope=site github-actions-v0.5 spack bootstrap disable --scope=site github-actions-v0.4 spack bootstrap disable --scope=site spack-install spack bootstrap nowspack bootstrap listand adapt thedisablecommands if needed. -
Modules, compilers and external packages, then MFEM from the local mirror:
-
SLOTH, built with
envSloth.sh(which finds MFEM and HYPRE withspack location -i), then tested:cd $WORK_DIR/sloth mkdir -p build && cd build bash ../envSloth.sh --portable --np=10 make -j 10 tests ctest--portableavoids-march=native: the login node may not have the same CPU as the compute nodes.
Running tests on a supercomputer
Tests use mpiexec. Running them on a login node may be forbidden or limited by the compute centre: run ctest from an interactive allocation on compute nodes, with the same modules loaded.
Run Your Simulation On Topaze¶
Script example of a simulation running on milan partition over 8192 mpi processes with a duration limit of about 24 hours: