This repository has been archived by the owner on May 21, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild_stack.sh
executable file
·72 lines (48 loc) · 2.33 KB
/
build_stack.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#!/bin/sh
set -e
export STACKROOT=$(pwd)
# Source configuration options
config=${1:-"$STACKROOT/config/config.sh"}
source $config
set -x
#First nullify MPI variable for serial build
MPI_=$MPI ; export MPI=""
# Build COMPILER libraries
[[ $BUILD_zlib =~ [yYtT] ]] && \
$STACKROOT/ush/build_zlib.sh "$VER_zlib" 2>&1 | tee "$LOGDIR/log.zlib"
[[ $BUILD_szip =~ [yYtT] ]] && \
$STACKROOT/ush/build_szip.sh "$VER_szip" 2>&1 | tee "$LOGDIR/log.szip"
[[ $BUILD_udunits =~ [yYtT] ]] && \
$STACKROOT/ush/build_udunits.sh "$VER_udunits" 2>&1 | tee "$LOGDIR/log.udunits"
[[ $BUILD_lapack =~ [yYtT] ]] && \
$STACKROOT/ush/build_lapack.sh "$VER_lapack" 2>&1 | tee "$LOGDIR/log.lapack"
[[ $BUILD_boost =~ [yYtT] ]] && \
$STACKROOT/ush/build_boost.sh "$VER_boost" 2>&1 | tee "$LOGDIR/log.boost"
[[ $BUILD_eigen =~ [yYtT] ]] && \
$STACKROOT/ush/build_eigen.sh "$VER_eigen" 2>&1 | tee "$LOGDIR/log.eigen"
[[ $BUILD_fftw =~ [yYtT] ]] && \
$STACKROOT/ush/build_fftw.sh "$VER_fftw" 2>&1 | tee "$LOGDIR/log.fftw"
[[ $BUILD_hdf5 =~ [yYtT] ]] && \
$STACKROOT/ush/build_hdf5.sh "$VER_hdf5" 2>&1 | tee "$LOGDIR/log.hdf5"
[[ $BUILD_netcdf =~ [yYtT] ]] && \
$STACKROOT/ush/build_netcdf.sh "$VER_netcdf_c" "$VER_netcdf_f" "$VER_netcdf_cxx" 2>&1 | tee "$LOGDIR/log.netcdf"
[[ $BUILD_nccmp =~ [yYtT] ]] && \
$STACKROOT/ush/build_nccmp.sh "$VER_nccmp" 2>&1 | tee "$LOGDIR/log.nccmp"
[[ $BUILD_cgal =~ [yYtT] ]] && \
$STACKROOT/ush/build_cgal.sh "$VER_cgal" 2>&1 | tee "$LOGDIR/log.cgal"
# Now build parallel (MPI) libraries (if desired)
[[ $SERIAL_ONLY =~ [yYtT] ]] && exit 0
export MPI=$MPI_; unset MPI_
[[ $BUILD_boost =~ [yYtT] ]] && \
$STACKROOT/ush/build_boost.sh "$VER_boost" 2>&1 | tee "$LOGDIR/log.boost-mpi"
[[ $BUILD_fftw =~ [yYtT] ]] && \
$STACKROOT/ush/build_fftw.sh "$VER_fftw" 2>&1 | tee "$LOGDIR/log.fftw-mpi"
[[ $BUILD_hdf5 =~ [yYtT] ]] && \
$STACKROOT/ush/build_hdf5.sh "$VER_hdf5" 2>&1 | tee "$LOGDIR/log.hdf5-mpi"
[[ $BUILD_pnetcdf =~ [yYtT] ]] && \
$STACKROOT/ush/build_pnetcdf.sh "$VER_pnetcdf" 2>&1 | tee "$LOGDIR/log.pnetcdf-mpi"
[[ $BUILD_netcdf =~ [yYtT] ]] && \
$STACKROOT/ush/build_netcdf.sh "$VER_netcdf_c" "$VER_netcdf_f" "$VER_netcdf_cxx" 2>&1 | tee "$LOGDIR/log.netcdf-mpi"
[[ $BUILD_esmf =~ [yYtT] ]] && \
$STACKROOT/ush/build_esmf.sh "$VER_esmf" 2>&1 | tee "$LOGDIR/log.esmf-mpi"
exit 0