diff --git a/.gitignore b/.gitignore index bf1f66796..c9578cdc5 100644 --- a/.gitignore +++ b/.gitignore @@ -135,6 +135,7 @@ regtests/ww3_ufs1.2/input/gsh_15m.obs regtests/ww3_ufs1.2/input/gnh_10m.bot regtests/ww3_ufs1.2/input/gsh_15m.mask regtests/output +regtests/build* *.nc */*.nc */*/*.nc diff --git a/regtests/bin/matrix_cmake_datarmor b/regtests/bin/matrix_cmake_datarmor index 923caa04a..dfdae5fe1 100755 --- a/regtests/bin/matrix_cmake_datarmor +++ b/regtests/bin/matrix_cmake_datarmor @@ -46,11 +46,7 @@ fi #convert main_dir to absolute path main_dir="`cd $main_dir 1>/dev/null 2>&1 && pwd`" -# Compiler option. Choose appropriate compiler and set cmplOption to -# y if using for the first time or using a different compiler - cmplr=datarmor_intel - export cmplOption='y' @@ -132,12 +128,7 @@ main_dir="`cd $main_dir 1>/dev/null 2>&1 && pwd`" export mpi='$MPI_LAUNCH' # Compile option - if [ "$cmplOption" = 'y' ] - then - opt="-c $cmplr -f -N -S -T" - else - opt="-f -N -S" - fi + opt="-f -N -S -T" # Base run_test command line export rtst="./bin/run_cmake_test $opt" diff --git a/regtests/bin/matrix_cmake_ncep b/regtests/bin/matrix_cmake_ncep index e554ac00f..139cea1d0 100755 --- a/regtests/bin/matrix_cmake_ncep +++ b/regtests/bin/matrix_cmake_ncep @@ -9,9 +9,7 @@ # # # Hendrik L. Tolman # # August 2013 # -# December 2013 # -# April 2018 # -# March 2020 # +# Last update: May 2022 # # # # Copyright 2013 National Weather Service (NWS), # # National Oceanic and Atmospheric Administration. All rights # @@ -22,34 +20,28 @@ usage () { -cat 2>&1 << EOF + cat 2>&1 << EOF -Usage: $myname model_dir -Required: - model_dir : path to model dir of WW3 source + Usage: $myname model_dir + Required: + model_dir : path to model dir of WW3 source EOF } -# 0.e Get required arguments -if [ ! $# = 0 ] -then - main_dir="$1" ; shift -else - usage - exit 1 -fi - -#convert main_dir to absolute path -main_dir="`cd $main_dir 1>/dev/null 2>&1 && pwd`" - -# Compiler option. Choose appropriate compiler and set cmplOption to -# y if using for the first time or using a different compiler +# Get required arguments + if [ ! $# = 0 ] + then + main_dir="$1" ; shift + else + usage + exit 1 + fi - cmplr=intel - export cmplOption='y' +# Convert main_dir to absolute path + main_dir="`cd $main_dir 1>/dev/null 2>&1 && pwd`" - #Module Versions from HPC-Stack that are common for all platforms +# Module Versions from HPC-Stack that are common for all platforms modnetcdf='netcdf/4.7.4' modjasper='jasper/2.0.25' modzlib='zlib/1.2.11' @@ -67,7 +59,6 @@ main_dir="`cd $main_dir 1>/dev/null 2>&1 && pwd`" if [ $ishera ] then # If no other h, assuming Hera - cmplr='hera.intel' batchq='slurm' hpcstackpath='/scratch2/NCEPDEV/nwprod/hpc-stack/libs/hpc-stack/modulefiles/stack' hpcstackversion='hpc/1.1.0' @@ -77,7 +68,6 @@ main_dir="`cd $main_dir 1>/dev/null 2>&1 && pwd`" modcmake='cmake/3.20.1' elif [ $isorion ] then - cmplr='orion.intel' batchq='slurm' hpcstackpath='/apps/contrib/NCEP/libs/hpc-stack/modulefiles/stack' hpcstackversion='hpc/1.1.0' @@ -153,6 +143,8 @@ main_dir="`cd $main_dir 1>/dev/null 2>&1 && pwd`" echo " module load $modesmf" >> matrix.head echo " export METIS_PATH=${metispath}" >> matrix.head + echo " export path_build_root=$(dirname $main_dir)/regtests/buildmatrix" >> matrix.head + echo ' [[ -d ${path_build_root} ]] && rm -rf ${path_build_root}' >> matrix.head echo ' ' if [ "$batchq" = 'slurm' ] @@ -163,12 +155,7 @@ main_dir="`cd $main_dir 1>/dev/null 2>&1 && pwd`" fi # Compile option - if [ "$cmplOption" = 'y' ] - then - opt="-o all -c $cmplr -S -T" - else - opt="-o all -S" - fi + opt="-o all -S -T" # Batch queue option if [ "$batchq" = 'slurm' ] @@ -241,14 +228,13 @@ main_dir="`cd $main_dir 1>/dev/null 2>&1 && pwd`" echo "#submit all of the diveded matrix files" > msuball.sh if [ $batchq = "slurm" ] then - files=`ls matrix? matrix??` + files=`ls matrix??` for file in $files do echo "sbatch < $file" >> msuball.sh done fi - # --------------------------------------------------------------------------- # # End to the matrix # # --------------------------------------------------------------------------- # diff --git a/regtests/bin/matrix_cmake_ukmo_cray b/regtests/bin/matrix_cmake_ukmo_cray index bfce0c754..fc6cf64b9 100755 --- a/regtests/bin/matrix_cmake_ukmo_cray +++ b/regtests/bin/matrix_cmake_ukmo_cray @@ -15,8 +15,6 @@ # # # Hendrik L. Tolman # # August 2013 # -# December 2013 # -# April 2018 # # # # Copyright 2013 National Weather Service (NWS), # # National Oceanic and Atmospheric Administration. All rights # @@ -26,16 +24,31 @@ # --------------------------------------------------------------------------- # # 0. Environment file - source $(dirname $0)/../../model/bin/w3_setenv - main_dir=$WWATCH3_DIR - temp_dir=$WWATCH3_TMP - source=$WWATCH3_SOURCE - list=$WWATCH3_LIST - echo "Main directory : $main_dir" - echo "Scratch directory : $temp_dir" - echo "Save source codes : $source" - echo "Save listings : $list" +usage () +{ + cat 2>&1 << EOF + + Usage: $myname model_dir + Required: + model_dir : path to model dir of WW3 source +EOF +} + + +# Get required arguments + if [ ! $# = 0 ] + then + main_dir="$1" ; shift + else + usage + exit 1 + fi + +# Convert main_dir to absolute path + main_dir="`cd $main_dir 1>/dev/null 2>&1 && pwd`" + + # Set Cray compiler variant: CCE (Cray Compiler Environment) or GNU. # - ukmo_cray[_debug] : Cray Fortan (Cray Compiler Environment) @@ -43,7 +56,6 @@ # - ukmo_cray_intel[_dubug] : Ifort using cray wrapper # Note: currently, Cray Fortran fails with some PDLIB regrests cmplr="ukmo_cray_gnu" - export cmplOption='y' # 1. Set up for compilation environemnt on Cray XC (broadwell processors) echo '#!/bin/bash' > matrix.head @@ -107,12 +119,7 @@ fi export nr='4' export nth='4' - if [ "$cmplOption" = 'y' ] - then - export rtst="./bin/run_cmake_test -o both -c $cmplr -S" - else - export rtst="./bin/run_cmake_test -o both -S" - fi + export rtst="./bin/run_cmake_test -o both -S" export ww3='../model' @@ -169,6 +176,8 @@ fi $main_dir/../regtests/bin/matrix.base + $main_dir/../regtests/bin/matrix_divider_cmake.sh + # --------------------------------------------------------------------------- # # End to the matrix # # --------------------------------------------------------------------------- # diff --git a/regtests/bin/matrix_divider_cmake.sh b/regtests/bin/matrix_divider_cmake.sh index d05cdd561..b88638911 100755 --- a/regtests/bin/matrix_divider_cmake.sh +++ b/regtests/bin/matrix_divider_cmake.sh @@ -67,57 +67,63 @@ rm matrix.tmp # parallel jobs count=0 for i in `seq -f '%02g' 0 "$((matrixno1 - 1))"`; do -#echo $i -#Replace matrix.out > matrix?.out, model > model? (( count = count + 1 )) - if [ -f "matrix${count}" ]; then rm -f matrix${count}; fi - cat before >> matrix${count} - cat list_mpi_$i >> matrix${count} - sed -i 's/'matrix.out'/'matrix${count}.out'/gI' matrix${count} - echo " echo ' '" >> matrix${count} - echo " echo ' **************************************************************'" >> matrix${count} - echo " echo ' * end of WAVEWATCH III matrix${count} of regression tests *'" >> matrix${count} - echo " echo ' **************************************************************'" >> matrix${count} - echo " echo ' '" >> matrix${count} - echo " matrix${count} prepared" + countf=$(printf %02i $count) + if [ -f "matrix${countf}" ]; then rm -f matrix${countf}; fi + cat before >> matrix${countf} + cat list_mpi_$i >> matrix${countf} + sed -i 's/'matrix.out'/'matrix${countf}.out'/gI' matrix${countf} + sed -i 's/'buildmatrix'/'buildmatrix${countf}'/gI' matrix${countf} + sed -i 's/'ww3_regtest'/'ww3_regtest_${countf}'/gI' matrix${countf} + echo ' [[ -d ${path_build_root} ]] && rm -rf ${path_build_root}*' >> matrix${countf} + echo " echo ' '" >> matrix${countf} + echo " echo ' **************************************************************'" >> matrix${countf} + echo " echo ' * end of WAVEWATCH III matrix${countf} of regression tests *'" >> matrix${countf} + echo " echo ' **************************************************************'" >> matrix${countf} + echo " echo ' '" >> matrix${countf} + echo " matrix${countf} prepared" done # --------------------------------------------------------------------------- # # parallel jobs +OMP/OMPH for i in `seq -f '%02g' 0 "$((matrixno2 - 1))"`; do -#echo $i -#Replace matrix.out > matrix?.out, model > model? (( count = count + 1 )) - if [ -f "matrix${count}" ]; then rm -f matrix${count}; fi - cat before >> matrix${count} - cat list_omp_$i >> matrix${count} - sed -i 's/'matrix.out'/'matrix${count}.out'/gI' matrix${count} - echo " echo ' '" >> matrix${count} - echo " echo ' **************************************************************'" >> matrix${count} - echo " echo ' * end of WAVEWATCH III matrix${count} of regression tests *'" >> matrix${count} - echo " echo ' **************************************************************'" >> matrix${count} - echo " echo ' '" >> matrix${count} - echo " matrix${count} prepared" + countf=$(printf %02i $count) + if [ -f "matrix${countf}" ]; then rm -f matrix${countf}; fi + cat before >> matrix${countf} + cat list_omp_$i >> matrix${countf} + sed -i 's/'matrix.out'/'matrix${countf}.out'/gI' matrix${countf} + sed -i 's/'buildmatrix'/'buildmatrix${countf}'/gI' matrix${countf} + sed -i 's/'ww3_regtest'/'ww3_regtest_${countf}'/gI' matrix${countf} + echo ' [[ -d ${path_build_root} ]] && rm -rf ${path_build_root}*' >> matrix${countf} + echo " echo ' '" >> matrix${countf} + echo " echo ' **************************************************************'" >> matrix${countf} + echo " echo ' * end of WAVEWATCH III matrix${countf} of regression tests *'" >> matrix${countf} + echo " echo ' **************************************************************'" >> matrix${countf} + echo " echo ' '" >> matrix${countf} + echo " matrix${countf} prepared" done # --------------------------------------------------------------------------- # #serial jobs for i in `seq -f '%02g' 0 "$((matrixno3 - 1))"`; do -#echo $i -#Replace matrix.out > matrix?.out, model > model? (( count = count + 1 )) - if [ -f "matrix${count}" ]; then rm -f matrix${count}; fi - cat before >> matrix${count} - cat list_serial_$i >> matrix${count} - sed -i 's/'matrix.out'/'matrix${count}.out'/gI' matrix${count} - echo " echo ' '" >> matrix${count} - echo " echo ' **************************************************************'" >> matrix${count} - echo " echo ' * end of WAVEWATCH III matrix${count} of regression tests *'" >> matrix${count} - echo " echo ' **************************************************************'" >> matrix${count} - echo " echo ' '" >> matrix${count} - echo " matrix${count} prepared" + countf=$(printf %02i $count) + if [ -f "matrix${countf}" ]; then rm -f matrix${countf}; fi + cat before >> matrix${countf} + cat list_serial_$i >> matrix${countf} + sed -i 's/'matrix.out'/'matrix${countf}.out'/gI' matrix${countf} + sed -i 's/'buildmatrix'/'buildmatrix${countf}'/gI' matrix${countf} + sed -i 's/'ww3_regtest'/'ww3_regtest_${countf}'/gI' matrix${countf} + echo ' [[ -d ${path_build_root} ]] && rm -rf ${path_build_root}*' >> matrix${countf} + echo " echo ' '" >> matrix${countf} + echo " echo ' **************************************************************'" >> matrix${countf} + echo " echo ' * end of WAVEWATCH III matrix${countf} of regression tests *'" >> matrix${countf} + echo " echo ' **************************************************************'" >> matrix${countf} + echo " echo ' '" >> matrix${countf} + echo " matrix${countf} prepared" done # --------------------------------------------------------------------------- # @@ -125,34 +131,42 @@ count=0 #ww3_tp2.14 is separated, as it has dependency. #ww3_tp2.17 and ww3_tp2.21 is separated, as it takes a long time to finish (( count = count + 1 )) - if [ -f "matrix${count}" ]; then rm -f matrix${count}; fi - cat before >> matrix${count} - cat list_heavy >> matrix${count} - sed -i 's/'matrix.out'/'matrix${count}.out'/gI' matrix${count} - echo " echo ' '" >> matrix${count} - echo " echo ' **************************************************************'" >> matrix${count} - echo " echo ' * end of WAVEWATCH III matrix${count} of regression tests *'" >> matrix${count} - echo " echo ' **************************************************************'" >> matrix${count} - echo " echo ' '" >> matrix${count} - echo " matrix${count} prepared" + countf=$(printf %02i $count) + if [ -f "matrix${countf}" ]; then rm -f matrix${countf}; fi + cat before >> matrix${countf} + cat list_heavy >> matrix${countf} + sed -i 's/'matrix.out'/'matrix${countf}.out'/gI' matrix${countf} + sed -i 's/'buildmatrix'/'buildmatrix${countf}'/gI' matrix${countf} + sed -i 's/'ww3_regtest'/'ww3_regtest_${countf}'/gI' matrix${countf} + echo ' [[ -d ${path_build_root} ]] && rm -rf ${path_build_root}*' >> matrix${countf} + echo " echo ' '" >> matrix${countf} + echo " echo ' **************************************************************'" >> matrix${countf} + echo " echo ' * end of WAVEWATCH III matrix${countf} of regression tests *'" >> matrix${countf} + echo " echo ' **************************************************************'" >> matrix${countf} + echo " echo ' '" >> matrix${countf} + echo " matrix${countf} prepared" # --------------------------------------------------------------------------- # #ncep operational tests including ww3_ufs and gfsv16 which require a large number of processor/esmf coupler and the ones for grib test are separated (( count = count + 1 )) - if [ -f "matrix${count}" ]; then rm -f matrix${count}; fi - cat before >> matrix${count} - sed -i 's/'n\ 24'/'n\ 140'/gI' matrix${count} - cat list_ufs >> matrix${count} - sed -i 's/'matrix.out'/'matrix${count}.out'/gI' matrix${count} - sed -i 's/'##SBATCH'/'#SBATCH'/gI' matrix${count} - echo " echo ' '" >> matrix${count} - echo " echo ' **************************************************************'" >> matrix${count} - echo " echo ' * end of WAVEWATCH III matrix${count} of regression tests *'" >> matrix${count} - echo " echo ' **************************************************************'" >> matrix${count} - echo " echo ' '" >> matrix${count} - - echo " matrix${count} prepared" + countf=$(printf %02i $count) + if [ -f "matrix${countf}" ]; then rm -f matrix${countf}; fi + cat before >> matrix${countf} + sed -i 's/'n\ 24'/'n\ 140'/gI' matrix${countf} + cat list_ufs >> matrix${countf} + sed -i 's/'matrix.out'/'matrix${countf}.out'/gI' matrix${countf} + sed -i 's/'##SBATCH'/'#SBATCH'/gI' matrix${countf} + sed -i 's/'buildmatrix'/'buildmatrix${countf}'/gI' matrix${countf} + sed -i 's/'ww3_regtest'/'ww3_regtest_${countf}'/gI' matrix${countf} + echo ' [[ -d ${path_build_root} ]] && rm -rf ${path_build_root}*' >> matrix${countf} + echo " echo ' '" >> matrix${countf} + echo " echo ' **************************************************************'" >> matrix${countf} + echo " echo ' * end of WAVEWATCH III matrix${countf} of regression tests *'" >> matrix${countf} + echo " echo ' **************************************************************'" >> matrix${countf} + echo " echo ' '" >> matrix${countf} + + echo " matrix${countf} prepared" # --------------------------------------------------------------------------- # diff --git a/regtests/bin/run_cmake_test b/regtests/bin/run_cmake_test index b50c73613..3aae5dae4 100755 --- a/regtests/bin/run_cmake_test +++ b/regtests/bin/run_cmake_test @@ -1,14 +1,14 @@ #!/bin/bash # --------------------------------------------------------------------------- # # # -# Script for running WW-III tests. # +# Script for running WW3 tests. # # # -# Last update : 21-May-2020 # +# Last update : 21-Apr-2023 # # --------------------------------------------------------------------------- # # Modification history # 27-Jan-2014 : Adapts ww3_ounf section for multigrid ( version 4.18 ) # 04-May-2020 : F. Ardhuin added step 3.b2 for CDL input files ( version 7.12 ) -# 20-April-2021 : A. Abdolali added ww3_grib bulid and execution ( version 7.12 ) +# 20-Apr-2021 : A. Abdolali added ww3_grib bulid and execution ( version 7.12 ) # 21-May-2021 : C. Bunney add support for ALPS job placement ( version 7.12 ) # # Limitations: @@ -43,7 +43,7 @@ errmsg () # 1.b Usage function myname="`basename $0`" #name of script -optstr="a:b:c:C:defg:Ghi:m:n:No:Op:q:r:s:t:STw:" #option string for getopt function +optstr="b:C:dfg:hi:m:n:No:Op:q:r:s:t:STw:" #option string for getopt function usage () { @@ -54,21 +54,15 @@ Required: source_dir : path to top-level of WW3 source test_name : name of test case (directory) Options: - -a ww3_env : use WW3 environment setup file - : *default is /bin/wwatch3.env - : *file will be created if it does not already exist -b batchq : optional setting to determine batch queue type (slurm or alps) - -c cmplr : setup comp & link files for specified cmplr -C coupl : invoke test using coupled application : OASIS : OASIS3-mct ww3_shel coupled application : ESMF : ESMF ww3_multi coupled application -d : invoke main program using gdb (non-parallel) - -e : prompt for changes to existing WW3 environment -f : force pre- and post-processing programs to be compiled : non-MPI (i.e., with SHRD switch); default is all programs : compiled with unmodified switch settings -g grid_string : use ww3_grid_.inp - -G : create GrADS data files using gx_outX.inp -h : print usage and exit -i inpdir : use inputs in test_name/ (default test_name/input) -m grid_set : execute multi-model test @@ -137,24 +131,20 @@ multi=0 dist=0 inpdir=input outopt=native -grads=0 coupl=none batchq=none while : do case "$1" in - -a) shift; ww3_env="$1" ;; -b) shift; batchq="$1" ;; - -c) shift; cmplr="$1" ;; -C) shift; coupl="$1" ;; -d) use_gdb=1 ;; -e) prompt=1 ;; -f) force_shrd=1 ;; -g) shift; grdstr="$1" ;; - -G) grads=1 ;; -h) help=1 ;; -i) shift; inpdir="$1" ;; - -m) shift; grdset="$1" ; + -m) shift; grdset="$1" ; if [ $grdset = none ] then multi=1 @@ -376,10 +366,20 @@ then exit 0 fi +if [ $time_count ] +then # Add time counter if -T + echo " REGTESTS Time counter: run_test $ARGS" >> time_count.txt + Tstart=`date +"%s.%2N"` +fi + +# --------------------------------------------------------------------------- # +# Build all executables +# --------------------------------------------------------------------------- # + if [ $multi -eq 0 ] && [ $coupl = "OASIS" ] then ww3_dir=${path_s}/.. - if $path_i/prep_env.sh $path_i $path_w $cmplr $swtstr $ww3_dir + if $path_i/prep_env.sh $path_i $path_w $swtstr $ww3_dir then : else errmsg "Error occured during WW3 $prog build" @@ -388,10 +388,6 @@ then export OASISDIR=$path_w/work_oasis3-mct fi -# --------------------------------------------------------------------------- # -# Build all executables -# --------------------------------------------------------------------------- # - cd $path_s cd ../ path_cmake="`pwd`" @@ -404,12 +400,13 @@ ofile=$path_w/build.log echo " Building WW3, exes will be in $path_e" echo "Exe directory is $path_e" > $ofile +path_build_root=${path_build_root:-$path_w/build} if [ $force_shrd ] then # build pre- & post-processing programs with SHRD only echo "Forcing a SHRD build" >> $ofile - path_build=$path_w/build_SHRD + path_build=${path_build_root}_SHRD mkdir -p $path_build cd $path_build if [[ "$outopt" = "all" ]] || [[ "$outopt" = "grib" ]] ; @@ -449,42 +446,44 @@ then fi cp $path_build/install/bin/* $path_e/ - - echo "non-SHRD build" >> $ofile - #build without SHRD - path_build=$path_w/build - mkdir -p $path_build - cd $path_build - \cp -f $file_c $path_build/switch - echo "Switch file is $path_build/switch with switches:" >> $ofile - cat $path_build/switch >> $ofile - cmake $path_cmake ${CMAKE_OPTIONS} -DSWITCH=$path_build/switch -DCMAKE_INSTALL_PREFIX=install > $ofile 2>&1 - rc=$? - if [[ $rc -ne 0 ]] ; then - echo "Fatal error in cmake." - echo "The build log is in $ofile" - exit - fi - make -j 8 > $ofile 2>&1 - if [[ $rc -ne 0 ]] ; then - echo "Fatal error in make." - echo "The build log is in $ofile" - exit - fi - make install > $ofile 2>&1 - if [[ $rc -ne 0 ]] ; then - echo "Fatal error in make install." - echo "The build log is in $ofile" - exit - fi - path_e=$path_w/exe - cp $path_build/install/bin/ww3_shel $path_e/ - cp $path_build/install/bin/ww3_multi $path_e/ - cp $path_build/install/bin/ww3_systrk $path_e/ - cp $path_build/install/bin/ww3_prtide $path_e/ - + + if [ $pomp ] || [ $nproc ] + then + echo "non-SHRD build" >> $ofile + #build without SHRD + path_build=${path_build_root} + mkdir -p $path_build + cd $path_build + \cp -f $file_c $path_build/switch + echo "Switch file is $path_build/switch with switches:" >> $ofile + cat $path_build/switch >> $ofile + cmake $path_cmake ${CMAKE_OPTIONS} -DSWITCH=$path_build/switch -DCMAKE_INSTALL_PREFIX=install > $ofile 2>&1 + rc=$? + if [[ $rc -ne 0 ]] ; then + echo "Fatal error in cmake." + echo "The build log is in $ofile" + exit + fi + make -j 8 > $ofile 2>&1 + if [[ $rc -ne 0 ]] ; then + echo "Fatal error in make." + echo "The build log is in $ofile" + exit + fi + make install > $ofile 2>&1 + if [[ $rc -ne 0 ]] ; then + echo "Fatal error in make install." + echo "The build log is in $ofile" + exit + fi + path_e=$path_w/exe + cp $path_build/install/bin/ww3_shel $path_e/ + cp $path_build/install/bin/ww3_multi $path_e/ + cp $path_build/install/bin/ww3_systrk $path_e/ + cp $path_build/install/bin/ww3_prtide $path_e/ + fi else - path_build=$path_w/build + path_build=${path_build_root} mkdir -p $path_build cd $path_build if [[ "$outopt" = "all" ]] || [[ "$outopt" = "grib" ]] ; @@ -519,6 +518,14 @@ else fi echo " Build log is in $ofile" + +if [ $time_count ] +then # Add time counter if -T + Tend=`date +"%s.%2N"` + Maketime=`echo "$Tend - $Tstart" | bc` + cumult_comp=`echo "$Maketime + $cumult_comp" | bc` + printf "\n %8.2f sec compile time" $Maketime >> time_count.txt +fi # --------------------------------------------------------------------------- # # 3. Execute Test # @@ -536,11 +543,6 @@ then fi fi -if [ $time_count ] -then # Add time counter if -T - echo " REGTESTS Time counter: run_test $ARGS" >> time_count.txt -fi - # 3.b Header echo ' ' ; echo ' ' echo ' ================================== ' @@ -654,7 +656,7 @@ then Tend=`date +"%s.%2N"` Maketime=`echo "$Tend - $Tstart" | bc` cumult_run=`echo "$Maketime + $cumult_run" | bc` - printf "\n %8.2f sec run time \n" $Maketime >> time_count.txt + printf "\n $prog \n %8.2f sec run time \n" $Maketime >> time_count.txt fi done @@ -752,7 +754,7 @@ then Tend=`date +"%s.%2N"` Maketime=`echo "$Tend - $Tstart" | bc` cumult_run=`echo "$Maketime + $cumult_run" | bc` - printf "\n %8.2f sec run time \n" $Maketime >> time_count.txt + printf "\n $prog \n %8.2f sec run time \n" $Maketime >> time_count.txt fi done @@ -851,7 +853,7 @@ then Tend=`date +"%s.%2N"` Maketime=`echo "$Tend - $Tstart" | bc` cumult_run=`echo "$Maketime + $cumult_run" | bc` - printf "\n %8.2f sec run time \n" $Maketime >> time_count.txt + printf "\n $prog \n %8.2f sec run time \n" $Maketime >> time_count.txt fi done @@ -950,7 +952,7 @@ then Tend=`date +"%s.%2N"` Maketime=`echo "$Tend - $Tstart" | bc` cumult_run=`echo "$Maketime + $cumult_run" | bc` - printf "\n %8.2f sec run time \n" $Maketime >> time_count.txt + printf "\n $prog \n %8.2f sec run time \n" $Maketime >> time_count.txt fi done @@ -1054,7 +1056,7 @@ then Tend=`date +"%s.%2N"` Maketime=`echo "$Tend - $Tstart" | bc` cumult_run=`echo "$Maketime + $cumult_run" | bc` - printf "\n %8.2f sec run time \n" $Maketime >> time_count.txt + printf "\n $prog \n %8.2f sec run time \n" $Maketime >> time_count.txt fi done @@ -1172,7 +1174,7 @@ then Tend=`date +"%s.%2N"` Maketime=`echo "$Tend - $Tstart" | bc` cumult_run=`echo "$Maketime + $cumult_run" | bc` - printf "\n %8.2f sec run time \n" $Maketime >> time_count.txt + printf "\n $prog \n %8.2f sec run time \n" $Maketime >> time_count.txt fi done @@ -1294,7 +1296,7 @@ then Tend=`date +"%s.%2N"` Maketime=`echo "$Tend - $Tstart" | bc` cumult_run=`echo "$Maketime + $cumult_run" | bc` - printf "\n %8.2f sec run time \n" $Maketime >> time_count.txt + printf "\n $prog \n %8.2f sec run time \n" $Maketime >> time_count.txt fi done @@ -1393,10 +1395,6 @@ then if [ $multi -ge 1 ] && [ $coupl = "ESMF" ] then - if [ $cmplr ] - then - export WW3_COMP=$cmplr - fi if make -C $path_s/esmf $prgb then : else @@ -1525,7 +1523,7 @@ then Tend=`date +"%s.%2N"` Maketime=`echo "$Tend - $Tstart" | bc` cumult_run=`echo "$Maketime + $cumult_run" | bc` - printf "\n %8.2f sec run time \n" $Maketime >> time_count.txt + printf "\n $prog \n %8.2f sec run time \n" $Maketime >> time_count.txt fi fi fi @@ -1607,7 +1605,7 @@ then Tend=`date +"%s.%2N"` Maketime=`echo "$Tend - $Tstart" | bc` cumult_run=`echo "$Maketime + $cumult_run" | bc` - printf "\n %8.2f sec run time \n" $Maketime >> time_count.txt + printf "\n $prog \n %8.2f sec run time \n" $Maketime >> time_count.txt fi fi @@ -1630,17 +1628,6 @@ case $outopt in *) out_progs="" ;; esac -if [ "$grads" = '1' ] -then - out_progs="$out_progs gx_outf" - if [ `ls $path_i | grep '.gs' | wc -l` -gt '0' ] - then - cp $path_i/*.gs . - cp $path_a/cbarn.gs . - cp $path_a/colorset.gs . - fi -fi - for prog in $out_progs do @@ -1854,7 +1841,7 @@ do Tend=`date +"%s.%2N"` Maketime=`echo "$Tend - $Tstart" | bc` cumult_run=`echo "$Maketime + $cumult_run" | bc` - printf "\n %8.2f sec run time \n" $Maketime >> time_count.txt + printf "\n $prog \n %8.2f sec run time \n" $Maketime >> time_count.txt fi @@ -1885,19 +1872,6 @@ case $outopt in *) out_progs="" ;; esac -if [ "$grads" = '1' ] -then - out_progs="$out_progs gx_outp" - if [ `ls $path_i | grep 'gx_outp' | wc -l` -gt '0' ] - then - cp $path_a/cbarn.gs . - cp $path_a/colorset.gs . - cp $path_a/source.gs . - cp $path_a/1source.gs . - cp $path_a/spec.gs . - fi -fi - for prog in $out_progs do @@ -2001,7 +1975,7 @@ do Tend=`date +"%s.%2N"` Maketime=`echo "$Tend - $Tstart" | bc` cumult_run=`echo "$Maketime + $cumult_run" | bc` - printf "\n %8.2f sec run time \n" $Maketime >> time_count.txt + printf "\n $prog \n %8.2f sec run time \n" $Maketime >> time_count.txt fi done @@ -2144,7 +2118,7 @@ do Tend=`date +"%s.%2N"` Maketime=`echo "$Tend - $Tstart" | bc` cumult_run=`echo "$Maketime + $cumult_run" | bc` - printf "\n %8.2f sec run time \n" $Maketime >> time_count.txt + printf "\n $prog \n %8.2f sec run time \n" $Maketime >> time_count.txt fi done @@ -2228,35 +2202,8 @@ then Tend=`date +"%s.%2N"` Maketime=`echo "$Tend - $Tstart" | bc` cumult_run=`echo "$Maketime + $cumult_run" | bc` - printf "\n %8.2f sec run time \n" $Maketime >> time_count.txt + printf "\n $prog \n %8.2f sec run time \n" $Maketime >> time_count.txt fi -# if [ $time_count ] -# then # Add time counter if -T -# Tstart=`date +"%s.%2N"` -# fi -# -# if $path_e/$prog > $ofile -# then -# \rm -f $prog.inp -# for g in $intgl_grids -# do -# if [ -f "out_grd.$g" ] -# then -# model_grids="$model_grids $g" -# fi -# done -# else -# errmsg "Error occured during $path_e/$prog execution" -# exit 1 -# fi -# -# if [ $time_count ] -# then # Add time counter if -T -# Tend=`date +"%s.%2N"` -# Maketime=`echo "$Tend - $Tstart" | bc` -# cumult_run=`echo "$Maketime + $cumult_run" | bc` -# printf "\n %8.2f sec run time \n" $Maketime >> time_count.txt -# fi fi @@ -2344,7 +2291,7 @@ then Tend=`date +"%s.%2N"` Maketime=`echo "$Tend - $Tstart" | bc` cumult_run=`echo "$Maketime + $cumult_run" | bc` - printf "\n %8.2f sec run time \n" $Maketime >> time_count.txt + printf "\n $prog \n %8.2f sec run time \n" $Maketime >> time_count.txt fi fi diff --git a/regtests/ww3_tp2.14/input_oasacm/prep_env.sh b/regtests/ww3_tp2.14/input_oasacm/prep_env.sh index d08dc771b..cbea7f471 100755 --- a/regtests/ww3_tp2.14/input_oasacm/prep_env.sh +++ b/regtests/ww3_tp2.14/input_oasacm/prep_env.sh @@ -1,21 +1,19 @@ #!/bin/bash -e -if [ $# -ne 5 ] +if [ $# -ne 4 ] then echo "need four arguments:" echo '$1 : path_i' echo '$2 : path_w' - echo '$3 : complr' - echo '$4 : switch' - echo '$5 : ww3_dir' + echo '$3 : switch' + echo '$4 : ww3_dir' exit 1 fi path_i=$1 path_w=$2 -cmplr=$3 -swtstr=$4 -ww3_dir=$5 +swtstr=$3 +ww3_dir=$4 echo '' echo ' setup coupling environment' diff --git a/regtests/ww3_tp2.14/input_oasacm2/prep_env.sh b/regtests/ww3_tp2.14/input_oasacm2/prep_env.sh index d08dc771b..cbea7f471 100755 --- a/regtests/ww3_tp2.14/input_oasacm2/prep_env.sh +++ b/regtests/ww3_tp2.14/input_oasacm2/prep_env.sh @@ -1,21 +1,19 @@ #!/bin/bash -e -if [ $# -ne 5 ] +if [ $# -ne 4 ] then echo "need four arguments:" echo '$1 : path_i' echo '$2 : path_w' - echo '$3 : complr' - echo '$4 : switch' - echo '$5 : ww3_dir' + echo '$3 : switch' + echo '$4 : ww3_dir' exit 1 fi path_i=$1 path_w=$2 -cmplr=$3 -swtstr=$4 -ww3_dir=$5 +swtstr=$3 +ww3_dir=$4 echo '' echo ' setup coupling environment' diff --git a/regtests/ww3_tp2.14/input_oasacm4/prep_env.sh b/regtests/ww3_tp2.14/input_oasacm4/prep_env.sh index d08dc771b..cbea7f471 100755 --- a/regtests/ww3_tp2.14/input_oasacm4/prep_env.sh +++ b/regtests/ww3_tp2.14/input_oasacm4/prep_env.sh @@ -1,21 +1,19 @@ #!/bin/bash -e -if [ $# -ne 5 ] +if [ $# -ne 4 ] then echo "need four arguments:" echo '$1 : path_i' echo '$2 : path_w' - echo '$3 : complr' - echo '$4 : switch' - echo '$5 : ww3_dir' + echo '$3 : switch' + echo '$4 : ww3_dir' exit 1 fi path_i=$1 path_w=$2 -cmplr=$3 -swtstr=$4 -ww3_dir=$5 +swtstr=$3 +ww3_dir=$4 echo '' echo ' setup coupling environment' diff --git a/regtests/ww3_tp2.14/input_oasacm5/prep_env.sh b/regtests/ww3_tp2.14/input_oasacm5/prep_env.sh index d08dc771b..cbea7f471 100755 --- a/regtests/ww3_tp2.14/input_oasacm5/prep_env.sh +++ b/regtests/ww3_tp2.14/input_oasacm5/prep_env.sh @@ -1,21 +1,19 @@ #!/bin/bash -e -if [ $# -ne 5 ] +if [ $# -ne 4 ] then echo "need four arguments:" echo '$1 : path_i' echo '$2 : path_w' - echo '$3 : complr' - echo '$4 : switch' - echo '$5 : ww3_dir' + echo '$3 : switch' + echo '$4 : ww3_dir' exit 1 fi path_i=$1 path_w=$2 -cmplr=$3 -swtstr=$4 -ww3_dir=$5 +swtstr=$3 +ww3_dir=$4 echo '' echo ' setup coupling environment' diff --git a/regtests/ww3_tp2.14/input_oasacm6/prep_env.sh b/regtests/ww3_tp2.14/input_oasacm6/prep_env.sh index d08dc771b..cbea7f471 100755 --- a/regtests/ww3_tp2.14/input_oasacm6/prep_env.sh +++ b/regtests/ww3_tp2.14/input_oasacm6/prep_env.sh @@ -1,21 +1,19 @@ #!/bin/bash -e -if [ $# -ne 5 ] +if [ $# -ne 4 ] then echo "need four arguments:" echo '$1 : path_i' echo '$2 : path_w' - echo '$3 : complr' - echo '$4 : switch' - echo '$5 : ww3_dir' + echo '$3 : switch' + echo '$4 : ww3_dir' exit 1 fi path_i=$1 path_w=$2 -cmplr=$3 -swtstr=$4 -ww3_dir=$5 +swtstr=$3 +ww3_dir=$4 echo '' echo ' setup coupling environment' diff --git a/regtests/ww3_tp2.14/input_oasicm/prep_env.sh b/regtests/ww3_tp2.14/input_oasicm/prep_env.sh index d08dc771b..cbea7f471 100755 --- a/regtests/ww3_tp2.14/input_oasicm/prep_env.sh +++ b/regtests/ww3_tp2.14/input_oasicm/prep_env.sh @@ -1,21 +1,19 @@ #!/bin/bash -e -if [ $# -ne 5 ] +if [ $# -ne 4 ] then echo "need four arguments:" echo '$1 : path_i' echo '$2 : path_w' - echo '$3 : complr' - echo '$4 : switch' - echo '$5 : ww3_dir' + echo '$3 : switch' + echo '$4 : ww3_dir' exit 1 fi path_i=$1 path_w=$2 -cmplr=$3 -swtstr=$4 -ww3_dir=$5 +swtstr=$3 +ww3_dir=$4 echo '' echo ' setup coupling environment' diff --git a/regtests/ww3_tp2.14/input_oasocm/prep_env.sh b/regtests/ww3_tp2.14/input_oasocm/prep_env.sh index d08dc771b..cbea7f471 100755 --- a/regtests/ww3_tp2.14/input_oasocm/prep_env.sh +++ b/regtests/ww3_tp2.14/input_oasocm/prep_env.sh @@ -1,21 +1,19 @@ #!/bin/bash -e -if [ $# -ne 5 ] +if [ $# -ne 4 ] then echo "need four arguments:" echo '$1 : path_i' echo '$2 : path_w' - echo '$3 : complr' - echo '$4 : switch' - echo '$5 : ww3_dir' + echo '$3 : switch' + echo '$4 : ww3_dir' exit 1 fi path_i=$1 path_w=$2 -cmplr=$3 -swtstr=$4 -ww3_dir=$5 +swtstr=$3 +ww3_dir=$4 echo '' echo ' setup coupling environment'