How to install easybuild  

Install Easybuild
python -m venv venv
source venv/bin/activate
pip install easybuild

Configuring easybuild 

[config]
prefix=/pfs/work/g2pbloch/imasenv_eb
modules-tool=EnvironmentModulesC
module-syntax=Tcl
[override]
insecure-download=True

The configuration is located in the file $HOME/.config/easybuild/config.cfg.

Set the prefix path to the directory where the installation should be performed. In the prefix directory, clone the repository https://gitlab.eufus.psnc.pl/g2pbloch/easybuild so that the files are placed in the eb_files_repo directory. Then execute the commands that will install the necessary packages.

Installing packages

Install packages
eb ebfiles_repo/Java/Java-11.0.20.eb --robot --allow-modules-tool-mismatch
eb ebfiles_repo/ant/ant-1.10.12-Java-11.eb --robot  --allow-modules-tool-mismatch
eb ebfiles_repo/GCCcore/GCCcore-12.2.0.eb --robot  --allow-modules-tool-mismatch
eb ebfiles_repo/zlib/zlib-1.2.12-GCCcore-12.2.0.eb --robot --allow-modules-tool-mismatch
eb ebfiles_repo/binutils/binutils-2.39-GCCcore-12.2.0.eb --robot --allow-modules-tool-mismatch
eb ebfiles_repo/GCC/GCC-12.2.0Blitz++.eb --robot --allow-modules-tool-mismatch
eb ebfiles_repo/libMemcached/libMemcached-1.0.18-GCCcore-12.2.0.eb --robot --allow-modules-tool-mismatch
eb ebfiles_repo/bzip2/bzip2-1.0.8-GCCcore-12.2.0.eb --robot --allow-modules-tool-mismatch
eb ebfiles_repo/ncurses/ncurses-6.3-GCCcore-12.2.0.eb --robot --allow-modules-tool-mismatch
eb ebfiles_repo/libreadline/libreadline-8.2-GCCcore-12.2.0.eb --robot --allow-modules-tool-mismatch
eb ebfiles_repo/Tcl/Tcl-8.6.12-GCCcore-12.2.0.eb --robot --allow-modules-tool-mismatch
eb ebfiles_repo/SQLite/SQLite-3.39.4-GCCcore-12.2.0.eb --robot --allow-modules-tool-mismatch
eb ebfiles_repo/XZ/XZ-5.2.7-GCCcore-12.2.0.eb --robot --allow-modules-tool-mismatch
eb ebfiles_repo/GMP/GMP-6.2.1-GCCcore-12.2.0.eb --robot --allow-modules-tool-mismatch
eb ebfiles_repo/libffi/libffi-3.4.4-GCCcore-12.2.0.eb --robot --allow-modules-tool-mismatch
eb ebfiles_repo/OpenSSL/OpenSSL-1.1.eb --robot --allow-modules-tool-mismatch
eb ebfiles_repo/Python/Python-3.10.8-GCCcore-12.2.0.eb --robot --allow-modules-tool-mismatch
eb ebfiles_repo/PyAL/PyAL-1.4.2-GCCcore-12.2.0.eb --robot --allow-modules-tool-mismatch
eb ebfiles_repo/libyaml/libyaml-0.2.5-GCCcore-12.2.0.eb --robot --allow-modules-tool-mismatch
eb ebfiles_repo/PyYAML/PyYAML-6.0-GCCcore-12.2.0.eb --robot --allow-modules-tool-mismatch
eb ebfiles_repo/libxml2/libxml2-2.10.3-GCCcore-12.2.0.eb --robot --allow-modules-tool-mismatch
eb ebfiles_repo/MDSplus/MDSplus-7.132.0-GCCcore-12.2.0.eb --robot --allow-modules-tool-mismatch
eb ebfiles_repo/numactl/numactl-2.0.16-GCCcore-12.2.0.eb --robot --allow-modules-tool-mismatch
eb ebfiles_repo/libpciaccess/libpciaccess-0.17-GCCcore-12.2.0.eb --robot --allow-modules-tool-mismatch
eb ebfiles_repo/hwloc/hwloc-2.8.0-GCCcore-12.2.0.eb --robot --allow-modules-tool-mismatch
eb ebfiles_repo/libevent/libevent-2.1.12-GCCcore-12.2.0.eb --robot --allow-modules-tool-mismatch
eb ebfiles_repo/UCX/UCX-1.13.1-GCCcore-12.2.0.eb --robot --allow-modules-tool-mismatch
eb ebfiles_repo/libfabric/libfabric-1.16.1-GCCcore-12.2.0.eb --robot --allow-modules-tool-mismatch
eb ebfiles_repo/PMIx/PMIx-4.2.2-GCCcore-12.2.0.eb --robot --allow-modules-tool-mismatch
eb ebfiles_repo/UCC/UCC-1.1.0-GCCcore-12.2.0.eb --robot --allow-modules-tool-mismatch
eb ebfiles_repo/OpenMPI/OpenMPI-4.1.4-GCC-12.2.0.eb --robot --allow-modules-tool-mismatch
eb ebfiles_repo/OpenBLAS/OpenBLAS-0.3.21-GCC-12.2.0.eb --robot --allow-modules-tool-mismatch
eb ebfiles_repo/FlexiBLAS/FlexiBLAS-3.2.1-GCC-12.2.0.eb --robot --allow-modules-tool-mismatch
eb ebfiles_repo/FFTW/FFTW-3.3.10-GCC-12.2.0.eb --robot --allow-modules-tool-mismatch
eb ebfiles_repo/gompi/gompi-2022b.eb --robot --allow-modules-tool-mismatch
eb ebfiles_repo/FFTW.MPI/FFTW.MPI-3.3.10-gompi-2022b.eb --robot --allow-modules-tool-mismatch
eb ebfiles_repo/ScaLAPACK/ScaLAPACK-2.2.0-gompi-2022b-fb.eb --robot --allow-modules-tool-mismatch
eb ebfiles_repo/foss/foss-2022b.eb --robot --allow-modules-tool-mismatch
eb ebfiles_repo/Szip/Szip-2.1.1-GCCcore-12.2.0.eb --robot --allow-modules-tool-mismatch
eb ebfiles_repo/HDF5/HDF5-1.14.0-gompi-2022b.eb --robot --allow-modules-tool-mismatch
eb ebfiles_repo/gfbf/gfbf-2022bpybind11.eb --robot --allow-modules-tool-mismatch
eb ebfiles_repo/SciPy-bundle/SciPy-bundle-2023.02-gfbf-2022b.eb --robot --allow-modules-tool-mismatch
eb ebfiles_repo/libpng/libpng-1.6.38-GCCcore-12.2.0.eb --robot --allow-modules-tool-mismatch
eb ebfiles_repo/Brotli/Brotli-1.0.9-GCCcore-12.2.0.eb --robot --allow-modules-tool-mismatch
eb ebfiles_repo/freetype/freetype-2.12.1-GCCcore-12.2.0.eb --robot --allow-modules-tool-mismatch
eb ebfiles_repo/expat/expat-2.4.9-GCCcore-12.2.0.eb --robot --allow-modules-tool-mismatch
eb ebfiles_repo/util-linux/util-linux-2.38.1-GCCcore-12.2.0.eb --robot --allow-modules-tool-mismatch
eb ebfiles_repo/fontconfig/fontconfig-2.14.1-GCCcore-12.2.0.eb --robot --allow-modules-tool-mismatch
eb ebfiles_repo/xorg-macros/xorg-macros-1.19.3-GCCcore-12.2.0.eb --robot --allow-modules-tool-mismatch
eb ebfiles_repo/X11/X11-20221110-GCCcore-12.2.0.eb --robot --allow-modules-tool-mismatch
eb ebfiles_repo/Tk/Tk-8.6.12-GCCcore-12.2.0.eb --robot --allow-modules-tool-mismatch
eb ebfiles_repo/Tkinter/Tkinter-3.10.8-GCCcore-12.2.0.eb --robot --allow-modules-tool-mismatch
eb ebfiles_repo/NASM/NASM-2.15.05-GCCcore-12.2.0.eb --robot --allow-modules-tool-mismatch
eb ebfiles_repo/libjpeg-turbo/libjpeg-turbo-2.1.4-GCCcore-12.2.0.eb --robot --allow-modules-tool-mismatch
eb ebfiles_repo/jbigkit/jbigkit-2.1-GCCcore-12.2.0.eb --robot --allow-modules-tool-mismatch
eb ebfiles_repo/gzip/gzip-1.12-GCCcore-12.2.0.eb --robot --allow-modules-tool-mismatch
eb ebfiles_repo/lz4/lz4-1.9.4-GCCcore-12.2.0.eb --robot --allow-modules-tool-mismatch
eb ebfiles_repo/zstd/zstd-1.5.2-GCCcore-12.2.0.eb --robot --allow-modules-tool-mismatch
eb ebfiles_repo/libdeflate/libdeflate-1.15-GCCcore-12.2.0.eb --robot --allow-modules-tool-mismatch
eb ebfiles_repo/LibTIFF/LibTIFF-4.4.0-GCCcore-12.2.0.eb --robot --allow-modules-tool-mismatch
eb ebfiles_repo/Pillow/Pillow-9.4.0-GCCcore-12.2.0.eb --robot --allow-modules-tool-mismatch
eb ebfiles_repo/Qhull/Qhull-2020.2-GCCcore-12.2.0.eb --robot --allow-modules-tool-mismatch
eb ebfiles_repo/matplotlib/matplotlib-3.7.0-gfbf-2022b.eb --robot --allow-modules-tool-mismatch
eb ebfiles_repo/IDStools/IDStools-1.14.0-gfbf-2022b.eb --robot --allow-modules-tool-mismatch
eb ebfiles_repo/libtirpc/libtirpc-1.3.3-GCCcore-12.2.0.eb --robot --allow-modules-tool-mismatch
eb ebfiles_repo/ICU/ICU-72.1-GCCcore-12.2.0.eb --robot --allow-modules-tool-mismatch
eb ebfiles_repo/Boost/Boost-1.81.0-GCCcore-12.2.0.eb --robot --allow-modules-tool-mismatch
eb ebfiles_repo/fmt/fmt-9.1.0-GCCcore-12.2.0.eb --robot --allow-modules-tool-mismatch
eb ebfiles_repo/spdlog/spdlog-1.11.0-GCCcore-12.2.0.eb --robot --allow-modules-tool-mismatch
eb ebfiles_repo/CapnProto/CapnProto-0.10.3-GCCcore-12.2.0.eb --robot --allow-modules-tool-mismatch

