Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UKMO Cray bugfixes #105

Merged
merged 11 commits into from
Oct 30, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 65 additions & 6 deletions model/bin/cmplr.env
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@
# cmplr.env : Defines the compiler executable and its options for WW3 #
# from the compiler keyword given in argument #
# #
# - supported compiler are SGI-MPT, INTEL, GNU, PORTLAND #
# - supported compiler are SGI-MPT, INTEL, GNU, PORTLAND, CRAY #
# #
# #
# use : cmplr.env cmplr #
# #
# cmplr : keyword based on a value and optional suffix, prefix and extras #
# #
# value : mpt / intel / gnu / pgi #
# value : mpt / intel / gnu / pgi / cray #
# suffix : _debug #
# prefix : datarmor_ #
# prefix : datarmor_ #
# extras : so_ #
# #
# - examples : intel / pgi_debug / datarmor_mpt_debug / so_intel #
# - examples : intel / pgi_debug / datarmor_mpt_debug / so_intel #
# #
# remarks : #
# #
Expand Down Expand Up @@ -176,7 +176,8 @@ fi

if [ "$cmplr" == "gnu" ] || [ "$cmplr" == "gnu_debug" ] || \
[ "$cmplr" == "so_gnu" ] || [ "$cmplr" == "so_gnu_debug" ] || \
[ "$cmplr" == "datarmor_gnu" ] || [ "$cmplr" == "datarmor_gnu_debug" ] ; then
[ "$cmplr" == "datarmor_gnu" ] || [ "$cmplr" == "datarmor_gnu_debug" ] || \
[ "$cmplr" == "ukmo_cray_gnu" ] || [ "$cmplr" == "ukmo_cray_gnu_debug" ] ; then

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

Expand All @@ -185,7 +186,7 @@ if [ "$cmplr" == "gnu" ] || [ "$cmplr" == "gnu_debug" ] || \
comp_mpi='mpif90'

# Cray compiler
if [ ! -z "$(echo $cmplr | grep wcoss_cray)" ] ; then
if [ ! -z "$(echo $cmplr | grep cray)" ] ; then
comp_seq='ftn'
comp_mpi='ftn'
fi
Expand Down Expand Up @@ -216,6 +217,9 @@ if [ "$cmplr" == "gnu" ] || [ "$cmplr" == "gnu_debug" ] || \
if [ ! -z "$(echo $cmplr | grep datarmor)" ] ; then
optc="$optc -march=core-avx2"
optl="$optl -march=core-avx2"
elif [ ! -z "$(echo $cmplr | grep ukmo_cray)" ]; then
# don't specify -march for Cray; processor specific tuning handled by ftn wrapper script
optc="$optc -frecord-marker=4"
else
optc="$optc -march=native"
optl="$optl -march=native"
Expand Down Expand Up @@ -281,7 +285,62 @@ if [ "$cmplr" == "pgi" ] || [ "$cmplr" == "pgi_debug" ] || \
fi


###############################
# Crayftn (CCE)
###############################

if [ "$cmplr" == "ukmo_cray" ] || [ "$cmplr" == "ukmo_cray_debug" ] || \
[ "$cmplr" == "ukmo_cray_regtest" ]; then

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

# common compiler
comp_seq='ftn'
comp_mpi='ftn'

# OPTIONS - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

# common options
optc='-c -J$path_m -sdefault32 -eg'
optl='-o $prog'

# list options
if [ "$list" == 'yes' ] ; then optc="$optc -hlist=a"; fi

# omp options
if [ "$omp_mod" = 'yes' ] ; then
optc="$optc -h omp"
optl="$optl -h omp"
else
# by default, OMP is enabled on Cray ftn:
optc="$optc -h noomp"

# ... but don't disable at link stage as is currently needed by SCRIP
#optl="$optl -h noomp"
fi

# optimized options
if [ -z "$(echo $cmplr | grep debug)" ] ; then
optc="$optc -O3"
optl="$optl -O3"
fi

