aboutsummaryrefslogtreecommitdiff
path: root/CarpetAttic
diff options
context:
space:
mode:
authoreschnett <>2001-03-17 15:19:00 +0000
committereschnett <>2001-03-17 15:19:00 +0000
commitdc000d6bc9678d1a35ec90d27834882fff1afdf4 (patch)
treeb94c6b369c96cc091fd38e472458d0d17e06cf3b /CarpetAttic
parentabcb76f0bc0a3481472551757b1970f8e8160320 (diff)
Now uses unique temporary file names.
darcs-hash:20010317151938-f6438-37e1c76beaa55e4f8cb7c694db27978090ad7921.gz
Diffstat (limited to 'CarpetAttic')
-rwxr-xr-xCarpetAttic/Cart3dTest/utils/cmptest19
-rwxr-xr-xCarpetAttic/Cart3dTest/utils/mptest19
2 files changed, 16 insertions, 22 deletions
diff --git a/CarpetAttic/Cart3dTest/utils/cmptest b/CarpetAttic/Cart3dTest/utils/cmptest
index 20e98c3bf..c8f069a82 100755
--- a/CarpetAttic/Cart3dTest/utils/cmptest
+++ b/CarpetAttic/Cart3dTest/utils/cmptest
@@ -1,12 +1,9 @@
#!/bin/bash
-# $Header: /home/eschnett/C/carpet/Carpet/CarpetAttic/Cart3dTest/utils/cmptest,v 1.1 2001/03/11 10:58:23 eschnett Exp $
+# $Header: /home/eschnett/C/carpet/Carpet/CarpetAttic/Cart3dTest/utils/cmptest,v 1.2 2001/03/17 16:19:38 eschnett Exp $
# Call this script from the Cactus directory. It compares a Carpet
# ASCII testsuite output to PUGH ASCII testsuite output.
-rm -f out-old
-rm -f out-new
-
for suite in $(ls TEST/carpet | grep -v log\$); do
echo
@@ -14,17 +11,17 @@ for suite in $(ls TEST/carpet | grep -v log\$); do
for file in $(ls arrangements/AlphaThorns/Cart3dTest/test/$suite | grep -v CVS | grep -v \.dl); do
- mkfifo out-old
- mkfifo out-new
+ mkfifo out-old.$$
+ mkfifo out-new.$$
- awk 'NF==2 { print $2; }' arrangements/AlphaThorns/Cart3dTest/test/$suite/$file > out-old &
- awk 'NF==9 { print $9; }' TEST/carpet/$suite/$file > out-new &
+ awk 'NF==2 { print $2; }' arrangements/AlphaThorns/Cart3dTest/test/$suite/$file > out-old.$$ &
+ awk 'NF==9 { print $9; }' TEST/carpet/$suite/$file > out-new.$$ &
- paste out-old out-new |
+ paste out-old.$$ out-new.$$ |
awk '{ diff=(($1-$2)/($1+$2+1e-6))**2; if (diff>1e-10) { ++cnt; print l+0,$1,$2,diff; ++l; } } END { if (cnt>0) print "File '$file'",cnt+0,"differing lines"; }'
- rm out-old
- rm out-new
+ rm out-old.$$
+ rm out-new.$$
done
diff --git a/CarpetAttic/Cart3dTest/utils/mptest b/CarpetAttic/Cart3dTest/utils/mptest
index e39275f29..69d34ff2c 100755
--- a/CarpetAttic/Cart3dTest/utils/mptest
+++ b/CarpetAttic/Cart3dTest/utils/mptest
@@ -1,13 +1,10 @@
#!/bin/bash
-# $Header: /home/eschnett/C/carpet/Carpet/CarpetAttic/Cart3dTest/utils/mptest,v 1.1 2001/03/11 10:58:23 eschnett Exp $
+# $Header: /home/eschnett/C/carpet/Carpet/CarpetAttic/Cart3dTest/utils/mptest,v 1.2 2001/03/17 16:19:38 eschnett Exp $
# Call this script from the Cactus directory. It compares a Carpet
# ASCII testsuite outputs from runs with different numbers of
# processors.
-rm -f out-old
-rm -f out-new
-
for suite in $(ls TEST/carpet | grep -v log\$); do
echo
@@ -15,24 +12,24 @@ for suite in $(ls TEST/carpet | grep -v log\$); do
for file in $(ls arrangements/Carpet/Cart3dTest/test/$suite | grep -v CVS | grep -v \.dl); do
- mkfifo out-old
- mkfifo out-new
+ mkfifo out-old.$$
+ mkfifo out-new.$$
awk 'NF==9 { print $1,$6,$7,$8,$9; }' arrangements/Carpet/Cart3dTest/test/$suite/$file |
sort -n -k 1,4 |
uniq |
- awk '{ print $5; }' > out-old &
+ awk '{ print $5; }' > out-old.$$ &
awk 'NF==9 { print $1,$6,$7,$8,$9; }' TEST/carpet/$suite/$file |
sort -n -k 1,4 |
uniq |
- awk '{ print $5; }' > out-new &
+ awk '{ print $5; }' > out-new.$$ &
- paste out-old out-new |
+ paste out-old.$$ out-new.$$ |
awk '{ diff=(($1-$2)/($1+$2+1e-6))**2; if (diff>1e-10) { ++cnt; print l+0,$1,$2,diff; ++l; } } END { if (cnt>0) print "File '$file'",cnt+0,"differing lines"; }'
- rm out-old
- rm out-new
+ rm out-old.$$
+ rm out-new.$$
done