#!/bin/bash set -ex # need options " # e.g.: ./install_parmetis.sh parmetis-4.0.3 4.0.3 # gnu 5.2.0 openmpi 1.10.1 TARFILE="$1.tar.gz" PARMETIS_VERSION=$2 COMPILER=$3 COMPILER_VERSION=$4 MPI=$5 MPI_VERSION=$6 INSTDIR="/opt/numlib/parmetis/$PARMETIS_VERSION-$MPI-$MPI_VERSION-$COMPILER-$COMPILER_VERSION" MODULEDIR="/opt/numlib/parmetis/modulefiles" MODULEFILE="$PARMETIS_VERSION-$MPI-$MPI_VERSION-$COMPILER-$COMPILER_VERSION" SRC_POOL="/lustre/nec/ws2/ws/hpcoftet-parmetis_install-0" WORKDIR_BASE="$SRC_POOL/$1" if [ ! -e "$SRC_POOL" ]; then ws_allocate parmetis_install 5 fi SIT_DIR="/zhome/academic/HLRS/hlrs/hpcoftet/sit3/sit/trunk/install_scripts" mv $TARFILE $SRC_POOL cd "$SIT_DIR" #configure and install with sit SRC_POOL=$SRC_POOL WORKDIR_BASE=$WORKDIR_BASE PREFIX_BASE=/opt COMPILER=$COMPILER COMPILER_VERSION=$COMPILER_VERSION MPI=$MPI MPI_VERSION=$MPI_VERSION ./sit numlib/parmetis/$PARMETIS_VERSION #*************************** modulefile ****************************** cd "$MODULEDIR" cat >"$MODULEFILE" <