Skip to content

Loading prerequesites

Julius edited this page Mar 11, 2024 · 6 revisions

In order to build successfully, the compiler needs access to all available package locations at any time. Here is a list ensuring all environment variables are set and loaded. Make sure to adapt every [insert] by the appropriate location.

# BLAS AND LAPACK
export WABBIT_BLAS_ROOT=[insert]
export WABBIT_LAPACK_ROOT=[insert]
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${WABBIT_BLAS_ROOT}:${WABBIT_LAPACK_ROOT}

# OpenMPI
export WABBIT_OPENMPI_INSTALL=[insert]
export PATH=${PATH}:${WABBIT_OPENMPI_INSTALL}/bin
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${WABBIT_OPENMPI_INSTALL}/lib:${WABBIT_OPENMPI_INSTALL}/lib64

# HDF5
export HDF_ROOT=[insert]
export HDF_SOURCE=${HDF_ROOT}/..  # if configured with $PWD/install
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${HDF_ROOT}/lib:${HDF_ROOT}/lib64
LD_RUN_PATH=${LD_LIBRARY_PATH}

# WABBIT Python Tools
export WABBIT_PT_ROOT=[insert]
export PATH=${PATH}:${WABBIT_PT_ROOT}

Loading prerequisites using modules

Environment Modules is a package to quickly load and unload libraries. Following a short description to set up modules and the necessary modulefiles in order to setup a working implementation for WABBIT.

Compile modules from source

Modules depends on TCL which we will need to build first. Download TCL from source, then unpack it and change into the folder unix, then run:

./configure --prefix=$PWD/../install
make -j8
make -j8 install
cd ../install
ln -s ./bin/tclsh* ./bin/tclsh
export TCL_INSTALL=$PWD

Now modules can be downloaded from source, unpacked and installed with:

./configure --prefix=$PWD/install --with-tclsh=$TCL_INSTALL/bin/tclsh
make -j8
make -j8 install

At last, in order to load modules on startup we need to add the following lines to the .bashrc-file. Ensure to change [insert] to the correct paths.

TCL_INSTALL=[insert]
Modules_SRC=[insert]
export PATH=${PATH}:${TCL_INSTALL}/bin
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${TCL_INSTALL}/lib:${TCL_INSTALL}/lib64
source ${Modules_INSTALL}/init/bash

Now, modulefiles can be inserted into the folder in the modules installation. It should be visible when running module avail with the example modules listed. These can be removed and others inserted.

Examples for all modules following soon

Clone this wiki locally