Skip to content
Snippets Groups Projects
Commit 652286a8 authored by Anne Philipp's avatar Anne Philipp
Browse files

Merge branch 'dev' of https://www.flexpart.eu/git/flex_extract into dev

Changes due to Manuscript review for Fortran part (Petra)
parents 98f09d23 14d96186
Branches
Tags
No related merge requests found
......@@ -485,24 +485,25 @@ PROGRAM calc_etadot
END IF ! MGAUSS
!! CREATE FILE VERTICAL.EC NEEDED BY POP MODEL
OPEN(21,FILE='VERTICAL.EC')
WRITE(21,'(A)')
WRITE(21,'(A)') 'VERTICAL DISCRETIZATION OF POP MODEL'
WRITE(21,'(A)')
write(21,'(i3,a)') MLEVEL,' number of layers'
WRITE(21,'(A)')
WRITE(21,'(A)') '* A(NLEV+1)'
WRITE(21,'(A)')
DO 205 I=1,MLEVEL+1
205 WRITE(21,'(F18.12)') AK(I)
WRITE(21,'(A)')
WRITE(21,'(A)') '* B(NLEV+1)'
WRITE(21,'(A)')
DO 210 I=1,MLEVEL+1
210 WRITE(21,'(F18.12)') BK(I)
CLOSE(21)
! CREATE FILE VERTICAL.EC NEEDED BY POP MODEL
! 2020-06-25 Commented out by PS - not needed anymore
! OPEN(21,FILE='VERTICAL.EC')
! WRITE(21,'(A)')
! WRITE(21,'(A)') 'VERTICAL DISCRETIZATION OF POP MODEL'
! WRITE(21,'(A)')
! write(21,'(i3,a)') MLEVEL,' number of layers'
! WRITE(21,'(A)')
! WRITE(21,'(A)') '* A(NLEV+1)'
! WRITE(21,'(A)')
! DO 205 I=1,MLEVEL+1
!205 WRITE(21,'(F18.12)') AK(I)
! WRITE(21,'(A)')
! WRITE(21,'(A)') '* B(NLEV+1)'
! WRITE(21,'(A)')
! DO 210 I=1,MLEVEL+1
!210 WRITE(21,'(F18.12)') BK(I)
! CLOSE(21)
!------------------------------------------------------------------
! READING OF OMEGA
......
......@@ -14,7 +14,7 @@
EXE = calc_etadot_debug.out
ECCODES_LIB= -Bstatic -leccodes_f90 -leccodes -Bdynamic -lm -ljasper
ECCODES_LIB= -Bstatic -leccodes_f90 -leccodes -Bdynamic -lm
EMOSLIB=-lemosR64
LIB = $(ECCODES_LIB) $(EMOSLIB)
......
......@@ -14,16 +14,17 @@
EXE = calc_etadot_fast.out
ECCODES_LIB = -Bstatic -leccodes_f90 -leccodes -Bdynamic -lm -ljasper
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
......
......@@ -13,11 +13,13 @@ 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
# loop over all reference runs
rm -f log.run_ref
rm -f Work/*
if [ "$1" = omithigh ]; then # for fast testing, not for production
# requires > 16 GB
......@@ -50,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
......@@ -67,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'
......@@ -87,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
......
......@@ -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
......@@ -31,7 +32,7 @@ else
fi
for ref in $inputs; do
echo 'Working on test case =' $ref
echo 'Working on test case =' $ref | tee -a ../log.run_regr
# loop over debug and fast runs
for exe in 'debug' 'fast'; do
......@@ -61,8 +62,7 @@ for ref in $inputs; do
# compare reference and current version
# omega case also produces fort.25 - need to add this
outref='../Outputs/Output_ref_'${ref}'_'${exe}'/'$outfile
test=$(cmp $outfile $outref)
if $test; then
if cmp -s $outfile $outref >/dev/null; then
echo ' '$outfile ' test passed' | tee -a ../log.run_regr
else
echo 'WARNING:' $outfile ' test failed' | tee -a ../log.run_regr
......@@ -84,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
......@@ -99,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
......
......@@ -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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment