File: run_ut_chunk.sh

package info (click to toggle)
netcdf-parallel 1%3A4.9.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 116,192 kB
  • sloc: ansic: 279,265; sh: 14,143; cpp: 5,971; yacc: 2,612; makefile: 2,075; lex: 1,218; javascript: 280; xml: 173; awk: 2
file content (60 lines) | stat: -rwxr-xr-x 1,230 bytes parent folder | download | duplicates (2)
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
#!/bin/sh

if test "x$srcdir" = x ; then srcdir=`pwd`; fi
. ../test_common.sh

set -e

# Test chunking code

# Control which test sets are executed
# possible sets: proj(obsolete) walk(obsolete)
TESTS=walk

# Functions

testproj() {
  # Do a single output file
  file="ut_proj.txt"
  rm -f $file
  CMD="${execdir}/ut_projections${ext}"
  $CMD -ddim1=4 -v "int v(dim1/2)" -s "[0:4:1]" >> $file
  $CMD -ddim1=6 -v "int v(dim1/3)" -s "[0:5]" >> $file
  $CMD -ddim1=4 -ddim2=2 -v "int v(dim1/2,dim2/2)" -s "[2:3][0:2]" >> $file
  diff -wb ${srcdir}/ref_$file ./$file
}

testwalk() {
  file="ut_walk.txt"
  rm -f $file
  CMD="${execdir}/ut_walk${ext}"
  $CMD -ddim1=4 -v "int v(dim1/2)" -s "[0:4:1] -W "0,1,2,3" " > $file
  $CMD -ddim1=6 -v "int v(dim1/3)" -s "[0:5]" -W "0,1,2,3,4,5" >> $file
  $CMD -ddim1=4 -ddim2=2 -v "int v(dim1/2,dim2/2)" -s "[2:3][0:2]" -W "0,1,2,3,4,5,6,7">> $file
  diff -wb ${srcdir}/ref_$file ./$file
}

echo ""

echo "*** Chunking Unit Testing"

for T in $TESTS ; do
case "$T" in

proj)
echo ""; echo "*** Test projection computations: obsolete"
echo ""; echo "*** Test 1"
testproj
;;

walk)
echo ""; echo "*** Test chunk walkings"
testwalk
;;

*) echo "Unknown test set: $T"; exit 1 ;;

esac
done

exit 0