netcdf-c/nc_test4/run_bm_ar4.sh
Dennis Heimbigner 3db4f013bf Primary change: add dap4 support
Specific changes:
1. Add dap4 code: libdap4 and dap4_test.
   Note that until the d4ts server problem is solved, dap4 is turned off.
2. Modify various files to support dap4 flags:
	configure.ac, Makefile.am, CMakeLists.txt, etc.
3. Add nc_test/test_common.sh. This centralizes
   the handling of the locations of various
   things in the build tree: e.g. where is
   ncgen.exe located. See nc_test/test_common.sh
   for details.
4. Modify .sh files to use test_common.sh
5. Obsolete separate oc2 by moving it to be part of
   netcdf-c. This means replacing code with netcdf-c
   equivalents.
5. Add --with-testserver to configure.ac to allow
   override of the servers to be used for --enable-dap-remote-tests.
6. There were multiple versions of nctypealignment code. Try to
   centralize in libdispatch/doffset.c and include/ncoffsets.h
7. Add a unit test for the ncuri code because of its complexity.
8. Move the findserver code out of libdispatch and into
   a separate, self contained program in ncdap_test and dap4_test.
9. Move the dispatch header files (nc{3,4}dispatch.h) to
   .../include because they are now shared by modules.
10. Revamp the handling of TOPSRCDIR and TOPBUILDDIR for shell scripts.
11. Make use of MREMAP if available
12. Misc. minor changes e.g.
	- #include <config.h> -> #include "config.h"
	- Add some no-install headers to /include
	- extern -> EXTERNL and vice versa as needed
	- misc header cleanup
	- clean up checking for misc. unix vs microsoft functions
13. Change copyright decls in some files to point to LICENSE file.
14. Add notes to RELEASENOTES.md
2017-03-08 17:01:10 -07:00

95 lines
2.2 KiB
Bash
Executable File

#!/bin/sh
# This shell runs a bunch of benchmarks on some specific files
# available at Unidata. If you want to run this shell, you need these
# data files.
# This script gets and benchmarks against some AR4 data.
# $Id: run_bm_ar4.sh,v 1.4 2010/01/11 19:27:11 ed Exp $
set -e
echo ""
#file_list="pr_A1.20C3M_8.CCSM.atmm.1870-01_cat_1999-12.nc tauu_A1.20C3M_8.CCSM.atmm.1870-01_cat_1999-12.nc thetao_O1.SRESA1B_2.CCSM.ocnm.2000-01_cat_2099-12.nc usi_O1.20C3M_8.CCSM.icem.1870-01_cat_1999-12.nc"
#file_list="pr_A1.20C3M_8.CCSM.atmm.1870-01_cat_1999-12.nc tauu_A1.20C3M_8.CCSM.atmm.1870-01_cat_1999-12.nc usi_O1.20C3M_8.CCSM.icem.1870-01_cat_1999-12.nc"
file_list="pr_A1.20C3M_8.CCSM.atmm.1870-01_cat_1999-12.nc"
echo " *** Getting sample AR4 files $file_list"
# Get the files.
for f1 in $file_list
do
if ! test -f $f1; then
wget ftp://ftp.unidata.ucar.edu/pub/netcdf/sample_data/ar4/$f1.gz
gunzip $f1.gz
fi
done
echo "SUCCESS!!!"
out='run_bm_ar4_pr_out.csv'
rm -rf $out
echo " *** Benchmarking pr_A1 file with various chunksizes (output to ${out})..."
# Create netCDF-4 versions of the file, with different chunksizes.
h=-h
s=0
pr_ar4_sample="pr_A1.20C3M_8.CCSM.atmm.1870-01_cat_1999-12.nc"
file_num=0
for d in -1
do
for c0 in 4 8 16 32 64
do
for c1 in 64
do
for c2 in 128
do
if test $d = -1; then
file_out="pr_A1_${c0}_${c1}_${c2}.nc"
else
file_out="pr_A1_z${d}_${c0}_${c1}_${c2}.nc"
fi
out_files="$out_files $file_out"
# If the output file does not yet exist, create it.
if test -f $file_out; then
echo "found existing $file_out"
else
cmd="${execdir}/bm_file $h -f 3 -c 6:${d}:${s}:${c0}:${c1}:${c2} -o ${file_out} ${pr_ar4_sample}"
echo "cmd=$cmd"
# bash ./clear_cache.sh
if ! ($cmd >> $out); then
exit 1;
fi
fi
# Turn off header next time around.
h=
done
done
done
done
echo $out_files
# Do the horizonatal runs.
#bash ./clear_cache.sh
${execdir}/tst_ar4 -h $pr_ar4_sample
for f1 in $out_files
do
# bash ./clear_cache.sh
${execdir}/tst_ar4 ${f1}
done
# Do the timeseries runs.
#bash ./clear_cache.sh
${execdir}/tst_ar4 -t -h $pr_ar4_sample
for f1 in $out_files
do
# bash ./clear_cache.sh
${execdir}/tst_ar4 -t ${f1}
done
echo "SUCCESS!!!"
exit 0