After installing the packages, the module's path is: prefix/modules/all.

Now we can create a module that will load the necessary packages. It might look like this:

Module imasenv
#%Module
##
##      Modulefile for imasenv
##  Paweł Błoch  2023
##

module-whatis "One IMASENV module to rule them all"


proc ModulesDisplay {} {
}

conflict imasenv

# Add eb modules to MODULEPATH
# chnage path in module use
module use /pfs/work/g2pbloch/imasenv_eb/modules/all/
module load saxon/12.3
module load oneapi/2023
module load Java/11.0.20
module load SciPy-bundle/2023.02-gfbf-2022b
module load Rust/1.65.0-GCCcore-12.2.0
module load zlib/1.2.12-GCCcore-12.2.0
module load jbigkit/2.1-GCCcore-12.2.0
module load libMemcached/1.0.18-GCCcore-12.2.0
module load lz4/1.9.4-GCCcore-12.2.0
module load libarchive/3.6.1-GCCcore-12.2.0
module load Ninja/1.11.1-GCCcore-12.2.0
module load Perl/5.36.0-GCCcore-12.2.0
module load M4/1.4.19-GCCcore-12.2.0
module load ICU/72.1-GCCcore-12.2.0
module load groff/1.22.4-GCCcore-12.2.0
module load Meson/0.64.0-GCCcore-12.2.0
module load gettext/0.21.1-GCCcore-12.2.0
module load Szip/2.1.1-GCCcore-12.2.0
module load libffi/3.4.4-GCCcore-12.2.0
module load Eigen/3.4.0-GCCcore-12.2.0
module load expat/2.4.9-GCCcore-12.2.0
module load Autoconf/2.71-GCCcore-12.2.0
module load XZ/5.2.7-GCCcore-12.2.0
module load cppy/1.2.1-GCCcore-12.2.0
module load X11/20221110-GCCcore-12.2.0
module load CapnProto/0.10.3-GCCcore-12.2.0
module load Bison/3.8.2-GCCcore-12.2.0
module load Autotools/20220317-GCCcore-12.2.0
module load libtirpc/1.3.3-GCCcore-12.2.0
module load LibTIFF/4.4.0-GCCcore-12.2.0
module load gperf/3.1-GCCcore-12.2.0
module load Tcl/8.6.12-GCCcore-12.2.0
module load Tkinter/3.10.8-GCCcore-12.2.0
module load gzip/1.12-GCCcore-12.2.0
module load Blitz++/1.0.2-GCCcore-12.2.0
module load SQLite/3.39.4-GCCcore-12.2.0
module load libreadline/8.2-GCCcore-12.2.0
module load numactl/2.0.16-GCCcore-12.2.0
module load intltool/0.51.0-GCCcore-12.2.0
module load Python/3.10.8-GCCcore-12.2.0
module load help2man/1.49.2-GCCcore-12.2.0
module load flex/2.6.4-GCCcore-12.2.0
module load UCC/1.1.0-GCCcore-12.2.0
module load cURL/7.86.0-GCCcore-12.2.0
module load util-linux/2.38.1-GCCcore-12.2.0
module load libfabric/1.16.1-GCCcore-12.2.0
module load CMake/3.24.3-GCCcore-12.2.0
module load fontconfig/2.14.1-GCCcore-12.2.0
module load HDF5/1.14.0-GCCcore-12.2.0-serial
module load freetype/2.12.1-GCCcore-12.2.0
module load bzip2/1.0.8-GCCcore-12.2.0
module load zstd/1.5.2-GCCcore-12.2.0
module load Automake/1.16.5-GCCcore-12.2.0
module load GMP/6.2.1-GCCcore-12.2.0
module load libtool/2.4.7-GCCcore-12.2.0
module load libjpeg-turbo/2.1.4-GCCcore-12.2.0
module load pybind11/2.10.3-GCCcore-12.2.0
module load xorg-macros/1.19.3-GCCcore-12.2.0
module load binutils/2.39-GCCcore-12.2.0
module load Brotli/1.0.9-GCCcore-12.2.0
module load fmt/9.1.0-GCCcore-12.2.0
module load libpciaccess/0.17-GCCcore-12.2.0
module load Boost/1.81.0-GCCcore-12.2.0
module load make/4.3-GCCcore-12.2.0
module load Pillow/9.4.0-GCCcore-12.2.0
module load UCX/1.13.1-GCCcore-12.2.0
module load PMIx/4.2.2-GCCcore-12.2.0
module load ncurses/6.3-GCCcore-12.2.0
module load libpng/1.6.38-GCCcore-12.2.0
module load libevent/2.1.12-GCCcore-12.2.0
module load hwloc/2.8.0-GCCcore-12.2.0
module load libxml2/2.10.3-GCCcore-12.2.0
module load NASM/2.15.05-GCCcore-12.2.0
module load git/2.38.1-GCCcore-12.2.0-nodocs
module load UnZip/6.0-GCCcore-12.2.0
module load spdlog/1.11.0-GCCcore-12.2.0
module load hypothesis/6.68.2-GCCcore-12.2.0
module load Qhull/2020.2-GCCcore-12.2.0
module load DB/18.1.40-GCCcore-12.2.0
module load Tk/8.6.12-GCCcore-12.2.0
module load libdeflate/1.15-GCCcore-12.2.0
module load pkgconf/1.9.3-GCCcore-12.2.0
module load libyaml/0.2.5-GCCcore-12.2.0
module load MDSplus/7.96.8-GCCcore-12.2.0
module load fundamental-constants/0.1.1
module load Python/3.10.8-GCCcore-12.2.0
#module load IMAS/3.38.1/AL/4.11.0

