Indention

This commit is contained in:
Christoph Niethammer 2011-11-30 21:55:01 +00:00
parent 7a016f033a
commit 4f966b0e06

92
sit
View file

@ -17,20 +17,20 @@ if [[ -e $SIT_CONFIG_FILE ]] ; then
fi
source "$SIT_PATH/functions.sh"
if [ -z $PLATFORM ]; then
# identify platform manually if no environment variable was set
case $HOSTNAME in
cl3fr1|cl3fr2|imager)
PLATFORM="laki"
;;
eslogin*)
PLATFORM="hermit1"
;;
*)
sit_info "Unknown host '$HOSTNAME' using default platform '${DEFAULT_PLATFORM}' configuration"
PLATFORM="${DEFAULT_PLATFORM}"
;;
esac
if [ -z $PLATFORM ]; then
case $HOSTNAME in
cl3fr1|cl3fr2|imager)
PLATFORM="laki"
;;
eslogin*)
PLATFORM="hermit1"
;;
*)
sit_info "Unknown host '$HOSTNAME' using default platform '${DEFAULT_PLATFORM}' configuration"
PLATFORM="${DEFAULT_PLATFORM}"
;;
esac
fi
sit_info "Platform: $PLATFORM"
@ -56,48 +56,48 @@ fi
case $PLATFORM in
hermit)
if [ "$COMPILER" == "system" ] ; then
echo "Using system default compiler"
COMPILER="" # prevent any compiler specs in the prefix
else
module swap $(module list -l 2>&1 | awk '/^PrgEnv-/{print $1}') PrgEnv-${COMPILER}
if [ ! -z "$COMPILER_VERSION" ] ; then
if [ "${COMPILER}" == "gnu" ] ; then
module swap gcc gcc/$COMPILER_VERSION
else
module swap $COMPILER $COMPILER/$COMPILER_VERSION
fi
fi
fi
;;
laki|*)
if [ "$COMPILER" == "system" ] ; then
echo "Using system default compiler"
COMPILER="" # prevent any compiler specs in the prefix
else
if [ -z "$COMPILER_VERSION" ] ; then
COMPILER_MODULE=compiler/${COMPILER}
else
COMPILER_MODULE=compiler/${COMPILER}/${COMPILER_VERSION}
fi
echo "Loading compiler module ${COMPILER_MODULE}"
module load ${COMPILER_MODULE}
fi
;;
hermit)
if [ "$COMPILER" == "system" ] ; then
echo "Using system default compiler"
COMPILER="" # prevent any compiler specs in the prefix
else
module swap $(module list -l 2>&1 | awk '/^PrgEnv-/{print $1}') PrgEnv-${COMPILER}
if [ ! -z "$COMPILER_VERSION" ] ; then
if [ "${COMPILER}" == "gnu" ] ; then
module swap gcc gcc/$COMPILER_VERSION
else
module swap $COMPILER $COMPILER/$COMPILER_VERSION
fi
fi
fi
;;
laki|*)
if [ "$COMPILER" == "system" ] ; then
echo "Using system default compiler"
COMPILER="" # prevent any compiler specs in the prefix
else
if [ -z "$COMPILER_VERSION" ] ; then
COMPILER_MODULE=compiler/${COMPILER}
else
COMPILER_MODULE=compiler/${COMPILER}/${COMPILER_VERSION}
fi
echo "Loading compiler module ${COMPILER_MODULE}"
module load ${COMPILER_MODULE}
fi
;;
esac
if [ ! -z "${COMPILER}" ] ; then
# reevaluate compiler version
COMPILER_VERSION=$(eval "$COMPILER_VERSION_CMD")
# reevaluate compiler version
COMPILER_VERSION=$(eval "$COMPILER_VERSION_CMD")
fi
# make the compiler variables CC, CXX, FC and F77 available
if [ ! -z "$COMPILER_OPTS" ] ; then
echo "Compiler env: ${COMPILER_OPTS}"
echo "Compiler env: ${COMPILER_OPTS}"
export ${COMPILER_OPTS}
fi
if [ ! -z $COMPILER ] ; then
echo "Using compiler: $COMPILER version: $COMPILER_VERSION"
echo "Using compiler: $COMPILER version: $COMPILER_VERSION"
fi
if [ ! -z "$MPI" ] ; then