diff --git a/Source/Fortran/makefile_fast b/Source/Fortran/makefile_fast index 914cc185a307222e752882b418c72c6eb55eb271..7b0a21519ccaab8b5736b4e256d1bf472c5667f7 100644 --- a/Source/Fortran/makefile_fast +++ b/Source/Fortran/makefile_fast @@ -18,12 +18,13 @@ ECCODES_LIB = -Bstatic -leccodes_f90 -leccodes -Bdynamic -lm EMOSLIB=-lemosR64 LIB = $(ECCODES_LIB) $(EMOSLIB) -ECCODES_INCLUDE_DIR=/usr/local/include/ -#/usr/lib/x86_64-linux-gnu/fortran/gfortran-mod-15 +ECCODES_INCLUDE_DIR=/usr/lib/x86_64-linux-gnu/fortran/gfortran-mod-15 +#/usr/local/include/ #oldstable + INC = -I. -I$(ECCODES_INCLUDE_DIR) FC = gfortran -OPT = -O3 -march=native +OPT = -O3 # -O3 -march=native FFLAGS = $(OPT) $(LIB) $(INC) -fdefault-real-8 -fopenmp -fconvert=big-endian LDFLAGS = $(OPT) $(LIB) -fopenmp SRC = ./rwgrib2.f90 ./calc_etadot.f90 ./ftrafo.f90 ./grphreal.f90 ./posnam.f90 ./phgrreal.f90 diff --git a/Testing/Regression/FortranEtadot/run_ref.sh b/Testing/Regression/FortranEtadot/run_ref.sh index d48bc32166d176b434a7b9680b1f8e3e679f93d8..065a2919a6b4e68434d94dfb7a25bc18e626dd19 100755 --- a/Testing/Regression/FortranEtadot/run_ref.sh +++ b/Testing/Regression/FortranEtadot/run_ref.sh @@ -13,6 +13,7 @@ path=../${path1} exedebug=calc_etadot_debug.out exefast=calc_etadot_fast.out hash=$(git log --abbrev-commit --pretty=oneline -n 1 --pretty=format:'%h') +csvfile='runtimes_'${HOST}'.csv' exitonfail=true rm -f log.run_ref failed @@ -51,7 +52,7 @@ for ref in $inputs; do echo $ref $exe 'FAILED' >> ${testhome}/failed if [ "${exitonfail}" = true ]; then exit; fi fi - for outfile in 'fort.15' 'VERTICAL.EC'; do + for outfile in 'fort.15' ; do if [ -e $outfile ]; then mv ${outfile} ../${outdir} else @@ -68,11 +69,11 @@ for ref in $inputs; do # compare debug and fast # omega case also produces fort.25 - need to add this - for outfile in 'fort.15' 'VERTICAL.EC'; do + for outfile in 'fort.15' ; do outdebug='Outputs/Output_ref_'${ref}'_debug/'$outfile outfast='Outputs/Output_ref_'${ref}'_fast/'$outfile - test=$(cmp $outdebug $outfast) - if $test; then + test=$() + if cmp -s $outdebug $outfast >/dev/null; then echo $outfile ' equal for debug and fast' >> log.run_ref else echo 'WARNING:' $outfile ' not equal for debug and fast, test failed' @@ -88,7 +89,7 @@ for ref in $inputs; do real=$(echo $times | grep real | awk '{print $2}') user=$(echo $times | grep user | awk '{print $4}') sys=$( echo $times | grep sys | awk '{print $6}') - echo $hash, "'"reference"'", "'"${ref}'_'${exe}"'", ${real}, ${user}, ${sys} >> runtimes.csv + echo $hash, "'"reference"'", "'"${ref}'_'${exe}"'", ${real}, ${user}, ${sys} >> ${csvfile} tail -1 runtimes.csv >> log.run_ref done diff --git a/Testing/Regression/FortranEtadot/run_regrtest.sh b/Testing/Regression/FortranEtadot/run_regrtest.sh index 65e811f7972ed0a123fce7365f0f8c817314a88e..1284adae7ac30f873f543e060e03ff6eb078b45c 100755 --- a/Testing/Regression/FortranEtadot/run_regrtest.sh +++ b/Testing/Regression/FortranEtadot/run_regrtest.sh @@ -16,6 +16,7 @@ path=../${path1} exedebug=calc_etadot_debug.out exefast=calc_etadot_fast.out hash=$(git log --abbrev-commit --pretty=oneline -n 1 --pretty=format:'%h') +csvfile='runtimes_'${HOST}'.csv' exitonfail=true numtest=0 numpassed=0 @@ -83,11 +84,11 @@ for ref in $inputs; do real=$(echo $times | grep real | awk '{print $2}') user=$(echo $times | grep user | awk '{print $4}') sys=$( echo $times | grep sys | awk '{print $6}') - echo $hash, "'"reference"'", "'"${ref}'_'${exe}"'", ${real}, ${user}, ${sys} >> ../runtimes.csv - tail -1 ../runtimes.csv >> log.run_regr + echo $hash, "'"reference"'", "'"${ref}'_'${exe}"'", ${real}, ${user}, ${sys} >> ../${csvfile} + tail -1 ../${csvfile} >> log.run_regr cd .. - rm Work/* # this is for being more safe + rm -f Work/* # this is for being more safe done # end of exe loop @@ -98,7 +99,7 @@ echo echo ' Regression test: ' $numpassed 'out of' $numtest 'tests passed'. \ | tee -a ../log.run_regr echo ' More information may be found in log.run_regr' -echo ' Runtimes were added to runtimes.csv under '$hash | tee -a ../log.run_regr +echo ' Runtimes were added to '${csvfile}' under '$hash | tee -a ../log.run_regr # the following code is executed only if exitonfail is not set to 'true'. if [ -e failed ]; then diff --git a/Testing/Regression/FortranEtadot/runtimes.imp7 b/Testing/Regression/FortranEtadot/runtimes_imp7.csv similarity index 50% rename from Testing/Regression/FortranEtadot/runtimes.imp7 rename to Testing/Regression/FortranEtadot/runtimes_imp7.csv index c709fb5868139ce18593dd33f9d589be2691397e..2bf6fd25be83396e05dfe4d985127a0124d2dfab 100644 --- a/Testing/Regression/FortranEtadot/runtimes.imp7 +++ b/Testing/Regression/FortranEtadot/runtimes_imp7.csv @@ -14,3 +14,19 @@ 949379e, 'reference', 'latlon_fast', 0m0.673s, 0m7.032s, 0m0.152s 949379e, 'reference', 'latlonall_debug', 0m0.777s, 0m6.772s, 0m0.620s 949379e, 'reference', 'latlonall_fast', 0m0.687s, 0m7.064s, 0m0.196s +d90a529, 'reference', 'etadot_debug', 0m0.504s, 0m0.431s, 0m0.016s +d90a529, 'reference', 'etadot_fast', 0m0.442s, 0m0.529s, 0m0.017s +d90a529, 'reference', 'etadotall_debug', 0m0.576s, 0m0.603s, 0m0.048s +d90a529, 'reference', 'etadotall_fast', 0m0.604s, 0m0.673s, 0m0.028s +d90a529, 'reference', 'etadothigh_debug', 17m14.011s, 16m31.983s, 0m18.441s +d90a529, 'reference', 'etadothigh_fast', 17m23.426s, 16m31.624s, 0m21.645s +d90a529, 'reference', 'gauss_debug', 0m3.348s, 0m7.130s, 0m0.208s +d90a529, 'reference', 'gauss_fast', 0m2.403s, 0m5.028s, 0m0.156s +d90a529, 'reference', 'gaussall_debug', 0m12.126s, 0m28.251s, 0m0.648s +d90a529, 'reference', 'gaussall_fast', 0m9.868s, 0m23.323s, 0m0.880s +d90a529, 'reference', 'gausshigh_debug', 5m4.089s, 14m23.018s, 0m12.998s +d90a529, 'reference', 'gausshigh_fast', 4m48.049s, 13m11.227s, 0m16.318s +d90a529, 'reference', 'latlon_debug', 0m0.657s, 0m0.681s, 0m0.016s +d90a529, 'reference', 'latlon_fast', 0m0.485s, 0m0.563s, 0m0.004s +d90a529, 'reference', 'latlonall_debug', 0m0.544s, 0m0.613s, 0m0.012s +d90a529, 'reference', 'latlonall_fast', 0m0.534s, 0m0.620s, 0m0.020s