After installing packages through EasyBuild, we need to install packages that are not available in EasyBuild.

Install Saxon

Remember to change the paths in the modules and add them to the main module.

Saxon
mkdir saxon
cd saxon
wget https://sourceforge.net/projects/saxon/files/Saxon-HE/9.9/SaxonHE9-9-1-5J.zip/download
unzip download
ln -s saxon9-test.jar saxon9he-test.jar
ln -s saxon9-xqj.jar saxon9he-xqj.jar
chmod -R 777 .
Saxon module
#%Module
##
##      Modulefile for saxon
##  Maciej Smukowski 2022
##
set fpath   [file dirname $ModulesCurrentModulefile]
set VERSION [file tail $ModulesCurrentModulefile]
 
module-whatis "Enable the usage of saxon $VERSION.
\tKeywords: math tool matlab"
 
 
proc ModulesDisplay {} {
}
 
conflict saxon
 
set SAXON_HOME  /pfs/work/g2pbloch/spack_gnu_11_oneapi_compilers/saxon
prepend-path SAXON_HOME /pfs/work/g2pbloch/spack_gnu_11_oneapi_compilers/saxon
 
prepend-path    CLASSPATH $SAXON_HOME/saxon9he.jar
prepend-path    CLASSPATH $SAXON_HOME/saxon9-test.jar
prepend-path    CLASSPATH $SAXON_HOME/saxon9-xqj.jar
prepend-path    CLASSPATH $SAXON_HOME/saxon9he-test.jar
prepend-path    CLASSPATH $SAXON_HOME/saxon9he-xqj.jar

Install XMLLIB

Remember to change the paths in the modules and add them to the main module.

XMLLIB
mkdir xmllib
cd xmllib
git clone ssh://git@git.iter.org/lib/xmllib.git 
cd xmllib
git checkout 3.3.1
git clean -f -x -d
./bootstrap
./configure --prefix=/pfs/work/g2pbloch/spack_gnu_11_oneapi_compilers/xmllib FC=ifort CC=icc
make all
make check
make install 
XMLLIB module
#%Module1.0#####################################################################
##
## xmllib modulefile
##
set ver 3.3.1
set name xmllib
set loading [module-info mode load]
set desc "Library to assist parsing of XML data"
proc ModulesHelp { } {
puts stderr "\tThis module sets the environment for $name v$ver"
}
conflict $name




module-whatis "$desc (v$ver)"
set prefix /pfs/work/g2pbloch/spack_gnu_11_oneapi_compilers/xmllib/
set exec_prefix ${prefix}
prepend-path CPATH ${prefix}/include
prepend-path LD_LIBRARY_PATH ${exec_prefix}/lib
prepend-path PKG_CONFIG_PATH ${exec_prefix}/lib/pkgconfig

Prepare Oneapi compiler

Remember to change the paths in the modules and add them to the main module.

Oneapi
wget https://registrationcenter-download.intel.com/akdlm/IRC_NAS/1ff1b38a-8218-4c53-9956-f0b264de35a4/l_HPCKit_p_2023.1.0.46346.sh
./l_HPCKit_p_2023.1.0.46346.sh
Select all components
Skip IDe
install