# debugging options
if [ ! -z "$(echo $cmplr | grep debug)" ] ; then
optc="$optc -O0 -g -Rbcps"
optl="$optl -O0 -g"
fi

# regtest options:
if [ ! -z "$(echo $cmplr | grep regtest)" ] ; then
# -O1 best balance between compile time and runtime for regtests
optc="$optc -O1"
optl="$optl -O1"
fi

# system-dependant options
# N/A
fi



Expand Down
8 changes: 6 additions & 2 deletions model/bin/w3_setup
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,9 @@ then
[ "$cmplr" == "wcoss_phase2" ] || [ "$cmplr" == "wcoss_dell_p3" ] || \
[ "$cmplr" == "datarmor_gnu" ] || [ "$cmplr" == "datarmor_gnu_debug" ] || \
[ "$cmplr" == "pgi" ] || [ "$cmplr" == "pgi_debug" ] || \
[ "$cmplr" == "datarmor_pgi" ] || [ "$cmplr" == "datarmor_pgi_debug" ] ; then
[ "$cmplr" == "datarmor_pgi" ] || [ "$cmplr" == "datarmor_pgi_debug" ] || \
[ "$cmplr" == "ukmo_cray" ] || [ "$cmplr" == "ukmo_cray_debug" ] || \
[ "$cmplr" == "ukmo_cray_gnu" ] || [ "$cmplr" == "ukmo_cray_gnu_debug" ]; then
source $path_b/cmplr.env
sed -e "s/<optc>/$optc/" -e "s/<comp_seq>/$comp_seq/" -e "s/<comp_mpi>/$comp_mpi/" $path_b/comp.tmpl > $path_b/comp
echo " sed $path_b/comp.tmpl => $path_b/comp"
Expand All @@ -443,7 +445,9 @@ then
[ "$cmplr" == "wcoss_phase2" ] || [ "$cmplr" == "wcoss_dell_p3" ] || \
[ "$cmplr" == "datarmor_gnu" ] || [ "$cmplr" == "datarmor_gnu_debug" ] || \
[ "$cmplr" == "pgi" ] || [ "$cmplr" == "pgi_debug" ] || \
[ "$cmplr" == "datarmor_pgi" ] || [ "$cmplr" == "datarmor_pgi_debug" ] ; then
[ "$cmplr" == "datarmor_pgi" ] || [ "$cmplr" == "datarmor_pgi_debug" ] || \
[ "$cmplr" == "ukmo_cray" ] || [ "$cmplr" == "ukmo_cray_debug" ] || \
[ "$cmplr" == "ukmo_cray_gnu" ] || [ "$cmplr" == "ukmo_cray_gnu_debug" ]; then
source $path_b/cmplr.env
sed -e "s/<optl>/$optl/" -e "s/<comp_seq>/$comp_seq/" -e "s/<comp_mpi>/$comp_mpi/" $path_b/link.tmpl > $path_b/link
echo " sed $path_b/link.tmpl => $path_b/link"
Expand Down
4 changes: 2 additions & 2 deletions model/ftn/w3iogrmd.ftn
Original file line number Diff line number Diff line change
Expand Up @@ -1260,8 +1260,8 @@
!/DB1 IF ( FLTEST ) WRITE (NDST,9053) SDBC1, SDBC2, FDONLY

!/UOST IF ( WRITE ) THEN
!/UOST WRITE (NDSM), UOSTFILELOCAL, UOSTFILESHADOW, &
!/UOST UOSTFACTORLOCAL, UOSTFACTORSHADOW
!/UOST WRITE (NDSM) UOSTFILELOCAL, UOSTFILESHADOW, &
!/UOST UOSTFACTORLOCAL, UOSTFACTORSHADOW
!/UOST ELSE
!/UOST READ (NDSM,END=801,ERR=802,IOSTAT=IERR) &
!/UOST UOSTFILELOCAL, UOSTFILESHADOW, &
Expand Down
Loading