Commit 23d0ea4c authored by Matthieu Boileau's avatar Matthieu Boileau
Browse files

Add schnaps.profile

parent 0b15a11d
Loading
Loading
Loading
Loading
+0 −0

File moved.

+0 −0

File moved.

+0 −0

File moved.

schnaps/install.sh

0 → 100755
+33 −0
Original line number Diff line number Diff line
#!/bin/bash

set -x 
LIB_NAME="schnaps.profile"
GCC_VERSION=6.4.0
MPI_LIB=openmpi
MPI_VERSION=1.10.7

GCC_FULL=gcc-$GCC_VERSION
GCC_SHORT="gcc${GCC_VERSION//.}"
MPI_FULL=${MPI_LIB}-${MPI_VERSION}
MPI_SHORT="${MPI_LIB}${MPI_VERSION//.}"
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
MODULE_DIR=/data/software/modules/profiles
MODULE_PATH=${MODULE_DIR}/${LIB_NAME}

install_module()
{
cd $SCRIPT_DIR
mkdir -p ${MODULE_DIR}

export GCC_VERSION
export GCC_SHORT
export MPI_LIB
export MPI_SHORT
export MPI_VERSION
export LIB_NAME

envtpl  --keep-template -o $MODULE_PATH module.tmpl
}

install_module

schnaps/module.tmpl

0 → 100644
+26 −0
Original line number Diff line number Diff line
#%Module1.0################
##
## {{ LIB_NAME }}

proc ModulesHelp { } {

    puts stderr "Load all necessary modules for compiling schnaps code\n\
using libraries based on gcc/{{ GCC_VERSION }} and {{ MPI_LIB }}/{{ MPI_VERSION }}_{{ GCC_SHORT }}"
}


if [module-info mode load]  {
    module load gcc/{{ GCC_VERSION }}
    module load {{ MPI_LIB }}/{{ MPI_VERSION }}_{{ GCC_SHORT }}
    module load AMD-APP-SDK/3.0.130.136
    module load starpu/21055_{{ GCC_SHORT }}_{{ MPI_SHORT }}
    module load hdf5/1.10.1_{{ GCC_SHORT }}_{{ MPI_SHORT }}
}

if [module-info mode remove] {
    module unload gcc/{{ GCC_VERSION }}
    module unload {{ MPI_LIB }}/{{ MPI_VERSION }}_{{ GCC_SHORT }}
    module unload AMD-APP-SDK/3.0.130.136
    module unload starpu/21055_{{ GCC_SHORT }}_{{ MPI_SHORT }}
    module unload hdf5/1.10.1_{{ GCC_SHORT }}_{{ MPI_SHORT }}
}