forked from NOAA-GSL/rrfs_utl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.rrfs_utl
executable file
·51 lines (39 loc) · 1.03 KB
/
build.rrfs_utl
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
47
48
49
50
51
#!/bin/sh
#
dir_root=$(pwd)
################# Hera ####################
if [[ "`grep -i "hera" /etc/hosts | head -n1`" != "" ]] ; then
source /etc/profile.d/modules.sh
platform=hera
################# Jet ####################
elif [[ -d /jetmon ]] ; then
source /etc/profile.d/modules.sh
platform=jet
################# Cheyenne ####################
elif [[ -d /glade ]] ; then
source /etc/profile.d/modules.sh
platform=cheyenne
################# Orion ####################
elif [[ -d /work/noaa ]] ; then ### orion
platform=orion
################# Generic ####################
else
echo -e "\nunknown machine"
exit 9
fi
if [ ! -f $modulefile ]; then
echo "modulefiles $modulefile does not exist"
exit 10
fi
#source $modulefile
set -x
cd ${dir_root}/../..
module use env
source env/build_${platform}_intel.env
build_root=${dir_root}/build
mkdir -p ${build_root}
cd ${build_root}
cmake .. -DCMAKE_INSTALL_PREFIX=. -Dncdiag_ROOT=../../.. -Dgsi_ROOT=../../..
make VERBOSE=1 -j 8
make install
exit