Skip to content
Snippets Groups Projects
Commit c702a89d authored by Jens Henrik Goebbert's avatar Jens Henrik Goebbert
Browse files

add instructions for UserSoftware installation

parent bf68ae88
No related branches found
No related tags found
No related merge requests found
%% Cell type:markdown id: tags:
![jsc-logo.jpg](attachment:67258d94-84e6-4a0c-ae8f-c74332ec082e.jpg)
Author: [Jens Henrik Göbbert](mailto:j.goebbert@fz-juelich.de)
------------------------------------
%% Cell type:markdown id: tags:
# How to install User Software using EasyBuild
[EasyBuild](https://www.easybuild.io) is a software build and installation framework that allows you to manage (scientific) software on High Performance Computing (HPC) systems in an efficient way.
All software modules you can load with `module load` on the supercomputers at the Jülich Supercomputing Centre (JSC) was installed using EasyBuild.
There are multiple reasons for a build & installation framework like [EasyBuild](https://easybuild.io).
And some reasons are not only convincing for HPC centers but also for HPC users:
- fully automates software builds
- allows for easily reproducing previous builds
- keep the software build recipes/specifications simple and human-readable
- supports co-existence of versions/builds via dedicated installation prefix and module files
- automagic dependency resolution
- ...
<div class="alert alert-block alert-info">
<b>UserInstallations</b></br>
allow you to easily install software for your own use or for everyone in your compute-time project.</br>
</div>
This notebook shows you how to make and load your own first software module.
-------------------------
%% Cell type:markdown id: tags:
## Introduction
Whenever you want to load a certain software module you call `module load <software>` .
This command searches all paths in `$MODULEPATH` for a matching configuration file.
In general you start loading first a software stage, then a compiler and after that a MPI.
e.g. `module load Stages/2020 GCC/10.3.0 ParaStationMPI`
These special modules (stages, compilers, MPIs) additionally extend the module paths in `$MODULEPATH` .
It ensures that you can load further modules, which fit to the loaded stage, compiler and MPI.
Now, if compatible private or project software modules are installed (by yourself or someone in your project)
the module paths is **additionally extended** by the special modules (compilers, MPIs) with ...
<div class="alert alert-block alert-info">
<b>User-specific module paths</b></br>
<ul>
<li>\$HOME/easybuild</li>
<li>\$PROJECT/easybuild</li>
</ul>
</div>
The hierarchy of preference is `$HOME/easybuild` highest, then `$PROJECT/easybuild`, then the system installation:
%% Cell type:markdown id: tags:
#### 1) Private Software Modules -> $HOME/easybuild
The symlink directory `$HOME/easybuild` can exist if you have created it. It is not available by default.
**ATTENTION:**
It must be a link to a place outside of `$HOME`, e.g. to `$PROJECT/$USER/easybuild` because of disk-quota limitations in `$HOME` .
#### 2) Project Software Modules -> $PROJECT/easybuild
The directory `$PROJECT/easybuild` can exist if anyone of the project has created it. It is not available by default.
**ATTENTION:**
Unlike the environment variable `$HOME`, which is set at login, `$PROJECT` is **NOT**
You must call `jutil env activate -p <projectname>` before or set it manually with `export PROJECT=<path>` .
#### 3) System Software Modules -> /p/software/\<systemname>
Most software modules are of course installed in the system-wide module paths.
This paths are searched for at last and therefore you are free to overwrite software modules with private or project software modules.
<div class="alert alert-block alert-info">
<b>ATTENTION:</b></br>
\$HOME and \$PROJECT are variables that can change depending on your current enviroment.</br>
This can be a benefit as long as you are aware of it.
</div>
%% Cell type:markdown id: tags:
----------------------------
## Preparing the Environment
- Check/Create installation directories
- Load appropriate modules
%% Cell type:code id: tags:
``` bash
# INPUT NEEDED:
export EBINST_TYPE=private # project
# Ensure private over project installation
if [ "${EBINST_TYPE}" == "private" ]; then
export PREFER_USER=1
fi
```
%% Cell type:code id: tags:
``` bash
# Check for environment variable $PROJECT
# export PROJECT=/p/project/<projectname>
# or
# jutil env activate -p <projectname>
if [ -z $PROJECT ]; then
echo '$PROJECT not set.'
echo 'Please set $PROJECT first.'
else
if [ ! -d "$PROJECT" ]; then
echo "ERROR: $PROJECT is not a valid directory"
else
echo "PROJECT=$PROJECT"
fi
fi
```
%% Output
PROJECT=/p/project/ccstvs
%% Cell type:code id: tags:
``` bash
# Check/Create installation directories
# private installation -> $HOME/easybuild
if [ "${EBINST_TYPE}" == "private" ]; then
if [ ! -d "$HOME/easybuild" ]; then
mkdir -p $PROJECT/$USER/easybuild
ln -s $PROJECT/$USER/easybuild $HOME/easybuild
echo 'Directory created, Link set: $HOME/easybuild -> $PROJECT/$USER/easybuild'
else
if [ ! -L "$HOME/easybuild" ]; then
echo 'ERROR: $HOME/easybuild is needs to be a _LINK_.'
fi
fi
echo "\$HOME/easybuild -> $(readlink $HOME/easybuild)"
fi
# project installation -> $PROJECT/easybuild
if [ "${EBINST_TYPE}" == "project" ]; then
if [ ! -d "$PROJECT/easybuild" ]; then
mkdir -p $PROJECT/easybuild
echo 'Directory created: $PROJECT/easybuild'
fi
echo "\$PROJECT/easybuild == $PROJECT/easybuild"
fi
```
%% Output
$HOME/easybuild -> /p/project/ccstvs/goebbert1/easybuild
%% Cell type:code id: tags:
``` bash
# Load appropriate modules
module load Stages/2020
module load UserInstallations
module update
```
%% Output
Preparing the environment for use of requested stage ( 2020 ).

Performing a personal installation. To do a project wide installation,
set the $PROJECT environment variable (for example via jutil).

** LOADING USERSPACE DEVELOPER CONFIGURATION **
Preparing the environment for software installation via EasyBuild into
userspace leveraging stage 2020
- Adding our license servers to LM_LICENSE_FILE
- Giving priority to JSC custom Toolchains (EASYBUILD_INCLUDE_TOOLCHAINS)
- Giving priority to JSC custom EasyBlocks (EASYBUILD_INCLUDE_EASYBLOCKS)
- Giving priority to JSC custom easyconfigs (EASYBUILD_ROBOT)
- Allowing searching of distribution easyconfigs (EASYBUILD_SEARCH_PATHS)
- To keep module view clean, hiding some dependencies (EASYBUILD_HIDE_DEPS)
- Using JSC EasyBuild hooks (EASYBUILD_HOOKS)
 - Setting EASYBUILD_PARALLEL to 8
 - Setting EASYBUILD_OPTARCH to Intel:march=core-avx2
Note: If you wish to submit software builds to slurm with the '--job'
flag you will need to set environment variables to configure job submission,
see
https://slurm.schedmd.com/sbatch.html#lbAJ
for details.

Preparing the environment for use of requested stage ( 2020 ).

Performing a personal installation. To do a project wide installation,
set the $PROJECT environment variable (for example via jutil).

** LOADING USERSPACE DEVELOPER CONFIGURATION **
Preparing the environment for software installation via EasyBuild into
userspace leveraging stage 2020
- Adding our license servers to LM_LICENSE_FILE
- Giving priority to JSC custom Toolchains (EASYBUILD_INCLUDE_TOOLCHAINS)
- Giving priority to JSC custom EasyBlocks (EASYBUILD_INCLUDE_EASYBLOCKS)
- Giving priority to JSC custom easyconfigs (EASYBUILD_ROBOT)
- Allowing searching of distribution easyconfigs (EASYBUILD_SEARCH_PATHS)
- To keep module view clean, hiding some dependencies (EASYBUILD_HIDE_DEPS)
- Using JSC EasyBuild hooks (EASYBUILD_HOOKS)
 - Setting EASYBUILD_PARALLEL to 8
 - Setting EASYBUILD_OPTARCH to Intel:march=core-avx2
Note: If you wish to submit software builds to slurm with the '--job'
flag you will need to set environment variables to configure job submission,
see
https://slurm.schedmd.com/sbatch.html#lbAJ
for details.

%% Cell type:markdown id: tags:
-------------------
## Additional Informations
Currently there are these top-level toolchain families supported.
- "intel" == Intel compiler suite
- "intel-para" == Intel compiler suite + ParaStationMPI
- "iomkl" == Intel compiler suite + OpenMPI + MKL
- "gpsmkl" == GCC compiler suite + ParaStationMPI + MKL
- "gomkl" == GCC compiler suite + OpenMPI + MKL
- "npsmkl" == NVHPC compiler suite + ParaStationMPI + MKL
- "nvomkl" == NVHPC compiler suite + OpenMPI + MKL
- "pmvmklc"
- "gmvmklc"
If you want to install an easyconfig that is not listed in these supported top-level toolchains,
you can disable the check with `export JSC_OVERRIDE_TOOLCHAIN_CHECK=1`
%% Cell type:code id: tags:
``` bash
```
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment