-
Notifications
You must be signed in to change notification settings - Fork 5
/
setup-rocky8.sh
46 lines (33 loc) · 1.46 KB
/
setup-rocky8.sh
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
42
43
44
45
46
#--- basic config -- adjust as needed
#the location of production fasrcsw clone
test -z "$FASRCSW_PROD" && export FASRCSW_PROD=/n/sw/helmod-rocky8
test -z "$LMOD_PREFIX" && export LMOD_PREFIX=${FASRCSW_PROD}/apps/lmod
#default compilers and mpi stacks
#update these as versions increase.
#this assumes each FASRCSW_MPIS has been built with each FASRCSW_COMPS
#export FASRCSW_COMPS="gcc/9.5.0-fasrc01"
#export FASRCSW_MPIS="openmpi/4.1.0-fasrc01"
export FASRCSW_COMPS="gcc/13.2.0-fasrc01"
export FASRCSW_MPIS="intelmpi/2021.10.0-fasrc01"
#the build host
export FASRCSW_BUILD_HOST_01=builds01
if [ "$(hostname -s)" != "$FASRCSW_BUILD_HOST_01" ] && [ "$(hostname -s)" != "$FASRCSW_BUILD_HOST_02" ]; then
echo "WARNING: the current host is not the canonical build host for Rocky 8, use builds01." >&2
fi
#rpm packager credits
export FASRCSW_AUTHOR="$(getent passwd $USER | cut -d: -f5), Harvard FAS Research Computing <[email protected]>"
#--- environment setup
#set the location of this clone
if [ -z "$BASH_SOURCE" ]; then
echo "*** ERROR *** your bash is too old -- there's no BASH_SOURCE in the environment" >&2
return 1
fi
export FASRCSW_DEV="$(dirname "$(readlink -e "$BASH_SOURCE")")" #(the abs path of the dir containing this setup.sh)
export PATH="$FASRCSW_DEV/bin:$PATH"
#create build directories
if [ ! -d "$FASRCSW_DEV"/rpmbuild/BUILD ]; then
mkdir "$FASRCSW_DEV"/rpmbuild/BUILD
fi
if [ ! -d "$FASRCSW_DEV"/appdata ]; then
mkdir "$FASRCSW_DEV"/appdata
fi