| 1 |
#! /usr/bin/env bash |
| 2 |
# Copyright(C) 1999-2021, 2023, 2024 National Technology & Engineering Solutions |
| 3 |
# of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with |
| 4 |
# NTESS, the U.S. Government retains certain rights in this software. |
| 5 |
# |
| 6 |
# See packages/seacas/LICENSE for details |
| 7 |
|
| 8 |
# script to run all tests and compare them to saved dump files. |
| 9 |
# |
| 10 |
# To run the tests with valgrind checking, uncomment the next line and comment the |
| 11 |
# following line. Can also define other prefixes if wanted. |
| 12 |
|
| 13 |
if [ "$1" == "" ]; then |
| 14 |
mkdir -p nc3; cd nc3 |
| 15 |
fi |
| 16 |
if [ "$1" == "netcdf4" ]; then |
| 17 |
export EXODUS_NETCDF4=quiet |
| 18 |
mkdir -p nc4; cd nc4 |
| 19 |
fi |
| 20 |
if [ "$1" == "netcdf5" ]; then |
| 21 |
export EXODUS_NETCDF5=quiet |
| 22 |
mkdir -p nc5; cd nc5 |
| 23 |
fi |
| 24 |
|
| 25 |
|
| 26 |
#set PREFIX = "valgrind --tool=memcheck" |
| 27 |
PREFIX="" |
| 28 |
SUFFIX="" |
| 29 |
BINDIR=@CMAKE_CURRENT_BINARY_DIR@ |
| 30 |
SRCDIR=@CMAKE_CURRENT_SOURCE_DIR@ |
| 31 |
NCDUMP=@NETCDF_NCDUMP@ |
| 32 |
THREAD_SAFE=@SEACASExodus_ENABLE_THREADSAFE@ |
| 33 |
|
| 34 |
DIFF="diff -w" |
| 35 |
|
| 36 |
ret_status=0 |
| 37 |
rm -f test.output |
| 38 |
echo "testwt - single precision write test..." |
| 39 |
echo "begin testwt" > test.output |
| 40 |
${PREFIX} ${BINDIR}/testwt${SUFFIX} >> test.output |
| 41 |
ret_status=$((ret_status+$?)) |
| 42 |
# Filter out the "maximum_name_length" attribute. Moves around in ncdump output for nc4 vs nc3 |
| 43 |
${NCDUMP} -d5,5 test.exo | grep -v version | grep -v int64_status| grep -v _FillValue |grep -v word_size|grep -v maximum_name_length | ${DIFF} - ${SRCDIR}/test.dmp | tee testwt.res |
| 44 |
ret_status=$((ret_status+${PIPESTATUS[0]}+${PIPESTATUS[6]})) |
| 45 |
echo "end testwt, status = $ret_status" >> test.output |
| 46 |
|
| 47 |
echo "testrd - single precision read test..." |
| 48 |
echo "begin testrd" >> test.output |
| 49 |
${PREFIX} ${BINDIR}/testrd${SUFFIX} | grep -v version | ${DIFF} - ${SRCDIR}/testrd.dmp | tee testrd.res |
| 50 |
ret_status=$((ret_status+${PIPESTATUS[0]}+${PIPESTATUS[2]})) |
| 51 |
echo "end testrd, status = $ret_status" >> test.output |
| 52 |
|
| 53 |
echo "testcp_ss - single-to-single precision copy test..." |
| 54 |
echo "begin testcp_ss" >> test.output |
| 55 |
${PREFIX} ${BINDIR}/testcp${SUFFIX} >> test.output |
| 56 |
ret_status=$((ret_status+$?)) |
| 57 |
${NCDUMP} -d5,5 testcp.exo | grep -v version | grep -v int64_status| grep -v _FillValue |grep -v word_size| ${DIFF} - ${SRCDIR}/testcp_ss.dmp | tee testcp_ss.res |
| 58 |
ret_status=$((ret_status+${PIPESTATUS[0]}+${PIPESTATUS[5]})) |
| 59 |
echo "end testcp_ss, status = $ret_status" >> test.output |
| 60 |
|
| 61 |
echo "testcp_sd - single-to-double precision copy test..." |
| 62 |
echo "begin testcp_sd" >> test.output |
| 63 |
${PREFIX} ${BINDIR}/testcpd${SUFFIX} >> test.output |
| 64 |
ret_status=$((ret_status+$?)) |
| 65 |
${NCDUMP} -d5,5 testcpd.exo | grep -v version | grep -v int64_status| grep -v _FillValue |grep -v word_size| ${DIFF} - ${SRCDIR}/testcp_sd.dmp | tee testcp_sd.res |
| 66 |
ret_status=$((ret_status+${PIPESTATUS[0]}+${PIPESTATUS[5]})) |
| 67 |
echo "end testcp_sd, status = $ret_status" >> test.output |
| 68 |
|
| 69 |
echo "testcp_nl - normal_model to large_model single precision copy test..." |
| 70 |
echo "begin testcp_nl" >> test.output |
| 71 |
${PREFIX} ${BINDIR}/testcp_nl${SUFFIX} >> test.output |
| 72 |
ret_status=$((ret_status+$?)) |
| 73 |
${NCDUMP} -d5,5 testcp_nl.exo | grep -v version | grep -v int64_status| grep -v _FillValue |grep -v word_size| ${DIFF} - ${SRCDIR}/testcp_nl.dmp | tee testcp_nl.res |
| 74 |
ret_status=$((ret_status+${PIPESTATUS[0]}+${PIPESTATUS[5]})) |
| 75 |
echo "end testcp_nl, status = $ret_status" >> test.output |
| 76 |
|
| 77 |
echo "testcp_transient - copy mesh and transient data..." |
| 78 |
echo "begin testcp_tran" >> test.output |
| 79 |
${PREFIX} ${BINDIR}/testcp_tran${SUFFIX} >> test.output |
| 80 |
ret_status=$((ret_status+$?)) |
| 81 |
${NCDUMP} -d5,5 testcp.exo | grep -v version | grep -v int64_status| grep -v _FillValue |grep -v word_size| ${DIFF} - ${SRCDIR}/testcp_tran.dmp | tee testcp_tran.res |
| 82 |
ret_status=$((ret_status+${PIPESTATUS[0]}+${PIPESTATUS[5]})) |
| 83 |
echo "end testcp_tran, status = $ret_status" >> test.output |
| 84 |
|
| 85 |
echo "testwt_clb - single precision write test using concatenated puts..." |
| 86 |
echo "begin testwt_clb" >> test.output |
| 87 |
${PREFIX} ${BINDIR}/testwt_clb${SUFFIX} >> test.output |
| 88 |
ret_status=$((ret_status+$?)) |
| 89 |
${NCDUMP} -d5,5 test.exo | grep -v version | grep -v int64_status| grep -v _FillValue |grep -v word_size| ${DIFF} - ${SRCDIR}/test_clb.dmp | tee testwt_clb.res |
| 90 |
ret_status=$((ret_status+${PIPESTATUS[0]}+${PIPESTATUS[5]})) |
| 91 |
echo "end testwt_clb, status = $ret_status" >> test.output |
| 92 |
|
| 93 |
echo "testwtd - double precision write test..." |
| 94 |
echo "begin testwtd" >> test.output |
| 95 |
${PREFIX} ${BINDIR}/testwtd${SUFFIX} >> test.output |
| 96 |
ret_status=$((ret_status+$?)) |
| 97 |
${NCDUMP} -d5,5 test.exo | grep -v version | grep -v int64_status| grep -v _FillValue |grep -v word_size| ${DIFF} - ${SRCDIR}/testd.dmp | tee testwtd.res |
| 98 |
ret_status=$((ret_status+${PIPESTATUS[0]}+${PIPESTATUS[5]})) |
| 99 |
echo "end testwtd, status = $ret_status" >> test.output |
| 100 |
|
| 101 |
echo "testrdd - double precision read test..." |
| 102 |
echo "begin testrdd" >> test.output |
| 103 |
${PREFIX} ${BINDIR}/testrdd${SUFFIX} | grep -v version | ${DIFF} - ${SRCDIR}/testrdd.dmp | tee testrdd.res |
| 104 |
ret_status=$((ret_status+${PIPESTATUS[0]}+${PIPESTATUS[2]})) |
| 105 |
echo "end testrdd, status = $ret_status" >> test.output |
| 106 |
|
| 107 |
echo "testcp_dd - double-to-double precision copy test..." |
| 108 |
echo "begin testcp_dd" >> test.output |
| 109 |
${PREFIX} ${BINDIR}/testcpd${SUFFIX} >> test.output |
| 110 |
ret_status=$((ret_status+$?)) |
| 111 |
${NCDUMP} -d5,5 testcpd.exo | grep -v version | grep -v int64_status| grep -v _FillValue |grep -v word_size| ${DIFF} - ${SRCDIR}/testcp_dd.dmp | tee testcp_dd.res |
| 112 |
ret_status=$((ret_status+${PIPESTATUS[0]}+${PIPESTATUS[5]})) |
| 113 |
echo "end testcp_dd, status = $ret_status" >> test.output |
| 114 |
|
| 115 |
echo "testcp_ds - double-to-single precision copy test..." |
| 116 |
echo "begin testcp_ds" >> test.output |
| 117 |
${PREFIX} ${BINDIR}/testcp${SUFFIX} >> test.output |
| 118 |
ret_status=$((ret_status+$?)) |
| 119 |
${NCDUMP} -d5,5 testcp.exo | grep -v version | grep -v int64_status| grep -v _FillValue |grep -v word_size| ${DIFF} - ${SRCDIR}/testcp_ds.dmp | tee testcp_ds.res |
| 120 |
ret_status=$((ret_status+${PIPESTATUS[0]}+${PIPESTATUS[5]})) |
| 121 |
echo "end testcp_ds, status = $ret_status" >> test.output |
| 122 |
|
| 123 |
echo "testwtd-to-f - double precision compute, convert to single precision on disk..." |
| 124 |
echo "begin testwtd-to-f" >> test.output |
| 125 |
${PREFIX} ${BINDIR}/testwtd-to-f${SUFFIX} >> test.output |
| 126 |
ret_status=$((ret_status+$?)) |
| 127 |
${NCDUMP} -d5,5 test.exo | grep -v version | grep -v int64_status| grep -v _FillValue |grep -v word_size|grep -v maximum_name_length | ${DIFF} - ${SRCDIR}/test.dmp | tee testwtd-to-f.res |
| 128 |
ret_status=$((ret_status+${PIPESTATUS[0]}+${PIPESTATUS[6]})) |
| 129 |
echo "end testwtd-to-f, status = $ret_status" >> test.output |
| 130 |
|
| 131 |
echo "testwt1 - single precision write files with several side sets..." |
| 132 |
echo "testwt1 ... [Expect WEDGE6 warning from this test]" |
| 133 |
echo "begin testwt1" >> test.output |
| 134 |
${PREFIX} ${BINDIR}/testwt1${SUFFIX} >> test.output |
| 135 |
ret_status=$((ret_status+$?)) |
| 136 |
${NCDUMP} -d5,5 test.exo | grep -v version | grep -v int64_status| grep -v _FillValue |grep -v word_size| ${DIFF} - ${SRCDIR}/test1.dmp | tee testwt1.res |
| 137 |
ret_status=$((ret_status+${PIPESTATUS[0]}+${PIPESTATUS[5]})) |
| 138 |
echo "end testwt1, status = $ret_status" >> test.output |
| 139 |
|
| 140 |
echo "testrd1 - single precision read test of a file with several side sets..." |
| 141 |
echo "testrd1 ... [Expect file create failure error, NOCLOBBER]" |
| 142 |
echo "testrd1 ... [Expect failure locating elem var 1 for elem block 12]" |
| 143 |
echo "begin testrd1" >> test.output |
| 144 |
${PREFIX} ${BINDIR}/testrd1${SUFFIX} | grep -v version | ${DIFF} - ${SRCDIR}/testrd1.dmp | tee testrd1.res |
| 145 |
ret_status=$((ret_status+${PIPESTATUS[0]}+${PIPESTATUS[2]})) |
| 146 |
echo "end testrd1, status = $ret_status" >> test.output |
| 147 |
|
| 148 |
echo "testwt_ss - write files to test side sets..." |
| 149 |
echo "testwt_ss ... [Expect WEDGE6 warning from this test]" |
| 150 |
echo "begin testwt_ss" >> test.output |
| 151 |
${PREFIX} ${BINDIR}/testwt_ss${SUFFIX} >> test.output |
| 152 |
ret_status=$((ret_status+$?)) |
| 153 |
${NCDUMP} -d5,5 test.exo | grep -v version | grep -v int64_status| grep -v _FillValue |grep -v word_size| ${DIFF} - ${SRCDIR}/testwt_ss.dmp | tee testwt_ss.res |
| 154 |
ret_status=$((ret_status+${PIPESTATUS[0]}+${PIPESTATUS[5]})) |
| 155 |
echo "end testwt_ss, status = $ret_status" >> test.output |
| 156 |
|
| 157 |
echo "testrd_ss - read test of a file with several side sets..." |
| 158 |
echo "testrd_ss ... [Expect warning for NULL sidesets 30 and 31]" |
| 159 |
echo "begin testrd_ss" >> test.output |
| 160 |
${PREFIX} ${BINDIR}/testrd_ss${SUFFIX} | grep -v version | ${DIFF} - ${SRCDIR}/testrd_ss.dmp | tee testrd_ss.res |
| 161 |
ret_status=$((ret_status+${PIPESTATUS[0]}+${PIPESTATUS[2]})) |
| 162 |
echo "end testrd_ss, status = $ret_status" >> test.output |
| 163 |
|
| 164 |
echo "testwt2 - single precision write 2 files (simultaneously open) test..." |
| 165 |
echo "begin testwt2" >> test.output |
| 166 |
${PREFIX} ${BINDIR}/testwt2${SUFFIX} >> test.output |
| 167 |
ret_status=$((ret_status+$?)) |
| 168 |
${NCDUMP} -d5,5 test.exo | grep -v version | grep -v int64_status| grep -v _FillValue |grep -v word_size| ${DIFF} - ${SRCDIR}/test2-1.dmp | tee testwt2-1.res |
| 169 |
ret_status=$((ret_status+${PIPESTATUS[0]}+${PIPESTATUS[5]})) |
| 170 |
${NCDUMP} -d5,5 test2.exo | grep -v version | grep -v int64_status| grep -v _FillValue |grep -v word_size| ${DIFF} - ${SRCDIR}/test2-2.dmp | tee testwt2-2.res |
| 171 |
ret_status=$((ret_status+${PIPESTATUS[0]}+${PIPESTATUS[5]})) |
| 172 |
echo "end testwt2, status = $ret_status" >> test.output |
| 173 |
|
| 174 |
echo "testrdwt - read from one and write to another (simultaneously open) file..." |
| 175 |
echo "begin testrdwt" >> test.output |
| 176 |
${PREFIX} ${BINDIR}/testrdwt${SUFFIX} >> test.output |
| 177 |
ret_status=$((ret_status+$?)) |
| 178 |
${NCDUMP} -d5,5 test2.exo | grep -v version | grep -v int64_status| grep -v _FillValue |grep -v word_size| ${DIFF} - ${SRCDIR}/test2.dmp | tee testrdwt.res |
| 179 |
ret_status=$((ret_status+${PIPESTATUS[0]}+${PIPESTATUS[5]})) |
| 180 |
echo "end testrdwt, status = $ret_status" >> test.output |
| 181 |
|
| 182 |
echo "testwt_nc - write x y z components of coordinates separately..." |
| 183 |
echo "begin testwt_nc" >> test.output |
| 184 |
${PREFIX} ${BINDIR}/testwt_nc${SUFFIX} >> test.output |
| 185 |
ret_status=$((ret_status+$?)) |
| 186 |
# Filter out the "maximum_name_length" attribute. Moves around in ncdump output for nc4 vs nc3 |
| 187 |
${NCDUMP} -d5,5 test.exo | grep -v version | grep -v int64_status| grep -v _FillValue |grep -v word_size| grep -v maximum_name_length | ${DIFF} - ${SRCDIR}/test.dmp | tee testwt_nc.res |
| 188 |
ret_status=$((ret_status+${PIPESTATUS[0]}+${PIPESTATUS[6]})) |
| 189 |
echo "end testwt_nc, status = $ret_status" >> test.output |
| 190 |
|
| 191 |
echo "testrd_nc - read x y z components of coordinates separately..." |
| 192 |
echo "begin testrd_nc" >> test.output |
| 193 |
${PREFIX} ${BINDIR}/testrd_nc${SUFFIX} | grep -v version | ${DIFF} - ${SRCDIR}/testrd_nc.dmp | tee testrd_nc.res |
| 194 |
ret_status=$((ret_status+${PIPESTATUS[0]}+${PIPESTATUS[2]})) |
| 195 |
echo "end testrd, status = $ret_status" >> test.output |
| 196 |
|
| 197 |
echo "testwt-zeron - write file with zero nodes and elements..." |
| 198 |
echo "begin testwt-zeron" >> test.output |
| 199 |
${PREFIX} ${BINDIR}/testwt-zeron${SUFFIX} >> test.output |
| 200 |
ret_status=$((ret_status+$?)) |
| 201 |
${NCDUMP} -d5,5 test.exo | grep -v version | grep -v int64_status| grep -v _FillValue |grep -v word_size| ${DIFF} - ${SRCDIR}/testwt-zeron.dmp | tee testwt-zeron.res |
| 202 |
ret_status=$((ret_status+${PIPESTATUS[0]}+${PIPESTATUS[5]})) |
| 203 |
echo "end testwt-zeron, status = $ret_status" >> test.output |
| 204 |
|
| 205 |
echo "testrd - read test of file with zero nodes and elements..." |
| 206 |
echo "begin testrd zero nodes" >> test.output |
| 207 |
${PREFIX} ${BINDIR}/testrd${SUFFIX} | grep -v version | ${DIFF} - ${SRCDIR}/testrd_zeron.dmp | tee testrd_zeron.res |
| 208 |
ret_status=$((ret_status+${PIPESTATUS[0]}+${PIPESTATUS[2]})) |
| 209 |
echo "end testrd zero nodes, status = $ret_status" >> test.output |
| 210 |
|
| 211 |
echo "testwt-zeroe - write file with zero elements..." |
| 212 |
echo "begin testwt-zeroe" >> test.output |
| 213 |
${PREFIX} ${BINDIR}/testwt-zeroe${SUFFIX} >> test.output |
| 214 |
ret_status=$((ret_status+$?)) |
| 215 |
${NCDUMP} -d5,5 test.exo | grep -v version | grep -v int64_status| grep -v _FillValue |grep -v word_size| ${DIFF} - ${SRCDIR}/testwt-zeroe.dmp | tee testwt-zeroe.res |
| 216 |
ret_status=$((ret_status+${PIPESTATUS[0]}+${PIPESTATUS[5]})) |
| 217 |
echo "end testwt-zeroe, status = $ret_status" >> test.output |
| 218 |
|
| 219 |
echo "testrd - read test of file with zero elements..." |
| 220 |
echo "begin testrd zero elements" >> test.output |
| 221 |
${PREFIX} ${BINDIR}/testrd${SUFFIX} | grep -v version | ${DIFF} - ${SRCDIR}/testrd_zeroe.dmp | tee testrd_zeroe.res |
| 222 |
ret_status=$((ret_status+${PIPESTATUS[0]}+${PIPESTATUS[2]})) |
| 223 |
echo "end testrd zero elements, status = $ret_status" >> test.output |
| 224 |
|
| 225 |
echo "testwt-one-attrib - read/write test of element attributes - read one at a time..." |
| 226 |
echo "begin testwt-one-attrib - read attributes one at a time" >> test.output |
| 227 |
${PREFIX} ${BINDIR}/testwt-one-attrib${SUFFIX} >> test.output |
| 228 |
ret_status=$((ret_status+$?)) |
| 229 |
echo "end testwt-one-attrib - read attributes one at a time, status = $ret_status" >> test.output |
| 230 |
|
| 231 |
echo "testwt-nsided - write file with nsided elements..." |
| 232 |
echo "begin testwt-nsided" >> test.output |
| 233 |
${PREFIX} ${BINDIR}/testwt-nsided${SUFFIX} >> test.output |
| 234 |
ret_status=$((ret_status+$?)) |
| 235 |
${NCDUMP} -d5,5 test-nsided.exo | grep -v version | grep -v int64_status| grep -v _FillValue |grep -v word_size| ${DIFF} - ${SRCDIR}/testwt-nsided.dmp | tee testwt-nsided.res |
| 236 |
ret_status=$((ret_status+${PIPESTATUS[0]}+${PIPESTATUS[5]})) |
| 237 |
echo "end testwt-nsided, status = $ret_status" >> test.output |
| 238 |
|
| 239 |
echo "testrd-nsided - read file with nsided elements..." |
| 240 |
echo "begin testrd-nsided" >> test.output |
| 241 |
${PREFIX} ${BINDIR}/testrd-nsided${SUFFIX} | grep -v version | ${DIFF} - ${SRCDIR}/testrd-nsided.dmp | tee testrd-nsided.res |
| 242 |
ret_status=$((ret_status+${PIPESTATUS[0]}+${PIPESTATUS[2]})) |
| 243 |
echo "end testrd-nsided, status = $ret_status" >> test.output |
| 244 |
|
| 245 |
echo "testwt-nfaced - write file with nfaced elements..." |
| 246 |
echo "begin testwt-nfaced" >> test.output |
| 247 |
${PREFIX} ${BINDIR}/testwt-nfaced${SUFFIX} >> test.output |
| 248 |
ret_status=$((ret_status+$?)) |
| 249 |
${NCDUMP} -d5,5 test-nfaced.exo | grep -v version | grep -v int64_status| grep -v _FillValue |grep -v word_size| ${DIFF} - ${SRCDIR}/testwt-nfaced.dmp | tee testwt-nfaced.res |
| 250 |
ret_status=$((ret_status+${PIPESTATUS[0]}+${PIPESTATUS[5]})) |
| 251 |
echo "end testwt-nfaced, status = $ret_status" >> test.output |
| 252 |
|
| 253 |
echo "testrd-nfaced - read file with nfaced elements..." |
| 254 |
echo "begin testrd-nfaced" >> test.output |
| 255 |
${PREFIX} ${BINDIR}/testrd-nfaced${SUFFIX} | grep -v version | ${DIFF} - ${SRCDIR}/testrd-nfaced.dmp | tee testrd-nfaced.res |
| 256 |
ret_status=$((ret_status+${PIPESTATUS[0]}+${PIPESTATUS[2]})) |
| 257 |
echo "end testrd-nfaced, status = $ret_status" >> test.output |
| 258 |
|
| 259 |
echo "testwt-long-name - write file with long (64-character) names..." |
| 260 |
echo "begin testwt-long-name" >> test.output |
| 261 |
# Filter out the "maximum_name_length" attribute. Moves around in ncdump output for nc4 vs nc3 |
| 262 |
${PREFIX} ${BINDIR}/testwt-long-name${SUFFIX} >> test.output |
| 263 |
ret_status=$((ret_status+$?)) |
| 264 |
${NCDUMP} -d5,5 test.exo | grep -v version | grep -v int64_status| grep -v _FillValue |grep -v word_size|grep -v "maximum_name_length" | ${DIFF} - ${SRCDIR}/testwt-long-name.dmp | tee testwt-long-name.res |
| 265 |
ret_status=$((ret_status+${PIPESTATUS[0]}+${PIPESTATUS[6]})) |
| 266 |
echo "end testwt-long-name, status = $ret_status" >> test.output |
| 267 |
|
| 268 |
echo "testrd - read long name file truncating to 32 characters on read..." |
| 269 |
echo "begin testrd (truncate)" >> test.output |
| 270 |
${PREFIX} ${BINDIR}/testrd${SUFFIX} | grep -v version | ${DIFF} - ${SRCDIR}/testrd-nm32.dmp | tee testrd-nm32.res |
| 271 |
ret_status=$((ret_status+${PIPESTATUS[0]}+${PIPESTATUS[2]})) |
| 272 |
echo "end testrd (truncate), status = $ret_status" >> test.output |
| 273 |
|
| 274 |
echo "testrd-long-name - read long name file..." |
| 275 |
echo "begin testrd-long-name" >> test.output |
| 276 |
${PREFIX} ${BINDIR}/testrd-long-name${SUFFIX} | grep -v version | ${DIFF} - ${SRCDIR}/testrd-long-name.dmp | tee testrd-long-name.res |
| 277 |
ret_status=$((ret_status+${PIPESTATUS[0]}+${PIPESTATUS[2]})) |
| 278 |
echo "end testrd-long-name, status = $ret_status" >> test.output |
| 279 |
|
| 280 |
echo "test_nemesis - read long name file..." |
| 281 |
echo "begin test_nemesis" >> test.output |
| 282 |
${PREFIX} ${BINDIR}/test_nemesis${SUFFIX} | grep -v version | ${DIFF} - ${SRCDIR}/test_nemesis.dmp | tee test_nemesis.res |
| 283 |
ret_status=$((ret_status+${PIPESTATUS[0]}+${PIPESTATUS[2]})) |
| 284 |
echo "end test_nemesis, status = $ret_status" >> test.output |
| 285 |
|
| 286 |
echo "test-empty - read an empty (only ex_create called) exodus file..." |
| 287 |
echo "begin test-empty" >> test.output |
| 288 |
${PREFIX} ${BINDIR}/test-empty${SUFFIX} | grep -v version | ${DIFF} - ${SRCDIR}/test-empty.dmp | tee test-empty.res |
| 289 |
ret_status=$((ret_status+${PIPESTATUS[0]}+${PIPESTATUS[2]})) |
| 290 |
echo "end test-empty, status = $ret_status" >> test.output |
| 291 |
|
| 292 |
echo "testwt-results - write EXPERIMENTAL file with only transient data; no mesh bulk data..." |
| 293 |
echo "begin testwt-results" >> test.output |
| 294 |
${PREFIX} ${BINDIR}/testwt-results${SUFFIX} >> test.output |
| 295 |
ret_status=$((ret_status+$?)) |
| 296 |
# Filter out the "maximum_name_length" attribute. Moves around in ncdump output for nc4 vs nc3 |
| 297 |
${NCDUMP} -d5,5 test-results.exo | grep -v version | grep -v int64_status| grep -v _FillValue |grep -v word_size|grep -v "maximum_name_length" | ${DIFF} - ${SRCDIR}/testwt-results.dmp | tee testwt-results.re |
| 298 |
ret_status=$((ret_status+${PIPESTATUS[0]}+${PIPESTATUS[6]})) |
| 299 |
echo "end testwt-results, status = $ret_status" >> test.output |
| 300 |
|
| 301 |
echo "testwt-assembly - write file containing assembly data" |
| 302 |
echo "begin testwt-assembly" >> test.output |
| 303 |
${PREFIX} ${BINDIR}/testwt-assembly${SUFFIX} >> test.output |
| 304 |
ret_status=$((ret_status+$?)) |
| 305 |
# Filter out the "maximum_name_length" attribute. Moves around in ncdump output for nc4 vs nc3 |
| 306 |
${NCDUMP} -d5,5 test-assembly.exo | grep -v version | grep -v int64_status| grep -v floating_point | grep -v _FillValue |grep -v word_size|grep -v "maximum_name_length" | grep -v ":SOLID_MODEL" | ${DIFF} - ${SRCDIR}/testwt-assembly.dmp | tee testwt-assembly.res |
| 307 |
ret_status=$((ret_status+${PIPESTATUS[0]}+${PIPESTATUS[8]})) |
| 308 |
echo "end testwt-assembly, status = $ret_status" >> test.output |
| 309 |
|
| 310 |
echo "testrd-assembly - read file containing assembly data" |
| 311 |
echo "begin testrd-assembly" >> test.output |
| 312 |
${PREFIX} ${BINDIR}/testrd-assembly${SUFFIX} | grep -v version | ${DIFF} - ${SRCDIR}/testrd-assembly.dmp | tee testrd-assembly.res |
| 313 |
ret_status=$((ret_status+${PIPESTATUS[0]}+${PIPESTATUS[2]})) |
| 314 |
echo "end testrd-assembly, status = $ret_status" >> test.output |
| 315 |
|
| 316 |
echo "test-add-assembly - add an assembly to an existing file" |
| 317 |
echo "begin test-add-assembly" >> test.output |
| 318 |
${PREFIX} ${BINDIR}/test-add-assembly${SUFFIX} >> test.output |
| 319 |
ret_status=$((ret_status+$?)) |
| 320 |
# Filter out the "maximum_name_length" attribute. Moves around in ncdump output for nc4 vs nc3 |
| 321 |
${NCDUMP} -d5,5 test-assembly.exo | grep -v version | grep -v int64_status | grep -v floating_point | grep -v _FillValue |grep -v word_size|grep -v "maximum_name_length" | grep -v ":SOLID_MODEL" | ${DIFF} - ${SRCDIR}/test-add-assembly.dmp | tee test-add-assembly.res |
| 322 |
ret_status=$((ret_status+${PIPESTATUS[0]}+${PIPESTATUS[8]})) |
| 323 |
echo "end test-add-assembly, status = $ret_status" >> test.output |
| 324 |
|
| 325 |
echo "testwt-blob - write file containing blob data" |
| 326 |
echo "begin testwt-blob" >> test.output |
| 327 |
${PREFIX} ${BINDIR}/testwt-blob${SUFFIX} >> test.output |
| 328 |
ret_status=$((ret_status+$?)) |
| 329 |
# Filter out the "maximum_name_length" attribute. Moves around in ncdump output for nc4 vs nc3 |
| 330 |
${NCDUMP} -d5,5 test-blob.exo | grep -v version | grep -v int64_status | grep -v floating_point | grep -v _FillValue |grep -v word_size|grep -v "maximum_name_length" | grep -v ":SOLID_MODEL" | ${DIFF} - ${SRCDIR}/testwt-blob.dmp | tee testwt-blob.res |
| 331 |
ret_status=$((ret_status+${PIPESTATUS[0]}+${PIPESTATUS[8]})) |
| 332 |
echo "end testwt-blob, status = $ret_status" >> test.output |
| 333 |
|
| 334 |
echo "testrd-blob - read file containing blob data" |
| 335 |
echo "begin testrd-blob" >> test.output |
| 336 |
${PREFIX} ${BINDIR}/testrd-blob${SUFFIX} | grep -v version | ${DIFF} - ${SRCDIR}/testrd-blob.dmp | tee testrd-blob.res |
| 337 |
ret_status=$((ret_status+${PIPESTATUS[0]}+${PIPESTATUS[2]})) |
| 338 |
echo "end testrd-blob, status = $ret_status" >> test.output |
| 339 |
|
| 340 |
echo "testwt-oned - write 1D mesh..." |
| 341 |
echo "begin testwt-oned" >> test.output |
| 342 |
${PREFIX} ${BINDIR}/testwt-oned${SUFFIX} >> test.output |
| 343 |
ret_status=$((ret_status+$?)) |
| 344 |
# Filter out the "maximum_name_length" attribute. Moves around in ncdump output for nc4 vs nc3 |
| 345 |
${NCDUMP} -d5,5 test.exo | grep -v version | grep -v int64_status| grep -v _FillValue |grep -v word_size|grep -v "maximum_name_length" | ${DIFF} - ${SRCDIR}/testwt-oned.dmp | tee testwt-oned.res |
| 346 |
ret_status=$((ret_status+${PIPESTATUS[0]}+${PIPESTATUS[6]})) |
| 347 |
echo "end testwt-oned, status = $ret_status" >> test.output |
| 348 |
|
| 349 |
echo "testrd - read test of 1D file..." |
| 350 |
echo "begin testrd 1D" >> test.output |
| 351 |
${PREFIX} ${BINDIR}/testrd${SUFFIX} | grep -v version | ${DIFF} - ${SRCDIR}/testrd-oned.dmp | tee testrd-oned.res |
| 352 |
ret_status=$((ret_status+${PIPESTATUS[0]}+${PIPESTATUS[2]})) |
| 353 |
echo "end testrd 1D, status = $ret_status" >> test.output |
| 354 |
|
| 355 |
echo "testwt-field-metadata - write mesh with enhanced field metadata..." |
| 356 |
echo "begin testwt-field-metadata" >> test.output |
| 357 |
${PREFIX} ${BINDIR}/testwt-field-metadata${SUFFIX} >> test.output |
| 358 |
ret_status=$((ret_status+$?)) |
| 359 |
# Filter out the "maximum_name_length" attribute. Moves around in ncdump output for nc4 vs nc3 |
| 360 |
${NCDUMP} -d5,5 test-field-metadata.exo | grep @ |sort -bdf | ${DIFF} - ${SRCDIR}/testwt-field-metadata.dmp | tee testwt-field-metadata.res |
| 361 |
ret_status=$((ret_status+${PIPESTATUS[0]}+${PIPESTATUS[3]})) |
| 362 |
echo "end testwt-field-metadata, status = $ret_status" >> test.output |
| 363 |
|
| 364 |
# NOTE: netcdf-4 can put attributes in different order, so in that |
| 365 |
# case, we only test the return status of the application, not diff |
| 366 |
# the output. |
| 367 |
echo "testrd-field-metadata - read test of enhanced field metadata file..." |
| 368 |
echo "begin testrd-field-metadata" >> test.output |
| 369 |
if [ "$1" == "netcdf4" ]; then |
| 370 |
${PREFIX} ${BINDIR}/testrd-field-metadata${SUFFIX} | tee testrd-field-metadata.res |
| 371 |
ret_status=$((ret_status+$?)) |
| 372 |
else |
| 373 |
${PREFIX} ${BINDIR}/testrd-field-metadata${SUFFIX} | ${DIFF} - ${SRCDIR}/testrd-field-metadata.dmp | tee testrd-field-metadata.res |
| 374 |
ret_status=$((ret_status+${PIPESTATUS[0]}+${PIPESTATUS[1]})) |
| 375 |
fi |
| 376 |
echo "end testrd-field-metadata, status = $ret_status" >> test.output |
| 377 |
|
| 378 |
if [ "$THREAD_SAFE" == "YES" ]; then |
| 379 |
|
| 380 |
echo "test_ts_nvar - each thread writes data for a single nodal variable..." |
| 381 |
echo "begin test_ts_nvar" >> test.output |
| 382 |
${PREFIX} ${BINDIR}/test_ts_nvar${SUFFIX} >> test.output |
| 383 |
ret_status=$((ret_status+$?)) |
| 384 |
${NCDUMP} -d5,5 test.exo | grep -v version | grep -v int64_status| grep -v _FillValue |grep -v word_size|grep -v "maximum_name_length" | ${DIFF} - ${SRCDIR}/test_ts_nvar.dmp | tee testwt-long-name.res |
| 385 |
ret_status=$((ret_status+${PIPESTATUS[0]}+${PIPESTATUS[6]})) |
| 386 |
echo "end test_ts_nvar, status = $ret_status" >> test.output |
| 387 |
|
| 388 |
echo "test_ts_nvar_rd - each thread reads data for a single nodal variable..." |
| 389 |
echo "begin test_ts_nvar_rd" >> test.output |
| 390 |
${PREFIX} ${BINDIR}/test_ts_nvar_rd${SUFFIX} | ${DIFF} - ${SRCDIR}/test_ts_nvar_rd.dmp | tee test_ts_nvar_rd.res |
| 391 |
ret_status=$((ret_status+${PIPESTATUS[0]}+${PIPESTATUS[1]})) |
| 392 |
echo "end test_ts_nvar_rd, status = $ret_status" >> test.output |
| 393 |
|
| 394 |
|
| 395 |
echo "test_ts_partial_nvar - each thread writes data for a single nodal variable..." |
| 396 |
echo "begin test_ts_partial_nvar" >> test.output |
| 397 |
${PREFIX} ${BINDIR}/test_ts_partial_nvar${SUFFIX} >> test.output |
| 398 |
ret_status=$((ret_status+$?)) |
| 399 |
${NCDUMP} -d5,5 test.exo | grep -v version | grep -v int64_status| grep -v _FillValue |grep -v word_size|grep -v "maximum_name_length" | ${DIFF} - ${SRCDIR}/test_ts_partial_nvar.dmp | tee testwt-long-name.res |
| 400 |
ret_status=$((ret_status+${PIPESTATUS[0]}+${PIPESTATUS[6]})) |
| 401 |
echo "end test_ts_partial_nvar, status = $ret_status" >> test.output |
| 402 |
|
| 403 |
echo "test_ts_partial_nvar_rd - each thread reads data for a single nodal variable..." |
| 404 |
echo "begin test_ts_partial_nvar_rd" >> test.output |
| 405 |
${PREFIX} ${BINDIR}/test_ts_partial_nvar${SUFFIX} >> test.output |
| 406 |
ret_status=$((ret_status+$?)) |
| 407 |
${PREFIX} ${BINDIR}/test_ts_partial_nvar_rd${SUFFIX} | ${DIFF} - ${SRCDIR}/test_ts_partial_nvar_rd.dmp | tee test_ts_partial_nvar_rd.res |
| 408 |
ret_status=$((ret_status+${PIPESTATUS[0]}+${PIPESTATUS[1]})) |
| 409 |
echo "end test_ts_partial_nvar_rd, status = $ret_status" >> test.output |
| 410 |
|
| 411 |
echo "test_ts_files - each thread creates its own file..." |
| 412 |
echo "begin test_ts_files" >> test.output |
| 413 |
${PREFIX} ${BINDIR}/test_ts_files${SUFFIX} >> test.output |
| 414 |
ret_status=$((ret_status+$?)) |
| 415 |
mv test0.exo test.exo |
| 416 |
${NCDUMP} -d5,5 test.exo | grep -v version | grep -v int64_status| grep -v _FillValue |grep -v word_size|grep -v maximum_name_length | ${DIFF} - ${SRCDIR}/test.dmp | tee test_ts_files0.res |
| 417 |
ret_status=$((ret_status+${PIPESTATUS[0]}+${PIPESTATUS[6]})) |
| 418 |
mv test1.exo test.exo |
| 419 |
${NCDUMP} -d5,5 test.exo | grep -v version | grep -v int64_status| grep -v _FillValue |grep -v word_size|grep -v maximum_name_length | ${DIFF} - ${SRCDIR}/test.dmp | tee test_ts_files1.res |
| 420 |
ret_status=$((ret_status+${PIPESTATUS[0]}+${PIPESTATUS[6]})) |
| 421 |
mv test2.exo test.exo |
| 422 |
${NCDUMP} -d5,5 test.exo | grep -v version | grep -v int64_status| grep -v _FillValue |grep -v word_size|grep -v maximum_name_length | ${DIFF} - ${SRCDIR}/test.dmp | tee test_ts_files2.res |
| 423 |
ret_status=$((ret_status+${PIPESTATUS[0]}+${PIPESTATUS[6]})) |
| 424 |
mv test3.exo test.exo |
| 425 |
${NCDUMP} -d5,5 test.exo | grep -v version | grep -v int64_status| grep -v _FillValue |grep -v word_size|grep -v maximum_name_length | ${DIFF} - ${SRCDIR}/test.dmp | tee test_ts_files3.res |
| 426 |
ret_status=$((ret_status+${PIPESTATUS[0]}+${PIPESTATUS[6]})) |
| 427 |
mv test4.exo test.exo |
| 428 |
${NCDUMP} -d5,5 test.exo | grep -v version | grep -v int64_status| grep -v _FillValue |grep -v word_size|grep -v maximum_name_length | ${DIFF} - ${SRCDIR}/test.dmp | tee test_ts_files4.res |
| 429 |
ret_status=$((ret_status+${PIPESTATUS[0]}+${PIPESTATUS[6]})) |
| 430 |
mv test5.exo test.exo |
| 431 |
${NCDUMP} -d5,5 test.exo | grep -v version | grep -v int64_status| grep -v _FillValue |grep -v word_size|grep -v maximum_name_length | ${DIFF} - ${SRCDIR}/test.dmp | tee test_ts_files5.res |
| 432 |
ret_status=$((ret_status+${PIPESTATUS[0]}+${PIPESTATUS[6]})) |
| 433 |
mv test6.exo test.exo |
| 434 |
${NCDUMP} -d5,5 test.exo | grep -v version | grep -v int64_status| grep -v _FillValue |grep -v word_size|grep -v maximum_name_length | ${DIFF} - ${SRCDIR}/test.dmp | tee test_ts_files6.res |
| 435 |
ret_status=$((ret_status+${PIPESTATUS[0]}+${PIPESTATUS[6]})) |
| 436 |
mv test7.exo test.exo |
| 437 |
${NCDUMP} -d5,5 test.exo | grep -v version | grep -v int64_status| grep -v _FillValue |grep -v word_size|grep -v maximum_name_length | ${DIFF} - ${SRCDIR}/test.dmp | tee test_ts_files7.res |
| 438 |
ret_status=$((ret_status+${PIPESTATUS[0]}+${PIPESTATUS[6]})) |
| 439 |
echo "end test_ts_files, status = $ret_status" >> test.output |
| 440 |
|
| 441 |
echo "test_ts_errval - multiple threads calling ex_err and ex_get_err..." |
| 442 |
echo "begin test_ts_errval" >> test.output |
| 443 |
${PREFIX} ${BINDIR}/test_ts_errval${SUFFIX} >> test.output |
| 444 |
ret_status=$((ret_status+$?)) |
| 445 |
echo "end test_ts_errval, status = $ret_status" >> test.output |
| 446 |
fi |
| 447 |
exit $ret_status |