Bootstrap GCC, LLVM and NVHPC, and build an HPC software stack based on OpenMPI, with a few unique features:
- parallel package builds with single jobserver for all builds;
- avoiding relocation issues by fixing the install path to a new directory
/some-dir
of choice (no root access required); - fast, in-memory builds.
Requirements:
spack
bwrap
(when not already building inside a sandbox)
Usage:
- Copy
Make.user.example
toMake.user
and change some variables1. - Run
make -j$(nproc)
to bootstrap compilers and packages2. - Run
make store.squashfs
to bundle those in a squashfs file.
Unprivileged mounts
The squashfs file can then be mounted using squashfs-mount or squashfuse
Generating modules
There's no modules.yaml
file right now, but generating modules goes along those lines:
modules:
'default:':
arch_folder: false
roots:
tcl: /path/to/tcl/modules
enable:
- tcl
tcl:
projections:
all: '{name}/{version}-{compiler.name}-{compiler.version}'
all:
autoload: none
filter:
environment_blacklist: ['LD_LIBRARY_PATH', 'LIBRARY_PATH', 'CPATH']
spack module tcl refresh
spack module tcl setdefault gcc@11
Footnotes
-
For reproducibility, build with a clean environment:
env -i PATH=/usr/bin:/bin make ...
. ↩ -
A few variables should be set in
Make.user
:STORE
: where to install packages;SPACK
: whatspack
to use;SPACK_SYSTEM_CONFIG_PATH
: path to spack config dir (e.g. config/hohgant).BWRAP
: use bubblewrap for sandboxing and speed: seeMake.user.example
for details.SPACK_INSTALL_FLAGS
: specify more install flags, like--verbose
.