Skip to content

Commit 5eaa609

Browse files
authored
Fb port2hera (NOAA-EMC#107)
* Port 2 hera (NOAA-EMC#101) Includes NCEP development machine Hera to cmplr.env if blocks allowing compilation of WW3 executables under NEMS. A correction to run_test is made to allow empty values of the batchq parameter. * Adding hera for NEMS coupled application builds * regtests scripts matrix_ncep and run_test: adding feature to run on several NCEP compute systems, adding a conditional statement on run_test to check if batchq parameter is non-empty and avoid error when it is. * Adding hera option for openmp runs in regtests: intel compiler on hera requires flag to be -qopenmp instead of -openmp * Changing '=' to '==' in cpmlr.env for consistent usage when comparing strings.
1 parent aced0a0 commit 5eaa609

File tree

6 files changed

+47
-31
lines changed

6 files changed

+47
-31
lines changed

model/bin/cmplr.env

+19-10
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ if [ "$cmplr" == "mpt" ] || [ "$cmplr" == "mpt_debug" ] || \
6464
if [ "$list" == 'yes' ] ; then optc="$optc -list"; fi
6565

6666
# omp options
67-
if [ "$omp_mod" = 'yes' ] ; then optc="$optc -openmp"; optl="$optl -openmp"; fi
67+
if [ "$omp_mod" == 'yes' ] ; then optc="$optc -openmp"; optl="$optl -openmp"; fi
6868

6969
# optimized options
7070
if [ -z "$(echo $cmplr | grep debug)" ] ; then
@@ -94,14 +94,15 @@ fi
9494
# INTEL #
9595
###############################
9696

97-
if [ "$cmplr" == "intel" ] || [ "$cmplr" == "intel_debug" ] || \
98-
[ "$cmplr" == "so_intel" ] || [ "$cmplr" == "so_intel_debug" ] || \
99-
[ "$cmplr" == "wcoss_phase2" ] || [ "$cmplr" == "wcoss_phase2_intel_debug" ] || \
100-
[ "$cmplr" == "wcoss_cray" ] || [ "$cmplr" == "wcoss_cray_intel_debug" ] || \
101-
[ "$cmplr" == "wcoss_dell_p3" ] || [ "$cmplr" == "wcoss_dell_p3_intel_debug" ] || \
102-
[ "$cmplr" == "theia" ] || [ "$cmplr" == "theia_intel_debug" ] || \
97+
if [ "$cmplr" == "intel" ] || [ "$cmplr" == "intel_debug" ] || \
98+
[ "$cmplr" == "so_intel" ] || [ "$cmplr" == "so_intel_debug" ] || \
99+
[ "$cmplr" == "wcoss_phase2" ] || [ "$cmplr" == "wcoss_phase2_intel_debug" ] || \
100+
[ "$cmplr" == "wcoss_cray" ] || [ "$cmplr" == "wcoss_cray_intel_debug" ] || \
101+
[ "$cmplr" == "wcoss_dell_p3" ] || [ "$cmplr" == "wcoss_dell_p3_intel_debug" ] || \
102+
[ "$cmplr" == "theia" ] || [ "$cmplr" == "hera" ] || \
103103
[ "$cmplr" == "datarmor_intel" ] || [ "$cmplr" == "datarmor_intel_debug" ] ; then
104104

105+
105106
# COMPILER - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
106107

107108
# compiler
@@ -125,7 +126,15 @@ if [ "$cmplr" == "intel" ] || [ "$cmplr" == "intel_debug" ] || \
125126
if [ "$list" == 'yes' ] ; then optc="$optc -list"; fi
126127

127128
# omp options
128-
if [ "$omp_mod" = 'yes' ] ; then optc="$optc -openmp"; optl="$optl -openmp"; fi
129+
if [ "$omp_mod" == 'yes' ] ; then
130+
if [ "$cmplr" == "hera" ] ; then
131+
optc="$optc -qopenmp"
132+
optl="$optl -qopenmp"
133+
else
134+
optc="$optc -openmp"
135+
optl="$optl -openmp"
136+
fi
137+
fi
129138

130139
# optimized options
131140
if [ -z "$(echo $cmplr | grep debug)" ] ; then
@@ -183,7 +192,7 @@ if [ "$cmplr" == "gnu" ] || [ "$cmplr" == "gnu_debug" ] || \
183192
optl='-o $prog -p -g'
184193

185194
# omp options
186-
if [ "$omp_mod" = 'yes' ] ; then optc="$optc -fopenmp"; optl="$optl -fopenmp"; fi
195+
if [ "$omp_mod" == 'yes' ] ; then optc="$optc -fopenmp"; optl="$optl -fopenmp"; fi
187196

188197
# optimized options
189198
if [ -z "$(echo $cmplr | grep debug)" ] ; then
@@ -241,7 +250,7 @@ if [ "$cmplr" == "pgi" ] || [ "$cmplr" == "pgi_debug" ] || \
241250
if [ "$list" == 'yes' ] ; then optc="$optc -Mlist"; fi
242251

243252
# omp options
244-
if [ "$omp_mod" = 'yes' ] ; then optc="$optc -mp"; optl="$optl -mp"; fi
253+
if [ "$omp_mod" == 'yes' ] ; then optc="$optc -mp"; optl="$optl -mp"; fi
245254

246255
# optimized options
247256
if [ -z "$(echo $cmplr | grep debug)" ] ; then

model/bin/w3_setup

+2
Original file line numberDiff line numberDiff line change
@@ -415,6 +415,7 @@ then
415415
[ "$cmplr" == "datarmor_intel" ] || [ "$cmplr" == "datarmor_intel_debug" ] || \
416416
[ "$cmplr" == "gnu" ] || [ "$cmplr" == "gnu_debug" ] || \
417417
[ "$cmplr" == "theia" ] || [ "$cmplr" == "wcoss_cray" ] || \
418+
[ "$cmplr" == "hera" ] || \
418419
[ "$cmplr" == "wcoss_phase2" ] || [ "$cmplr" == "wcoss_dell_p3" ] || \
419420
[ "$cmplr" == "datarmor_gnu" ] || [ "$cmplr" == "datarmor_gnu_debug" ] || \
420421
[ "$cmplr" == "pgi" ] || [ "$cmplr" == "pgi_debug" ] || \
@@ -438,6 +439,7 @@ then
438439
[ "$cmplr" == "datarmor_intel" ] || [ "$cmplr" == "datarmor_intel_debug" ] || \
439440
[ "$cmplr" == "gnu" ] || [ "$cmplr" == "gnu_debug" ] || \
440441
[ "$cmplr" == "theia" ] || [ "$cmplr" == "wcoss_cray" ] || \
442+
[ "$cmplr" == "hera" ] || \
441443
[ "$cmplr" == "wcoss_phase2" ] || [ "$cmplr" == "wcoss_dell_p3" ] || \
442444
[ "$cmplr" == "datarmor_gnu" ] || [ "$cmplr" == "datarmor_gnu_debug" ] || \
443445
[ "$cmplr" == "pgi" ] || [ "$cmplr" == "pgi_debug" ] || \

model/esmf/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ ifeq ($(WW3_COMP),Portland)
3434
else ifeq ("$(WW3_COMP)",$(filter "$(WW3_COMP)","pgi" "datarmor_pgi" "datarmor_pgi_debug"))
3535
ESMF_F90COMPILEOPTS := $(ESMF_F90COMPILEOPTS) -byteswapio
3636
# intel
37-
else ifeq ("$(WW3_COMP)",$(filter "$(WW3_COMP)","theia" "Intel"))
37+
else ifeq ("$(WW3_COMP)",$(filter "$(WW3_COMP)","theia" "Intel" "hera"))
3838
ESMF_F90COMPILEOPTS := $(ESMF_F90COMPILEOPTS) -convert big_endian
3939
else ifeq ("$(WW3_COMP)",$(filter "$(WW3_COMP)","wcoss_phase2" "wcoss_cray" "wcoss_dell_p3"))
4040
ESMF_F90COMPILEOPTS := $(ESMF_F90COMPILEOPTS) -convert big_endian

regtests/bin/matrix.comp

+1-1
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@
159159
binaryfiles=`grep . -r * | grep 'Binary file' | sed -e "s/^Binary file //" -e "s/ matches$//"`
160160

161161
#Generate list of files to skip
162-
skipfiles="ww3_shel.out ww3_multi.out prf.*.mww3 finished ww3_systrk.out"
162+
skipfiles="ww3_shel.out ww3_multi.out prf.*.mww3 finished ww3_systrk.out gmon.out time_count.txt"
163163

164164
nf_1=`echo $files_1 | wc -w | awk '{print $1}'`
165165
echo " found $nf_1 files in base directory" >> $home_dir/fulldiff.tmp

regtests/bin/matrix_ncep

+23-18
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,27 @@
3131
echo "Save source codes : $source"
3232
echo "Save listings : $list"
3333

34-
# Set batchq queue to define headers etc (default to original version if empty)
35-
batchq="slurm"
34+
# Compiler option. Choose appropriate compiler and set cmplOption to
35+
# y if using for the first time or using a different compiler
36+
37+
cmplr=intel
38+
export cmplOption='y'
39+
40+
# Set batchq queue, choose modules and other custom variables to fit system and
41+
# to define headers etc (default to original version if empty)
42+
ishera=`hostname | grep hfe`
43+
if [ $ishera ]
44+
then
45+
# If no other h, assuming Hera
46+
cmplr=hera
47+
batchq="slurm"
48+
modcomp='intel/18.0.5.274'
49+
modmpi='impi/2018.0.4'
50+
modnetcdf='netcdf/4.6.1'
51+
metispath='/scratch2/COASTAL/coastal/save/Ali.Abdolali/parmetis-4.0.3'
52+
else
53+
batchq=
54+
fi
3655

3756
# 1. Set up
3857
# 1.a Computer/ user dependent set up
@@ -62,30 +81,16 @@ fi
6281

6382
# Netcdf and Parmetis modules & variables
6483

65-
istheia=`hostname | grep tfe`
66-
if [ $istheia ]
67-
then
68-
modcomp='intel/14.0.2'
69-
modmpi='impi/5.1.2.150'
70-
modnetcdf='netcdf/4.3.0'
71-
fi
72-
7384
echo " module load $modcomp $modmpi $modnetcdf" >> matrix.head
7485
echo " export WWATCH3_NETCDF=NC4" >> matrix.head
7586
echo " export NETCDF_CONFIG=`which nc-config`" >> matrix.head
76-
echo " export METIS_PATH=/scratch3/NCEPDEV/stmp2/Jessica.Meixner/parmetis-4.0.3" >> matrix.head
87+
echo " export METIS_PATH=${metispath}" >> matrix.head
7788
echo " export WW3_PARCOMPN=4" >> matrix.head
7889
echo ' '
7990

80-
# Compiler option. Choose appropriate compiler and set cmplOption to
81-
# y if using for the first time or using a different compiler
82-
83-
cmplr=Intel
84-
export cmplOption='y'
85-
8691
if [ "$batchq" = 'slurm' ]
8792
then
88-
export mpi='srun'
93+
export mpi='mpirun'
8994
else
9095
export mpi='mpirun'
9196
fi

regtests/bin/run_test

+1-1
Original file line numberDiff line numberDiff line change
@@ -1436,7 +1436,7 @@ then
14361436
then
14371437
if [ $nproc ]
14381438
then
1439-
if [ $batchq = "slurm" ]
1439+
if [ -z $batchq ] && [ $batchq = "slurm" ]
14401440
then
14411441
runcmd="$runcmd -n $nproc"
14421442

0 commit comments

Comments
 (0)