Skip to content

Commit 7c16b74

Browse files
committed
Update PGI compiler on Dom
1 parent 747f09b commit 7c16b74

File tree

1 file changed

+53
-38
lines changed

1 file changed

+53
-38
lines changed

env.dom.sh

+53-38
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
# targets list of possible targets (e.g. gpu, cpu)
1717
# compilers list of possible compilers for Fortran parts
1818
# target default target
19-
# BOOST_PATH The boost installation path (for both fortran and C++ dependencies)
19+
# BOOST_PATH The boost installation path (for both fortran and C++ dependencies)
2020
# compiler default compiler to use for Fortran parts
2121
# debug build in debugging mode (yes/no)
2222
# cleanup clean before build (yes/no)
@@ -25,17 +25,15 @@ setupDefaults()
2525
{
2626
# available options
2727
targets=(cpu gpu)
28-
compilers=(gnu cray pgi)
28+
compilers=(gnu cray pgi claw-cray claw-pgi claw-gnu)
2929
fcompiler_cmds=(ftn)
3030

31-
# Daint and DOM environement should be indentical and using
32-
# the Daint installed Boost is fine
3331
# Module display boost
3432
export BOOST_PATH="/project/c14/install/daint/boost/boost_1_49_0"
3533

3634
# Check if ncurses was loaded before
3735
export BUILDENV_NCURSES_LOADED=`module list -t 2>&1 | grep "ncurses"`
38-
36+
3937
# default options
4038
if [ -z "${target}" ] ; then
4139
target="gpu"
@@ -57,7 +55,7 @@ get_fcompiler_cmd()
5755
{
5856
local __resultvar=$1
5957
local __compiler=$2
60-
if [ "${compiler}" == "gnu" ] ; then
58+
if [ "${compiler}" == "gnu" ] || [ "${compiler}" == "claw-gnu" ]; then
6159
myresult="gfortran"
6260
else
6361
myresult="ftn"
@@ -95,14 +93,12 @@ setCppEnvironment()
9593
else
9694
module swap ${old_prgenv} PrgEnv-gnu
9795
fi
98-
96+
9997
# standard modules (part 1)
10098
if [ "${target}" == "gpu" ] ; then
10199
module load craype-accel-nvidia60
102100
fi
103-
104-
module load CMake
105-
101+
module load cudatoolkit
106102
# Fortran compiler specific modules and setup
107103
case "${compiler}" in
108104
cray )
@@ -158,13 +154,11 @@ unsetCppEnvironment()
158154
exit 1
159155
esac
160156

161-
module unload CMake
162-
163157
# unload curses in case it was already loaded
164158
if [ -z "${BUILDENV_NCURSES_LOADED}" ] ; then
165159
module unload ncurses
166160
fi
167-
161+
168162
# remove standard modules (part 1)
169163
if [ "${target}" == "gpu" ] ; then
170164
module unload craype-accel-nvidia60
@@ -210,48 +204,64 @@ setFortranEnvironment()
210204
else
211205
module swap ${old_prgenv} PrgEnv-${compiler}
212206
fi
213-
207+
214208
old_ldflags="${LDFLAGS}"
215-
209+
210+
# Set grib-api version and cosmo ressources
211+
export GRIBAPI_VERSION="libgrib_api_1.20.0p4"
212+
export GRIBAPI_COSMO_RESOURCES_VERSION="v1.20.0.2"
213+
216214
# standard modules (part 1)
217-
module load CMake
215+
218216
if [ "${target}" == "gpu" ] ; then
219217
module load craype-accel-nvidia60
220218
fi
221219

222220
# compiler specific modules
223221
case "${compiler}" in
224-
cray )
225-
module load cce/8.7.1
226-
# Load gcc/5.3.0 to link with the C++ Dynamical Core
227-
module load gcc/5.3.0
222+
*cray )
223+
module load cdt/19.10
224+
module swap cce/9.0.2
225+
# Load gcc/8.3.0 to link with the C++ Dynamical Core
226+
module load gcc/8.3.0
227+
export LD_LIBRARY_PATH=$CRAY_LD_LIBRARY_PATH:$LD_LIBRARY_PATH
228228
# Override C++ and C compiler
229229
export CXX=$GCC_PATH/snos/bin/g++
230230
export CC=$GCC_PATH/snos/bin/gcc
231231
export FC=ftn
232232
export LDFLAGS="-L$GCC_PATH/snos/lib64 ${LDFLAGS}"
233233
;;
234-
gnu )
234+
*gnu )
235235
module unload gcc
236-
module load gcc/5.3.0
236+
module load gcc/8.3.0
237237
export CXX=CC
238238
export CC=cc
239239
export FC=ftn
240240
;;
241-
pgi )
242-
module unload pgi
243-
module load pgi/18.3.0
244-
# Load gcc/5.3.0 to link with the C++ Dynamical Core
245-
module load gcc/5.3.0
241+
*pgi )
242+
module swap pgi/20.1.0
243+
export CUDA_HOME=${CUDATOOLKIT_HOME}
244+
# Load gcc/8.3.0 to link with the C++ Dynamical Core
245+
module load gcc/8.3.0
246246
export CXX=$GCC_PATH/snos/bin/g++
247247
export CC=$GCC_PATH/snos/bin/gcc
248248
export FC=ftn
249-
export LDFLAGS="-L/opt/gcc/5.3.0/snos/lib64 ${LDFLAGS}"
249+
export LDFLAGS="-L/opt/gcc/8.3.0/snos/lib64 ${LDFLAGS}"
250250
;;
251251
* )
252252
echo "ERROR: Unsupported compiler encountered in setFortranEnvironment" 1>&2
253253
exit 1
254254
esac
255+
256+
if [[ -z "$CLAWFC" ]]; then
257+
# CLAW Compiler using the correct preprocessor
258+
export CLAWFC="${installdir}/claw_v1.2.3/${compiler}/bin/clawfc"
259+
fi
260+
export CLAWXMODSPOOL="${installdir}/../omni-xmod-pool"
261+
262+
# Set grib-api version and cosmo ressources
263+
export GRIBAPI_VERSION="libgrib_api_1.20.0p4"
264+
export GRIBAPI_COSMO_RESOURCES_VERSION="v1.20.0.2"
255265

256266
# standard modules (part 2)
257267
module load cray-netcdf
@@ -270,28 +280,33 @@ unsetFortranEnvironment()
270280

271281
# remove compiler specific modules
272282
case "${compiler}" in
273-
cray )
274-
module unload gcc/5.3.0
283+
*cray )
284+
module unload gcc/8.3.0
285+
#XL: try to restore system default manually since
286+
# this gives an error : source /opt/cray/pe/cdt/17.08/restore_system_defaults.sh
287+
module unload cdt/19.10
288+
module unload cray-libsci_acc/19.06.1
289+
module swap cray-mpich/7.7.10
275290
;;
276-
gnu )
277-
module unload gcc/5.3.0
291+
*gnu )
292+
module unload gcc/8.3.0
278293
module load gcc
279294
;;
280-
pgi )
281-
module unload gcc/5.3.0
295+
*pgi )
296+
module unload gcc/8.3.0
282297
;;
283298
* )
284299
echo "ERROR: Unsupported compiler encountered in unsetFortranEnvironment" 1>&2
285300
exit 1
286301
esac
287302

288303
# remove standard modules (part 1)
289-
module unload CMake
304+
290305
# unload curses in case it was already loaded
291306
if [ -z "${BUILDENV_NCURSES_LOADED}" ] ; then
292307
module unload ncurses
293308
fi
294-
309+
295310
# GPU specific unload
296311
if [ "${target}" == "gpu" ] ; then
297312
module unload craype-accel-nvidia60
@@ -304,10 +319,10 @@ unsetFortranEnvironment()
304319
module swap PrgEnv-${compiler} ${old_prgenv}
305320
fi
306321
unset old_prgenv
307-
322+
308323
export LDFLAGS="${old_ldflags}"
309324
unset old_ldflags
310-
325+
311326
unset CXX
312327
unset CC
313328
unset FC

0 commit comments

Comments
 (0)