Skip to content

Commit b057440

Browse files
fixes GMAKE build failing after PR #680 (#721)
1 parent 68adf78 commit b057440

File tree

4 files changed

+24
-5
lines changed

4 files changed

+24
-5
lines changed

model/bin/ad3.tmpl

+3
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,9 @@
212212

213213
CPPFLAGS+=("-D__WW3_SWITCHES__='$sw_str'")
214214

215+
# Also set endianness:
216+
CPPFLAGS+=("-DENDIANNESS='<endian>'")
217+
215218
<comp_seq> "${CPPFLAGS[@]}" <cppad3procflag> <cppad3flag2> $path_i/$name.F90 <cppad3flag3> $name.F90
216219
<cppad3flag4> mv $name.i $name.F90
217220

model/bin/cmplr.env

+12-3
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@
3636
err_pattern='[[:space:]]error[[:space:]]'
3737
warn_pattern='warn'
3838

39+
# Binary I/O defaults to native endian:
40+
endian='native'
41+
3942
# disable listing done by the compiler
4043
list='no'
4144

@@ -63,9 +66,11 @@ if [ "$cmplr" == "mpt" ] || [ "$cmplr" == "mpt_debug" ] || [ "$cmplr" == "mpt_pr
6366
# OPTIONS - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
6467

6568
# common options
66-
optc='-c -module $path_m -no-fma -ip -g -i4 -real-size 32 -fp-model precise -assume byterecl -convert big_endian -fno-alias -fno-fnalias'
69+
optc='-c -module $path_m -no-fma -ip -g -i4 -real-size 32 -fp-model precise -assume byterecl -fno-alias -fno-fnalias'
6770
optl='-o $prog -g'
6871

72+
endian='big_endian'
73+
6974
# list options
7075
if [ "$list" == 'yes' ] ; then optc="$optc -list"; fi
7176

@@ -145,9 +150,11 @@ if [ "$cmplr" == "intel" ] || [ "$cmplr" == "intel_debug" ] || [ "$c
145150
# OPTIONS - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
146151

147152
# common options
148-
optc='-c -module $path_m -no-fma -ip -g -traceback -i4 -real-size 32 -fp-model precise -assume byterecl -convert big_endian -fno-alias -fno-fnalias -sox'
153+
optc='-c -module $path_m -no-fma -ip -g -traceback -i4 -real-size 32 -fp-model precise -assume byterecl -fno-alias -fno-fnalias -sox'
149154
optl='-o $prog -g'
150155

156+
endian='big_endian'
157+
151158
# list options
152159
if [ "$list" == 'yes' ] ; then optc="$optc -list"; fi
153160

@@ -252,9 +259,11 @@ if [ "$cmplr" == "gnu" ] || [ "$cmplr" == "gnu_debug" ] || [ "$cmplr" == "gnu_pr
252259
# OPTIONS - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
253260

254261
# common options
255-
optc='-c -J$path_m -g -fno-second-underscore -ffree-line-length-none -fconvert=big-endian'
262+
optc='-c -J$path_m -g -fno-second-underscore -ffree-line-length-none'
256263
optl='-o $prog -g'
257264

265+
endian='big_endian'
266+
258267
# omp options
259268
optomp='-fopenmp'
260269

model/bin/w3_setup

+1-1
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ then
394394
[ "$cmplr" == "ukmo_cray_gnu" ] || [ "$cmplr" == "ukmo_cray_gnu_debug" ] || \
395395
[ "$cmplr" == "ukmo_cray_intel" ] || [ "$cmplr" == "ukmo_cray_intel_debug" ]; then
396396
source $path_b/cmplr.env
397-
sed -e "s/<comp_seq>/$comp_seq/" -e "s/<cppad3procflag>/$cppad3procflag/" -e "s/<cppad3flag2>/$cppad3flag2/" -e "s/<cppad3flag3>/$cppad3flag3/" -e "s/<cppad3flag4>/$cppad3flag4/" $path_b/ad3.tmpl > $path_b/ad3
397+
sed -e "s/<comp_seq>/$comp_seq/" -e "s/<cppad3procflag>/$cppad3procflag/" -e "s/<cppad3flag2>/$cppad3flag2/" -e "s/<cppad3flag3>/$cppad3flag3/" -e "s/<cppad3flag4>/$cppad3flag4/" -e "s/<endian>/${endian}/" $path_b/ad3.tmpl > $path_b/ad3
398398
echo " sed $path_b/ad3.tmpl => $path_b/ad3"
399399
else
400400
errmsg "$path_b/ad3.$cmplr not found"

regtests/bin/run_test

+8-1
Original file line numberDiff line numberDiff line change
@@ -1259,7 +1259,14 @@ then
12591259
else
12601260
inputs="`ls $path_i/$prog*.inp 2>/dev/null`"
12611261
fi
1262-
inputs_tmp=`( ls ${path_i}/${prog}${gu}* )`
1262+
1263+
if [ $nml_input ] && [ ! -z "`ls ${path_i}/${prog}*.nml 2>/dev/null`" ]
1264+
then
1265+
inputs_tmp=`( ls ${path_i}/${prog}${gu}*nml)`
1266+
else
1267+
inputs_tmp=`( ls ${path_i}/${prog}${gu}*inp)`
1268+
fi
1269+
12631270
if [ ! -z "$inputs_tmp" ];then
12641271
inputs=$inputs_tmp
12651272
fi

0 commit comments

Comments
 (0)