[PATCH] Clean up testsuite wrt messaging support
Richard Guenther
rguenth at tat.physik.uni-tuebingen.de
Thu Dec 18 19:15:00 UTC 2003
Hi!
The following fall out during testing the new and old messaging support.
They mostly fix testsuite deadlocks due to missing finalization or enable
the test for serial runs, too.
Ok?
Richard.
2003Dec18 Richard Guenther <richard.guenther at uni-tuebingen.de>
* Array/tests/array_test28.cpp: run always, be verbose about
what is failing.
Domain/tests/IteratorPairDomainTest1.cpp: properly finalize.
Domain/tests/IteratorPairDomainTest2.cpp: likewise.
Domain/tests/domaintest.cpp: likewise.
Domain/tests/indirectionlist_test1.cpp: likewise.
Evaluator/tests/ReductionTest4.cpp: run always, block at the
right place.
Pooma/tests/pabort.cpp: try to properly finalize.
Index: Array/tests/array_test28.cpp
===================================================================
RCS file: /home/pooma/Repository/r2/src/Array/tests/array_test28.cpp,v
retrieving revision 1.3
diff -u -u -r1.3 array_test28.cpp
--- Array/tests/array_test28.cpp 21 Nov 2003 17:35:16 -0000 1.3
+++ Array/tests/array_test28.cpp 18 Dec 2003 19:03:41 -0000
@@ -49,8 +49,6 @@
Pooma::initialize(argc, argv);
Pooma::Tester tester(argc, argv);
-#if POOMA_CHEETAH
-
Interval<3> I3(6,6,6);
Array<3> a0(I3), b0(I3);
Array<3, double, Remote<CompressibleBrick> > a1(I3), b1(I3);
@@ -68,34 +66,48 @@
b1 = 1.0;
b2 = 2.0;
b3 = 3.0;
-
- a0 = b0; tester.check(all(a0 == 0.0));
- a1 = b1; tester.check(all(a1 == 1.0));
- a2 = b2; tester.check(all(a2 == 2.0));
- a3 = b3; tester.check(all(a3 == 3.0));
-
- a0 = b1; tester.check(all(a0 == 1.0));
- a1 = b2; tester.check(all(a1 == 2.0));
- a2 = b3; tester.check(all(a2 == 3.0));
- a3 = b0; tester.check(all(a3 == 0.0));
-
- a0 = b2; tester.check(all(a0 == 2.0));
- a1 = b3; tester.check(all(a1 == 3.0));
- a2 = b0; tester.check(all(a2 == 0.0));
- a3 = b1; tester.check(all(a3 == 1.0));
-
- a0 = b3; tester.check(all(a0 == 3.0));
- a1 = b0; tester.check(all(a1 == 0.0));
- a2 = b1; tester.check(all(a2 == 1.0));
- a3 = b2; tester.check(all(a3 == 2.0));
+
+ a0 = b0; tester.check("Brick = Brick\n\t",
+ all(a0 == 0.0));
+ a1 = b1; tester.check("Remote<CBrick> = Remote<CBrick>\n\t",
+ all(a1 == 1.0));
+ a2 = b2; tester.check("MultiPatch<Remote<Brick>> = MultiPatch<Remote<Brick>>\n\t",
+ all(a2 == 2.0));
+ a3 = b3; tester.check("MultiPatch<Remote<CBrick>> = MultiPatch<Remote<CBrick>>\n\t",
+ all(a3 == 3.0));
+
+ a0 = b1; tester.check("Brick = Remote<CBrick>\n\t",
+ all(a0 == 1.0));
+ a1 = b2; tester.check("Remote<CBrick> = MultiPatch<Remote<Brick>>\n\t",
+ all(a1 == 2.0));
+ a2 = b3; tester.check("MultiPatch<Remote<Brick>> = MultiPatch<Remote<CBrick>>\n\t",
+ all(a2 == 3.0));
+ a3 = b0; tester.check("MultiPatch<Remote<CBrick>> = Brick\n\t",
+ all(a3 == 0.0));
+
+ a0 = b2; tester.check("Brick = MultiPatch<Remote<Brick>>\n\t",
+ all(a0 == 2.0));
+ a1 = b3; tester.check("Remote<CBrick> = MultiPatch<Remote<CBrick>>\n\t",
+ all(a1 == 3.0));
+ a2 = b0; tester.check("MultiPatch<Remote<Brick>> = Brick\n\t",
+ all(a2 == 0.0));
+ a3 = b1; tester.check("MultiPatch<Remote<CBrick>> = Remote<CBrick>\n\t",
+ all(a3 == 1.0));
+
+ a0 = b3; tester.check("Brick = MultiPatch<Remote<CBrick>>\n\t",
+ all(a0 == 3.0));
+ a1 = b0; tester.check("Remote<CBrick> = Brick\n\t",
+ all(a1 == 0.0));
+ a2 = b1; tester.check("MultiPatch<Remote<Brick>> = Remote<CBrick>\n\t",
+ all(a2 == 1.0));
+ a3 = b2; tester.check("MultiPatch<Remote<CBrick>> = MultiPatch<Remote<Brick>>\n\t",
+ all(a3 == 2.0));
Array<3, Vector<2, double>, Remote<Brick> > a4(I3);
a4 = Vector<2, double>(1.0, 2.0);
- tester.check(all(a4.comp(1) == 2.0));
-
-#endif // POOMA_CHEETAH
+ tester.check("a4.comp(1)", all(a4.comp(1) == 2.0));
int ret = tester.results( "array_test28" );
Pooma::finalize();
Index: Domain/tests/IteratorPairDomainTest1.cpp
===================================================================
RCS file: /home/pooma/Repository/r2/src/Domain/tests/IteratorPairDomainTest1.cpp,v
retrieving revision 1.1
diff -u -u -r1.1 IteratorPairDomainTest1.cpp
--- Domain/tests/IteratorPairDomainTest1.cpp 9 Apr 2001 21:33:04 -0000 1.1
+++ Domain/tests/IteratorPairDomainTest1.cpp 18 Dec 2003 19:03:43 -0000
@@ -179,7 +179,8 @@
tester.out() << "Finished IteratorPairDomain test 1.\n" << endl;
- int res = tester.results("IteratorPairDomainTest1 " );
+ int res = tester.results("IteratorPairDomainTest1");
+ Pooma::finalize();
return res;
}
Index: Domain/tests/IteratorPairDomainTest2.cpp
===================================================================
RCS file: /home/pooma/Repository/r2/src/Domain/tests/IteratorPairDomainTest2.cpp,v
retrieving revision 1.1
diff -u -u -r1.1 IteratorPairDomainTest2.cpp
--- Domain/tests/IteratorPairDomainTest2.cpp 9 Apr 2001 21:33:04 -0000 1.1
+++ Domain/tests/IteratorPairDomainTest2.cpp 18 Dec 2003 19:03:43 -0000
@@ -89,7 +89,8 @@
tester.out() << "Finished IteratorPairDomain test 2.\n" << endl;
- int res = tester.results("IteratorPairDomainTest " );
+ int res = tester.results("IteratorPairDomainTest2");
+ Pooma::finalize();
return res;
}
Index: Domain/tests/domaintest.cpp
===================================================================
RCS file: /home/pooma/Repository/r2/src/Domain/tests/domaintest.cpp,v
retrieving revision 1.17
diff -u -u -r1.17 domaintest.cpp
--- Domain/tests/domaintest.cpp 7 Jun 2000 03:21:42 -0000 1.17
+++ Domain/tests/domaintest.cpp 18 Dec 2003 19:03:44 -0000
@@ -553,10 +553,9 @@
tester.out() << " split([3.5,4]) ==> " << a4 << ", " << a5 << std::endl;
}
- tester.results("domaintest");
+ int ret = tester.results("domaintest");
Pooma::finalize();
-
- return 0;
+ return ret;
}
// ACL:rcsinfo
Index: Domain/tests/indirectionlist_test1.cpp
===================================================================
RCS file: /home/pooma/Repository/r2/src/Domain/tests/indirectionlist_test1.cpp,v
retrieving revision 1.6
diff -u -u -r1.6 indirectionlist_test1.cpp
--- Domain/tests/indirectionlist_test1.cpp 22 Jan 2003 23:39:27 -0000 1.6
+++ Domain/tests/indirectionlist_test1.cpp 18 Dec 2003 19:03:45 -0000
@@ -94,7 +94,10 @@
tester.out() << roo << std::endl;
tester.out() << "Finished IndirectionList test." << std::endl << std::endl;
- return 0;
+
+ int res = tester.results("indirectionlist_test1");
+ Pooma::finalize();
+ return res;
}
// ACL:rcsinfo
Index: Evaluator/tests/ReductionTest4.cpp
===================================================================
RCS file: /home/pooma/Repository/r2/src/Evaluator/tests/ReductionTest4.cpp,v
retrieving revision 1.3
diff -u -u -r1.3 ReductionTest4.cpp
--- Evaluator/tests/ReductionTest4.cpp 17 Dec 2002 18:39:04 -0000 1.3
+++ Evaluator/tests/ReductionTest4.cpp 18 Dec 2003 19:03:46 -0000
@@ -41,8 +41,6 @@
Pooma::initialize(argc,argv);
Pooma::Tester tester(argc,argv);
-#if POOMA_CHEETAH
-
Loc<1> blocks2(2), blocks5(5);
UniformGridPartition<1> partition2(blocks2), partition5(blocks5);
UniformGridLayout<1> layout2(Interval<1>(10), partition2, DistributedTag()),
@@ -51,8 +49,6 @@
b(layout5);
Array<1, int> c(10);
- Pooma::blockAndEvaluate();
-
for (int i = 0; i < 10; i++)
{
a(i) = i + 1;
@@ -60,6 +56,8 @@
c(i) = i % 5;
}
+ Pooma::blockAndEvaluate();
+
int ret;
bool bret;
@@ -111,8 +109,6 @@
tester.out() << ret << std::endl;
// Finish.
-
-#endif // POOMA_CHEETAH
int return_status = tester.results("ReductionTest4");
Index: Pooma/tests/pabort.cpp
===================================================================
RCS file: /home/pooma/Repository/r2/src/Pooma/tests/pabort.cpp,v
retrieving revision 1.1
diff -u -u -r1.1 pabort.cpp
--- Pooma/tests/pabort.cpp 30 Jan 2003 20:03:53 -0000 1.1
+++ Pooma/tests/pabort.cpp 18 Dec 2003 19:03:47 -0000
@@ -69,6 +69,7 @@
// This test is *expected* to abort.
tester->check(handler_ok);
int res = tester->results("pAbort");
+ Pooma::finalize();
exit(res);
}
@@ -95,6 +96,7 @@
// If we get here, the call to Pooma::pAbort did not work.
int res = tester->results("pAbort");
+ Pooma::finalize();
return res;
}
More information about the pooma-dev
mailing list