IMAS installation

3.39.1_4.11.8.sh
export TAG_DD=3.39.0

export TAG_AL=4.11.8
# make sure these branches exist

export VER_DD=$TAG_DD
export VER_AL=$TAG_AL
export IMAS_VERSION=$TAG_DD
export UAL_VERSION=$TAG_AL
export MODULE_FULL_VERSION=$VER_DD/AL/$VER_AL


export IMAS_HOME=/pfs/work/g2pbloch/imasenv_eb/tmp_IMAS/

export IMAS_UDA=fat
export IMAS_HDC=no

export IMAS_CPP=yes

export IMAS_FORTRAN=yes
export IMAS_G95=no
export IMAS_PGI=no
export IMAS_IFORT=yes
export IMAS_GFORTRAN=no
export IMAS_NAGFOR=no

export IMAS_JAVA=yes

export IMAS_MATLAB=no
export IMAS_PYTHON=yes
export IMAS_PYTHON2=no
export IMAS_PYTHON3=yes


# After Installation Environment
#eval `./tools/imasdb.in test`

export UAL=$(realpath ./src/$IMAS_VERSION/ual/$UAL_VERSION)
export MY_INSTALL=$IMAS_HOME/core/IMAS/${VER_DD}/AL/${VER_AL}
export IMAS_INSTALL_DIR=$MY_INSTALL
export PYTHONPATH=$MY_INSTALL/python/lib/:$PYTHONPATH
export CLASSPATH=$UAL/javainterface/build/:$CLASSPATH
export IMAS_PREFIX=$MY_INSTALL/
export ids_path="$MDSPLUS_TREE_BASE_0;$MY_INSTALL/models/mdsplus/;$ids_path"
export LD_LIBRARY_PATH=$MY_INSTALL/lib:$LD_LIBRARY_PATH
export TOKAMAKNAME=test
export DATAVERSION=3



Imas installation
git clone ssh://git@git.iter.org/imas/installer.git -b develop imas-installer
cd imas-installer
chmod -R 777 .
source 3.39.1_4.11.8.sh
make cache

edit src/3.37.0/ual/4.11.0/Makefile.common:

edit C++ compiler
line 105 : CC ?= gcc
line 106  : CXX ?= g++

continue installation 

Imas installation
make help
make install

After the IMAS installation is complete, add the IMAS module to the main module file.


  • No labels