"Fossies" - the Fresh Open Source Software Archive 
Member "laspack/check/check" (14 Mar 1995, 1642 Bytes) of package /linux/privat/old/laspack.tgz:
As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Bash source code syntax highlighting (style:
standard) with prefixed line numbers and
code folding option.
Alternatively you can here
view or
download the uninterpreted source code file.
1 #!/bin/csh
2
3 # this script check LASPack by means of mlstest (based on LASPack)
4 #
5 # written by Tomas Skalicky, Jan 1995
6
7 if ( -f mlstest.out ) rm -f mlstest.out
8 echo > mlstest.out
9
10 foreach ml_solver ( mg mgpcg bpxpcg )
11 # all solvers with exception of the Chebyshev method are tested as smoothers;
12 # in the Chebyshev method, the estimation of extremal eigenvalues make use
13 # of an random-value generator and is therefore depending on the architecture
14 foreach smoother_id ( 1 2 3 4 6 7 8 9 10 11 12 )
15 foreach precond_id ( 0 1 2 3 )
16 echo "Testing ... solver = $ml_solver, smoother = $smoother_id, preconditioner = $precond_id"
17 echo "Testing ... solver = $ml_solver, smoother = $smoother_id, preconditioner = $precond_id" >> mlstest.out
18 echo "" >> mlstest.out
19 if ( -f mlstest.dat ) rm -f mlstest.dat
20 sed -e "/SMOOTHER_ID/ s/SMOOTHER_ID/$smoother_id/" $ml_solver.tpl | \
21 sed -e "/PRECOND_ID/ s/PRECOND_ID/$precond_id/" > mlstest.dat
22 sleep 1
23 mlstest < mlstest.dat >>&! mlstest.out
24 sleep 1
25 rm -f mlstest.dat
26 echo "" >> mlstest.out
27 echo "" >> mlstest.out
28 echo "" >> mlstest.out
29 end
30 end
31 end
32
33 if ( -f mlstest.tmp ) rm -f mlstest.tmp
34 mv mlstest.out mlstest.tmp
35 sed -e "/=/ w mlstest.out" mlstest.tmp >> /dev/null
36 rm -f mlstest.tmp
37
38 if ( { cmp -s mlstest.out mlstest.org } ) then
39 echo ""
40 echo "LASPack tested successfully."
41 else
42 echo ""
43 echo "LASPack check fails."
44 if ( -f diffs ) rm -f diffs
45 diff mlstest.out mlstest.org > diffs
46 endif