1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293
|
#! /bin/csh -f
# run the full benchmark suite
# *sh* 1/93 - writes errors to separate file
# *sh* 10/93 - added alpha support
# *sh* 9/94 - eliminated "-n" from echo lines
# *sh* 1/95 - version bn320
# *sh* 3/95 - version bn400
# *sh* 6/95 - version bn401 - with symbols
# *sh* 9/95 - version bn420 - with LET/D
# *sh* 1/96 - - and bn420_stream
# *sh* 5/96 - version bn430 - added bn430_IF
# *kob* 8/96- hp uses ftn41 instead of fort.41, so added a check for that
# *kob* 11/96 - add check for batch functionality. After original ferret
# exits, unset DISPLAY env variable and run ferret with simple,
# non-graphical commands.
# this procedure will destroy all temporary files (cdf, ez, and metafiles)
# produced by the previous runs. It will not destroy the log file, however.
# *sh* 1/97 - write benchmark version into output log
# *sh* 7/97 - query and write user comment into log
# *sh* 1/98 - run bn490_all by default
# *kob* 2/98 - run bn491_all by default
# *kob* 4/98 - add status check after running bnxxx_all to prevent continuation
# of bench run
# *sh* 2/99 - run bn500_all by default
# *sh* request the EF directory. Benchmark versions no longer exist -- use CVS
# *sh* log the header information to a single benchmark history file
# acm 4/05 added more .plt files for metafile checking, but fewer bnplot.plt files
# (bn_curv now saves only one).
# acm 9/06 Change so that all ncdump output is directed to a file all_ncdump.out.
# append this to the log file
# acm* 1/14 Change the order of the questions asked: test efs? If so what directory are they in?
# Also list the contents of the external fucntions directory
# *sh* 3/17 Check for corruption warnings in the error log
# *acm* 7/19 Do a make clean before starting, cleaning up tmp/ files for consistent log output.
#
# usage % run_all
# unable to redirect input on Solaris
# to run benchmark on solaris:
# 1 cd into bench directory
# 2 umask 002
# 3 rm snoopy.dat test.dat test.gt test.unf WV.J34K56L7 F*.cdf test*.cdf newjournal.jnl fort.41 ppllist.out newjournal.jnl bench.mgm
# 4 (/home/corona/tmap/ferret_link/fer/ferretxgks >all_29jan91att1204.xsol_log) >& all_29jan91att1204.xsol_err
# V420: ln -s $machine_stream stream_data_link.unf
# 5 GO bn301_all
# 6 when done sed 's/@ASFERRET .*Ver.*$/@ASFERRET ... whatever version number .../' <fort.41 >all_29jan91att1204.sol_plt
# NOTE!!!: The netCDF benchmark will fail if run over an nfs mounted disk.
# (incompatibility between OSF and Solaris)
# node corona has been set up to run the NetCDF benchmark in ~/local_bench
# as follows:
# rm *.cdf
# ( ../ferret_link/fer/ferretxgks > bn230_cdf_29jul94.log ) > & bn230_cdf_29jul94.err
# GO bn230_cdf; quit
# compare with bn230_cdf_ALPHA_reference.*
#
# for now you must also manually check the benchmark bn311_ez_order
# *sh* 4/2015 automatically run clean_draconian at the end
setenv HOSTTYPE debian
umask 002 # make all files group deletable 3/16
set rhlev = "0"
if ( (`uname -s` == "Linux") && (`uname -m` == "x86_64") ) then
set machine = "x86_64-linux"
if ( `uname -r` =~ *el6* ) then
set rhlev = "six"
endif
else if ( (`uname -s` == "Linux") && (`uname -m` == "i686") ) then
set machine = "linux"
else if ( (`uname -s` == "Darwin") && (`uname -m` == "x86_64") ) then
set machine = "x86_64-darwin"
else
set machine = "unknown_host"
endif
if ($rhlev == six) then
echo six
endif
# echo "Enter the path (including filename) to the FERRET version of choice"
set fver /usr/bin/ferret_c
set fver = $<
if ( ! -e $fver ) then
echo File $fver not exist.
exit 0
endif
# XGKS version ? (use "xg" as the indicator)
echo $fver | grep -s "xg"
if ( $status == 0 ) then
set machine = "x$machine"
endif
#acm remove extra question about running external-functions tests
# if running ef tests, which external function libraries to use
set efdir = n
echo "Enter the directory containing the external function libraries or . to skip those tests"
set efdir = /usr/lib/ferret-vis/external_functions
if ( $efdir == "." ) then
set do_shared_obj = "n"
else
set do_shared_obj = "y"
echo "Contents of "$efdir "fcns a* :"
echo " "
ls -1 $efdir/a*
echo " "
endif
# background info to go in the benchmark file
echo "Enter your name"
set bmarker = "Debian Buildbot"
echo $bmarker
echo "Enter comment about this benchmark or this version of Ferret"
# *kob* 4.01 linux needs quotes around the input or spaces throw it off
set bcomment = "Automated Debian tests"
echo $bcomment
set date_stamp = `date +'%d%h%yAT%H%M'|tr '[A-Z]' '[a-z]'`
set log_file = "all_${date_stamp}.${machine}_log"
set err_file = "all_${date_stamp}.${machine}_err"
set ncdump_file = "all_ncdump.out"
rm -f $ncdump_file
echo " " > $ncdump_file
# For consistent log output, remove tmp files
make clean
#set up external functions search path
setenv FER_EXTERNAL_FUNCTIONS $efdir
setenv PYFER_EXTERNAL_FUNCTIONS $efdir
# set up the binary unformatted stream test file as a machine-specific link
set machine_stream = "data/stream10by5_{$machine}.unf"
if ( ! -e $machine_stream ) then
echo File $machine_stream does not exist.
echo Benchmark bn420_stream will fail.
echo To create $machine_stream compile and run make_stream_file.F
echo Then rename stream10by5.unf to $machine_stream
echo -n 'Continue anyway? (answer "y" for yes)'
set answer = "y"
if ($answer != "y") exit 0
endif
rm -f stream_data_link.unf
ln -s $machine_stream stream_data_link.unf
# set up descriptors for mc data files. this necessary because linux/F90
# requires a different format of input for the namelist reads. *kob* 4/99
# if ($machine == "linux") then
# foreach file (coads*.des_template)
# ./linuxize_descriptors $file >! $file:r.des
# end
# else
# foreach file (coads*.des_template)
# cp -f $file $file:r.des
# end
# endif
#set up proper stream testing jnl file - depends on endianness
rm -f bn_test_stream.jnl
# most everything little-endian now
# if ($machine == "linux" || $machine == "alp" || $machine == "x86_64-linux" || $machine == "ia64-linux") then
ln -s v5jnls/bn_test_stream_little.jnl bn_test_stream.jnl
# else
# ln -s v5jnls/bn_test_stream_big.jnl bn_test_stream.jnl
# endif
#Set up for metafile/gif testing
set check_met = check_metafiles_rh6
echo "Log output in $log_file Errors in $err_file"
echo "Procedure run_all to run all FERRET benchmarks" >&$log_file
echo "Running FERRET version $fver" >>&$log_file
ls -l $fver >>&$log_file
if ( $do_shared_obj == "y" ) then
echo "Using external functions from $efdir" >>&$log_file
echo "Running the tests of external functions $do_shared_obj" >>&$log_file
else
echo "Not running the tests of external functions " >>&$log_file
endif
echo "Benchmark run by $bmarker" >>&$log_file
echo "Note: $bcomment" >>&$log_file
echo "ncdump output will be in $ncdump_file, and appended to this log file " >>&$log_file
#set up a generic data environment
echo "***** Restricting Ferret paths to bench directory *****" >>&$log_file
source bench_environment.csh >>&$log_file
Fenv >>&$log_file
# put a record of this benchmark run into the benchmark log file
set bench_hist = "benchmark_history.log"
echo " " >>& $bench_hist
echo " " >>& $bench_hist
echo "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ " >>& $bench_hist
echo "Log output in $log_file Errors in $err_file" >>& $bench_hist
ls -l $fver >>&$bench_hist
echo "Using external functions from $efdir" >>&$bench_hist
echo "Benchmark run by $bmarker" >>&$bench_hist
echo "Note: $bcomment" >>&$bench_hist
touch F.cdf snoopy.dat
set temp_files = "test.dat test.gt test.unf WV.J34K56L7 F*.cdf test*.cdf newjournal.jnl fort.41 bench.mgm"
foreach file ($temp_files)
rm -f $file
end
# 10/97 *kob* mv last created bnplot files to the last_plot directory
mv -f *.png* last_plot
mv -f *.pdf* last_plot
mv -f *.ps* last_plot
mv -f *.eps* last_plot
set now = `date`
echo "Beginning at $now" >>&$log_file
cp $log_file $err_file
echo "Beginning at $now"
($fver -nodisplay -script genjnls/bn_all_shell.jnl >>$log_file) >>&$err_file
# check status before continuing *kob* 4/98
if ($status) then
echo "FERRET ERROR in benchmark run ****** exiting from run.sh ******" >>$log_file
exit 1
endif
# 5/05 *acm* run tests of externally-linked external functions
if ( $do_shared_obj == "y" ) then
($fver -gif < genjnls/bn_all_ef_shell.jnl >>$log_file) >>&$err_file
endif
# Append the ncdump output file to the log file
echo " " >>&$log_file
echo "-----" >>&$log_file
echo "Appending ncdump output" >>&$log_file
cat $ncdump_file >>& $log_file
echo "-----" >>&$log_file
echo "end of ncdump output" >>&$log_file
echo " " >>&$log_file
echo "about to run test of .ferret script"
if (-e $HOME/.ferret) then
rm -f ./keep.ferret
cp $HOME/.ferret ./keep.ferret
rm -f $HOME/.ferret
endif
cp -f ferret_startup $HOME/.ferret
($fver -gif < genjnls/bn_startupfile_shell.jnl >> $log_file) >>& $err_file
rm -f $HOME/.ferret
if (-e keep.ferret) then
mv keep.ferret $HOME/.ferret
endif
set hold_display = $DISPLAY
unsetenv DISPLAY
echo "Display no longer set, about to run batch gif test"
($fver -gif < genjnls/bn_gif_shell.jnl >> $log_file) >>& $err_file
echo "Display still not set, about to run batch ps test"
($fver -batch bnplot.ps < genjnls/bn_ps_shell.jnl >> $log_file) >>& $err_file
echo "Display still not set, about to run batch metafile test"
($fver -batch bat.plt < genjnls/bn_batch_metafile_shell.jnl >> $log_file) >>& $err_file
setenv DISPLAY $hold_display
#echo "Display now set to "$DISPLAY >>&$log_file
set now = `date`
echo "Ended at $now" >>&$err_file
echo "Ended at $now" >>&$log_file
echo "Ended at $now"
#Note about checking transparency
echo "open test_trans.html in a browser to test transparency option in gif mode. The continents should be gray"
# save size of log file as part of the history record
ls -l $log_file >>& $bench_hist
#let's check the plt and gif and ps files to make sure they look okay
echo "Checking PNG and PDF files......."
rm bat.png new.png
./check_runall_plots_ImageMagick
# make a clean version of the log file that can easily be compared
./clean_draconian $log_file
# check for corruption warnings ("crptn") in the error log
grep -q "crptn" $err_file
set captured_status = $status
if ( $captured_status == 0 ) echo "*** CORRUPTION WARNINGS FOUND IN ERROR LOG ***"
|