Skip to content

Commit

Permalink
Fb port2hera (#107)
Browse files Browse the repository at this point in the history
* Port 2 hera (#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.
  • Loading branch information
ajhenrique authored Sep 30, 2019
1 parent aced0a0 commit 5eaa609
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 31 deletions.
29 changes: 19 additions & 10 deletions model/bin/cmplr.env
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ if [ "$cmplr" == "mpt" ] || [ "$cmplr" == "mpt_debug" ] || \
if [ "$list" == 'yes' ] ; then optc="$optc -list"; fi

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

# optimized options
if [ -z "$(echo $cmplr | grep debug)" ] ; then
Expand Down Expand Up @@ -94,14 +94,15 @@ fi
# INTEL #
###############################

if [ "$cmplr" == "intel" ] || [ "$cmplr" == "intel_debug" ] || \
[ "$cmplr" == "so_intel" ] || [ "$cmplr" == "so_intel_debug" ] || \
[ "$cmplr" == "wcoss_phase2" ] || [ "$cmplr" == "wcoss_phase2_intel_debug" ] || \
[ "$cmplr" == "wcoss_cray" ] || [ "$cmplr" == "wcoss_cray_intel_debug" ] || \
[ "$cmplr" == "wcoss_dell_p3" ] || [ "$cmplr" == "wcoss_dell_p3_intel_debug" ] || \
[ "$cmplr" == "theia" ] || [ "$cmplr" == "theia_intel_debug" ] || \
if [ "$cmplr" == "intel" ] || [ "$cmplr" == "intel_debug" ] || \
[ "$cmplr" == "so_intel" ] || [ "$cmplr" == "so_intel_debug" ] || \
[ "$cmplr" == "wcoss_phase2" ] || [ "$cmplr" == "wcoss_phase2_intel_debug" ] || \
[ "$cmplr" == "wcoss_cray" ] || [ "$cmplr" == "wcoss_cray_intel_debug" ] || \
[ "$cmplr" == "wcoss_dell_p3" ] || [ "$cmplr" == "wcoss_dell_p3_intel_debug" ] || \
[ "$cmplr" == "theia" ] || [ "$cmplr" == "hera" ] || \
[ "$cmplr" == "datarmor_intel" ] || [ "$cmplr" == "datarmor_intel_debug" ] ; then


# COMPILER - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

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

# omp options
if [ "$omp_mod" = 'yes' ] ; then optc="$optc -openmp"; optl="$optl -openmp"; fi
if [ "$omp_mod" == 'yes' ] ; then
if [ "$cmplr" == "hera" ] ; then
optc="$optc -qopenmp"
optl="$optl -qopenmp"
else
optc="$optc -openmp"
optl="$optl -openmp"
fi
fi

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

# omp options
if [ "$omp_mod" = 'yes' ] ; then optc="$optc -fopenmp"; optl="$optl -fopenmp"; fi
if [ "$omp_mod" == 'yes' ] ; then optc="$optc -fopenmp"; optl="$optl -fopenmp"; fi

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

# omp options
if [ "$omp_mod" = 'yes' ] ; then optc="$optc -mp"; optl="$optl -mp"; fi
if [ "$omp_mod" == 'yes' ] ; then optc="$optc -mp"; optl="$optl -mp"; fi

# optimized options
if [ -z "$(echo $cmplr | grep debug)" ] ; then
Expand Down
2 changes: 2 additions & 0 deletions model/bin/w3_setup
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,7 @@ then
[ "$cmplr" == "datarmor_intel" ] || [ "$cmplr" == "datarmor_intel_debug" ] || \
[ "$cmplr" == "gnu" ] || [ "$cmplr" == "gnu_debug" ] || \
[ "$cmplr" == "theia" ] || [ "$cmplr" == "wcoss_cray" ] || \
[ "$cmplr" == "hera" ] || \
[ "$cmplr" == "wcoss_phase2" ] || [ "$cmplr" == "wcoss_dell_p3" ] || \
[ "$cmplr" == "datarmor_gnu" ] || [ "$cmplr" == "datarmor_gnu_debug" ] || \
[ "$cmplr" == "pgi" ] || [ "$cmplr" == "pgi_debug" ] || \
Expand All @@ -438,6 +439,7 @@ then
[ "$cmplr" == "datarmor_intel" ] || [ "$cmplr" == "datarmor_intel_debug" ] || \
[ "$cmplr" == "gnu" ] || [ "$cmplr" == "gnu_debug" ] || \
[ "$cmplr" == "theia" ] || [ "$cmplr" == "wcoss_cray" ] || \
[ "$cmplr" == "hera" ] || \
[ "$cmplr" == "wcoss_phase2" ] || [ "$cmplr" == "wcoss_dell_p3" ] || \
[ "$cmplr" == "datarmor_gnu" ] || [ "$cmplr" == "datarmor_gnu_debug" ] || \
[ "$cmplr" == "pgi" ] || [ "$cmplr" == "pgi_debug" ] || \
Expand Down
2 changes: 1 addition & 1 deletion model/esmf/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ ifeq ($(WW3_COMP),Portland)
else ifeq ("$(WW3_COMP)",$(filter "$(WW3_COMP)","pgi" "datarmor_pgi" "datarmor_pgi_debug"))
ESMF_F90COMPILEOPTS := $(ESMF_F90COMPILEOPTS) -byteswapio
# intel
else ifeq ("$(WW3_COMP)",$(filter "$(WW3_COMP)","theia" "Intel"))
else ifeq ("$(WW3_COMP)",$(filter "$(WW3_COMP)","theia" "Intel" "hera"))
ESMF_F90COMPILEOPTS := $(ESMF_F90COMPILEOPTS) -convert big_endian
else ifeq ("$(WW3_COMP)",$(filter "$(WW3_COMP)","wcoss_phase2" "wcoss_cray" "wcoss_dell_p3"))
ESMF_F90COMPILEOPTS := $(ESMF_F90COMPILEOPTS) -convert big_endian
Expand Down
2 changes: 1 addition & 1 deletion regtests/bin/matrix.comp
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@
binaryfiles=`grep . -r * | grep 'Binary file' | sed -e "s/^Binary file //" -e "s/ matches$//"`

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

nf_1=`echo $files_1 | wc -w | awk '{print $1}'`
echo " found $nf_1 files in base directory" >> $home_dir/fulldiff.tmp
Expand Down
41 changes: 23 additions & 18 deletions regtests/bin/matrix_ncep
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,27 @@
echo "Save source codes : $source"
echo "Save listings : $list"

# Set batchq queue to define headers etc (default to original version if empty)
batchq="slurm"
# Compiler option. Choose appropriate compiler and set cmplOption to
# y if using for the first time or using a different compiler

cmplr=intel
export cmplOption='y'

# Set batchq queue, choose modules and other custom variables to fit system and
# to define headers etc (default to original version if empty)
ishera=`hostname | grep hfe`
if [ $ishera ]
then
# If no other h, assuming Hera
cmplr=hera
batchq="slurm"
modcomp='intel/18.0.5.274'
modmpi='impi/2018.0.4'
modnetcdf='netcdf/4.6.1'
metispath='/scratch2/COASTAL/coastal/save/Ali.Abdolali/parmetis-4.0.3'
else
batchq=
fi

# 1. Set up
# 1.a Computer/ user dependent set up
Expand Down Expand Up @@ -62,30 +81,16 @@ fi

# Netcdf and Parmetis modules & variables

istheia=`hostname | grep tfe`
if [ $istheia ]
then
modcomp='intel/14.0.2'
modmpi='impi/5.1.2.150'
modnetcdf='netcdf/4.3.0'
fi

echo " module load $modcomp $modmpi $modnetcdf" >> matrix.head
echo " export WWATCH3_NETCDF=NC4" >> matrix.head
echo " export NETCDF_CONFIG=`which nc-config`" >> matrix.head
echo " export METIS_PATH=/scratch3/NCEPDEV/stmp2/Jessica.Meixner/parmetis-4.0.3" >> matrix.head
echo " export METIS_PATH=${metispath}" >> matrix.head
echo " export WW3_PARCOMPN=4" >> matrix.head
echo ' '

# Compiler option. Choose appropriate compiler and set cmplOption to
# y if using for the first time or using a different compiler

cmplr=Intel
export cmplOption='y'

if [ "$batchq" = 'slurm' ]
then
export mpi='srun'
export mpi='mpirun'
else
export mpi='mpirun'
fi
Expand Down
2 changes: 1 addition & 1 deletion regtests/bin/run_test
Original file line number Diff line number Diff line change
Expand Up @@ -1436,7 +1436,7 @@ then
then
if [ $nproc ]
then
if [ $batchq = "slurm" ]
if [ -z $batchq ] && [ $batchq = "slurm" ]
then
runcmd="$runcmd -n $nproc"

Expand Down

0 comments on commit 5eaa609

Please sign in to comment.