Commit 54907dd8 authored by Jens Henrik Goebbert's avatar Jens Henrik Goebbert
Browse files

module update

parent e83c1a16
%% Cell type:markdown id: tags: %% Cell type:markdown id: tags:
![jsc-logo.jpg](attachment:67258d94-84e6-4a0c-ae8f-c74332ec082e.jpg) ![jsc-logo.jpg](attachment:67258d94-84e6-4a0c-ae8f-c74332ec082e.jpg)
Author: [Jens Henrik Göbbert](mailto:j.goebbert@fz-juelich.de) Author: [Jens Henrik Göbbert](mailto:j.goebbert@fz-juelich.de)
------------------------------------ ------------------------------------
%% Cell type:markdown id: tags: %% Cell type:markdown id: tags:
# How to install User Software using EasyBuild # 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. [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. 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). 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: And some reasons are not only convincing for HPC centers but also for HPC users:
- fully automates software builds - fully automates software builds
- allows for easily reproducing previous builds - allows for easily reproducing previous builds
- keep the software build recipes/specifications simple and human-readable - keep the software build recipes/specifications simple and human-readable
- supports co-existence of versions/builds via dedicated installation prefix and module files - supports co-existence of versions/builds via dedicated installation prefix and module files
- automagic dependency resolution - automagic dependency resolution
- ... - ...
<div class="alert alert-block alert-info"> <div class="alert alert-block alert-info">
<b>UserInstallations</b></br> <b>UserInstallations</b></br>
allow you to easily install software for your own use or for everyone in your compute-time project.</br> allow you to easily install software for your own use or for everyone in your compute-time project.</br>
</div> </div>
This notebook shows you how to make and load your own first software module. This notebook shows you how to make and load your own first software module.
------------------------- -------------------------
%% Cell type:markdown id: tags: %% Cell type:markdown id: tags:
## Introduction ## Introduction
Whenever you want to load a certain software module you call `module load <software>` . 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. 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. 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` e.g. `module load Stages/2020 GCC/10.3.0 ParaStationMPI`
These special modules (stages, compilers, MPIs) additionally extend the module paths in `$MODULEPATH` . 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. 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) 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 ... the module paths is **additionally extended** by the special modules (compilers, MPIs) with ...
<div class="alert alert-block alert-info"> <div class="alert alert-block alert-info">
<b>User-specific module paths</b></br> <b>User-specific module paths</b></br>
<ul> <ul>
<li>\$HOME/easybuild</li> <li>\$HOME/easybuild</li>
<li>\$PROJECT/easybuild</li> <li>\$PROJECT/easybuild</li>
</ul> </ul>
</div> </div>
The hierarchy of preference is `$HOME/easybuild` highest, then `$PROJECT/easybuild`, then the system installation: The hierarchy of preference is `$HOME/easybuild` highest, then `$PROJECT/easybuild`, then the system installation:
%% Cell type:markdown id: tags: %% Cell type:markdown id: tags:
#### 1) Private Software Modules -> $HOME/easybuild #### 1) Private Software Modules -> $HOME/easybuild
The symlink directory `$HOME/easybuild` can exist if you have created it. It is not available by default. The symlink directory `$HOME/easybuild` can exist if you have created it. It is not available by default.
**ATTENTION:** **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` . 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 #### 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. The directory `$PROJECT/easybuild` can exist if anyone of the project has created it. It is not available by default.
**ATTENTION:** **ATTENTION:**
Unlike the environment variable `$HOME`, which is set at login, `$PROJECT` is **NOT** 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>` . You must call `jutil env activate -p <projectname>` before or set it manually with `export PROJECT=<path>` .
#### 3) System Software Modules -> /p/software/\<systemname> #### 3) System Software Modules -> /p/software/\<systemname>
Most software modules are of course installed in the system-wide module paths. 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. 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"> <div class="alert alert-block alert-info">
<b>ATTENTION:</b></br> <b>ATTENTION:</b></br>
\$HOME and \$PROJECT are variables that can change depending on your current enviroment.</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. This can be a benefit as long as you are aware of it.
</div> </div>
%% Cell type:markdown id: tags: %% Cell type:markdown id: tags:
---------------------------- ----------------------------
## Preparing the Environment ## Preparing the Environment
- Check/Create installation directories - Check/Create installation directories
- Load appropriate modules - Load appropriate modules
%% Cell type:code id: tags: %% Cell type:code id: tags:
``` bash ``` bash
# INPUT NEEDED: # INPUT NEEDED:
export EBINST_TYPE=private # project export EBINST_TYPE=private # project
# Ensure private over project installation # Ensure private over project installation
if [ "${EBINST_TYPE}" == "private" ]; then if [ "${EBINST_TYPE}" == "private" ]; then
export PREFER_USER=1 export PREFER_USER=1
fi fi
``` ```
%% Cell type:code id: tags: %% Cell type:code id: tags:
``` bash ``` bash
# Check for environment variable $PROJECT # Check for environment variable $PROJECT
# export PROJECT=/p/project/<projectname> # export PROJECT=/p/project/<projectname>
# or # or
# jutil env activate -p <projectname> # jutil env activate -p <projectname>
if [ -z $PROJECT ]; then if [ -z $PROJECT ]; then
echo '$PROJECT not set.' echo '$PROJECT not set.'
echo 'Please set $PROJECT first.' echo 'Please set $PROJECT first.'
else else
if [ ! -d "$PROJECT" ]; then if [ ! -d "$PROJECT" ]; then
echo "ERROR: $PROJECT is not a valid directory" echo "ERROR: $PROJECT is not a valid directory"
else else
echo "PROJECT=$PROJECT" echo "PROJECT=$PROJECT"
fi fi
fi fi
``` ```
%% Output %% Output
PROJECT=/p/project/ccstvs PROJECT=/p/project/ccstvs
%% Cell type:code id: tags: %% Cell type:code id: tags:
``` bash ``` bash
# Check/Create installation directories # Check/Create installation directories
# private installation -> $HOME/easybuild # private installation -> $HOME/easybuild
if [ "${EBINST_TYPE}" == "private" ]; then if [ "${EBINST_TYPE}" == "private" ]; then
if [ ! -d "$HOME/easybuild" ]; then if [ ! -d "$HOME/easybuild" ]; then
mkdir -p $PROJECT/$USER/easybuild mkdir -p $PROJECT/$USER/easybuild
ln -s $PROJECT/$USER/easybuild $HOME/easybuild ln -s $PROJECT/$USER/easybuild $HOME/easybuild
echo 'Directory created, Link set: $HOME/easybuild -> $PROJECT/$USER/easybuild' echo 'Directory created, Link set: $HOME/easybuild -> $PROJECT/$USER/easybuild'
else else
if [ ! -L "$HOME/easybuild" ]; then if [ ! -L "$HOME/easybuild" ]; then
echo 'ERROR: $HOME/easybuild is needs to be a _LINK_.' echo 'ERROR: $HOME/easybuild is needs to be a _LINK_.'
fi fi
fi fi
echo "\$HOME/easybuild -> $(readlink $HOME/easybuild)" echo "\$HOME/easybuild -> $(readlink $HOME/easybuild)"
fi fi
# project installation -> $PROJECT/easybuild # project installation -> $PROJECT/easybuild
if [ "${EBINST_TYPE}" == "project" ]; then if [ "${EBINST_TYPE}" == "project" ]; then
if [ ! -d "$PROJECT/easybuild" ]; then if [ ! -d "$PROJECT/easybuild" ]; then
mkdir -p $PROJECT/easybuild mkdir -p $PROJECT/easybuild
echo 'Directory created: $PROJECT/easybuild' echo 'Directory created: $PROJECT/easybuild'
fi fi
echo "\$PROJECT/easybuild == $PROJECT/easybuild" echo "\$PROJECT/easybuild == $PROJECT/easybuild"
fi fi
``` ```
%% Output %% Output
$HOME/easybuild -> /p/project/ccstvs/goebbert1/easybuild $HOME/easybuild -> /p/project/ccstvs/goebbert1/easybuild
%% Cell type:code id: tags: %% Cell type:code id: tags:
``` bash ``` bash
# Load appropriate modules # Load appropriate modules
module load Stages/2020 module load Stages/2020
module load UserInstallations module load UserInstallations
module update module update
``` ```
%% Output %% Output
Preparing the environment for use of requested stage ( 2020 ). Preparing the environment for use of requested stage ( 2020 ).
 
Performing a personal installation. To do a project wide installation, Performing a personal installation. To do a project wide installation,
set the $PROJECT environment variable (for example via jutil). set the $PROJECT environment variable (for example via jutil).
 
** LOADING USERSPACE DEVELOPER CONFIGURATION ** ** LOADING USERSPACE DEVELOPER CONFIGURATION **
Preparing the environment for software installation via EasyBuild into Preparing the environment for software installation via EasyBuild into
userspace leveraging stage 2020 userspace leveraging stage 2020
- Adding our license servers to LM_LICENSE_FILE - Adding our license servers to LM_LICENSE_FILE
- Giving priority to JSC custom Toolchains (EASYBUILD_INCLUDE_TOOLCHAINS) - Giving priority to JSC custom Toolchains (EASYBUILD_INCLUDE_TOOLCHAINS)
- Giving priority to JSC custom EasyBlocks (EASYBUILD_INCLUDE_EASYBLOCKS) - Giving priority to JSC custom EasyBlocks (EASYBUILD_INCLUDE_EASYBLOCKS)
- Giving priority to JSC custom easyconfigs (EASYBUILD_ROBOT) - Giving priority to JSC custom easyconfigs (EASYBUILD_ROBOT)
- Allowing searching of distribution easyconfigs (EASYBUILD_SEARCH_PATHS) - Allowing searching of distribution easyconfigs (EASYBUILD_SEARCH_PATHS)
- To keep module view clean, hiding some dependencies (EASYBUILD_HIDE_DEPS) - To keep module view clean, hiding some dependencies (EASYBUILD_HIDE_DEPS)
- Using JSC EasyBuild hooks (EASYBUILD_HOOKS) - Using JSC EasyBuild hooks (EASYBUILD_HOOKS)
 - Setting EASYBUILD_PARALLEL to 8  - Setting EASYBUILD_PARALLEL to 8
 - Setting EASYBUILD_OPTARCH to Intel:march=core-avx2  - Setting EASYBUILD_OPTARCH to Intel:march=core-avx2
Note: If you wish to submit software builds to slurm with the '--job' 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, flag you will need to set environment variables to configure job submission,
see see
https://slurm.schedmd.com/sbatch.html#lbAJ https://slurm.schedmd.com/sbatch.html#lbAJ
for details. for details.
 
Preparing the environment for use of requested stage ( 2020 ). Preparing the environment for use of requested stage ( 2020 ).
 
Performing a personal installation. To do a project wide installation, Performing a personal installation. To do a project wide installation,
set the $PROJECT environment variable (for example via jutil). set the $PROJECT environment variable (for example via jutil).
 
** LOADING USERSPACE DEVELOPER CONFIGURATION ** ** LOADING USERSPACE DEVELOPER CONFIGURATION **
Preparing the environment for software installation via EasyBuild into Preparing the environment for software installation via EasyBuild into
userspace leveraging stage 2020 userspace leveraging stage 2020
- Adding our license servers to LM_LICENSE_FILE - Adding our license servers to LM_LICENSE_FILE
- Giving priority to JSC custom Toolchains (EASYBUILD_INCLUDE_TOOLCHAINS) - Giving priority to JSC custom Toolchains (EASYBUILD_INCLUDE_TOOLCHAINS)
- Giving priority to JSC custom EasyBlocks (EASYBUILD_INCLUDE_EASYBLOCKS) - Giving priority to JSC custom EasyBlocks (EASYBUILD_INCLUDE_EASYBLOCKS)
- Giving priority to JSC custom easyconfigs (EASYBUILD_ROBOT) - Giving priority to JSC custom easyconfigs (EASYBUILD_ROBOT)
- Allowing searching of distribution easyconfigs (EASYBUILD_SEARCH_PATHS) - Allowing searching of distribution easyconfigs (EASYBUILD_SEARCH_PATHS)
- To keep module view clean, hiding some dependencies (EASYBUILD_HIDE_DEPS) - To keep module view clean, hiding some dependencies (EASYBUILD_HIDE_DEPS)
- Using JSC EasyBuild hooks (EASYBUILD_HOOKS) - Using JSC EasyBuild hooks (EASYBUILD_HOOKS)
 - Setting EASYBUILD_PARALLEL to 8  - Setting EASYBUILD_PARALLEL to 8
 - Setting EASYBUILD_OPTARCH to Intel:march=core-avx2  - Setting EASYBUILD_OPTARCH to Intel:march=core-avx2
Note: If you wish to submit software builds to slurm with the '--job' 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, flag you will need to set environment variables to configure job submission,
see see
https://slurm.schedmd.com/sbatch.html#lbAJ https://slurm.schedmd.com/sbatch.html#lbAJ
for details. for details.
 
%% Cell type:markdown id: tags: %% Cell type:markdown id: tags:
------------------- -------------------
## Additional Informations ## Additional Informations
All toolchains are supported except the toolchain `SYSTEM`. All toolchains are supported except the toolchain `SYSTEM`.
%% Cell type:code id: tags: %% Cell type:markdown id: tags:
``` bash <div class="alert alert-block alert-info">
``` <b>ATTENTION:</b> \$PROJECT gets evaluated to fill \$MODULEPATH</br>
Therefore you <b>MUST</b> call "module update" everytime you change \$PROJECT` after loading any modules.</br>
If you forget the update \$MODULEPATH will not be changed and still points to paths from your previous value of \$PROJECT.</br>
</div>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment