...
Logging into the
Marconi
:Code Block ssh <USER_NAME>@login.marconi.cineca.it
Change location to
$WORK
directory, which should point to/marconi_work/FUSIO_HLST
:Code Block $: cd $WORK $: pwd /marconi_work/FUSIO_HLST
Load GCC 7.3.0 and then INTEL 2020:
Code Block $: module load gnu/7.3.0 $: module load intel/pe-xe-2020--binary
Prepare directories:
Code Block $: mkdir -p IMAS_software/{cache,libs,modules,spack,stage}-{gcc,intel} $: mkdir -p IMAS_software/cache-{gcc,intel}/{cache,var,test} $: tree IMAS_software/ IMAS_software/ ├── cache-gcc │ ├── cache │ ├── test │ └── var ├── cache-intel │ ├── cache │ ├── test │ └── var ├── libs-gcc ├── libs-intel ├── modules-gcc ├── modules-intel ├── spack-gcc ├── spack-intel ├── stage-gcc └── stage-intel
Go into
IMAS_software
directory:Code Block cd IMAS_software
Clone spack repository to
spack-intel
:Code Block git clone https://github.com/spack/spack.git spack-intel
Go into
spack-intel
directory:Code Block cd spack-intel
Checkout desired version of
spack
:Code Block git checkout v0.19.0
Set-up
spack
configuration:Go to directory where default configuration files are stored (assuming you're still inside spack-intel repository):
Code Block cd etc/spack/defaults/
Edit
config.yaml
:Code Block vim config.yaml
You need to change the root of the install_tree, projections for all, build_stage dir, test_stage dir, source_cache dir and misc_cache dir.
Example:root
of theinstall_tree
:Code Block config: # This is the path to the root of the Spack install tree. # You can use $spack here to refer to the root of the spack instance. install_tree: root: /marconi_work/FUSIO_HLST/IMAS_software/libs-intel
projections
:Code Block projections: all: "${PACKAGE}/${VERSION}/${COMPILERNAME}/${COMPILERVER}/${HASH}"
build_stage
:Code Block build_stage: - /marconi_work/FUSIO_HLST/IMAS_software/stage-intel
test_stage
:Code Block test_stage: /marconi_work/FUSIO_HLST/IMAS_software/cache-intel/test
source_cache
:Code Block source_cache: /marconi_work/FUSIO_HLST/IMAS_software/cache-intel/var/cache
misc_cache
:Code Block misc_cache: /marconi_work/FUSIO_HLST/IMAS_software/cache-intel/cache
Edit
modules.yaml
:Code Block vim modules.yaml
Change the roots for the tcl modules:
Example:
Code Block # These are configurations for the module set named "default" default: # Where to install modules roots: tcl: /marconi_work/FUSIO_HLST/IMAS_software/modules-intel
Edit
linux/modules.yaml
:Code Block vim linux/modules.yaml
Here you have to fill the whole body just to set the module structure projections:
Code Block modules: default: arch_folder: false tcl: projections: all: '{name}/{version}/{compiler.name}/{compiler.version}/sha' prefix_inspections: lib: - LD_LIBRARY_PATH lib64: - LD_LIBRARY_PATH
Change the directory to the top of the
spack
repository:Code Block cd ../../../
Source
spack
:Code Block source share/spack/setup-env.sh
Check the
spack
version - should be0.19.0
:Code Block spack --version
Install
Lapack
:Code Block spack install netlib-lapack %intel@19.1.3.304 cflags="-fPIC" cxxflags="-fPIC" cppflags="-fPIC"
Install
Blas
:Code Block spack install -j 1 netlib-xblas %intel@19.1.3.304 cflags="-fPIC" cxxflags="-fPIC" cppflags="-fPIC"
Install
Python
withtkinter
support:Code Block spack install python +tkinter %intel@19.1.3.304 cflags="-fPIC" cxxflags="-fPIC" cppflags="-fPIC"
Install
py-scipy
:Code Block spack install --fail-fast py-scipy %intel@19.1.3.304 cflags="-fPIC" cxxflags="-fPIC" cppflags="-fPIC"
Install
py-matplotlib
:Code Block spack install --fail-fast py-matplotlib backend=tkagg %intel@19.1.3.304 cflags="-fPIC" cxxflags="-fPIC" cppflags="-fPIC"
Install
py-pyyaml
:Code Block spack install --fail-fast py-pyyaml %intel@19.1.3.304 cflags="-fPIC" cxxflags="-fPIC" cppflags="-fPIC"
Install
hdf5
:Code Block spack install --fail-fast hdf5@1.12.2 %intel@19.1.3.304 +threadsafe +cxx +fortran cflags="'-fPIC -pthread'" cxxflags="'-fPIC -pthread'" cppflags="'-fPIC -pthread'"
Install
boost
:Code Block spack install --fail-fast boost %intel@19.1.3.304 +python +numpy cflags="'-fPIC -pthread'" cxxflags="'-fPIC -pthread'" cppflags="'-fPIC -pthread'"
Install
blitz
:Code Block spack install --fail-fast blitz@1.0.1 %intel@19.1.3.304 cflags="'-fPIC -pthread'" cxxflags="'-fPIC -pthread'" cppflags="'-fPIC -pthread'"
Install
mdsplus
:Code Block spack install --fail-fast mdsplus %intel@19.1.3.304 cflags="-fPIC" cxxflags="-fPIC" cppflags="-fPIC"
Download
Saxon
:
- it's required byIMAS
, butSpack
is missing proper recipeCode Block $: mkdir -p libs-intel/saxon $: cd libs-intel/saxon $: wget https://sourceforge.net/projects/saxon/files/Saxon-HE/9.9/SaxonHE9-9-1-5J.zip/download $: unzip download
Create two softlinks:
Code Block $: ln -s saxon9-test.jar saxon9he-test.jar $: ln -s saxon9-xqj.jar saxon9he-xqj.jar
And set the saxon files available:
Code Block chmod -R 777 .
Prepare
Saxon
module:Code Block $: cd ../../ $: mkdir -p modules-intel/saxon $: vim modules-intel/saxon/9.9
And fill the created module with below content:
Code Block #%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 /marconi_work/FUSIO_HLST/IMAS_software/libs-intel/saxon prepend-path SAXON_HOME /marconi_work/FUSIO_HLST/IMAS_software/libs-intel/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
Prepare
spack-imasenv
module prototype:Code Block $: mkdir -p modules/spack-imasenv/3.37.0/intel $: vim modules/spack-imasenv/3.37.0/intel/19.1.3.304
And fill the created module with below content:
Code Block #%Module ## ## Modulefile for imasenv ## Maciej Smukowski 2022 ## module-whatis "One IMASENV module to rule them all" proc ModulesDisplay {} { } conflict imasenv # Add spack modules to MODULEPATH module use /marconi_work/FUSIO_HLST/IMAS_software/modules-gcc module use /marconi_work/FUSIO_HLST/IMAS_software/modules-intel module load gnu/7.3.0 module load intel/pe-xe-2020--binary module load intelmpi/2020--binary module load cmake/3.25.0/gcc/7.3.0/sha-a4xv7cs module load pkgconf/1.8.0/intel/19.1.3.304/sha-fbevp5q module load netlib-lapack/3.10.1/intel/19.1.3.304/sha-g4e3xak module load netlib-xblas/1.0.248/intel/19.1.3.304/sha-zp4t7zq module load python/3.10.8/intel/19.1.3.304/sha-ufy2r2o module load py-pip/22.2.2/intel/19.1.3.304/sha-ksiszmp module load py-setuptools/59.4.0/intel/19.1.3.304/sha-p6m2okz module load py-wheel/0.37.1/intel/19.1.3.304/sha-h5qnby4 module load py-cython/0.29.32/intel/19.1.3.304/sha-ekt45in module load py-pyyaml/6.0/intel/19.1.3.304/sha-e7pj6rd module load py-numpy/1.22.4/intel/19.1.3.304/sha-vtkr2zd module load py-scipy/1.8.1/intel/19.1.3.304/sha-j7sstl3 module load py-matplotlib/3.6.2/intel/19.1.3.304/sha-wbwigpl module load hdf5/1.12.2/intel/19.1.3.304/sha-lpavud5 module load openjdk/11.0.17_8/intel/19.1.3.304/sha-nwh5yaq module load git module load blitz/1.0.1/intel/19.1.3.304/sha-gpct7uz module load boost/1.80.0/intel/19.1.3.304/sha-6erl3nf module load mdsplus/stable_release-7-96-17/intel/19.1.3.304/sha-jiasz6w module load libxml2/2.10.1/intel/19.1.3.304/sha-3te5l7z
DISCLAIMER!: If you're doing your spack installation from scratch be cautious about module names. The pattern is
"sha-{hash}"
, wherehash
is generated during installation, therefore your hashes will be different than mine.Load
spack-imasenv
module:Code Block $: module use /marconi_work/FUSIO_HLST/IMAS_software/modules $: module load spack-imasenv/3.37.0/intel/19.1.3.304
Load
Saxon
module:Code Block module load saxon/9.9
Clone
IMAS Installer
:Code Block git clone ssh://git@git.iter.org/imas/installer.git imas-installer-intel
for convenience, let's loosen the read and write permissions for all files:
Code Block chmod -R 777 .
The top directory should look somewhat like this:
Code Block drwxrwxrwx 6 interactive 4096 Dec 7 14:00 cache-gcc drwxrwxrwx 4 interactive 4096 Dec 10 16:45 cache-intel drwxrwxrwx 10 interactive 4096 Dec 8 15:42 imas-installer-gcc drwxrwxrwx 7 interactive 4096 Dec 11 22:43 imas-installer-intel drwxrwxrwx 135 interactive 32768 Dec 10 16:28 libs-gcc drwxrwxrwx 118 interactive 32768 Dec 11 22:29 libs-intel drwxrwxrwx 3 interactive 4096 Dec 8 11:45 modules drwxrwxrwx 132 interactive 32768 Dec 10 16:28 modules-gcc drwxrwxrwx 124 interactive 32768 Dec 11 22:30 modules-intel drwxrwxrwx 9 interactive 4096 Dec 7 23:44 spack-gcc drwxr-xr-x 9 interactive 4096 Dec 10 16:38 spack-intel drwxrwxrwx 3 interactive 4096 Dec 7 14:31 stage-gcc drwxrwxrwx 3 interactive 4096 Dec 10 16:44 stage-intel
Create
IMAS
configuration script:Code Block vim imas-installer-intel/3.37.0_4.11.0.sh
and fill it with below content:
Code Block export TAG_DD=3.37.0 export TAG_AL=4.11.0 # 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=/marconi_work/FUSIO_HLST/IMAS_software/libs-intel/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
Note that there are at least 3 places that should be customized:
- export TAG_DD=<desired_data_dictionary_tag>
- export TAG_AL=<desired_access_layer_tag>
- export IMAS_HOME=<your_IMAS_HOME_path>
Go inside
imas-installer-intel
directory:Code Block cd imas-installer-intel
Source
IMAS
configuration script:Code Block source 3.37.0_4.11.0.sh
Download build files:
Code Block make cache
Edit
Makefile.common
file to not use GNU compilers by default:Code Block src/3.37.0/ual/4.11.0/Makefile.common
Line 105 change to:
Code Block CC ?= gcc
Line 106 change to:
Code Block CXX ?= g++
Check if everything is set-up correctly:
Code Block make help
Build and install
IMAS
:Code Block make install
Caution!
During IMAS installation under INTEL-2020 compiler you may encounter following error:Code Block #error Blitz is configured with --enable-threadsafe, but no compiler thread support is found. Did you forget, e.g., "--pthread"?
Issue description: Known issues - Intel 2020#BLITZandmissing-pthreadflag
FIX:Edit
Blitz
pkgconfig:Code Block vim /marconi_work/FUSIO_HLST/IMAS_software/libs-intel/blitz/1.0.1/intel/19.1.3.304/gpct7uzeeiprapilq7oygmwdthhvcw24/lib/pkgconfig/blitz.pc
Set 12 line to use
pthread
Cflag:Code Block Cflags: -I${includedir} -pthread
Leave the
imas-installer-intel
directory:Code Block cd ..
Extend
spack-imasenv
modulefile:Code Block vim modules/spack-imasenv/3.37.0/intel/19.1.3.304
Add path to
IMAS
module:Code Block module use /marconi_work/FUSIO_HLST/IMAS_software/libs-intel/IMAS/etc/modulefiles
Add loading of the
IMAS
module:Code Block module load IMAS/3.37.0/AL/4.11.0
Final
spack-imasenv
module:Code Block #%Module ## ## Modulefile for imasenv ## Maciej Smukowski 2022 ## module-whatis "One IMASENV module to rule them all" proc ModulesDisplay {} { } conflict imasenv # Add spack modules to MODULEPATH module use /marconi_work/FUSIO_HLST/IMAS_software/modules-gcc module use /marconi_work/FUSIO_HLST/IMAS_software/modules-intel module use /marconi_work/FUSIO_HLST/IMAS_software/libs-intel/IMAS/etc/modulefiles module load gnu/7.3.0 module load intel/pe-xe-2020--binary module load intelmpi/2020--binary module load cmake/3.25.0/gcc/7.3.0/sha-a4xv7cs module load pkgconf/1.8.0/gccintel/719.1.3.0304/sha-haasdgyfbevp5q module load netlib-lapack/3.10.1/gccintel/719.1.3.0304/sha-qyarwjwg4e3xak module load netlib-xblas/1.0.248/gccintel/719.1.3.0304/sha-7hrl4sfzp4t7zq module load python/3.10.8/gccintel/719.1.3.0304/sha-ns7dn4vufy2r2o module load py-pip/22.2.2/gccintel/719.1.3.0304/sha-a3eh27lksiszmp module load py-setuptools/59.4.0/gccintel/719.1.3.0304/sha-6ufe5bhp6m2okz module load py-wheel/0.37.1/gccintel/719.1.3.0304/sha-lw533jdh5qnby4 module load py-cython/0.29.32/gccintel/719.1.3.0304/sha-ucdjw62ekt45in module load py-pyyaml/6.0/gccintel/719.1.3.0304/sha-s7dm72xe7pj6rd module load py-numpy/1.2322.4/gccintel/719.1.3.0304/sha-c5ljmasvtkr2zd module load py-scipy/1.8.1/gccintel/719.1.3.0304/sha-c5puafqj7sstl3 module load py-matplotlib/3.6.2/gccintel/719.1.3.0304/sha-2sxsclnwbwigpl module load hdf5/1.12.2/gccintel/719.1.3.0304/sha-hxkrksxlpavud5 module load openjdk/11.0.17_8/gccintel/719.1.3.0304/sha-impa6zhnwh5yaq module load git module load blitz/1.0.1/gccintel/719.1.3.0304/sha-5jpnc3rgpct7uz module load boost/1.80.0/gccintel/719.1.3.0304/sha-nwvpbv46erl3nf module load mdsplus/stable_release-7-96-17/gccintel/719.1.3.0304/sha-zwraez5jiasz6w module load libxml2/2.10.31/gccintel/719.1.3.0304/sha-p5tucjm3te5l7z module load IMAS/3.37.0/AL/4.11.0
...