===== UIBK-style software installation in a user directory =====
this can be used to produce software installation scripts and own module files on VSC-3.
* create directories for software sources, installation, logfiles and configuration. This can be put to totally different places, but we recommend to start from a common base path:
export my_usif_path=${HOME}/usif
mkdir -p $my_usif_path/src
mkdir -p $my_usif_path/sw
mkdir -p $my_usif_path/Modules
mkdir -p $my_usif_path/logs
mkdir -p $my_usif_path/conf
mkdir -p $my_usif_path/install_scripts
* create a config file:
echo "HPC_SRC_PATH=$my_usif_path/src
HPC_LOG_PATH=$my_usif_path/logs
HPC_SW_PATH=$my_usif_path/sw
HPC_SYSTEM=vsc3
unset ARCH_DIR" > $my_usif_path/conf/site.conf
* set USIF_SITE_CONFIG (append maybe to .bashrc):
echo "export USIF_SITE_CONFIG=$my_usif_path/conf/site.conf" >> $HOME/.bashrc
* Create an install script, eg. for gnuplot:
echo '#!/bin/bash
source $VSC_USIF_INCLUDE
set_compiler_single
VERSION=5.0.5
EXTRACT_DIR=gnuplot-$VERSION
SRC=(${EXTRACT_DIR}.tar.gz)
prepare
do_cmd tar zxf ${SRC[0]}
do_cmd cd $EXTRACT_DIR
do_cmd ./configure --prefix=$INSTALL_DIR
do_cmd make -j 4
do_cmd make install
footer ' >> $my_usif_path/install_scripts/gnuplot-5.0.5.sh
* Prepare source directory:
mkdir -p $my_usif_path/src/gnuplot/5.0.5
* Download .tar.gz from https://sourceforge.net/projects/gnuplot/files/gnuplot/5.0.5/gnuplot-5.0.5.tar.gz/download and save iit to $my_usif_path/src/gnuplot/5.0.5/gnuplot-5.0.5.tar.gz
* Start the installation with:
source ~/.bashrc
source /cm/shared/USIF/scripts/init_usif1.1_umea.sh
cd $my_usif_path/install_scripts
/cm/shared/USIF/scripts/vsc_install.sh -c gcc/5.3 -s gnuplot-5.0.5.sh
==== Own Module Files ====
* Prepend to MODULEPATH:
export MODULEPATH=$my_usif_path/Modules:$MODULEPATH
* Create Module file, check if 'inst_base' is set correctly:
mkdir -p $my_usif_path/Modules/gnuplot
echo '#%Module######################################################################
##
source $env(UMEA_INCLUDE)/vsc_include.tcl
source $env(UMEA_INCLUDE)/common_include.tcl
source $env(UMEA_INCLUDE)/prereq_include.tcl
set inst_base $env(HOME)/usif/sw
set verbosity 0
set_versions
set base_path [ load_unload ]
set_paths $base_path $module_name
set_version_number 2
' > $my_usif_path/Modules/gnuplot/5.0.5
* load the module, and check output for loading directory (this work now, as we have set MODULEPATH previously):
module load gcc/5.3 gnuplot/5.0.5
* explicit loading:
module load $my_usif_path/Modules/gnuplot/5.0.5
module load gcc/5.3 /home/lv60000/markus/usif/Modules/gnuplot/5.0.5