-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy path.common_setup
42 lines (34 loc) · 1.27 KB
/
.common_setup
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/bin/bash
# Source this file to:
# - set some environment variables
if [[ $# -eq 0 ]] ; then
echo "Usage: . ./.common_setup compiler_suite"
echo "Example: . ./.common_setup gnu"
echo "Example: . ./.common_setup intel"
else
export OMP_STACKSIZE=4G
unset GEM_ARCH GEM_WORK GEM_DIR GEM_GIT_DIR
COMPILER_SUITE=${1}
platform=$(project/os.sh)
if [ -z ${COMPILER_VERSION} ] || [ "${COMPILER_VERSION}" == "Unknown_Compiler" ] ; then
COMPILER_VERSION=$(project/compiler.sh ${COMPILER_SUITE})
fi
export COMPILER_VERSION
if [ -n "${platform}" -a "${COMPILER_VERSION}" != "Unknown_Compiler" ]; then
export GEM_ARCH=${platform}-${COMPILER_SUITE}-${COMPILER_VERSION}
export GEM_WORK=work-${GEM_ARCH}
if [ -n "${storage_model}" ] ; then
DIR=$(echo $(basename $(dirname $PWD))/$(basename $PWD))
GEM_DIR=${storage_model}/goas/${DIR}/${GEM_ARCH}
else
GEM_DIR=${PWD}
fi
export GEM_DIR
export GEM_GIT_DIR=$PWD
export ATM_MODEL_DFILES=${GEM_GIT_DIR}/gem_dbase
export AFSISIO=${ATM_MODEL_DFILES}
export PATH=${PWD}/scripts:${PWD}/${GEM_WORK}/bin:${PATH}
export TMPDIR=${TMPDIR-$(mktemp -d /tmp/$USER-XXXX)}
fi
fi
unset platform