| 1 |
# Copyright(C) 1999-2020, 2024 National Technology & Engineering Solutions |
| 2 |
# of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with |
| 3 |
# NTESS, the U.S. Government retains certain rights in this software. |
| 4 |
# |
| 5 |
# See packages/seacas/LICENSE for details |
| 6 |
|
| 7 |
# script to run all tests and compare them to saved dump files. |
| 8 |
# |
| 9 |
# To run the tests with valgrind checking, uncomment the next line and comment the |
| 10 |
# following line. Can also define other prefixes if wanted. |
| 11 |
|
| 12 |
#set PREFIX = "valgrind --tool=memcheck" |
| 13 |
set PREFIX = "" |
| 14 |
SRCDIR=/Users/gdsjaar/src/seacas/build/packages/seacas/libraries/exodus/test |
| 15 |
NCDUMP=/Users/gdsjaar/src/seacas/bin/ncdump |
| 16 |
echo "************************************************************************" |
| 17 |
echo "************************************************************************" |
| 18 |
rm -f test.output |
| 19 |
echo "testwt - single precision write test..." |
| 20 |
echo "begin testwt" > test.output |
| 21 |
${PREFIX} ${SRCDIR}/testwt >> test.output |
| 22 |
echo "end testwt" >> test.output |
| 23 |
${NCDUMP} -d5,5 test.exo | grep -v version | grep -v int64_status| grep -v _FillValue |grep -v maximum_name_length > ${SRCDIR}/test.dmp |
| 24 |
|
| 25 |
echo "testrd - single precision read test..." |
| 26 |
echo "begin testrd" >> test.output |
| 27 |
${PREFIX} ${SRCDIR}/testrd | grep -v version > ${SRCDIR}/testrd.dmp |
| 28 |
echo "end testrd" >> test.output |
| 29 |
|
| 30 |
echo "testrdv - single precision read test with varid..." |
| 31 |
echo "begin testrdv" >> test.output |
| 32 |
${PREFIX} ${SRCDIR}/testrdv | grep -v version > ${SRCDIR}/testrdv.dmp |
| 33 |
echo "end testrdv" >> test.output |
| 34 |
|
| 35 |
echo "testcp_ss - single-to-single precision copy test..." |
| 36 |
echo "begin testcp_ss" >> test.output |
| 37 |
${PREFIX} ${SRCDIR}/testcp >> test.output |
| 38 |
echo "end testcp_ss" >> test.output |
| 39 |
${NCDUMP} -d5,5 testcp.exo | grep -v version | grep -v int64_status| grep -v _FillValue > ${SRCDIR}/testcp_ss.dmp |
| 40 |
|
| 41 |
echo "testcp_sd - single-to-double precision copy test..." |
| 42 |
echo "begin testcp_sd" >> test.output |
| 43 |
${PREFIX} ${SRCDIR}/testcpd >> test.output |
| 44 |
echo "end testcp_sd" >> test.output |
| 45 |
${NCDUMP} -d5,5 testcpd.exo | grep -v version | grep -v int64_status| grep -v _FillValue > ${SRCDIR}/testcp_sd.dmp |
| 46 |
|
| 47 |
echo "testcp_ln - large model to normal model single precision copy test..." |
| 48 |
echo "begin testcp_ln" >> test.output |
| 49 |
${PREFIX} ${SRCDIR}/testcp_ln >> test.output |
| 50 |
echo "end testcp_ln" >> test.output |
| 51 |
${NCDUMP} -d5,5 testcp.exo | grep -v version | grep -v int64_status| grep -v _FillValue > ${SRCDIR}/testcp_ln.dmp |
| 52 |
|
| 53 |
echo "testcp_nl - normal_model to large_model single precision copy test..." |
| 54 |
echo "begin testcp_nl" >> test.output |
| 55 |
${PREFIX} ${SRCDIR}/testcp_nl >> test.output |
| 56 |
echo "end testcp_nl" >> test.output |
| 57 |
${NCDUMP} -d5,5 testcp_nl.exo | grep -v version | grep -v int64_status| grep -v _FillValue > ${SRCDIR}/testcp_nl.dmp |
| 58 |
|
| 59 |
echo "testwt_clb - single precision write test using concatenated puts..." |
| 60 |
echo "begin testwt_clb" >> test.output |
| 61 |
${PREFIX} ${SRCDIR}/testwt_clb >> test.output |
| 62 |
echo "end testwt_clb" >> test.output |
| 63 |
${NCDUMP} -d5,5 test.exo | grep -v version | grep -v int64_status| grep -v _FillValue > ${SRCDIR}/test_clb.dmp |
| 64 |
|
| 65 |
echo "testwtd - double precision write test..." |
| 66 |
echo "begin testwtd" >> test.output |
| 67 |
${PREFIX} ${SRCDIR}/testwtd >> test.output |
| 68 |
echo "end testwtd" >> test.output |
| 69 |
${NCDUMP} -d5,5 test.exo | grep -v version | grep -v int64_status| grep -v _FillValue > ${SRCDIR}/testd.dmp |
| 70 |
|
| 71 |
echo "testrdd - double precision read test..." |
| 72 |
echo "begin testrdd" >> test.output |
| 73 |
${PREFIX} ${SRCDIR}/testrdd | grep -v version >- ${SRCDIR}/testrdd.dmp |
| 74 |
echo "end testrdd" >> test.output |
| 75 |
|
| 76 |
echo "testcp_dd - double-to-double precision copy test..." |
| 77 |
echo "begin testcp_dd" >> test.output |
| 78 |
${PREFIX} ${SRCDIR}/testcpd >> test.output |
| 79 |
echo "end testcp_dd" >> test.output |
| 80 |
${NCDUMP} -d5,5 testcpd.exo | grep -v version | grep -v int64_status| grep -v _FillValue > ${SRCDIR}/testcp_dd.dmp |
| 81 |
|
| 82 |
echo "testcp_ds - double-to-single precision copy test..." |
| 83 |
echo "begin testcp_ds" >> test.output |
| 84 |
${PREFIX} ${SRCDIR}/testcp >> test.output |
| 85 |
echo "end testcp_ds" >> test.output |
| 86 |
${NCDUMP} -d5,5 testcp.exo | grep -v version | grep -v int64_status| grep -v _FillValue > ${SRCDIR}/testcp_ds.dmp |
| 87 |
|
| 88 |
echo "testwt1 - single precision write files with several side sets..." |
| 89 |
echo "testwt1 ... [Expect WEDGE6 warning from this test]" |
| 90 |
echo "begin testwt1" >> test.output |
| 91 |
${PREFIX} ${SRCDIR}/testwt1 >> test.output |
| 92 |
echo "end testwt1" >> test.output |
| 93 |
${NCDUMP} -d5,5 test.exo | grep -v version | grep -v int64_status| grep -v _FillValue > ${SRCDIR}/test1.dmp |
| 94 |
|
| 95 |
echo "testrd1 - single precision read test of a file with several side sets..." |
| 96 |
echo "testrd1 ... [Expect file create failure error, NOCLOBBER]" |
| 97 |
echo "testrd1 ... [Expect failure locating elem var 1 for elem block 12]" |
| 98 |
echo "begin testrd1" >> test.output |
| 99 |
${PREFIX} ${SRCDIR}/testrd1 | grep -v version > ${SRCDIR}/testrd1.dmp |
| 100 |
echo "end testrd1" >> test.output |
| 101 |
|
| 102 |
echo "testwt_ss - write files to test side sets..." |
| 103 |
echo "testwt_ss ... [Expect WEDGE6 warning from this test]" |
| 104 |
echo "begin testwt_ss" >> test.output |
| 105 |
${PREFIX} ${SRCDIR}/testwt_ss >> test.output |
| 106 |
echo "end testwt_ss" >> test.output |
| 107 |
${NCDUMP} -d5,5 test.exo | grep -v version | grep -v int64_status| grep -v _FillValue > ${SRCDIR}/testwt_ss.dmp |
| 108 |
|
| 109 |
echo "testrd_ss - read test of a file with several side sets..." |
| 110 |
echo "testrd_ss ... [Expect warning for NULL sidesets 30 and 31]" |
| 111 |
echo "begin testrd_ss" >> test.output |
| 112 |
${PREFIX} ${SRCDIR}/testrd_ss | grep -v version > ${SRCDIR}/testrd_ss.dmp |
| 113 |
echo "end testrd_ss" >> test.output |
| 114 |
|
| 115 |
echo "testwt2 - single precision write 2 files (simultaneously open) test..." |
| 116 |
echo "begin testwt2" >> test.output |
| 117 |
${PREFIX} ${SRCDIR}/testwt2 >> test.output |
| 118 |
echo "end testwt2" >> test.output |
| 119 |
${NCDUMP} -d5,5 test.exo | grep -v version | grep -v int64_status| grep -v _FillValue > ${SRCDIR}/test2-1.dmp |
| 120 |
${NCDUMP} -d5,5 test2.exo | grep -v version | grep -v int64_status| grep -v _FillValue > ${SRCDIR}/test2-2.dmp |
| 121 |
|
| 122 |
echo "testrdwt - read from one and write to another (simultaneously open) file..." |
| 123 |
echo "begin testrdwt" >> test.output |
| 124 |
${PREFIX} ${SRCDIR}/testrdwt >> test.output |
| 125 |
echo "end testrdwt" >> test.output |
| 126 |
${NCDUMP} -d5,5 test2.exo | grep -v version | grep -v int64_status| grep -v _FillValue > ${SRCDIR}/test2.dmp |
| 127 |
|
| 128 |
echo "testwt_nc - write x y z components of coordinates separately..." |
| 129 |
echo "begin testwt_nc" >> test.output |
| 130 |
${PREFIX} ${SRCDIR}/testwt_nc >> test.output |
| 131 |
echo "end testwt_nc" >> test.output |
| 132 |
${NCDUMP} -d5,5 test.exo | grep -v version | grep -v int64_status| grep -v _FillValue > ${SRCDIR}/test.dmp |
| 133 |
|
| 134 |
echo "testrd_nc - read x y z components of coordinates separately..." |
| 135 |
echo "begin testrd_nc" >> test.output |
| 136 |
${PREFIX} ${SRCDIR}/testrd_nc | grep -v version > ${SRCDIR}/testrd_nc.dmp |
| 137 |
echo "end testrd" >> test.output |
| 138 |
|
| 139 |
echo "testwt-zeron - write file with zero nodes and elements..." |
| 140 |
echo "begin testwt-zeron" >> test.output |
| 141 |
${PREFIX} ${SRCDIR}/testwt-zeron >> test.output |
| 142 |
echo "end testwt-zeron" >> test.output |
| 143 |
${NCDUMP} -d5,5 test.exo | grep -v version | grep -v int64_status| grep -v _FillValue > ${SRCDIR}/testwt-zeron.dmp |
| 144 |
|
| 145 |
echo "testrd - read test of file with zero nodes and elements..." |
| 146 |
echo "begin testrd zero nodes" >> test.output |
| 147 |
${PREFIX} ${SRCDIR}/testrd | grep -v version > ${SRCDIR}/testrd_zeron.dmp |
| 148 |
echo "end testrd zero nodes" >> test.output |
| 149 |
|
| 150 |
echo "testwt-zeroe - write file with zero elements..." |
| 151 |
echo "begin testwt-zeroe" >> test.output |
| 152 |
${PREFIX} ${SRCDIR}/testwt-zeroe >> test.output |
| 153 |
echo "end testwt-zeroe" >> test.output |
| 154 |
${NCDUMP} -d5,5 test.exo | grep -v version | grep -v int64_status| grep -v _FillValue > ${SRCDIR}/testwt-zeroe.dmp |
| 155 |
|
| 156 |
echo "testrd - read test of file with zero elements..." |
| 157 |
echo "begin testrd zero elements" >> test.output |
| 158 |
${PREFIX} ${SRCDIR}/testrd | grep -v version > ${SRCDIR}/testrd_zeroe.dmp |
| 159 |
echo "end testrd zero elements" >> test.output |
| 160 |
|
| 161 |
echo "testwt-one-attrib - read/write test of element attributes - read one at a time..." |
| 162 |
echo "begin testwt-one-attrib - read attributes one at a time" >> test.output |
| 163 |
${PREFIX} ${SRCDIR}/testwt-one-attrib | tee testrd_zeroe.res |
| 164 |
echo "end testwt-one-attrib - read attributes one at a time" >> test.output |
| 165 |
|
| 166 |
echo "testwt-nsided - write file with nsided elements..." |
| 167 |
echo "begin testwt-nsided" >> test.output |
| 168 |
${PREFIX} ${SRCDIR}/testwt-nsided >> test.output |
| 169 |
echo "end testwt-nsided" >> test.output |
| 170 |
${NCDUMP} -d5,5 test-nsided.exo | grep -v version | grep -v int64_status| grep -v _FillValue > ${SRCDIR}/testwt-nsided.dmp |
| 171 |
|
| 172 |
echo "testrd-nsided - read file with nsided elements..." |
| 173 |
echo "begin testrd-nsided" >> test.output |
| 174 |
${PREFIX} ${SRCDIR}/testrd-nsided | grep -v version > ${SRCDIR}/testrd-nsided.dmp |
| 175 |
echo "end testrd-nsided" >> test.output |
| 176 |
|
| 177 |
echo "testwt-nfaced - write file with nfaced elements..." |
| 178 |
echo "begin testwt-nfaced" >> test.output |
| 179 |
${PREFIX} ${SRCDIR}/testwt-nfaced >> test.output |
| 180 |
echo "end testwt-nfaced" >> test.output |
| 181 |
${NCDUMP} -d5,5 test-nfaced.exo | grep -v version | grep -v int64_status| grep -v _FillValue > ${SRCDIR}/testwt-nfaced.dmp |
| 182 |
|
| 183 |
echo "testrd-nfaced - read file with nfaced elements..." |
| 184 |
echo "begin testrd-nfaced" >> test.output |
| 185 |
${PREFIX} ${SRCDIR}/testrd-nfaced | grep -v version > ${SRCDIR}/testrd-nfaced.dmp |
| 186 |
echo "end testrd-nfaced" >> test.output |
| 187 |
|
| 188 |
echo "testwt-long-name - write file with long (64-character) names..." |
| 189 |
echo "begin testwt-long-name" >> test.output |
| 190 |
${PREFIX} ${SRCDIR}/testwt-long-name >> test.output |
| 191 |
echo "end testwt-long-name" >> test.output |
| 192 |
${NCDUMP} -d5,5 test.exo | grep -v version | grep -v int64_status| grep -v _FillValue ${SRCDIR}/testwt-long-name.dmp |
| 193 |
|
| 194 |
echo "testrd - read long name file truncating to 32 characters on read..." |
| 195 |
echo "begin testrd (truncate)" >> test.output |
| 196 |
${PREFIX} ${SRCDIR}/testrd | grep -v version > ${SRCDIR}/testrd-nm32.dmp |
| 197 |
echo "end testrd (truncate)" >> test.output |
| 198 |
|
| 199 |
echo "testrd-long-name - read long name file..." |
| 200 |
echo "begin testrd-long-name" >> test.output |
| 201 |
${PREFIX} ${SRCDIR}/testrd-long-name | grep -v version > ${SRCDIR}/testrd-long-name.dmp |
| 202 |
echo "end testrd-long-name" >> test.output |
| 203 |
|
| 204 |
echo "************************************************************************" |
| 205 |
echo "************************************************************************" |