From oldham at codesourcery.com Mon Oct 1 20:13:18 2001 From: oldham at codesourcery.com (Jeffrey Oldham) Date: Mon, 1 Oct 2001 13:13:18 -0700 Subject: Last Week's Schedule Message-ID: <200110012013.f91KDIf21068@localhost.localdomain> Here are excerpts from the schedule constructed by Scott, Stephen, Jim, and I for Pooma optimization work. I've annotated some of the lines with comments on the tasks' status. Please feel free to correct the annotations. **** Last Week 24-29Sep: Preliminary Measurements **** JDO and Stephen will use a depth-first approach and Doof2d to measure, instrument the Pooma code, and profile. Jim and Scott will assist as available. Jim: will check in FileSetReader in Blanca branch worked on it. done? will do additional work on Doof2d as time permits no additional time JDO: ensure Tau installed and runs on nirvana and Linux partially done on Linux install cheetah on nirvana already present Jim says it is installed in /home/cheetah (cap?) is it up-to-date? convert Doof2d so runs multiprocessor done measure Doof2d, instrument Pooma, and profile Doof2d instrumenting in progress set up QMTest at Proximation done distribute QMTest testsuites for regression tests, benchmarks, examples done Stephen: Doof2d agglomeration and fixes so runs multiprocessor done measure Doof2d, instrument Pooma, and profile Doof2d instrumenting in progress teach JDO everything he knows 98% progress toward this impossible task Scott: writing Pooma report of past and future done fix scalar advection to use new field abstraction in progress fix scalar advection so runs on a multiprocessor in progress Julian: revise particle tests to use new field interface in progess? unassigned: check for memory leaks in Doof2d no work Thanks, Jeffrey D. Oldham oldham at codesourcery.com From oldham at codesourcery.com Mon Oct 1 20:14:12 2001 From: oldham at codesourcery.com (Jeffrey Oldham) Date: Mon, 1 Oct 2001 13:14:12 -0700 Subject: This Week's Schedule Message-ID: <200110012014.f91KECp21072@localhost.localdomain> Here are excerpts from the schedule constructed by Scott, Stephen, Jim, and I for Pooma optimization work. **** This Week 30Sep-06Oct: Correctness and More Measurements Tau: parallel profiling code JDO will ensure installation and integration with Pooma on Nirvana and Linux JDO and Stephen will determine places in Pooma code to measure correctness of regression tests, examples, benchmarks Using QMTest testsuites to automate testing, we need to ensure that the invariant that All Pooma regression tests, benchmarks, and examples compile and correctly execute. JDO: distribute QMTest testsuites for regression tests, benchmarks, and examples statigraphic flow and possibly Caramana hydrodynamics revisions Stephen: Doof2dField corrections Julian: particle regression tests, benchmarks, and examples Scott: examples except Caramana, statigraphic flow, and examples unassigned: other benchmarks (is this set empty?) correctness: memory leaks Jim will use check for memory leaks in regression tests, benchmarks, and examples using Purify or other memory checking tools on nirvana and linux. Presumably memory leaks are independent of the compiler. benchmark creation ABCTest: JDO: ensure there exists a multipatch compressible version with nontrivial initial conditions Doof2d: merge various codes into one program ensure field version runs write version using relations mostly finished week of 24->29Oct by Stephen and JDO Krylov solver: JDO ensure field version runs write version using relations scalar advection: Scott: convert to new field abstraction statigraphic flow JDO: ensure compilation and execution JDO: add loops and input parameters for various problem sizes, etc. measurements: JDO, Stephen, Scott, Jim The program configurations to measure include: brick, 1-processor multipatch uncompressed, 1-processor, various patch sizes multipatch compressed, 1-processor, various patch sizes multipatch uncompressed, multiprocessor, various patch sizes multipatch compressed, multiprocessor, various patch sizes Hopefully, measuring Doof2d will occur during the week of 24->29Sep and extending this work to other executables will be trivial. Most of the time will be refining what to measure and understanding the results. Jim will specialize in measuring programs that are running cross-box. Thanks, Jeffrey D. Oldham oldham at codesourcery.com From oldham at codesourcery.com Mon Oct 1 20:46:48 2001 From: oldham at codesourcery.com (Jeffrey Oldham) Date: Mon, 1 Oct 2001 13:46:48 -0700 Subject: Pooma Code Failures Message-ID: <200110012046.f91Kkmt21675@localhost.localdomain> One of this week's tasks is to eliminate all these Pooma regressions. I used sequential Linux and gcc3.1 so some of these might be gcc3.1 failures. 1) Does anyone have a failure list when using KCC? 2) Some of the examples and benchmarks run for a long time. It would be nice to find these and reduce their running time. 34 ( 14%) tests FAIL examples.field.caramana.caramana : FAIL examples.field.laplace.laplace : FAIL examples.field.laplace2.laplace2 : FAIL examples.field.scalaradvection.scalaradvection : FAIL examples.field.scalaradvection1d.scalaradvection1d : FAIL examples.field.statigraphicflow.statigraphicflow : FAIL examples.lattice.coordinate : FAIL examples.particles.bounce.bounce : FAIL examples.particles.oscillation.oscillation : FAIL examples.particles.pic2d.pic2d : FAIL examples.solvers.blockdecomposed.fivepoint.fivepointsolve : FAIL examples.solvers.blockdecomposed.ninepoint.ninepointsolve : FAIL regressions.array.scalaradvection : FAIL regressions.array.scalaradvectionxb : FAIL regressions.connect.lux.bytefield : FAIL regressions.connect.lux.lux_test1 : FAIL regressions.connect.lux.lux_test2 : FAIL regressions.databrowser.testdatabrowser : FAIL regressions.dynamicarray.dynamic_array_test5 : FAIL regressions.field.crossbox : FAIL regressions.field.localpatch : FAIL regressions.field.nearestneighbors : FAIL regressions.field.positions : FAIL regressions.io.filesetreadertest1 : FAIL regressions.io.filesetreadertest2 : FAIL regressions.particles.interpolate : FAIL regressions.particles.particle_bench1 : FAIL regressions.particles.particle_bench2 : FAIL regressions.particles.particle_bench3 : FAIL regressions.particles.particle_bench4 : FAIL regressions.particles.particle_test1 : FAIL regressions.particles.particle_test2 : FAIL regressions.particles.particle_test3 : FAIL regressions.particles.particle_test4 : FAIL Thanks, Jeffrey D. Oldham oldham at codesourcery.com From jcrotinger at proximation.com Wed Oct 3 15:30:20 2001 From: jcrotinger at proximation.com (James Crotinger) Date: Wed, 3 Oct 2001 09:30:20 -0600 Subject: FieldTour and SGI CC Message-ID: FieldTour and a number of other things won't compile with SGI CC on nirvana. Here's the error I get: cc-1132 CC: ERROR File = /scratch/jac/r2/src/Evaluator/MultiArgEvaluator.h, Line = 493 The class template "LeafFunctor>" has no member "Type_t" . typedef typename LeafFunctor >::Type_t Type1_t; ^ 1 error detected in the compilation of "/scratch/jac/r2/src/Field/tests/FieldTou r1.cpp". real 20.313 user 14.109 sys 3.195 This is not a very helpful message - is there any way to get SGI CC to tell us what it was instantiating when this happened? Any ideas here? I'm not sure if I had tested any of these things recently or not. At any rate, I think it is important that we be able to compile with SGI CC since it is easier to do remote debugging (dbx works - totalview seems to work with KCC, but using X over SSH sucks, and I don't really want to take the time to learn the command line interface to totalview). Jim -------------- next part -------------- An HTML attachment was scrubbed... URL: From oldham at codesourcery.com Wed Oct 3 21:00:34 2001 From: oldham at codesourcery.com (Jeffrey Oldham) Date: Wed, 3 Oct 2001 14:00:34 -0700 Subject: Using Tau and PDT with Pooma Message-ID: <20011003140034.A2848@codesourcery.com> These are the steps I used to install Tau on my sequential Linux computer. Visit http://www.acl.lanl.gov/tau to download Tau 2.9.19. (Note the version number!) Visit http://www.acl.lanl.gov/pdtoolkit to download PDToolkit. After extracting the PDToolkit files, perform the following commands: ./configure -GNU # use g++ to compile the library # alternatively use -KCC make make install # How does one specify installation in a # different directory? After extracting the Tau files, Apply the source code patch. ./configure -gnu -noex -PROFILE -pdt=${HOME}/pooma/pdtoolkit-1.3 # Pooma's default is no exceptions. # -gnu = use g++ and gcc # Alternatively, s/-gnu/-c++=KCC/ # -pdt specifies the location of the PDToolkit # I also added '-useropt='-static -g -DTAU_DOT_H_LESS_HEADERS' ' # to ensure, among other things, '.h'-less header files are used. make install make tests cd i386_linux/lib # Modify according to your architecture. mv Makefile.tau-noex Makefile.tau-gcc-noex The last two commands rename a Makefile to record the associated compiler, as needed by Pooma. For example, one can replace "gcc" with ?"KCC"?. The Tau and Pooma configuration files have diverged. If using Linux, patch the appropriate Pooma config/arch configuration file: Add a line defining '$profile_archtype' to "i386_linux" (including quotation marks) and modify '$profile_lib_subdir' to use '$profile_archtype' instead of the hard-coded string. First, make set the environment variables TAUDIR and PDTDIR to the appropriate source locations. For example, I added these two lines to my ${HOME}/.profile: export TAUDIR=${HOME}/pooma/tau-2.9.19 export PDTDIR=${HOME}/pooma/pdtoolkit-1.3 I also added '${TAUDIR}/i386_linux/bin:${PDTDIR}/linux/bin' to ${PATH}. By default, Pooma will use PDToolkit to instrument all .cpp files. To do so, provide '--profile' as a configuration option: ./configure --arch LINUXgcc --bounds --debug --profile Some Pooma source code changes will be necessary because the PDT parser is old. Sameer will send a new parser soon. Thanks, Jeffrey D. Oldham oldham at codesourcery.com -------------- next part -------------- diff -r -C 2 /home/oldham/tmp/tau-2.9.19/include/Profile/FunctionInfo.h /home/oldham/pooma/tau-2.9.19/include/Profile/FunctionInfo.h *** /home/oldham/tmp/tau-2.9.19/include/Profile/FunctionInfo.h Tue Aug 28 11:42:44 2001 --- /home/oldham/pooma/tau-2.9.19/include/Profile/FunctionInfo.h Wed Oct 3 12:37:34 2001 *************** *** 58,70 **** const char *ProfileGroupName = "TAU_DEFAULT", bool InitData = false, int tid = RtsLayer::myThread()); ! FunctionInfo(const char* name, string& type, TauGroup_t ProfileGroup = TAU_DEFAULT, const char *ProfileGroupName = "TAU_DEFAULT", bool InitData = false, int tid = RtsLayer::myThread()); ! FunctionInfo(string& name, string& type, TauGroup_t ProfileGroup = TAU_DEFAULT, const char *ProfileGroupName = "TAU_DEFAULT", bool InitData = false, int tid = RtsLayer::myThread()); ! FunctionInfo(string& name, const char * type, TauGroup_t ProfileGroup = TAU_DEFAULT, const char *ProfileGroupName = "TAU_DEFAULT", bool InitData = false, --- 58,70 ---- const char *ProfileGroupName = "TAU_DEFAULT", bool InitData = false, int tid = RtsLayer::myThread()); ! FunctionInfo(const char* name, const string& type, TauGroup_t ProfileGroup = TAU_DEFAULT, const char *ProfileGroupName = "TAU_DEFAULT", bool InitData = false, int tid = RtsLayer::myThread()); ! FunctionInfo(const string& name, const string& type, TauGroup_t ProfileGroup = TAU_DEFAULT, const char *ProfileGroupName = "TAU_DEFAULT", bool InitData = false, int tid = RtsLayer::myThread()); ! FunctionInfo(const string& name, const char * type, TauGroup_t ProfileGroup = TAU_DEFAULT, const char *ProfileGroupName = "TAU_DEFAULT", bool InitData = false, diff -r -C 2 /home/oldham/tmp/tau-2.9.19/include/Profile/TauAPI.h /home/oldham/pooma/tau-2.9.19/include/Profile/TauAPI.h *** /home/oldham/tmp/tau-2.9.19/include/Profile/TauAPI.h Tue Aug 28 11:42:44 2001 --- /home/oldham/pooma/tau-2.9.19/include/Profile/TauAPI.h Wed Oct 3 11:45:29 2001 *************** *** 95,100 **** #ifdef NO_RTTI ! /* #define CT(obj) string(#obj) */ ! #define CT(obj) " " #else // RTTI is present #define CT(obj) string(RtsLayer::CheckNotNull(typeid(obj).name())) --- 95,100 ---- #ifdef NO_RTTI ! #define CT(obj) string(#obj) ! /* TMP #define CT(obj) " " */ #else // RTTI is present #define CT(obj) string(RtsLayer::CheckNotNull(typeid(obj).name())) diff -r -C 2 /home/oldham/tmp/tau-2.9.19/src/Profile/FunctionInfo.cpp /home/oldham/pooma/tau-2.9.19/src/Profile/FunctionInfo.cpp *** /home/oldham/tmp/tau-2.9.19/src/Profile/FunctionInfo.cpp Wed Jun 20 13:26:45 2001 --- /home/oldham/pooma/tau-2.9.19/src/Profile/FunctionInfo.cpp Wed Oct 3 12:37:07 2001 *************** *** 172,176 **** ////////////////////////////////////////////////////////////////////// ! FunctionInfo::FunctionInfo(const char *name, string& type, TauGroup_t ProfileGroup , const char *ProfileGroupName, bool InitData, int tid) --- 172,176 ---- ////////////////////////////////////////////////////////////////////// ! FunctionInfo::FunctionInfo(const char *name, const string& type, TauGroup_t ProfileGroup , const char *ProfileGroupName, bool InitData, int tid) *************** *** 184,188 **** ////////////////////////////////////////////////////////////////////// ! FunctionInfo::FunctionInfo(string& name, const char * type, TauGroup_t ProfileGroup , const char *ProfileGroupName, bool InitData, int tid) --- 184,188 ---- ////////////////////////////////////////////////////////////////////// ! FunctionInfo::FunctionInfo(const string& name, const char * type, TauGroup_t ProfileGroup , const char *ProfileGroupName, bool InitData, int tid) *************** *** 196,200 **** ////////////////////////////////////////////////////////////////////// ! FunctionInfo::FunctionInfo(string& name, string& type, TauGroup_t ProfileGroup , const char *ProfileGroupName, bool InitData, int tid) --- 196,200 ---- ////////////////////////////////////////////////////////////////////// ! FunctionInfo::FunctionInfo(const string& name, const string& type, TauGroup_t ProfileGroup , const char *ProfileGroupName, bool InitData, int tid) From mark at codesourcery.com Thu Oct 4 14:05:18 2001 From: mark at codesourcery.com (Mark Mitchell) Date: Thu, 04 Oct 2001 07:05:18 -0700 Subject: FieldTour and SGI CC In-Reply-To: Message-ID: <9640000.1002204318@gandalf.codesourcery.com> --On Wednesday, October 03, 2001 09:30:20 AM -0600 James Crotinger wrote: > > FieldTour and a number of other things won't compile with SGI CC on > nirvana. Here's the error I get: > > cc-1132 CC: ERROR File = > /scratch/jac/r2/src/Evaluator/MultiArgEvaluator.h, Line = 493 > The class template "LeafFunctor>" has no member > "Type_t" . > > typedef typename LeafFunctor >::Type_t Type1_t; > ^ > > 1 error detected in the compilation of > "/scratch/jac/r2/src/Field/tests/FieldTou r1.cpp". > > real 20.313 > user 14.109 > sys 3.195 > > This is not a very helpful message - is there any way to get SGI CC to > tell us what it was instantiating when this happened? Any ideas here? I don't know of any techniques here. I guess the obvious thing to check is that LeafFunctor really does have Type_t as a member, in all specializations, painful though thtat seems. -- Mark Mitchell mark at codesourcery.com CodeSourcery, LLC http://www.codesourcery.com From oldham at codesourcery.com Thu Oct 4 18:15:02 2001 From: oldham at codesourcery.com (Jeffrey Oldham) Date: Thu, 4 Oct 2001 11:15:02 -0700 Subject: Remove 'test' Directory Message-ID: <20011004111502.A855@codesourcery.com> Stephen, OK to commit this patch? This patch removes the four tests in the Pooma 'test' directory. If this is not acceptable, please send email to pooma-dev at pooma.codesourcery.com stating what should be done with these test programs, e.g., move them into src/.../tests/ directories. 2001-10-04 Jeffrey D. Oldham * Domain/Loc/Characteristics/LocCharacteristics.cpp: Remove this stale file. * Domain/NewDomain/Constructors/NewDomainConstructor.cpp: Likewise. * Domain/Range/Constructors/RangeConstructor.cpp: Likewise. * Domain/Range/Constructors/makefile: Likewise. * Engine/BrickEngine/BrickEngine/BrickEngineTest.cpp: Likewise. Nothing to test. Applied to mainline. Approved by ???you??? Thanks, Jeffrey D. Oldham oldham at codesourcery.com -------------- next part -------------- Index: Domain/Loc/Characteristics/LocCharacteristics.cpp =================================================================== RCS file: LocCharacteristics.cpp diff -N LocCharacteristics.cpp *** /tmp/cvsm6VP8z Thu Oct 4 12:11:21 2001 --- /dev/null Fri Mar 23 21:37:44 2001 *************** *** 1,315 **** - // -*- C++ -*- - //-------------------------------------------------------------------- - - // Loc Characteristics Component Test Code - //-------------------------------------------------------------------- - - #include "Pooma/Pooma.h" - #include "Domain/Loc.h" - #include - #include - #include - - void reportResults(int n, char *test, bool testStatus) - { - char* statusString = "passed"; - if(!testStatus) statusString = "failed"; - cout << " Test " << setw(3) << n << ", " - << setw(10) << test << ": " << statusString << "\n"; - } - - - - void uncaughtErrorReport(const char *what, int n) - { - cerr << "\nAck! Caught assertion during test # " << n << ":" << endl\ - ; - cerr << what << endl; - } - - template - Loc<1> testElement(const T &dom, int no) { - //get the nth element of dom, and store it in a separte variable - // T::OneDomain_t singleElem = dom[no]; - Loc<1> singleElem = dom[no]; - return singleElem; - } - - // template - // void testDom(const T &dom) { - // //get the dom, and store it in a separte variable - // T::Domain_t singleDomain = dom; - // cout << "Domain " << singleDomain << endl; - // //return singleDomain; - // } - - - template - struct TypeMatchTester - { - static const bool Result = false; - }; - - - template - struct TypeMatchTester - { - static const bool Result = true; - }; - - - typedef Loc<1>::Domain_t DTest_t; - typedef Loc<1>::Element_t ETest_t; - typedef Loc<1>::OneDomain_t ODTest_t; - - - main(int argc, char *argv[]) { - - Pooma::initialize( argc, argv ); - - int debug = 0; - int testNumber = 0; - bool testStatus; - - if ((argc > 1) && (!strcmp(argv[1],"-d"))) debug = 1; - cout << "\n" - << " =============================================================\n" - << " Domain test for Characterists and Interface on Loc object \n" - << " =============================================================\n" - << endl; - - if (debug){ - cout << "=========================DEBUG==================================" - << endl; - cout << endl; - cout << "Starting domain test for Characterists and Interface on "; - cout << " Loc object" << endl; - cout << "Loc objects represent a single point." << endl; - cout << endl; - cout << "first() : the single point in the Loc object" << endl; - cout << "last() : same as first" << endl; - cout << "stride() : this is always 1 " << endl; - cout << "min() : same as first" << endl; - cout << "max() : same as first" << endl; - cout << "length() : this is always 1 " << endl; - cout << "size() : total volume size of the domain, should " ; - cout << "always be one "<< endl; - cout << "empty() :this should always be false " << endl; - cout << "dimensions : the number N " << endl; - cout << "loopAware : this should be 0 " << endl; - cout << "singleValued : this should be 1 " << endl; - cout << "unitStride : this should be 1 " << endl; - cout << endl; - } - - Loc<4>Empty; - Loc<1> n1i(-1); - Loc<2> n2i(-1,-2); - Loc<3> n3i(-1,-2,-3); - Loc<4> n4i(-1,-2,-3,-4); - Loc<5> n5i(-1,-2,-3,-4,-5); - Loc<6> n6i(-1,-2,-3,-4,-5,-6); - - - Loc<1> a1i(1); - Loc<2> a2i(1,2); - Loc<2> a2ia(1); - Loc<3> a3i(1,2,3); - Loc<3> a3ia(1,2); - Loc<4> a4i(1,2,3,4); - Loc<4> a4ia(1,2,3); - Loc<5> a5i(a3i,a2i); - Loc<5> a5ia(1,2,3,4); - Loc<6> a6i(1,2,3,4,5,6); - Loc<6> a6ia(1,2,3,4); - - //Can not use floating point values for endpoints. - // Loc<1> f1i(1.1); - - //If you leave a empty endpoint it will not be intialized to zero but - //will have random values. - //Loc<2>(1) will give you the 001:*** where * is any random value - - cout << endl; - - - Loc<1> a1 = Loc<1>(1); - //Loc<1> b1(Loc<1>()); - Loc<2> b2(a1,Loc<1>(2)); - Loc<3> b3(b2,Loc<1>(3)); - Loc<4> b4(b3,Loc<1>(4)); - Loc<5> b5(b4,Loc<1>(5)); - Loc<6> b6(b5,Loc<1>(6)); - Loc<6> b6a(b3,b2,Loc<1>(6)); - - //OneDomain_t ODT = b2[0]; - //Domain_t DT = b5; - if (debug){ - - cout << endl; - - cout << " a5i = " << a5i << endl; - cout << " a5i[0].length() = " << a5i[0].length() << endl; - cout << " a5i[1].length() = " << a5i[1].length() << endl; - cout << " a5i[2].length() = " << a5i[2].length() << endl; - cout << " a5i[3].length() = " << a5i[3].length() << endl; - cout << " a5i[4].length() = " << a5i[4].length() << endl; - - cout << " a5i[0].first() = " << a5i[0].first() << endl; - cout << " a5i[1].first() = " << a5i[1].first() << endl; - cout << " a5i[2].first() = " << a5i[2].first() << endl; - cout << " a5i[3].first() = " << a5i[3].first() << endl; - cout << " a5i[4].first() = " << a5i[4].first() << endl; - - cout << " a5i[0].last() = " << a5i[0].last() << endl; - cout << " a5i[1].last() = " << a5i[1].last() << endl; - cout << " a5i[2].last() = " << a5i[2].last() << endl; - cout << " a5i[3].last() = " << a5i[3].last() << endl; - cout << " a5i[4].last() = " << a5i[4].last() << endl; - - cout << " a5i[0].stride() = " << a5i[0].stride() << endl; - cout << " a5i[1].stride() = " << a5i[1].stride() << endl; - cout << " a5i[2].stride() = " << a5i[2].stride() << endl; - cout << " a5i[3].stride() = " << a5i[3].stride() << endl; - cout << " a5i[4].stride() = " << a5i[4].stride() << endl; - - cout << " a5i[0].min() = " << a5i[0].min() << endl; - cout << " a5i[1].min() = " << a5i[1].min() << endl; - cout << " a5i[2].min() = " << a5i[2].min() << endl; - cout << " a5i[3].min() = " << a5i[3].min() << endl; - cout << " a5i[4].min() = " << a5i[4].min() << endl; - - cout << " a5i[0].max() = " << a5i[0].max() << endl; - cout << " a5i[1].max() = " << a5i[1].max() << endl; - cout << " a5i[2].max() = " << a5i[2].max() << endl; - cout << " a5i[3].max() = " << a5i[3].max() << endl; - cout << " a5i[4].max() = " << a5i[4].max() << endl; - - cout << " a5i.dimensions() = " << a5i.dimensions << endl; - //cout << " a5i.loopAware() = " << a5i.loopAware() << endl; - //cout << " a5i.singleValued()= " << a5i.singleValued() << endl; - //cout << " a5i.unitStride() = " << a5i.unitStride() << endl; - - cout << endl; - - cout << " after a1 = 1 : a1 = " << a1 << endl; - cout << " 2D multiple Loc<2> b2(a1,Loc<1>(2)) = " << b2 << endl; - cout << " 3D multiple Loc<3> b3(b2,Loc<1>(3)) = " << endl; - cout << " " << b3 << endl; - cout << " 4D multiple Loc<4> b4(b3,Loc<1>(4)) = " << endl; - cout << " " << b4 << endl; - cout << " 5D multiple Loc<5> b5(b4,Loc<1>(5)) = " << endl; - cout << " " << b5 << endl; - cout << " 6D multiple Loc<6> b6(b5,Loc<1>(6)) = " << endl; - cout << " " << b6 << endl; - cout << " 6D multiple Loc<6> b6a(b3,b2,Loc<1>(6))= " << endl; - cout << " " << b6a << endl; - cout << " 6D multiple Loc<6> b6a(b3,b2,Loc<1>(6)).size = " - << b6a.size() << endl; - cout << " 6D multiple Loc<6> b6a(b3,b2,Loc<1>(6)).size = " << - b6a.empty() << endl; - // cout << " OneDomain = " << OneDomain << endl; - cout << " Empty = " << Empty << endl; - cout << " Empty.size = " << Empty.size() << endl; - cout << " Empty.empty = " << Empty.empty() << endl; - - - cout << "=========================END DEBUG=============================" - << endl; - cout << endl; - } - try { - testStatus = (b6a.dimensions == 6); - testStatus = (b5.dimensions == 5) && testStatus; - testStatus = (b4.dimensions == 4) && testStatus; - testStatus = (b3.dimensions == 3) && testStatus; - testStatus = (b2.dimensions == 2) && testStatus; - reportResults(testNumber++,"Loc<>.dimensions ",testStatus); - testStatus = (b6a[0].stride() == b6a.size()) && testStatus; - testStatus = (b5[0].stride() == b5.size()) && testStatus; - testStatus = (b4[0].stride() == b4.size()) && testStatus; - reportResults(testNumber++,"Loc<>.size ",testStatus); - testStatus = (Empty.empty() == 0); - testStatus = (b6a.empty() == 0) && testStatus; - reportResults(testNumber++,"Loc<>.empty ",testStatus); - testStatus = a5i[0].stride(); - testStatus = a5i[1].stride() && testStatus; - testStatus = a5i[2].stride() && testStatus; - testStatus = a5i[3].stride() && testStatus; - testStatus = a5i[4].stride() && testStatus; - reportResults(testNumber++,"Loc<>.stride ",testStatus); - testStatus = (b6a[0].first() == b6a[0].last()); - testStatus = (b6a[1].first() == b6a[1].last()) && testStatus; - testStatus = (b6a[2].first() == b6a[2].last()) && testStatus; - testStatus = (b6a[3].first() == b6a[3].last()) && testStatus; - testStatus = (b6a[4].first() == b6a[4].last()) && testStatus; - testStatus = (b6a[5].first() == b6a[5].last()) && testStatus; - reportResults(testNumber++,"Loc<>.first/last ",testStatus); - testStatus = (b5[0].first() == b5[0].min()); - testStatus = (b5[1].first() == b5[1].min()) && testStatus; - testStatus = (b5[2].first() == b5[2].min()) && testStatus; - testStatus = (b5[3].first() == b5[3].min()) && testStatus; - testStatus = (b5[4].first() == b5[4].min()) && testStatus; - reportResults(testNumber++,"Loc<>.first/min ",testStatus); - testStatus = (b4[0].first() == b4[0].max()); - testStatus = (b4[1].first() == b4[1].max()) && testStatus; - testStatus = (b4[2].first() == b4[2].max()) && testStatus; - testStatus = (b4[3].first() == b4[3].max()) && testStatus; - reportResults(testNumber++,"Loc<>.first/max ",testStatus); - testStatus = (b3[0].stride() == b3[0].length()); - testStatus =(b3[1].stride() == b3[1].length()) && testStatus; - testStatus =(b3[2].stride() == b3[2].length()) && testStatus; - reportResults(testNumber++,"Loc<>.length ",testStatus); - testStatus = (!b6a.loopAware); - testStatus = (!b5.loopAware) && testStatus; - testStatus = (!b4.loopAware) && testStatus; - testStatus = (!b3.loopAware) && testStatus; - testStatus = (!b2.loopAware) && testStatus; - reportResults(testNumber++,"Loc<>.loopAware ",testStatus); - testStatus = (b6a.singleValued); - testStatus = (b5.singleValued) && testStatus; - testStatus = (b4.singleValued) && testStatus; - testStatus = (b3.singleValued) && testStatus; - testStatus = (b2.singleValued) && testStatus; - reportResults(testNumber++,"Loc<>.singleValued ",testStatus); - testStatus = (b6a.unitStride); - testStatus = (b5.unitStride) && testStatus; - testStatus = (b4.unitStride) && testStatus; - testStatus = (b3.unitStride) && testStatus; - testStatus = (b2.unitStride) && testStatus ; - reportResults(testNumber++,"Loc<>.unitStride ",testStatus); - testStatus = TypeMatchTester:: Domain_t>::Result; - reportResults(testNumber++,"Typedef Domain_t ", testStatus); - testStatus = TypeMatchTester:: Element_t>::Result - && testStatus; - reportResults(testNumber++,"Typedef Elemant_t ", testStatus); - testStatus = TypeMatchTester:: OneDomain_t>::Result - && testStatus; - reportResults(testNumber++,"Typedef OneDomain_t ", testStatus); - testStatus = !TypeMatchTester:: Element_t>::Result - && testStatus; - reportResults(testNumber++,"Typedef Domain_t ", testStatus); - testStatus = !TypeMatchTester:: Domain_t>::Result - && testStatus; - reportResults(testNumber++,"Typedef Elemant_t ", testStatus); - testStatus = !TypeMatchTester:: Element_t>::Result - && testStatus; - reportResults(testNumber++,"Typedef OneDomain_t ", testStatus); - testStatus = (a1i == testElement(a4i[0],0)); - testStatus = (b6a[5] == testElement(a6i[5],5)) && testStatus; - testStatus = (b6a[4] == testElement(b4[1],1)) && testStatus; - testStatus = (b6a[4] != testElement(b4[2],2)) && testStatus; - reportResults(testNumber++,"OneDomain ",testStatus); - } - - catch (const char *err) - { uncaughtErrorReport(err,testNumber); } - catch(const Pooma::Assertion &err) - {uncaughtErrorReport(err.what(),testNumber); } - catch(...) - { cerr << "Unknown exception!" << endl; } - cout << endl; - - Pooma::finalize(); - } - --- 0 ---- Index: Domain/NewDomain/Constructors/NewDomainConstructor.cpp =================================================================== RCS file: NewDomainConstructor.cpp diff -N NewDomainConstructor.cpp *** /tmp/cvsHWUAsL Thu Oct 4 12:11:21 2001 --- /dev/null Fri Mar 23 21:37:44 2001 *************** *** 1,224 **** - // -*- C++ -*- - //--------------------------------------------------------------------- - - // NewDomainConstructor Component Test Code - //--------------------------------------------------------------------- - - #include - #include - #include - #include - #include - #include - - - void reportResults(int n, char *test, bool testStatus) - { - char* statusString = "passed"; - if(!testStatus) statusString = "failed"; - cout << " Test " << setw(3) << n << ", " - << setw(10) << test << ": " << statusString << "\n"; - } - - void uncaughtErrorReport(const char *what, int n) - { - cerr << "\nAck! Caught assertion during test # " << n << ":" << endl; - cerr << what << endl; - } - - template - Interval<1> testElement(const T &dom, int no) { - //get the nth element of dom, and store it in a separte variable - T::OneDomain_t singleElem = dom[no]; - return singleElem; - } - - template - struct TypeMatchTester - { - static const bool Result = false; - }; - - template - struct TypeMatchTester - { - static const bool Result = true; - }; - - //typedef NewDomain<>::Type_t TTest_t; - //typedef NewDomain<>::FullType_t FTest_t; - //typedef NewDomain<>::SliceType_t STest_t; - - - main(int argc, char *argv[]) { - - int debug = 0; - int testNumber = 0; - bool testStatus; - - if ((argc > 1) && (!strcmp(argv[1],"-d"))) debug = 1; - cout << "\n" - << " ==============================================================\n" - << " Domain test for Constructors on NewDomain object \n" - << " ==============================================================\n" - << endl; - - if (debug){ - cout << "=========================DEBUG===================================" - << endl; - cout << endl; - cout << "Starting domain test for Constructors on NewDomain object" - << endl; - cout << "A set of simple structs which tell how to combine." << endl; - cout << endl; - cout << " different Domain object together. TThey are named " << endl; - cout << "NewDomain1 - NewDoamin7 and are templated on from 1 .. 7 " - << endl; - cout << "different domain types. If you have a domain as the last " - << endl; - cout << "argrment you must have a space between this argument and the" - << endl; - cout << "last >,NewDomain2,Loc<1> >::Type_t newdomain2; " - << endl; - } - cout << endl; - Loc<1> D1(1); - Loc<1> D2(2); - Range<2> R1(Interval<1>(5,10),Interval<1>(-1,100)); - Range<2> R2(Range<1>(5,10,5),Range<1>(-100,100,20)); - Interval<2> I1(Interval<1>(20,40),Interval<1>(-50,10)); - Interval<2> I2(Interval<1>(20,40),Loc<1>(-99)); - Range<2> R(Range<1>(1,1,1),999); - NewDomain2,int>::Type_t newdomain2; - - NewDomain2,int>::Type_t newdomain2a = - NewDomain2,int>::combine(D1,2); - - NewDomain3,Range<2>,int>::Type_t newdomain3; - NewDomain3,Range<2>,int>::Type_t newdomain3a = - NewDomain3,Range<2>,int>::combine(newdomain2a,R2,999); - - NewDomain4,Interval<2>,Loc<1>,Loc<1> >::Type_t newdomain4; - - NewDomain4,Interval<2>,Loc<1>,Loc<1> >::Type_t newdomain4a = - NewDomain4,Interval<2>,Loc<1>,Loc<1> >::combine(R2,I2,D1,D2); - - NewDomain5,Range<2>,int,Loc<4>,int>::Type_t newdomain5; - NewDomain5,Range<2>,int,Loc<4>,int>::Type_t newdomain5a = - NewDomain5,Range<2>,int,Loc<4>,int>::combine - (newdomain2a,R2,999,Loc<4>(D1,D2,newdomain2a),999); - - NewDomain6,Range<2>,int,Loc<4>,Loc<4>,int>::Type_t newdomain6; - NewDomain6,Range<2>,int,Loc<4>,Loc<4>,int>::Type_t newdomain6a = - NewDomain6,Range<2>,int,Loc<4>,Loc<4>,int>::combine - (newdomain2a,R1,99,Loc<4>(newdomain2a,newdomain2a),Loc<4> - (newdomain2a,newdomain2a),999); - - NewDomain7,Range<2>,Loc<1>,Loc<1>,Interval<2>,Interval<2>, - int>::Type_t newdomain7; - - NewDomain7,Range<2>,Loc<1>,Loc<2>,Interval<2>,Interval<2>, - Range<2> >::Type_t newdomain7a = NewDomain7,Range<2>,Loc<1>, - Loc<2>,Interval<2>,Interval<2>,Range<2> >::combine(R1,R2,D1,newdomain2a, - I1,I2,R2); - - - if (debug){ - cout << "================================================================" - << endl; - cout << endl; - cout << " NewDomain7,Range<2>,Loc<1>,Loc<2>,Interval<2>, Interval<2>,int>::combine(R1,R2,D1,newdomain2a,I1,I2,999) " << newdomain7a << endl; - cout << " R1 " << R1 << endl; - cout << " R2 " << R2 << endl; - cout << " D1 " << D1 << endl; - cout << " newdomain2a " << newdomain2a << endl; - cout << " I1 " << I1 << endl; - cout << " I2 " << I2 << endl; - cout << " newdomain2 " << newdomain2 << endl; - cout << " newdomain2a " << newdomain2a << endl; - cout << " newdomain3 " << newdomain3 << endl; - cout << " newdomain3a " << newdomain3a << endl; - cout << " newdomain4 " << newdomain4 << endl; - cout << " newdomain4a " << newdomain4a << endl; - cout << " newdomain5 " << newdomain5 << endl; - cout << " newdomain5a \n" << " " << newdomain5a << endl; - cout << " newdomain6 \n " << " " << newdomain6 << endl; - cout << " newdomain6a \n " << " " << newdomain6a << endl; - cout << " newdomain7 \n " << " " << newdomain7 << endl; - cout << " newdomain7a \n " << " " << newdomain7a << endl; - cout << " newdomain2.dimensions " << newdomain2.dimensions << endl; - cout << " newdomain3.dimensions " << newdomain3.dimensions << endl; - cout << " newdomain4.dimensions " << newdomain4.dimensions << endl; - cout << " newdomain5.dimensions " << newdomain5.dimensions << endl; - cout << " newdomain6.dimensions " << newdomain6.dimensions << endl; - cout << " newdomain7.dimensions " << newdomain7.dimensions << endl; - cout << " newdomain2a.dimensions " << newdomain2a.dimensions << endl; - cout << " newdomain3a.dimensions " << newdomain3a.dimensions << endl; - cout << " newdomain4a.dimensions " << newdomain4a.dimensions << endl; - cout << " newdomain5a.dimensions " << newdomain5a.dimensions << endl; - cout << " newdomain6a.dimensions " << newdomain6a.dimensions << endl; - cout << " newdomain7a.dimensions " << newdomain7a.dimensions << endl; - cout << endl; - cout << "================================================================" << endl; - } - cout << "Testing NewDomain<*> constructors methods:" << endl; - cout << "----------------------------------------------------------" << endl; - try { - - //---------------------------------------------------------------------- - // Test NewDomain Construtor - //---------------------------------------------------------------------- - - testStatus = (newdomain2.dimensions == 2); - testStatus = (newdomain3.dimensions == 5) && testStatus; - testStatus = (newdomain4.dimensions == 6) && testStatus; - testStatus = (newdomain5.dimensions == 10) && testStatus; - testStatus = (newdomain6.dimensions == 14) && testStatus; - testStatus = (newdomain7.dimensions == 11) && testStatus; - testStatus = (newdomain7a.dimensions == 13) && testStatus; - reportResults(testNumber++,"Empty Construtor ",testStatus); - - //---------------------------------------------------------------------- - // Test Combine Construtor - //---------------------------------------------------------------------- - testStatus = (newdomain2a[1] == 2 ); - testStatus = (newdomain3a[2] == R2[0]) && testStatus; - testStatus = (newdomain4a[5] == Loc<1>(2)) && testStatus ; - testStatus = (newdomain5a[4] == Loc<1>(999))&& testStatus ; - testStatus = (newdomain6a[12] == D2) && testStatus; - //testStatus = (newdomain7a[11] == Range<1>(-100,100,20)) && testStatus; - reportResults(testNumber++,"Combine Construtor ",testStatus); - - //---------------------------------------------------------------------- - // Test Fill Construtor - //---------------------------------------------------------------------- - NewDomain2,int>::fill(newdomain2,D1,2); - testStatus = (newdomain2a ==newdomain2 ); - NewDomain6,Range<2>,int,Loc<4>,Loc<4>,int>::fill - ( newdomain6,newdomain2a,R1,99,Loc<4>(newdomain2a,newdomain2a),Loc<4> - (newdomain2a,newdomain2a),999); - testStatus = (newdomain6a ==newdomain6 ) && testStatus; - NewDomain5,Range<2>,int,Loc<4>,int>::fill( - newdomain5,newdomain2a,R2,999,Loc<4>(D1,D2,newdomain2a),999); - testStatus = (newdomain5a == newdomain5) && testStatus ; - reportResults(testNumber++,"Fill Construtor ",testStatus); - } // end try - - catch (const char *err) - { uncaughtErrorReport(err,testNumber); } - catch(const Pooma::Assertion &err) - {uncaughtErrorReport(err.what(),testNumber); } - catch(...) - { cerr << "Unknow exception!" << endl; } - cout << endl; - - - } - - - - - - - - --- 0 ---- Index: Domain/Range/Constructors/RangeConstructor.cpp =================================================================== RCS file: RangeConstructor.cpp diff -N RangeConstructor.cpp *** /tmp/cvspsACMW Thu Oct 4 12:11:21 2001 --- /dev/null Fri Mar 23 21:37:44 2001 *************** *** 1,217 **** - // -*- C++ -*- - //-------------------------------------------------------------------- - - // Range Constructor Component Test Code - //-------------------------------------------------------------------- - - // include files - - #include "Pooma/Pooma.h" - #include "Domain/Loc.h" - #include "Domain/Range.h" - #include "Domain/Interval.h" - #include - #include - #include - - void reportResults(int n, char *test, bool testStatus) - { - char* statusString = "passed"; - if(!testStatus) statusString = "failed"; - cout << " Test " << setw(3) << n << ", " - << setw(10) << test << ": " << statusString << "\n"; - } - - void uncaughtErrorReport(const char *what, int n) - { - cerr << "\nAck! Caught assertion during test # " << n << ":" << endl; - cerr << what << endl; - } - - - main(int argc, char *argv[]) { - - Pooma::initialize( argc, argv ); - - int debug = 0; - int testNumber = 0; - bool testStatus; - - if ((argc > 1) && (!strcmp(argv[1],"-d"))) debug = 1; - - - cout << "\n" - << " ==============================================================\n" - << " Domain test for Constructors on Range object \n" - << " ==============================================================\n" - << endl; - - if (debug){ - cout << "=========================DEBUG===================================" - << endl; - cout << "Range represents a sequence of integers [a,a+s,... b], with " - << endl; - cout << "endpoints a and b, and stride s. Each dimension is independent" - << endl; - cout << "of the other. The endpoints may be positive or negative." << endl; - cout << endl; - cout << "If you construct a Range with 2 dimensions [Range<2> a2i]" << endl; - cout << "and only give it one value [Range<2> a2ia(1))] the second dimension" << endl; - cout << "value will not be intitalized to 0 but will have ramdom junk. I" - << endl; - cout << "have not come up with a way to do a pass/fail on the feature." - << endl; - cout << "Float and Double values are truncated." << endl; - } - - Range<1> a1(1); - Range<1> a2(-3); - Range<1> a3(3); - Range<1> a4(4); - Range<1> a5(-5); - Range<1> a6(6); - - Range<1> a1i(1); - Range<1> a1ia(1,5); - Range<1> a1ib(0,5); - Range<1> a1ic(0,6,2); - Range<1> a1id(2,8,-3); - Range<1> a1ie(0,10,2); - Range<1> a1if(1,1001,100); - - - - if (debug){ - cout << "Range<1> Length Constructor for test."<< endl; - cout << " 1D default Range<1> a1(1) " << a1 << endl; - cout << " 1D default Range<1> a2(-3) " << a2 << endl; - cout << " 1D default Range<1> a3(3) " << a3 << endl; - cout << " 1D default Range<1> a4(4) " << a4 << endl; - cout << " 1D default Range<1> a5(-5) " << a5 << endl; - cout << " 1D default Range<1> a6(6) " << a6 << endl; - cout << " 1D default Range<1> a1i(1) " << a1i << endl; - cout << " 1D default Range<1> a1ia(1,5) " << a1ia << endl; - cout << " 1D default Range<1> a1ib(0,5) " << a1ib << endl; - cout << " 1D default Range<1> a1ic(0,6,2) " << a1ic << endl; - cout << " 1D default Range<1> a1id(2,8,-3) " << a1id << endl; - cout << " 1D default Range<1> a1ie(0,10,2) " << a1ie << endl; - cout << " 1D default Range<1> a1if(1,1001,100) " << a1if << endl; - cout << endl; - } - - Range<1> n1(-100); - Range<2> n2(Range<1>(-100,100,10),Range<1>(100,-100,10)); - Range<3> n3(n2,a1); - - Range<1> b1(a1if); - Range<2> b2(b1,a1); - Range<3> b3(b2,a3); - Range<4> b4(b3,a4); - Range<5> b5(b4,Range<1>(1,5)); - Range<6> b6(b5,a6); - - Loc<1> L1; - L1 = 3; - Interval<1> I1(1,5); - Interval<2> I2(Interval<1>(0,200),I1); - Range<2> RL2(L1,b1); - Range<3> RL3(RL2,L1); - Range<4> RL4(RL3,I1); - Range<5> RL5(I2,RL3); - - Loc<1> NL1; - NL1 = -3; - Interval<1> NI1(-1,5); - Interval<1> NI1a(-10,-5); - Interval<2> NI2(NI1,NI1a); - Range<2> NRL2(NI1,Interval<1>(-6,0)); - Range<3> NRL3(NRL2,NI1a); - Range<5> NRL5(NL1,NRL2,NI1a); - double D2 = 234.877; - float F1 = 123.5464; - Interval<1> FI1(-1,F1); - Interval<1> DI2(-100,D2); - Interval<3> DI3(FI1,Interval<2>(FI1,DI2)); - - Range<6> FDR6(DI3,NI1a, DI2); - - if (debug){ - cout << " 1D default Range<1> b1(a1if) " << b1 << endl; - cout << " 2D default Range<2> b2(b1,a1) " << b2 << endl; - cout << " 3D default Range<3> b3(b2,a3) " << b3 << endl; - cout << " 4D default Range<4> b4(b3,a4) " << endl; - cout << " " << b4 << endl; - cout << " 5D default Range<5> b5(b4,Range<1>(1,5)) " << endl; - cout << " " << b5 << endl; - cout << " 6D default Range<6> b6(b5,a6) " << endl; - cout << " " << b6 << endl; - cout << " 1D Negative Range<1> n1(-100) " << n1 << endl; - cout << " 2D Negative Range<2> n2(Range<1>(-100,100,10)," << endl; - cout << " Range<1>(100,-100,10)) " << n2 << endl; - cout << " 3D Negative Range<3> n3(n2,a1) " << endl; - cout << " " << n3 << endl; - - cout << " 2D Mixed object Range<2> RL2(Loc<1> L1,Range<2>b1 " << endl; - cout << " " << RL2 << endl; - cout << " 3D Mixed object Range<3> RL3(RL1,L1) " << endl; - cout << " " << RL3 << endl; - cout << " 4D Mixed object Range<4> RL4(RL3,I1) = " << endl; - cout << " " << RL4 << endl; - cout << " 5D Mixed object Range<5> RL5(I2,RL3) " << endl; - cout << " " << RL5 << endl; - cout << " 2D Mixed object Negative Range<2> NRL2(NI1,Interval<1>(-6,0)) "<< endl; - cout << " " << NRL2 << endl; - cout << " 3D Mixed object Negative Range<3> NRL3(NRL2,NI1a) " << endl; - cout << " " << NRL3 << endl; - cout << " 5D Mixed object Negative Range<5> NRL5(NL1,NRL2,NI1a) " - << endl; - cout << " " << NRL5 << endl; - cout << " 6D Mixed object DF Range<6> FDR6(DI3,NI1a, DI2) " - << endl; - cout << " " << FDR6 << endl; - cout << "=========================END DEBUG============================" - << endl; - cout << endl; - } - try { - testStatus = (a3 == Range<1>(3)); - testStatus = (a1ic == Range<1>(0,6,2)) && testStatus; - testStatus = (a1ie == Range<1>(0,10,2)) && testStatus; - reportResults(testNumber++,"Default Construtor ",testStatus); - testStatus = (n1[0] == Range<1>(-100)) && testStatus; - testStatus = (n2[1] == Range<1>(100,-100,10)) && testStatus ; - testStatus = (n3[1] ==Range<1>(100,-100,10))&& testStatus ; - reportResults(testNumber++,"Negative Construtor ",testStatus); - testStatus = (b1 == a1if) && testStatus ; - testStatus = (b2[0] == b1) && testStatus; - testStatus = (b3[2] == a3) && testStatus; - testStatus = (b4[3] == a4 ) && testStatus; - testStatus = (b5[4] == a1ia) && testStatus; - testStatus = (b6[5] == a6) && testStatus; - reportResults(testNumber++,"Multiple Construtor ",testStatus); - testStatus = (RL2[0] == L1) && testStatus; - testStatus = (RL3[2] == L1) && testStatus; - reportResults(testNumber++,"Mixed Loc Constructor ",testStatus); - testStatus = (RL4[3] == I1) && testStatus; - testStatus = (RL5[1] == I1) && testStatus; - reportResults(testNumber++,"Mixed Intergal Constructor ",testStatus); - testStatus = (NRL2[0] == NI1) && testStatus; - testStatus = (NRL3[2] == NI1a) && testStatus; - reportResults(testNumber++,"Mixed Intergal Negative Constructor",testStatus); - testStatus = (NRL5[0] == NL1) && testStatus; - reportResults(testNumber++,"Mixed Loc Negative Constructor ",testStatus); - testStatus = (FDR6[0] == FI1) && testStatus; - reportResults(testNumber++,"Mixed Float/Double Constructor ",testStatus); - } - - catch (const char *err) - { uncaughtErrorReport(err,testNumber); } - catch(const Pooma::Assertion &err) - {uncaughtErrorReport(err.what(),testNumber); } - catch(...) - { cerr << "Unknown exception!" << endl; } - cout << endl; - - Pooma::finalize(); - } - --- 0 ---- Index: Domain/Range/Constructors/makefile =================================================================== RCS file: makefile diff -N makefile *** /tmp/cvsbALR67 Thu Oct 4 12:11:21 2001 --- /dev/null Fri Mar 23 21:37:44 2001 *************** *** 1,11 **** - # Generated by mm.pl: Mon Mar 9 13:58:39 MST 1998 - # This file is user-editable - - PROJECT_ROOT = $(shell cd ../../../..; pwd) - include $(PROJECT_ROOT)/config/head.mk - - default:: $(ODIR)/RangeConstructor - - $(ODIR)/RangeConstructor: $(ODIR)/RangeConstructor.o - $(LinkToSuite) - include $(SHARED_ROOT)/tail.mk --- 0 ---- Index: Engine/BrickEngine/BrickEngine/BrickEngineTest.cpp =================================================================== RCS file: BrickEngineTest.cpp diff -N BrickEngineTest.cpp *** /tmp/cvsVvudrj Thu Oct 4 12:11:21 2001 --- /dev/null Fri Mar 23 21:37:44 2001 *************** *** 1,3319 **** - // ACL:license - // ---------------------------------------------------------------------- - // This software and ancillary information (herein called "SOFTWARE") - // called POOMA (Parallel Object-Oriented Methods and Applications) is - // made available under the terms described here. The SOFTWARE has been - // approved for release with associated LA-CC Number LA-CC-98-65. - // - // Unless otherwise indicated, this SOFTWARE has been authored by an - // employee or employees of the University of California, operator of the - // Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with - // the U.S. Department of Energy. The U.S. Government has rights to use, - // reproduce, and distribute this SOFTWARE, and to allow others to do so. - // The public may copy and use this SOFTWARE, FOR NONCOMMERCIAL USE ONLY, - // without charge, provided that this Notice and any statement of - // authorship are reproduced on all copies. Neither the Government nor - // the University makes any warranty, express or implied, or assumes any - // liability or responsibility for the use of this SOFTWARE. - // - // If SOFTWARE is modified to produce derivative works, such modified - // SOFTWARE should be clearly marked, so as not to confuse it with the - // version available from LANL. - // - // For more information about POOMA, send e-mail to pooma at acl.lanl.gov, - // or visit the POOMA web page at http://www.acl.lanl.gov/pooma/. - // ---------------------------------------------------------------------- - // ACL:license - - //----------------------------------------------------------------------------- - // The POOMA Framework - // - // This program was prepared by the Regents of the University of California - // at Los Alamos National Laboratory (the University) under Contract No. - // W-7405-ENG-36 with the U.S. Department of Energy (DOE). The University has - // certain rights in the program pursuant to the contract and the program - // should not be copied or distributed outside your organization. All rights - // in the program are reserved by the DOE and the University. Neither the U.S. - // Government nor the University makes any warranty, express or implied, or - // assumes any liability or responsibility for the use of this software - // - // Visit http://www.acl.lanl.gov/POOMA for more details - // - //----------------------------------------------------------------------------- - // Engine Component Test Code - //----------------------------------------------------------------------------- - // - // Classes: - // Brick - Brick-Engine specialization tag. - // BrickView - BrickView-Engine specialization tag. - // Engine - the "Brick-Engine" specialization. - // Engine - the "BrickView-Engine" specialization. - // NewEngine - specializations for BrickView-Engine. - // ElementProperties > - specialization for BrickEngine. - // - //----------------------------------------------------------------------------- - - #include "Pooma/Pooma.h" - #include "Engine/BrickEngine.h" - #include - #include - #include - #include - - //----------------------------------------------------------------------------- - // Simple particle class providing non-standard type for testing - // BrickEngine constructors. As specified in the Engine SRS, Atom - // provides the minimal required copy constructor and assignment operator. - //----------------------------------------------------------------------------- - - class Atom - { - public: - - //============================================================ - // Constructors, Destructor, Assignment... - //============================================================ - - // default construtor is required by RefCountedBlockPtr, which is - // used by Engine, so we supply this... - - Atom() - { - N_m = 0; - Z_m = 0; - mass_m = 0.0; - } - - Atom(int N, int Z, double mass) - { - N_m = N; - Z_m = Z; - mass_m = mass; - } - - Atom(const Atom &model) - { - N_m = model.N_m; - Z_m = model.Z_m; - mass_m = model.mass_m; - } - - Atom & operator=(const Atom &model) - { - if (&model == this) return *this; - N_m = model.N_m; - Z_m = model.Z_m; - mass_m = model.mass_m; - return *this; - } - - ~Atom() { } - - //============================================================ - // Accessors and Mutators - //============================================================ - - int electron() { return N_m; } - int nuclear() { return Z_m; } - double amu() { return mass_m; } - - // Atom& makeOwnCopy() { return *this; } - - private: - - int N_m; - int Z_m; - double mass_m; - - }; - - - //----------------------------------------------------------------------------- - // Two generic functions (reportResults and uncaughtErrorReport) and - // two classes (TypeMatchTester and its partial specialization) - // to facilitate testing... - //----------------------------------------------------------------------------- - - int reportResults(int n, char *test, bool testStatus) - { - char* statusString = "passed"; - if(!testStatus) statusString = "failed"; - cout << " Test " << setw(3) << n << ", " - << setw(46) << test << ": " << statusString << "\n"; - return 0; - } - - void uncaughtErrorReport(const char *what, int n) - { - cerr << "\nAck! Caught assertion during test # " << n << ":" << endl; - cerr << what << endl; - } - - template // template class to test typedefs - struct TypeMatchTester - { - static const bool Result = false; - }; - - template // ... partial specialization - struct TypeMatchTester - { - static const bool Result = true; - }; - - //----------------------------------------------------------------------------- - // Wrappers for high-resolution ACLTIMER library C timers - //----------------------------------------------------------------------------- - - extern "C" - { - void dclock_init(); - double dclock(); - } - - - //----------------------------------------------------------------------------- - // Main test program - //----------------------------------------------------------------------------- - - main(int argc, char* argv[]) { - - Pooma::initialize(argc,argv); - - int testNumber; - bool testStatus; - float percent; - float trueData; - float testData; - double timeStart; - double timeEnd; - double fast; - double slow; - double diff; - double c = 2.99792458e+8; - - float Ry = 13.605698; - float zero = 0.0; - - cout << "\n" - << " =============================================================" - << "=====\n" - << " Engine Capability; BrickEngine package; BrickEngine component " - << "test\n" - << " =============================================================" - << "=====\n" << endl; - - testNumber = 0; - - try { - - // *************************** BrickEngine ***************************** - - cout << "\n BrickEngine" << endl; - cout << " -----------\n" << endl; - - typedef Engine<3,float,Brick> Engine3Df_t; - typedef Engine<2,double,Brick> Engine2Dd_t; - typedef Engine<4,double,Brick> Engine4Dd_t; - typedef Engine<6,int,Brick> Engine6Di_t; - typedef Engine<6,float,Brick> Engine6Df_t; - typedef Engine<7,int,Brick> Engine7Di_t; - - - //--------------------------------------------------------------- - // test 1: BrickEngine required POOMA typedefs properly exported? - //--------------------------------------------------------------- - - ++testNumber; - - // construct a 3D Cartesian domain [0...10] x [4...14] x [-5...+5] - // and associated BrickEngine - - Interval<3> cube2(Interval<1>(0,10), Interval<1>(4,14), Interval<1>(-5,5)); - Engine3Df_t floatBrick(cube2); - - // assign floating-point elements to cube2 Domain - - for(int i = 0; i < 11; i++) - for(int j = 4; j < 15; j++) - for(int k = -5; k < 6; k++) - floatBrick(Loc<3>(i,j,k)) = Ry*(i+j+k); - - { - typedef Engine3Df_t::This_t Try_t; - typedef Engine3Df_t Correct_t; - testStatus = TypeMatchTester::Result; - } - - { - typedef Engine3Df_t::Engine_t Try_t; - typedef Engine3Df_t::This_t Correct_t; - testStatus = TypeMatchTester::Result && testStatus; - } - - { - typedef Engine3Df_t::Domain_t Try_t; - typedef Interval<3> Correct_t; - testStatus = TypeMatchTester::Result && testStatus; - } - - reportResults(testNumber,"exported typedefs This_t, Engine_t, Domain_t", - testStatus); - - - //----------------------------------------------------------- - // test 2: additional required POOMA typedefs for BrickEngine - //----------------------------------------------------------- - - ++testNumber; - - { - typedef Engine3Df_t::Base_t Try_t; - typedef Range<3> Correct_t; - testStatus = TypeMatchTester::Result; - } - - { - typedef Engine3Df_t::Element_t Try_t; - typedef float Correct_t; - testStatus = TypeMatchTester::Result && testStatus; - } - - reportResults(testNumber,"exported typedefs BaseDomain_t, Element_t", - testStatus); - - - //----------------------------------------------------------- - // test 3: still more required POOMA typedefs for BrickEngine - //----------------------------------------------------------- - - ++testNumber; - - { - typedef Engine3Df_t::ElementRef_t Try_t; - typedef float& Correct_t; - testStatus = TypeMatchTester::Result; - } - - { - typedef Engine3Df_t::Tag_t Try_t; - typedef Brick Correct_t; - testStatus = TypeMatchTester::Result && testStatus; - } - - reportResults(testNumber,"exported typedefs ElementRef_t, Tag_t", - testStatus); - - - //------------------------------------------------------- - // test 4: BrickEngine default constructor, standard type - //------------------------------------------------------- - - ++testNumber; - - // use default constructor and BrickEngine assignment operator - - Engine3Df_t defaultBrick; - defaultBrick = floatBrick; - - // check that defaultBrick now points to the same data as floatBrick - - for(int i = 0; i < 11; i++) - for(int j = 4; j < 15; j++) - for(int k = -5; k < 6; k++) { - trueData = floatBrick.read(Loc<3>(i,j,k)); - testData = defaultBrick.read(Loc<3>(i,j,k)); - testStatus = (testData == trueData) && testStatus; - testStatus = (trueData == Ry*(i+j+k)) && testStatus; - trueData = floatBrick.read(i,j,k); - testData = defaultBrick.read(i,j,k); - testStatus = (testData == trueData) && testStatus; - testStatus = (trueData == Ry*(i+j+k)) && testStatus; - } - - reportResults(testNumber,"default constructor & assignment operator", - testStatus); - - - //------------------------------------------------------------- - // test 5: BrickEngine Interval constructor, strides() accessor - //------------------------------------------------------------- - - ++testNumber; - - Interval<1> x(-17,2); - Interval<1> y(5,29); - Interval<1> z(-36,-2); - Interval<1> t(1); - Interval<4> spaceTime(x,y,z,t); - - Engine4Dd_t lightCone(spaceTime); - const int *STstrides = lightCone.strides(); - int nomStrides[7]; - - // stride of the first dimension in the Interval should always be 1 - // (Interval stride() accessor) - - nomStrides[0] = spaceTime[0].stride(); - testStatus = (STstrides[0] == nomStrides[0]); - - // strides() array for a BrickEngine should return actual strides - // of the full Interval (BrickEngine strides() accessor). - - for(int i = 1; i < 4; i++) { - nomStrides[i] = spaceTime[i-1].last() - spaceTime[i-1].first() + 1; - nomStrides[i] = nomStrides[i] * nomStrides[i-1]; - testStatus = (STstrides[i] == nomStrides[i]) && testStatus; - } - - // set data values; incidentally test some Interval accessors - - int imin = x.first(); - int imax = x.last(); - int jmin = y.first(); - int jmax = y.last(); - int kmin = z.first(); - int kmax = z.last(); - - for(int i = imin; i < imax+1; i++) - for(int j = jmin; j < jmax+1; j++) - for(int k = kmin; k < kmax+1; k++) - lightCone(Loc<4>(i,j,k,0)) = c*((i-j)*3 +k); - - // verify data values - - for(int i = -17; i < 3; i++) - for(int j = 5; j < 30; j++) - for(int k = -36; k < -1; k++) { - testData = lightCone.read(Loc<4>(i,j,k,0)); - trueData = c* ((i-j)*3 +k); - testStatus = (testData == trueData) && testStatus; - } - - reportResults(testNumber,"Interval constructor; strides accessor", - testStatus); - - - //---------------------------------------------------- - // test 6: BrickEngine copy constructor, standard type - //---------------------------------------------------- - - ++testNumber; - Engine4Dd_t transporter(lightCone); - - diff = zero; - for(int i = -17; i < 3; i++) - for(int j = 5; j < 30; j++) - for(int k = -36; k < -1; k++) - diff += fabs(lightCone.read(Loc<4>(i,j,k,0)) - transporter.read(i,j,k,0)); - - testStatus = (diff == zero); - reportResults(testNumber,"copy constructor", - testStatus); - - - //------------------------------------------ - // test 7: BrickEngine constructor via model - //------------------------------------------ - - ++testNumber; - Engine4Dd_t scotty(spaceTime,c); - - diff = zero; - for(int i = -17; i < 3; i++) - for(int j = 5; j < 30; j++) - for(int k = -36; k < -1; k++) - diff += fabs(scotty.read(Loc<4>(i,j,k,0)) - c); - - testStatus = (diff == zero); - reportResults(testNumber,"constructor via model",testStatus); - - - //------------------------------------------------------ - // test 8: BrickEngine constructor via foreign data (1D) - //------------------------------------------------------ - - ++testNumber; - - // 1D test - - double* B = new double[10]; - for (int i = 0; i<10; i++) - B[i] = i*2.3; - - Interval<1> line(-2,7); - Engine<1,double,Brick> french(B,line); - - diff = zero; - for(int i = -2; i < 8; i++) - diff += fabs(french.read(i) - (i+2)*2.3); - - testStatus = (diff == zero); - reportResults(testNumber,"constructor via 1D foreign data",testStatus); - - - //----------------------------------------------------------- - // test 9: BrickEngine constructor via foreign data (2D & 3D) - //----------------------------------------------------------- - - ++testNumber; - - // 2D test on 2 x 10 Interval - - float* C = new float[20]; - for (int i = 0; i<2; i++) - for ( int j = 0; j < 10; j++) - C[i*10+j] = (i*2.2+j*3.1); - - Interval<2> box(Interval<1>(0,1), Interval<1>(0,9)); - Engine<2,float,Brick> norwegian(C,box); - - - // (i,j) loop order is reversed here to emphasize the fact that - // POOMA II Engines index according to Fortran order (left-most index - // varies fastest, etc.). Note C-style indexing of array C. - - diff = zero; - for ( int j = 0; j < 10; j++) - for( int i = 0; i < 2; i++) - diff += fabs(norwegian.read(i,j) - C[i+2*j]); - - testStatus = (diff == zero); - - - // 3D test on 4 x 3 x 2 Interval (zero-based) - - float* G = new float[24]; - Interval<3> cubic(Interval<1>(0,3), Interval<1>(0,2), Interval<1>(0,1)); - Engine<3,float,Brick> dutch(G,cubic); - - for (int i = 0; i<4; i++) - for (int j = 0; j<3; j++) - for (int k = 0; k<2; k++) { - int ind = i*6 + j*2 + k; - G[ind] = 2.2*i + 3.1*j + 1.4*k; - } - - diff = zero; - for(int k = 0; k < 2; k++) - for(int j = 0; j < 3; j++) - for(int i = 0; i < 4; i++) { - int ind = k*12 + j*4 + i; - diff += fabs(dutch.read(i,j,k) - G[ind]); - } - - testStatus = (diff == zero) && testStatus; - - - // 3D test on 11 x 11 x 11 Interval (non-zero-based) - - float* A = new float[1331]; - for (int i = 0; i<11; i++) - for (int j = 0; j<11; j++) - for (int k = 0; k<11; k++) { - int ind = i*121 + j*11 + k; - A[ind] = 2.2*i + 3.1*j + 1.4*k; - } - - Engine3Df_t italian(A,cube2); - - diff = zero; - for(int k = -5; k < 6; k++) - for(int j = 4; j < 15; j++) - for(int i = 0; i < 11; i++) { - int ind = (k+5)*121 + (j-4)*11 + i; - diff += fabs(italian.read(i,j,k) - A[ind]); - } - - testStatus = (diff == zero) && testStatus; - - reportResults(testNumber,"constructor via 2D/3D foreign data", - testStatus); - - - //------------------------------------------------- - // test 10: BrickEngine constructor via Node object - //------------------------------------------------- - - ++testNumber; - - // Construct a simple Node with affinity = -1, Interval Domain, - // context = local ID = global ID = 0. - - Interval<1> point(4,12); - Interval<6> star(point,point,point,point,point,point); - Node > k(-1,star,0,0,0); - Engine6Di_t BZone(k); - Engine6Di_t BZone2(star,17); - BZone = BZone2; - - diff = zero; - for(int i = 4; i < 13; i++) - for(int j = 4; j < 13; j++) - for(int k = 4; k < 13; k++) - for(int l = 4; l < 13; l++) - for(int m = 4; m < 13; m++) - for(int n = 4; n < 13; n++) - diff += abs(BZone.read(i,j,k,l,m,n) - 17); - - testStatus = (diff == zero); - reportResults(testNumber,"constructor via Node object", testStatus); - - - //----------------------------------------- - // test 11: BrickEngine assignment operator - //----------------------------------------- - - ++testNumber; - - Engine4Dd_t geordi; - geordi = scotty; - - diff = zero; - for(int i = -17; i < 2; i++) - for(int j = 5; j < 29; j++) - for(int k = -36; k < -2; k++) - diff += fabs(geordi.read(i,j,k,0) - c); - - testStatus = (diff == zero); - reportResults(testNumber,"assignment operator",testStatus); - - - //--------------------------------------------------- - // test 12: BrickEngine read(int) accessors, dims 1-7 - //--------------------------------------------------- - - ++testNumber; - - // POOMA II supports Domains with dim <= 7 - - Interval<1> I0(-3,3); - Interval<1> J0(6,12); - Interval<1> I1(I0); - Engine<1,float,Brick> xxx1(I1,Ry); - - Interval<2> I2(I1,J0); - Engine<2,float,Brick> xxx2(I2,Ry*2); - - Interval<3> I3(I2,I0); - Engine<3,float,Brick> xxx3(I3,Ry*3); - - Interval<4> I4(I3,J0); - Engine<4,float,Brick> xxx4(I4,Ry*4); - - Interval<5> I5(I4,I0); - Engine<5,float,Brick> xxx5(I5,Ry*5); - - Interval<6> I6(I5,J0); - Engine<6,float,Brick> xxx6(I6,Ry*6); - - Interval<7> I7(I6,I0); - Engine<7,float,Brick> xxx7(I7,Ry*7); - - diff = zero; - for(int i = -3; i < 3; i++) { - diff += fabs(xxx1.read(i) - Ry); - for(int j = 6; j < 12; j++) { - diff += fabs(xxx2.read(i,j) - Ry*2); - for(int k = -3; k < 3; k++) { - diff += fabs(xxx3.read(i,j,k) - Ry*3); - for(int l = 6; l < 12; l++) { - diff += fabs(xxx4.read(i,j,k,l) - Ry*4); - for(int m = -3; m < 3; m++) { - diff += fabs(xxx5.read(i,j,k,l,m) - Ry*5); - for(int n = 6; n < 12; n++) { - diff += fabs(xxx6.read(i,j,k,l,m,n) - Ry*6); - for(int p = -3; p < 3; p++) { - diff += fabs(xxx7.read(i,j,k,l,m,n,p) - Ry*7); - } - } - } - } - } - } - } - - testStatus = (diff == zero); - reportResults(testNumber,"int read element accessors, dims 1-7", - testStatus); - - - //-------------------------------------------------------- - // test 13: BrickEngine read(Loc) accessors, dims 1-7 - //-------------------------------------------------------- - - ++testNumber; - - diff = zero; - for(int i = -3; i < 3; i++) { - diff += fabs(xxx1.read(Loc<1>(i)) - Ry); - for(int j = 6; j < 12; j++) { - diff += fabs(xxx2.read(Loc<2>(i,j)) - Ry*2); - for(int k = -3; k < 3; k++) { - diff += fabs(xxx3.read(Loc<3>(i,j,k)) - Ry*3); - for(int l = 6; l < 12; l++) { - diff += fabs(xxx4.read(Loc<4>(i,j,k,l)) - Ry*4); - for(int m = -3; m < 3; m++) { - diff += fabs(xxx5.read(Loc<5>(i,j,k,l,m)) - Ry*5); - for(int n = 6; n < 12; n++) { - diff += fabs(xxx6.read(Loc<6>(i,j,k,l,m,n)) - Ry*6); - for(int p = -3; p < 3; p++) { - diff += fabs(xxx7.read(Loc<7>(i,j,k,l,m,n,p)) - Ry*7); - } - } - } - } - } - } - } - - testStatus = (diff == zero); - reportResults(testNumber,"Loc read element accessors, dims 1-7", - testStatus); - - - //------------------------------------------------------------ - // test 14: BrickEngine operator() element accessors, dims 1-7 - //------------------------------------------------------------ - - ++testNumber; - - diff = zero; - for(int i = -3; i < 3; i++) { - diff += fabs(xxx1(i) - Ry); - for(int j = 6; j < 12; j++) { - diff += fabs(xxx2(i,j) - Ry*2); - for(int k = -3; k < 3; k++) { - diff += fabs(xxx3(i,j,k) - Ry*3); - for(int l = 6; l < 12; l++) { - diff += fabs(xxx4(i,j,k,l) - Ry*4); - for(int m = -3; m < 3; m++) { - diff += fabs(xxx5(i,j,k,l,m) - Ry*5); - for(int n = 6; n < 12; n++) { - diff += fabs(xxx6(i,j,k,l,m,n) - Ry*6); - for(int p = -3; p < 3; p++) { - diff += fabs(xxx7(i,j,k,l,m,n,p) - Ry*7); - } - } - } - } - } - } - } - - testStatus = (diff == zero); - reportResults(testNumber,"operator() element accessors, dims 1-7", - testStatus); - - /******************************************************************************* - - // this test requires the implementation of an appropriate - // PAssert to catch and report the dimension violation, at - // which point it can be un-commented. - - // Upon un-commenting, remove the increment of testNumber immediately - // following this test. The increment is needed to keep the test - // numbers the same as the test labels. - - //----------------------------------------------------------- - // test 15: BrickEngine underlying Domain dimension violation - //----------------------------------------------------------- - - ++testNumber; - - try { - Interval<8> I8(I7,I0); - Engine<8,float,Brick> xxx8(I8,Ry*8); - diff = xxx8.read(0,0,0,0,0,0,0,0) - pi*8; - throw reportResults(testNumber,"underlying Domain dimension violation",false); - } - catch(const Pooma::Assertion &) {reportResults(testNumber, - "underlying Domain dimension violation",true);} - - // the real work is done by 'throw' inside try block; this prevents - // falling-through to outer 'try' block, and generation of - // "unknown exception" message. - - catch(...) { } - - *******************************************************************************/ - ++testNumber; // remove upon activating test 15. - - //------------------------------------------------------------- - // test 16: performance of element access via ints vs. Loc - //------------------------------------------------------------- - - ++testNumber; - - // initialize hi-resolution timer - - dclock_init(); - - char* str1 = new char[43]; - int l = 0; - - for(int i = -17; i < 2; i++) - for(int j = 5; j < 29; j++) - for(int k = -36; k < -2; k++) - lightCone(Loc<4>(i,j,k,l)) = Ry+i+j+k; - - timeStart = dclock(); - for(int i = -17; i < 2; i++) - for(int j = 5; j < 29; j++) - for(int k = -36; k < -2; k++) - testData = lightCone.read(i,j,k,l); - - timeEnd = dclock(); - fast = timeEnd - timeStart; - - timeStart = dclock(); - for(int i = -17; i < 2; i++) - for(int j = 5; j < 29; j++) - for(int k = -36; k < -2; k++) - testData = lightCone.read(Loc<4>(i,j,k,l)); - - timeEnd = dclock(); - slow = timeEnd - timeStart; - - percent = (slow - fast) * 100.0/slow; - sprintf(str1,"%34s%3.1f%1s", - "int/Loc elt access; relative perf = ",percent,"%"); - testStatus = (fast < slow); - reportResults(testNumber,str1,testStatus); - delete str1; - - - //--------------------------------------- - // test 17: BrickEngine domain() accessor - //--------------------------------------- - - ++testNumber; - Interval<3> d1 = floatBrick.domain(); - testStatus = (d1[0].first() == cube2[0].first()) && - (d1[0].last() == cube2[0].last()) && - (d1[0].length() == cube2[0].length()) && - (d1[1].first() == cube2[1].first()) && - (d1[1].last() == cube2[1].last()) && - (d1[1].length() == cube2[1].length()) && - (d1[2].first() == cube2[2].first()) && - (d1[2].last() == cube2[2].last()) && - (d1[2].length() == cube2[2].length()); - - Interval<4> d2 = lightCone.domain(); - testStatus = (d2[0].first() == spaceTime[0].first()) && - (d2[0].last() == spaceTime[0].last()) && - (d2[0].length() == spaceTime[0].length()) && - (d2[1].first() == spaceTime[1].first()) && - (d2[1].last() == spaceTime[1].last()) && - (d2[1].length() == spaceTime[1].length()) && - (d2[2].first() == spaceTime[2].first()) && - (d2[2].last() == spaceTime[2].last()) && - (d2[2].length() == spaceTime[2].length()) && - (d2[3].first() == spaceTime[3].first()) && - (d2[3].last() == spaceTime[3].last()) && - (d2[3].length() == spaceTime[3].length()) && testStatus; - - Interval<7> d3 = xxx7.domain(); - testStatus = (d3[0].first() == I7[0].first()) && - (d3[0].last() == I7[0].last()) && - (d3[0].length() == I7[0].length()) && - (d3[6].first() == I7[6].first()) && - (d3[6].last() == I7[6].last()) && - (d3[6].length() == I7[6].length()) && testStatus; - - reportResults(testNumber,"domain() accessor",testStatus); - - - //------------------------------------------- - // test 18: BrickEngine baseDomain() accessor - //------------------------------------------- - - ++testNumber; - - // baseDomain should be identical to Domain for BrickEngine, - // since no subsetting has occurred. That is, baseDomain - // simply returns the Interval Domain of the Engine, - // re-cast as a Range. - - Range<3> d4 = italian.baseDomain(); - testStatus = (d4[0].first() == cube2[0].first()) && - (d4[0].last() == cube2[0].last()) && - (d4[0].length() == cube2[0].length()) && - (d4[1].first() == cube2[1].first()) && - (d4[1].last() == cube2[1].last()) && - (d4[1].length() == cube2[1].length()) && - (d4[2].first() == cube2[2].first()) && - (d4[2].last() == cube2[2].last()) && - (d4[2].length() == cube2[2].length()); - - Range<4> d5 = transporter.baseDomain(); - testStatus = (d5[0].first() == spaceTime[0].first()) && - (d5[0].last() == spaceTime[0].last()) && - (d5[0].length() == spaceTime[0].length()) && - (d5[1].first() == spaceTime[1].first()) && - (d5[1].last() == spaceTime[1].last()) && - (d5[1].length() == spaceTime[1].length()) && - (d5[2].first() == spaceTime[2].first()) && - (d5[2].last() == spaceTime[2].last()) && - (d5[2].length() == spaceTime[2].length()) && - (d5[3].first() == spaceTime[3].first()) && - (d5[3].last() == spaceTime[3].last()) && - (d5[3].length() == spaceTime[3].length()) && testStatus; - - Range<5> d6 = xxx5.baseDomain(); - testStatus = (d6[2].first() == I5[2].first()) && - (d6[2].last() == I5[2].last()) && - (d6[2].length() == I5[2].length()) && - (d6[4].first() == I5[4].first()) && - (d6[4].last() == I5[4].last()) && - (d6[4].length() == I5[4].length()) && testStatus; - - reportResults(testNumber,"baseDomain() accessor",testStatus); - - - //-------------------------------------------- - // test 19: BrickEngine makeOwnCopy() function - //-------------------------------------------- - - ++testNumber; - geordi(-12,0,32,0) = Ry; - diff = (geordi(-12,0,32,0) - scotty(-12,0,32,0)); - testStatus = (diff == zero); - - diff = (geordi(1,28,-30,0) - c); - testStatus = (diff == zero) && testStatus; - - geordi.makeOwnCopy(); - geordi(-12,0,32,0) = Ry*2; - diff = (geordi(-12,0,32,0) - 2*scotty(-12,0,32,0)); - testStatus = (diff == zero) && testStatus; - - reportResults(testNumber,"makeOwnCopy() function",testStatus); - - - //------------------------------------------------------------------- - // test 20: BrickEngine Interval constructor, strides(); non-std type - //------------------------------------------------------------------- - - ++testNumber; - - // construct a 6 x 7 Interval IJ, and put a different particle at each - // location in the Range. Incidentally test some features of - // Intervals. Note that BrickEngine requires a unit-stride Domain. - - Interval<2> IJ(Interval<1>(0,5), Interval<1>(-6,0)); - int IJsize = IJ.size(); - const int IJmax = 42; - testStatus = (IJsize == IJmax); - - int Imin = IJ[0].first(); - int Imax = IJ[0].last(); - int Istr = IJ[0].stride(); - int Ilen = IJ[0].length(); - testStatus = (Imin == 0) && (Imax == 5) && testStatus; - testStatus = (Istr == 1) && (Ilen == 6) && testStatus; - - int Jmin = IJ[1].first(); - int Jmax = IJ[1].last(); - int Jstr = IJ[1].stride(); - int Jlen = IJ[1].length(); - testStatus = (Jmin == -6) && (Jmax == 0) && testStatus; - testStatus = (Jstr == 1) && (Jlen == 7) && testStatus; - - // construct 42 distinct Atoms and store them in the array Ar[IJsize] - - int NEl; - int NChg; - double Mass; - int knt = 0; - - Atom* Ar[IJmax]; - for (int i=Imin; ielectron() == NEl) && testStatus; - knt++; - } - - testStatus = (knt == IJsize) && testStatus; - - // construct a 2D BrickEngine to manage the Ar Atoms over the IJ Range - - Engine<2,Atom,Brick> ArEngine(IJ); - - diff = zero; - knt = 0; - - for (int i=Imin; i(i,j)) = *(Ar[knt]); - diff += fabsf(ArEngine.read(i,j).amu() - (abs(i+j)+5)*4.44 ); - knt++; - } - - testStatus = (diff == zero) && testStatus; - - // test BrickEngine strides() accessor. Should return - // actual strides of underlying 2D Interval - - STstrides = ArEngine.strides(); - nomStrides[0] = 1; - nomStrides[1] = Imax-Imin+1; - testStatus = (STstrides[0] == nomStrides[0]) && testStatus; - testStatus = (STstrides[1] == nomStrides[1]) && testStatus; - - reportResults(testNumber,"Interval constr/strides(); non-std type", - testStatus); - - - //------------------------------------------------------------ - // test 21: BrickEngine default constructor, non-standard type - //------------------------------------------------------------ - - ++testNumber; - Engine<2,Atom,Brick> defaultAr; - defaultAr = ArEngine; - - for (int i=Imin; i dupAr(ArEngine); - - diff = zero; - for (int i=Imin; i(i,j)).nuclear() - (abs(i+j)+5)*2 ); - knt++; - } - - testStatus = (diff == zero); - reportResults(testNumber,"copy constructor; non-std type", - testStatus); - - - //-------------------------------------------------------------- - // test 23: BrickEngine constructor via model, non-standard type - //-------------------------------------------------------------- - - ++testNumber; - Interval<3> IJK(IJ,Interval<1>(2,14)); - Engine<3,Atom,Brick> ArToo(IJK,*(Ar[30])); - - Imin = IJK[0].first(); - Imax = IJK[0].last(); - Jmin = IJK[1].first(); - Jmax = IJK[1].last(); - int Kmin = IJK[2].first(); - int Kmax = IJK[2].last(); - - diff = zero; - for (int i=Imin; i Balmer(3,19); - Engine<1,Atom,Brick> jovian(H,Balmer); - - diff = zero; - for(int i = 3; i < 20; i++) { - diff += abs( jovian.read(Loc<1>(i)).electron() - (int)Ry*(i-3) ); - diff += fabs( jovian.read(i).amu() - ((int)Ry*(i-3)*2-i+7) ); - } - - testStatus = (diff == zero) && testStatus; - reportResults(testNumber,"constructor via 1D foreign data; non-std type", - testStatus); - - - //--------------------------------------------------------------- - // test 25: BrickEngine constructor via Node object, non-std type - //--------------------------------------------------------------- - - ++testNumber; - - Engine<6,Atom,Brick> Energy(k); - Engine<6,Atom,Brick> Energy2(star,H[16]); - Energy = Energy2; - - diff = zero; - for(int i = 4; i < 13; i++) - for(int j = 4; j < 13; j++) - for(int k = 4; k < 13; k++) - for(int l = 4; l < 13; l++) - for(int m = 4; m < 13; m++) - for(int n = 4; n < 13; n++) - diff += abs( Energy.read(i,j,k,l,m,n).nuclear() - ((int)Ry)*16*2 ); - - testStatus = (diff == zero); - reportResults(testNumber,"constructor via Node object; non-std type", - testStatus); - - - //------------------------------------------------------- - // test 26: BrickEngine assignment operator, non-std type - //------------------------------------------------------- - - ++testNumber; - Engine<3,Atom,Brick> Ne; - Ne = ArToo; - - diff = zero; - for (int i=Imin; i d7 = jovian.domain(); - testStatus = (d7[0].first() == Balmer.first()) && - (d7[0].last() == Balmer.last()) && - (d7[0].length() == Balmer.length()); - - Interval<2> d8 = ArEngine.domain(); - testStatus = (d8[0].first() == IJ[0].first()) && - (d8[0].last() == IJ[0].last()) && - (d8[0].length() == IJ[0].length()) && - (d8[1].first() == IJ[1].first()) && - (d8[1].last() == IJ[1].last()) && - (d8[1].length() == IJ[1].length()) && testStatus; - - Interval<6> d9 = Energy.domain(); - testStatus = (d9[3].first() == star[3].first()) && - (d9[3].last() == star[3].last()) && - (d9[3].length() == star[3].length()) && - (d9[5].first() == star[5].first()) && - (d9[5].last() == star[5].last()) && - (d9[5].length() == star[5].length()) && testStatus; - - reportResults(testNumber,"domain() accessor; non-std type", - testStatus); - - - //--------------------------------------------------------- - // test 28: BrickEngine baseDomain() accessor, non-std type - //--------------------------------------------------------- - - ++testNumber; - - // Again, baseDomain should be identical to Domain for BrickEngine, - // since no subsetting has occurred. - - Range<2> d10 = dupAr.domain(); - testStatus = (d10[0].first() == IJ[0].first()) && - (d10[0].last() == IJ[0].last()) && - (d10[0].length() == IJ[0].length()) && - (d10[1].first() == IJ[1].first()) && - (d10[1].last() == IJ[1].last()) && - (d10[1].length() == IJ[1].length()); - - Range<3> d11 = ArToo.domain(); - testStatus = (d11[0].first() == IJK[0].first()) && - (d11[0].last() == IJK[0].last()) && - (d11[0].length() == IJK[0].length()) && - (d11[1].first() == IJK[1].first()) && - (d11[1].last() == IJK[1].last()) && - (d11[1].length() == IJK[1].length()) && testStatus; - - - Range<6> d12 = Energy.domain(); - testStatus = (d12[3].first() == star[3].first()) && - (d12[3].last() == star[3].last()) && - (d12[3].length() == star[3].length()) && - (d12[5].first() == star[5].first()) && - (d12[5].last() == star[5].last()) && - (d12[5].length() == star[5].length()) && testStatus; - - reportResults(testNumber,"baseDomain() accessor; non-std type", - testStatus); - - - //---------------------------------------------------------- - // test 29: BrickEngine makeOwnCopy() function, non-std type - //---------------------------------------------------------- - - ++testNumber; - Ne.makeOwnCopy(); - Atom NeTemp(7.1,7.2,7.3); - Ne(3,-4,9) = NeTemp; - - diff = zero; - for (int i=Imin; i(i,j,k)).amu() - ArToo.read(i,j,k).amu()); - } - - testStatus = (diff == zero); - reportResults(testNumber,"makeOwnCopy() function; non-std type", - testStatus); - - - - // ************************* BrickViewEngine **************************** - - cout << "\n\n BrickViewEngine" << endl; - cout << " ---------------\n" << endl; - - typedef Engine<2,float,BrickView<6,false> > float2DV2_t; - typedef Engine<3,float,BrickView<3,true> > float3DV1_t; - typedef Engine<3,float,BrickView<3,false> > float3DV2_t; - typedef Engine<4,float,BrickView<6,false> > float4DV3_t; - typedef Engine<2,double,BrickView<2,true> > double2DV1_t; - typedef Engine<2,double,BrickView<2,false> > double2DV2_t; - typedef Engine<6,int,BrickView<6,true> > int6DV1_t; - typedef Engine<7,int,BrickView<7,false> > int7DV2_t; - - - - //-------------------------------------------------------------------- - // test 30: BrickViewEngine required POOMA typedefs properly exported? - //-------------------------------------------------------------------- - - ++testNumber; - - // first construct stride-1 and non-stride-1 Views of 3D cube and - // 2D square-based Engines - - Interval<1> line1(7,16); - Interval<1> line2(-1,4); - Interval<1> line3(11,16); - Interval<1> line4(-4,5); - Range<1> line5(0,6,2); - Range<1> line6(-1,5,3); - Range<1> line7(7,15,4); - - Interval<2> square(line,line1); // 10x10 Interval - Interval<3> cube(line,line4,line1); // 10x10x10 Interval - - // square1 and rectangle2 are associated with Boolean 'true' in - // BrickView, since both of these 2D Ranges have a (unit-stride) - // Interval, line2, as their first Range component. Note that - // this is true for rectangle2 even though its second Range component, - // line7, has non-unit stride (4). By contrast, rectangle1 is - // associated with Boolean 'false' in BrickView, since its first - // Range component, line5, has stride 2. - - Interval<2> square1(line2,line3); // 6x6 "T" subset of square - Range<2> rectangle1(line5,line3); // 4x6 "F" subset of square - Range<2> rectangle2(line2,line7); // 6x3 "T" subset of square - - Interval<3> cube1(line2,line2,line3); // 6x6x6 "T" subset of cube - Range<3> box1(line5,line6,line7); // 4x3x3 "F" subset of cube - Range<3> box2(line2,line6,line7); // 6x3x3 "T" subset of cube - - Engine2Dd_t Q(square); - Engine3Df_t R(cube); - - double2DV1_t BV1(Q,square1); - double2DV2_t BV2(Q,rectangle1); - double2DV2_t BV3(Q,rectangle2); - - float3DV1_t BV4(R,cube1); - float3DV2_t BV5(R,box1); - float3DV2_t BV6(R,box2); - - // populate Q with data - - Imin = line.first(); - Ilen = line.length(); - Imax = Imin + Ilen; - Jmin = line1.first(); - Jmax = line1.last() + 1; - Jlen = Jmax - Jmin; - - for (int i = Imin; i < Imax; i++) - for (int j = Jmin; j < Jmax; j++) - Q(i,j) = (i+Ry)*j + 1.1; - - // populate R with data - - int Klen; - - Imin = cube[0].first(); - Ilen = cube[0].length(); - Imax = Imin + Ilen; - Jmin = cube[1].first(); - Jmax = cube[1].last() + 1; - Jlen = Jmax - Jmin; - Kmin = cube[2].first(); - Kmax = cube[2].last() + 1; - Klen = Kmax - Kmin; - - for (int i = Imin; i < Imax; i++) - for (int j = Jmin; j < Jmax; j++) - for (int k = Kmin; k < Kmax; k++) - R(i,j,k) = i*1.1 + j*2.2 + k*3.3; - - - // now start testing various typedefs using the above BrickViewEngines - - // This_t - - { - typedef float3DV1_t::This_t Try_t; - typedef float3DV1_t Correct_t; - testStatus = TypeMatchTester::Result; - } - - { - typedef float3DV2_t::This_t Try_t; - typedef float3DV2_t Correct_t; - testStatus = TypeMatchTester::Result && testStatus; - } - - { - typedef double2DV1_t::This_t Try_t; - typedef double2DV1_t Correct_t; - testStatus = TypeMatchTester::Result && testStatus; - } - - { - typedef double2DV2_t::This_t Try_t; - typedef double2DV2_t Correct_t; - testStatus = TypeMatchTester::Result && testStatus; - } - - - // Engine_t - - { - typedef float3DV1_t::Engine_t Try_t; - typedef float3DV1_t::This_t Correct_t; - testStatus = TypeMatchTester::Result && testStatus; - } - - { - typedef float3DV2_t::Engine_t Try_t; - typedef float3DV2_t::This_t Correct_t; - testStatus = TypeMatchTester::Result && testStatus; - } - - { - typedef double2DV1_t::Engine_t Try_t; - typedef double2DV1_t::This_t Correct_t; - testStatus = TypeMatchTester::Result && testStatus; - } - - { - typedef double2DV2_t::Engine_t Try_t; - typedef double2DV2_t::This_t Correct_t; - testStatus = TypeMatchTester::Result && testStatus; - } - - - // Domain_t - - { - typedef float3DV1_t::Domain_t Try_t; - typedef Interval<3> Correct_t; - testStatus = TypeMatchTester::Result && testStatus; - } - - { - typedef float3DV2_t::Domain_t Try_t; - typedef Interval<3> Correct_t; - testStatus = TypeMatchTester::Result && testStatus; - } - - { - typedef double2DV2_t::Domain_t Try_t; - typedef Interval<2> Correct_t; - testStatus = TypeMatchTester::Result && testStatus; - } - - { - typedef double2DV2_t::Domain_t Try_t; - typedef Interval<2> Correct_t; - testStatus = TypeMatchTester::Result && testStatus; - } - - reportResults(testNumber,"exported typedefs This_t, Engine_t, Domain_t", - testStatus); - - - //---------------------------------------------------------------- - // test 31: additional required POOMA typedefs for BrickViewEngine - //---------------------------------------------------------------- - - ++testNumber; - - // BaseDomain_t - - { - typedef float3DV1_t::BaseDomain_t Try_t; - typedef Range<3> Correct_t; - testStatus = TypeMatchTester::Result; - } - - { - typedef float3DV2_t::BaseDomain_t Try_t; - typedef Range<3> Correct_t; - testStatus = TypeMatchTester::Result && testStatus; - } - - { - typedef double2DV1_t::BaseDomain_t Try_t; - typedef Range<2> Correct_t; - testStatus = TypeMatchTester::Result && testStatus; - } - - { - typedef double2DV2_t::BaseDomain_t Try_t; - typedef Range<2> Correct_t; - testStatus = TypeMatchTester::Result && testStatus; - } - - // Element_t - - { - typedef float3DV1_t::Element_t Try_t; - typedef float Correct_t; - testStatus = TypeMatchTester::Result && testStatus; - } - - { - typedef float3DV2_t::Element_t Try_t; - typedef float Correct_t; - testStatus = TypeMatchTester::Result && testStatus; - } - - { - typedef double2DV1_t::Element_t Try_t; - typedef double Correct_t; - testStatus = TypeMatchTester::Result && testStatus; - } - - { - typedef double2DV2_t::Element_t Try_t; - typedef double Correct_t; - testStatus = TypeMatchTester::Result && testStatus; - } - - reportResults(testNumber,"exported typedefs BaseDomain_t, Element_t", - testStatus); - - - //---------------------------------------------------------------- - // test 32: still more required POOMA typedefs for BrickViewEngine - //---------------------------------------------------------------- - - ++testNumber; - - // ElementRef_t - - { - typedef float3DV1_t::ElementRef_t Try_t; - typedef float& Correct_t; - testStatus = TypeMatchTester::Result; - } - - { - typedef float3DV2_t::ElementRef_t Try_t; - typedef float& Correct_t; - testStatus = TypeMatchTester::Result && testStatus; - } - - { - typedef double2DV1_t::ElementRef_t Try_t; - typedef double& Correct_t; - testStatus = TypeMatchTester::Result && testStatus; - } - - { - typedef double2DV2_t::ElementRef_t Try_t; - typedef double& Correct_t; - testStatus = TypeMatchTester::Result && testStatus; - } - - // Tag_t - - { - typedef float3DV1_t::Tag_t Try_t; - typedef BrickView<3,true> Correct_t; - testStatus = TypeMatchTester::Result && testStatus; - } - - { - typedef float3DV2_t::Tag_t Try_t; - typedef BrickView<3,false> Correct_t; - testStatus = TypeMatchTester::Result && testStatus; - } - - { - typedef double2DV1_t::Tag_t Try_t; - typedef BrickView<2,true> Correct_t; - testStatus = TypeMatchTester::Result && testStatus; - } - - { - typedef double2DV2_t::Tag_t Try_t; - typedef BrickView<2,false> Correct_t; - testStatus = TypeMatchTester::Result && testStatus; - } - - reportResults(testNumber,"exported typedefs ElementRef_t, Tag_t", - testStatus); - - - //---------------------------------------------------- - // test 33: BrickViewEngine Range/Interval constructor - //---------------------------------------------------- - - ++testNumber; - - //------------- - // square tests - //------------- - - // BV1... - - Imin = square1[0].first(); - Jmin = square1[1].first(); - Ilen = square1[0].length(); - Jlen = square1[1].length(); - Istr = square1[0].stride(); - Jstr = square1[1].stride(); - - diff = zero; - for (int i = 0; i < Ilen; i++) - for (int j = 0; j < Jlen; j++) { - int Iind = Imin + i*Istr; - int Jind = Jmin + j*Jstr; - diff += Q.read(Iind,Jind) - BV1(Loc<2>(i,j)); - } - testStatus = (diff == zero); - - // BV2... - - Imin = rectangle1[0].first(); - Jmin = rectangle1[1].first(); - Ilen = rectangle1[0].length(); - Jlen = rectangle1[1].length(); - Istr = rectangle1[0].stride(); - Jstr = rectangle1[1].stride(); - - diff = zero; - for (int i = 0; i < Ilen; i++) - for (int j = 0; j < Jlen; j++) { - int Iind = Imin + i*Istr; - int Jind = Jmin + j*Jstr; - diff += Q.read(Iind,Jind) - BV2(Loc<2>(i,j)); - } - testStatus = (diff == zero) && testStatus; - - // BV3... - - Imin = rectangle2[0].first(); - Jmin = rectangle2[1].first(); - Ilen = rectangle2[0].length(); - Jlen = rectangle2[1].length(); - Istr = rectangle2[0].stride(); - Jstr = rectangle2[1].stride(); - - diff = zero; - for (int i = 0; i < Ilen; i++) - for (int j = 0; j < Jlen; j++) { - int Iind = Imin + i*Istr; - int Jind = Jmin + j*Jstr; - diff += Q.read(Iind,Jind) - BV3(Loc<2>(i,j)); - } - testStatus = (diff == zero) && testStatus; - - - //----------- - // cube tests - //----------- - - // BV4... - - int Kstr; - - Imin = cube1[0].first(); - Jmin = cube1[1].first(); - Kmin = cube1[2].first(); - Ilen = cube1[0].length(); - Jlen = cube1[1].length(); - Klen = cube1[2].length(); - Istr = cube1[0].stride(); - Jstr = cube1[1].stride(); - Kstr = cube1[2].stride(); - - diff = zero; - for (int i = 0; i < Ilen; i++) - for (int j = 0; j < Jlen; j++) - for (int k = 0; k < Klen; k++) { - int Iind = Imin + i*Istr; - int Jind = Jmin + j*Jstr; - int Kind = Kmin + k*Kstr; - diff += R.read(Iind,Jind,Kind) - BV4(Loc<3>(i,j,k)); - } - testStatus = (diff == zero) && testStatus; - - // BV5... - - Imin = box1[0].first(); - Jmin = box1[1].first(); - Kmin = box1[2].first(); - Ilen = box1[0].length(); - Jlen = box1[1].length(); - Klen = box1[2].length(); - Istr = box1[0].stride(); - Jstr = box1[1].stride(); - Kstr = box1[2].stride(); - - diff = zero; - for (int i = 0; i < Ilen; i++) - for (int j = 0; j < Jlen; j++) - for (int k = 0; k < Klen; k++) { - int Iind = Imin + i*Istr; - int Jind = Jmin + j*Jstr; - int Kind = Kmin + k*Kstr; - diff += R.read(Iind,Jind,Kind) - BV5(Loc<3>(i,j,k)); - } - - testStatus = (diff == zero) && testStatus; - - // BV6... - - Imin = box2[0].first(); - Jmin = box2[1].first(); - Kmin = box2[2].first(); - Ilen = box2[0].length(); - Jlen = box2[1].length(); - Klen = box2[2].length(); - Istr = box2[0].stride(); - Jstr = box2[1].stride(); - Kstr = box2[2].stride(); - - diff = zero; - for (int i = 0; i < Ilen; i++) - for (int j = 0; j < Jlen; j++) - for (int k = 0; k < Klen; k++) { - int Iind = Imin + i*Istr; - int Jind = Jmin + j*Jstr; - int Kind = Kmin + k*Kstr; - diff += R(Iind,Jind,Kind) - BV6(i,j,k); - } - - testStatus = (diff == zero) && testStatus; - - reportResults(testNumber,"Range constructor",testStatus); - - - //------------------------------------------------------- - // test 34: Range/Interval constructor, NewEngine struct - //------------------------------------------------------- - - ++testNumber; - - { - typedef NewEngine >::Type_t Try_t; - typedef Engine<3,float,BrickView<3,false> > Correct_t; - testStatus = TypeMatchTester::Result; - } - - reportResults(testNumber," NewEngine struct",testStatus); - - - //------------------------------------------------------- - // test 35: Range/Interval constructor, domain() accessor - //------------------------------------------------------- - - ++testNumber; - - // 3D, UnitStride = F - - float3DV2_t BV7(BV5); - - // the Domain returned by this accessor is always an Interval, because - // the View is, by definition, stride-1 in all dimensions, with first-index - // = 0 in all dimensions. Thus, box4 should = box3, since these are stride-1 - // Intervals describing the identical View, but box3 is not = box1; box1 is the - // not-necessarily-stride-1 Range corresponding to box3, and its indices are - // expressed in terms of the parent Domain [cube]'s indices. - - Interval<3> box3 = BV5.domain(); - Interval<3> box4 = BV7.domain(); - - testStatus = (box4[0].first() == box3[0].first()) && - (box4[0].last() == box3[0].last()) && - (box4[0].length() == box3[0].length()) && - (box4[1].first() == box3[1].first()) && - (box4[1].last() == box3[1].last()) && - (box4[1].length() == box3[1].length()) && - (box4[2].first() == box3[2].first()) && - (box4[2].last() == box3[2].last()) && - (box4[2].length() == box3[2].length()); - - // 2D, UnitStride = T - - double2DV1_t BV8(BV1); - Interval<2> square2 = BV8.domain(); - - // even though BV1's Domain (square1) is already Interval<2>, still - // need to compute its domain() which will be offset to start with index 0. - - Interval<2> square3 = BV1.domain(); - - testStatus = (square2[0].first() == square3[0].first()) && - (square2[0].last() == square3[0].last()) && - (square2[0].length() == square3[0].length()) && - (square2[1].first() == square3[1].first()) && - (square2[1].last() == square3[1].last()) && - (square2[1].length() == square3[1].length()) && testStatus; - - reportResults(testNumber," domain() accessor",testStatus); - - - //----------------------------------------------------------- - // test 36: Range/Interval constructor, baseDomain() accessor - //----------------------------------------------------------- - - ++testNumber; - - // 3D, UnitStride = F - - Range<3> cube3 = BV7.baseDomain(); - - testStatus = (cube3[0].first() == box1[0].first()) && - (cube3[0].last() == box1[0].last()) && - (cube3[0].length() == box1[0].length()) && - (cube3[1].first() == box1[1].first()) && - (cube3[1].last() == box1[1].last()) && - (cube3[1].length() == box1[1].length()) && - (cube3[2].first() == box1[2].first()) && - (cube3[2].last() == box1[2].last()) && - (cube3[2].length() == box1[2].length()); - - // 2D, UnitStride = T - - Range<2> box5 = BV8.baseDomain(); - - testStatus = (box5[0].first() == square1[0].first()) && - (box5[0].last() == square1[0].last()) && - (box5[0].length() == square1[0].length()) && - (box5[1].first() == square1[1].first()) && - (box5[1].last() == square1[1].last()) && - (box5[1].length() == square1[1].length()) && testStatus; - - reportResults(testNumber," baseDomain() accessor",testStatus); - - - //-------------------------------------------------------- - // test 37: Range/Interval constructor, strides() accessor - //-------------------------------------------------------- - - ++testNumber; - - // tests that second-guess the implementation, to illustrate - // the meaning of the BrickViewEngine strides() accessor - // (just this once)... - - // 3D, UnitStride = F - - const int *NT = BV7.strides(); - - testStatus = true; - for(int i = 0; i < 3; i++) { - nomStrides[i] = R.strides()[i] * box1[i].stride(); - testStatus = (NT[i] == nomStrides[i]) && testStatus; - } - - // 2D, UnitStride = T - - NT = BV8.strides(); - - for(int i = 0; i < 2; i++) { - nomStrides[i] = Q.strides()[i] * square1[i].stride(); - testStatus = (NT[i] == nomStrides[i]) && testStatus; - } - - - // the 'real' tests, illustrating how the BrickView strides() - // accessor makes it possible to sequentially identify the subset - // indices from the parent Domain. - - // 3D, UnitStride = F - - // create linear-indexing array RR - - Imin = R.domain()[0].first(); Imax = R.domain()[0].last(); - Jmin = R.domain()[1].first(); Jmax = R.domain()[1].last(); - Kmin = R.domain()[2].first(); Kmax = R.domain()[2].last(); - - int sizeRR = R.domain()[0].length()*R.domain()[1].length()*R.domain()[2].length(); - float* RR = new float[sizeRR]; - - for (int k = Kmin; k < Kmax+1; k++) - for (int j = Jmin; j < Jmax+1; j++) - for (int i = Imin; i < Imax+1; i++) { - int in = (i-Imin); int jn = (j-Jmin); int kn = (k-Kmin); - int ind = kn*R.domain()[1].length()*R.domain()[2].length() + - jn*R.domain()[1].length() + in; - RR[ind] = R(i,j,k); - } - - // verify that using strides() to index into the linear version of - // BrickEngine R gives the same result as BrickView BV7 with its - // unit strides. - - NT = BV7.strides(); - - Imax = BV7.domain()[0].last(); - Jmax = BV7.domain()[1].last(); - Kmax = BV7.domain()[2].last(); - - // compute differences between parent and subdomain first-index - - int deltI = BV7.baseDomain()[0].first() - R.domain()[0].first(); - int deltJ = BV7.baseDomain()[1].first() - R.domain()[1].first(); - int deltK = BV7.baseDomain()[2].first() - R.domain()[2].first(); - - // compute linear-indexing offset - - int off = deltK*R.domain()[1].length()*R.domain()[2].length() + - deltJ*R.domain()[1].length() + deltI; - - diff = zero; - for (int k = 0; k < Kmax+1; k++) - for (int j = 0; j < Jmax+1; j++) - for (int i = 0; i < Imax+1; i++) { - int ind = i*NT[0] + j*NT[1] + k*NT[2] + off; - diff += fabs(RR[ind] - BV7(i,j,k)); - } - - testStatus = (diff == zero) && testStatus; - - - // 2D, UnitStride=T - - // create linear-indexing array QQ - - Imin = Q.domain()[0].first(); Imax = Q.domain()[0].last(); - Jmin = Q.domain()[1].first(); Jmax = Q.domain()[1].last(); - - int sizeQQ = Q.domain()[0].length()*Q.domain()[1].length(); - float* QQ = new float[sizeQQ]; - - for (int j = Jmin; j < Jmax+1; j++) - for (int i = Imin; i < Imax+1; i++) { - int in = (i-Imin); int jn = (j-Jmin); - int ind = jn*Q.domain()[1].length() + in; - QQ[ind] = Q(i,j); - } - - - // verify that using strides() to index into the linear version of - // BrickEngine Q gives the same result as BrickView BV8 with its unit - // strides (if the different starting points for the indexing underlying - // the two Engines) is properly accounted for). - - NT = BV8.strides(); - - Imax = BV8.domain()[0].last(); - Jmax = BV8.domain()[1].last(); - - // compute differences between parent and subdomain first-index - - deltI = BV8.baseDomain()[0].first() - Q.domain()[0].first(); - deltJ = BV8.baseDomain()[1].first() - Q.domain()[1].first(); - - // compute linear-indexing offset - - off = deltJ*Q.domain()[1].length() + deltI; - - diff = zero; - for (int j = 0; j < Jmax+1; j++) - for (int i = 0; i < Imax+1; i++) { - int ind = i*NT[0] + j*NT[1] + off; - diff += fabs(QQ[ind] - BV8(i,j)); - } - - testStatus = (diff == zero) && testStatus; - - - // extra test for 3D, UnitStride = F (different Engine, just for fun) - - // parent domain - - Interval<1> U1(4,10); // length 7 - Interval<1> U2(0,4); // length 5 - Interval<1> U3(-2,0); // length 3 - Interval<3> D(U1,U2,U3); - Engine3Df_t S(D); - - int sizeS2 = U1.length()*U2.length()*U3.length(); - float *S2 = new float[sizeS2]; - - Imin = U1.first(); Imax = U1.last(); - Jmin = U2.first(); Jmax = U2.last(); - Kmin = U3.first(); Kmax = U3.last(); - - // linearly-indexed version of BrickEngine to illustrate use of strides() - - for (int k = Kmin; k < Kmax+1; k++) - for (int j = Jmin; j < Jmax+1; j++) - for (int i = Imin; i < Imax+1; i++) { - int in = (i-Imin); int jn = (j-Jmin); int kn = (k-Kmin); - S(i,j,k) = in*1.1 + jn*2.2 + kn*3.3; - int ind = kn*U1.length()*U2.length() + jn*U1.length() + in; - S2[ind] = S(i,j,k); - } - - // sub-domain - - Range<1> V1(4,10,2); // length 4 - Range<1> V2(0,4,2); // length 3 - Range<1> V3(-2,0,2); // length 2 - - Range<3> F(V1,V2,V3); - float3DV2_t BV9(S,F); - - NT = BV9.strides(); - - // this 'check' once again second-guesses the implementation - // (ok, this is _really_ the last time!) - - testStatus = true; - for(int i = 0; i < 3; i++) { - nomStrides[i] = S.strides()[i] * F[i].stride(); - testStatus = (NT[i] == nomStrides[i]) && testStatus; - } - - // true check: verify that using strides() to index into the linear version - // of BrickEngine S gives the same result as BrickView BV9 with unit strides. - - Imax = BV9.domain()[0].last(); - Jmax = BV9.domain()[1].last(); - Kmax = BV9.domain()[2].last(); - - // compute differences between parent and subdomain first-index - - deltI = BV9.baseDomain()[0].first() - S.domain()[0].first(); - deltJ = BV9.baseDomain()[1].first() - S.domain()[1].first(); - deltK = BV9.baseDomain()[2].first() - S.domain()[2].first(); - - // compute linear-indexing offset - - off = deltK*S.domain()[1].length()*S.domain()[2].length() + - deltJ*S.domain()[1].length() + deltI; - - diff = zero; - for (int k = 0; k < Kmax+1; k++) - for (int j = 0; j < Jmax+1; j++) - for (int i = 0; i < Imax+1; i++) { - int ind = i*NT[0] + j*NT[1] + k*NT[2] + off; - diff += fabs(S2[ind] - BV9(i,j,k)); - } - testStatus = (diff == zero) && testStatus; - - reportResults(testNumber," strides() accessor",testStatus); - - - //---------------------------------------------------------- - // test 38: BrickViewEngine SliceRange constructor - //---------------------------------------------------------- - - ++testNumber; - - // SliceRange is a Domain which stores a total - // Domain (of dimension Dim2) and a slice Domain (of dimension - // Dim < Dim2). Although in general both Domains in a SliceRange - // can be Range objects, here the Dim2 Domain must be an Interval - // since it corresponds to the Domain of a BrickEngine. The - // Dim Range is the one actually used in the constructor; the - // Dim2 Range is implicitly known through the BrickEngine. - - // construct the parent Interval/Engine for the SliceRange/View - - Interval<6> IA6(I0,IJK,J0,Balmer); - Engine6Df_t B1(IA6); - - // get 6D Interval limits - - imin = I0.first(); - imax = I0.last(); - jmin = IJK[0].first(); - jmax = IJK[0].last(); - kmin = IJK[1].first(); - kmax = IJK[1].last(); - int lmin = IJK[2].first(); - int lmax = IJK[2].last(); - int mmin = J0.first(); - int mmax = J0.last(); - int nmin = Balmer.first(); - int nmax = Balmer.last(); - - // assign BrickEngine values - - for(int i = imin; i < imax+1; i++) - for(int j = jmin; j < jmax+1; j++) - for(int k = kmin; k < kmax+1; k++) - for(int l = lmin; l < lmax+1; l++) - for(int m = mmin; m < mmax+1; m++) - for(int n = nmin; n < nmax+1; n++) - B1(i,j,k,l,m,n) = i*1.1 + j*2.2 + k*3.3 + l*4.4 + m*5.5 + n*6.6; - - // define typedefs for the SliceRange - - typedef NewDomain5, int, AllDomain<2>, Interval<1>, Range<1> > ND1_t; - typedef ND1_t::SliceType_t ST1_t; - - // construct the SliceRange, making sure that it is a true subset of - // parent Interval IA6 - - ST1_t SR6; - - int ll = -2; - Loc<1> L1(ll); // subset of I0 - int ii = 5; // subset of I - AllDomain<2> A2; // subset of JK part of IJK (wildcard) - Interval<1> JJ0(7,10); // subset of J0 - Range<1> B0(3,15,3); // subset of Balmer - - ND1_t::fillSlice(SR6,IA6,L1,ii,A2,JJ0,B0); - - // finally, construct a BrickViewEngine based on SliceRange6 - - testStatus = (SR6.sliceDimensions == 4); - float4DV3_t BV10(B1,SR6); - - // check values - - int Lmin; int Llen; int Lstr; - Range<6> d14 = BV10.baseDomain(); - - Imin = d14[2].first(); - Jmin = d14[3].first(); - Kmin = d14[4].first(); - Lmin = d14[5].first(); - Ilen = d14[2].length(); - Jlen = d14[3].length(); - Klen = d14[4].length(); - Llen = d14[5].length(); - Istr = d14[2].stride(); - Jstr = d14[3].stride(); - Kstr = d14[4].stride(); - Lstr = d14[5].stride(); - - diff = zero; - for(int i = 0; i < Ilen; i++) - for(int j = 0; j < Jlen; j++) - for(int k = 0; k < Klen; k++) - for(int l = 0; l < Llen; l++) { - int Iind = Imin + i*Istr; - int Jind = Jmin + j*Jstr; - int Kind = Kmin + k*Kstr; - int Lind = Lmin + l*Lstr; - diff += fabs(B1(ll,ii,Iind,Jind,Kind,Lind) - BV10(i,j,k,l)); - } - testStatus = (diff == zero) && testStatus; - - reportResults(testNumber,"SliceRange constructor", - testStatus); - - - //------------------------------------------------------------- - // test 39: SliceRange constructor, NewEngine struct - //------------------------------------------------------------- - - ++testNumber; - - { - typedef NewEngine::Type_t Try_t; - typedef Engine<4,float,BrickView<6,false> > Correct_t; - testStatus = TypeMatchTester::Result; - } - - reportResults(testNumber," NewEngine struct",testStatus); - - - //-------------------------------------------------------------- - // test 40: SliceRange constructor, domain() accessor - //-------------------------------------------------------------- - - ++testNumber; - - Interval<4> d13 = BV10.domain(); - - testStatus = (d13[0].first() == 0) && - (d13[0].last() == 6) && - (d13[0].length() == 7) && - (d13[1].first() == 0) && - (d13[1].last() == 12) && - (d13[1].length() == 13) && - (d13[2].first() == 0) && - (d13[2].last() == 3) && - (d13[2].length() == 4) && - (d13[3].first() == 0) && - (d13[3].last() == 4) && - (d13[3].length() == 5); - - reportResults(testNumber," domain() accessor",testStatus); - - - //----------------------------------------------------------------- - // test 41: SliceRange constructor, baseDomain() accessor - //----------------------------------------------------------------- - - ++testNumber; - - testStatus = (d14[0].first() == -2) && - (d14[0].last() == -2) && - (d14[0].length() == 1) && - (d14[1].first() == 5) && - (d14[1].last() == 5) && - (d14[1].length() == 1) && - (d14[2].first() == -6) && - (d14[2].last() == 0) && - (d14[2].length() == 7) && - (d14[3].first() == 2) && - (d14[3].last() == 14) && - (d14[3].length() == 13) && - (d14[4].first() == 7) && - (d14[4].last() == 10) && - (d14[4].length() == 4) && - (d14[5].first() == 3) && - (d14[5].last() == 15) && - (d14[5].length() == 5); - - - reportResults(testNumber," baseDomain() accessor",testStatus); - - - //-------------------------------------------------------------- - // test 42: SliceRange constructor, strides() accessor - //-------------------------------------------------------------- - - ++testNumber; - - // create linear-indexing array BB1 - - int Lmax; int Mmin; int Mmax; int Nmin; int Nmax; - Imin = B1.domain()[0].first(); Imax = B1.domain()[0].last(); - Jmin = B1.domain()[1].first(); Jmax = B1.domain()[1].last(); - Kmin = B1.domain()[2].first(); Kmax = B1.domain()[2].last(); - Lmin = B1.domain()[3].first(); Lmax = B1.domain()[3].last(); - Mmin = B1.domain()[4].first(); Mmax = B1.domain()[4].last(); - Nmin = B1.domain()[5].first(); Nmax = B1.domain()[5].last(); - - int sizeBB1 = B1.domain()[0].length()*B1.domain()[1].length()*B1.domain()[2].length() * - B1.domain()[3].length()*B1.domain()[4].length()*B1.domain()[5].length(); - float* BB1 = new float[sizeBB1]; - - int b10 = B1.domain()[0].length(); - int b11 = B1.domain()[1].length(); - int b12 = B1.domain()[2].length(); - int b13 = B1.domain()[3].length(); - int b14 = B1.domain()[4].length(); - - for (int n = Nmin; n < Nmax+1; n++) - for (int m = Mmin; m < Mmax+1; m++) - for (int l = Lmin; l < Lmax+1; l++) - for (int k = Kmin; k < Kmax+1; k++) - for (int j = Jmin; j < Jmax+1; j++) - for (int i = Imin; i < Imax+1; i++) { - int in = (i-Imin); int jn = (j-Jmin); int kn = (k-Kmin); - int ln = (l-Lmin); int mn = (m-Mmin); int nn = (n-Nmin); - int ind = nn*b10*b11*b12*b13*b14 + mn*b10*b11*b12*b13 + - ln*b10*b11*b12 + kn*b10*b11 + jn*b10 + in; - BB1[ind] = B1(i,j,k,l,m,n); - } - - NT = BV10.strides(); - - Imax = BV10.domain()[0].last(); - Jmax = BV10.domain()[1].last(); - Kmax = BV10.domain()[2].last(); - Lmax = BV10.domain()[3].last(); - - // compute differences between parent and subdomain first-index - - deltI = BV10.baseDomain()[0].first() - B1.domain()[0].first(); - deltJ = BV10.baseDomain()[1].first() - B1.domain()[1].first(); - deltK = BV10.baseDomain()[2].first() - B1.domain()[2].first(); - int deltL = BV10.baseDomain()[3].first() - B1.domain()[3].first(); - int deltM = BV10.baseDomain()[4].first() - B1.domain()[4].first(); - int deltN = BV10.baseDomain()[5].first() - B1.domain()[5].first(); - - // compute linear-indexing offset - - off = deltN*b10*b11*b12*b13*b14 + deltM*b10*b11*b12*b13 + - deltL*b10*b11*b12 + deltK*b10*b11 + deltJ*b10 + deltI; - - diff = zero; - for (int l = 0; l < Lmax+1; l++) - for (int k = 0; k < Kmax+1; k++) - for (int j = 0; j < Jmax+1; j++) - for (int i = 0; i < Imax+1; i++) { - int ind = i*NT[0] + j*NT[1] + k*NT[2] + l*NT[3] + off; - diff += fabs(BB1[ind] - BV10(i,j,k,l)); - } - - testStatus = (diff == zero) && testStatus; - - reportResults(testNumber," strides() accessor",testStatus); - - - //------------------------------------------------------------- - // test 43: BrickViewEngine SliceInterval constructor - //------------------------------------------------------------- - - ++testNumber; - - // similar to SliceRange constructor, but now the 1D - // subDomains comprising the Slice must all be Intervals. - // - // test using B1 again, but this time take 2D slice instead of 4D. - - typedef NewDomain4, Loc<3>, Interval<1>, Loc<1> > ND2_t; - typedef ND2_t::SliceType_t ST2_t; - - ST2_t SI6; - AllDomain<1> A1; // subset of I0 - Loc<3> L3(2,-4,12); // subset of IJK - L1 = 18; // subset of Balmer - - ND2_t::fillSlice(SI6,IA6,A1,L3,JJ0,L1); - testStatus = (SI6.sliceDimensions == 2); - - float2DV2_t BV12(B1,SI6); - Interval<6> d15 = BV12.baseDomain(); - - Imin = d15[0].first(); - Jmin = d15[4].first(); - Ilen = d15[0].length(); - Jlen = d15[4].length(); - Istr = d15[0].stride(); - Jstr = d15[4].stride(); - - diff = zero; - for(int i = 0; i < Ilen; i++) - for(int j = 0; j < Jlen; j++) { - int Iind = Imin + i*Istr; - int Jind = Jmin + j*Jstr; - diff += fabs(B1(Iind,2,-4,12,Jind,18) - BV12(i,j)); - } - testStatus = (diff == zero) && testStatus; - - reportResults(testNumber,"SliceInterval constructor", - testStatus); - - - //---------------------------------------------------------------- - // test 44: SliceInterval constructor, NewEngine struct - //---------------------------------------------------------------- - - ++testNumber; - - { - typedef NewEngine::Type_t Try_t; - typedef Engine<2,float,BrickView<6,false> > Correct_t; - testStatus = TypeMatchTester::Result; - } - - reportResults(testNumber," NewEngine struct",testStatus); - - - //---------------------------------------------------------------- - // test 45: SliceInterval constructor, domain() accessor - //---------------------------------------------------------------- - - ++testNumber; - - Interval<2> d16 = BV12.domain(); - testStatus = (d16[0].first() == 0) && - (d16[0].last() == 6) && - (d16[0].length() == 7) && - (d16[1].first() == 0) && - (d16[1].last() == 3) && - (d16[1].length() == 4); - - reportResults(testNumber," domain() accessor",testStatus); - - - //-------------------------------------------------------------------- - // test 46: SliceInterval constructor, baseDomain() accessor - //-------------------------------------------------------------------- - - ++testNumber; - - testStatus = (d15[0].first() == -3) && - (d15[0].last() == 3) && - (d15[0].length() == 7) && - (d15[1].first() == 2) && - (d15[1].last() == 2) && - (d15[1].length() == 1) && - (d15[2].first() == -4) && - (d15[2].last() == -4) && - (d15[2].length() == 1) && - (d15[3].first() == 12) && - (d15[3].last() == 12) && - (d15[3].length() == 1) && - (d15[4].first() == 7) && - (d15[4].last() == 10) && - (d15[4].length() == 4) && - (d15[5].first() == 18) && - (d15[5].last() == 18) && - (d15[5].length() == 1); - - reportResults(testNumber," baseDomain() accessor",testStatus); - - - //----------------------------------------------------------------- - // test 47: SliceInterval constructor, strides() accessor - //----------------------------------------------------------------- - - ++testNumber; - - NT = BV12.strides(); - - Imax = BV12.domain()[0].last(); - Jmax = BV12.domain()[1].last(); - - deltI = BV12.baseDomain()[0].first() - B1.domain()[0].first(); - deltJ = BV12.baseDomain()[1].first() - B1.domain()[1].first(); - deltK = BV12.baseDomain()[2].first() - B1.domain()[2].first(); - deltL = BV12.baseDomain()[3].first() - B1.domain()[3].first(); - deltM = BV12.baseDomain()[4].first() - B1.domain()[4].first(); - deltN = BV12.baseDomain()[5].first() - B1.domain()[5].first(); - - off = deltN*b10*b11*b12*b13*b14 + deltM*b10*b11*b12*b13 + - deltL*b10*b11*b12 + deltK*b10*b11 + deltJ*b10 + deltI; - - diff = zero; - for (int j = 0; j < Jmax+1; j++) - for (int i = 0; i < Imax+1; i++) { - int ind = i*NT[0] + j*NT[1] + off; - diff += fabs(BB1[ind] - BV12(i,j)); - } - testStatus = (diff == zero) && testStatus; - - reportResults(testNumber," strides() accessor",testStatus); - - - //------------------------------------------ - // test 48: BrickViewEngine Node constructor - //------------------------------------------ - - ++testNumber; - - // use simple Node as in test #10, built on Interval<6> - // subset of star. - - Loc<5> gamma(5,11,4,8,12); - Interval<6> symm(gamma,Interval<1>(5,9)); - Node > kpt(-1,symm,0,0,0); - - // assign more interesting data to BZone than simple constant - - for(int i = 4; i < 13; i++) - for(int j = 4; j < 13; j++) - for(int k = 4; k < 13; k++) - for(int l = 4; l < 13; l++) - for(int m = 4; m < 13; m++) - for(int n = 4; n < 13; n++) - BZone(i,j,k,l,m,n) = i*2 + j*3 + k*4 + (l+m)*5 - n; - - int6DV1_t BV14(BZone,kpt); - - Interval<6> d17 = BV14.baseDomain(); - - Imin = d17[5].first(); - Ilen = d17[5].length(); - Istr = d17[5].stride(); - - diff = zero; - for(int i = 0; i < 5; i++) { - int Iind = Imin + i*Istr; - diff += abs(BZone(5,11,4,8,12,Iind) - BV14.read(0,0,0,0,0,i)); - } - - testStatus = (diff == zero); - - reportResults(testNumber,"Node constructor",testStatus); - - - //--------------------------------------------- - // test 49: Node constructor, NewEngine struct - //--------------------------------------------- - - ++testNumber; - - { - typedef NewEngine > >::Type_t Try_t; - typedef Engine<6,int,BrickView<6,true> > Correct_t; - testStatus = TypeMatchTester::Result; - } - - reportResults(testNumber," NewEngine struct",testStatus); - - - //--------------------------------------------- - // test 50: Node constructor, domain() accessor - //--------------------------------------------- - - ++testNumber; - - Interval<6> d18 = BV14.domain(); - testStatus = (d18[0].first() == 0) && - (d18[0].last() == 0) && - (d18[0].length() == 1) && - (d18[1].first() == 0) && - (d18[1].last() == 0) && - (d18[1].length() == 1) && - (d18[2].first() == 0) && - (d18[2].last() == 0) && - (d18[2].length() == 1) && - (d18[3].first() == 0) && - (d18[3].last() == 0) && - (d18[3].length() == 1) && - (d18[4].first() == 0) && - (d18[4].last() == 0) && - (d18[4].length() == 1) && - (d18[5].first() == 0) && - (d18[5].last() == 4) && - (d18[5].length() == 5); - - reportResults(testNumber," domain() accessor",testStatus); - - - //------------------------------------------------- - // test 51: Node constructor, baseDomain() accessor - //------------------------------------------------- - - ++testNumber; - testStatus = (d17[0].first() == 5) && - (d17[0].last() == 5) && - (d17[0].length() == 1) && - (d17[1].first() == 11) && - (d17[1].last() == 11) && - (d17[1].length() == 1) && - (d17[2].first() == 4) && - (d17[2].last() == 4) && - (d17[2].length() == 1) && - (d17[3].first() == 8) && - (d17[3].last() == 8) && - (d17[3].length() == 1) && - (d17[4].first() == 12) && - (d17[4].last() == 12) && - (d17[4].length() == 1) && - (d17[5].first() == 5) && - (d17[5].last() == 9) && - (d17[5].length() == 5); - - reportResults(testNumber," baseDomain() accessor",testStatus); - - - //---------------------------------------------- - // test 52: Node constructor, strides() accessor - //---------------------------------------------- - - ++testNumber; - - Imin = BZone.domain()[0].first(); Imax = BZone.domain()[0].last(); - Jmin = BZone.domain()[1].first(); Jmax = BZone.domain()[1].last(); - Kmin = BZone.domain()[2].first(); Kmax = BZone.domain()[2].last(); - Lmin = BZone.domain()[3].first(); Lmax = BZone.domain()[3].last(); - Mmin = BZone.domain()[4].first(); Mmax = BZone.domain()[4].last(); - Nmin = BZone.domain()[5].first(); Nmax = BZone.domain()[5].last(); - - int sizeBZ2 = BZone.domain()[0].length()*BZone.domain()[1].length()*BZone.domain()[2].length() * - BZone.domain()[3].length()*BZone.domain()[4].length()*BZone.domain()[5].length(); - float* BZ2 = new float[sizeBZ2]; - - b10 = BZone.domain()[0].length(); - b11 = BZone.domain()[1].length(); - b12 = BZone.domain()[2].length(); - b13 = BZone.domain()[3].length(); - b14 = BZone.domain()[4].length(); - - for (int n = Nmin; n < Nmax+1; n++) - for (int m = Mmin; m < Mmax+1; m++) - for (int l = Lmin; l < Lmax+1; l++) - for (int k = Kmin; k < Kmax+1; k++) - for (int j = Jmin; j < Jmax+1; j++) - for (int i = Imin; i < Imax+1; i++) { - int in = (i-Imin); int jn = (j-Jmin); int kn = (k-Kmin); - int ln = (l-Lmin); int mn = (m-Mmin); int nn = (n-Nmin); - int ind = nn*b10*b11*b12*b13*b14 + mn*b10*b11*b12*b13 + - ln*b10*b11*b12 + kn*b10*b11 + jn*b10 + in; - BZ2[ind] = BZone(i,j,k,l,m,n); - } - - NT = BV14.strides(); - Imax = BV14.domain()[5].last(); - - deltI = BV14.baseDomain()[0].first() - BZone.domain()[0].first(); - deltJ = BV14.baseDomain()[1].first() - BZone.domain()[1].first(); - deltK = BV14.baseDomain()[2].first() - BZone.domain()[2].first(); - deltL = BV14.baseDomain()[3].first() - BZone.domain()[3].first(); - deltM = BV14.baseDomain()[4].first() - BZone.domain()[4].first(); - deltN = BV14.baseDomain()[5].first() - BZone.domain()[5].first(); - - off = deltN*b10*b11*b12*b13*b14 + deltM*b10*b11*b12*b13 + - deltL*b10*b11*b12 + deltK*b10*b11 + deltJ*b10 + deltI; - - diff = zero; - for (int i = 0; i < Imax+1; i++) { - int ind = i*NT[5] + off; - diff += fabs(BZ2[ind] - BV14(0,0,0,0,0,i)); - } - testStatus = (diff == zero) && testStatus; - - reportResults(testNumber," strides() accessor",testStatus); - - - //------------------------------------------- - // test 53: BrickViewEngine INode constructor - //------------------------------------------- - - ++testNumber; - - // construct an INode from a Node - - Loc<1> alpha(10); - Loc<3> beta(12,5,7); - Interval<6> symmer(alpha,Interval<1>(10,12),point,beta); - Node > gvec(-1,symmer,0,0,0); - INode<6> IN1(gvec); - int6DV1_t BV16(BZone,IN1); - - Interval<6> d19 = BV16.baseDomain(); - - Imin = d19[1].first(); - Ilen = d19[1].length(); - Istr = d19[1].stride(); - - Jmin = d19[2].first(); - Jlen = d19[2].length(); - Jstr = d19[2].stride(); - - diff = zero; - for(int i = 0; i < Ilen+1; i++) - for(int j = 0; j < Jlen+1; j++) { - int Iind = Imin + i*Istr; - int Jind = Jmin + j*Jstr; - diff += abs(BZone.read(10,Iind,Jind,12,5,7) - BV16(0,i,j,0,0,0)); - } - testStatus = (diff == zero); - - reportResults(testNumber,"INode constructor",testStatus); - - - //--------------------------------------------- - // test 54: INode constructor, NewEngine struct - //--------------------------------------------- - - ++testNumber; - - { - typedef NewEngine >::Type_t Try_t; - typedef Engine<6,int,BrickView<6,true> > Correct_t; - testStatus = TypeMatchTester::Result; - } - - reportResults(testNumber," NewEngine struct",testStatus); - - - //---------------------------------------------- - // test 55: INode constructor, domain() accessor - //---------------------------------------------- - - ++testNumber; - - Interval<6> d20 = BV16.domain(); - testStatus = (d20[0].first() == 0) && - (d20[0].last() == 0) && - (d20[0].length() == 1) && - (d20[1].first() == 0) && - (d20[1].last() == 2) && - (d20[1].length() == 3) && - (d20[2].first() == 0) && - (d20[2].last() == 8) && - (d20[2].length() == 9) && - (d20[3].first() == 0) && - (d20[3].last() == 0) && - (d20[3].length() == 1) && - (d20[4].first() == 0) && - (d20[4].last() == 0) && - (d20[4].length() == 1) && - (d20[5].first() == 0) && - (d20[5].last() == 0) && - (d20[5].length() == 1); - - reportResults(testNumber," domain() accessor",testStatus); - - - //-------------------------------------------------- - // test 56: INode constructor, baseDomain() accessor - //-------------------------------------------------- - - ++testNumber; - - testStatus = (d19[0].first() == 10) && - (d19[0].last() == 10) && - (d19[0].length() == 1) && - (d19[1].first() == 10) && - (d19[1].last() == 12) && - (d19[1].length() == 3) && - (d19[2].first() == 4) && - (d19[2].last() == 12) && - (d19[2].length() == 9) && - (d19[3].first() == 12) && - (d19[3].last() == 12) && - (d19[3].length() == 1) && - (d19[4].first() == 5) && - (d19[4].last() == 5) && - (d19[4].length() == 1) && - (d19[5].first() == 7) && - (d19[5].last() == 7) && - (d19[5].length() == 1); - - reportResults(testNumber," baseDomain() accessor",testStatus); - - - //----------------------------------------------- - // test 57: INode constructor, strides() accessor - //----------------------------------------------- - - ++testNumber; - - NT = BV16.strides(); - Imax = BV16.domain()[1].last(); - Jmax = BV16.domain()[2].last(); - - deltI = BV16.baseDomain()[0].first() - BZone.domain()[0].first(); - deltJ = BV16.baseDomain()[1].first() - BZone.domain()[1].first(); - deltK = BV16.baseDomain()[2].first() - BZone.domain()[2].first(); - deltL = BV16.baseDomain()[3].first() - BZone.domain()[3].first(); - deltM = BV16.baseDomain()[4].first() - BZone.domain()[4].first(); - deltN = BV16.baseDomain()[5].first() - BZone.domain()[5].first(); - - // b10...b14 are the same as for Node, since the underlying BZone - // BrickEngine is the same - - off = deltN*b10*b11*b12*b13*b14 + deltM*b10*b11*b12*b13 + - deltL*b10*b11*b12 + deltK*b10*b11 + deltJ*b10 + deltI; - - diff = zero; - for (int j = 0; j < Jmax+1; j++) - for (int i = 0; i < Imax+1; i++) { - int ind = i*NT[1] + j*NT[2] + off; - diff += fabs(BZ2[ind] - BV16(0,i,j,0,0,0)); - } - testStatus = (diff == zero) && testStatus; - - reportResults(testNumber," strides() accessor",testStatus); - - - //----------------------------------------------------- - // test 58: BrickViewEngine BrickView/Range constructor - //----------------------------------------------------- - - ++testNumber; - - // note: the nominally distinct case of BrickView/Interval - // is not tested here. - - // Use the domain and subdomain of test #37 as the - // starting point here. This is not the most general - // test since the parent Engine Dim2 and subdomain Dim - // happen to be equal here. - - Range<1> V4(4,6,2); - Loc<1> L2(-2); - Range<3> FF(V4,V2,L2); - - typedef NewEngine >::Type_t BVT1_t; - BVT1_t BV21(BV9,FF); - - Range<3> d21 = BV21.baseDomain(); - - Imin = d21[0].first(); - Jmin = d21[1].first(); - Kmin = d21[2].first(); - Ilen = d21[0].length(); - Jlen = d21[1].length(); - Klen = d21[2].length(); - Istr = d21[0].stride(); - Jstr = d21[1].stride(); - Kstr = d21[2].stride(); - - diff = zero; - for(int i = 0; i < Ilen; i++) - for(int j = 0; j < Jlen; j++) - for(int k = 0; k < Klen; k++) { - int Iind = Imin + i*Istr; - int Jind = Jmin + j*Jstr; - int Kind = Kmin + k*Kstr; - diff += fabs(S(Iind,Jind,Kind) - BV21(i,j,k)); - } - testStatus = (diff == zero) && testStatus; - - reportResults(testNumber,"BrickView/Range constructor", - testStatus); - - - //------------------------------------------------------- - // test 59: BrickView/Range constructor, NewEngine struct - //------------------------------------------------------- - - ++testNumber; - - // test NewEngine for general case where Dim != Dim2 - - { - typedef NewEngine >::Type_t Try_t; - typedef Engine<4,float,BrickView<6,false> > Correct_t; - testStatus = TypeMatchTester::Result; - } - - reportResults(testNumber," NewEngine struct",testStatus); - - - //-------------------------------------------------------- - // test 60: BrickView/Range constructor, domain() accessor - //-------------------------------------------------------- - - /* - ===================================================================== - gam 12/8/98 - tests 60 and 61 inactivated following swh's comments of 12/7/98: - - I've looked at the BrickEngineTest and it doesn't look correct. - - Susan makes an engine called S with the domain - - [4:10:1][0:4:1][-2:0:1] - - since this is a Brick, this is also the baseDomain. She then makes a view - called BV9 using the range - - [4:10:2][0:4:2][-2:0:2]. - - So far, so good. BV9 has the domain (remember that views are Zero-based and - unit stride) - - [0:3:1][0:2:1][0:1:1] - - and the base domain is the same as the range that formed it. Then, she tries - to take a view of BV9, called BV21, using the range - - [4:6:2][0:4:2][-2:-2:1] - - This is bad since this range is outside the domain of BV9. Any test using - BC21 is suspect, though a few miraculously pass. - - ===================================================================== - - ++testNumber; - - Range<3> d22 = BV21.domain(); - testStatus = (d22[0].first() == 0) && - (d22[0].last() == 1) && - (d22[0].length() == 2) && - (d22[1].first() == 0) && - (d22[1].last() == 2) && - (d22[1].length() == 3) && - (d22[2].first() == 0) && - (d22[2].last() == 0) && - (d22[2].length() == 1); - - reportResults(testNumber," domain() accessor",testStatus); - - //------------------------------------------------------------ - // test 61: BrickView/Range constructor, baseDomain() accessor - //------------------------------------------------------------ - - ++testNumber; - - // the baseDomain is the domain with respect to the original - // Brick's Domain. Here, the original Brick is S (see - // test #37) which has a Domain [4:10:1,0:4:1,-2:0:1]. - // The values returned by baseDomain should therefore lie - // within these limits. - // - // The baseDomain is computed in BrickEngine.h as follows: - // - // baseDomain_m[dt] = Range<1>( - // base[dt].first() + domain[d0].first() * base[dt].stride(), - // base[dt].first() + domain[d0].last() * base[dt].stride(), - // domain[d0].stride() * base[dt].stride()); - // - // base <--> the BrickViewEngines's base, in this example, - // BV9.baseDomain() = [4:10:2,0:4:2,-2:0:2]. - // - // domain <--> the Domain of the Range constructor argument, in this - // example, FF.domain() = = [4:6:2,0:4:2,-2:-2:1]. - // - // The above code therefore computes the baseDomain() for - // the new BrickView as follows: - // - // 1st Dim: 4 + 4*2, 4 + 6*2, 2*2 - // 2nd Dim: 0 + 0*2, 0 + 4*2, 2*2 - // 3rd Dim: -2 + -2*2, -2 + -2*2, 1*2 - // - // i.e., d21 = [12:16:4,0:8:4,-6:-6:2]. - // - // Note that this says that the baseDomain of the View of a BrickView of - // a Brick lies outside the baseDomain of the original Brick. - // - // Thus, either the implementation is incorrect, or else the interpretation - // of this constructor used here is wrong, and thus not apparent from - // the .h file alone. In that case, it should be carefully explained, - // with examples, in the user documentation. It is likely that this - // issue will be duplicated in all BrickViews constructed from another - // BrickView and a Domain (eg., BrickView/SliceRange below). - - testStatus = (d21[0].first() == 4) && - (d21[0].last() == 6) && - (d21[0].length() == 2) && - (d21[1].first() == 0) && - (d21[1].last() == 4) && - (d21[1].length() == 3) && - (d21[2].first() == -2) && - (d21[2].last() == -2) && - (d21[2].length() == 1); - - reportResults(testNumber," baseDomain() accessor",testStatus); - - ===================================================================== - gam: end of inactivated portion 12/8/98 - */ - - /*---------- outlines for remaining constructor sub-tests ------------- - - //--------------------------------------------------------- - // test 62: BrickView/Range constructor, strides() accessor - //--------------------------------------------------------- - - ++testNumber; - - // this test cannot be implemented until test #61 is resolved. - - reportResults(testNumber," strides() accessor",testStatus); - - - //---------------------------------------------------------- - // test 63: BrickViewEngine BrickView/SliceRange constructor - //---------------------------------------------------------- - - ++testNumber; - - reportResults(testNumber,"BrickView/SliceRange constructor", - testStatus); - - - //------------------------------------------------------------ - // test 64: BrickView/SliceRange constructor, NewEngine struct - //------------------------------------------------------------ - - ++testNumber; - - reportResults(testNumber," NewEngine struct",testStatus); - - - //------------------------------------------------------------- - // test 65: BrickView/SliceRange constructor, domain() accessor - //------------------------------------------------------------- - - ++testNumber; - - reportResults(testNumber," domain() accessor",testStatus); - - - //----------------------------------------------------------------- - // test 66: BrickView/SliceRange constructor, baseDomain() accessor - //----------------------------------------------------------------- - - ++testNumber; - - reportResults(testNumber," baseDomain() accessor",testStatus); - - - //-------------------------------------------------------------- - // test 67: BrickView/SliceRange constructor, strides() accessor - //-------------------------------------------------------------- - - ++testNumber; - - reportResults(testNumber," strides() accessor",testStatus); - - - //------------------------------------------------------------- - // test 68: BrickViewEngine BrickView/SliceInterval constructor - //------------------------------------------------------------- - - ++testNumber; - - reportResults(testNumber,"BrickView/SliceInterval constructor", - testStatus); - - - //--------------------------------------------------------------- - // test 69: BrickView/SliceInterval constructor, NewEngine struct - //--------------------------------------------------------------- - - ++testNumber; - - reportResults(testNumber," NewEngine struct",testStatus); - - - //---------------------------------------------------------------- - // test 70: BrickView/SliceInterval constructor, domain() accessor - //---------------------------------------------------------------- - - ++testNumber; - - reportResults(testNumber," domain() accessor",testStatus); - - - //-------------------------------------------------------------------- - // test 71: BrickView/SliceInterval constructor, baseDomain() accessor - //-------------------------------------------------------------------- - - ++testNumber; - - reportResults(testNumber," baseDomain() accessor",testStatus); - - - //----------------------------------------------------------------- - // test 72: BrickView/SliceInterval constructor, strides() accessor - //----------------------------------------------------------------- - - ++testNumber; - - reportResults(testNumber," strides() accessor",testStatus); - - - //----------------------------------------------------- - // test 73: BrickViewEngine BrickView/Inode constructor - //----------------------------------------------------- - - ++testNumber; - - reportResults(testNumber,"BrickView/Inode constructor", - testStatus); - - - //------------------------------------------------------- - // test 74: BrickView/Inode constructor, NewEngine struct - //------------------------------------------------------- - - ++testNumber; - - reportResults(testNumber," NewEngine struct",testStatus); - - - //-------------------------------------------------------- - // test 75: BrickView/INode constructor, domain() accessor - //-------------------------------------------------------- - - ++testNumber; - - reportResults(testNumber," domain() accessor",testStatus); - - - //------------------------------------------------------------ - // test 76: BrickView/INode constructor, baseDomain() accessor - //------------------------------------------------------------ - - ++testNumber; - - reportResults(testNumber," baseDomain() accessor",testStatus); - - - //--------------------------------------------------------- - // test 77: BrickView/Inode constructor, strides() accessor - //--------------------------------------------------------- - - ++testNumber; - - reportResults(testNumber," strides() accessor",testStatus); - - - //------------------------------------------------------------- - // test 78: BrickViewEngine MultiPatch/INode constructor - //------------------------------------------------------------- - - ++testNumber; - - reportResults(testNumber,"MultiPatch/Inode constructor", - testStatus); - - - //--------------------------------------------------------------- - // test 79: MultiPatch/Inode constructor, NewEngine struct - //--------------------------------------------------------------- - - ++testNumber; - - reportResults(testNumber," NewEngine struct",testStatus); - - - //---------------------------------------------------------------- - // test 80: MultiPatch/INode constructor, domain() accessor - //---------------------------------------------------------------- - - ++testNumber; - - reportResults(testNumber," domain() accessor",testStatus); - - - //-------------------------------------------------------------------- - // test 81: MultiPatch/INode constructor, baseDomain() accessor - //-------------------------------------------------------------------- - - ++testNumber; - - reportResults(testNumber," baseDomain() accessor",testStatus); - - - //----------------------------------------------------------------- - // test 82: MultiPatch/Inode constructor, strides() accessor - //----------------------------------------------------------------- - - ++testNumber; - - reportResults(testNumber," strides() accessor",testStatus); - - - //------------------------------------------------------------ - // test 83: BrickViewEngine MultiPatch/Node constructor - //------------------------------------------------------------ - - ++testNumber; - - reportResults(testNumber,"MultiPatch/Node constructor", - testStatus); - - - //-------------------------------------------------------------- - // test 84: MultiPatch/Node constructor, NewEngine struct - //-------------------------------------------------------------- - - ++testNumber; - - reportResults(testNumber," NewEngine struct",testStatus); - - - //--------------------------------------------------------------- - // test 85: MultiPatch/Node constructor, domain() accessor - //--------------------------------------------------------------- - - ++testNumber; - - reportResults(testNumber," domain() accessor",testStatus); - - - //------------------------------------------------------------------- - // test 86: MultiPatch/Node constructor, baseDomain() accessor - //------------------------------------------------------------------- - - ++testNumber; - - reportResults(testNumber," baseDomain() accessor",testStatus); - - - //---------------------------------------------------------------- - // test 87: MultiPatch/Node constructor, strides() accessor - //---------------------------------------------------------------- - - ++testNumber; - - reportResults(testNumber," strides() accessor",testStatus); - - - //----------------------------------------------------------------- - // test 88: BrickViewEngine MultiPatchView/INode constructor - //----------------------------------------------------------------- - - ++testNumber; - - reportResults(testNumber,"MultiPatchView/Inode constructor", - testStatus); - - - //------------------------------------------------------------------- - // test 89: MultiPatchVIew/Inode constructor, NewEngine struct - //------------------------------------------------------------------- - - ++testNumber; - - reportResults(testNumber," NewEngine struct",testStatus); - - - //-------------------------------------------------------------------- - // test 90: MultiPatchView/INode constructor, domain() accessor - //-------------------------------------------------------------------- - - ++testNumber; - - reportResults(testNumber," domain() accessor",testStatus); - - - //------------------------------------------------------------------------ - // test 91: MultiPatchView/INode constructor, baseDomain() accessor - //------------------------------------------------------------------------ - - ++testNumber; - - reportResults(testNumber," baseDomain() accessor",testStatus); - - - //--------------------------------------------------------------------- - // test 92: MultiPatchView/INode constructor, strides() accessor - //--------------------------------------------------------------------- - - ++testNumber; - - reportResults(testNumber," strides() accessor",testStatus); - - - //---------------------------------------------------------------- - // test 93: BrickViewEngine MultiPatchView/Node constructor - //---------------------------------------------------------------- - - ++testNumber; - - reportResults(testNumber,"MultiPatchView/Node constructor", - testStatus); - - - //------------------------------------------------------------------ - // test 94: MultiPatchVIew/Node constructor, NewEngine struct - //------------------------------------------------------------------ - - ++testNumber; - - reportResults(testNumber," NewEngine struct",testStatus); - - - //------------------------------------------------------------------- - // test 95: MultiPatchView/Node constructor, domain() accessor - //------------------------------------------------------------------- - - ++testNumber; - - reportResults(testNumber," domain() accessor",testStatus); - - - //----------------------------------------------------------------------- - // test 96: MultiPatchView/Node constructor, baseDomain() accessor - //----------------------------------------------------------------------- - - ++testNumber; - - reportResults(testNumber," baseDomain() accessor",testStatus); - - - //-------------------------------------------------------------------- - // test 97: MultiPatchView/Node constructor, strides() accessor - //-------------------------------------------------------------------- - - ++testNumber; - - reportResults(testNumber," strides() accessor",testStatus); - - - //------------------------------------------------------- - // test 98: BrickViewEngine CompressibleBrick constructor - //------------------------------------------------------- - - ++testNumber; - - reportResults(testNumber,"CompressibleBrick constructor", - testStatus); - - - //--------------------------------------------------------- - // test 99: CompressibleBrick constructor, NewEngine struct - //--------------------------------------------------------- - - ++testNumber; - - reportResults(testNumber," NewEngine struct",testStatus); - - - //----------------------------------------------------------- - // test 100: CompressibleBrick constructor, domain() accessor - //----------------------------------------------------------- - - ++testNumber; - - reportResults(testNumber," domain() accessor",testStatus); - - - //--------------------------------------------------------------- - // test 101: CompressibleBrick constructor, baseDomain() accessor - //--------------------------------------------------------------- - - ++testNumber; - - reportResults(testNumber," baseDomain() accessor",testStatus); - - - //------------------------------------------------------------ - // test 102: CompressibleBrick constructor, strides() accessor - //------------------------------------------------------------ - - ++testNumber; - - reportResults(testNumber," strides() accessor",testStatus); - - - ---------------- end templates for remaining constructors -------------*/ - - - //------------------------------------------------------------------------ - // test 103: BrickViewEngine copy constructor (all BrickView constructors) - //------------------------------------------------------------------------ - - ++testNumber; - - // Range/Interval - - Ilen = box3[0].length(); - Jlen = box3[1].length(); - Klen = box3[2].length(); - - for (int i = 0; i < Ilen; i++) - for (int j = 0; j < Jlen; j++) - for (int k = 0; k < Klen; k++) - diff += fabs(BV5.read(i,j,k) - BV7(Loc<3>(i,j,k))); - testStatus = (diff == zero); - - Ilen = square2[0].length(); - Jlen = square2[1].length(); - - for (int i = 0; i < Ilen; i++) - for (int j = 0; j < Jlen; j++) - diff += fabs(BV8(i,j) - BV1(i,j)); - testStatus = (diff == zero) && testStatus; - - - // SliceRange - - float4DV3_t BV11(BV10); - - Ilen = d13[0].length(); - Jlen = d13[1].length(); - Klen = d13[2].length(); - Llen = d13[3].length(); - - diff = zero; - for(int i = 0; i < Ilen; i++) - for(int j = 0; j < Jlen; j++) - for(int k = 0; k < Klen; k++) - for(int l = 0; l < Llen; l++) - diff += fabs(BV10(i,j,k,l) - BV11(i,j,k,l)); - testStatus = (diff == zero) && testStatus; - - - // SliceInterval - - float2DV2_t BV13(BV12); - Ilen = d15[0].length(); - Jlen = d15[1].length(); - - diff = zero; - for(int i = 0; i < Ilen; i++) - for(int j = 0; j < Jlen; j++) - diff += fabs(BV13(i,j) - BV12(i,j)); - testStatus = (diff == zero) && testStatus; - - - // Node - - int6DV1_t BV15(BV14); - Ilen = d18[5].length(); - - diff = zero; - for(int i = 0; i < Ilen; i++) - diff += abs(BV15.read(0,0,0,0,0,i) - BV14(Loc<6>(0,0,0,0,0,i))); - testStatus = (diff == zero) && testStatus; - - - // INode - - int6DV1_t BV17(BV16); - Ilen = d20[0].length(); - Jlen = d20[1].length(); - - diff = zero; - for(int i = 0; i < Ilen; i++) - for(int j = 0; j < Jlen; j++) - diff += abs(BV17.read(0,i,j,0,0,0) - BV16(Loc<6>(0,i,j,0,0,0))); - testStatus = (diff == zero) && testStatus; - - - // --- add tests for additional constructors (corresponding to - // --- tests 62-102) here. - - reportResults(testNumber,"copy constructor (all BrickView constructors)", - testStatus); - - } - catch(const char *err) - { uncaughtErrorReport(err,testNumber); } - catch(const Pooma::Assertion &err) - { uncaughtErrorReport(err.what(),testNumber); } - catch(...) - { cerr << "Unknown exception!" << endl; } - - cout << "\n" << endl; - } - --- 0 ---- From mark at codesourcery.com Thu Oct 4 18:40:42 2001 From: mark at codesourcery.com (Mark Mitchell) Date: Thu, 04 Oct 2001 11:40:42 -0700 Subject: Using Tau and PDT with Pooma In-Reply-To: <20011003140034.A2848@codesourcery.com> Message-ID: <71540000.1002220842@gandalf.codesourcery.com> --On Wednesday, October 03, 2001 02:00:34 PM -0700 Jeffrey Oldham wrote: > These are the steps I used to install Tau on my sequential Linux > computer. I take it worked. Yay. > Visit http://www.acl.lanl.gov/tau to download Tau 2.9.19. (Note the > version number!) Visit http://www.acl.lanl.gov/pdtoolkit to download > PDToolkit. I'll put copies of these on our POOMA web site. That way it will be easy to find them, and if the ACL copies go away we'll still have ours, and not be at the mercy of new versions. > make install # How does one specify installation in a > # different directory? Usually with --prefix, but maybe not here. > The Tau and Pooma configuration files have diverged. If using Linux, > patch the appropriate Pooma config/arch configuration file: Add a line > defining '$profile_archtype' to "i386_linux" (including quotation > marks) and modify '$profile_lib_subdir' to use '$profile_archtype' > instead of the hard-coded string. Can we do this once and check it in so that we don't have to remember this step every time? -- Mark Mitchell mark at codesourcery.com CodeSourcery, LLC http://www.codesourcery.com From scotth at proximation.com Thu Oct 4 22:18:09 2001 From: scotth at proximation.com (Scott Haney) Date: Thu, 4 Oct 2001 16:18:09 -0600 Subject: Commits Message-ID: Changes to allow ScalarAdvection to run. Seems to work in serial and parallel. Correctly preserves pulse shape. Tested on linux with KCC (with and without -messaging). Reviewed by Jim Crotinger. -------------- next part -------------- A non-text attachment was scrubbed... Name: Oct42001.1.patch Type: application/applefile Size: 76 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Oct42001.1.patch Type: application/text Size: 15469 bytes Desc: not available URL: From oldham at codesourcery.com Fri Oct 5 01:18:58 2001 From: oldham at codesourcery.com (Jeffrey Oldham) Date: Thu, 4 Oct 2001 18:18:58 -0700 Subject: Patch: Add Comparison Operators for Centerings Message-ID: <20011004181858.A15783@codesourcery.com> Resolves Pooma QMTrack issue 'centering_comparison'. 2001-10-04 Jeffrey D. Oldham * FieldCentering.h (operator==): New function to compare two centerings with the same dimension. (operator!=): Likewise. * tests/Centerings.cpp (main): Add tests of comparison operators. Tested by running tests/Centerings.cpp Approved by Stephen Smith Applied to mainline Thanks, Jeffrey D. Oldham oldham at codesourcery.com -------------- next part -------------- Index: FieldCentering.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Field/FieldCentering.h,v retrieving revision 1.2 diff -c -p -r1.2 FieldCentering.h *** FieldCentering.h 2001/08/30 19:02:36 1.2 --- FieldCentering.h 2001/10/01 17:01:42 *************** std::ostream &operator<<(std::ostream &o *** 491,496 **** --- 491,517 ---- //----------------------------------------------------------------------------- + // Provide == and != comparison operators for centerings. + //----------------------------------------------------------------------------- + + template + bool operator==(const Centering ¢ering1, const Centering ¢ering2) + { + return + centering1.centeringType() == centering2.centeringType() && + centering1.discontinuous() == centering2.discontinuous() && + centering1.orientations() == centering2.orientations() && + centering1.positions() == centering2.positions(); + } + + template + bool operator!=(const Centering ¢ering1, const Centering ¢ering2) + { + return !(centering1 == centering2); + } + + + //----------------------------------------------------------------------------- // Define CanonicalCentering's static members. //----------------------------------------------------------------------------- Index: tests/Centerings.cpp =================================================================== RCS file: /home/pooma/Repository/r2/src/Field/tests/Centerings.cpp,v retrieving revision 1.1 diff -c -p -r1.1 Centerings.cpp *** tests/Centerings.cpp 2001/08/30 01:15:18 1.1 --- tests/Centerings.cpp 2001/10/01 17:01:42 *************** *** 31,41 **** --- 31,43 ---- #include "Pooma/Fields.h" #include "Field/FieldCentering.h" + #include "Utilities/Tester.h" int main(int argc, char *argv[]) { Pooma::initialize(argc, argv); + Pooma::Tester tester(argc, argv); // Explicitly obtain the centerings. CanonicalCentering<2> centering2; *************** int main(int argc, char *argv[]) *** 52,59 **** std::cout << canonicalCentering<2>(CellType, Continuous) << std::endl; std::cout << canonicalCentering<3>(FaceType, Discontinuous, XDim | YDim) << std::endl; Pooma::finalize(); ! return 0; } // ACL:rcsinfo --- 54,68 ---- std::cout << canonicalCentering<2>(CellType, Continuous) << std::endl; std::cout << canonicalCentering<3>(FaceType, Discontinuous, XDim | YDim) << std::endl; + // Briefly test the comparison operators. + tester.check(cell == canonicalCentering<2>(CellType, Continuous)); + tester.check(cell != centering2(FaceType, Continuous, XDim | YDim)); + tester.check(allFace == centering3(FaceType, Continuous, XDim | YDim)); + tester.check(centering3(FaceType, Continuous, XDim | YDim) == allFace); + + int ret = tester.results("Centerings"); Pooma::finalize(); ! return ret; } // ACL:rcsinfo From qmtrack at ns1.codesourcery.com Fri Oct 5 01:21:39 2001 From: qmtrack at ns1.codesourcery.com (qmtrack at ns1.codesourcery.com) Date: 5 Oct 2001 01:21:39 -0000 Subject: [QMTrack] modification to issue centering_comparison Message-ID: <20011005012139.31838.qmail@mail.codesourcery.com> The issue centering_comparison was changed by oldham on 2001-10-04 19:21 MDT. The following fields were modified: State: active From qmtrack at ns1.codesourcery.com Fri Oct 5 01:22:05 2001 From: qmtrack at ns1.codesourcery.com (qmtrack at ns1.codesourcery.com) Date: 5 Oct 2001 01:22:05 -0000 Subject: [QMTrack] modification to issue centering_comparison Message-ID: <20011005012205.31898.qmail@mail.codesourcery.com> The issue centering_comparison was changed by oldham on 2001-10-04 19:22 MDT. The following fields were modified: State: resolved Discussion: On 2001-10-04 19:22 MDT, oldham wrote: Resolved through patch just sent to pooma-dev at pooma.codesourcery.com. From oldham at codesourcery.com Fri Oct 5 01:28:40 2001 From: oldham at codesourcery.com (Jeffrey Oldham) Date: Thu, 4 Oct 2001 18:28:40 -0700 Subject: Patch: Use and Message-ID: <20011004182840.B15783@codesourcery.com> This patch ensures the code uses and , not and , to be consistent. 2001-10-04 Jeffrey D. Oldham * README: Remove comment that iostream.h and complex.h should be used. * benchmarks/SimpleArray/elemread.h: Change to use . * src/Array/tests/array_test19.cpp: Likewise. * src/Array/tests/array_test5.cpp: Likewise. * src/Engine/tests/gmp_test1.cpp: Change to use . * src/Pooma/Arrays.h: Change to use . * src/Pooma/DynamicArrays.h: Likewise. Tested on sequential Linux using gcc 3.1 by compiling Pooma library and +changed tests in src/ Applied to mainline Approved by Stephen Smith Thanks, Jeffrey D. Oldham oldham at codesourcery.com -------------- next part -------------- Index: README =================================================================== RCS file: /home/pooma/Repository/r2/README,v retrieving revision 1.59 diff -c -p -r1.59 README *** README 2001/09/26 20:17:46 1.59 --- README 2001/10/04 17:25:06 *************** required by the ANSI/ISO standard. This *** 1178,1192 **** has had to use the rather tortured conventions: o all standard C headers must be included by the .h version ! (e.g., math.h not cmath). - o iostreams and complex numbers must be introduced using the - .h compatibility headers iostream.h and complex.h - respectively. These are non-standard, but are available - on most platforms. - o all other standard C++ library headers should use the ! ISO/ANSI ".h-less" convention (e.g., vector not vector.h) We apologize for the inconvenience these guidelines might cause. However, we viewed portability as more important than full --- 1178,1187 ---- has had to use the rather tortured conventions: o all standard C headers must be included by the .h version ! (e.g., not ). o all other standard C++ library headers should use the ! ISO/ANSI ".h-less" convention (e.g., not ) We apologize for the inconvenience these guidelines might cause. However, we viewed portability as more important than full Index: benchmarks/SimpleArray/elemread.h =================================================================== RCS file: /home/pooma/Repository/r2/benchmarks/SimpleArray/elemread.h,v retrieving revision 1.2 diff -c -p -r1.2 elemread.h *** benchmarks/SimpleArray/elemread.h 2000/04/12 01:03:40 1.2 --- benchmarks/SimpleArray/elemread.h 2001/10/04 17:25:07 *************** *** 36,42 **** #include "Pooma/Arrays.h" #include "Utilities/Benchmark.h" ! #include //----------------------------------------------------------------------------- // elemreadArray class definition. --- 36,42 ---- #include "Pooma/Arrays.h" #include "Utilities/Benchmark.h" ! #include //----------------------------------------------------------------------------- // elemreadArray class definition. Index: src/Array/tests/array_test19.cpp =================================================================== RCS file: /home/pooma/Repository/r2/src/Array/tests/array_test19.cpp,v retrieving revision 1.19 diff -c -p -r1.19 array_test19.cpp *** src/Array/tests/array_test19.cpp 2000/07/20 15:36:25 1.19 --- src/Array/tests/array_test19.cpp 2001/10/04 17:25:09 *************** *** 48,54 **** #include "Pooma/FunctorResult.h" #include ! #include #include template --- 48,54 ---- #include "Pooma/FunctorResult.h" #include ! #include #include template Index: src/Array/tests/array_test5.cpp =================================================================== RCS file: /home/pooma/Repository/r2/src/Array/tests/array_test5.cpp,v retrieving revision 1.13 diff -c -p -r1.13 array_test5.cpp *** src/Array/tests/array_test5.cpp 2001/09/05 20:42:09 1.13 --- src/Array/tests/array_test5.cpp 2001/10/04 17:25:09 *************** *** 37,43 **** #include "Array/Array.h" #include "Tiny/Vector.h" ! #include #include template --- 37,43 ---- #include "Array/Array.h" #include "Tiny/Vector.h" ! #include #include template Index: src/Engine/tests/gmp_test1.cpp =================================================================== RCS file: /home/pooma/Repository/r2/src/Engine/tests/gmp_test1.cpp,v retrieving revision 1.18 diff -c -p -r1.18 gmp_test1.cpp *** src/Engine/tests/gmp_test1.cpp 2000/07/11 23:06:54 1.18 --- src/Engine/tests/gmp_test1.cpp 2001/10/04 17:25:10 *************** *** 35,41 **** #include "Pooma/BrickArrays.h" #include "Engine/MultiPatchEngine.h" //#include "Evaluator/MultiPatchEval.h" ! #include "iostream.h" #include "Domain/Grid.h" #include "Utilities/Tester.h" --- 35,41 ---- #include "Pooma/BrickArrays.h" #include "Engine/MultiPatchEngine.h" //#include "Evaluator/MultiPatchEval.h" ! #include "iostream" #include "Domain/Grid.h" #include "Utilities/Tester.h" Index: src/Pooma/Arrays.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Pooma/Arrays.h,v retrieving revision 1.16 diff -c -p -r1.16 Arrays.h *** src/Pooma/Arrays.h 2001/09/10 21:41:27 1.16 --- src/Pooma/Arrays.h 2001/10/04 17:25:10 *************** *** 51,57 **** #include "Functions/PackUnpack.h" ! #include #endif --- 51,57 ---- #include "Functions/PackUnpack.h" ! #include #endif Index: src/Pooma/DynamicArrays.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Pooma/DynamicArrays.h,v retrieving revision 1.8 diff -c -p -r1.8 DynamicArrays.h *** src/Pooma/DynamicArrays.h 2000/07/20 15:39:28 1.8 --- src/Pooma/DynamicArrays.h 2001/10/04 17:25:10 *************** *** 46,52 **** #include "Layout/DynamicLayout.h" #include "Pooma/Tiny.h" ! #include #endif --- 46,52 ---- #include "Layout/DynamicLayout.h" #include "Pooma/Tiny.h" ! #include #endif From oldham at codesourcery.com Fri Oct 5 01:36:23 2001 From: oldham at codesourcery.com (Jeffrey Oldham) Date: Thu, 4 Oct 2001 18:36:23 -0700 Subject: Patch: Remove 'test' Directory Message-ID: <20011004183623.A15930@codesourcery.com> This patch removes the four tests in the Pooma 'test' directory. It is unclear whether these files actually exist. They do in some places and not in others. In either case, they have now disappeared. 2001-10-04 Jeffrey D. Oldham * Domain/Loc/Characteristics/LocCharacteristics.cpp: Remove this stale file. * Domain/NewDomain/Constructors/NewDomainConstructor.cpp: Likewise. * Domain/Range/Constructors/RangeConstructor.cpp: Likewise. * Domain/Range/Constructors/makefile: Likewise. * Engine/BrickEngine/BrickEngine/BrickEngineTest.cpp: Likewise. Nothing to test. Applied to mainline. Approved by Jim Crotinger Thanks, Jeffrey D. Oldham oldham at codesourcery.com -------------- next part -------------- Index: Domain/Loc/Characteristics/LocCharacteristics.cpp =================================================================== RCS file: LocCharacteristics.cpp diff -N LocCharacteristics.cpp *** /tmp/cvsm6VP8z Thu Oct 4 12:11:21 2001 --- /dev/null Fri Mar 23 21:37:44 2001 *************** *** 1,315 **** - // -*- C++ -*- - //-------------------------------------------------------------------- - - // Loc Characteristics Component Test Code - //-------------------------------------------------------------------- - - #include "Pooma/Pooma.h" - #include "Domain/Loc.h" - #include - #include - #include - - void reportResults(int n, char *test, bool testStatus) - { - char* statusString = "passed"; - if(!testStatus) statusString = "failed"; - cout << " Test " << setw(3) << n << ", " - << setw(10) << test << ": " << statusString << "\n"; - } - - - - void uncaughtErrorReport(const char *what, int n) - { - cerr << "\nAck! Caught assertion during test # " << n << ":" << endl\ - ; - cerr << what << endl; - } - - template - Loc<1> testElement(const T &dom, int no) { - //get the nth element of dom, and store it in a separte variable - // T::OneDomain_t singleElem = dom[no]; - Loc<1> singleElem = dom[no]; - return singleElem; - } - - // template - // void testDom(const T &dom) { - // //get the dom, and store it in a separte variable - // T::Domain_t singleDomain = dom; - // cout << "Domain " << singleDomain << endl; - // //return singleDomain; - // } - - - template - struct TypeMatchTester - { - static const bool Result = false; - }; - - - template - struct TypeMatchTester - { - static const bool Result = true; - }; - - - typedef Loc<1>::Domain_t DTest_t; - typedef Loc<1>::Element_t ETest_t; - typedef Loc<1>::OneDomain_t ODTest_t; - - - main(int argc, char *argv[]) { - - Pooma::initialize( argc, argv ); - - int debug = 0; - int testNumber = 0; - bool testStatus; - - if ((argc > 1) && (!strcmp(argv[1],"-d"))) debug = 1; - cout << "\n" - << " =============================================================\n" - << " Domain test for Characterists and Interface on Loc object \n" - << " =============================================================\n" - << endl; - - if (debug){ - cout << "=========================DEBUG==================================" - << endl; - cout << endl; - cout << "Starting domain test for Characterists and Interface on "; - cout << " Loc object" << endl; - cout << "Loc objects represent a single point." << endl; - cout << endl; - cout << "first() : the single point in the Loc object" << endl; - cout << "last() : same as first" << endl; - cout << "stride() : this is always 1 " << endl; - cout << "min() : same as first" << endl; - cout << "max() : same as first" << endl; - cout << "length() : this is always 1 " << endl; - cout << "size() : total volume size of the domain, should " ; - cout << "always be one "<< endl; - cout << "empty() :this should always be false " << endl; - cout << "dimensions : the number N " << endl; - cout << "loopAware : this should be 0 " << endl; - cout << "singleValued : this should be 1 " << endl; - cout << "unitStride : this should be 1 " << endl; - cout << endl; - } - - Loc<4>Empty; - Loc<1> n1i(-1); - Loc<2> n2i(-1,-2); - Loc<3> n3i(-1,-2,-3); - Loc<4> n4i(-1,-2,-3,-4); - Loc<5> n5i(-1,-2,-3,-4,-5); - Loc<6> n6i(-1,-2,-3,-4,-5,-6); - - - Loc<1> a1i(1); - Loc<2> a2i(1,2); - Loc<2> a2ia(1); - Loc<3> a3i(1,2,3); - Loc<3> a3ia(1,2); - Loc<4> a4i(1,2,3,4); - Loc<4> a4ia(1,2,3); - Loc<5> a5i(a3i,a2i); - Loc<5> a5ia(1,2,3,4); - Loc<6> a6i(1,2,3,4,5,6); - Loc<6> a6ia(1,2,3,4); - - //Can not use floating point values for endpoints. - // Loc<1> f1i(1.1); - - //If you leave a empty endpoint it will not be intialized to zero but - //will have random values. - //Loc<2>(1) will give you the 001:*** where * is any random value - - cout << endl; - - - Loc<1> a1 = Loc<1>(1); - //Loc<1> b1(Loc<1>()); - Loc<2> b2(a1,Loc<1>(2)); - Loc<3> b3(b2,Loc<1>(3)); - Loc<4> b4(b3,Loc<1>(4)); - Loc<5> b5(b4,Loc<1>(5)); - Loc<6> b6(b5,Loc<1>(6)); - Loc<6> b6a(b3,b2,Loc<1>(6)); - - //OneDomain_t ODT = b2[0]; - //Domain_t DT = b5; - if (debug){ - - cout << endl; - - cout << " a5i = " << a5i << endl; - cout << " a5i[0].length() = " << a5i[0].length() << endl; - cout << " a5i[1].length() = " << a5i[1].length() << endl; - cout << " a5i[2].length() = " << a5i[2].length() << endl; - cout << " a5i[3].length() = " << a5i[3].length() << endl; - cout << " a5i[4].length() = " << a5i[4].length() << endl; - - cout << " a5i[0].first() = " << a5i[0].first() << endl; - cout << " a5i[1].first() = " << a5i[1].first() << endl; - cout << " a5i[2].first() = " << a5i[2].first() << endl; - cout << " a5i[3].first() = " << a5i[3].first() << endl; - cout << " a5i[4].first() = " << a5i[4].first() << endl; - - cout << " a5i[0].last() = " << a5i[0].last() << endl; - cout << " a5i[1].last() = " << a5i[1].last() << endl; - cout << " a5i[2].last() = " << a5i[2].last() << endl; - cout << " a5i[3].last() = " << a5i[3].last() << endl; - cout << " a5i[4].last() = " << a5i[4].last() << endl; - - cout << " a5i[0].stride() = " << a5i[0].stride() << endl; - cout << " a5i[1].stride() = " << a5i[1].stride() << endl; - cout << " a5i[2].stride() = " << a5i[2].stride() << endl; - cout << " a5i[3].stride() = " << a5i[3].stride() << endl; - cout << " a5i[4].stride() = " << a5i[4].stride() << endl; - - cout << " a5i[0].min() = " << a5i[0].min() << endl; - cout << " a5i[1].min() = " << a5i[1].min() << endl; - cout << " a5i[2].min() = " << a5i[2].min() << endl; - cout << " a5i[3].min() = " << a5i[3].min() << endl; - cout << " a5i[4].min() = " << a5i[4].min() << endl; - - cout << " a5i[0].max() = " << a5i[0].max() << endl; - cout << " a5i[1].max() = " << a5i[1].max() << endl; - cout << " a5i[2].max() = " << a5i[2].max() << endl; - cout << " a5i[3].max() = " << a5i[3].max() << endl; - cout << " a5i[4].max() = " << a5i[4].max() << endl; - - cout << " a5i.dimensions() = " << a5i.dimensions << endl; - //cout << " a5i.loopAware() = " << a5i.loopAware() << endl; - //cout << " a5i.singleValued()= " << a5i.singleValued() << endl; - //cout << " a5i.unitStride() = " << a5i.unitStride() << endl; - - cout << endl; - - cout << " after a1 = 1 : a1 = " << a1 << endl; - cout << " 2D multiple Loc<2> b2(a1,Loc<1>(2)) = " << b2 << endl; - cout << " 3D multiple Loc<3> b3(b2,Loc<1>(3)) = " << endl; - cout << " " << b3 << endl; - cout << " 4D multiple Loc<4> b4(b3,Loc<1>(4)) = " << endl; - cout << " " << b4 << endl; - cout << " 5D multiple Loc<5> b5(b4,Loc<1>(5)) = " << endl; - cout << " " << b5 << endl; - cout << " 6D multiple Loc<6> b6(b5,Loc<1>(6)) = " << endl; - cout << " " << b6 << endl; - cout << " 6D multiple Loc<6> b6a(b3,b2,Loc<1>(6))= " << endl; - cout << " " << b6a << endl; - cout << " 6D multiple Loc<6> b6a(b3,b2,Loc<1>(6)).size = " - << b6a.size() << endl; - cout << " 6D multiple Loc<6> b6a(b3,b2,Loc<1>(6)).size = " << - b6a.empty() << endl; - // cout << " OneDomain = " << OneDomain << endl; - cout << " Empty = " << Empty << endl; - cout << " Empty.size = " << Empty.size() << endl; - cout << " Empty.empty = " << Empty.empty() << endl; - - - cout << "=========================END DEBUG=============================" - << endl; - cout << endl; - } - try { - testStatus = (b6a.dimensions == 6); - testStatus = (b5.dimensions == 5) && testStatus; - testStatus = (b4.dimensions == 4) && testStatus; - testStatus = (b3.dimensions == 3) && testStatus; - testStatus = (b2.dimensions == 2) && testStatus; - reportResults(testNumber++,"Loc<>.dimensions ",testStatus); - testStatus = (b6a[0].stride() == b6a.size()) && testStatus; - testStatus = (b5[0].stride() == b5.size()) && testStatus; - testStatus = (b4[0].stride() == b4.size()) && testStatus; - reportResults(testNumber++,"Loc<>.size ",testStatus); - testStatus = (Empty.empty() == 0); - testStatus = (b6a.empty() == 0) && testStatus; - reportResults(testNumber++,"Loc<>.empty ",testStatus); - testStatus = a5i[0].stride(); - testStatus = a5i[1].stride() && testStatus; - testStatus = a5i[2].stride() && testStatus; - testStatus = a5i[3].stride() && testStatus; - testStatus = a5i[4].stride() && testStatus; - reportResults(testNumber++,"Loc<>.stride ",testStatus); - testStatus = (b6a[0].first() == b6a[0].last()); - testStatus = (b6a[1].first() == b6a[1].last()) && testStatus; - testStatus = (b6a[2].first() == b6a[2].last()) && testStatus; - testStatus = (b6a[3].first() == b6a[3].last()) && testStatus; - testStatus = (b6a[4].first() == b6a[4].last()) && testStatus; - testStatus = (b6a[5].first() == b6a[5].last()) && testStatus; - reportResults(testNumber++,"Loc<>.first/last ",testStatus); - testStatus = (b5[0].first() == b5[0].min()); - testStatus = (b5[1].first() == b5[1].min()) && testStatus; - testStatus = (b5[2].first() == b5[2].min()) && testStatus; - testStatus = (b5[3].first() == b5[3].min()) && testStatus; - testStatus = (b5[4].first() == b5[4].min()) && testStatus; - reportResults(testNumber++,"Loc<>.first/min ",testStatus); - testStatus = (b4[0].first() == b4[0].max()); - testStatus = (b4[1].first() == b4[1].max()) && testStatus; - testStatus = (b4[2].first() == b4[2].max()) && testStatus; - testStatus = (b4[3].first() == b4[3].max()) && testStatus; - reportResults(testNumber++,"Loc<>.first/max ",testStatus); - testStatus = (b3[0].stride() == b3[0].length()); - testStatus =(b3[1].stride() == b3[1].length()) && testStatus; - testStatus =(b3[2].stride() == b3[2].length()) && testStatus; - reportResults(testNumber++,"Loc<>.length ",testStatus); - testStatus = (!b6a.loopAware); - testStatus = (!b5.loopAware) && testStatus; - testStatus = (!b4.loopAware) && testStatus; - testStatus = (!b3.loopAware) && testStatus; - testStatus = (!b2.loopAware) && testStatus; - reportResults(testNumber++,"Loc<>.loopAware ",testStatus); - testStatus = (b6a.singleValued); - testStatus = (b5.singleValued) && testStatus; - testStatus = (b4.singleValued) && testStatus; - testStatus = (b3.singleValued) && testStatus; - testStatus = (b2.singleValued) && testStatus; - reportResults(testNumber++,"Loc<>.singleValued ",testStatus); - testStatus = (b6a.unitStride); - testStatus = (b5.unitStride) && testStatus; - testStatus = (b4.unitStride) && testStatus; - testStatus = (b3.unitStride) && testStatus; - testStatus = (b2.unitStride) && testStatus ; - reportResults(testNumber++,"Loc<>.unitStride ",testStatus); - testStatus = TypeMatchTester:: Domain_t>::Result; - reportResults(testNumber++,"Typedef Domain_t ", testStatus); - testStatus = TypeMatchTester:: Element_t>::Result - && testStatus; - reportResults(testNumber++,"Typedef Elemant_t ", testStatus); - testStatus = TypeMatchTester:: OneDomain_t>::Result - && testStatus; - reportResults(testNumber++,"Typedef OneDomain_t ", testStatus); - testStatus = !TypeMatchTester:: Element_t>::Result - && testStatus; - reportResults(testNumber++,"Typedef Domain_t ", testStatus); - testStatus = !TypeMatchTester:: Domain_t>::Result - && testStatus; - reportResults(testNumber++,"Typedef Elemant_t ", testStatus); - testStatus = !TypeMatchTester:: Element_t>::Result - && testStatus; - reportResults(testNumber++,"Typedef OneDomain_t ", testStatus); - testStatus = (a1i == testElement(a4i[0],0)); - testStatus = (b6a[5] == testElement(a6i[5],5)) && testStatus; - testStatus = (b6a[4] == testElement(b4[1],1)) && testStatus; - testStatus = (b6a[4] != testElement(b4[2],2)) && testStatus; - reportResults(testNumber++,"OneDomain ",testStatus); - } - - catch (const char *err) - { uncaughtErrorReport(err,testNumber); } - catch(const Pooma::Assertion &err) - {uncaughtErrorReport(err.what(),testNumber); } - catch(...) - { cerr << "Unknown exception!" << endl; } - cout << endl; - - Pooma::finalize(); - } - --- 0 ---- Index: Domain/NewDomain/Constructors/NewDomainConstructor.cpp =================================================================== RCS file: NewDomainConstructor.cpp diff -N NewDomainConstructor.cpp *** /tmp/cvsHWUAsL Thu Oct 4 12:11:21 2001 --- /dev/null Fri Mar 23 21:37:44 2001 *************** *** 1,224 **** - // -*- C++ -*- - //--------------------------------------------------------------------- - - // NewDomainConstructor Component Test Code - //--------------------------------------------------------------------- - - #include - #include - #include - #include - #include - #include - - - void reportResults(int n, char *test, bool testStatus) - { - char* statusString = "passed"; - if(!testStatus) statusString = "failed"; - cout << " Test " << setw(3) << n << ", " - << setw(10) << test << ": " << statusString << "\n"; - } - - void uncaughtErrorReport(const char *what, int n) - { - cerr << "\nAck! Caught assertion during test # " << n << ":" << endl; - cerr << what << endl; - } - - template - Interval<1> testElement(const T &dom, int no) { - //get the nth element of dom, and store it in a separte variable - T::OneDomain_t singleElem = dom[no]; - return singleElem; - } - - template - struct TypeMatchTester - { - static const bool Result = false; - }; - - template - struct TypeMatchTester - { - static const bool Result = true; - }; - - //typedef NewDomain<>::Type_t TTest_t; - //typedef NewDomain<>::FullType_t FTest_t; - //typedef NewDomain<>::SliceType_t STest_t; - - - main(int argc, char *argv[]) { - - int debug = 0; - int testNumber = 0; - bool testStatus; - - if ((argc > 1) && (!strcmp(argv[1],"-d"))) debug = 1; - cout << "\n" - << " ==============================================================\n" - << " Domain test for Constructors on NewDomain object \n" - << " ==============================================================\n" - << endl; - - if (debug){ - cout << "=========================DEBUG===================================" - << endl; - cout << endl; - cout << "Starting domain test for Constructors on NewDomain object" - << endl; - cout << "A set of simple structs which tell how to combine." << endl; - cout << endl; - cout << " different Domain object together. TThey are named " << endl; - cout << "NewDomain1 - NewDoamin7 and are templated on from 1 .. 7 " - << endl; - cout << "different domain types. If you have a domain as the last " - << endl; - cout << "argrment you must have a space between this argument and the" - << endl; - cout << "last >,NewDomain2,Loc<1> >::Type_t newdomain2; " - << endl; - } - cout << endl; - Loc<1> D1(1); - Loc<1> D2(2); - Range<2> R1(Interval<1>(5,10),Interval<1>(-1,100)); - Range<2> R2(Range<1>(5,10,5),Range<1>(-100,100,20)); - Interval<2> I1(Interval<1>(20,40),Interval<1>(-50,10)); - Interval<2> I2(Interval<1>(20,40),Loc<1>(-99)); - Range<2> R(Range<1>(1,1,1),999); - NewDomain2,int>::Type_t newdomain2; - - NewDomain2,int>::Type_t newdomain2a = - NewDomain2,int>::combine(D1,2); - - NewDomain3,Range<2>,int>::Type_t newdomain3; - NewDomain3,Range<2>,int>::Type_t newdomain3a = - NewDomain3,Range<2>,int>::combine(newdomain2a,R2,999); - - NewDomain4,Interval<2>,Loc<1>,Loc<1> >::Type_t newdomain4; - - NewDomain4,Interval<2>,Loc<1>,Loc<1> >::Type_t newdomain4a = - NewDomain4,Interval<2>,Loc<1>,Loc<1> >::combine(R2,I2,D1,D2); - - NewDomain5,Range<2>,int,Loc<4>,int>::Type_t newdomain5; - NewDomain5,Range<2>,int,Loc<4>,int>::Type_t newdomain5a = - NewDomain5,Range<2>,int,Loc<4>,int>::combine - (newdomain2a,R2,999,Loc<4>(D1,D2,newdomain2a),999); - - NewDomain6,Range<2>,int,Loc<4>,Loc<4>,int>::Type_t newdomain6; - NewDomain6,Range<2>,int,Loc<4>,Loc<4>,int>::Type_t newdomain6a = - NewDomain6,Range<2>,int,Loc<4>,Loc<4>,int>::combine - (newdomain2a,R1,99,Loc<4>(newdomain2a,newdomain2a),Loc<4> - (newdomain2a,newdomain2a),999); - - NewDomain7,Range<2>,Loc<1>,Loc<1>,Interval<2>,Interval<2>, - int>::Type_t newdomain7; - - NewDomain7,Range<2>,Loc<1>,Loc<2>,Interval<2>,Interval<2>, - Range<2> >::Type_t newdomain7a = NewDomain7,Range<2>,Loc<1>, - Loc<2>,Interval<2>,Interval<2>,Range<2> >::combine(R1,R2,D1,newdomain2a, - I1,I2,R2); - - - if (debug){ - cout << "================================================================" - << endl; - cout << endl; - cout << " NewDomain7,Range<2>,Loc<1>,Loc<2>,Interval<2>, Interval<2>,int>::combine(R1,R2,D1,newdomain2a,I1,I2,999) " << newdomain7a << endl; - cout << " R1 " << R1 << endl; - cout << " R2 " << R2 << endl; - cout << " D1 " << D1 << endl; - cout << " newdomain2a " << newdomain2a << endl; - cout << " I1 " << I1 << endl; - cout << " I2 " << I2 << endl; - cout << " newdomain2 " << newdomain2 << endl; - cout << " newdomain2a " << newdomain2a << endl; - cout << " newdomain3 " << newdomain3 << endl; - cout << " newdomain3a " << newdomain3a << endl; - cout << " newdomain4 " << newdomain4 << endl; - cout << " newdomain4a " << newdomain4a << endl; - cout << " newdomain5 " << newdomain5 << endl; - cout << " newdomain5a \n" << " " << newdomain5a << endl; - cout << " newdomain6 \n " << " " << newdomain6 << endl; - cout << " newdomain6a \n " << " " << newdomain6a << endl; - cout << " newdomain7 \n " << " " << newdomain7 << endl; - cout << " newdomain7a \n " << " " << newdomain7a << endl; - cout << " newdomain2.dimensions " << newdomain2.dimensions << endl; - cout << " newdomain3.dimensions " << newdomain3.dimensions << endl; - cout << " newdomain4.dimensions " << newdomain4.dimensions << endl; - cout << " newdomain5.dimensions " << newdomain5.dimensions << endl; - cout << " newdomain6.dimensions " << newdomain6.dimensions << endl; - cout << " newdomain7.dimensions " << newdomain7.dimensions << endl; - cout << " newdomain2a.dimensions " << newdomain2a.dimensions << endl; - cout << " newdomain3a.dimensions " << newdomain3a.dimensions << endl; - cout << " newdomain4a.dimensions " << newdomain4a.dimensions << endl; - cout << " newdomain5a.dimensions " << newdomain5a.dimensions << endl; - cout << " newdomain6a.dimensions " << newdomain6a.dimensions << endl; - cout << " newdomain7a.dimensions " << newdomain7a.dimensions << endl; - cout << endl; - cout << "================================================================" << endl; - } - cout << "Testing NewDomain<*> constructors methods:" << endl; - cout << "----------------------------------------------------------" << endl; - try { - - //---------------------------------------------------------------------- - // Test NewDomain Construtor - //---------------------------------------------------------------------- - - testStatus = (newdomain2.dimensions == 2); - testStatus = (newdomain3.dimensions == 5) && testStatus; - testStatus = (newdomain4.dimensions == 6) && testStatus; - testStatus = (newdomain5.dimensions == 10) && testStatus; - testStatus = (newdomain6.dimensions == 14) && testStatus; - testStatus = (newdomain7.dimensions == 11) && testStatus; - testStatus = (newdomain7a.dimensions == 13) && testStatus; - reportResults(testNumber++,"Empty Construtor ",testStatus); - - //---------------------------------------------------------------------- - // Test Combine Construtor - //---------------------------------------------------------------------- - testStatus = (newdomain2a[1] == 2 ); - testStatus = (newdomain3a[2] == R2[0]) && testStatus; - testStatus = (newdomain4a[5] == Loc<1>(2)) && testStatus ; - testStatus = (newdomain5a[4] == Loc<1>(999))&& testStatus ; - testStatus = (newdomain6a[12] == D2) && testStatus; - //testStatus = (newdomain7a[11] == Range<1>(-100,100,20)) && testStatus; - reportResults(testNumber++,"Combine Construtor ",testStatus); - - //---------------------------------------------------------------------- - // Test Fill Construtor - //---------------------------------------------------------------------- - NewDomain2,int>::fill(newdomain2,D1,2); - testStatus = (newdomain2a ==newdomain2 ); - NewDomain6,Range<2>,int,Loc<4>,Loc<4>,int>::fill - ( newdomain6,newdomain2a,R1,99,Loc<4>(newdomain2a,newdomain2a),Loc<4> - (newdomain2a,newdomain2a),999); - testStatus = (newdomain6a ==newdomain6 ) && testStatus; - NewDomain5,Range<2>,int,Loc<4>,int>::fill( - newdomain5,newdomain2a,R2,999,Loc<4>(D1,D2,newdomain2a),999); - testStatus = (newdomain5a == newdomain5) && testStatus ; - reportResults(testNumber++,"Fill Construtor ",testStatus); - } // end try - - catch (const char *err) - { uncaughtErrorReport(err,testNumber); } - catch(const Pooma::Assertion &err) - {uncaughtErrorReport(err.what(),testNumber); } - catch(...) - { cerr << "Unknow exception!" << endl; } - cout << endl; - - - } - - - - - - - - --- 0 ---- Index: Domain/Range/Constructors/RangeConstructor.cpp =================================================================== RCS file: RangeConstructor.cpp diff -N RangeConstructor.cpp *** /tmp/cvspsACMW Thu Oct 4 12:11:21 2001 --- /dev/null Fri Mar 23 21:37:44 2001 *************** *** 1,217 **** - // -*- C++ -*- - //-------------------------------------------------------------------- - - // Range Constructor Component Test Code - //-------------------------------------------------------------------- - - // include files - - #include "Pooma/Pooma.h" - #include "Domain/Loc.h" - #include "Domain/Range.h" - #include "Domain/Interval.h" - #include - #include - #include - - void reportResults(int n, char *test, bool testStatus) - { - char* statusString = "passed"; - if(!testStatus) statusString = "failed"; - cout << " Test " << setw(3) << n << ", " - << setw(10) << test << ": " << statusString << "\n"; - } - - void uncaughtErrorReport(const char *what, int n) - { - cerr << "\nAck! Caught assertion during test # " << n << ":" << endl; - cerr << what << endl; - } - - - main(int argc, char *argv[]) { - - Pooma::initialize( argc, argv ); - - int debug = 0; - int testNumber = 0; - bool testStatus; - - if ((argc > 1) && (!strcmp(argv[1],"-d"))) debug = 1; - - - cout << "\n" - << " ==============================================================\n" - << " Domain test for Constructors on Range object \n" - << " ==============================================================\n" - << endl; - - if (debug){ - cout << "=========================DEBUG===================================" - << endl; - cout << "Range represents a sequence of integers [a,a+s,... b], with " - << endl; - cout << "endpoints a and b, and stride s. Each dimension is independent" - << endl; - cout << "of the other. The endpoints may be positive or negative." << endl; - cout << endl; - cout << "If you construct a Range with 2 dimensions [Range<2> a2i]" << endl; - cout << "and only give it one value [Range<2> a2ia(1))] the second dimension" << endl; - cout << "value will not be intitalized to 0 but will have ramdom junk. I" - << endl; - cout << "have not come up with a way to do a pass/fail on the feature." - << endl; - cout << "Float and Double values are truncated." << endl; - } - - Range<1> a1(1); - Range<1> a2(-3); - Range<1> a3(3); - Range<1> a4(4); - Range<1> a5(-5); - Range<1> a6(6); - - Range<1> a1i(1); - Range<1> a1ia(1,5); - Range<1> a1ib(0,5); - Range<1> a1ic(0,6,2); - Range<1> a1id(2,8,-3); - Range<1> a1ie(0,10,2); - Range<1> a1if(1,1001,100); - - - - if (debug){ - cout << "Range<1> Length Constructor for test."<< endl; - cout << " 1D default Range<1> a1(1) " << a1 << endl; - cout << " 1D default Range<1> a2(-3) " << a2 << endl; - cout << " 1D default Range<1> a3(3) " << a3 << endl; - cout << " 1D default Range<1> a4(4) " << a4 << endl; - cout << " 1D default Range<1> a5(-5) " << a5 << endl; - cout << " 1D default Range<1> a6(6) " << a6 << endl; - cout << " 1D default Range<1> a1i(1) " << a1i << endl; - cout << " 1D default Range<1> a1ia(1,5) " << a1ia << endl; - cout << " 1D default Range<1> a1ib(0,5) " << a1ib << endl; - cout << " 1D default Range<1> a1ic(0,6,2) " << a1ic << endl; - cout << " 1D default Range<1> a1id(2,8,-3) " << a1id << endl; - cout << " 1D default Range<1> a1ie(0,10,2) " << a1ie << endl; - cout << " 1D default Range<1> a1if(1,1001,100) " << a1if << endl; - cout << endl; - } - - Range<1> n1(-100); - Range<2> n2(Range<1>(-100,100,10),Range<1>(100,-100,10)); - Range<3> n3(n2,a1); - - Range<1> b1(a1if); - Range<2> b2(b1,a1); - Range<3> b3(b2,a3); - Range<4> b4(b3,a4); - Range<5> b5(b4,Range<1>(1,5)); - Range<6> b6(b5,a6); - - Loc<1> L1; - L1 = 3; - Interval<1> I1(1,5); - Interval<2> I2(Interval<1>(0,200),I1); - Range<2> RL2(L1,b1); - Range<3> RL3(RL2,L1); - Range<4> RL4(RL3,I1); - Range<5> RL5(I2,RL3); - - Loc<1> NL1; - NL1 = -3; - Interval<1> NI1(-1,5); - Interval<1> NI1a(-10,-5); - Interval<2> NI2(NI1,NI1a); - Range<2> NRL2(NI1,Interval<1>(-6,0)); - Range<3> NRL3(NRL2,NI1a); - Range<5> NRL5(NL1,NRL2,NI1a); - double D2 = 234.877; - float F1 = 123.5464; - Interval<1> FI1(-1,F1); - Interval<1> DI2(-100,D2); - Interval<3> DI3(FI1,Interval<2>(FI1,DI2)); - - Range<6> FDR6(DI3,NI1a, DI2); - - if (debug){ - cout << " 1D default Range<1> b1(a1if) " << b1 << endl; - cout << " 2D default Range<2> b2(b1,a1) " << b2 << endl; - cout << " 3D default Range<3> b3(b2,a3) " << b3 << endl; - cout << " 4D default Range<4> b4(b3,a4) " << endl; - cout << " " << b4 << endl; - cout << " 5D default Range<5> b5(b4,Range<1>(1,5)) " << endl; - cout << " " << b5 << endl; - cout << " 6D default Range<6> b6(b5,a6) " << endl; - cout << " " << b6 << endl; - cout << " 1D Negative Range<1> n1(-100) " << n1 << endl; - cout << " 2D Negative Range<2> n2(Range<1>(-100,100,10)," << endl; - cout << " Range<1>(100,-100,10)) " << n2 << endl; - cout << " 3D Negative Range<3> n3(n2,a1) " << endl; - cout << " " << n3 << endl; - - cout << " 2D Mixed object Range<2> RL2(Loc<1> L1,Range<2>b1 " << endl; - cout << " " << RL2 << endl; - cout << " 3D Mixed object Range<3> RL3(RL1,L1) " << endl; - cout << " " << RL3 << endl; - cout << " 4D Mixed object Range<4> RL4(RL3,I1) = " << endl; - cout << " " << RL4 << endl; - cout << " 5D Mixed object Range<5> RL5(I2,RL3) " << endl; - cout << " " << RL5 << endl; - cout << " 2D Mixed object Negative Range<2> NRL2(NI1,Interval<1>(-6,0)) "<< endl; - cout << " " << NRL2 << endl; - cout << " 3D Mixed object Negative Range<3> NRL3(NRL2,NI1a) " << endl; - cout << " " << NRL3 << endl; - cout << " 5D Mixed object Negative Range<5> NRL5(NL1,NRL2,NI1a) " - << endl; - cout << " " << NRL5 << endl; - cout << " 6D Mixed object DF Range<6> FDR6(DI3,NI1a, DI2) " - << endl; - cout << " " << FDR6 << endl; - cout << "=========================END DEBUG============================" - << endl; - cout << endl; - } - try { - testStatus = (a3 == Range<1>(3)); - testStatus = (a1ic == Range<1>(0,6,2)) && testStatus; - testStatus = (a1ie == Range<1>(0,10,2)) && testStatus; - reportResults(testNumber++,"Default Construtor ",testStatus); - testStatus = (n1[0] == Range<1>(-100)) && testStatus; - testStatus = (n2[1] == Range<1>(100,-100,10)) && testStatus ; - testStatus = (n3[1] ==Range<1>(100,-100,10))&& testStatus ; - reportResults(testNumber++,"Negative Construtor ",testStatus); - testStatus = (b1 == a1if) && testStatus ; - testStatus = (b2[0] == b1) && testStatus; - testStatus = (b3[2] == a3) && testStatus; - testStatus = (b4[3] == a4 ) && testStatus; - testStatus = (b5[4] == a1ia) && testStatus; - testStatus = (b6[5] == a6) && testStatus; - reportResults(testNumber++,"Multiple Construtor ",testStatus); - testStatus = (RL2[0] == L1) && testStatus; - testStatus = (RL3[2] == L1) && testStatus; - reportResults(testNumber++,"Mixed Loc Constructor ",testStatus); - testStatus = (RL4[3] == I1) && testStatus; - testStatus = (RL5[1] == I1) && testStatus; - reportResults(testNumber++,"Mixed Intergal Constructor ",testStatus); - testStatus = (NRL2[0] == NI1) && testStatus; - testStatus = (NRL3[2] == NI1a) && testStatus; - reportResults(testNumber++,"Mixed Intergal Negative Constructor",testStatus); - testStatus = (NRL5[0] == NL1) && testStatus; - reportResults(testNumber++,"Mixed Loc Negative Constructor ",testStatus); - testStatus = (FDR6[0] == FI1) && testStatus; - reportResults(testNumber++,"Mixed Float/Double Constructor ",testStatus); - } - - catch (const char *err) - { uncaughtErrorReport(err,testNumber); } - catch(const Pooma::Assertion &err) - {uncaughtErrorReport(err.what(),testNumber); } - catch(...) - { cerr << "Unknown exception!" << endl; } - cout << endl; - - Pooma::finalize(); - } - --- 0 ---- Index: Domain/Range/Constructors/makefile =================================================================== RCS file: makefile diff -N makefile *** /tmp/cvsbALR67 Thu Oct 4 12:11:21 2001 --- /dev/null Fri Mar 23 21:37:44 2001 *************** *** 1,11 **** - # Generated by mm.pl: Mon Mar 9 13:58:39 MST 1998 - # This file is user-editable - - PROJECT_ROOT = $(shell cd ../../../..; pwd) - include $(PROJECT_ROOT)/config/head.mk - - default:: $(ODIR)/RangeConstructor - - $(ODIR)/RangeConstructor: $(ODIR)/RangeConstructor.o - $(LinkToSuite) - include $(SHARED_ROOT)/tail.mk --- 0 ---- Index: Engine/BrickEngine/BrickEngine/BrickEngineTest.cpp =================================================================== RCS file: BrickEngineTest.cpp diff -N BrickEngineTest.cpp *** /tmp/cvsVvudrj Thu Oct 4 12:11:21 2001 --- /dev/null Fri Mar 23 21:37:44 2001 *************** *** 1,3319 **** - // ACL:license - // ---------------------------------------------------------------------- - // This software and ancillary information (herein called "SOFTWARE") - // called POOMA (Parallel Object-Oriented Methods and Applications) is - // made available under the terms described here. The SOFTWARE has been - // approved for release with associated LA-CC Number LA-CC-98-65. - // - // Unless otherwise indicated, this SOFTWARE has been authored by an - // employee or employees of the University of California, operator of the - // Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with - // the U.S. Department of Energy. The U.S. Government has rights to use, - // reproduce, and distribute this SOFTWARE, and to allow others to do so. - // The public may copy and use this SOFTWARE, FOR NONCOMMERCIAL USE ONLY, - // without charge, provided that this Notice and any statement of - // authorship are reproduced on all copies. Neither the Government nor - // the University makes any warranty, express or implied, or assumes any - // liability or responsibility for the use of this SOFTWARE. - // - // If SOFTWARE is modified to produce derivative works, such modified - // SOFTWARE should be clearly marked, so as not to confuse it with the - // version available from LANL. - // - // For more information about POOMA, send e-mail to pooma at acl.lanl.gov, - // or visit the POOMA web page at http://www.acl.lanl.gov/pooma/. - // ---------------------------------------------------------------------- - // ACL:license - - //----------------------------------------------------------------------------- - // The POOMA Framework - // - // This program was prepared by the Regents of the University of California - // at Los Alamos National Laboratory (the University) under Contract No. - // W-7405-ENG-36 with the U.S. Department of Energy (DOE). The University has - // certain rights in the program pursuant to the contract and the program - // should not be copied or distributed outside your organization. All rights - // in the program are reserved by the DOE and the University. Neither the U.S. - // Government nor the University makes any warranty, express or implied, or - // assumes any liability or responsibility for the use of this software - // - // Visit http://www.acl.lanl.gov/POOMA for more details - // - //----------------------------------------------------------------------------- - // Engine Component Test Code - //----------------------------------------------------------------------------- - // - // Classes: - // Brick - Brick-Engine specialization tag. - // BrickView - BrickView-Engine specialization tag. - // Engine - the "Brick-Engine" specialization. - // Engine - the "BrickView-Engine" specialization. - // NewEngine - specializations for BrickView-Engine. - // ElementProperties > - specialization for BrickEngine. - // - //----------------------------------------------------------------------------- - - #include "Pooma/Pooma.h" - #include "Engine/BrickEngine.h" - #include - #include - #include - #include - - //----------------------------------------------------------------------------- - // Simple particle class providing non-standard type for testing - // BrickEngine constructors. As specified in the Engine SRS, Atom - // provides the minimal required copy constructor and assignment operator. - //----------------------------------------------------------------------------- - - class Atom - { - public: - - //============================================================ - // Constructors, Destructor, Assignment... - //============================================================ - - // default construtor is required by RefCountedBlockPtr, which is - // used by Engine, so we supply this... - - Atom() - { - N_m = 0; - Z_m = 0; - mass_m = 0.0; - } - - Atom(int N, int Z, double mass) - { - N_m = N; - Z_m = Z; - mass_m = mass; - } - - Atom(const Atom &model) - { - N_m = model.N_m; - Z_m = model.Z_m; - mass_m = model.mass_m; - } - - Atom & operator=(const Atom &model) - { - if (&model == this) return *this; - N_m = model.N_m; - Z_m = model.Z_m; - mass_m = model.mass_m; - return *this; - } - - ~Atom() { } - - //============================================================ - // Accessors and Mutators - //============================================================ - - int electron() { return N_m; } - int nuclear() { return Z_m; } - double amu() { return mass_m; } - - // Atom& makeOwnCopy() { return *this; } - - private: - - int N_m; - int Z_m; - double mass_m; - - }; - - - //----------------------------------------------------------------------------- - // Two generic functions (reportResults and uncaughtErrorReport) and - // two classes (TypeMatchTester and its partial specialization) - // to facilitate testing... - //----------------------------------------------------------------------------- - - int reportResults(int n, char *test, bool testStatus) - { - char* statusString = "passed"; - if(!testStatus) statusString = "failed"; - cout << " Test " << setw(3) << n << ", " - << setw(46) << test << ": " << statusString << "\n"; - return 0; - } - - void uncaughtErrorReport(const char *what, int n) - { - cerr << "\nAck! Caught assertion during test # " << n << ":" << endl; - cerr << what << endl; - } - - template // template class to test typedefs - struct TypeMatchTester - { - static const bool Result = false; - }; - - template // ... partial specialization - struct TypeMatchTester - { - static const bool Result = true; - }; - - //----------------------------------------------------------------------------- - // Wrappers for high-resolution ACLTIMER library C timers - //----------------------------------------------------------------------------- - - extern "C" - { - void dclock_init(); - double dclock(); - } - - - //----------------------------------------------------------------------------- - // Main test program - //----------------------------------------------------------------------------- - - main(int argc, char* argv[]) { - - Pooma::initialize(argc,argv); - - int testNumber; - bool testStatus; - float percent; - float trueData; - float testData; - double timeStart; - double timeEnd; - double fast; - double slow; - double diff; - double c = 2.99792458e+8; - - float Ry = 13.605698; - float zero = 0.0; - - cout << "\n" - << " =============================================================" - << "=====\n" - << " Engine Capability; BrickEngine package; BrickEngine component " - << "test\n" - << " =============================================================" - << "=====\n" << endl; - - testNumber = 0; - - try { - - // *************************** BrickEngine ***************************** - - cout << "\n BrickEngine" << endl; - cout << " -----------\n" << endl; - - typedef Engine<3,float,Brick> Engine3Df_t; - typedef Engine<2,double,Brick> Engine2Dd_t; - typedef Engine<4,double,Brick> Engine4Dd_t; - typedef Engine<6,int,Brick> Engine6Di_t; - typedef Engine<6,float,Brick> Engine6Df_t; - typedef Engine<7,int,Brick> Engine7Di_t; - - - //--------------------------------------------------------------- - // test 1: BrickEngine required POOMA typedefs properly exported? - //--------------------------------------------------------------- - - ++testNumber; - - // construct a 3D Cartesian domain [0...10] x [4...14] x [-5...+5] - // and associated BrickEngine - - Interval<3> cube2(Interval<1>(0,10), Interval<1>(4,14), Interval<1>(-5,5)); - Engine3Df_t floatBrick(cube2); - - // assign floating-point elements to cube2 Domain - - for(int i = 0; i < 11; i++) - for(int j = 4; j < 15; j++) - for(int k = -5; k < 6; k++) - floatBrick(Loc<3>(i,j,k)) = Ry*(i+j+k); - - { - typedef Engine3Df_t::This_t Try_t; - typedef Engine3Df_t Correct_t; - testStatus = TypeMatchTester::Result; - } - - { - typedef Engine3Df_t::Engine_t Try_t; - typedef Engine3Df_t::This_t Correct_t; - testStatus = TypeMatchTester::Result && testStatus; - } - - { - typedef Engine3Df_t::Domain_t Try_t; - typedef Interval<3> Correct_t; - testStatus = TypeMatchTester::Result && testStatus; - } - - reportResults(testNumber,"exported typedefs This_t, Engine_t, Domain_t", - testStatus); - - - //----------------------------------------------------------- - // test 2: additional required POOMA typedefs for BrickEngine - //----------------------------------------------------------- - - ++testNumber; - - { - typedef Engine3Df_t::Base_t Try_t; - typedef Range<3> Correct_t; - testStatus = TypeMatchTester::Result; - } - - { - typedef Engine3Df_t::Element_t Try_t; - typedef float Correct_t; - testStatus = TypeMatchTester::Result && testStatus; - } - - reportResults(testNumber,"exported typedefs BaseDomain_t, Element_t", - testStatus); - - - //----------------------------------------------------------- - // test 3: still more required POOMA typedefs for BrickEngine - //----------------------------------------------------------- - - ++testNumber; - - { - typedef Engine3Df_t::ElementRef_t Try_t; - typedef float& Correct_t; - testStatus = TypeMatchTester::Result; - } - - { - typedef Engine3Df_t::Tag_t Try_t; - typedef Brick Correct_t; - testStatus = TypeMatchTester::Result && testStatus; - } - - reportResults(testNumber,"exported typedefs ElementRef_t, Tag_t", - testStatus); - - - //------------------------------------------------------- - // test 4: BrickEngine default constructor, standard type - //------------------------------------------------------- - - ++testNumber; - - // use default constructor and BrickEngine assignment operator - - Engine3Df_t defaultBrick; - defaultBrick = floatBrick; - - // check that defaultBrick now points to the same data as floatBrick - - for(int i = 0; i < 11; i++) - for(int j = 4; j < 15; j++) - for(int k = -5; k < 6; k++) { - trueData = floatBrick.read(Loc<3>(i,j,k)); - testData = defaultBrick.read(Loc<3>(i,j,k)); - testStatus = (testData == trueData) && testStatus; - testStatus = (trueData == Ry*(i+j+k)) && testStatus; - trueData = floatBrick.read(i,j,k); - testData = defaultBrick.read(i,j,k); - testStatus = (testData == trueData) && testStatus; - testStatus = (trueData == Ry*(i+j+k)) && testStatus; - } - - reportResults(testNumber,"default constructor & assignment operator", - testStatus); - - - //------------------------------------------------------------- - // test 5: BrickEngine Interval constructor, strides() accessor - //------------------------------------------------------------- - - ++testNumber; - - Interval<1> x(-17,2); - Interval<1> y(5,29); - Interval<1> z(-36,-2); - Interval<1> t(1); - Interval<4> spaceTime(x,y,z,t); - - Engine4Dd_t lightCone(spaceTime); - const int *STstrides = lightCone.strides(); - int nomStrides[7]; - - // stride of the first dimension in the Interval should always be 1 - // (Interval stride() accessor) - - nomStrides[0] = spaceTime[0].stride(); - testStatus = (STstrides[0] == nomStrides[0]); - - // strides() array for a BrickEngine should return actual strides - // of the full Interval (BrickEngine strides() accessor). - - for(int i = 1; i < 4; i++) { - nomStrides[i] = spaceTime[i-1].last() - spaceTime[i-1].first() + 1; - nomStrides[i] = nomStrides[i] * nomStrides[i-1]; - testStatus = (STstrides[i] == nomStrides[i]) && testStatus; - } - - // set data values; incidentally test some Interval accessors - - int imin = x.first(); - int imax = x.last(); - int jmin = y.first(); - int jmax = y.last(); - int kmin = z.first(); - int kmax = z.last(); - - for(int i = imin; i < imax+1; i++) - for(int j = jmin; j < jmax+1; j++) - for(int k = kmin; k < kmax+1; k++) - lightCone(Loc<4>(i,j,k,0)) = c*((i-j)*3 +k); - - // verify data values - - for(int i = -17; i < 3; i++) - for(int j = 5; j < 30; j++) - for(int k = -36; k < -1; k++) { - testData = lightCone.read(Loc<4>(i,j,k,0)); - trueData = c* ((i-j)*3 +k); - testStatus = (testData == trueData) && testStatus; - } - - reportResults(testNumber,"Interval constructor; strides accessor", - testStatus); - - - //---------------------------------------------------- - // test 6: BrickEngine copy constructor, standard type - //---------------------------------------------------- - - ++testNumber; - Engine4Dd_t transporter(lightCone); - - diff = zero; - for(int i = -17; i < 3; i++) - for(int j = 5; j < 30; j++) - for(int k = -36; k < -1; k++) - diff += fabs(lightCone.read(Loc<4>(i,j,k,0)) - transporter.read(i,j,k,0)); - - testStatus = (diff == zero); - reportResults(testNumber,"copy constructor", - testStatus); - - - //------------------------------------------ - // test 7: BrickEngine constructor via model - //------------------------------------------ - - ++testNumber; - Engine4Dd_t scotty(spaceTime,c); - - diff = zero; - for(int i = -17; i < 3; i++) - for(int j = 5; j < 30; j++) - for(int k = -36; k < -1; k++) - diff += fabs(scotty.read(Loc<4>(i,j,k,0)) - c); - - testStatus = (diff == zero); - reportResults(testNumber,"constructor via model",testStatus); - - - //------------------------------------------------------ - // test 8: BrickEngine constructor via foreign data (1D) - //------------------------------------------------------ - - ++testNumber; - - // 1D test - - double* B = new double[10]; - for (int i = 0; i<10; i++) - B[i] = i*2.3; - - Interval<1> line(-2,7); - Engine<1,double,Brick> french(B,line); - - diff = zero; - for(int i = -2; i < 8; i++) - diff += fabs(french.read(i) - (i+2)*2.3); - - testStatus = (diff == zero); - reportResults(testNumber,"constructor via 1D foreign data",testStatus); - - - //----------------------------------------------------------- - // test 9: BrickEngine constructor via foreign data (2D & 3D) - //----------------------------------------------------------- - - ++testNumber; - - // 2D test on 2 x 10 Interval - - float* C = new float[20]; - for (int i = 0; i<2; i++) - for ( int j = 0; j < 10; j++) - C[i*10+j] = (i*2.2+j*3.1); - - Interval<2> box(Interval<1>(0,1), Interval<1>(0,9)); - Engine<2,float,Brick> norwegian(C,box); - - - // (i,j) loop order is reversed here to emphasize the fact that - // POOMA II Engines index according to Fortran order (left-most index - // varies fastest, etc.). Note C-style indexing of array C. - - diff = zero; - for ( int j = 0; j < 10; j++) - for( int i = 0; i < 2; i++) - diff += fabs(norwegian.read(i,j) - C[i+2*j]); - - testStatus = (diff == zero); - - - // 3D test on 4 x 3 x 2 Interval (zero-based) - - float* G = new float[24]; - Interval<3> cubic(Interval<1>(0,3), Interval<1>(0,2), Interval<1>(0,1)); - Engine<3,float,Brick> dutch(G,cubic); - - for (int i = 0; i<4; i++) - for (int j = 0; j<3; j++) - for (int k = 0; k<2; k++) { - int ind = i*6 + j*2 + k; - G[ind] = 2.2*i + 3.1*j + 1.4*k; - } - - diff = zero; - for(int k = 0; k < 2; k++) - for(int j = 0; j < 3; j++) - for(int i = 0; i < 4; i++) { - int ind = k*12 + j*4 + i; - diff += fabs(dutch.read(i,j,k) - G[ind]); - } - - testStatus = (diff == zero) && testStatus; - - - // 3D test on 11 x 11 x 11 Interval (non-zero-based) - - float* A = new float[1331]; - for (int i = 0; i<11; i++) - for (int j = 0; j<11; j++) - for (int k = 0; k<11; k++) { - int ind = i*121 + j*11 + k; - A[ind] = 2.2*i + 3.1*j + 1.4*k; - } - - Engine3Df_t italian(A,cube2); - - diff = zero; - for(int k = -5; k < 6; k++) - for(int j = 4; j < 15; j++) - for(int i = 0; i < 11; i++) { - int ind = (k+5)*121 + (j-4)*11 + i; - diff += fabs(italian.read(i,j,k) - A[ind]); - } - - testStatus = (diff == zero) && testStatus; - - reportResults(testNumber,"constructor via 2D/3D foreign data", - testStatus); - - - //------------------------------------------------- - // test 10: BrickEngine constructor via Node object - //------------------------------------------------- - - ++testNumber; - - // Construct a simple Node with affinity = -1, Interval Domain, - // context = local ID = global ID = 0. - - Interval<1> point(4,12); - Interval<6> star(point,point,point,point,point,point); - Node > k(-1,star,0,0,0); - Engine6Di_t BZone(k); - Engine6Di_t BZone2(star,17); - BZone = BZone2; - - diff = zero; - for(int i = 4; i < 13; i++) - for(int j = 4; j < 13; j++) - for(int k = 4; k < 13; k++) - for(int l = 4; l < 13; l++) - for(int m = 4; m < 13; m++) - for(int n = 4; n < 13; n++) - diff += abs(BZone.read(i,j,k,l,m,n) - 17); - - testStatus = (diff == zero); - reportResults(testNumber,"constructor via Node object", testStatus); - - - //----------------------------------------- - // test 11: BrickEngine assignment operator - //----------------------------------------- - - ++testNumber; - - Engine4Dd_t geordi; - geordi = scotty; - - diff = zero; - for(int i = -17; i < 2; i++) - for(int j = 5; j < 29; j++) - for(int k = -36; k < -2; k++) - diff += fabs(geordi.read(i,j,k,0) - c); - - testStatus = (diff == zero); - reportResults(testNumber,"assignment operator",testStatus); - - - //--------------------------------------------------- - // test 12: BrickEngine read(int) accessors, dims 1-7 - //--------------------------------------------------- - - ++testNumber; - - // POOMA II supports Domains with dim <= 7 - - Interval<1> I0(-3,3); - Interval<1> J0(6,12); - Interval<1> I1(I0); - Engine<1,float,Brick> xxx1(I1,Ry); - - Interval<2> I2(I1,J0); - Engine<2,float,Brick> xxx2(I2,Ry*2); - - Interval<3> I3(I2,I0); - Engine<3,float,Brick> xxx3(I3,Ry*3); - - Interval<4> I4(I3,J0); - Engine<4,float,Brick> xxx4(I4,Ry*4); - - Interval<5> I5(I4,I0); - Engine<5,float,Brick> xxx5(I5,Ry*5); - - Interval<6> I6(I5,J0); - Engine<6,float,Brick> xxx6(I6,Ry*6); - - Interval<7> I7(I6,I0); - Engine<7,float,Brick> xxx7(I7,Ry*7); - - diff = zero; - for(int i = -3; i < 3; i++) { - diff += fabs(xxx1.read(i) - Ry); - for(int j = 6; j < 12; j++) { - diff += fabs(xxx2.read(i,j) - Ry*2); - for(int k = -3; k < 3; k++) { - diff += fabs(xxx3.read(i,j,k) - Ry*3); - for(int l = 6; l < 12; l++) { - diff += fabs(xxx4.read(i,j,k,l) - Ry*4); - for(int m = -3; m < 3; m++) { - diff += fabs(xxx5.read(i,j,k,l,m) - Ry*5); - for(int n = 6; n < 12; n++) { - diff += fabs(xxx6.read(i,j,k,l,m,n) - Ry*6); - for(int p = -3; p < 3; p++) { - diff += fabs(xxx7.read(i,j,k,l,m,n,p) - Ry*7); - } - } - } - } - } - } - } - - testStatus = (diff == zero); - reportResults(testNumber,"int read element accessors, dims 1-7", - testStatus); - - - //-------------------------------------------------------- - // test 13: BrickEngine read(Loc) accessors, dims 1-7 - //-------------------------------------------------------- - - ++testNumber; - - diff = zero; - for(int i = -3; i < 3; i++) { - diff += fabs(xxx1.read(Loc<1>(i)) - Ry); - for(int j = 6; j < 12; j++) { - diff += fabs(xxx2.read(Loc<2>(i,j)) - Ry*2); - for(int k = -3; k < 3; k++) { - diff += fabs(xxx3.read(Loc<3>(i,j,k)) - Ry*3); - for(int l = 6; l < 12; l++) { - diff += fabs(xxx4.read(Loc<4>(i,j,k,l)) - Ry*4); - for(int m = -3; m < 3; m++) { - diff += fabs(xxx5.read(Loc<5>(i,j,k,l,m)) - Ry*5); - for(int n = 6; n < 12; n++) { - diff += fabs(xxx6.read(Loc<6>(i,j,k,l,m,n)) - Ry*6); - for(int p = -3; p < 3; p++) { - diff += fabs(xxx7.read(Loc<7>(i,j,k,l,m,n,p)) - Ry*7); - } - } - } - } - } - } - } - - testStatus = (diff == zero); - reportResults(testNumber,"Loc read element accessors, dims 1-7", - testStatus); - - - //------------------------------------------------------------ - // test 14: BrickEngine operator() element accessors, dims 1-7 - //------------------------------------------------------------ - - ++testNumber; - - diff = zero; - for(int i = -3; i < 3; i++) { - diff += fabs(xxx1(i) - Ry); - for(int j = 6; j < 12; j++) { - diff += fabs(xxx2(i,j) - Ry*2); - for(int k = -3; k < 3; k++) { - diff += fabs(xxx3(i,j,k) - Ry*3); - for(int l = 6; l < 12; l++) { - diff += fabs(xxx4(i,j,k,l) - Ry*4); - for(int m = -3; m < 3; m++) { - diff += fabs(xxx5(i,j,k,l,m) - Ry*5); - for(int n = 6; n < 12; n++) { - diff += fabs(xxx6(i,j,k,l,m,n) - Ry*6); - for(int p = -3; p < 3; p++) { - diff += fabs(xxx7(i,j,k,l,m,n,p) - Ry*7); - } - } - } - } - } - } - } - - testStatus = (diff == zero); - reportResults(testNumber,"operator() element accessors, dims 1-7", - testStatus); - - /******************************************************************************* - - // this test requires the implementation of an appropriate - // PAssert to catch and report the dimension violation, at - // which point it can be un-commented. - - // Upon un-commenting, remove the increment of testNumber immediately - // following this test. The increment is needed to keep the test - // numbers the same as the test labels. - - //----------------------------------------------------------- - // test 15: BrickEngine underlying Domain dimension violation - //----------------------------------------------------------- - - ++testNumber; - - try { - Interval<8> I8(I7,I0); - Engine<8,float,Brick> xxx8(I8,Ry*8); - diff = xxx8.read(0,0,0,0,0,0,0,0) - pi*8; - throw reportResults(testNumber,"underlying Domain dimension violation",false); - } - catch(const Pooma::Assertion &) {reportResults(testNumber, - "underlying Domain dimension violation",true);} - - // the real work is done by 'throw' inside try block; this prevents - // falling-through to outer 'try' block, and generation of - // "unknown exception" message. - - catch(...) { } - - *******************************************************************************/ - ++testNumber; // remove upon activating test 15. - - //------------------------------------------------------------- - // test 16: performance of element access via ints vs. Loc - //------------------------------------------------------------- - - ++testNumber; - - // initialize hi-resolution timer - - dclock_init(); - - char* str1 = new char[43]; - int l = 0; - - for(int i = -17; i < 2; i++) - for(int j = 5; j < 29; j++) - for(int k = -36; k < -2; k++) - lightCone(Loc<4>(i,j,k,l)) = Ry+i+j+k; - - timeStart = dclock(); - for(int i = -17; i < 2; i++) - for(int j = 5; j < 29; j++) - for(int k = -36; k < -2; k++) - testData = lightCone.read(i,j,k,l); - - timeEnd = dclock(); - fast = timeEnd - timeStart; - - timeStart = dclock(); - for(int i = -17; i < 2; i++) - for(int j = 5; j < 29; j++) - for(int k = -36; k < -2; k++) - testData = lightCone.read(Loc<4>(i,j,k,l)); - - timeEnd = dclock(); - slow = timeEnd - timeStart; - - percent = (slow - fast) * 100.0/slow; - sprintf(str1,"%34s%3.1f%1s", - "int/Loc elt access; relative perf = ",percent,"%"); - testStatus = (fast < slow); - reportResults(testNumber,str1,testStatus); - delete str1; - - - //--------------------------------------- - // test 17: BrickEngine domain() accessor - //--------------------------------------- - - ++testNumber; - Interval<3> d1 = floatBrick.domain(); - testStatus = (d1[0].first() == cube2[0].first()) && - (d1[0].last() == cube2[0].last()) && - (d1[0].length() == cube2[0].length()) && - (d1[1].first() == cube2[1].first()) && - (d1[1].last() == cube2[1].last()) && - (d1[1].length() == cube2[1].length()) && - (d1[2].first() == cube2[2].first()) && - (d1[2].last() == cube2[2].last()) && - (d1[2].length() == cube2[2].length()); - - Interval<4> d2 = lightCone.domain(); - testStatus = (d2[0].first() == spaceTime[0].first()) && - (d2[0].last() == spaceTime[0].last()) && - (d2[0].length() == spaceTime[0].length()) && - (d2[1].first() == spaceTime[1].first()) && - (d2[1].last() == spaceTime[1].last()) && - (d2[1].length() == spaceTime[1].length()) && - (d2[2].first() == spaceTime[2].first()) && - (d2[2].last() == spaceTime[2].last()) && - (d2[2].length() == spaceTime[2].length()) && - (d2[3].first() == spaceTime[3].first()) && - (d2[3].last() == spaceTime[3].last()) && - (d2[3].length() == spaceTime[3].length()) && testStatus; - - Interval<7> d3 = xxx7.domain(); - testStatus = (d3[0].first() == I7[0].first()) && - (d3[0].last() == I7[0].last()) && - (d3[0].length() == I7[0].length()) && - (d3[6].first() == I7[6].first()) && - (d3[6].last() == I7[6].last()) && - (d3[6].length() == I7[6].length()) && testStatus; - - reportResults(testNumber,"domain() accessor",testStatus); - - - //------------------------------------------- - // test 18: BrickEngine baseDomain() accessor - //------------------------------------------- - - ++testNumber; - - // baseDomain should be identical to Domain for BrickEngine, - // since no subsetting has occurred. That is, baseDomain - // simply returns the Interval Domain of the Engine, - // re-cast as a Range. - - Range<3> d4 = italian.baseDomain(); - testStatus = (d4[0].first() == cube2[0].first()) && - (d4[0].last() == cube2[0].last()) && - (d4[0].length() == cube2[0].length()) && - (d4[1].first() == cube2[1].first()) && - (d4[1].last() == cube2[1].last()) && - (d4[1].length() == cube2[1].length()) && - (d4[2].first() == cube2[2].first()) && - (d4[2].last() == cube2[2].last()) && - (d4[2].length() == cube2[2].length()); - - Range<4> d5 = transporter.baseDomain(); - testStatus = (d5[0].first() == spaceTime[0].first()) && - (d5[0].last() == spaceTime[0].last()) && - (d5[0].length() == spaceTime[0].length()) && - (d5[1].first() == spaceTime[1].first()) && - (d5[1].last() == spaceTime[1].last()) && - (d5[1].length() == spaceTime[1].length()) && - (d5[2].first() == spaceTime[2].first()) && - (d5[2].last() == spaceTime[2].last()) && - (d5[2].length() == spaceTime[2].length()) && - (d5[3].first() == spaceTime[3].first()) && - (d5[3].last() == spaceTime[3].last()) && - (d5[3].length() == spaceTime[3].length()) && testStatus; - - Range<5> d6 = xxx5.baseDomain(); - testStatus = (d6[2].first() == I5[2].first()) && - (d6[2].last() == I5[2].last()) && - (d6[2].length() == I5[2].length()) && - (d6[4].first() == I5[4].first()) && - (d6[4].last() == I5[4].last()) && - (d6[4].length() == I5[4].length()) && testStatus; - - reportResults(testNumber,"baseDomain() accessor",testStatus); - - - //-------------------------------------------- - // test 19: BrickEngine makeOwnCopy() function - //-------------------------------------------- - - ++testNumber; - geordi(-12,0,32,0) = Ry; - diff = (geordi(-12,0,32,0) - scotty(-12,0,32,0)); - testStatus = (diff == zero); - - diff = (geordi(1,28,-30,0) - c); - testStatus = (diff == zero) && testStatus; - - geordi.makeOwnCopy(); - geordi(-12,0,32,0) = Ry*2; - diff = (geordi(-12,0,32,0) - 2*scotty(-12,0,32,0)); - testStatus = (diff == zero) && testStatus; - - reportResults(testNumber,"makeOwnCopy() function",testStatus); - - - //------------------------------------------------------------------- - // test 20: BrickEngine Interval constructor, strides(); non-std type - //------------------------------------------------------------------- - - ++testNumber; - - // construct a 6 x 7 Interval IJ, and put a different particle at each - // location in the Range. Incidentally test some features of - // Intervals. Note that BrickEngine requires a unit-stride Domain. - - Interval<2> IJ(Interval<1>(0,5), Interval<1>(-6,0)); - int IJsize = IJ.size(); - const int IJmax = 42; - testStatus = (IJsize == IJmax); - - int Imin = IJ[0].first(); - int Imax = IJ[0].last(); - int Istr = IJ[0].stride(); - int Ilen = IJ[0].length(); - testStatus = (Imin == 0) && (Imax == 5) && testStatus; - testStatus = (Istr == 1) && (Ilen == 6) && testStatus; - - int Jmin = IJ[1].first(); - int Jmax = IJ[1].last(); - int Jstr = IJ[1].stride(); - int Jlen = IJ[1].length(); - testStatus = (Jmin == -6) && (Jmax == 0) && testStatus; - testStatus = (Jstr == 1) && (Jlen == 7) && testStatus; - - // construct 42 distinct Atoms and store them in the array Ar[IJsize] - - int NEl; - int NChg; - double Mass; - int knt = 0; - - Atom* Ar[IJmax]; - for (int i=Imin; ielectron() == NEl) && testStatus; - knt++; - } - - testStatus = (knt == IJsize) && testStatus; - - // construct a 2D BrickEngine to manage the Ar Atoms over the IJ Range - - Engine<2,Atom,Brick> ArEngine(IJ); - - diff = zero; - knt = 0; - - for (int i=Imin; i(i,j)) = *(Ar[knt]); - diff += fabsf(ArEngine.read(i,j).amu() - (abs(i+j)+5)*4.44 ); - knt++; - } - - testStatus = (diff == zero) && testStatus; - - // test BrickEngine strides() accessor. Should return - // actual strides of underlying 2D Interval - - STstrides = ArEngine.strides(); - nomStrides[0] = 1; - nomStrides[1] = Imax-Imin+1; - testStatus = (STstrides[0] == nomStrides[0]) && testStatus; - testStatus = (STstrides[1] == nomStrides[1]) && testStatus; - - reportResults(testNumber,"Interval constr/strides(); non-std type", - testStatus); - - - //------------------------------------------------------------ - // test 21: BrickEngine default constructor, non-standard type - //------------------------------------------------------------ - - ++testNumber; - Engine<2,Atom,Brick> defaultAr; - defaultAr = ArEngine; - - for (int i=Imin; i dupAr(ArEngine); - - diff = zero; - for (int i=Imin; i(i,j)).nuclear() - (abs(i+j)+5)*2 ); - knt++; - } - - testStatus = (diff == zero); - reportResults(testNumber,"copy constructor; non-std type", - testStatus); - - - //-------------------------------------------------------------- - // test 23: BrickEngine constructor via model, non-standard type - //-------------------------------------------------------------- - - ++testNumber; - Interval<3> IJK(IJ,Interval<1>(2,14)); - Engine<3,Atom,Brick> ArToo(IJK,*(Ar[30])); - - Imin = IJK[0].first(); - Imax = IJK[0].last(); - Jmin = IJK[1].first(); - Jmax = IJK[1].last(); - int Kmin = IJK[2].first(); - int Kmax = IJK[2].last(); - - diff = zero; - for (int i=Imin; i Balmer(3,19); - Engine<1,Atom,Brick> jovian(H,Balmer); - - diff = zero; - for(int i = 3; i < 20; i++) { - diff += abs( jovian.read(Loc<1>(i)).electron() - (int)Ry*(i-3) ); - diff += fabs( jovian.read(i).amu() - ((int)Ry*(i-3)*2-i+7) ); - } - - testStatus = (diff == zero) && testStatus; - reportResults(testNumber,"constructor via 1D foreign data; non-std type", - testStatus); - - - //--------------------------------------------------------------- - // test 25: BrickEngine constructor via Node object, non-std type - //--------------------------------------------------------------- - - ++testNumber; - - Engine<6,Atom,Brick> Energy(k); - Engine<6,Atom,Brick> Energy2(star,H[16]); - Energy = Energy2; - - diff = zero; - for(int i = 4; i < 13; i++) - for(int j = 4; j < 13; j++) - for(int k = 4; k < 13; k++) - for(int l = 4; l < 13; l++) - for(int m = 4; m < 13; m++) - for(int n = 4; n < 13; n++) - diff += abs( Energy.read(i,j,k,l,m,n).nuclear() - ((int)Ry)*16*2 ); - - testStatus = (diff == zero); - reportResults(testNumber,"constructor via Node object; non-std type", - testStatus); - - - //------------------------------------------------------- - // test 26: BrickEngine assignment operator, non-std type - //------------------------------------------------------- - - ++testNumber; - Engine<3,Atom,Brick> Ne; - Ne = ArToo; - - diff = zero; - for (int i=Imin; i d7 = jovian.domain(); - testStatus = (d7[0].first() == Balmer.first()) && - (d7[0].last() == Balmer.last()) && - (d7[0].length() == Balmer.length()); - - Interval<2> d8 = ArEngine.domain(); - testStatus = (d8[0].first() == IJ[0].first()) && - (d8[0].last() == IJ[0].last()) && - (d8[0].length() == IJ[0].length()) && - (d8[1].first() == IJ[1].first()) && - (d8[1].last() == IJ[1].last()) && - (d8[1].length() == IJ[1].length()) && testStatus; - - Interval<6> d9 = Energy.domain(); - testStatus = (d9[3].first() == star[3].first()) && - (d9[3].last() == star[3].last()) && - (d9[3].length() == star[3].length()) && - (d9[5].first() == star[5].first()) && - (d9[5].last() == star[5].last()) && - (d9[5].length() == star[5].length()) && testStatus; - - reportResults(testNumber,"domain() accessor; non-std type", - testStatus); - - - //--------------------------------------------------------- - // test 28: BrickEngine baseDomain() accessor, non-std type - //--------------------------------------------------------- - - ++testNumber; - - // Again, baseDomain should be identical to Domain for BrickEngine, - // since no subsetting has occurred. - - Range<2> d10 = dupAr.domain(); - testStatus = (d10[0].first() == IJ[0].first()) && - (d10[0].last() == IJ[0].last()) && - (d10[0].length() == IJ[0].length()) && - (d10[1].first() == IJ[1].first()) && - (d10[1].last() == IJ[1].last()) && - (d10[1].length() == IJ[1].length()); - - Range<3> d11 = ArToo.domain(); - testStatus = (d11[0].first() == IJK[0].first()) && - (d11[0].last() == IJK[0].last()) && - (d11[0].length() == IJK[0].length()) && - (d11[1].first() == IJK[1].first()) && - (d11[1].last() == IJK[1].last()) && - (d11[1].length() == IJK[1].length()) && testStatus; - - - Range<6> d12 = Energy.domain(); - testStatus = (d12[3].first() == star[3].first()) && - (d12[3].last() == star[3].last()) && - (d12[3].length() == star[3].length()) && - (d12[5].first() == star[5].first()) && - (d12[5].last() == star[5].last()) && - (d12[5].length() == star[5].length()) && testStatus; - - reportResults(testNumber,"baseDomain() accessor; non-std type", - testStatus); - - - //---------------------------------------------------------- - // test 29: BrickEngine makeOwnCopy() function, non-std type - //---------------------------------------------------------- - - ++testNumber; - Ne.makeOwnCopy(); - Atom NeTemp(7.1,7.2,7.3); - Ne(3,-4,9) = NeTemp; - - diff = zero; - for (int i=Imin; i(i,j,k)).amu() - ArToo.read(i,j,k).amu()); - } - - testStatus = (diff == zero); - reportResults(testNumber,"makeOwnCopy() function; non-std type", - testStatus); - - - - // ************************* BrickViewEngine **************************** - - cout << "\n\n BrickViewEngine" << endl; - cout << " ---------------\n" << endl; - - typedef Engine<2,float,BrickView<6,false> > float2DV2_t; - typedef Engine<3,float,BrickView<3,true> > float3DV1_t; - typedef Engine<3,float,BrickView<3,false> > float3DV2_t; - typedef Engine<4,float,BrickView<6,false> > float4DV3_t; - typedef Engine<2,double,BrickView<2,true> > double2DV1_t; - typedef Engine<2,double,BrickView<2,false> > double2DV2_t; - typedef Engine<6,int,BrickView<6,true> > int6DV1_t; - typedef Engine<7,int,BrickView<7,false> > int7DV2_t; - - - - //-------------------------------------------------------------------- - // test 30: BrickViewEngine required POOMA typedefs properly exported? - //-------------------------------------------------------------------- - - ++testNumber; - - // first construct stride-1 and non-stride-1 Views of 3D cube and - // 2D square-based Engines - - Interval<1> line1(7,16); - Interval<1> line2(-1,4); - Interval<1> line3(11,16); - Interval<1> line4(-4,5); - Range<1> line5(0,6,2); - Range<1> line6(-1,5,3); - Range<1> line7(7,15,4); - - Interval<2> square(line,line1); // 10x10 Interval - Interval<3> cube(line,line4,line1); // 10x10x10 Interval - - // square1 and rectangle2 are associated with Boolean 'true' in - // BrickView, since both of these 2D Ranges have a (unit-stride) - // Interval, line2, as their first Range component. Note that - // this is true for rectangle2 even though its second Range component, - // line7, has non-unit stride (4). By contrast, rectangle1 is - // associated with Boolean 'false' in BrickView, since its first - // Range component, line5, has stride 2. - - Interval<2> square1(line2,line3); // 6x6 "T" subset of square - Range<2> rectangle1(line5,line3); // 4x6 "F" subset of square - Range<2> rectangle2(line2,line7); // 6x3 "T" subset of square - - Interval<3> cube1(line2,line2,line3); // 6x6x6 "T" subset of cube - Range<3> box1(line5,line6,line7); // 4x3x3 "F" subset of cube - Range<3> box2(line2,line6,line7); // 6x3x3 "T" subset of cube - - Engine2Dd_t Q(square); - Engine3Df_t R(cube); - - double2DV1_t BV1(Q,square1); - double2DV2_t BV2(Q,rectangle1); - double2DV2_t BV3(Q,rectangle2); - - float3DV1_t BV4(R,cube1); - float3DV2_t BV5(R,box1); - float3DV2_t BV6(R,box2); - - // populate Q with data - - Imin = line.first(); - Ilen = line.length(); - Imax = Imin + Ilen; - Jmin = line1.first(); - Jmax = line1.last() + 1; - Jlen = Jmax - Jmin; - - for (int i = Imin; i < Imax; i++) - for (int j = Jmin; j < Jmax; j++) - Q(i,j) = (i+Ry)*j + 1.1; - - // populate R with data - - int Klen; - - Imin = cube[0].first(); - Ilen = cube[0].length(); - Imax = Imin + Ilen; - Jmin = cube[1].first(); - Jmax = cube[1].last() + 1; - Jlen = Jmax - Jmin; - Kmin = cube[2].first(); - Kmax = cube[2].last() + 1; - Klen = Kmax - Kmin; - - for (int i = Imin; i < Imax; i++) - for (int j = Jmin; j < Jmax; j++) - for (int k = Kmin; k < Kmax; k++) - R(i,j,k) = i*1.1 + j*2.2 + k*3.3; - - - // now start testing various typedefs using the above BrickViewEngines - - // This_t - - { - typedef float3DV1_t::This_t Try_t; - typedef float3DV1_t Correct_t; - testStatus = TypeMatchTester::Result; - } - - { - typedef float3DV2_t::This_t Try_t; - typedef float3DV2_t Correct_t; - testStatus = TypeMatchTester::Result && testStatus; - } - - { - typedef double2DV1_t::This_t Try_t; - typedef double2DV1_t Correct_t; - testStatus = TypeMatchTester::Result && testStatus; - } - - { - typedef double2DV2_t::This_t Try_t; - typedef double2DV2_t Correct_t; - testStatus = TypeMatchTester::Result && testStatus; - } - - - // Engine_t - - { - typedef float3DV1_t::Engine_t Try_t; - typedef float3DV1_t::This_t Correct_t; - testStatus = TypeMatchTester::Result && testStatus; - } - - { - typedef float3DV2_t::Engine_t Try_t; - typedef float3DV2_t::This_t Correct_t; - testStatus = TypeMatchTester::Result && testStatus; - } - - { - typedef double2DV1_t::Engine_t Try_t; - typedef double2DV1_t::This_t Correct_t; - testStatus = TypeMatchTester::Result && testStatus; - } - - { - typedef double2DV2_t::Engine_t Try_t; - typedef double2DV2_t::This_t Correct_t; - testStatus = TypeMatchTester::Result && testStatus; - } - - - // Domain_t - - { - typedef float3DV1_t::Domain_t Try_t; - typedef Interval<3> Correct_t; - testStatus = TypeMatchTester::Result && testStatus; - } - - { - typedef float3DV2_t::Domain_t Try_t; - typedef Interval<3> Correct_t; - testStatus = TypeMatchTester::Result && testStatus; - } - - { - typedef double2DV2_t::Domain_t Try_t; - typedef Interval<2> Correct_t; - testStatus = TypeMatchTester::Result && testStatus; - } - - { - typedef double2DV2_t::Domain_t Try_t; - typedef Interval<2> Correct_t; - testStatus = TypeMatchTester::Result && testStatus; - } - - reportResults(testNumber,"exported typedefs This_t, Engine_t, Domain_t", - testStatus); - - - //---------------------------------------------------------------- - // test 31: additional required POOMA typedefs for BrickViewEngine - //---------------------------------------------------------------- - - ++testNumber; - - // BaseDomain_t - - { - typedef float3DV1_t::BaseDomain_t Try_t; - typedef Range<3> Correct_t; - testStatus = TypeMatchTester::Result; - } - - { - typedef float3DV2_t::BaseDomain_t Try_t; - typedef Range<3> Correct_t; - testStatus = TypeMatchTester::Result && testStatus; - } - - { - typedef double2DV1_t::BaseDomain_t Try_t; - typedef Range<2> Correct_t; - testStatus = TypeMatchTester::Result && testStatus; - } - - { - typedef double2DV2_t::BaseDomain_t Try_t; - typedef Range<2> Correct_t; - testStatus = TypeMatchTester::Result && testStatus; - } - - // Element_t - - { - typedef float3DV1_t::Element_t Try_t; - typedef float Correct_t; - testStatus = TypeMatchTester::Result && testStatus; - } - - { - typedef float3DV2_t::Element_t Try_t; - typedef float Correct_t; - testStatus = TypeMatchTester::Result && testStatus; - } - - { - typedef double2DV1_t::Element_t Try_t; - typedef double Correct_t; - testStatus = TypeMatchTester::Result && testStatus; - } - - { - typedef double2DV2_t::Element_t Try_t; - typedef double Correct_t; - testStatus = TypeMatchTester::Result && testStatus; - } - - reportResults(testNumber,"exported typedefs BaseDomain_t, Element_t", - testStatus); - - - //---------------------------------------------------------------- - // test 32: still more required POOMA typedefs for BrickViewEngine - //---------------------------------------------------------------- - - ++testNumber; - - // ElementRef_t - - { - typedef float3DV1_t::ElementRef_t Try_t; - typedef float& Correct_t; - testStatus = TypeMatchTester::Result; - } - - { - typedef float3DV2_t::ElementRef_t Try_t; - typedef float& Correct_t; - testStatus = TypeMatchTester::Result && testStatus; - } - - { - typedef double2DV1_t::ElementRef_t Try_t; - typedef double& Correct_t; - testStatus = TypeMatchTester::Result && testStatus; - } - - { - typedef double2DV2_t::ElementRef_t Try_t; - typedef double& Correct_t; - testStatus = TypeMatchTester::Result && testStatus; - } - - // Tag_t - - { - typedef float3DV1_t::Tag_t Try_t; - typedef BrickView<3,true> Correct_t; - testStatus = TypeMatchTester::Result && testStatus; - } - - { - typedef float3DV2_t::Tag_t Try_t; - typedef BrickView<3,false> Correct_t; - testStatus = TypeMatchTester::Result && testStatus; - } - - { - typedef double2DV1_t::Tag_t Try_t; - typedef BrickView<2,true> Correct_t; - testStatus = TypeMatchTester::Result && testStatus; - } - - { - typedef double2DV2_t::Tag_t Try_t; - typedef BrickView<2,false> Correct_t; - testStatus = TypeMatchTester::Result && testStatus; - } - - reportResults(testNumber,"exported typedefs ElementRef_t, Tag_t", - testStatus); - - - //---------------------------------------------------- - // test 33: BrickViewEngine Range/Interval constructor - //---------------------------------------------------- - - ++testNumber; - - //------------- - // square tests - //------------- - - // BV1... - - Imin = square1[0].first(); - Jmin = square1[1].first(); - Ilen = square1[0].length(); - Jlen = square1[1].length(); - Istr = square1[0].stride(); - Jstr = square1[1].stride(); - - diff = zero; - for (int i = 0; i < Ilen; i++) - for (int j = 0; j < Jlen; j++) { - int Iind = Imin + i*Istr; - int Jind = Jmin + j*Jstr; - diff += Q.read(Iind,Jind) - BV1(Loc<2>(i,j)); - } - testStatus = (diff == zero); - - // BV2... - - Imin = rectangle1[0].first(); - Jmin = rectangle1[1].first(); - Ilen = rectangle1[0].length(); - Jlen = rectangle1[1].length(); - Istr = rectangle1[0].stride(); - Jstr = rectangle1[1].stride(); - - diff = zero; - for (int i = 0; i < Ilen; i++) - for (int j = 0; j < Jlen; j++) { - int Iind = Imin + i*Istr; - int Jind = Jmin + j*Jstr; - diff += Q.read(Iind,Jind) - BV2(Loc<2>(i,j)); - } - testStatus = (diff == zero) && testStatus; - - // BV3... - - Imin = rectangle2[0].first(); - Jmin = rectangle2[1].first(); - Ilen = rectangle2[0].length(); - Jlen = rectangle2[1].length(); - Istr = rectangle2[0].stride(); - Jstr = rectangle2[1].stride(); - - diff = zero; - for (int i = 0; i < Ilen; i++) - for (int j = 0; j < Jlen; j++) { - int Iind = Imin + i*Istr; - int Jind = Jmin + j*Jstr; - diff += Q.read(Iind,Jind) - BV3(Loc<2>(i,j)); - } - testStatus = (diff == zero) && testStatus; - - - //----------- - // cube tests - //----------- - - // BV4... - - int Kstr; - - Imin = cube1[0].first(); - Jmin = cube1[1].first(); - Kmin = cube1[2].first(); - Ilen = cube1[0].length(); - Jlen = cube1[1].length(); - Klen = cube1[2].length(); - Istr = cube1[0].stride(); - Jstr = cube1[1].stride(); - Kstr = cube1[2].stride(); - - diff = zero; - for (int i = 0; i < Ilen; i++) - for (int j = 0; j < Jlen; j++) - for (int k = 0; k < Klen; k++) { - int Iind = Imin + i*Istr; - int Jind = Jmin + j*Jstr; - int Kind = Kmin + k*Kstr; - diff += R.read(Iind,Jind,Kind) - BV4(Loc<3>(i,j,k)); - } - testStatus = (diff == zero) && testStatus; - - // BV5... - - Imin = box1[0].first(); - Jmin = box1[1].first(); - Kmin = box1[2].first(); - Ilen = box1[0].length(); - Jlen = box1[1].length(); - Klen = box1[2].length(); - Istr = box1[0].stride(); - Jstr = box1[1].stride(); - Kstr = box1[2].stride(); - - diff = zero; - for (int i = 0; i < Ilen; i++) - for (int j = 0; j < Jlen; j++) - for (int k = 0; k < Klen; k++) { - int Iind = Imin + i*Istr; - int Jind = Jmin + j*Jstr; - int Kind = Kmin + k*Kstr; - diff += R.read(Iind,Jind,Kind) - BV5(Loc<3>(i,j,k)); - } - - testStatus = (diff == zero) && testStatus; - - // BV6... - - Imin = box2[0].first(); - Jmin = box2[1].first(); - Kmin = box2[2].first(); - Ilen = box2[0].length(); - Jlen = box2[1].length(); - Klen = box2[2].length(); - Istr = box2[0].stride(); - Jstr = box2[1].stride(); - Kstr = box2[2].stride(); - - diff = zero; - for (int i = 0; i < Ilen; i++) - for (int j = 0; j < Jlen; j++) - for (int k = 0; k < Klen; k++) { - int Iind = Imin + i*Istr; - int Jind = Jmin + j*Jstr; - int Kind = Kmin + k*Kstr; - diff += R(Iind,Jind,Kind) - BV6(i,j,k); - } - - testStatus = (diff == zero) && testStatus; - - reportResults(testNumber,"Range constructor",testStatus); - - - //------------------------------------------------------- - // test 34: Range/Interval constructor, NewEngine struct - //------------------------------------------------------- - - ++testNumber; - - { - typedef NewEngine >::Type_t Try_t; - typedef Engine<3,float,BrickView<3,false> > Correct_t; - testStatus = TypeMatchTester::Result; - } - - reportResults(testNumber," NewEngine struct",testStatus); - - - //------------------------------------------------------- - // test 35: Range/Interval constructor, domain() accessor - //------------------------------------------------------- - - ++testNumber; - - // 3D, UnitStride = F - - float3DV2_t BV7(BV5); - - // the Domain returned by this accessor is always an Interval, because - // the View is, by definition, stride-1 in all dimensions, with first-index - // = 0 in all dimensions. Thus, box4 should = box3, since these are stride-1 - // Intervals describing the identical View, but box3 is not = box1; box1 is the - // not-necessarily-stride-1 Range corresponding to box3, and its indices are - // expressed in terms of the parent Domain [cube]'s indices. - - Interval<3> box3 = BV5.domain(); - Interval<3> box4 = BV7.domain(); - - testStatus = (box4[0].first() == box3[0].first()) && - (box4[0].last() == box3[0].last()) && - (box4[0].length() == box3[0].length()) && - (box4[1].first() == box3[1].first()) && - (box4[1].last() == box3[1].last()) && - (box4[1].length() == box3[1].length()) && - (box4[2].first() == box3[2].first()) && - (box4[2].last() == box3[2].last()) && - (box4[2].length() == box3[2].length()); - - // 2D, UnitStride = T - - double2DV1_t BV8(BV1); - Interval<2> square2 = BV8.domain(); - - // even though BV1's Domain (square1) is already Interval<2>, still - // need to compute its domain() which will be offset to start with index 0. - - Interval<2> square3 = BV1.domain(); - - testStatus = (square2[0].first() == square3[0].first()) && - (square2[0].last() == square3[0].last()) && - (square2[0].length() == square3[0].length()) && - (square2[1].first() == square3[1].first()) && - (square2[1].last() == square3[1].last()) && - (square2[1].length() == square3[1].length()) && testStatus; - - reportResults(testNumber," domain() accessor",testStatus); - - - //----------------------------------------------------------- - // test 36: Range/Interval constructor, baseDomain() accessor - //----------------------------------------------------------- - - ++testNumber; - - // 3D, UnitStride = F - - Range<3> cube3 = BV7.baseDomain(); - - testStatus = (cube3[0].first() == box1[0].first()) && - (cube3[0].last() == box1[0].last()) && - (cube3[0].length() == box1[0].length()) && - (cube3[1].first() == box1[1].first()) && - (cube3[1].last() == box1[1].last()) && - (cube3[1].length() == box1[1].length()) && - (cube3[2].first() == box1[2].first()) && - (cube3[2].last() == box1[2].last()) && - (cube3[2].length() == box1[2].length()); - - // 2D, UnitStride = T - - Range<2> box5 = BV8.baseDomain(); - - testStatus = (box5[0].first() == square1[0].first()) && - (box5[0].last() == square1[0].last()) && - (box5[0].length() == square1[0].length()) && - (box5[1].first() == square1[1].first()) && - (box5[1].last() == square1[1].last()) && - (box5[1].length() == square1[1].length()) && testStatus; - - reportResults(testNumber," baseDomain() accessor",testStatus); - - - //-------------------------------------------------------- - // test 37: Range/Interval constructor, strides() accessor - //-------------------------------------------------------- - - ++testNumber; - - // tests that second-guess the implementation, to illustrate - // the meaning of the BrickViewEngine strides() accessor - // (just this once)... - - // 3D, UnitStride = F - - const int *NT = BV7.strides(); - - testStatus = true; - for(int i = 0; i < 3; i++) { - nomStrides[i] = R.strides()[i] * box1[i].stride(); - testStatus = (NT[i] == nomStrides[i]) && testStatus; - } - - // 2D, UnitStride = T - - NT = BV8.strides(); - - for(int i = 0; i < 2; i++) { - nomStrides[i] = Q.strides()[i] * square1[i].stride(); - testStatus = (NT[i] == nomStrides[i]) && testStatus; - } - - - // the 'real' tests, illustrating how the BrickView strides() - // accessor makes it possible to sequentially identify the subset - // indices from the parent Domain. - - // 3D, UnitStride = F - - // create linear-indexing array RR - - Imin = R.domain()[0].first(); Imax = R.domain()[0].last(); - Jmin = R.domain()[1].first(); Jmax = R.domain()[1].last(); - Kmin = R.domain()[2].first(); Kmax = R.domain()[2].last(); - - int sizeRR = R.domain()[0].length()*R.domain()[1].length()*R.domain()[2].length(); - float* RR = new float[sizeRR]; - - for (int k = Kmin; k < Kmax+1; k++) - for (int j = Jmin; j < Jmax+1; j++) - for (int i = Imin; i < Imax+1; i++) { - int in = (i-Imin); int jn = (j-Jmin); int kn = (k-Kmin); - int ind = kn*R.domain()[1].length()*R.domain()[2].length() + - jn*R.domain()[1].length() + in; - RR[ind] = R(i,j,k); - } - - // verify that using strides() to index into the linear version of - // BrickEngine R gives the same result as BrickView BV7 with its - // unit strides. - - NT = BV7.strides(); - - Imax = BV7.domain()[0].last(); - Jmax = BV7.domain()[1].last(); - Kmax = BV7.domain()[2].last(); - - // compute differences between parent and subdomain first-index - - int deltI = BV7.baseDomain()[0].first() - R.domain()[0].first(); - int deltJ = BV7.baseDomain()[1].first() - R.domain()[1].first(); - int deltK = BV7.baseDomain()[2].first() - R.domain()[2].first(); - - // compute linear-indexing offset - - int off = deltK*R.domain()[1].length()*R.domain()[2].length() + - deltJ*R.domain()[1].length() + deltI; - - diff = zero; - for (int k = 0; k < Kmax+1; k++) - for (int j = 0; j < Jmax+1; j++) - for (int i = 0; i < Imax+1; i++) { - int ind = i*NT[0] + j*NT[1] + k*NT[2] + off; - diff += fabs(RR[ind] - BV7(i,j,k)); - } - - testStatus = (diff == zero) && testStatus; - - - // 2D, UnitStride=T - - // create linear-indexing array QQ - - Imin = Q.domain()[0].first(); Imax = Q.domain()[0].last(); - Jmin = Q.domain()[1].first(); Jmax = Q.domain()[1].last(); - - int sizeQQ = Q.domain()[0].length()*Q.domain()[1].length(); - float* QQ = new float[sizeQQ]; - - for (int j = Jmin; j < Jmax+1; j++) - for (int i = Imin; i < Imax+1; i++) { - int in = (i-Imin); int jn = (j-Jmin); - int ind = jn*Q.domain()[1].length() + in; - QQ[ind] = Q(i,j); - } - - - // verify that using strides() to index into the linear version of - // BrickEngine Q gives the same result as BrickView BV8 with its unit - // strides (if the different starting points for the indexing underlying - // the two Engines) is properly accounted for). - - NT = BV8.strides(); - - Imax = BV8.domain()[0].last(); - Jmax = BV8.domain()[1].last(); - - // compute differences between parent and subdomain first-index - - deltI = BV8.baseDomain()[0].first() - Q.domain()[0].first(); - deltJ = BV8.baseDomain()[1].first() - Q.domain()[1].first(); - - // compute linear-indexing offset - - off = deltJ*Q.domain()[1].length() + deltI; - - diff = zero; - for (int j = 0; j < Jmax+1; j++) - for (int i = 0; i < Imax+1; i++) { - int ind = i*NT[0] + j*NT[1] + off; - diff += fabs(QQ[ind] - BV8(i,j)); - } - - testStatus = (diff == zero) && testStatus; - - - // extra test for 3D, UnitStride = F (different Engine, just for fun) - - // parent domain - - Interval<1> U1(4,10); // length 7 - Interval<1> U2(0,4); // length 5 - Interval<1> U3(-2,0); // length 3 - Interval<3> D(U1,U2,U3); - Engine3Df_t S(D); - - int sizeS2 = U1.length()*U2.length()*U3.length(); - float *S2 = new float[sizeS2]; - - Imin = U1.first(); Imax = U1.last(); - Jmin = U2.first(); Jmax = U2.last(); - Kmin = U3.first(); Kmax = U3.last(); - - // linearly-indexed version of BrickEngine to illustrate use of strides() - - for (int k = Kmin; k < Kmax+1; k++) - for (int j = Jmin; j < Jmax+1; j++) - for (int i = Imin; i < Imax+1; i++) { - int in = (i-Imin); int jn = (j-Jmin); int kn = (k-Kmin); - S(i,j,k) = in*1.1 + jn*2.2 + kn*3.3; - int ind = kn*U1.length()*U2.length() + jn*U1.length() + in; - S2[ind] = S(i,j,k); - } - - // sub-domain - - Range<1> V1(4,10,2); // length 4 - Range<1> V2(0,4,2); // length 3 - Range<1> V3(-2,0,2); // length 2 - - Range<3> F(V1,V2,V3); - float3DV2_t BV9(S,F); - - NT = BV9.strides(); - - // this 'check' once again second-guesses the implementation - // (ok, this is _really_ the last time!) - - testStatus = true; - for(int i = 0; i < 3; i++) { - nomStrides[i] = S.strides()[i] * F[i].stride(); - testStatus = (NT[i] == nomStrides[i]) && testStatus; - } - - // true check: verify that using strides() to index into the linear version - // of BrickEngine S gives the same result as BrickView BV9 with unit strides. - - Imax = BV9.domain()[0].last(); - Jmax = BV9.domain()[1].last(); - Kmax = BV9.domain()[2].last(); - - // compute differences between parent and subdomain first-index - - deltI = BV9.baseDomain()[0].first() - S.domain()[0].first(); - deltJ = BV9.baseDomain()[1].first() - S.domain()[1].first(); - deltK = BV9.baseDomain()[2].first() - S.domain()[2].first(); - - // compute linear-indexing offset - - off = deltK*S.domain()[1].length()*S.domain()[2].length() + - deltJ*S.domain()[1].length() + deltI; - - diff = zero; - for (int k = 0; k < Kmax+1; k++) - for (int j = 0; j < Jmax+1; j++) - for (int i = 0; i < Imax+1; i++) { - int ind = i*NT[0] + j*NT[1] + k*NT[2] + off; - diff += fabs(S2[ind] - BV9(i,j,k)); - } - testStatus = (diff == zero) && testStatus; - - reportResults(testNumber," strides() accessor",testStatus); - - - //---------------------------------------------------------- - // test 38: BrickViewEngine SliceRange constructor - //---------------------------------------------------------- - - ++testNumber; - - // SliceRange is a Domain which stores a total - // Domain (of dimension Dim2) and a slice Domain (of dimension - // Dim < Dim2). Although in general both Domains in a SliceRange - // can be Range objects, here the Dim2 Domain must be an Interval - // since it corresponds to the Domain of a BrickEngine. The - // Dim Range is the one actually used in the constructor; the - // Dim2 Range is implicitly known through the BrickEngine. - - // construct the parent Interval/Engine for the SliceRange/View - - Interval<6> IA6(I0,IJK,J0,Balmer); - Engine6Df_t B1(IA6); - - // get 6D Interval limits - - imin = I0.first(); - imax = I0.last(); - jmin = IJK[0].first(); - jmax = IJK[0].last(); - kmin = IJK[1].first(); - kmax = IJK[1].last(); - int lmin = IJK[2].first(); - int lmax = IJK[2].last(); - int mmin = J0.first(); - int mmax = J0.last(); - int nmin = Balmer.first(); - int nmax = Balmer.last(); - - // assign BrickEngine values - - for(int i = imin; i < imax+1; i++) - for(int j = jmin; j < jmax+1; j++) - for(int k = kmin; k < kmax+1; k++) - for(int l = lmin; l < lmax+1; l++) - for(int m = mmin; m < mmax+1; m++) - for(int n = nmin; n < nmax+1; n++) - B1(i,j,k,l,m,n) = i*1.1 + j*2.2 + k*3.3 + l*4.4 + m*5.5 + n*6.6; - - // define typedefs for the SliceRange - - typedef NewDomain5, int, AllDomain<2>, Interval<1>, Range<1> > ND1_t; - typedef ND1_t::SliceType_t ST1_t; - - // construct the SliceRange, making sure that it is a true subset of - // parent Interval IA6 - - ST1_t SR6; - - int ll = -2; - Loc<1> L1(ll); // subset of I0 - int ii = 5; // subset of I - AllDomain<2> A2; // subset of JK part of IJK (wildcard) - Interval<1> JJ0(7,10); // subset of J0 - Range<1> B0(3,15,3); // subset of Balmer - - ND1_t::fillSlice(SR6,IA6,L1,ii,A2,JJ0,B0); - - // finally, construct a BrickViewEngine based on SliceRange6 - - testStatus = (SR6.sliceDimensions == 4); - float4DV3_t BV10(B1,SR6); - - // check values - - int Lmin; int Llen; int Lstr; - Range<6> d14 = BV10.baseDomain(); - - Imin = d14[2].first(); - Jmin = d14[3].first(); - Kmin = d14[4].first(); - Lmin = d14[5].first(); - Ilen = d14[2].length(); - Jlen = d14[3].length(); - Klen = d14[4].length(); - Llen = d14[5].length(); - Istr = d14[2].stride(); - Jstr = d14[3].stride(); - Kstr = d14[4].stride(); - Lstr = d14[5].stride(); - - diff = zero; - for(int i = 0; i < Ilen; i++) - for(int j = 0; j < Jlen; j++) - for(int k = 0; k < Klen; k++) - for(int l = 0; l < Llen; l++) { - int Iind = Imin + i*Istr; - int Jind = Jmin + j*Jstr; - int Kind = Kmin + k*Kstr; - int Lind = Lmin + l*Lstr; - diff += fabs(B1(ll,ii,Iind,Jind,Kind,Lind) - BV10(i,j,k,l)); - } - testStatus = (diff == zero) && testStatus; - - reportResults(testNumber,"SliceRange constructor", - testStatus); - - - //------------------------------------------------------------- - // test 39: SliceRange constructor, NewEngine struct - //------------------------------------------------------------- - - ++testNumber; - - { - typedef NewEngine::Type_t Try_t; - typedef Engine<4,float,BrickView<6,false> > Correct_t; - testStatus = TypeMatchTester::Result; - } - - reportResults(testNumber," NewEngine struct",testStatus); - - - //-------------------------------------------------------------- - // test 40: SliceRange constructor, domain() accessor - //-------------------------------------------------------------- - - ++testNumber; - - Interval<4> d13 = BV10.domain(); - - testStatus = (d13[0].first() == 0) && - (d13[0].last() == 6) && - (d13[0].length() == 7) && - (d13[1].first() == 0) && - (d13[1].last() == 12) && - (d13[1].length() == 13) && - (d13[2].first() == 0) && - (d13[2].last() == 3) && - (d13[2].length() == 4) && - (d13[3].first() == 0) && - (d13[3].last() == 4) && - (d13[3].length() == 5); - - reportResults(testNumber," domain() accessor",testStatus); - - - //----------------------------------------------------------------- - // test 41: SliceRange constructor, baseDomain() accessor - //----------------------------------------------------------------- - - ++testNumber; - - testStatus = (d14[0].first() == -2) && - (d14[0].last() == -2) && - (d14[0].length() == 1) && - (d14[1].first() == 5) && - (d14[1].last() == 5) && - (d14[1].length() == 1) && - (d14[2].first() == -6) && - (d14[2].last() == 0) && - (d14[2].length() == 7) && - (d14[3].first() == 2) && - (d14[3].last() == 14) && - (d14[3].length() == 13) && - (d14[4].first() == 7) && - (d14[4].last() == 10) && - (d14[4].length() == 4) && - (d14[5].first() == 3) && - (d14[5].last() == 15) && - (d14[5].length() == 5); - - - reportResults(testNumber," baseDomain() accessor",testStatus); - - - //-------------------------------------------------------------- - // test 42: SliceRange constructor, strides() accessor - //-------------------------------------------------------------- - - ++testNumber; - - // create linear-indexing array BB1 - - int Lmax; int Mmin; int Mmax; int Nmin; int Nmax; - Imin = B1.domain()[0].first(); Imax = B1.domain()[0].last(); - Jmin = B1.domain()[1].first(); Jmax = B1.domain()[1].last(); - Kmin = B1.domain()[2].first(); Kmax = B1.domain()[2].last(); - Lmin = B1.domain()[3].first(); Lmax = B1.domain()[3].last(); - Mmin = B1.domain()[4].first(); Mmax = B1.domain()[4].last(); - Nmin = B1.domain()[5].first(); Nmax = B1.domain()[5].last(); - - int sizeBB1 = B1.domain()[0].length()*B1.domain()[1].length()*B1.domain()[2].length() * - B1.domain()[3].length()*B1.domain()[4].length()*B1.domain()[5].length(); - float* BB1 = new float[sizeBB1]; - - int b10 = B1.domain()[0].length(); - int b11 = B1.domain()[1].length(); - int b12 = B1.domain()[2].length(); - int b13 = B1.domain()[3].length(); - int b14 = B1.domain()[4].length(); - - for (int n = Nmin; n < Nmax+1; n++) - for (int m = Mmin; m < Mmax+1; m++) - for (int l = Lmin; l < Lmax+1; l++) - for (int k = Kmin; k < Kmax+1; k++) - for (int j = Jmin; j < Jmax+1; j++) - for (int i = Imin; i < Imax+1; i++) { - int in = (i-Imin); int jn = (j-Jmin); int kn = (k-Kmin); - int ln = (l-Lmin); int mn = (m-Mmin); int nn = (n-Nmin); - int ind = nn*b10*b11*b12*b13*b14 + mn*b10*b11*b12*b13 + - ln*b10*b11*b12 + kn*b10*b11 + jn*b10 + in; - BB1[ind] = B1(i,j,k,l,m,n); - } - - NT = BV10.strides(); - - Imax = BV10.domain()[0].last(); - Jmax = BV10.domain()[1].last(); - Kmax = BV10.domain()[2].last(); - Lmax = BV10.domain()[3].last(); - - // compute differences between parent and subdomain first-index - - deltI = BV10.baseDomain()[0].first() - B1.domain()[0].first(); - deltJ = BV10.baseDomain()[1].first() - B1.domain()[1].first(); - deltK = BV10.baseDomain()[2].first() - B1.domain()[2].first(); - int deltL = BV10.baseDomain()[3].first() - B1.domain()[3].first(); - int deltM = BV10.baseDomain()[4].first() - B1.domain()[4].first(); - int deltN = BV10.baseDomain()[5].first() - B1.domain()[5].first(); - - // compute linear-indexing offset - - off = deltN*b10*b11*b12*b13*b14 + deltM*b10*b11*b12*b13 + - deltL*b10*b11*b12 + deltK*b10*b11 + deltJ*b10 + deltI; - - diff = zero; - for (int l = 0; l < Lmax+1; l++) - for (int k = 0; k < Kmax+1; k++) - for (int j = 0; j < Jmax+1; j++) - for (int i = 0; i < Imax+1; i++) { - int ind = i*NT[0] + j*NT[1] + k*NT[2] + l*NT[3] + off; - diff += fabs(BB1[ind] - BV10(i,j,k,l)); - } - - testStatus = (diff == zero) && testStatus; - - reportResults(testNumber," strides() accessor",testStatus); - - - //------------------------------------------------------------- - // test 43: BrickViewEngine SliceInterval constructor - //------------------------------------------------------------- - - ++testNumber; - - // similar to SliceRange constructor, but now the 1D - // subDomains comprising the Slice must all be Intervals. - // - // test using B1 again, but this time take 2D slice instead of 4D. - - typedef NewDomain4, Loc<3>, Interval<1>, Loc<1> > ND2_t; - typedef ND2_t::SliceType_t ST2_t; - - ST2_t SI6; - AllDomain<1> A1; // subset of I0 - Loc<3> L3(2,-4,12); // subset of IJK - L1 = 18; // subset of Balmer - - ND2_t::fillSlice(SI6,IA6,A1,L3,JJ0,L1); - testStatus = (SI6.sliceDimensions == 2); - - float2DV2_t BV12(B1,SI6); - Interval<6> d15 = BV12.baseDomain(); - - Imin = d15[0].first(); - Jmin = d15[4].first(); - Ilen = d15[0].length(); - Jlen = d15[4].length(); - Istr = d15[0].stride(); - Jstr = d15[4].stride(); - - diff = zero; - for(int i = 0; i < Ilen; i++) - for(int j = 0; j < Jlen; j++) { - int Iind = Imin + i*Istr; - int Jind = Jmin + j*Jstr; - diff += fabs(B1(Iind,2,-4,12,Jind,18) - BV12(i,j)); - } - testStatus = (diff == zero) && testStatus; - - reportResults(testNumber,"SliceInterval constructor", - testStatus); - - - //---------------------------------------------------------------- - // test 44: SliceInterval constructor, NewEngine struct - //---------------------------------------------------------------- - - ++testNumber; - - { - typedef NewEngine::Type_t Try_t; - typedef Engine<2,float,BrickView<6,false> > Correct_t; - testStatus = TypeMatchTester::Result; - } - - reportResults(testNumber," NewEngine struct",testStatus); - - - //---------------------------------------------------------------- - // test 45: SliceInterval constructor, domain() accessor - //---------------------------------------------------------------- - - ++testNumber; - - Interval<2> d16 = BV12.domain(); - testStatus = (d16[0].first() == 0) && - (d16[0].last() == 6) && - (d16[0].length() == 7) && - (d16[1].first() == 0) && - (d16[1].last() == 3) && - (d16[1].length() == 4); - - reportResults(testNumber," domain() accessor",testStatus); - - - //-------------------------------------------------------------------- - // test 46: SliceInterval constructor, baseDomain() accessor - //-------------------------------------------------------------------- - - ++testNumber; - - testStatus = (d15[0].first() == -3) && - (d15[0].last() == 3) && - (d15[0].length() == 7) && - (d15[1].first() == 2) && - (d15[1].last() == 2) && - (d15[1].length() == 1) && - (d15[2].first() == -4) && - (d15[2].last() == -4) && - (d15[2].length() == 1) && - (d15[3].first() == 12) && - (d15[3].last() == 12) && - (d15[3].length() == 1) && - (d15[4].first() == 7) && - (d15[4].last() == 10) && - (d15[4].length() == 4) && - (d15[5].first() == 18) && - (d15[5].last() == 18) && - (d15[5].length() == 1); - - reportResults(testNumber," baseDomain() accessor",testStatus); - - - //----------------------------------------------------------------- - // test 47: SliceInterval constructor, strides() accessor - //----------------------------------------------------------------- - - ++testNumber; - - NT = BV12.strides(); - - Imax = BV12.domain()[0].last(); - Jmax = BV12.domain()[1].last(); - - deltI = BV12.baseDomain()[0].first() - B1.domain()[0].first(); - deltJ = BV12.baseDomain()[1].first() - B1.domain()[1].first(); - deltK = BV12.baseDomain()[2].first() - B1.domain()[2].first(); - deltL = BV12.baseDomain()[3].first() - B1.domain()[3].first(); - deltM = BV12.baseDomain()[4].first() - B1.domain()[4].first(); - deltN = BV12.baseDomain()[5].first() - B1.domain()[5].first(); - - off = deltN*b10*b11*b12*b13*b14 + deltM*b10*b11*b12*b13 + - deltL*b10*b11*b12 + deltK*b10*b11 + deltJ*b10 + deltI; - - diff = zero; - for (int j = 0; j < Jmax+1; j++) - for (int i = 0; i < Imax+1; i++) { - int ind = i*NT[0] + j*NT[1] + off; - diff += fabs(BB1[ind] - BV12(i,j)); - } - testStatus = (diff == zero) && testStatus; - - reportResults(testNumber," strides() accessor",testStatus); - - - //------------------------------------------ - // test 48: BrickViewEngine Node constructor - //------------------------------------------ - - ++testNumber; - - // use simple Node as in test #10, built on Interval<6> - // subset of star. - - Loc<5> gamma(5,11,4,8,12); - Interval<6> symm(gamma,Interval<1>(5,9)); - Node > kpt(-1,symm,0,0,0); - - // assign more interesting data to BZone than simple constant - - for(int i = 4; i < 13; i++) - for(int j = 4; j < 13; j++) - for(int k = 4; k < 13; k++) - for(int l = 4; l < 13; l++) - for(int m = 4; m < 13; m++) - for(int n = 4; n < 13; n++) - BZone(i,j,k,l,m,n) = i*2 + j*3 + k*4 + (l+m)*5 - n; - - int6DV1_t BV14(BZone,kpt); - - Interval<6> d17 = BV14.baseDomain(); - - Imin = d17[5].first(); - Ilen = d17[5].length(); - Istr = d17[5].stride(); - - diff = zero; - for(int i = 0; i < 5; i++) { - int Iind = Imin + i*Istr; - diff += abs(BZone(5,11,4,8,12,Iind) - BV14.read(0,0,0,0,0,i)); - } - - testStatus = (diff == zero); - - reportResults(testNumber,"Node constructor",testStatus); - - - //--------------------------------------------- - // test 49: Node constructor, NewEngine struct - //--------------------------------------------- - - ++testNumber; - - { - typedef NewEngine > >::Type_t Try_t; - typedef Engine<6,int,BrickView<6,true> > Correct_t; - testStatus = TypeMatchTester::Result; - } - - reportResults(testNumber," NewEngine struct",testStatus); - - - //--------------------------------------------- - // test 50: Node constructor, domain() accessor - //--------------------------------------------- - - ++testNumber; - - Interval<6> d18 = BV14.domain(); - testStatus = (d18[0].first() == 0) && - (d18[0].last() == 0) && - (d18[0].length() == 1) && - (d18[1].first() == 0) && - (d18[1].last() == 0) && - (d18[1].length() == 1) && - (d18[2].first() == 0) && - (d18[2].last() == 0) && - (d18[2].length() == 1) && - (d18[3].first() == 0) && - (d18[3].last() == 0) && - (d18[3].length() == 1) && - (d18[4].first() == 0) && - (d18[4].last() == 0) && - (d18[4].length() == 1) && - (d18[5].first() == 0) && - (d18[5].last() == 4) && - (d18[5].length() == 5); - - reportResults(testNumber," domain() accessor",testStatus); - - - //------------------------------------------------- - // test 51: Node constructor, baseDomain() accessor - //------------------------------------------------- - - ++testNumber; - testStatus = (d17[0].first() == 5) && - (d17[0].last() == 5) && - (d17[0].length() == 1) && - (d17[1].first() == 11) && - (d17[1].last() == 11) && - (d17[1].length() == 1) && - (d17[2].first() == 4) && - (d17[2].last() == 4) && - (d17[2].length() == 1) && - (d17[3].first() == 8) && - (d17[3].last() == 8) && - (d17[3].length() == 1) && - (d17[4].first() == 12) && - (d17[4].last() == 12) && - (d17[4].length() == 1) && - (d17[5].first() == 5) && - (d17[5].last() == 9) && - (d17[5].length() == 5); - - reportResults(testNumber," baseDomain() accessor",testStatus); - - - //---------------------------------------------- - // test 52: Node constructor, strides() accessor - //---------------------------------------------- - - ++testNumber; - - Imin = BZone.domain()[0].first(); Imax = BZone.domain()[0].last(); - Jmin = BZone.domain()[1].first(); Jmax = BZone.domain()[1].last(); - Kmin = BZone.domain()[2].first(); Kmax = BZone.domain()[2].last(); - Lmin = BZone.domain()[3].first(); Lmax = BZone.domain()[3].last(); - Mmin = BZone.domain()[4].first(); Mmax = BZone.domain()[4].last(); - Nmin = BZone.domain()[5].first(); Nmax = BZone.domain()[5].last(); - - int sizeBZ2 = BZone.domain()[0].length()*BZone.domain()[1].length()*BZone.domain()[2].length() * - BZone.domain()[3].length()*BZone.domain()[4].length()*BZone.domain()[5].length(); - float* BZ2 = new float[sizeBZ2]; - - b10 = BZone.domain()[0].length(); - b11 = BZone.domain()[1].length(); - b12 = BZone.domain()[2].length(); - b13 = BZone.domain()[3].length(); - b14 = BZone.domain()[4].length(); - - for (int n = Nmin; n < Nmax+1; n++) - for (int m = Mmin; m < Mmax+1; m++) - for (int l = Lmin; l < Lmax+1; l++) - for (int k = Kmin; k < Kmax+1; k++) - for (int j = Jmin; j < Jmax+1; j++) - for (int i = Imin; i < Imax+1; i++) { - int in = (i-Imin); int jn = (j-Jmin); int kn = (k-Kmin); - int ln = (l-Lmin); int mn = (m-Mmin); int nn = (n-Nmin); - int ind = nn*b10*b11*b12*b13*b14 + mn*b10*b11*b12*b13 + - ln*b10*b11*b12 + kn*b10*b11 + jn*b10 + in; - BZ2[ind] = BZone(i,j,k,l,m,n); - } - - NT = BV14.strides(); - Imax = BV14.domain()[5].last(); - - deltI = BV14.baseDomain()[0].first() - BZone.domain()[0].first(); - deltJ = BV14.baseDomain()[1].first() - BZone.domain()[1].first(); - deltK = BV14.baseDomain()[2].first() - BZone.domain()[2].first(); - deltL = BV14.baseDomain()[3].first() - BZone.domain()[3].first(); - deltM = BV14.baseDomain()[4].first() - BZone.domain()[4].first(); - deltN = BV14.baseDomain()[5].first() - BZone.domain()[5].first(); - - off = deltN*b10*b11*b12*b13*b14 + deltM*b10*b11*b12*b13 + - deltL*b10*b11*b12 + deltK*b10*b11 + deltJ*b10 + deltI; - - diff = zero; - for (int i = 0; i < Imax+1; i++) { - int ind = i*NT[5] + off; - diff += fabs(BZ2[ind] - BV14(0,0,0,0,0,i)); - } - testStatus = (diff == zero) && testStatus; - - reportResults(testNumber," strides() accessor",testStatus); - - - //------------------------------------------- - // test 53: BrickViewEngine INode constructor - //------------------------------------------- - - ++testNumber; - - // construct an INode from a Node - - Loc<1> alpha(10); - Loc<3> beta(12,5,7); - Interval<6> symmer(alpha,Interval<1>(10,12),point,beta); - Node > gvec(-1,symmer,0,0,0); - INode<6> IN1(gvec); - int6DV1_t BV16(BZone,IN1); - - Interval<6> d19 = BV16.baseDomain(); - - Imin = d19[1].first(); - Ilen = d19[1].length(); - Istr = d19[1].stride(); - - Jmin = d19[2].first(); - Jlen = d19[2].length(); - Jstr = d19[2].stride(); - - diff = zero; - for(int i = 0; i < Ilen+1; i++) - for(int j = 0; j < Jlen+1; j++) { - int Iind = Imin + i*Istr; - int Jind = Jmin + j*Jstr; - diff += abs(BZone.read(10,Iind,Jind,12,5,7) - BV16(0,i,j,0,0,0)); - } - testStatus = (diff == zero); - - reportResults(testNumber,"INode constructor",testStatus); - - - //--------------------------------------------- - // test 54: INode constructor, NewEngine struct - //--------------------------------------------- - - ++testNumber; - - { - typedef NewEngine >::Type_t Try_t; - typedef Engine<6,int,BrickView<6,true> > Correct_t; - testStatus = TypeMatchTester::Result; - } - - reportResults(testNumber," NewEngine struct",testStatus); - - - //---------------------------------------------- - // test 55: INode constructor, domain() accessor - //---------------------------------------------- - - ++testNumber; - - Interval<6> d20 = BV16.domain(); - testStatus = (d20[0].first() == 0) && - (d20[0].last() == 0) && - (d20[0].length() == 1) && - (d20[1].first() == 0) && - (d20[1].last() == 2) && - (d20[1].length() == 3) && - (d20[2].first() == 0) && - (d20[2].last() == 8) && - (d20[2].length() == 9) && - (d20[3].first() == 0) && - (d20[3].last() == 0) && - (d20[3].length() == 1) && - (d20[4].first() == 0) && - (d20[4].last() == 0) && - (d20[4].length() == 1) && - (d20[5].first() == 0) && - (d20[5].last() == 0) && - (d20[5].length() == 1); - - reportResults(testNumber," domain() accessor",testStatus); - - - //-------------------------------------------------- - // test 56: INode constructor, baseDomain() accessor - //-------------------------------------------------- - - ++testNumber; - - testStatus = (d19[0].first() == 10) && - (d19[0].last() == 10) && - (d19[0].length() == 1) && - (d19[1].first() == 10) && - (d19[1].last() == 12) && - (d19[1].length() == 3) && - (d19[2].first() == 4) && - (d19[2].last() == 12) && - (d19[2].length() == 9) && - (d19[3].first() == 12) && - (d19[3].last() == 12) && - (d19[3].length() == 1) && - (d19[4].first() == 5) && - (d19[4].last() == 5) && - (d19[4].length() == 1) && - (d19[5].first() == 7) && - (d19[5].last() == 7) && - (d19[5].length() == 1); - - reportResults(testNumber," baseDomain() accessor",testStatus); - - - //----------------------------------------------- - // test 57: INode constructor, strides() accessor - //----------------------------------------------- - - ++testNumber; - - NT = BV16.strides(); - Imax = BV16.domain()[1].last(); - Jmax = BV16.domain()[2].last(); - - deltI = BV16.baseDomain()[0].first() - BZone.domain()[0].first(); - deltJ = BV16.baseDomain()[1].first() - BZone.domain()[1].first(); - deltK = BV16.baseDomain()[2].first() - BZone.domain()[2].first(); - deltL = BV16.baseDomain()[3].first() - BZone.domain()[3].first(); - deltM = BV16.baseDomain()[4].first() - BZone.domain()[4].first(); - deltN = BV16.baseDomain()[5].first() - BZone.domain()[5].first(); - - // b10...b14 are the same as for Node, since the underlying BZone - // BrickEngine is the same - - off = deltN*b10*b11*b12*b13*b14 + deltM*b10*b11*b12*b13 + - deltL*b10*b11*b12 + deltK*b10*b11 + deltJ*b10 + deltI; - - diff = zero; - for (int j = 0; j < Jmax+1; j++) - for (int i = 0; i < Imax+1; i++) { - int ind = i*NT[1] + j*NT[2] + off; - diff += fabs(BZ2[ind] - BV16(0,i,j,0,0,0)); - } - testStatus = (diff == zero) && testStatus; - - reportResults(testNumber," strides() accessor",testStatus); - - - //----------------------------------------------------- - // test 58: BrickViewEngine BrickView/Range constructor - //----------------------------------------------------- - - ++testNumber; - - // note: the nominally distinct case of BrickView/Interval - // is not tested here. - - // Use the domain and subdomain of test #37 as the - // starting point here. This is not the most general - // test since the parent Engine Dim2 and subdomain Dim - // happen to be equal here. - - Range<1> V4(4,6,2); - Loc<1> L2(-2); - Range<3> FF(V4,V2,L2); - - typedef NewEngine >::Type_t BVT1_t; - BVT1_t BV21(BV9,FF); - - Range<3> d21 = BV21.baseDomain(); - - Imin = d21[0].first(); - Jmin = d21[1].first(); - Kmin = d21[2].first(); - Ilen = d21[0].length(); - Jlen = d21[1].length(); - Klen = d21[2].length(); - Istr = d21[0].stride(); - Jstr = d21[1].stride(); - Kstr = d21[2].stride(); - - diff = zero; - for(int i = 0; i < Ilen; i++) - for(int j = 0; j < Jlen; j++) - for(int k = 0; k < Klen; k++) { - int Iind = Imin + i*Istr; - int Jind = Jmin + j*Jstr; - int Kind = Kmin + k*Kstr; - diff += fabs(S(Iind,Jind,Kind) - BV21(i,j,k)); - } - testStatus = (diff == zero) && testStatus; - - reportResults(testNumber,"BrickView/Range constructor", - testStatus); - - - //------------------------------------------------------- - // test 59: BrickView/Range constructor, NewEngine struct - //------------------------------------------------------- - - ++testNumber; - - // test NewEngine for general case where Dim != Dim2 - - { - typedef NewEngine >::Type_t Try_t; - typedef Engine<4,float,BrickView<6,false> > Correct_t; - testStatus = TypeMatchTester::Result; - } - - reportResults(testNumber," NewEngine struct",testStatus); - - - //-------------------------------------------------------- - // test 60: BrickView/Range constructor, domain() accessor - //-------------------------------------------------------- - - /* - ===================================================================== - gam 12/8/98 - tests 60 and 61 inactivated following swh's comments of 12/7/98: - - I've looked at the BrickEngineTest and it doesn't look correct. - - Susan makes an engine called S with the domain - - [4:10:1][0:4:1][-2:0:1] - - since this is a Brick, this is also the baseDomain. She then makes a view - called BV9 using the range - - [4:10:2][0:4:2][-2:0:2]. - - So far, so good. BV9 has the domain (remember that views are Zero-based and - unit stride) - - [0:3:1][0:2:1][0:1:1] - - and the base domain is the same as the range that formed it. Then, she tries - to take a view of BV9, called BV21, using the range - - [4:6:2][0:4:2][-2:-2:1] - - This is bad since this range is outside the domain of BV9. Any test using - BC21 is suspect, though a few miraculously pass. - - ===================================================================== - - ++testNumber; - - Range<3> d22 = BV21.domain(); - testStatus = (d22[0].first() == 0) && - (d22[0].last() == 1) && - (d22[0].length() == 2) && - (d22[1].first() == 0) && - (d22[1].last() == 2) && - (d22[1].length() == 3) && - (d22[2].first() == 0) && - (d22[2].last() == 0) && - (d22[2].length() == 1); - - reportResults(testNumber," domain() accessor",testStatus); - - //------------------------------------------------------------ - // test 61: BrickView/Range constructor, baseDomain() accessor - //------------------------------------------------------------ - - ++testNumber; - - // the baseDomain is the domain with respect to the original - // Brick's Domain. Here, the original Brick is S (see - // test #37) which has a Domain [4:10:1,0:4:1,-2:0:1]. - // The values returned by baseDomain should therefore lie - // within these limits. - // - // The baseDomain is computed in BrickEngine.h as follows: - // - // baseDomain_m[dt] = Range<1>( - // base[dt].first() + domain[d0].first() * base[dt].stride(), - // base[dt].first() + domain[d0].last() * base[dt].stride(), - // domain[d0].stride() * base[dt].stride()); - // - // base <--> the BrickViewEngines's base, in this example, - // BV9.baseDomain() = [4:10:2,0:4:2,-2:0:2]. - // - // domain <--> the Domain of the Range constructor argument, in this - // example, FF.domain() = = [4:6:2,0:4:2,-2:-2:1]. - // - // The above code therefore computes the baseDomain() for - // the new BrickView as follows: - // - // 1st Dim: 4 + 4*2, 4 + 6*2, 2*2 - // 2nd Dim: 0 + 0*2, 0 + 4*2, 2*2 - // 3rd Dim: -2 + -2*2, -2 + -2*2, 1*2 - // - // i.e., d21 = [12:16:4,0:8:4,-6:-6:2]. - // - // Note that this says that the baseDomain of the View of a BrickView of - // a Brick lies outside the baseDomain of the original Brick. - // - // Thus, either the implementation is incorrect, or else the interpretation - // of this constructor used here is wrong, and thus not apparent from - // the .h file alone. In that case, it should be carefully explained, - // with examples, in the user documentation. It is likely that this - // issue will be duplicated in all BrickViews constructed from another - // BrickView and a Domain (eg., BrickView/SliceRange below). - - testStatus = (d21[0].first() == 4) && - (d21[0].last() == 6) && - (d21[0].length() == 2) && - (d21[1].first() == 0) && - (d21[1].last() == 4) && - (d21[1].length() == 3) && - (d21[2].first() == -2) && - (d21[2].last() == -2) && - (d21[2].length() == 1); - - reportResults(testNumber," baseDomain() accessor",testStatus); - - ===================================================================== - gam: end of inactivated portion 12/8/98 - */ - - /*---------- outlines for remaining constructor sub-tests ------------- - - //--------------------------------------------------------- - // test 62: BrickView/Range constructor, strides() accessor - //--------------------------------------------------------- - - ++testNumber; - - // this test cannot be implemented until test #61 is resolved. - - reportResults(testNumber," strides() accessor",testStatus); - - - //---------------------------------------------------------- - // test 63: BrickViewEngine BrickView/SliceRange constructor - //---------------------------------------------------------- - - ++testNumber; - - reportResults(testNumber,"BrickView/SliceRange constructor", - testStatus); - - - //------------------------------------------------------------ - // test 64: BrickView/SliceRange constructor, NewEngine struct - //------------------------------------------------------------ - - ++testNumber; - - reportResults(testNumber," NewEngine struct",testStatus); - - - //------------------------------------------------------------- - // test 65: BrickView/SliceRange constructor, domain() accessor - //------------------------------------------------------------- - - ++testNumber; - - reportResults(testNumber," domain() accessor",testStatus); - - - //----------------------------------------------------------------- - // test 66: BrickView/SliceRange constructor, baseDomain() accessor - //----------------------------------------------------------------- - - ++testNumber; - - reportResults(testNumber," baseDomain() accessor",testStatus); - - - //-------------------------------------------------------------- - // test 67: BrickView/SliceRange constructor, strides() accessor - //-------------------------------------------------------------- - - ++testNumber; - - reportResults(testNumber," strides() accessor",testStatus); - - - //------------------------------------------------------------- - // test 68: BrickViewEngine BrickView/SliceInterval constructor - //------------------------------------------------------------- - - ++testNumber; - - reportResults(testNumber,"BrickView/SliceInterval constructor", - testStatus); - - - //--------------------------------------------------------------- - // test 69: BrickView/SliceInterval constructor, NewEngine struct - //--------------------------------------------------------------- - - ++testNumber; - - reportResults(testNumber," NewEngine struct",testStatus); - - - //---------------------------------------------------------------- - // test 70: BrickView/SliceInterval constructor, domain() accessor - //---------------------------------------------------------------- - - ++testNumber; - - reportResults(testNumber," domain() accessor",testStatus); - - - //-------------------------------------------------------------------- - // test 71: BrickView/SliceInterval constructor, baseDomain() accessor - //-------------------------------------------------------------------- - - ++testNumber; - - reportResults(testNumber," baseDomain() accessor",testStatus); - - - //----------------------------------------------------------------- - // test 72: BrickView/SliceInterval constructor, strides() accessor - //----------------------------------------------------------------- - - ++testNumber; - - reportResults(testNumber," strides() accessor",testStatus); - - - //----------------------------------------------------- - // test 73: BrickViewEngine BrickView/Inode constructor - //----------------------------------------------------- - - ++testNumber; - - reportResults(testNumber,"BrickView/Inode constructor", - testStatus); - - - //------------------------------------------------------- - // test 74: BrickView/Inode constructor, NewEngine struct - //------------------------------------------------------- - - ++testNumber; - - reportResults(testNumber," NewEngine struct",testStatus); - - - //-------------------------------------------------------- - // test 75: BrickView/INode constructor, domain() accessor - //-------------------------------------------------------- - - ++testNumber; - - reportResults(testNumber," domain() accessor",testStatus); - - - //------------------------------------------------------------ - // test 76: BrickView/INode constructor, baseDomain() accessor - //------------------------------------------------------------ - - ++testNumber; - - reportResults(testNumber," baseDomain() accessor",testStatus); - - - //--------------------------------------------------------- - // test 77: BrickView/Inode constructor, strides() accessor - //--------------------------------------------------------- - - ++testNumber; - - reportResults(testNumber," strides() accessor",testStatus); - - - //------------------------------------------------------------- - // test 78: BrickViewEngine MultiPatch/INode constructor - //------------------------------------------------------------- - - ++testNumber; - - reportResults(testNumber,"MultiPatch/Inode constructor", - testStatus); - - - //--------------------------------------------------------------- - // test 79: MultiPatch/Inode constructor, NewEngine struct - //--------------------------------------------------------------- - - ++testNumber; - - reportResults(testNumber," NewEngine struct",testStatus); - - - //---------------------------------------------------------------- - // test 80: MultiPatch/INode constructor, domain() accessor - //---------------------------------------------------------------- - - ++testNumber; - - reportResults(testNumber," domain() accessor",testStatus); - - - //-------------------------------------------------------------------- - // test 81: MultiPatch/INode constructor, baseDomain() accessor - //-------------------------------------------------------------------- - - ++testNumber; - - reportResults(testNumber," baseDomain() accessor",testStatus); - - - //----------------------------------------------------------------- - // test 82: MultiPatch/Inode constructor, strides() accessor - //----------------------------------------------------------------- - - ++testNumber; - - reportResults(testNumber," strides() accessor",testStatus); - - - //------------------------------------------------------------ - // test 83: BrickViewEngine MultiPatch/Node constructor - //------------------------------------------------------------ - - ++testNumber; - - reportResults(testNumber,"MultiPatch/Node constructor", - testStatus); - - - //-------------------------------------------------------------- - // test 84: MultiPatch/Node constructor, NewEngine struct - //-------------------------------------------------------------- - - ++testNumber; - - reportResults(testNumber," NewEngine struct",testStatus); - - - //--------------------------------------------------------------- - // test 85: MultiPatch/Node constructor, domain() accessor - //--------------------------------------------------------------- - - ++testNumber; - - reportResults(testNumber," domain() accessor",testStatus); - - - //------------------------------------------------------------------- - // test 86: MultiPatch/Node constructor, baseDomain() accessor - //------------------------------------------------------------------- - - ++testNumber; - - reportResults(testNumber," baseDomain() accessor",testStatus); - - - //---------------------------------------------------------------- - // test 87: MultiPatch/Node constructor, strides() accessor - //---------------------------------------------------------------- - - ++testNumber; - - reportResults(testNumber," strides() accessor",testStatus); - - - //----------------------------------------------------------------- - // test 88: BrickViewEngine MultiPatchView/INode constructor - //----------------------------------------------------------------- - - ++testNumber; - - reportResults(testNumber,"MultiPatchView/Inode constructor", - testStatus); - - - //------------------------------------------------------------------- - // test 89: MultiPatchVIew/Inode constructor, NewEngine struct - //------------------------------------------------------------------- - - ++testNumber; - - reportResults(testNumber," NewEngine struct",testStatus); - - - //-------------------------------------------------------------------- - // test 90: MultiPatchView/INode constructor, domain() accessor - //-------------------------------------------------------------------- - - ++testNumber; - - reportResults(testNumber," domain() accessor",testStatus); - - - //------------------------------------------------------------------------ - // test 91: MultiPatchView/INode constructor, baseDomain() accessor - //------------------------------------------------------------------------ - - ++testNumber; - - reportResults(testNumber," baseDomain() accessor",testStatus); - - - //--------------------------------------------------------------------- - // test 92: MultiPatchView/INode constructor, strides() accessor - //--------------------------------------------------------------------- - - ++testNumber; - - reportResults(testNumber," strides() accessor",testStatus); - - - //---------------------------------------------------------------- - // test 93: BrickViewEngine MultiPatchView/Node constructor - //---------------------------------------------------------------- - - ++testNumber; - - reportResults(testNumber,"MultiPatchView/Node constructor", - testStatus); - - - //------------------------------------------------------------------ - // test 94: MultiPatchVIew/Node constructor, NewEngine struct - //------------------------------------------------------------------ - - ++testNumber; - - reportResults(testNumber," NewEngine struct",testStatus); - - - //------------------------------------------------------------------- - // test 95: MultiPatchView/Node constructor, domain() accessor - //------------------------------------------------------------------- - - ++testNumber; - - reportResults(testNumber," domain() accessor",testStatus); - - - //----------------------------------------------------------------------- - // test 96: MultiPatchView/Node constructor, baseDomain() accessor - //----------------------------------------------------------------------- - - ++testNumber; - - reportResults(testNumber," baseDomain() accessor",testStatus); - - - //-------------------------------------------------------------------- - // test 97: MultiPatchView/Node constructor, strides() accessor - //-------------------------------------------------------------------- - - ++testNumber; - - reportResults(testNumber," strides() accessor",testStatus); - - - //------------------------------------------------------- - // test 98: BrickViewEngine CompressibleBrick constructor - //------------------------------------------------------- - - ++testNumber; - - reportResults(testNumber,"CompressibleBrick constructor", - testStatus); - - - //--------------------------------------------------------- - // test 99: CompressibleBrick constructor, NewEngine struct - //--------------------------------------------------------- - - ++testNumber; - - reportResults(testNumber," NewEngine struct",testStatus); - - - //----------------------------------------------------------- - // test 100: CompressibleBrick constructor, domain() accessor - //----------------------------------------------------------- - - ++testNumber; - - reportResults(testNumber," domain() accessor",testStatus); - - - //--------------------------------------------------------------- - // test 101: CompressibleBrick constructor, baseDomain() accessor - //--------------------------------------------------------------- - - ++testNumber; - - reportResults(testNumber," baseDomain() accessor",testStatus); - - - //------------------------------------------------------------ - // test 102: CompressibleBrick constructor, strides() accessor - //------------------------------------------------------------ - - ++testNumber; - - reportResults(testNumber," strides() accessor",testStatus); - - - ---------------- end templates for remaining constructors -------------*/ - - - //------------------------------------------------------------------------ - // test 103: BrickViewEngine copy constructor (all BrickView constructors) - //------------------------------------------------------------------------ - - ++testNumber; - - // Range/Interval - - Ilen = box3[0].length(); - Jlen = box3[1].length(); - Klen = box3[2].length(); - - for (int i = 0; i < Ilen; i++) - for (int j = 0; j < Jlen; j++) - for (int k = 0; k < Klen; k++) - diff += fabs(BV5.read(i,j,k) - BV7(Loc<3>(i,j,k))); - testStatus = (diff == zero); - - Ilen = square2[0].length(); - Jlen = square2[1].length(); - - for (int i = 0; i < Ilen; i++) - for (int j = 0; j < Jlen; j++) - diff += fabs(BV8(i,j) - BV1(i,j)); - testStatus = (diff == zero) && testStatus; - - - // SliceRange - - float4DV3_t BV11(BV10); - - Ilen = d13[0].length(); - Jlen = d13[1].length(); - Klen = d13[2].length(); - Llen = d13[3].length(); - - diff = zero; - for(int i = 0; i < Ilen; i++) - for(int j = 0; j < Jlen; j++) - for(int k = 0; k < Klen; k++) - for(int l = 0; l < Llen; l++) - diff += fabs(BV10(i,j,k,l) - BV11(i,j,k,l)); - testStatus = (diff == zero) && testStatus; - - - // SliceInterval - - float2DV2_t BV13(BV12); - Ilen = d15[0].length(); - Jlen = d15[1].length(); - - diff = zero; - for(int i = 0; i < Ilen; i++) - for(int j = 0; j < Jlen; j++) - diff += fabs(BV13(i,j) - BV12(i,j)); - testStatus = (diff == zero) && testStatus; - - - // Node - - int6DV1_t BV15(BV14); - Ilen = d18[5].length(); - - diff = zero; - for(int i = 0; i < Ilen; i++) - diff += abs(BV15.read(0,0,0,0,0,i) - BV14(Loc<6>(0,0,0,0,0,i))); - testStatus = (diff == zero) && testStatus; - - - // INode - - int6DV1_t BV17(BV16); - Ilen = d20[0].length(); - Jlen = d20[1].length(); - - diff = zero; - for(int i = 0; i < Ilen; i++) - for(int j = 0; j < Jlen; j++) - diff += abs(BV17.read(0,i,j,0,0,0) - BV16(Loc<6>(0,i,j,0,0,0))); - testStatus = (diff == zero) && testStatus; - - - // --- add tests for additional constructors (corresponding to - // --- tests 62-102) here. - - reportResults(testNumber,"copy constructor (all BrickView constructors)", - testStatus); - - } - catch(const char *err) - { uncaughtErrorReport(err,testNumber); } - catch(const Pooma::Assertion &err) - { uncaughtErrorReport(err.what(),testNumber); } - catch(...) - { cerr << "Unknown exception!" << endl; } - - cout << "\n" << endl; - } - --- 0 ---- From oldham at codesourcery.com Fri Oct 5 02:43:26 2001 From: oldham at codesourcery.com (Jeffrey Oldham) Date: Thu, 4 Oct 2001 19:43:26 -0700 Subject: Using Tau and PDToolkit Message-ID: <20011004194326.A16559@codesourcery.com> (Mark, would you please post the two attached tar files at the Pooma WWW site?) (For Linux, these instructions presume patching the .conf files, a patch that is awaiting approval.) (Where should I more permanently store these instructions?) These are the steps I used to install Tau on my sequential Linux and an Irix/KCC computers. Extract Tau 2.9.21 and PdToolkit 2.0b1: tar xzvf pdtoolkit-2.0b1.tar.gz tar xzvf tau-2.9.21b.tgz To install PDToolkit 2.0b1: ./configure -GNU # use g++ to compile the library OR ./configure -KCC -arch=IRIXN32 && make -j # Use '-arch' only for Irix. make make install make clean To install (modified) Tau 2.9.21: ./configure -gnu -noex -PROFILE -pdt=${HOME}/pooma/pdtoolkit-2.0b1 -useropt='-static -DTAU_DOT_H_LESS_HEADERS' # Pooma's default is no exceptions. # -gnu = use g++ and gcc # -pdt specifies the location of the PDToolkit # I also added '-useropt='-static -g -DTAU_DOT_H_LESS_HEADERS' ' # to ensure, among other things, '.h'-less header files are used. OR ./configure -c++=KCC -arch=sgin32 -noex -PROFILE -SGITIMERS -pdt=${HOME}/pooma/pdtoolkit-2.0b1 # Use '-arch' only for Irix. make install make tests cd i386_linux/lib # Modify according to your architecture. mv Makefile.tau-noex Makefile.tau-gcc-noex # Modify according to compiler. The last two commands rename a Makefile to record the associated compiler, as needed by Pooma. For example, one can replace "gcc" with ?"KCC"?. (Irix/KCC did not need this change.) The Tau and Pooma configuration files have diverged. If using Linux, patch the appropriate Pooma config/arch configuration file: Add a line defining '$profile_archtype' to "i386_linux" (including quotation marks) and modify '$profile_lib_subdir' to use '$profile_archtype' instead of the hard-coded string. See the attached patch. First, make set the environment variables TAUDIR and PDTDIR to the appropriate source locations. For example, I added these two lines to my ${HOME}/.profile: export TAUDIR=${HOME}/pooma/tau-2.9.21 export PDTDIR=${HOME}/pooma/pdtoolkit-2.0b1 I also added '${TAUDIR}/i386_linux/bin:${PDTDIR}/linux/bin' to ${PATH}. By default, Pooma will use PDToolkit to instrument all .cpp files. To do so, provide '--profile' as a configuration option: ./configure --arch LINUXgcc --bounds --debug --profile Some Pooma source code changes will be necessary to permit parsing by the PDT parser. Thanks, Jeffrey D. Oldham oldham at codesourcery.com -------------- next part -------------- A non-text attachment was scrubbed... Name: pdtoolkit-2.0b1.tar.gz Type: application/x-gzip Size: 12154264 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: tau-2.9.21b.tgz Type: application/x-gzip Size: 576487 bytes Desc: not available URL: From oldham at codesourcery.com Fri Oct 5 23:42:37 2001 From: oldham at codesourcery.com (Jeffrey Oldham) Date: Fri, 5 Oct 2001 16:42:37 -0700 Subject: Tau Instrumenting Pooma Header Files: Status Report Message-ID: <200110052342.f95NgbD04339@oz.codesourcery.com> The current status: Scott Haney and Mark Mitchell want the ability to automatically add Tau instrumentation function to all non-inline functions. 1) Using the libraries I distributed yesterday and configuration patches awaiting approval, profiling Pooma *.cmpl.cpp files occurs automatically after configuring with '--profile'. 2) Sameer Shende graciously sent a revised Tau that does not instrument inline functions. 3) I modified the Pooma configury scripts to create a directory full of instrumented header files. Unfortunately, the PDToolkit parser incorrectly analyzes several header files. I sent an error report to Sameer concerning one. Others will require some special handling on our part. In the meantime, I sent a script to Stephen Smith permitting instrumenting of one particular header file. This script is applied by hand and reversed by hand. No future work: I am stopping work on instrumenting header files for now. After receiving a fix from Sameer, it will probably take at least one more working day to resolve the remaining instrumenting problems. Mark Mitchell and Scott Haney will need to indicate if this work is really necessary. Unless otherwise directed, I will discard my work. The technique to instrument header files: Instrumented versions of *.cmpl.cpp files are stored in $(SUITE) subdirectories and compiled there. This technique does not work for header files because users of header file name hard-coded path names in their files. Thus, we store the instrumented header files in the directory tree 'src/$(SUITE)' and '-I.../src/$(SUITE)' is added at the beginning of compilation commands so the instrumented header files are used. Header files may change between compilations, and we want the corresponding instrumented version to be updated when necessary. Thus, dependencies and gnu-make pattern rules cause the needed instrumented header files to be created. If you want the patch to configure config/Shared/compilerules.mk config/Shared/dependo.pl config/Shared/rules.mk config/Shared/tail.mk, send me email. (~/pooma/pooma4/) Thanks, Jeffrey D. Oldham oldham at codesourcery.com From oldham at codesourcery.com Sat Oct 6 00:19:46 2001 From: oldham at codesourcery.com (Jeffrey Oldham) Date: Fri, 5 Oct 2001 17:19:46 -0700 Subject: Patch: Change Conf Files to Support Tau Message-ID: <20011005171946.A4436@codesourcery.com> 2001-10-05 Jeffrey D. Oldham All these changes were motivated by TAU's use of 'i386_linux' rather than 'linux'. Thus a new variable '$profile_archtype' is introduced. Furthermore, for most configuration files, this equals '$archtype' so the latter variable definition is moved up in the file and all occurrences of its value are replaced by '$archtype'. * configure: For TAUINSTR and TAUPARSE, use '$profile_archtype'. * config/arch/LINUXEGCS.conf: See the description above. * config/arch/LINUXKCC.conf: Likewise. * config/arch/LINUXgcc.conf: Likewise. * config/arch/SGI64CC.conf: Likewise. * config/arch/SGI64EGCS.conf: Likewise. * config/arch/SGI64KCC.conf: Likewise. * config/arch/SGI64gcc.conf: Likewise. * config/arch/SGIN32CC.conf: Likewise. * config/arch/SGIN32EGCS.conf: Likewise. * config/arch/SGIN32KCC.conf: Likewise. * config/arch/SGIN32gcc.conf: Likewise. * config/arch/SUNKCC.conf: Likewise. Testing: only LINUXgcc.conf tested by its use to compile Pooma library and several executables Applied to mainline Approved by Stephen Smith Thanks, Jeffrey D. Oldham oldham at codesourcery.com -------------- next part -------------- Index: configure =================================================================== RCS file: /home/pooma/Repository/r2/configure,v retrieving revision 1.104 diff -c -p -r1.104 configure *** configure 2001/08/06 16:20:33 1.104 --- configure 2001/10/05 21:02:57 *************** sub writesuitefile *** 1928,1935 **** print FSUITE "include $profile_dir/$profile_lib_subdir/$profile_include_makefile\n"; print FSUITE "TAUPROFILE = 1\n"; print FSUITE "PDTDIR = $pdt_dir\n"; ! print FSUITE "TAUINSTR = \$(TAUDIR)/$archtype/bin/tau_instrumentor\n"; ! print FSUITE "TAUPARSE = \$(PDTDIR)/$archtype/bin/cxxparse\n"; print FSUITE "\n"; } --- 1928,1935 ---- print FSUITE "include $profile_dir/$profile_lib_subdir/$profile_include_makefile\n"; print FSUITE "TAUPROFILE = 1\n"; print FSUITE "PDTDIR = $pdt_dir\n"; ! print FSUITE "TAUINSTR = \$(TAUDIR)/$profile_archtype/bin/tau_instrumentor\n"; ! print FSUITE "TAUPARSE = \$(PDTDIR)/$profile_archtype/bin/cxxparse\n"; print FSUITE "\n"; } Index: config/arch/LINUXEGCS.conf =================================================================== RCS file: /home/pooma/Repository/r2/config/arch/LINUXEGCS.conf,v retrieving revision 1.24 diff -c -p -r1.24 LINUXEGCS.conf *** config/arch/LINUXEGCS.conf 2001/08/06 16:23:28 1.24 --- config/arch/LINUXEGCS.conf 2001/10/05 21:02:57 *************** *** 47,52 **** --- 47,58 ---- ########################################################################### ########################################################################### + # Section 0: architecture type + ########################################################################### + + $archtype = "linux"; + + ########################################################################### # Section 1: external package locations. # Include search directories should have a '-I' prepended. # Library search directories should have a '-L' prepended. *************** *** 58,64 **** $threads_able = 1; $threads_default_dir = "/home/smarts/build/smarts-current"; ! $threads_lib_subdir = "linux/lib"; $threads_basic_makefile = "Makefile.smarts-g++"; $threads_profile_makefile = "Makefile.smarts-tau-g++"; --- 64,70 ---- $threads_able = 1; $threads_default_dir = "/home/smarts/build/smarts-current"; ! $threads_lib_subdir = "$archtype/lib"; $threads_basic_makefile = "Makefile.smarts-g++"; $threads_profile_makefile = "Makefile.smarts-tau-g++"; *************** $threads_profile_makefile = "Makefile.sm *** 68,74 **** $profile_able = 1; $profile_default_dir = "/home/tau/build/tau-current"; $ductape_default_dir = "/usr/local/pooma/packages/ductape"; ! $profile_lib_subdir = "linux/lib"; $profile_basic_makefile = "Makefile.tau-egcs"; $profile_smarts_makefile = "Makefile.tau-smarts-egcs"; $profile_pthreads_makefile = "Makefile.tau-pthread-egcs"; --- 74,81 ---- $profile_able = 1; $profile_default_dir = "/home/tau/build/tau-current"; $ductape_default_dir = "/usr/local/pooma/packages/ductape"; ! $profile_archtype = "i386_linux"; ! $profile_lib_subdir = "$profile_archtype/lib"; $profile_basic_makefile = "Makefile.tau-egcs"; $profile_smarts_makefile = "Makefile.tau-smarts-egcs"; $profile_pthreads_makefile = "Makefile.tau-pthread-egcs"; *************** $profile_pthreads_makefile = "Makefile.t *** 78,84 **** $paws_able = 1; $paws_default_dir = "/home/paws/build/paws-current"; ! $paws_lib_subdir = "linux/lib"; $paws_makefile = "Makefile.paws-egcs"; --- 85,91 ---- $paws_able = 1; $paws_default_dir = "/home/paws/build/paws-current"; ! $paws_lib_subdir = "$archtype/lib"; $paws_makefile = "Makefile.paws-egcs"; *************** $hdf5_default_dir = "/usr/local *** 91,104 **** ### location of FFTW files for ffts $fftw_able = 1; ! $fftw_default_dir = "/home/pooma/packages/fftw/linux"; ### location of cheetah $cheetah_able = 1; $cheetah_default_dir = "/home/cheetah/build/cheetah-1.0.0"; ! $cheetah_arch = "linux"; $cheetah_lib_subdir = "lib/g++"; $cheetah_include_makefile = "Makefile.cheetah"; --- 98,111 ---- ### location of FFTW files for ffts $fftw_able = 1; ! $fftw_default_dir = "/home/pooma/packages/fftw/$archtype"; ### location of cheetah $cheetah_able = 1; $cheetah_default_dir = "/home/cheetah/build/cheetah-1.0.0"; ! $cheetah_arch = "$archtype"; $cheetah_lib_subdir = "lib/g++"; $cheetah_include_makefile = "Makefile.cheetah"; *************** $ld_insure_arg = "-Zvm -Zoi \"compiler *** 136,144 **** ### characteristics ################### - ### the name of this architecture - - $archtype = "linux"; $comptype = "egcs"; $compext = "-egcs"; --- 143,148 ---- Index: config/arch/LINUXKCC.conf =================================================================== RCS file: /home/pooma/Repository/r2/config/arch/LINUXKCC.conf,v retrieving revision 1.34 diff -c -p -r1.34 LINUXKCC.conf *** config/arch/LINUXKCC.conf 2001/08/06 16:23:28 1.34 --- config/arch/LINUXKCC.conf 2001/10/05 21:02:57 *************** *** 47,52 **** --- 47,58 ---- ########################################################################### ########################################################################### + # Section 0: architecture type + ########################################################################### + + $archtype = "linux"; + + ########################################################################### # Section 1: external package locations. # Include search directories should have a '-I' prepended. # Library search directories should have a '-L' prepended. *************** *** 58,64 **** $threads_able = 1; $threads_default_dir = "/home/smarts/build/smarts-current"; ! $threads_lib_subdir = "linux/lib"; $threads_basic_makefile = "Makefile.smarts-kcc"; $threads_profile_makefile = "Makefile.smarts-tau-kcc"; --- 64,70 ---- $threads_able = 1; $threads_default_dir = "/home/smarts/build/smarts-current"; ! $threads_lib_subdir = "$archtype/lib"; $threads_basic_makefile = "Makefile.smarts-kcc"; $threads_profile_makefile = "Makefile.smarts-tau-kcc"; *************** $threads_profile_makefile = "Makefile.sm *** 68,74 **** $profile_able = 1; $profile_default_dir = "/home/tau/build/tau-current"; $ductape_default_dir = "/usr/local/pooma/packages/ductape"; ! $profile_lib_subdir = "linux/lib"; $profile_basic_makefile = "Makefile.tau-kcc"; $profile_smarts_makefile = "Makefile.tau-smarts-kcc"; $profile_pthreads_makefile = "Makefile.tau-pthread-kcc"; --- 74,81 ---- $profile_able = 1; $profile_default_dir = "/home/tau/build/tau-current"; $ductape_default_dir = "/usr/local/pooma/packages/ductape"; ! $profile_archtype = "i386_linux"; ! $profile_lib_subdir = "$profile_archtype/lib"; $profile_basic_makefile = "Makefile.tau-kcc"; $profile_smarts_makefile = "Makefile.tau-smarts-kcc"; $profile_pthreads_makefile = "Makefile.tau-pthread-kcc"; *************** $profile_pthreads_makefile = "Makefile.t *** 78,84 **** $paws_able = 1; $paws_default_dir = "/home/paws/build/paws-current"; ! $paws_lib_subdir = "linux/lib"; $paws_makefile = "Makefile.paws-kcc"; --- 85,91 ---- $paws_able = 1; $paws_default_dir = "/home/paws/build/paws-current"; ! $paws_lib_subdir = "$archtype/lib"; $paws_makefile = "Makefile.paws-kcc"; *************** $hdf5_default_dir = "/usr/local *** 91,104 **** ### location of FFTW files for ffts $fftw_able = 1; ! $fftw_default_dir = "/home/pooma/packages/fftw/linux"; ### location of cheetah $cheetah_able = 1; $cheetah_default_dir = "/home/cheetah/build/cheetah-1.0.0"; ! $cheetah_arch = "linux"; $cheetah_lib_subdir = "lib/KCC"; $cheetah_include_makefile = "Makefile.cheetah"; --- 98,111 ---- ### location of FFTW files for ffts $fftw_able = 1; ! $fftw_default_dir = "/home/pooma/packages/fftw/$archtype"; ### location of cheetah $cheetah_able = 1; $cheetah_default_dir = "/home/cheetah/build/cheetah-1.0.0"; ! $cheetah_arch = "$archtype"; $cheetah_lib_subdir = "lib/KCC"; $cheetah_include_makefile = "Makefile.cheetah"; *************** $insure_able = 0; *** 126,134 **** ### characteristics ################### - ### the name of this architecture - - $archtype = "linux"; $comptype = "kcc"; $compext = "-kcc"; --- 133,138 ---- Index: config/arch/LINUXgcc.conf =================================================================== RCS file: /home/pooma/Repository/r2/config/arch/LINUXgcc.conf,v retrieving revision 1.2 diff -c -p -r1.2 LINUXgcc.conf *** config/arch/LINUXgcc.conf 2001/08/06 16:23:28 1.2 --- config/arch/LINUXgcc.conf 2001/10/05 21:02:57 *************** *** 47,52 **** --- 47,58 ---- ########################################################################### ########################################################################### + # Section 0: architecture type + ########################################################################### + + $archtype = "linux"; + + ########################################################################### # Section 1: external package locations. # Include search directories should have a '-I' prepended. # Library search directories should have a '-L' prepended. *************** *** 58,64 **** $threads_able = 1; $threads_default_dir = "/home/smarts/build/smarts-current"; ! $threads_lib_subdir = "linux/lib"; $threads_basic_makefile = "Makefile.smarts-g++"; $threads_profile_makefile = "Makefile.smarts-tau-g++"; --- 64,70 ---- $threads_able = 1; $threads_default_dir = "/home/smarts/build/smarts-current"; ! $threads_lib_subdir = "$archtype/lib"; $threads_basic_makefile = "Makefile.smarts-g++"; $threads_profile_makefile = "Makefile.smarts-tau-g++"; *************** $threads_profile_makefile = "Makefile.sm *** 68,74 **** $profile_able = 1; $profile_default_dir = "/home/tau/build/tau-current"; $ductape_default_dir = "/usr/local/pooma/packages/ductape"; ! $profile_lib_subdir = "linux/lib"; $profile_basic_makefile = "Makefile.tau-gcc"; $profile_smarts_makefile = "Makefile.tau-smarts-gcc"; $profile_pthreads_makefile = "Makefile.tau-pthread-gcc"; --- 74,81 ---- $profile_able = 1; $profile_default_dir = "/home/tau/build/tau-current"; $ductape_default_dir = "/usr/local/pooma/packages/ductape"; ! $profile_archtype = "i386_linux"; ! $profile_lib_subdir = "$profile_archtype/lib"; $profile_basic_makefile = "Makefile.tau-gcc"; $profile_smarts_makefile = "Makefile.tau-smarts-gcc"; $profile_pthreads_makefile = "Makefile.tau-pthread-gcc"; *************** $profile_pthreads_makefile = "Makefile.t *** 78,84 **** $paws_able = 1; $paws_default_dir = "/home/paws/build/paws-current"; ! $paws_lib_subdir = "linux/lib"; $paws_makefile = "Makefile.paws-gcc"; --- 85,91 ---- $paws_able = 1; $paws_default_dir = "/home/paws/build/paws-current"; ! $paws_lib_subdir = "$archtype/lib"; $paws_makefile = "Makefile.paws-gcc"; *************** $hdf5_default_dir = "/usr/local *** 91,104 **** ### location of FFTW files for ffts $fftw_able = 1; ! $fftw_default_dir = "/home/pooma/packages/fftw/linux"; ### location of cheetah $cheetah_able = 1; $cheetah_default_dir = "/home/cheetah/build/cheetah-1.0.0"; ! $cheetah_arch = "linux"; $cheetah_lib_subdir = "lib/g++"; $cheetah_include_makefile = "Makefile.cheetah"; --- 98,111 ---- ### location of FFTW files for ffts $fftw_able = 1; ! $fftw_default_dir = "/home/pooma/packages/fftw/$archtype"; ### location of cheetah $cheetah_able = 1; $cheetah_default_dir = "/home/cheetah/build/cheetah-1.0.0"; ! $cheetah_arch = "$archtype"; $cheetah_lib_subdir = "lib/g++"; $cheetah_include_makefile = "Makefile.cheetah"; *************** $ld_insure_arg = "-Zvm -Zoi \"compiler *** 136,144 **** ### characteristics ################### - ### the name of this architecture - - $archtype = "linux"; $comptype = "gcc"; $compext = "-gcc"; --- 143,148 ---- Index: config/arch/SGI64CC.conf =================================================================== RCS file: /home/pooma/Repository/r2/config/arch/SGI64CC.conf,v retrieving revision 1.41 diff -c -p -r1.41 SGI64CC.conf *** config/arch/SGI64CC.conf 2001/08/06 16:23:28 1.41 --- config/arch/SGI64CC.conf 2001/10/05 21:02:57 *************** *** 47,52 **** --- 47,58 ---- ########################################################################### ########################################################################### + # Section 0: architecture type + ########################################################################### + + $archtype = "sgi64"; + + ########################################################################### # Section 1: external package locations. # Include search directories should have a '-I' prepended. # Library search directories should have a '-L' prepended. *************** *** 58,64 **** $threads_able = 1; $threads_default_dir = "/home/smarts/build/smarts-current"; ! $threads_lib_subdir = "sgi64/lib"; $threads_basic_makefile = "Makefile.smarts-CC"; $threads_profile_makefile = "Makefile.smarts-tau"; --- 64,70 ---- $threads_able = 1; $threads_default_dir = "/home/smarts/build/smarts-current"; ! $threads_lib_subdir = "$archtype/lib"; $threads_basic_makefile = "Makefile.smarts-CC"; $threads_profile_makefile = "Makefile.smarts-tau"; *************** $threads_profile_makefile = "Makefile.sm *** 68,74 **** $profile_able = 1; $profile_default_dir = "/home/tau/build/tau-current"; $ductape_default_dir = "/usr/local/pooma/packages/ductape"; ! $profile_lib_subdir = "sgi64/lib"; $profile_basic_makefile = "Makefile.tau-sgitimers"; $profile_smarts_makefile = "Makefile.tau-sgitimers-smarts"; $profile_pthreads_makefile = "Makefile.tau-sgitimers-pthread"; --- 74,81 ---- $profile_able = 1; $profile_default_dir = "/home/tau/build/tau-current"; $ductape_default_dir = "/usr/local/pooma/packages/ductape"; ! $profile_archtype = "$archtype"; ! $profile_lib_subdir = "$profile_archtype/lib"; $profile_basic_makefile = "Makefile.tau-sgitimers"; $profile_smarts_makefile = "Makefile.tau-sgitimers-smarts"; $profile_pthreads_makefile = "Makefile.tau-sgitimers-pthread"; *************** $profile_pthreads_makefile = "Makefile.t *** 78,84 **** $paws_able = 1; $paws_default_dir = "/home/paws/build/paws-current"; ! $paws_lib_subdir = "sgi64/lib"; $paws_makefile = "Makefile.paws"; --- 85,91 ---- $paws_able = 1; $paws_default_dir = "/home/paws/build/paws-current"; ! $paws_lib_subdir = "$archtype/lib"; $paws_makefile = "Makefile.paws"; *************** $hdf5_default_dir = "/usr/local *** 92,98 **** $cheetah_able = 1; $cheetah_default_dir = "/home/cheetah/build/cheetah-1.0.0"; ! $cheetah_arch = "sgi64"; $cheetah_lib_subdir = "lib/CC"; $cheetah_include_makefile = "Makefile.cheetah"; --- 99,105 ---- $cheetah_able = 1; $cheetah_default_dir = "/home/cheetah/build/cheetah-1.0.0"; ! $cheetah_arch = "$archtype"; $cheetah_lib_subdir = "lib/CC"; $cheetah_include_makefile = "Makefile.cheetah"; *************** $sgibits = "-64 -mips4"; *** 133,141 **** ### characteristics ################### - ### the name of this architecture - - $archtype = "sgi64"; $comptype = "CC"; ### are shared libraries supported? --- 140,145 ---- Index: config/arch/SGI64EGCS.conf =================================================================== RCS file: /home/pooma/Repository/r2/config/arch/SGI64EGCS.conf,v retrieving revision 1.39 diff -c -p -r1.39 SGI64EGCS.conf *** config/arch/SGI64EGCS.conf 2001/08/06 16:23:28 1.39 --- config/arch/SGI64EGCS.conf 2001/10/05 21:02:57 *************** *** 47,52 **** --- 47,58 ---- ########################################################################### ########################################################################### + # Section 0: architecture type + ########################################################################### + + $archtype = "sgi64"; + + ########################################################################### # Section 1: external package locations. # Include search directories should have a '-I' prepended. # Library search directories should have a '-L' prepended. *************** *** 58,64 **** $threads_able = 1; $threads_default_dir = "/home/smarts/build/smarts-current"; ! $threads_lib_subdir = "sgi64/lib"; $threads_basic_makefile = "Makefile.smarts-g++"; $threads_profile_makefile = "Makefile.smarts-tau-g++"; --- 64,70 ---- $threads_able = 1; $threads_default_dir = "/home/smarts/build/smarts-current"; ! $threads_lib_subdir = "$archtype/lib"; $threads_basic_makefile = "Makefile.smarts-g++"; $threads_profile_makefile = "Makefile.smarts-tau-g++"; *************** $threads_profile_makefile = "Makefile.sm *** 68,74 **** $profile_able = 1; $profile_default_dir = "/home/tau/build/tau-current"; $ductape_default_dir = "/usr/local/pooma/packages/ductape"; ! $profile_lib_subdir = "sgi64/lib"; $profile_basic_makefile = "Makefile.tau-sgitimers-egcs"; $profile_smarts_makefile = "Makefile.tau-sgitimers-smarts-egcs"; $profile_pthreads_makefile = "Makefile.tau-sgitimers-pthread-egcs"; --- 74,81 ---- $profile_able = 1; $profile_default_dir = "/home/tau/build/tau-current"; $ductape_default_dir = "/usr/local/pooma/packages/ductape"; ! $profile_archtype = "$archtype"; ! $profile_lib_subdir = "$profile_archtype/lib"; $profile_basic_makefile = "Makefile.tau-sgitimers-egcs"; $profile_smarts_makefile = "Makefile.tau-sgitimers-smarts-egcs"; $profile_pthreads_makefile = "Makefile.tau-sgitimers-pthread-egcs"; *************** $profile_pthreads_makefile = "Makefile.t *** 78,84 **** $paws_able = 1; $paws_default_dir = "/home/paws/build/paws-current"; ! $paws_lib_subdir = "sgi64/lib"; $paws_makefile = "Makefile.paws-egcs"; --- 85,91 ---- $paws_able = 1; $paws_default_dir = "/home/paws/build/paws-current"; ! $paws_lib_subdir = "$archtype/lib"; $paws_makefile = "Makefile.paws-egcs"; *************** $hdf5_default_dir = "/usr/local *** 92,98 **** $cheetah_able = 1; $cheetah_default_dir = "/home/cheetah/build/cheetah-1.0.0"; ! $cheetah_arch = "sgi64"; $cheetah_lib_subdir = "lib/g++"; $cheetah_include_makefile = "Makefile.cheetah"; --- 99,105 ---- $cheetah_able = 1; $cheetah_default_dir = "/home/cheetah/build/cheetah-1.0.0"; ! $cheetah_arch = "$archtype"; $cheetah_lib_subdir = "lib/g++"; $cheetah_include_makefile = "Makefile.cheetah"; *************** $sgibits = "-mabi=64 -mips4"; *** 133,141 **** ### characteristics ################### - ### the name of this architecture - - $archtype = "sgi64"; $comptype = "egcs"; $compext = "-egcs"; --- 140,145 ---- Index: config/arch/SGI64KCC.conf =================================================================== RCS file: /home/pooma/Repository/r2/config/arch/SGI64KCC.conf,v retrieving revision 1.52 diff -c -p -r1.52 SGI64KCC.conf *** config/arch/SGI64KCC.conf 2001/08/06 16:23:28 1.52 --- config/arch/SGI64KCC.conf 2001/10/05 21:02:57 *************** *** 47,52 **** --- 47,58 ---- ########################################################################### ########################################################################### + # Section 0: architecture type + ########################################################################### + + $archtype = "sgi64"; + + ########################################################################### # Section 1: external package locations. # Include search directories should have a '-I' prepended. # Library search directories should have a '-L' prepended. *************** *** 58,64 **** $threads_able = 1; $threads_default_dir = "/home/smarts/build/smarts-current"; ! $threads_lib_subdir = "sgi64/lib"; $threads_basic_makefile = "Makefile.smarts-kcc"; $threads_profile_makefile = "Makefile.smarts-tau-kcc"; --- 64,70 ---- $threads_able = 1; $threads_default_dir = "/home/smarts/build/smarts-current"; ! $threads_lib_subdir = "$archtype/lib"; $threads_basic_makefile = "Makefile.smarts-kcc"; $threads_profile_makefile = "Makefile.smarts-tau-kcc"; *************** $threads_profile_makefile = "Makefile.sm *** 68,74 **** $profile_able = 1; $profile_default_dir = "/home/tau/build/tau-current"; $ductape_default_dir = "/usr/local/pooma/packages/ductape"; ! $profile_lib_subdir = "sgi64/lib"; $profile_basic_makefile = "Makefile.tau-sgitimers-kcc"; $profile_smarts_makefile = "Makefile.tau-sgitimers-smarts-kcc"; $profile_pthreads_makefile = "Makefile.tau-sgitimers-pthread-kcc"; --- 74,81 ---- $profile_able = 1; $profile_default_dir = "/home/tau/build/tau-current"; $ductape_default_dir = "/usr/local/pooma/packages/ductape"; ! $profile_archtype = "$archtype"; ! $profile_lib_subdir = "$profile_archtype/lib"; $profile_basic_makefile = "Makefile.tau-sgitimers-kcc"; $profile_smarts_makefile = "Makefile.tau-sgitimers-smarts-kcc"; $profile_pthreads_makefile = "Makefile.tau-sgitimers-pthread-kcc"; *************** $profile_pthreads_makefile = "Makefile.t *** 78,84 **** $paws_able = 1; $paws_default_dir = "/home/paws/build/paws-current"; ! $paws_lib_subdir = "sgi64/lib"; $paws_makefile = "Makefile.paws-kcc"; --- 85,91 ---- $paws_able = 1; $paws_default_dir = "/home/paws/build/paws-current"; ! $paws_lib_subdir = "$archtype/lib"; $paws_makefile = "Makefile.paws-kcc"; *************** $hdf5_default_dir = "/usr/local *** 91,104 **** ### location of FFTW files for ffts $fftw_able = 1; ! $fftw_default_dir = "/usr/local/pooma/packages/fftw/sgi64"; ### location of cheetah $cheetah_able = 1; $cheetah_default_dir = "/home/cheetah/build/cheetah-1.0.0"; ! $cheetah_arch = "sgi64"; $cheetah_lib_subdir = "lib/KCC"; $cheetah_include_makefile = "Makefile.cheetah"; --- 98,111 ---- ### location of FFTW files for ffts $fftw_able = 1; ! $fftw_default_dir = "/usr/local/pooma/packages/fftw/$archtype"; ### location of cheetah $cheetah_able = 1; $cheetah_default_dir = "/home/cheetah/build/cheetah-1.0.0"; ! $cheetah_arch = "$archtype"; $cheetah_lib_subdir = "lib/KCC"; $cheetah_include_makefile = "Makefile.cheetah"; *************** $sgibits = "-64 -mips4"; *** 129,137 **** ### characteristics ################### - ### the name of this architecture - - $archtype = "sgi64"; $comptype = "kcc"; $compext = "-kcc"; --- 136,141 ---- Index: config/arch/SGI64gcc.conf =================================================================== RCS file: /home/pooma/Repository/r2/config/arch/SGI64gcc.conf,v retrieving revision 1.2 diff -c -p -r1.2 SGI64gcc.conf *** config/arch/SGI64gcc.conf 2001/08/06 16:23:28 1.2 --- config/arch/SGI64gcc.conf 2001/10/05 21:02:57 *************** *** 47,52 **** --- 47,58 ---- ########################################################################### ########################################################################### + # Section 0: architecture type + ########################################################################### + + $archtype = "sgi64"; + + ########################################################################### # Section 1: external package locations. # Include search directories should have a '-I' prepended. # Library search directories should have a '-L' prepended. *************** *** 58,64 **** $threads_able = 1; $threads_default_dir = "/home/smarts/build/smarts-current"; ! $threads_lib_subdir = "sgi64/lib"; $threads_basic_makefile = "Makefile.smarts-g++"; $threads_profile_makefile = "Makefile.smarts-tau-g++"; --- 64,70 ---- $threads_able = 1; $threads_default_dir = "/home/smarts/build/smarts-current"; ! $threads_lib_subdir = "$archtype/lib"; $threads_basic_makefile = "Makefile.smarts-g++"; $threads_profile_makefile = "Makefile.smarts-tau-g++"; *************** $threads_profile_makefile = "Makefile.sm *** 68,74 **** $profile_able = 1; $profile_default_dir = "/home/tau/build/tau-current"; $ductape_default_dir = "/usr/local/pooma/packages/ductape"; ! $profile_lib_subdir = "sgi64/lib"; $profile_basic_makefile = "Makefile.tau-sgitimers-gcc"; $profile_smarts_makefile = "Makefile.tau-sgitimers-smarts-gcc"; $profile_pthreads_makefile = "Makefile.tau-sgitimers-pthread-gcc"; --- 74,81 ---- $profile_able = 1; $profile_default_dir = "/home/tau/build/tau-current"; $ductape_default_dir = "/usr/local/pooma/packages/ductape"; ! $profile_archtype = "$archtype"; ! $profile_lib_subdir = "$profile_archtype/lib"; $profile_basic_makefile = "Makefile.tau-sgitimers-gcc"; $profile_smarts_makefile = "Makefile.tau-sgitimers-smarts-gcc"; $profile_pthreads_makefile = "Makefile.tau-sgitimers-pthread-gcc"; *************** $profile_pthreads_makefile = "Makefile.t *** 78,84 **** $paws_able = 1; $paws_default_dir = "/home/paws/build/paws-current"; ! $paws_lib_subdir = "sgi64/lib"; $paws_makefile = "Makefile.paws-gcc"; --- 85,91 ---- $paws_able = 1; $paws_default_dir = "/home/paws/build/paws-current"; ! $paws_lib_subdir = "$archtype/lib"; $paws_makefile = "Makefile.paws-gcc"; *************** $hdf5_default_dir = "/usr/local *** 92,98 **** $cheetah_able = 1; $cheetah_default_dir = "/home/cheetah/build/cheetah-1.0.0"; ! $cheetah_arch = "sgi64"; $cheetah_lib_subdir = "lib/g++"; $cheetah_include_makefile = "Makefile.cheetah"; --- 99,105 ---- $cheetah_able = 1; $cheetah_default_dir = "/home/cheetah/build/cheetah-1.0.0"; ! $cheetah_arch = "$archtype"; $cheetah_lib_subdir = "lib/g++"; $cheetah_include_makefile = "Makefile.cheetah"; *************** $sgibits = "-mabi=64 -mips4"; *** 133,141 **** ### characteristics ################### - ### the name of this architecture - - $archtype = "sgi64"; $comptype = "gcc"; $compext = "-gcc"; --- 140,145 ---- Index: config/arch/SGIN32CC.conf =================================================================== RCS file: /home/pooma/Repository/r2/config/arch/SGIN32CC.conf,v retrieving revision 1.43 diff -c -p -r1.43 SGIN32CC.conf *** config/arch/SGIN32CC.conf 2001/08/06 16:23:28 1.43 --- config/arch/SGIN32CC.conf 2001/10/05 21:02:57 *************** *** 47,52 **** --- 47,58 ---- ########################################################################### ########################################################################### + # Section 0: architecture type + ########################################################################### + + $archtype = "sgin32"; + + ########################################################################### # Section 1: external package locations. # Include search directories should have a '-I' prepended. # Library search directories should have a '-L' prepended. *************** *** 58,64 **** $threads_able = 1; $threads_default_dir = "/home/smarts/build/smarts-current"; ! $threads_lib_subdir = "sgin32/lib"; $threads_basic_makefile = "Makefile.smarts-CC"; $threads_profile_makefile = "Makefile.smarts-tau-CC"; --- 64,70 ---- $threads_able = 1; $threads_default_dir = "/home/smarts/build/smarts-current"; ! $threads_lib_subdir = "$archtype/lib"; $threads_basic_makefile = "Makefile.smarts-CC"; $threads_profile_makefile = "Makefile.smarts-tau-CC"; *************** $threads_profile_makefile = "Makefile.sm *** 68,74 **** $profile_able = 1; $profile_default_dir = "/home/tau/build/tau-current"; $ductape_default_dir = "/usr/local/pooma/packages/ductape"; ! $profile_lib_subdir = "sgin32/lib"; $profile_basic_makefile = "Makefile.tau-sgitimers"; $profile_smarts_makefile = "Makefile.tau-sgitimers-smarts"; $profile_pthreads_makefile = "Makefile.tau-sgitimers-pthread"; --- 74,81 ---- $profile_able = 1; $profile_default_dir = "/home/tau/build/tau-current"; $ductape_default_dir = "/usr/local/pooma/packages/ductape"; ! $profile_archtype = "$archtype"; ! $profile_lib_subdir = "$profile_archtype/lib"; $profile_basic_makefile = "Makefile.tau-sgitimers"; $profile_smarts_makefile = "Makefile.tau-sgitimers-smarts"; $profile_pthreads_makefile = "Makefile.tau-sgitimers-pthread"; *************** $profile_pthreads_makefile = "Makefile.t *** 78,84 **** $paws_able = 1; $paws_default_dir = "/home/paws/build/paws-current"; ! $paws_lib_subdir = "sgin32/lib"; $paws_makefile = "Makefile.paws"; --- 85,91 ---- $paws_able = 1; $paws_default_dir = "/home/paws/build/paws-current"; ! $paws_lib_subdir = "$archtype/lib"; $paws_makefile = "Makefile.paws"; *************** $hdf5_default_dir = "/usr/local *** 92,98 **** $cheetah_able = 1; $cheetah_default_dir = "/home/cheetah/build/cheetah-1.0.0"; ! $cheetah_arch = "sgin32"; $cheetah_lib_subdir = "lib/CC"; $cheetah_include_makefile = "Makefile.cheetah"; --- 99,105 ---- $cheetah_able = 1; $cheetah_default_dir = "/home/cheetah/build/cheetah-1.0.0"; ! $cheetah_arch = "$archtype"; $cheetah_lib_subdir = "lib/CC"; $cheetah_include_makefile = "Makefile.cheetah"; *************** $cheetah_include_makefile = "Makefile.c *** 101,107 **** $lux_able = 1; $lux_default_dir = "/usr/local/pooma/packages/lux/aclvis-2.0"; ! $lux_lib_subdir = "sgin32/lib"; $lux_makefile = "Makefile.aclvis"; --- 108,114 ---- $lux_able = 1; $lux_default_dir = "/usr/local/pooma/packages/lux/aclvis-2.0"; ! $lux_lib_subdir = "$archtype/lib"; $lux_makefile = "Makefile.aclvis"; *************** $sgibits = "-n32 -mips4"; *** 137,145 **** ### characteristics ################### - ### the name of this architecture - - $archtype = "sgin32"; $comptype = "CC"; ### are shared libraries supported? --- 144,149 ---- Index: config/arch/SGIN32EGCS.conf =================================================================== RCS file: /home/pooma/Repository/r2/config/arch/SGIN32EGCS.conf,v retrieving revision 1.34 diff -c -p -r1.34 SGIN32EGCS.conf *** config/arch/SGIN32EGCS.conf 2001/08/06 16:23:28 1.34 --- config/arch/SGIN32EGCS.conf 2001/10/05 21:02:57 *************** *** 47,52 **** --- 47,58 ---- ########################################################################### ########################################################################### + # Section 0: architecture type + ########################################################################### + + $archtype = "sgin32"; + + ########################################################################### # Section 1: external package locations. # Include search directories should have a '-I' prepended. # Library search directories should have a '-L' prepended. *************** *** 58,64 **** $threads_able = 1; $threads_default_dir = "/home/smarts/build/smarts-current"; ! $threads_lib_subdir = "sgin32/lib"; $threads_basic_makefile = "Makefile.smarts-egcs"; $threads_profile_makefile = "Makefile.smarts-tau-egcs"; --- 64,70 ---- $threads_able = 1; $threads_default_dir = "/home/smarts/build/smarts-current"; ! $threads_lib_subdir = "$archtype/lib"; $threads_basic_makefile = "Makefile.smarts-egcs"; $threads_profile_makefile = "Makefile.smarts-tau-egcs"; *************** $threads_profile_makefile = "Makefile.sm *** 68,74 **** $profile_able = 1; $profile_default_dir = "/home/tau/build/tau-current"; $ductape_default_dir = "/usr/local/pooma/packages/ductape"; ! $profile_lib_subdir = "sgin32/lib"; $profile_basic_makefile = "Makefile.tau-sgitimers-egcs"; $profile_smarts_makefile = "Makefile.tau-sgitimers-smarts-egcs"; $profile_pthreads_makefile = "Makefile.tau-sgitimers-pthread-egcs"; --- 74,81 ---- $profile_able = 1; $profile_default_dir = "/home/tau/build/tau-current"; $ductape_default_dir = "/usr/local/pooma/packages/ductape"; ! $profile_archtype = "$archtype"; ! $profile_lib_subdir = "$profile_archtype/lib"; $profile_basic_makefile = "Makefile.tau-sgitimers-egcs"; $profile_smarts_makefile = "Makefile.tau-sgitimers-smarts-egcs"; $profile_pthreads_makefile = "Makefile.tau-sgitimers-pthread-egcs"; *************** $profile_pthreads_makefile = "Makefile.t *** 78,84 **** $paws_able = 1; $paws_default_dir = "/home/paws/build/paws-current"; ! $paws_lib_subdir = "sgin32/lib"; $paws_makefile = "Makefile.paws-egcs"; --- 85,91 ---- $paws_able = 1; $paws_default_dir = "/home/paws/build/paws-current"; ! $paws_lib_subdir = "$archtype/lib"; $paws_makefile = "Makefile.paws-egcs"; *************** $hdf5_default_dir = "/usr/local *** 92,98 **** $cheetah_able = 1; $cheetah_default_dir = "/home/cheetah/build/cheetah-1.0.0"; ! $cheetah_arch = "sgin32"; $cheetah_lib_subdir = "lib/g++"; $cheetah_include_makefile = "Makefile.cheetah"; --- 99,105 ---- $cheetah_able = 1; $cheetah_default_dir = "/home/cheetah/build/cheetah-1.0.0"; ! $cheetah_arch = "$archtype"; $cheetah_lib_subdir = "lib/g++"; $cheetah_include_makefile = "Makefile.cheetah"; *************** $sgibits = "-mabi=n32 -mips4"; *** 133,141 **** ### characteristics ################### - ### the name of this architecture - - $archtype = "sgin32"; $comptype = "egcs"; $compext = "-egcs"; --- 140,145 ---- Index: config/arch/SGIN32KCC.conf =================================================================== RCS file: /home/pooma/Repository/r2/config/arch/SGIN32KCC.conf,v retrieving revision 1.43 diff -c -p -r1.43 SGIN32KCC.conf *** config/arch/SGIN32KCC.conf 2001/08/06 16:23:28 1.43 --- config/arch/SGIN32KCC.conf 2001/10/05 21:02:57 *************** *** 47,52 **** --- 47,58 ---- ########################################################################### ########################################################################### + # Section 0: architecture type + ########################################################################### + + $archtype = "sgin32"; + + ########################################################################### # Section 1: external package locations. # Include search directories should have a '-I' prepended. # Library search directories should have a '-L' prepended. *************** *** 58,64 **** $threads_able = 1; $threads_default_dir = "/home/smarts/build/smarts-current"; ! $threads_lib_subdir = "sgin32/lib"; $threads_basic_makefile = "Makefile.smarts-kcc"; $threads_profile_makefile = "Makefile.smarts-tau-kcc"; --- 64,70 ---- $threads_able = 1; $threads_default_dir = "/home/smarts/build/smarts-current"; ! $threads_lib_subdir = "$archtype/lib"; $threads_basic_makefile = "Makefile.smarts-kcc"; $threads_profile_makefile = "Makefile.smarts-tau-kcc"; *************** $threads_profile_makefile = "Makefile.sm *** 68,74 **** $profile_able = 1; $profile_default_dir = "/home/tau/build/tau-current"; $ductape_default_dir = "/usr/local/pooma/packages/ductape"; ! $profile_lib_subdir = "sgin32/lib"; $profile_basic_makefile = "Makefile.tau-sgitimers-kcc"; $profile_smarts_makefile = "Makefile.tau-sgitimers-smarts-kcc"; $profile_pthreads_makefile = "Makefile.tau-sgitimers-pthread-kcc"; --- 74,81 ---- $profile_able = 1; $profile_default_dir = "/home/tau/build/tau-current"; $ductape_default_dir = "/usr/local/pooma/packages/ductape"; ! $profile_archtype = "$archtype"; ! $profile_lib_subdir = "$profile_archtype/lib"; $profile_basic_makefile = "Makefile.tau-sgitimers-kcc"; $profile_smarts_makefile = "Makefile.tau-sgitimers-smarts-kcc"; $profile_pthreads_makefile = "Makefile.tau-sgitimers-pthread-kcc"; *************** $profile_pthreads_makefile = "Makefile.t *** 78,84 **** $paws_able = 1; $paws_default_dir = "/home/paws/build/paws-current"; ! $paws_lib_subdir = "sgin32/lib"; $paws_makefile = "Makefile.paws-kcc"; --- 85,91 ---- $paws_able = 1; $paws_default_dir = "/home/paws/build/paws-current"; ! $paws_lib_subdir = "$archtype/lib"; $paws_makefile = "Makefile.paws-kcc"; *************** $hdf5_default_dir = "/usr/local *** 92,98 **** $cheetah_able = 1; $cheetah_default_dir = "/home/cheetah/build/cheetah-1.0.0"; ! $cheetah_arch = "sgin32"; $cheetah_lib_subdir = "lib/KCC"; $cheetah_include_makefile = "Makefile.cheetah"; --- 99,105 ---- $cheetah_able = 1; $cheetah_default_dir = "/home/cheetah/build/cheetah-1.0.0"; ! $cheetah_arch = "$archtype"; $cheetah_lib_subdir = "lib/KCC"; $cheetah_include_makefile = "Makefile.cheetah"; *************** $sgibits = "-n32 -mips4"; *** 124,132 **** ### characteristics ################### - ### the name of this architecture - - $archtype = "sgin32"; $comptype = "kcc"; $compext = "-kcc"; --- 131,136 ---- Index: config/arch/SGIN32gcc.conf =================================================================== RCS file: /home/pooma/Repository/r2/config/arch/SGIN32gcc.conf,v retrieving revision 1.2 diff -c -p -r1.2 SGIN32gcc.conf *** config/arch/SGIN32gcc.conf 2001/08/06 16:23:28 1.2 --- config/arch/SGIN32gcc.conf 2001/10/05 21:02:57 *************** *** 47,52 **** --- 47,58 ---- ########################################################################### ########################################################################### + # Section 0: architecture type + ########################################################################### + + $archtype = "sgin32"; + + ########################################################################### # Section 1: external package locations. # Include search directories should have a '-I' prepended. # Library search directories should have a '-L' prepended. *************** *** 58,64 **** $threads_able = 1; $threads_default_dir = "/home/smarts/build/smarts-current"; ! $threads_lib_subdir = "sgin32/lib"; $threads_basic_makefile = "Makefile.smarts-gcc"; $threads_profile_makefile = "Makefile.smarts-tau-gcc"; --- 64,70 ---- $threads_able = 1; $threads_default_dir = "/home/smarts/build/smarts-current"; ! $threads_lib_subdir = "$archtype/lib"; $threads_basic_makefile = "Makefile.smarts-gcc"; $threads_profile_makefile = "Makefile.smarts-tau-gcc"; *************** $threads_profile_makefile = "Makefile.sm *** 68,74 **** $profile_able = 1; $profile_default_dir = "/home/tau/build/tau-current"; $ductape_default_dir = "/usr/local/pooma/packages/ductape"; ! $profile_lib_subdir = "sgin32/lib"; $profile_basic_makefile = "Makefile.tau-sgitimers-gcc"; $profile_smarts_makefile = "Makefile.tau-sgitimers-smarts-gcc"; $profile_pthreads_makefile = "Makefile.tau-sgitimers-pthread-gcc"; --- 74,81 ---- $profile_able = 1; $profile_default_dir = "/home/tau/build/tau-current"; $ductape_default_dir = "/usr/local/pooma/packages/ductape"; ! $profile_archtype = "$archtype"; ! $profile_lib_subdir = "$profile_archtype/lib"; $profile_basic_makefile = "Makefile.tau-sgitimers-gcc"; $profile_smarts_makefile = "Makefile.tau-sgitimers-smarts-gcc"; $profile_pthreads_makefile = "Makefile.tau-sgitimers-pthread-gcc"; *************** $profile_pthreads_makefile = "Makefile.t *** 78,84 **** $paws_able = 1; $paws_default_dir = "/home/paws/build/paws-current"; ! $paws_lib_subdir = "sgin32/lib"; $paws_makefile = "Makefile.paws-gcc"; --- 85,91 ---- $paws_able = 1; $paws_default_dir = "/home/paws/build/paws-current"; ! $paws_lib_subdir = "$archtype/lib"; $paws_makefile = "Makefile.paws-gcc"; *************** $hdf5_default_dir = "/usr/local *** 92,98 **** $cheetah_able = 1; $cheetah_default_dir = "/home/cheetah/build/cheetah-1.0.0"; ! $cheetah_arch = "sgin32"; $cheetah_lib_subdir = "lib/g++"; $cheetah_include_makefile = "Makefile.cheetah"; --- 99,105 ---- $cheetah_able = 1; $cheetah_default_dir = "/home/cheetah/build/cheetah-1.0.0"; ! $cheetah_arch = "$archtype"; $cheetah_lib_subdir = "lib/g++"; $cheetah_include_makefile = "Makefile.cheetah"; *************** $sgibits = "-mabi=n32 -mips4"; *** 133,141 **** ### characteristics ################### - ### the name of this architecture - - $archtype = "sgin32"; $comptype = "gcc"; $compext = "-gcc"; --- 140,145 ---- Index: config/arch/SUNKCC.conf =================================================================== RCS file: /home/pooma/Repository/r2/config/arch/SUNKCC.conf,v retrieving revision 1.7 diff -c -p -r1.7 SUNKCC.conf *** config/arch/SUNKCC.conf 2000/05/05 07:44:37 1.7 --- config/arch/SUNKCC.conf 2001/10/05 21:02:57 *************** *** 47,52 **** --- 47,58 ---- ########################################################################### ########################################################################### + # Section 0: architecture type + ########################################################################### + + $archtype = "sun"; + + ########################################################################### # Section 1: external package locations. # Include search directories should have a '-I' prepended. # Library search directories should have a '-L' prepended. *************** *** 58,64 **** $threads_able = 0; $threads_default_dir = "/home/smarts/build/smarts-current"; ! $threads_lib_subdir = "sun/lib"; $threads_basic_makefile = "Makefile.smarts-kcc"; $threads_profile_makefile = "Makefile.smarts-tau-kcc"; --- 64,70 ---- $threads_able = 0; $threads_default_dir = "/home/smarts/build/smarts-current"; ! $threads_lib_subdir = "$archtype/lib"; $threads_basic_makefile = "Makefile.smarts-kcc"; $threads_profile_makefile = "Makefile.smarts-tau-kcc"; *************** $threads_profile_makefile = "Makefile.sm *** 68,74 **** $profile_able = 0; $profile_default_dir = "/home/tau/build/tau-current"; $ductape_default_dir = "/usr/local/pooma/packages/ductape"; ! $profile_lib_subdir = "sun/lib"; $profile_basic_makefile = "Makefile.tau-kcc"; $profile_smarts_makefile = "Makefile.tau-smarts-kcc"; $profile_pthreads_makefile = "Makefile.tau-pthread-kcc"; --- 74,81 ---- $profile_able = 0; $profile_default_dir = "/home/tau/build/tau-current"; $ductape_default_dir = "/usr/local/pooma/packages/ductape"; ! $profile_archtype = "$archtype"; ! $profile_lib_subdir = "$profile_archtype/lib"; $profile_basic_makefile = "Makefile.tau-kcc"; $profile_smarts_makefile = "Makefile.tau-smarts-kcc"; $profile_pthreads_makefile = "Makefile.tau-pthread-kcc"; *************** $insure_able = 0; *** 117,125 **** ### characteristics ################### - ### the name of this architecture - - $archtype = "sun"; $comptype = "kcc"; $compext = "-kcc"; --- 124,129 ---- From oldham at codesourcery.com Sat Oct 6 00:39:49 2001 From: oldham at codesourcery.com (Jeffrey Oldham) Date: Fri, 5 Oct 2001 17:39:49 -0700 Subject: Patch: Modify Field to Support cxxparse Message-ID: <20011005173949.B4436@codesourcery.com> 2001-10-05 Jeffrey D. Oldham These changes are for two reasons: 1) to permit cxxparse to parse these files 2) to rearrange file inclusions to move closer to correctness * Field/Field.h: Replace inclusion of FieldOffset.h by declaration of FieldOffset and FieldOffsetList. * Field/FieldOffset.h: Include "Field.h" since Field is used in the file. (accumulate): Change return type to 'T'. This is a syntactic, not semantic, change. (sum): Likewise. (av): Likewise. (min): Likewise. (max): Likewise. * Field/NearestNeighbors.h: Include 'FieldOffset.h'. (manhattanDistance): Syntactic, not semantic, change in template parameter declaration. * Pooma/Fields.h: Include FieldOffset.h. Tested on sequential Linux using gcc3.1 by compiling Pooma library and some executables Applied to mainline Approved by Stephen Smith Thanks, Jeffrey D. Oldham oldham at codesourcery.com -------------- next part -------------- Index: Field/Field.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Field/Field.h,v retrieving revision 1.74 diff -c -p -r1.74 Field.h *** Field/Field.h 2001/09/26 17:19:46 1.74 --- Field/Field.h 2001/10/05 02:53:43 *************** *** 67,73 **** #include "Field/VectorFieldOperators.h" #include "Field/FieldCreateLeaf.h" #include "Field/FieldCentering.h" - #include "Field/FieldOffset.h" #include "Field/NearestNeighbors.h" #include "Field/PrintField.h" --- 67,72 ---- *************** template + class FieldOffset; + + template + class FieldOffsetList; //----------------------------------------------------------------------------- // Prototypes for the assign function used to assign an expression to a Field. Index: Field/FieldOffset.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Field/FieldOffset.h,v retrieving revision 1.1 diff -c -p -r1.1 FieldOffset.h *** Field/FieldOffset.h 2001/08/30 01:15:06 1.1 --- Field/FieldOffset.h 2001/10/05 02:53:43 *************** *** 65,72 **** #include "Domain/Loc.h" #include #include - //----------------------------------------------------------------------------- // Forward declarations: //----------------------------------------------------------------------------- --- 65,72 ---- #include "Domain/Loc.h" #include #include + #include "Field/Field.h" //----------------------------------------------------------------------------- // Forward declarations: //----------------------------------------------------------------------------- *************** std::ostream &operator<<(std::ostream &o *** 356,362 **** template inline ! typename Field::T_t accumulate(BinaryFunction binary_op, const Field& field, const FieldOffsetList &lst, --- 356,362 ---- template inline ! T accumulate(BinaryFunction binary_op, const Field& field, const FieldOffsetList &lst, *************** accumulate(BinaryFunction binary_op, *** 379,385 **** template inline ! typename Field::T_t sum(const Field& field, const FieldOffsetList &lst, const Loc &loc) --- 379,385 ---- template inline ! T sum(const Field& field, const FieldOffsetList &lst, const Loc &loc) *************** sum(const Field& f *** 396,402 **** template inline ! typename Field::T_t av(const Field& field, const FieldOffsetList &lst, const Loc &loc) --- 396,402 ---- template inline ! T av(const Field& field, const FieldOffsetList &lst, const Loc &loc) *************** struct fomin : public std::binary_functi *** 419,425 **** template inline ! typename Field::T_t min(const Field& field, const FieldOffsetList &lst, const Loc &loc) --- 419,425 ---- template inline ! T min(const Field& field, const FieldOffsetList &lst, const Loc &loc) *************** struct fomax : public std::binary_functi *** 442,448 **** template inline ! typename Field::T_t max(const Field& field, const FieldOffsetList &lst, const Loc &loc) --- 442,448 ---- template inline ! T max(const Field& field, const FieldOffsetList &lst, const Loc &loc) Index: Field/NearestNeighbors.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Field/NearestNeighbors.h,v retrieving revision 1.1 diff -c -p -r1.1 NearestNeighbors.h *** Field/NearestNeighbors.h 2001/08/30 01:15:06 1.1 --- Field/NearestNeighbors.h 2001/10/05 02:53:48 *************** *** 51,56 **** --- 51,57 ---- #include "Domain/Loc.h" #include "Field/FieldCentering.h" + #include "Field/FieldOffset.h" #include #include #include *************** private: *** 293,299 **** } }; ! template inline static double manhattanDistance(const Position &difference) { --- 294,300 ---- } }; ! template inline static double manhattanDistance(const Position &difference) { Index: Pooma/Fields.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Pooma/Fields.h,v retrieving revision 1.12 diff -c -p -r1.12 Fields.h *** Pooma/Fields.h 2001/10/04 22:09:13 1.12 --- Pooma/Fields.h 2001/10/05 02:53:48 *************** *** 74,79 **** --- 74,80 ---- // Field offsets: + #include "Field/FieldOffset.h" #include "Field/DiffOps/FieldShiftEngine.h" #include "Field/DiffOps/FieldOffsetReduction.h" From oldham at codesourcery.com Sat Oct 6 00:50:34 2001 From: oldham at codesourcery.com (Jeffrey Oldham) Date: Fri, 5 Oct 2001 17:50:34 -0700 Subject: [Riedel.Christian@mayo.edu: [pooma-dev] IO question] Message-ID: <20011005175034.A4580@codesourcery.com> Did anyone respond to Dr. Riedel's question? ----- Forwarded message from "Riedel, Christian H., M.D." ----- Delivered-To: oldham at codesourcery.com Mailing-List: contact pooma-dev-help at pooma.codesourcery.com; run by ezmlm Precedence: bulk X-No-Archive: yes Delivered-To: mailing list pooma-dev at pooma.codesourcery.com From: "Riedel, Christian H., M.D." To: pooma-dev at pooma.codesourcery.com Date: Thu, 27 Sep 2001 10:55:54 -0500 Priority: normal X-mailer: Pegasus Mail for Win32 (v4.0, beta 40) Subject: [pooma-dev] IO question Dear sirs, I am currently working on a simulation project in which I especially need the Field and Particle classes in POOMA. I would like to import a 3-dimensional array of short integer values from a file into an instance of the Field class. Which would be the best way to get this done ? Thank you very much in advance, Christian Riedel ----- End forwarded message ----- -- Jeffrey D. Oldham oldham at codesourcery.com From cummings at linkline.com Mon Oct 8 19:17:57 2001 From: cummings at linkline.com (Julian C. Cummings) Date: Mon, 8 Oct 2001 12:17:57 -0700 Subject: [pooma-dev] SSH Configuration In-Reply-To: <20010920171604.7858.qmail@mail.codesourcery.com> Message-ID: Hi Mark, I guess I should have checked this earlier, but I just got around to attempting an update from the cvs repository, and indeed, I no longer can access it. When I do ssh -v -1 pooma at pooma.codesourcery.com it tells me that the RSA1 host key has changed and is unknown. Then it says I need to add the correct host key to the known_hosts file to eliminate this problem. I tried doing what Stephen suggested, setting CVS_RSH to ssh1, and making a ssh1 script that just does "ssh -1 $@". That seems to do the right thing when I run a cvs command, but then I am being asked for the password for pooma at pooma.codesourcery.com. It should not be asking me for a password. You are supposed to have my identity.pub file in the authorized_keys file on pooma.codesourcery.com. I would have assumed that you just copied this file over from the previous pooma.codesourcery.com machine, but maybe it is not considered valid because the host has a new IP address and/or RSA1 host key. In any event, I am once again stuck not being able to access the repository and hence do much useful Pooma work. Please let me know how to fix this problem ASAP. To remind you, I am running OpenSSH under Cygwin on a Windows PC. Thanks, Julian C. Dr. Julian C. Cummings Staff Scientist, CACR/Caltech (626) 395-2543 cummings at cacr.caltech.edu > -----Original Message----- > From: mitchell at mail.codesourcery.com > [mailto:mitchell at mail.codesourcery.com] > Sent: Thursday, September 20, 2001 10:16 AM > To: pooma-dev at pooma.codesourcery.com > Subject: [pooma-dev] SSH Configuration > > > > Folks -- > > The SSH daemon got upgraded as part of the system rebuilding. If > you're connecting with OpenSSH, you may have to add `-1' to the > SSH command-line. > > To test that things are working, you can do: > > ssh -v -1 pooma at pooma.codesourcery.com > > You should be able to connect, and you should see messages indicating > success; the key is: > > debug1: Entering interactive session > > If you see that, even though nothing happens, it's working. Then, > try connecting with CVS; you will probably need to set CVS_RSH to > `ssh -1' or edit your .ssh/config to indicate that you want to > connect to pooma.codesourcery.com with SSH version 1. > > If you still have trouble, send me an email. > > Thanks, > > -- Mark > From mark at codesourcery.com Mon Oct 8 19:26:48 2001 From: mark at codesourcery.com (Mark Mitchell) Date: Mon, 08 Oct 2001 12:26:48 -0700 Subject: [pooma-dev] SSH Configuration In-Reply-To: Message-ID: <41400000.1002569208@gandalf.codesourcery.com> --On Monday, October 08, 2001 12:17:57 PM -0700 "Julian C. Cummings" wrote: > Hi Mark, > > I guess I should have checked this earlier, but I just > got around to attempting an update from the cvs repository, > and indeed, I no longer can access it. When I do Julian -- Your identity file is there. Please send me the output of ssh -1 -v pooma at pooma.codesourcery.com Thank you, -- Mark Mitchell mark at codesourcery.com CodeSourcery, LLC http://www.codesourcery.com From mark at codesourcery.com Mon Oct 8 19:33:21 2001 From: mark at codesourcery.com (Mark Mitchell) Date: Mon, 08 Oct 2001 12:33:21 -0700 Subject: Tau Instrumenting Pooma Header Files: Status Report In-Reply-To: <200110052342.f95NgbD04339@oz.codesourcery.com> Message-ID: <44620000.1002569601@gandalf.codesourcery.com> > necessary. Unless otherwise directed, I will discard my work. Disks are cheap. Let's not discard all you've done; it sounds like abstractly a good appraoch, even if it didn't quite play out. -- Mark Mitchell mark at codesourcery.com CodeSourcery, LLC http://www.codesourcery.com From mark at codesourcery.com Mon Oct 8 19:35:52 2001 From: mark at codesourcery.com (Mark Mitchell) Date: Mon, 08 Oct 2001 12:35:52 -0700 Subject: [Riedel.Christian@mayo.edu: [pooma-dev] IO question] In-Reply-To: <20011005175034.A4580@codesourcery.com> Message-ID: <45620000.1002569752@gandalf.codesourcery.com> --On Friday, October 05, 2001 05:50:34 PM -0700 Jeffrey Oldham wrote: > Did anyone respond to Dr. Riedel's question? I don't think so, and that is too bad. We should definitely be following up with anyone who expresses interest in POOMA. Jeffrey, do you know how to answer? If not, would you coordinate with Scott/Jim/Steven to get a brief answer? We don't need to provide detailed customer support, but a spending ten minutes to write this up would be nice. Thanks, -- Mark Mitchell mark at codesourcery.com CodeSourcery, LLC http://www.codesourcery.com From jcrotinger at proximation.com Tue Oct 9 15:44:26 2001 From: jcrotinger at proximation.com (James Crotinger) Date: Tue, 9 Oct 2001 09:44:26 -0600 Subject: [pooma-dev] [Riedel.Christian@mayo.edu: [pooma-dev] IO questi on] Message-ID: I'll fire off a response. Jim > -----Original Message----- > From: Jeffrey Oldham [mailto:oldham at codesourcery.com] > Sent: Friday, October 05, 2001 6:51 PM > To: pooma-dev at pooma.codesourcery.com > Subject: [pooma-dev] [Riedel.Christian at mayo.edu: [pooma-dev] IO > question] > > > Did anyone respond to Dr. Riedel's question? > > ----- Forwarded message from "Riedel, Christian H., M.D." > ----- > > Delivered-To: oldham at codesourcery.com > Mailing-List: contact pooma-dev-help at pooma.codesourcery.com; > run by ezmlm > Precedence: bulk > X-No-Archive: yes > Delivered-To: mailing list pooma-dev at pooma.codesourcery.com > From: "Riedel, Christian H., M.D." > To: pooma-dev at pooma.codesourcery.com > Date: Thu, 27 Sep 2001 10:55:54 -0500 > Priority: normal > X-mailer: Pegasus Mail for Win32 (v4.0, beta 40) > Subject: [pooma-dev] IO question > > Dear sirs, > > I am currently working on a simulation project in which I especially > need the Field and Particle classes in POOMA. I would like to > import a > 3-dimensional array of short integer values from a file into > an instance > of the Field class. Which would be the best way to get this done ? > Thank you very much in advance, > > Christian Riedel > > ----- End forwarded message ----- > > -- > Jeffrey D. Oldham > oldham at codesourcery.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jcrotinger at proximation.com Tue Oct 9 16:01:42 2001 From: jcrotinger at proximation.com (James Crotinger) Date: Tue, 9 Oct 2001 10:01:42 -0600 Subject: [pooma-dev] IO question Message-ID: Christian, Sorry no one has gotten back to you sooner. Initializing Pooma arrays with data from disk should be straight-forward, provided you can write the C++ code to read the file (i.e., you understand how the 3-D array is stored in that file). Pooma 2 Arrays and Fields can be indexed in scalar mode and this may be the quickest way to get something working. If you are running in parallel, then you may need to do a bit of extra work. For example, if the shorts are stored in column major order in a binary file, and you are running in serial, the simplest thing to do would be to just write a loop reading a short and stuffing it into the Field. I'll use an Array here since I don't have to invent as many details (besides, I'm not sure what good a Field of shorts is - you can't use differential operators on shorts, so it isn't obvious what Field is buying you that Array doesn't have). (Note that I haven't tried to compile these examples, but they should be approximately right.) typedef Array<3,short,Brick> Array_t; // These are the dimensions of the data stored in // the file - where these come from, I don't know. int nx, ny, nz; // = ??? Array_t a(nx, ny, nz); // The name of the file const char *filename; // = ??? ifstream fin(filename, std::ios::binary) Pooma::blockAndEvaluate(); // good practice to put this in before // scalar access as out-of-order evaluators // might not be finished modifying the array short s; for (int k = 0; k < nz; ++k) for (int j = 0; j < ny; ++j) for (int i = 0; i < nx; ++i) { fin.read(&s,sizeof(s)); if (fin.gcount() != sizeof(s)) ; // Ack! read error! a(i,j,k) = s; } Actually, you can be trickier here if the data is in column major format as that is the storage order used by Brick-Engine. Thus you could read all of the data at once and construct the brick engine directly from the input buffer - i.e. something like this: short pbuff = new short[nx*ny*nz]; fin.read(pbuff, nx*ny*nz*sizeof(short)); // check fin.gcount() to make sure there were no errors typedef Interval<1> D1_t; Interval domain(D1_t(nx),D1_t(ny),D1_t(nz)); Array_t::Engine_t e(pbuff, domain); Array_t a(e); Note that this array does not own its data - its lifetime is managed by that of pbuff. If this is bad, you can declare a new array, make a copy, and delete pbuff; i.e. Array_t b(domain); b = a; Pooma::blockAndEvaluate(); delete pbuff; // don't use a after this as it is invalid!!! If the shorts are in an ASCII file, you'll have to parse the file, which will depend on its format. If your array is parallel and all the data is in a single file (in a single block - i.e. as above), you can declare the parallel array and a Remote array, read the data into the Remote on context 0 only, and then perform the assignment on all contexts to distribute the array. If the data in the file is stored in a patch-decomposed format, then things get trickier. I hope this helps. If this is not sufficient, we'll need more detail about exactly what it is that you're trying to do. Also, you should be warned that we are switching over to the experimental "Field" that was distributed in Pooma 2.3 as src/NewField. The old Field is deprecated and will be gone in the Pooma 2.4 release. This will require at least minor changes to your code (the template arguments to Field have changed), and if you were using more advanced centerings, then the changes may be more substantial (the resulting code should be simpler - we've spent a lot of time trying to clean up the Field abstraction). Jim > -----Original Message----- > From: Riedel, Christian H., M.D. [mailto:Riedel.Christian at mayo.edu] > Sent: Thursday, September 27, 2001 9:56 AM > To: pooma-dev at pooma.codesourcery.com > Subject: [pooma-dev] IO question > > > Dear sirs, > > I am currently working on a simulation project in which I especially > need the Field and Particle classes in POOMA. I would like to > import a > 3-dimensional array of short integer values from a file into > an instance > of the Field class. Which would be the best way to get this done ? > Thank you very much in advance, > > Christian Riedel > -------------- next part -------------- An HTML attachment was scrubbed... URL: From oldham at codesourcery.com Tue Oct 9 18:32:43 2001 From: oldham at codesourcery.com (Jeffrey Oldham) Date: Tue, 9 Oct 2001 11:32:43 -0700 Subject: Converting from Old Field Abstraction to the New Field Abstraction Message-ID: <20011009113243.A21117@codesourcery.com> Both Stephen and I have converted existing Pooma code from the old Field abstraction to the new Field abstraction. Here are part of the steps in the mostly mechanical conversion. Revisions to this document are solicited. Thanks, Jeffrey D. Oldham oldham at codesourcery.com -------------- next part -------------- typedef UniformRectilinearMesh<2> Mesh_t; unchanged typedef DiscreteGeometry Geometry_t; Remove. We will replace "Cell" later. typedef Field Field_t; s/Geometry_t/Mesh_t/g Add: DomainLayout<2> layout(vertDomain, GuardLayers<2>(1)); // A layout tells how to distribute the data among the processors. Mesh_t mesh(vertDomain); Change to: Mesh_t mesh(layout, Vector<2>(0.0), Vector<2>(1.0,1.0)); // Make the initial values explicit. Centering<2> cell = canonicalCentering<2>(CellType, Continuous); // Specify the centering here. Geometry_t geom(mesh, GuardLayers<2>(1)); // Remove. // Initialize the fields using the geometries. // a_m and b_m are Fields. a_m.initialize(geom); a_m.initialize(cell, layout, mesh); b_m.initialize(geom); b_m.initialize(cell, layout, mesh); // These Field changes vary on a case-by-case basis. a_m.addBoundaryConditions(AllZeroFaceBC()); Pooma::addAllConstantFaceBC(a_m, 0.0); // 0.0 is the initial value. From oldham at codesourcery.com Tue Oct 9 19:56:49 2001 From: oldham at codesourcery.com (Jeffrey Oldham) Date: Tue, 9 Oct 2001 12:56:49 -0700 Subject: Pooma Example Failures Message-ID: <20011009125649.A22559@codesourcery.com> Twenty of the thirty-nine example codes failed when using Linux and g++ today. Several of these failures are because the QMTest testcases are not correctly set up to handle input. Together, we can fix these problems, reducing the 51% failure rate to 0%. --- STATISTICS --------------------------------------------------------------- 39 tests total 19 ( 49%) tests PASS 20 ( 51%) tests FAIL examples.components.shock.shock : FAIL examples.field.caramana.caramana : FAIL examples.field.laplace.laplace : FAIL examples.field.laplace2.laplace2 : FAIL examples.field.scalaradvection1d.scalaradvection1d : FAIL examples.field.statigraphicflow.statigraphicflow : FAIL examples.gkpoisson.gkpoisson : FAIL examples.lattice.coordinate : FAIL examples.particles.bounce.bounce : FAIL examples.particles.oscillation.oscillation : FAIL examples.particles.pic2d.pic2d : FAIL examples.solvers.blockdecomposed.fivepoint.fivepointsolve : FAIL examples.solvers.blockdecomposed.ninepoint.ninepointsolve : FAIL examples.solvers.jacobi.driver : FAIL examples.solvers.jacobi.jacobi : FAIL examples.solvers.jacobi.stats : FAIL examples.solvers.jacobi.stenciljac : FAIL examples.solvers.krylov.problem1 : FAIL examples.stencil.laplace.laplace : FAIL examples.stencil.life.life : FAIL Thanks, Jeffrey D. Oldham oldham at codesourcery.com -------------- next part -------------- A non-text attachment was scrubbed... Name: Oct09e.xml Type: text/xml Size: 10224 bytes Desc: not available URL: From oldham at codesourcery.com Tue Oct 9 23:03:27 2001 From: oldham at codesourcery.com (Jeffrey Oldham) Date: Tue, 9 Oct 2001 16:03:27 -0700 Subject: Instrumenting src/Evaluator Header Files Message-ID: <20011009160327.B23000@codesourcery.com> Stephen and I tried to get PDToolkit 2.01b and Tau 2.9.22 to work on Linux/KCC, but we both failed. Instead, we used Linux/g++ to produce a patch of instrumentation for interesting header files. Stephen says these are all in src/Evaluator. It's a hack, but it moves work forward. Thanks, Jeffrey D. Oldham oldham at codesourcery.com -------------- next part -------------- Index: Evaluator.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Evaluator/Evaluator.h,v retrieving revision 1.57 diff -c -p -r1.57 Evaluator.h *** Evaluator.h 2001/03/29 00:41:21 1.57 --- Evaluator.h 2001/10/09 23:00:34 *************** *** 1,3 **** --- 1,4 ---- + #include // -*- C++ -*- // ACL:license // ---------------------------------------------------------------------- *************** *** 72,79 **** template struct Evaluator ! { ! }; //----------------------------------------------------------------------------- // Main Evaluator: --- 73,79 ---- template struct Evaluator ! {}; //----------------------------------------------------------------------------- // Main Evaluator: *************** struct Evaluator *** 88,98 **** { // Default ctor. ! Evaluator() { } // Destructor ! ~Evaluator() { } // evaluate(expression) // Input an expression and cause it to be evaluated. --- 88,102 ---- { // Default ctor. ! Evaluator() { ! TAU_PROFILE("Evaluator &Evaluator::Evaluator()", CT(*this), TAU_USER); ! } // Destructor ! ~Evaluator() { ! TAU_PROFILE("void Evaluator::~Evaluator()", CT(*this), TAU_USER); ! } // evaluate(expression) // Input an expression and cause it to be evaluated. *************** struct Evaluator *** 101,106 **** --- 105,112 ---- template void evaluate(const LHS& lhs, const Op& op, const RHS& rhs) const { + TAU_PROFILE("void Evaluator::evaluate(const LHS &, const Op &, const RHS &) const", CT(*this), TAU_USER); + typedef typename EvaluatorTag::Evaluator_t Eval_t; Evaluator evaluator; *************** struct Evaluator *** 121,126 **** --- 127,134 ---- template void evaluateZeroBased(const LHS& lhs, const Op& op, const RHS& rhs) const { + TAU_PROFILE("void Evaluator::evaluateZeroBased(const LHS &, const Op &, const RHS &) const", CT(*this), TAU_USER); + typedef typename EvaluatorTag::Evaluator_t Eval_t; Evaluator evaluator; *************** struct Evaluator &Evaluator::Evaluator()", CT(*this), TAU_USER); ! } // Destructor ! ~Evaluator() { ! TAU_PROFILE("void Evaluator::~Evaluator()", CT(*this), TAU_USER); ! } // evaluate(expression) // Input an expression and cause it to be evaluated. *************** struct Evaluator void evaluate(const LHS& lhs, const Op& op, const RHS& rhs) const { + TAU_PROFILE("void Evaluator::evaluate(const LHS &, const Op &, const RHS &) const", CT(*this), TAU_USER); + typedef typename KernelTag::Kernel_t Kernel_t; #if POOMA_REORDER_ITERATES Pooma::Iterate_t *iterate = generateKernel(lhs, op, rhs, Kernel_t()); *************** struct Evaluator *** 182,192 **** { // Default ctor. ! Evaluator() { } // Destructor ! ~Evaluator() { } // evaluate(expression) // Input an expression and cause it to be evaluated. --- 196,210 ---- { // Default ctor. ! Evaluator() { ! TAU_PROFILE("Evaluator &Evaluator::Evaluator()", CT(*this), TAU_USER); ! } // Destructor ! ~Evaluator() { ! TAU_PROFILE("void Evaluator::~Evaluator()", CT(*this), TAU_USER); ! } // evaluate(expression) // Input an expression and cause it to be evaluated. *************** struct Evaluator *** 195,200 **** --- 213,220 ---- template void evaluate(const LHS& lhs, const Op& op, const RHS& rhs) const { + TAU_PROFILE("void Evaluator::evaluate(const LHS &, const Op &, const RHS &) const", CT(*this), TAU_USER); + typedef Intersector Inter_t; Inter_t inter; Index: InlineEvaluator.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Evaluator/InlineEvaluator.h,v retrieving revision 1.26 diff -c -p -r1.26 InlineEvaluator.h *** InlineEvaluator.h 2001/04/13 02:15:06 1.26 --- InlineEvaluator.h 2001/10/09 23:00:35 *************** *** 1,3 **** --- 1,4 ---- + #include // -*- C++ -*- // ACL:license // ---------------------------------------------------------------------- *************** struct KernelEvaluator *** 97,102 **** --- 98,105 ---- template inline static void evaluate(const LHS& lhs,const Op& op,const RHS& rhs) { + TAU_PROFILE("void KernelEvaluator::evaluate(const LHS &, const Op &, const RHS &)", " ", TAU_USER); + typedef typename LHS::Domain_t Domain_t; evaluate(lhs,op,rhs,lhs.domain(), WrappedInt()); *************** struct KernelEvaluator *** 115,120 **** --- 118,125 ---- inline static void evaluate(const LHS& lhs,const Op& op,const RHS& rhs, const Domain& domain) { + TAU_PROFILE("void KernelEvaluator::evaluate(const LHS &, const Op &, const RHS &, const Domain &)", " ", TAU_USER); + evaluate(lhs,op,rhs,domain, WrappedInt()); POOMA_INCREMENT_STATISTIC(NumInlineEvaluations) *************** struct KernelEvaluator *** 155,160 **** --- 160,167 ---- inline static void evaluate(const LHS& lhs,const Op& op,const RHS& rhs, const Domain& domain,WrappedInt<1>) { + TAU_PROFILE("void KernelEvaluator::evaluate(const LHS &, const Op &, const RHS &, const Domain &, WrappedInt<1>)", " ", TAU_USER); + CTAssert(Domain::unitStride); PAssert(domain[0].first() == 0); int e0 = domain[0].length(); *************** struct KernelEvaluator *** 166,171 **** --- 173,180 ---- inline static void evaluate(const LHS& lhs,const Op& op,const RHS& rhs, const Domain& domain,WrappedInt<2>) { + TAU_PROFILE("void KernelEvaluator::evaluate(const LHS &, const Op &, const RHS &, const Domain &, WrappedInt<2>)", " ", TAU_USER); + CTAssert(Domain::unitStride); PAssert(domain[0].first() == 0); PAssert(domain[1].first() == 0); *************** struct KernelEvaluator *** 180,185 **** --- 189,196 ---- inline static void evaluate(const LHS& lhs,const Op& op,const RHS& rhs, const Domain& domain,WrappedInt<3>) { + TAU_PROFILE("void KernelEvaluator::evaluate(const LHS &, const Op &, const RHS &, const Domain &, WrappedInt<3>)", " ", TAU_USER); + CTAssert(Domain::unitStride); PAssert(domain[0].first() == 0); PAssert(domain[1].first() == 0); *************** struct KernelEvaluator *** 197,202 **** --- 208,215 ---- inline static void evaluate(const LHS& lhs,const Op& op,const RHS& rhs, const Domain& domain,WrappedInt<4>) { + TAU_PROFILE("void KernelEvaluator::evaluate(const LHS &, const Op &, const RHS &, const Domain &, WrappedInt<4>)", " ", TAU_USER); + CTAssert(Domain::unitStride); PAssert(domain[0].first() == 0); PAssert(domain[1].first() == 0); *************** struct KernelEvaluator *** 217,222 **** --- 230,237 ---- inline static void evaluate(const LHS& lhs,const Op& op,const RHS& rhs, const Domain& domain,WrappedInt<5>) { + TAU_PROFILE("void KernelEvaluator::evaluate(const LHS &, const Op &, const RHS &, const Domain &, WrappedInt<5>)", " ", TAU_USER); + CTAssert(Domain::unitStride); PAssert(domain[0].first() == 0); PAssert(domain[1].first() == 0); *************** struct KernelEvaluator *** 240,245 **** --- 255,262 ---- inline static void evaluate(const LHS& lhs,const Op& op,const RHS& rhs, const Domain& domain,WrappedInt<6>) { + TAU_PROFILE("void KernelEvaluator::evaluate(const LHS &, const Op &, const RHS &, const Domain &, WrappedInt<6>)", " ", TAU_USER); + CTAssert(Domain::unitStride); PAssert(domain[0].first() == 0); PAssert(domain[1].first() == 0); *************** struct KernelEvaluator *** 267,272 **** --- 284,291 ---- inline static void evaluate(const LHS& lhs,const Op& op,const RHS& rhs, const Domain& domain,WrappedInt<7>) { + TAU_PROFILE("void KernelEvaluator::evaluate(const LHS &, const Op &, const RHS &, const Domain &, WrappedInt<7>)", " ", TAU_USER); + CTAssert(Domain::unitStride); PAssert(domain[0].first() == 0); PAssert(domain[1].first() == 0); Index: CompressibleEval.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Evaluator/CompressibleEval.h,v retrieving revision 1.25 diff -c -p -r1.25 CompressibleEval.h *** CompressibleEval.h 2000/05/31 02:40:03 1.25 --- CompressibleEval.h 2001/10/09 23:00:35 *************** *** 1,3 **** --- 1,4 ---- + #include // -*- C++ -*- // ACL:license // ---------------------------------------------------------------------- *************** struct KernelEvaluator static void evaluate(const LHS &lhs, const Op &op, const RHS &rhs) { + TAU_PROFILE("void KernelEvaluator::evaluate(const LHS &, const Op &, const RHS &)", " ", TAU_USER); + // Try this for now. We just pass the uncompressed engine // to the inline evaluator. If you want to pack this in an // array go ahead, but then you'll have to include Array.h. *************** struct KernelEvaluator static void evaluate(const LHS &lhs, const Op &op, const RHS &rhs) { + TAU_PROFILE("void KernelEvaluator::evaluate(const LHS &, const Op &, const RHS &)", " ", TAU_USER); + // If everybody is compressed, then we do a compressed assign, // provided the left-hand-side is viewing the entire compressed // block or the value being assigned is the same as the compressed Index: ExpressionKernel.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Evaluator/ExpressionKernel.h,v retrieving revision 1.45 diff -c -p -r1.45 ExpressionKernel.h *** ExpressionKernel.h 2001/03/28 19:14:51 1.45 --- ExpressionKernel.h 2001/10/09 23:00:35 *************** *** 1,3 **** --- 1,4 ---- + #include // -*- C++ -*- // ACL:license // ---------------------------------------------------------------------- *************** *** 83,88 **** --- 84,91 ---- template class ExpressionKernel : public Pooma::Iterate_t { + TAU_PROFILE("ExpressionKernel::ExpressionKernel", CT(*this), TAU_USER); + public: typedef ExpressionKernel This_t; *************** ExpressionKernel(const LHS& lhs,const Op *** 131,136 **** --- 134,141 ---- : Pooma::Iterate_t(Pooma::scheduler()), lhs_m(lhs), op_m(op), rhs_m(rhs) { + TAU_PROFILE("ExpressionKernel::ExpressionKernel", CT(*this), TAU_USER); + hintAffinity(engineFunctor(lhs, DataObjectRequest())); // Request locks *************** ExpressionKernel(const LHS& lhs,const Op *** 161,166 **** --- 166,173 ---- template ExpressionKernel::~ExpressionKernel() { + TAU_PROFILE("ExpressionKernel::~ExpressionKernel", CT(*this), TAU_USER); + // The write request remembers the data block it sees on the left // so that it can check and see if it finds it on the right. *************** template::run() { + TAU_PROFILE("ExpressionKernel::run", CT(*this), TAU_USER); + // Just evaluate the expression. KernelEvaluator::evaluate(lhs_m,op_m,rhs_m); *************** inline static *** 195,200 **** --- 204,211 ---- ExpressionKernel* generateKernel(const LHS& lhs, const Op& op, const RHS& rhs, const EvalTag&) { + TAU_PROFILE("ExpressionKernel *generateKernel(const LHS &, const Op &, const RHS &, const EvalTag &)", " ", TAU_USER); + return new ExpressionKernel(lhs, op, rhs); } Index: LoopApply.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Evaluator/LoopApply.h,v retrieving revision 1.4 diff -c -p -r1.4 LoopApply.h *** LoopApply.h 2001/04/13 02:15:06 1.4 --- LoopApply.h 2001/10/09 23:00:35 *************** *** 1,3 **** --- 1,4 ---- + #include // -*- C++ -*- // ACL:license // ---------------------------------------------------------------------- *************** struct LoopApplyEvaluator *** 91,102 **** --- 92,107 ---- template inline static void evaluate(Op &op, const Dom &domain) { + TAU_PROFILE("void LoopApplyEvaluator::evaluate(Op &, const Dom &)", " ", TAU_USER); + evaluate(op, domain, WrappedInt()); } template inline static void evaluate(Op &op, const Domain &domain, WrappedInt<1>) { + TAU_PROFILE("void LoopApplyEvaluator::evaluate(Op &, const Domain &, WrappedInt<1>)", " ", TAU_USER); + CTAssert(Domain::unitStride); int f0 = domain[0].first(); int e0 = domain[0].last(); *************** struct LoopApplyEvaluator *** 107,112 **** --- 112,119 ---- template inline static void evaluate(Op &op, const Domain &domain, WrappedInt<2>) { + TAU_PROFILE("void LoopApplyEvaluator::evaluate(Op &, const Domain &, WrappedInt<2>)", " ", TAU_USER); + CTAssert(Domain::unitStride); int f0 = domain[0].first(); int f1 = domain[1].first(); *************** struct LoopApplyEvaluator *** 120,125 **** --- 127,134 ---- template inline static void evaluate(Op &op, const Domain &domain, WrappedInt<3>) { + TAU_PROFILE("void LoopApplyEvaluator::evaluate(Op &, const Domain &, WrappedInt<3>)", " ", TAU_USER); + CTAssert(Domain::unitStride); int f0 = domain[0].first(); int f1 = domain[1].first(); *************** struct LoopApplyEvaluator *** 136,141 **** --- 145,152 ---- template inline static void evaluate(Op &op, const Domain &domain, WrappedInt<4>) { + TAU_PROFILE("void LoopApplyEvaluator::evaluate(Op &, const Domain &, WrappedInt<4>)", " ", TAU_USER); + CTAssert(Domain::unitStride); int f0 = domain[0].first(); int f1 = domain[1].first(); *************** struct LoopApplyEvaluator *** 155,160 **** --- 166,173 ---- template inline static void evaluate(Op &op, const Domain &domain, WrappedInt<5>) { + TAU_PROFILE("void LoopApplyEvaluator::evaluate(Op &, const Domain &, WrappedInt<5>)", " ", TAU_USER); + CTAssert(Domain::unitStride); int f0 = domain[0].first(); int f1 = domain[1].first(); *************** struct LoopApplyEvaluator *** 177,182 **** --- 190,197 ---- template inline static void evaluate(Op &op, const Domain &domain, WrappedInt<6>) { + TAU_PROFILE("void LoopApplyEvaluator::evaluate(Op &, const Domain &, WrappedInt<6>)", " ", TAU_USER); + CTAssert(Domain::unitStride); int f0 = domain[0].first(); int f1 = domain[1].first(); *************** struct LoopApplyEvaluator *** 202,207 **** --- 217,224 ---- template inline static void evaluate(Op &op, const Domain &domain, WrappedInt<7>) { + TAU_PROFILE("void LoopApplyEvaluator::evaluate(Op &, const Domain &, WrappedInt<7>)", " ", TAU_USER); + CTAssert(Domain::unitStride); int f0 = domain[0].first(); int f1 = domain[1].first(); Index: PatchFunction.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Evaluator/PatchFunction.h,v retrieving revision 1.29 diff -c -p -r1.29 PatchFunction.h *** PatchFunction.h 2000/09/20 16:22:10 1.29 --- PatchFunction.h 2001/10/09 23:00:35 *************** *** 1,3 **** --- 1,4 ---- + #include // -*- C++ -*- // ACL:license // ---------------------------------------------------------------------- *************** struct PatchParticle3 { }; *** 118,125 **** template class PatchEvaluator ! { ! }; template<> class PatchEvaluator --- 119,125 ---- template class PatchEvaluator ! {}; template<> class PatchEvaluator *************** public: *** 128,142 **** // Default ctor. ! PatchEvaluator() {} // Destructor ! ~PatchEvaluator() {} template void evaluate(const A1& a1, const Function& function) const { typedef typename EvaluatorTag1::Evaluator_t Evaluator_t; PatchEvaluator evaluator; Pooma::Scheduler_t &scheduler = Pooma::scheduler(); --- 128,148 ---- // Default ctor. ! PatchEvaluator() { ! TAU_PROFILE("PatchEvaluator &PatchEvaluator::PatchEvaluator()", CT(*this), TAU_USER); ! } // Destructor ! ~PatchEvaluator() { ! TAU_PROFILE("void PatchEvaluator::~PatchEvaluator()", CT(*this), TAU_USER); ! } template void evaluate(const A1& a1, const Function& function) const { + TAU_PROFILE("void PatchEvaluator::evaluate(const A1 &, const Function &) const", CT(*this), TAU_USER); + typedef typename EvaluatorTag1::Evaluator_t Evaluator_t; PatchEvaluator evaluator; Pooma::Scheduler_t &scheduler = Pooma::scheduler(); *************** public: *** 154,159 **** --- 160,167 ---- template void evaluateRead(const A1& a1, const Function& function) const { + TAU_PROFILE("void PatchEvaluator::evaluateRead(const A1 &, const Function &) const", CT(*this), TAU_USER); + typedef typename EvaluatorTag1::Evaluator_t Evaluator_t; PatchEvaluator evaluator; Pooma::Scheduler_t &scheduler = Pooma::scheduler(); *************** public: *** 171,176 **** --- 179,186 ---- void evaluate2(const A1& a1, const A2& a2, const Function& function) const { + TAU_PROFILE("void PatchEvaluator::evaluate2(const A1 &, const A2 &, const Function &) const", CT(*this), TAU_USER); + typedef typename EvaluatorTag::Evaluator_t Eval_t; PatchEvaluator evaluator; Pooma::Scheduler_t &scheduler = Pooma::scheduler(); *************** public: *** 189,194 **** --- 199,206 ---- void evaluate3(const A1& a1, const A2& a2, const A3 &a3, const Function& function) const { + TAU_PROFILE("void PatchEvaluator::evaluate3(const A1 &, const A2 &, const A3 &, const Function &) const", CT(*this), TAU_USER); + typedef typename EvaluatorTag1::Evaluator_t Eval2_t; typedef typename EvaluatorTag1::Evaluator_t Eval3_t; typedef typename EvaluatorCombine::Evaluator_t Eval23_t; *************** public: *** 224,239 **** // The only member data can construct itself, so we // don't need to specify anything. // ! PatchEvaluator() {} // // Destructor // ! ~PatchEvaluator() {} template void evaluate(const A1& a1, const Function& function) const { Pooma::Iterate_t *iterate = new PatchKernel(a1,function); Pooma::scheduler().handOff(iterate); } --- 236,257 ---- // The only member data can construct itself, so we // don't need to specify anything. // ! PatchEvaluator() { ! TAU_PROFILE("PatchEvaluator &PatchEvaluator::PatchEvaluator()", CT(*this), TAU_USER); ! } // // Destructor // ! ~PatchEvaluator() { ! TAU_PROFILE("void PatchEvaluator::~PatchEvaluator()", CT(*this), TAU_USER); ! } template void evaluate(const A1& a1, const Function& function) const { + TAU_PROFILE("void PatchEvaluator::evaluate(const A1 &, const Function &) const", CT(*this), TAU_USER); + Pooma::Iterate_t *iterate = new PatchKernel(a1,function); Pooma::scheduler().handOff(iterate); } *************** public: *** 241,246 **** --- 259,266 ---- template void evaluateRead(const A1& a1, const Function& function) const { + TAU_PROFILE("void PatchEvaluator::evaluateRead(const A1 &, const Function &) const", CT(*this), TAU_USER); + Pooma::Iterate_t *iterate = new PatchKernel(a1,function); Pooma::scheduler().handOff(iterate); } *************** public: *** 249,254 **** --- 269,276 ---- void evaluate2(const A1 &a1, const A2 &a2, const Function &function) const { + TAU_PROFILE("void PatchEvaluator::evaluate2(const A1 &, const A2 &, const Function &) const", CT(*this), TAU_USER); + Pooma::Iterate_t *iterate = new PatchKernel2(a1,a2,function); *************** public: *** 259,264 **** --- 281,288 ---- void evaluate3(const A1 &a1, const A2 &a2, const A3 &a3, const Function &function) const { + TAU_PROFILE("void PatchEvaluator::evaluate3(const A1 &, const A2 &, const A3 &, const Function &) const", CT(*this), TAU_USER); + Pooma::Iterate_t *iterate = new PatchKernel3(a1,a2,a3,function); *************** public: *** 283,298 **** // The only member data can construct itself, so we // don't need to specify anything. // ! PatchEvaluator() {} // // Destructor // ! ~PatchEvaluator() {} template void evaluate(const A1& a1,const Function& function) const { typedef Intersector Inter_t; Inter_t inter; --- 307,328 ---- // The only member data can construct itself, so we // don't need to specify anything. // ! PatchEvaluator() { ! TAU_PROFILE("PatchEvaluator &PatchEvaluator::PatchEvaluator()", CT(*this), TAU_USER); ! } // // Destructor // ! ~PatchEvaluator() { ! TAU_PROFILE("void PatchEvaluator::~PatchEvaluator()", CT(*this), TAU_USER); ! } template void evaluate(const A1& a1,const Function& function) const { + TAU_PROFILE("void PatchEvaluator::evaluate(const A1 &, const Function &) const", CT(*this), TAU_USER); + typedef Intersector Inter_t; Inter_t inter; *************** public: *** 310,315 **** --- 340,347 ---- inline void evaluateRead(const A1& a1,const Function& function) const { + TAU_PROFILE("void PatchEvaluator::evaluateRead(const A1 &, const Function &) const", CT(*this), TAU_USER); + evaluate(a1,function); } *************** public: *** 317,322 **** --- 349,356 ---- void evaluate2(const A1& a1, const A2& a2, const Function& function) const { + TAU_PROFILE("void PatchEvaluator::evaluate2(const A1 &, const A2 &, const Function &) const", CT(*this), TAU_USER); + typedef Intersector Inter_t; Inter_t inter; *************** public: *** 337,342 **** --- 371,378 ---- void evaluate3(const A1 &a1, const A2 &a2, const A3 &a3, const Function& function) const { + TAU_PROFILE("void PatchEvaluator::evaluate3(const A1 &, const A2 &, const A3 &, const Function &) const", CT(*this), TAU_USER); + typedef Intersector Inter_t; Inter_t inter; *************** class ParticleEvaluator *** 362,377 **** public: // Default ctor. ! ParticleEvaluator() {} // Destructor ! ~ParticleEvaluator() {} template void evaluate(const A1 &a1, const Function &function, const PatchParticle1 &) const { Pooma::Scheduler_t &scheduler = Pooma::scheduler(); scheduler.beginGeneration(); --- 398,419 ---- public: // Default ctor. ! ParticleEvaluator() { ! TAU_PROFILE("ParticleEvaluator &ParticleEvaluator::ParticleEvaluator()", CT(*this), TAU_USER); ! } // Destructor ! ~ParticleEvaluator() { ! TAU_PROFILE("void ParticleEvaluator::~ParticleEvaluator()", CT(*this), TAU_USER); ! } template void evaluate(const A1 &a1, const Function &function, const PatchParticle1 &) const { + TAU_PROFILE("void ParticleEvaluator::evaluate(const A1 &, const Function &, const PatchParticle1 &) const", CT(*this), TAU_USER); + Pooma::Scheduler_t &scheduler = Pooma::scheduler(); scheduler.beginGeneration(); *************** public: *** 402,407 **** --- 444,451 ---- void evaluateBlock(const A1 &a1, const Function &function, const PatchParticle1 &) const { + TAU_PROFILE("void ParticleEvaluator::evaluateBlock(const A1 &, const Function &, const PatchParticle1 &) const", CT(*this), TAU_USER); + Pooma::Scheduler_t &scheduler = Pooma::scheduler(); int n = a1.numPatchesLocal(); *************** public: *** 441,446 **** --- 485,492 ---- void evaluate2(const A1& a1, const A2 &a2, const Function& function, const PatchParticle2 &) const { + TAU_PROFILE("void ParticleEvaluator::evaluate2(const A1 &, const A2 &, const Function &, const PatchParticle2 &) const", CT(*this), TAU_USER); + Pooma::Scheduler_t &scheduler = Pooma::scheduler(); scheduler.beginGeneration(); *************** public: *** 476,481 **** --- 522,529 ---- void evaluate2Block(const A1& a1, const A2 &a2, const Function& function, const PatchParticle2 &) const { + TAU_PROFILE("void ParticleEvaluator::evaluate2Block(const A1 &, const A2 &, const Function &, const PatchParticle2 &) const", CT(*this), TAU_USER); + Pooma::Scheduler_t &scheduler = Pooma::scheduler(); scheduler.beginGeneration(); *************** public: *** 520,525 **** --- 568,575 ---- const Function& function, const PatchParticle3 &) const { + TAU_PROFILE("void ParticleEvaluator::evaluate3(const A1 &, const A2 &, const A3 &, const Function &, const PatchParticle3 &) const", CT(*this), TAU_USER); + Pooma::Scheduler_t &scheduler = Pooma::scheduler(); scheduler.beginGeneration(); *************** public: *** 561,566 **** --- 611,618 ---- const Function& function, const PatchParticle3 &) const { + TAU_PROFILE("void ParticleEvaluator::evaluate3Block(const A1 &, const A2 &, const A3 &, const Function &, const PatchParticle3 &) const", CT(*this), TAU_USER); + Pooma::Scheduler_t &scheduler = Pooma::scheduler(); scheduler.beginGeneration(); *************** CLASS(const I1 &i1, const I2 &i2, const *** 653,668 **** template class PatchFunction ! { ! }; template class PatchFunction { public: ! PatchFunction() { } ! PatchFunction(const Function &function) : function_m(function) { } POOMA_PATCHFUNCTION_ARGUMENT_CONSTRUCTORS(PatchFunction,function_m) --- 705,723 ---- template class PatchFunction ! {}; template class PatchFunction { public: ! PatchFunction() { ! TAU_PROFILE("PatchFunction &PatchFunction::PatchFunction()", CT(*this), TAU_USER); ! } ! PatchFunction(const Function &function) : function_m(function) { ! TAU_PROFILE("PatchFunction::PatchFunction", CT(*this), TAU_USER); ! } POOMA_PATCHFUNCTION_ARGUMENT_CONSTRUCTORS(PatchFunction,function_m) *************** public: *** 670,679 **** inline void operator()(const Array& a) const { PatchEvaluator().evaluate(a,function()); } ! inline const Function &function() const { return function_m; } private: --- 725,738 ---- inline void operator()(const Array& a) const { + TAU_PROFILE("PatchFunction::PatchFunction", " ", TAU_USER); + PatchEvaluator().evaluate(a,function()); } ! inline const Function &function() const { ! TAU_PROFILE("PatchFunction::function", CT(*this), TAU_USER); ! return function_m; } private: *************** private: *** 683,692 **** template class PatchFunction { public: ! PatchFunction() { } ! PatchFunction(const Function &function) : function_m(function) { } POOMA_PATCHFUNCTION_ARGUMENT_CONSTRUCTORS(PatchFunction,function_m) --- 742,757 ---- template class PatchFunction { + TAU_PROFILE("PatchFunction::PatchFunction", CT(*this), TAU_USER); + public: ! PatchFunction() { ! TAU_PROFILE("PatchFunction::PatchFunction", CT(*this), TAU_USER); ! } ! PatchFunction(const Function &function) : function_m(function) { ! TAU_PROFILE("PatchFunction::PatchFunction", CT(*this), TAU_USER); ! } POOMA_PATCHFUNCTION_ARGUMENT_CONSTRUCTORS(PatchFunction,function_m) *************** public: *** 694,703 **** inline void operator()(const Array& a) const { PatchEvaluator().evaluateRead(a,function()); } ! inline const Function &function() const { return function_m; } private: --- 759,772 ---- inline void operator()(const Array& a) const { + TAU_PROFILE("PatchFunction::PatchFunction", " ", TAU_USER); + PatchEvaluator().evaluateRead(a,function()); } ! inline const Function &function() const { ! TAU_PROFILE("const Function &PatchFunction::function() const", CT(*this), TAU_USER); ! return function_m; } private: *************** template *** 708,715 **** class PatchFunction { public: ! PatchFunction() { } ! PatchFunction(const Function &function) : function_m(function) { } POOMA_PATCHFUNCTION_ARGUMENT_CONSTRUCTORS(PatchFunction,function_m) --- 777,788 ---- class PatchFunction { public: ! PatchFunction() { ! TAU_PROFILE("PatchFunction &PatchFunction::PatchFunction()", CT(*this), TAU_USER); ! } ! PatchFunction(const Function &function) : function_m(function) { ! TAU_PROFILE("PatchFunction &PatchFunction::PatchFunction(const Function &)", CT(*this), TAU_USER); ! } POOMA_PATCHFUNCTION_ARGUMENT_CONSTRUCTORS(PatchFunction,function_m) *************** public: *** 717,726 **** inline void operator()(const Array1 &a1, const Array2 &a2) const { PatchEvaluator().evaluate2(a1,a2,function()); } ! inline const Function &function() const { return function_m; } private: --- 790,803 ---- inline void operator()(const Array1 &a1, const Array2 &a2) const { + TAU_PROFILE("PatchFunction &PatchFunction::PatchFunction(const I1 &, const I2 &, const I3 &, const I4 &, const I5 &, const I6 &, const I7 &)", CT(*this), TAU_USER); + PatchEvaluator().evaluate2(a1,a2,function()); } ! inline const Function &function() const { ! TAU_PROFILE("PatchFunction::function", CT(*this), TAU_USER); ! return function_m; } private: *************** template *** 731,738 **** class PatchFunction { public: ! PatchFunction() { } ! PatchFunction(const Function &function) : function_m(function) { } POOMA_PATCHFUNCTION_ARGUMENT_CONSTRUCTORS(PatchFunction,function_m) --- 808,819 ---- class PatchFunction { public: ! PatchFunction() { ! TAU_PROFILE("PatchFunction::PatchFunction", CT(*this), TAU_USER); ! } ! PatchFunction(const Function &function) : function_m(function) { ! TAU_PROFILE("PatchFunction::PatchFunction", CT(*this), TAU_USER); ! } POOMA_PATCHFUNCTION_ARGUMENT_CONSTRUCTORS(PatchFunction,function_m) *************** public: *** 740,749 **** inline void operator()(const Array1 &a1, const Array2 &a2, const Array3 &a3) const { PatchEvaluator().evaluate3(a1,a2,a3,function()); } ! inline const Function &function() const { return function_m; } private: --- 821,834 ---- inline void operator()(const Array1 &a1, const Array2 &a2, const Array3 &a3) const { + TAU_PROFILE("PatchFunction &PatchFunction::PatchFunction(const I1 &)", CT(*this), TAU_USER); + PatchEvaluator().evaluate3(a1,a2,a3,function()); } ! inline const Function &function() const { ! TAU_PROFILE("PatchFunction::function", CT(*this), TAU_USER); ! return function_m; } private: *************** private: *** 753,762 **** template class PatchFunction > { public: ! PatchFunction() { } ! PatchFunction(const Function &function) : function_m(function) { } POOMA_PATCHFUNCTION_ARGUMENT_CONSTRUCTORS(PatchFunction,function_m) --- 838,853 ---- template class PatchFunction > { + TAU_PROFILE("PatchFunction>::PatchFunction", CT(*this), TAU_USER); + public: ! PatchFunction() { ! TAU_PROFILE("PatchFunction> &PatchFunction>::PatchFunction()", CT(*this), TAU_USER); ! } ! PatchFunction(const Function &function) : function_m(function) { ! TAU_PROFILE("PatchFunction> &PatchFunction>::PatchFunction(const Function &)", CT(*this), TAU_USER); ! } POOMA_PATCHFUNCTION_ARGUMENT_CONSTRUCTORS(PatchFunction,function_m) *************** public: *** 764,769 **** --- 855,862 ---- inline void operator()(const Array& a) const { + TAU_PROFILE("PatchFunction>::PatchFunction", " ", TAU_USER); + ParticleEvaluator().evaluate(a, function(), PatchParticle1()); } *************** public: *** 771,781 **** inline void block(const Array& a) const { ParticleEvaluator(). evaluateBlock(a, function(), PatchParticle1()); } ! inline const Function &function() const { return function_m; } private: --- 864,878 ---- inline void block(const Array& a) const { + TAU_PROFILE("void PatchFunction>::block(const Array &) const", CT(*this), TAU_USER); + ParticleEvaluator(). evaluateBlock(a, function(), PatchParticle1()); } ! inline const Function &function() const { ! TAU_PROFILE("const Function &PatchFunction>::function() const", CT(*this), TAU_USER); ! return function_m; } private: *************** private: *** 785,794 **** template class PatchFunction > { public: ! PatchFunction() { } ! PatchFunction(const Function &function) : function_m(function) { } POOMA_PATCHFUNCTION_ARGUMENT_CONSTRUCTORS(PatchFunction,function_m) --- 882,897 ---- template class PatchFunction > { + TAU_PROFILE("PatchFunction>::PatchFunction", CT(*this), TAU_USER); + public: ! PatchFunction() { ! TAU_PROFILE("PatchFunction> &PatchFunction>::PatchFunction()", CT(*this), TAU_USER); ! } ! PatchFunction(const Function &function) : function_m(function) { ! TAU_PROFILE("PatchFunction> &PatchFunction>::PatchFunction(const Function &)", CT(*this), TAU_USER); ! } POOMA_PATCHFUNCTION_ARGUMENT_CONSTRUCTORS(PatchFunction,function_m) *************** public: *** 796,801 **** --- 899,906 ---- inline void operator()(const Array1 &a1, const Array2 &a2) const { + TAU_PROFILE("PatchFunction>::PatchFunction", " ", TAU_USER); + ParticleEvaluator().evaluate2(a1, a2, function(), PatchParticle2()); } *************** public: *** 804,814 **** inline void block(const Array1 &a1, const Array2 &a2) const { ParticleEvaluator().evaluate2Block(a1, a2, function(), PatchParticle2()); } ! inline const Function &function() const { return function_m; } private: --- 909,923 ---- inline void block(const Array1 &a1, const Array2 &a2) const { + TAU_PROFILE("void PatchFunction>::block(const Array1 &, const Array2 &) const", CT(*this), TAU_USER); + ParticleEvaluator().evaluate2Block(a1, a2, function(), PatchParticle2()); } ! inline const Function &function() const { ! TAU_PROFILE("PatchFunction>::function", CT(*this), TAU_USER); ! return function_m; } private: *************** class PatchFunction> &PatchFunction>::PatchFunction()", CT(*this), TAU_USER); ! } ! PatchFunction(const Function &function) : function_m(function) { ! TAU_PROFILE("PatchFunction> &PatchFunction>::PatchFunction(const Function &)", CT(*this), TAU_USER); ! } POOMA_PATCHFUNCTION_ARGUMENT_CONSTRUCTORS(PatchFunction,function_m) *************** public: *** 829,834 **** --- 942,949 ---- inline void operator()(const Array1 &a1, const Array2 &a2, const Array3 &a3) const { + TAU_PROFILE("PatchFunction>::PatchFunction", " ", TAU_USER); + ParticleEvaluator().evaluate3( a1, a2, a3, function(), PatchParticle3()); } *************** public: *** 837,847 **** inline void block(const Array1 &a1, const Array2 &a2, const Array3 &a3) const { ParticleEvaluator().evaluate3Block( a1, a2, a3, function(), PatchParticle3()); } ! inline const Function &function() const { return function_m; } private: --- 952,966 ---- inline void block(const Array1 &a1, const Array2 &a2, const Array3 &a3) const { + TAU_PROFILE("void PatchFunction>::block(const Array1 &, const Array2 &, const Array3 &) const", CT(*this), TAU_USER); + ParticleEvaluator().evaluate3Block( a1, a2, a3, function(), PatchParticle3()); } ! inline const Function &function() const { ! TAU_PROFILE("const Function &PatchFunction>::function() const", CT(*this), TAU_USER); ! return function_m; } private: Index: PatchKernel.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Evaluator/PatchKernel.h,v retrieving revision 1.18 diff -c -p -r1.18 PatchKernel.h *** PatchKernel.h 2000/06/08 22:16:13 1.18 --- PatchKernel.h 2001/10/09 23:00:35 *************** *** 1,3 **** --- 1,4 ---- + #include // -*- C++ -*- // ACL:license // ---------------------------------------------------------------------- *************** public: *** 71,76 **** --- 72,79 ---- : Pooma::Iterate_t(Pooma::scheduler()), a1_m(a1), function_m(function), write_m(write) { + TAU_PROFILE("PatchKernel &PatchKernel::PatchKernel(const A1 &, const Function &, bool)", CT(*this), TAU_USER); + DataObjectRequest getAffinity; hintAffinity(engineFunctor(a1_m.engine(),getAffinity)); *************** public: *** 85,90 **** --- 88,95 ---- virtual ~PatchKernel() { + TAU_PROFILE("void PatchKernel::~PatchKernel()", CT(*this), TAU_USER); + DataObjectRequest writeReq; engineFunctor(a1_m.engine(),writeReq); *************** public: *** 92,97 **** --- 97,104 ---- virtual void run() { + TAU_PROFILE("void PatchKernel::run()", CT(*this), TAU_USER); + function_m.apply(a1_m); } *************** public: *** 112,117 **** --- 119,126 ---- : Pooma::Iterate_t(Pooma::scheduler()), a1_m(a1), a2_m(a2), function_m(function) { + TAU_PROFILE("PatchKernel2 &PatchKernel2::PatchKernel2(const A1 &, const A2 &, const Function &)", CT(*this), TAU_USER); + DataObjectRequest getAffinity; hintAffinity(engineFunctor(a1_m.engine(),getAffinity)); *************** public: *** 136,142 **** --- 145,153 ---- virtual ~PatchKernel2() { + TAU_PROFILE("PatchKernel2::~PatchKernel2", CT(*this), TAU_USER); + // The write request remembers the data block it sees on the left // so that it can check and see if it finds it on the right. *************** public: *** 153,158 **** --- 164,171 ---- virtual void run() { + TAU_PROFILE("PatchKernel2::run", CT(*this), TAU_USER); + function_m.apply(a1_m, a2_m); } *************** public: *** 172,177 **** --- 185,192 ---- : Pooma::Iterate_t(Pooma::scheduler()), a1_m(a1), a2_m(a2), a3_m(a3), function_m(function) { + TAU_PROFILE("PatchKernel3 &PatchKernel3::PatchKernel3(const A1 &, const A2 &, const A3 &, const Function &)", CT(*this), TAU_USER); + DataObjectRequest getAffinity; hintAffinity(engineFunctor(a1_m.engine(),getAffinity)); *************** public: *** 197,202 **** --- 212,219 ---- virtual ~PatchKernel3() { + TAU_PROFILE("void PatchKernel3::~PatchKernel3()", CT(*this), TAU_USER); + // The write request remembers the data block it sees on the left // so that it can check and see if it finds it on the right. *************** public: *** 214,219 **** --- 231,238 ---- virtual void run() { + TAU_PROFILE("PatchKernel3::run", CT(*this), TAU_USER); + function_m.apply(a1_m, a2_m, a3_m); } *************** template *** 232,237 **** --- 251,258 ---- class ParticleKernel : public Pooma::Iterate_t { + TAU_PROFILE("ParticleKernel::ParticleKernel", CT(*this), TAU_USER); + public: ParticleKernel(const Array& array, const Function& function, int patchID, bool write1) *************** public: *** 239,244 **** --- 260,267 ---- array_m(array), function_m(function), patchID_m(patchID), write1_m(write1) { + TAU_PROFILE("ParticleKernel::ParticleKernel", CT(*this), TAU_USER); + hintAffinity(engineFunctor(array_m.engine(), DataObjectRequest())); *************** public: *** 259,264 **** --- 282,289 ---- virtual ~ParticleKernel() { + TAU_PROFILE("ParticleKernel::~ParticleKernel", CT(*this), TAU_USER); + DataObjectRequest writeReq; DataObjectRequest readReq(writeReq); *************** public: *** 274,279 **** --- 299,306 ---- virtual void run() { + TAU_PROFILE("ParticleKernel::run", CT(*this), TAU_USER); + function_m.apply(array_m,patchID_m); } *************** public: *** 296,301 **** --- 323,330 ---- array_m(array), function_m(function), patchID_m(patchID), write1_m(write1), csem_m(csem) { + TAU_PROFILE("ParticleKernelBlock::ParticleKernelBlock", CT(*this), TAU_USER); + hintAffinity(engineFunctor(array_m.engine(), DataObjectRequest())); *************** public: *** 316,321 **** --- 345,352 ---- virtual ~ParticleKernelBlock() { + TAU_PROFILE("ParticleKernelBlock::~ParticleKernelBlock", CT(*this), TAU_USER); + DataObjectRequest writeReq; DataObjectRequest readReq(writeReq); *************** public: *** 331,336 **** --- 362,369 ---- virtual void run() { + TAU_PROFILE("ParticleKernelBlock::run", CT(*this), TAU_USER); + function_m.apply(array_m,patchID_m); csem_m->incr(); } *************** public: *** 359,364 **** --- 392,399 ---- array1_m(array1), array2_m(array2), function_m(function), id_m(id), write1_m(write1), write2_m(write2) { + TAU_PROFILE("ParticleKernel2 &ParticleKernel2::ParticleKernel2(const Array1 &, const Array2 &, const Function &, int, bool, bool)", CT(*this), TAU_USER); + hintAffinity(engineFunctor(array1_m.engine(), DataObjectRequest())); *************** public: *** 384,389 **** --- 419,426 ---- virtual ~ParticleKernel2() { + TAU_PROFILE("void ParticleKernel2::~ParticleKernel2()", CT(*this), TAU_USER); + DataObjectRequest writeReq; if (write1_m) *************** public: *** 403,408 **** --- 440,447 ---- virtual void run() { + TAU_PROFILE("void ParticleKernel2::run()", CT(*this), TAU_USER); + function_m.apply(array1_m, array2_m, id_m); } *************** template::ParticleKernel2Block", CT(*this), TAU_USER); + public: ParticleKernel2Block(const Array1 &array1, const Array2 &array2, *************** public: *** 430,435 **** --- 471,478 ---- array1_m(array1), array2_m(array2), function_m(function), id_m(id), write1_m(write1), write2_m(write2), csem_m(csem) { + TAU_PROFILE("ParticleKernel2Block &ParticleKernel2Block::ParticleKernel2Block(const Array1 &, const Array2 &, const Function &, int, bool, bool, Pooma::CountingSemaphore *)", CT(*this), TAU_USER); + hintAffinity(engineFunctor(array1_m.engine(),DataObjectRequest())); // Request locks *************** public: *** 453,458 **** --- 496,503 ---- virtual ~ParticleKernel2Block() { + TAU_PROFILE("void ParticleKernel2Block::~ParticleKernel2Block()", CT(*this), TAU_USER); + DataObjectRequest writeReq; if (write1_m) *************** public: *** 472,477 **** --- 517,524 ---- virtual void run() { + TAU_PROFILE("void ParticleKernel2Block::run()", CT(*this), TAU_USER); + function_m.apply(array1_m, array2_m, id_m); csem_m->incr(); } *************** template::ParticleKernel3", CT(*this), TAU_USER); + public: ParticleKernel3(const Array1 &array1, const Array2 &array2, *************** public: *** 504,509 **** --- 553,560 ---- function_m(function), id_m(id), write1_m(write1), write2_m(write2), write3_m(write3) { + TAU_PROFILE("ParticleKernel3 &ParticleKernel3::ParticleKernel3(const Array1 &, const Array2 &, const Array3 &, const Function &, int, bool, bool, bool)", CT(*this), TAU_USER); + hintAffinity(engineFunctor(array1_m.engine(), DataObjectRequest())); *************** public: *** 534,539 **** --- 585,592 ---- virtual ~ParticleKernel3() { + TAU_PROFILE("void ParticleKernel3::~ParticleKernel3()", CT(*this), TAU_USER); + // Request locks DataObjectRequest writeReq; *************** public: *** 561,566 **** --- 614,621 ---- virtual void run() { + TAU_PROFILE("void ParticleKernel3::run()", CT(*this), TAU_USER); + function_m.apply(array1_m, array2_m, array3_m, id_m); } *************** template::ParticleKernel3Block", CT(*this), TAU_USER); + public: ParticleKernel3Block(const Array1 &array1, const Array2 &array2, *************** public: *** 592,597 **** --- 649,656 ---- function_m(function), id_m(id), write1_m(write1), write2_m(write2), write3_m(write3), csem_m(csem) { + TAU_PROFILE("ParticleKernel3Block::ParticleKernel3Block", CT(*this), TAU_USER); + hintAffinity(engineFunctor(array1_m.engine(), DataObjectRequest())); *************** public: *** 622,627 **** --- 681,688 ---- virtual ~ParticleKernel3Block() { + TAU_PROFILE("void ParticleKernel3Block::~ParticleKernel3Block()", CT(*this), TAU_USER); + // Request locks DataObjectRequest writeReq; *************** public: *** 649,654 **** --- 710,717 ---- virtual void run() { + TAU_PROFILE("ParticleKernel3Block::run", CT(*this), TAU_USER); + function_m.apply(array1_m, array2_m, array3_m, id_m); csem_m->incr(); } Index: Reduction.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Evaluator/Reduction.h,v retrieving revision 1.10 diff -c -p -r1.10 Reduction.h *** Reduction.h 2001/03/29 00:41:21 1.10 --- Reduction.h 2001/10/09 23:00:35 *************** *** 1,3 **** --- 1,4 ---- + #include // -*- C++ -*- // ACL:license // ---------------------------------------------------------------------- *************** *** 49,54 **** --- 50,56 ---- //----------------------------------------------------------------------------- #include "Domain/NullDomain.h" + #include "Engine/Engine.h" #include "Engine/Intersector.h" #include "Engine/IntersectEngine.h" #include "Evaluator/ReductionKernel.h" *************** struct Reduction *** 91,102 **** //--------------------------------------------------------------------------- // Default ctor. ! Reduction() { } //--------------------------------------------------------------------------- // Destructor ! ~Reduction() { } //--------------------------------------------------------------------------- // Input an expression and cause it to be reduced. --- 93,108 ---- //--------------------------------------------------------------------------- // Default ctor. ! Reduction() { ! TAU_PROFILE("Reduction &Reduction::Reduction()", CT(*this), TAU_USER); ! } //--------------------------------------------------------------------------- // Destructor ! ~Reduction() { ! TAU_PROFILE("void Reduction::~Reduction()", CT(*this), TAU_USER); ! } //--------------------------------------------------------------------------- // Input an expression and cause it to be reduced. *************** struct Reduction *** 105,110 **** --- 111,118 ---- template void evaluate(T &ret, const Op &op, const Expr &e) const { + TAU_PROFILE("void Reduction::evaluate(T &, const Op &, const Expr &) const", CT(*this), TAU_USER); + typedef typename EvaluatorTag1::Evaluator_t Evaluator_t; Reduction().evaluate(ret, op, e()); *************** struct Reduction &Reduction::Reduction()", CT(*this), TAU_USER); ! } //--------------------------------------------------------------------------- // Destructor ! ~Reduction() { ! TAU_PROFILE("void Reduction::~Reduction()", CT(*this), TAU_USER); ! } //--------------------------------------------------------------------------- // Input an expression and cause it to be reduced. *************** struct Reduction::evaluate(T &, const Op &, const Expr &, Pooma::CountingSemaphore &) const", CT(*this), TAU_USER); + typedef typename KernelTag1::Kernel_t Kernel_t; #if POOMA_REORDER_ITERATES *************** struct Reduction void evaluate(T &ret, const Op &op, const Expr &e) const { + TAU_PROFILE("void Reduction::evaluate(T &, const Op &, const Expr &) const", CT(*this), TAU_USER); + Pooma::CountingSemaphore csem; csem.height(1); *************** struct Reduction *** 185,196 **** //--------------------------------------------------------------------------- // Default ctor. ! Reduction() { } //--------------------------------------------------------------------------- // Destructor ! ~Reduction() { } //--------------------------------------------------------------------------- // Input an expression and cause it to be reduced according to the --- 201,216 ---- //--------------------------------------------------------------------------- // Default ctor. ! Reduction() { ! TAU_PROFILE("Reduction &Reduction::Reduction()", CT(*this), TAU_USER); ! } //--------------------------------------------------------------------------- // Destructor ! ~Reduction() { ! TAU_PROFILE("void Reduction::~Reduction()", CT(*this), TAU_USER); ! } //--------------------------------------------------------------------------- // Input an expression and cause it to be reduced according to the *************** struct Reduction *** 210,215 **** --- 230,237 ---- template void evaluate(T &ret, const Op &op, const Expr &e) const { + TAU_PROFILE("void Reduction::evaluate(T &, const Op &, const Expr &) const", CT(*this), TAU_USER); + typedef Intersector Inter_t; Inter_t inter; Index: ReductionKernel.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Evaluator/ReductionKernel.h,v retrieving revision 1.3 diff -c -p -r1.3 ReductionKernel.h *** ReductionKernel.h 2000/06/08 22:16:13 1.3 --- ReductionKernel.h 2001/10/09 23:00:35 *************** *** 1,3 **** --- 1,4 ---- + #include // -*- C++ -*- // ACL:license // ---------------------------------------------------------------------- *************** *** 78,83 **** --- 79,86 ---- template class ReductionKernel : public Pooma::Iterate_t { + TAU_PROFILE("ReductionKernel::ReductionKernel", CT(*this), TAU_USER); + public: typedef ReductionKernel This_t; *************** ReductionKernel(T &ret, const Op &op, co *** 131,136 **** --- 134,141 ---- : Pooma::Iterate_t(Pooma::scheduler()), ret_m(ret), op_m(op), expr_m(e), csem_m(csem) { + TAU_PROFILE("ReductionKernel::ReductionKernel", CT(*this), TAU_USER); + // Request read lock. DataObjectRequest readReq(*this); *************** ReductionKernel(T &ret, const Op &op, co *** 145,150 **** --- 150,157 ---- template ReductionKernel::~ReductionKernel() { + TAU_PROFILE("ReductionKernel::~ReductionKernel", CT(*this), TAU_USER); + // Release read lock. DataObjectRequest readRelease; *************** ReductionKernel: *** 161,166 **** --- 168,175 ---- template void ReductionKernel::run() { + TAU_PROFILE("ReductionKernel::run", CT(*this), TAU_USER); + // Just evaluate the expression. ReductionEvaluator::evaluate(ret_m, op_m, expr_m); From oldham at codesourcery.com Wed Oct 10 00:21:56 2001 From: oldham at codesourcery.com (Jeffrey Oldham) Date: Tue, 9 Oct 2001 17:21:56 -0700 Subject: Patch: 'the the' is Seldom Correct Message-ID: <20011009172156.C24052@codesourcery.com> 2001-10-09 Jeffrey D. Oldham "The the" is seldom correct. * IO/FileSetReader.cpp: Fix a typo in the comment. * Partition/UniformGridPartition.h: Fix a typo in a string. Not tested Applied to mainline Approved by Mark Mitchell Thanks, Jeffrey D. Oldham oldham at codesourcery.com -------------- next part -------------- Index: IO/FileSetReader.cpp =================================================================== RCS file: /home/pooma/Repository/r2/src/IO/FileSetReader.cpp,v retrieving revision 1.4 diff -c -p -r1.4 FileSetReader.cpp *** IO/FileSetReader.cpp 2001/10/03 03:22:08 1.4 --- IO/FileSetReader.cpp 2001/10/10 00:00:40 *************** readOffsetData(OffsetData &odata, Int *** 122,128 **** // template function to encapsulate the actual reading of data into // the local engine. This code is only run on the IO context (and only // for nodes that belong to the IO context), and it reads directly ! // into the the compressible brick engine. // // By encapsulating into a separate template function, we avoid code // bloat by having a different version for all the various engine tags --- 122,128 ---- // template function to encapsulate the actual reading of data into // the local engine. This code is only run on the IO context (and only // for nodes that belong to the IO context), and it reads directly ! // into the compressible brick engine. // // By encapsulating into a separate template function, we avoid code // bloat by having a different version for all the various engine tags Index: Partition/UniformGridPartition.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Partition/UniformGridPartition.h,v retrieving revision 1.25 diff -c -p -r1.25 UniformGridPartition.h *** Partition/UniformGridPartition.h 2001/06/05 18:42:12 1.25 --- Partition/UniformGridPartition.h 2001/10/10 00:00:40 *************** int partition(const D &domain, *** 330,336 **** internalGuards_m.lower(i) : internalGuards_m.upper(i); PInsist((domain[i].length() % blocks()[i].first()) == 0, ! "All the the blocks in a grid must be the same size."); origin[i] = domain[i].first(); sizes[i] = domain[i].length() / blocks()[i].first(); --- 330,336 ---- internalGuards_m.lower(i) : internalGuards_m.upper(i); PInsist((domain[i].length() % blocks()[i].first()) == 0, ! "All the blocks in a grid must be the same size."); origin[i] = domain[i].first(); sizes[i] = domain[i].length() / blocks()[i].first(); From qmtrack at ns1.codesourcery.com Wed Oct 10 00:27:00 2001 From: qmtrack at ns1.codesourcery.com (qmtrack at ns1.codesourcery.com) Date: 10 Oct 2001 00:27:00 -0000 Subject: [QMTrack] new issue scalar_advection_2d Message-ID: <20011010002700.28007.qmail@mail.codesourcery.com> The issue scalar_advection_2d was created by guest on 2001-10-09 18:27 MDT. Issue ID: scalar_advection_2d Modification Time: 2001-10-09 18:27 MDT Modifying User: guest State: submitted Summary: ScalarAdvection does not work in 2D Categories: None Discussion: None Description: Changing Dim = 1 to Dim = 2 in src/examples/Field/ScalarAdvection/ScalarAdvection.cpp does not work. The code continues to compile, but when it runs POOMA aborts. When this is fixed, the corresponding code in src/array/tests/ScalarAdvection.cpp should be changed as well. Assignee: haney From mark at codesourcery.com Wed Oct 10 00:35:25 2001 From: mark at codesourcery.com (Mark P Mitchell) Date: 9 Oct 2001 18:35:25 -0600 Subject: RFA: Patch for fixes for regression test failures Message-ID: <20011010003525.1926753.qmail@n02.acl.lanl.gov> The attached patch attempts to fix several regression tests. Here is a summary: src/Array/tests/ScalarAdvection.cpp: Updated to use approximately the same code that Scott used in examples/Field/ScalarAdvection/ScalarAdvection.cpp. Note that although this test now compiles, it still fails. This code works in dimension 2. Scott's code fails in dimension 2, as well. src/Connect/Lux/tests/*: These tests failed because LuxConnector.Field.h had not been updated for the new fields. src/DynamicArray/tests/dynamic_array_badcreate.cpp: This test tests to make sure that you cannot dynamically change the size of a DynamicArray when there is a view outstanding for the DynamicArray. (Doing so could leave the view pointing at nonsense.) However, nothing in the DynamicArray code actually seems to enforce this constraint, so the test fails at run time. I couldn't fix this one. Should the test be changed? Should such a check be implemented? src/Field/tests/Positions.cpp: src/Field/tests/CrossBox.cpp: Also needed updating for the new fields. src/Pooma/tests/pooma.cpp: This test was written wrong -- it was not set up to exit with code zero on success. OK to check in? -- Mark Mitchell mark at codesourcery.com CodeSourcery, LLC http://www.codesourcery.com Index: src/Array/tests/ScalarAdvection.cpp =================================================================== RCS file: /home/pooma/Repository/r2/src/Array/tests/ScalarAdvection.cpp,v retrieving revision 1.4 diff -c -p -r1.4 ScalarAdvection.cpp *** src/Array/tests/ScalarAdvection.cpp 2000/07/20 15:36:24 1.4 --- src/Array/tests/ScalarAdvection.cpp 2001/10/10 00:33:08 *************** *** 35,56 **** #include "Pooma/Fields.h" #include "Utilities/Clock.h" #include #include #include using namespace std; // Forward declarations: // Ensight output: void ensightCaseOut(char *fn, int increment, int lastTimeStep, double dt); template void ensightGeometryOut(char *fn, UniformRectilinearMesh &mesh); ! template ! void ensightVariableOut(char *fn, const Array<1, T, EngineTag> &a); ! template ! void ensightVariableOut(char *fn, const Array<2, T, EngineTag> &a); ! template ! void ensightVariableOut(char *fn, const Array<3, T, EngineTag> &a); // Workaround for not-yet-correct canned stencil-based div(): template --- 35,65 ---- #include "Pooma/Fields.h" #include "Utilities/Clock.h" + #if POOMA_CHEETAH + typedef DistributedTag LayoutTag_t; + typedef Remote BrickTag_t; + #else + typedef ReplicatedTag LayoutTag_t; + typedef CompressibleBrick BrickTag_t; + #endif + #include #include #include using namespace std; + // Typedefs and constants. + const int Dim = 1; + typedef UniformRectilinearMesh Mesh_t; + typedef MultiPatch MP_t; + typedef Field Field_t; + // Forward declarations: // Ensight output: void ensightCaseOut(char *fn, int increment, int lastTimeStep, double dt); template void ensightGeometryOut(char *fn, UniformRectilinearMesh &mesh); ! void ensightVariableOut(char *fn, Field_t &f); // Workaround for not-yet-correct canned stencil-based div(): template *************** private: *** 136,187 **** }; - template - struct PeriodicBCThing - { - }; - - template<> - struct PeriodicBCThing<2> - { - template - PeriodicBCThing(const Layout &layout) - { - Interval<2> dom = layout.domain(); - int x1 = dom[0].first(); - int x2 = dom[0].last(); - int y1 = dom[1].first(); - int y2 = dom[1].last(); - - Interval<1> xinterior(x1 + 1, x2 - 1); - // Interval<1> yinterior(y1 + 1, y2 - 1); - Interval<1> yinterior(y1, y2); - - north_m = Interval<2>(xinterior, Interval<1>(y1, y1)); - south_m = Interval<2>(xinterior, Interval<1>(y2, y2)); - east_m = Interval<2>(Interval<1>(x1, x1), yinterior); - west_m = Interval<2>(Interval<1>(x2, x2), yinterior); - - northFrom_m = Interval<2>(xinterior, Interval<1>(y2 - 1, y2 - 1)); - southFrom_m = Interval<2>(xinterior, Interval<1>(y1 + 1, y1 + 1)); - eastFrom_m = Interval<2>(Interval<1>(x2 - 1, x2 - 1), yinterior); - westFrom_m = Interval<2>(Interval<1>(x1 + 1, x1 + 1), yinterior); - } - - template - void apply(const Array &a) - { - a(north_m) = a(northFrom_m); - a(south_m) = a(southFrom_m); - a(west_m) = a(westFrom_m); - a(east_m) = a(eastFrom_m); - } - - Interval<2> north_m, south_m, east_m, west_m; - Interval<2> northFrom_m, southFrom_m, eastFrom_m, westFrom_m; - }; - - int main(int argc, char *argv[]) { Pooma::initialize(argc,argv); // Initialize the library --- 145,150 ---- *************** int main(int argc, char *argv[]) *** 189,250 **** // PrintArray class, to format output as desired: PrintArray pa(3, 10, 3, 6, true, 1); - const int Dim = 2; // Set the dimensionality - // The SAOptions object sets the default option values // and parses argv for options that override the defaults. SAOptions opts(argc, argv); opts.print(pout); ! // Create the physical domains: ! Interval vertexDomain, cellDomain; int d; for (d = 0; d < Dim; d++) { vertexDomain[d] = Interval<1>(opts.nVerts[d]); - cellDomain[d] = Interval<1>(opts.nCells[d]); } // Create the (uniform, logically rectilinear) mesh. - Vector origin(0.0), spacings(0.2); - typedef UniformRectilinearMesh Mesh_t; - Mesh_t mesh(vertexDomain, origin, spacings); ! // Create two geometry objects - one allowing 1 guard layer to account for ! // stencil width and another with no guard layers to support temporaries: ! typedef DiscreteGeometry > Geometry_t; ! Geometry_t geom(mesh, GuardLayers(1)); ! Geometry_t geomNG(mesh); ! ! // Create the layouts ! Loc patches(8); ! for (d = 0; d < Dim; d++) { patches[d] = Loc<1>(opts.nPatches[d]); } ! GridLayout layoutc(cellDomain, patches, ! GuardLayers(1), GuardLayers(1), ! ReplicatedTag()); ! GridLayout layoutcNG(cellDomain, patches, ReplicatedTag()); ! typedef MultiPatch MP_t; // Create the Fields: - - // The flow Field u(x,t), a duplicate (stored at the previous - // timestep for staggered leapfrog), and a useful temporary: - - Array - u(layoutc), uPrev(layoutcNG), uTemp(layoutcNG), - uTemp2(layoutcNG); - - Interval<2> physical = uPrev.domain(); ! // Needed for div() bug WORKAROUND below: ! Array, MP_t> uv(layoutc); // Initialize Fields to zero everywhere, even global guard layers: ! u = 0.0; ! PeriodicBCThing pbc(u.engine().layout()); // Load initial condition u(x,0), a symmetric pulse centered around nCells/4 // and decaying to zero away from nCells/4 all directions, with a height of --- 152,207 ---- // PrintArray class, to format output as desired: PrintArray pa(3, 10, 3, 6, true, 1); // The SAOptions object sets the default option values // and parses argv for options that override the defaults. SAOptions opts(argc, argv); opts.print(pout); + + // Create the physical domains ! Interval vertexDomain; int d; for (d = 0; d < Dim; d++) { vertexDomain[d] = Interval<1>(opts.nVerts[d]); } + // Create some layouts. + Loc patches(opts.nPatches[0]); + UniformGridLayout layout(vertexDomain, patches, + GuardLayers(1), GuardLayers(1), + LayoutTag_t()); + UniformGridLayout layoutNG(vertexDomain, patches, LayoutTag_t()); + // Create the (uniform, logically rectilinear) mesh. ! Vector origin(0.0), spacings(0.2); ! Mesh_t mesh(layout, origin, spacings); ! Mesh_t meshNG(layoutNG, origin, spacings); ! // Create the centering. ! ! Centering cell = canonicalCentering(CellType, Continuous); // Create the Fields: ! // The flow Field u(x,t): ! ! Field_t u(cell, layout, mesh); ! Field, MP_t> dtvu(cell, layout, mesh); ! ! // The same, stored at the previous timestep for staggered leapfrog ! // plus a useful temporary: ! ! Field_t uPrev(cell, layoutNG, meshNG), uTemp(cell, layoutNG, meshNG); // Initialize Fields to zero everywhere, even global guard layers: ! u.all() = 0.0; ! // Set up periodic boundary conditions on all mesh faces: ! ! Pooma::addAllPeriodicFaceBC(u); // Load initial condition u(x,0), a symmetric pulse centered around nCells/4 // and decaying to zero away from nCells/4 all directions, with a height of *************** int main(int argc, char *argv[]) *** 256,263 **** for (d = 0; d < Dim; d++) { pulseCenter[d] = Loc<1>(opts.nCells[0]/4); } Pooma::blockAndEvaluate(); // Needed pre-scalar-indexing read ! Vector u0 = geom.x()(pulseCenter); ! u = 1.0 * exp(-dot(geom.x() - u0, geom.x() - u0) / (2.0 * pulseHalfWidth)); const Vector v(0.2); // Propagation velocity const double dt = 0.1; // Timestep --- 213,221 ---- for (d = 0; d < Dim; d++) { pulseCenter[d] = Loc<1>(opts.nCells[0]/4); } Pooma::blockAndEvaluate(); // Needed pre-scalar-indexing read ! PositionsTraits::Type_t ux = positions(u); ! Vector u0 = ux.read(pulseCenter); ! u = 1.0 * exp(-dot(ux - u0, ux - u0) / (2.0 * pulseHalfWidth)); const Vector v(0.2); // Propagation velocity const double dt = 0.1; // Timestep *************** int main(int argc, char *argv[]) *** 268,284 **** ensightGeometryOut("ScalarAdvection.geo", mesh); } ! // Print out information at t = 0: if (opts.purge) { ! u = where((fabs(u) < opts.epsilon), 0.0); // Purge initial conditions } Pooma::blockAndEvaluate(); // Needed for compressedFraction() validity pout << "t = " << double(0.0) << " ; compressedFraction(u) = " << compressedFraction(u) << std::endl; ! // pout << u(physical) << std::endl; ! pbc.apply(u); ! if (opts.doSumOut) pout << "sum(u) = " << sum(u(physical)) << std::endl; char timeStepFileName[6]; if (opts.doEnsightOut) { sprintf(timeStepFileName, "u.%04d", 0); --- 226,243 ---- ensightGeometryOut("ScalarAdvection.geo", mesh); } ! #if 0 if (opts.purge) { ! u = where(u, (fabs(u) < opts.epsilon), 0.0); // Purge initial conditions } + #endif + // Print out information at t = 0: Pooma::blockAndEvaluate(); // Needed for compressedFraction() validity pout << "t = " << double(0.0) << " ; compressedFraction(u) = " << compressedFraction(u) << std::endl; ! // pout << u << std::endl; ! if (opts.doSumOut) pout << "sum(u) = " << sum(u) << std::endl; char timeStepFileName[6]; if (opts.doEnsightOut) { sprintf(timeStepFileName, "u.%04d", 0); *************** int main(int argc, char *argv[]) *** 288,317 **** // Prime the leapfrog by setting the field at the previous timestep using the // initial conditions: ! uPrev = u(physical); // Do a preliminary timestep using forward Euler, using the canned POOMA ! // div() function: ! // BROKEN u -= div(v * dt * u); ! // WORKAROUND: ! // Use the Field temporay for most straightforward r1 comparison: ! uv = u * v * dt; ! ! Interval<1> I = geom.mesh().physicalCellDomain()[0]; ! Interval<1> J = geom.mesh().physicalCellDomain()[1]; ! ! Geometry_t::Mesh_t::PointType_t dx2i = geom.mesh().meshSpacing(); ! ! dx2i = 0.5/dx2i; ! ! uTemp2(I,J) = ! (uv.comp(0)(I + 1, J) - uv.comp(0)(I - 1, J))*dx2i(0) + ! (uv.comp(1)(I, J + 1) - uv.comp(1)(I, J - 1))*dx2i(1); ! ! // divv(uv, uTemp2); ! u(physical) -= uTemp2; ! pbc.apply(u); ! // WORKAROUND. // Start timer to time main loop; do blockAndEvaluate first so results are // meaningful: --- 247,259 ---- // Prime the leapfrog by setting the field at the previous timestep using the // initial conditions: ! uPrev = u; // Do a preliminary timestep using forward Euler, using the canned POOMA ! // stencil-based divergence operator div() for the spatial difference: ! ! dtvu.all() = dt * v * u.all(); ! u -= divCellToCell(dtvu); // Start timer to time main loop; do blockAndEvaluate first so results are // meaningful: *************** int main(int argc, char *argv[]) *** 323,356 **** // The spatial derivative is just the second-order finite difference in the // canned POOMA stencil-based divergence operator div(): for (int timestep = 2; timestep <= opts.lastTimeStep; timestep++) { ! uTemp = u(physical); ! ! // BROKEN u = uPrev - 2.0 * div(v * dt * u); ! // WORKAROUND: ! // Use the Field temporay for most straightforward r1 comparison: ! uv = u * v * dt; ! uTemp2(I,J) = ! (uv.comp(0)(I + 1, J) - uv.comp(0)(I - 1, J))*dx2i(0) + ! (uv.comp(1)(I, J + 1) - uv.comp(1)(I, J - 1))*dx2i(1); ! ! // divv(uv, uTemp2); ! u(physical) = uPrev - 2.0 * uTemp2; ! ! // WORKAROUND. ! //tjw workaround. ! if (opts.purge) { ! if ((timestep % opts.purgeIncrement) == 0) { ! u(physical) = where((fabs(u(physical)) < opts.epsilon), 0.0); ! // WORKAROUND for WCY ! } ! } if ((timestep % opts.outputIncrement) == 0) { Pooma::blockAndEvaluate(); // Needed for compressedFraction() validity pout << "t = " << timestep*dt << " ; compressedFraction(u) = " << compressedFraction(u) << std::endl; ! // pout << u(physical) << std::endl; ! if (opts.doSumOut) pout << "sum(u) = " << sum(u(physical)) << std::endl; if (opts.doEnsightOut) { // u.applyBoundaryConditions(); // Update prior to output. sprintf(timeStepFileName, "u.%04d", timestep); --- 265,280 ---- // The spatial derivative is just the second-order finite difference in the // canned POOMA stencil-based divergence operator div(): for (int timestep = 2; timestep <= opts.lastTimeStep; timestep++) { ! uTemp = u; ! dtvu.all() = dt * v * u.all(); ! u = uPrev - 2.0 * divCellToCell(dtvu); if ((timestep % opts.outputIncrement) == 0) { Pooma::blockAndEvaluate(); // Needed for compressedFraction() validity pout << "t = " << timestep*dt << " ; compressedFraction(u) = " << compressedFraction(u) << std::endl; ! // pout << u << std::endl; ! if (opts.doSumOut) pout << "sum(u) = " << sum(u) << std::endl; if (opts.doEnsightOut) { // u.applyBoundaryConditions(); // Update prior to output. sprintf(timeStepFileName, "u.%04d", timestep); *************** int main(int argc, char *argv[]) *** 359,366 **** if (opts.doTextOut) { pa.print(pout, u); } } - pbc.apply(u); - uPrev = uTemp; } --- 283,288 ---- *************** SAOptions() *** 391,397 **** for (int d = 0; d < D; ++d) { nPatches[d] = 10; ! nCells[d] = 100; nVerts[d] = nCells[d] + 1; } pulseHalfWidthCells = nCells[0]/8.0; --- 313,319 ---- for (int d = 0; d < D; ++d) { nPatches[d] = 10; ! nCells[d] = 99; nVerts[d] = nCells[d] + 1; } pulseHalfWidthCells = nCells[0]/8.0; *************** void ensightGeometryOut(char *fn, Unifor *** 797,803 **** int id[3]; int d; for (d = 0; d < Dim; d++) { ! id[d] = mesh.physicalDomain()[d].size(); } for (d = Dim; d < 3; d++) { id[d] = 1; --- 719,725 ---- int id[3]; int d; for (d = 0; d < Dim; d++) { ! id[d] = mesh.physicalVertexDomain()[d].size(); } for (d = Dim; d < 3; d++) { id[d] = 1; *************** void ensightGeometryOut(char *fn, Unifor *** 817,823 **** // Mesh spacings: float dxd[3]; for (d = 0; d < Dim; d++) { ! dxd[d] = mesh.meshSpacing()(d); } for (d = Dim; d < 3; d++) { dxd[d] = 0.0; --- 739,745 ---- // Mesh spacings: float dxd[3]; for (d = 0; d < Dim; d++) { ! dxd[d] = mesh.spacings()(d); } for (d = Dim; d < 3; d++) { dxd[d] = 0.0; *************** void ensightGeometryOut(char *fn, Unifor *** 827,867 **** } // Variable file: ! // Partial specializations for 1D, 2D, 3D Arrays: ! // 1D: ! template ! void ensightVariableOut(char *fn, const Array<1, T, EngineTag> &a) { - char descript[80]; - FILE *fp; - int ii; ! fp = fopen(fn, "w"); ! sprintf(descript,"Scalar Variable u at %s",fn); ! fwrite(descript,sizeof(char),80,fp); ! strcpy(descript,"part"); ! fwrite(descript,sizeof(char),80,fp); ! ii = 1; ! fwrite(&ii,sizeof(int),1,fp); ! strcpy(descript,"block uniform"); ! fwrite(descript,sizeof(char),80,fp); ! ! float *var; ! int nnodes = a.domain().size(); ! var = new float[nnodes]; ! for (int i = a.domain()[0].first(); i <= a.domain()[0].last(); i++) { ! var[i] = a(i); ! } ! ! fwrite (var, sizeof(float), nnodes, fp); ! delete [] var; ! fclose(fp); ! } - // 2D: - template - void ensightVariableOut(char *fn, const Array<2, T, EngineTag> &a) - { char descript[80]; FILE *fp; int ii; --- 749,760 ---- } // Variable file: ! void ensightVariableOut(char *fn, Field_t &f) { ! typedef Field_t::Domain_t Domain_t; ! Domain_t domain(f.layout().domain()); char descript[80]; FILE *fp; int ii; *************** void ensightVariableOut(char *fn, const *** 870,876 **** int nelems = 1; int d; for (d = 0; d < 2; d++) { ! id[d] = a.domain()[d].size(); nelems*= id[d]; } for (d = 2; d < 3; d++) { --- 763,769 ---- int nelems = 1; int d; for (d = 0; d < 2; d++) { ! id[d] = domain[d].size(); nelems*= id[d]; } for (d = 2; d < 3; d++) { *************** void ensightVariableOut(char *fn, const *** 889,939 **** float *var; var = new float[nelems]; - int count = 0; - for (int j = a.domain()[1].first(); j <= a.domain()[1].last(); j++) { - for (int i = a.domain()[0].first(); i <= a.domain()[0].last(); i++) { - var[count++] = a(i,j); - } - } - - fwrite (var, sizeof(float), nelems, fp); - delete [] var; - fclose(fp); - } - - // 3D: - template - void ensightVariableOut(char *fn, const Array<3, T, EngineTag> &a) - { - char descript[80]; - FILE *fp; - int ii; - - int id[3]; - int nelems = 1; - for (int d = 0; d < 3; d++) { - id[d] = a.domain()[d].size(); - nelems*= id[d]; - } - - fp = fopen(fn, "w"); - sprintf(descript,"Scalar Variable u at %s",fn); - fwrite(descript,sizeof(char),80,fp); - strcpy(descript,"part"); - fwrite(descript,sizeof(char),80,fp); - ii = 1; - fwrite(&ii,sizeof(int),1,fp); - strcpy(descript,"block uniform"); - fwrite(descript,sizeof(char),80,fp); - - float *var; - var = new float[nelems]; int count = 0; ! for (int k = a.domain()[2].first(); k <= a.domain()[2].last(); k++) { ! for (int j = a.domain()[1].first(); j <= a.domain()[1].last(); j++) { ! for (int i = a.domain()[0].first(); i <= a.domain()[0].last(); i++) { ! var[count++] = a(i,j,k); ! } } } --- 782,792 ---- float *var; var = new float[nelems]; int count = 0; ! // This should be rewritten in a domain-independent way. ! for (int j = domain[1].first(); j <= domain[1].last(); j++) { ! for (int i = domain[0].first(); i <= domain[0].last(); i++) { ! var[count++] = f(i,j); } } Index: src/Connect/Lux/LuxConnector.Field.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Connect/Lux/LuxConnector.Field.h,v retrieving revision 1.2 diff -c -p -r1.2 LuxConnector.Field.h *** src/Connect/Lux/LuxConnector.Field.h 2000/03/07 13:16:19 1.2 --- src/Connect/Lux/LuxConnector.Field.h 2001/10/10 00:33:08 *************** *** 81,90 **** // //----------------------------------------------------------------------------- ! template ! class Connector, Lux> ! : public Connector, ! typename Field::Domain_t>::Type_t, Lux> { public: --- 81,90 ---- // //----------------------------------------------------------------------------- ! template ! class Connector, Lux> ! : public Connector::dimensions, ! T, EngineTag>, Lux> { public: *************** public: *** 92,100 **** // Public typedefs and enums //============================================================ ! typedef Field Field_t; typedef typename Field_t::Domain_t Domain_t; ! typedef typename ArrayView::Type_t Array_t; typedef Connector Base_t; typedef Connection Connection_t; typedef Connector Connector_t; --- 92,101 ---- // Public typedefs and enums //============================================================ ! typedef Field Field_t; typedef typename Field_t::Domain_t Domain_t; ! typedef Array::dimensions, ! T, EngineTag> Array_t; typedef Connector Base_t; typedef Connection Connection_t; typedef Connector Connector_t; *************** private: *** 154,160 **** //============================================================ // Reset the mesh data in the base class to the data for the given ! // Field's geometry. void setupMeshInfo(const Field_t &f) { --- 155,161 ---- //============================================================ // Reset the mesh data in the base class to the data for the given ! // Field's mesh. void setupMeshInfo(const Field_t &f) { Index: src/Field/Mesh/PositionFunctions.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Field/Mesh/PositionFunctions.h,v retrieving revision 1.1 diff -c -p -r1.1 PositionFunctions.h *** src/Field/Mesh/PositionFunctions.h 2001/08/30 01:15:12 1.1 --- src/Field/Mesh/PositionFunctions.h 2001/10/10 00:33:08 *************** struct XField *** 157,166 **** template struct XField > { ! typedef UniformRectilinearMesh GeometryTag_t; typedef Vector PointType_t; typedef IndexFunction > PositionEngine_t; ! typedef Field Type_t; }; template --- 157,166 ---- template struct XField > { ! typedef UniformRectilinearMesh Mesh_t; typedef Vector PointType_t; typedef IndexFunction > PositionEngine_t; ! typedef Field Type_t; }; template *************** void setXField(F &f) *** 170,179 **** } template ! typename XField::Type_t xField(const F &f, const Init ¢ering) { ! typename XField::Type_t ret(centering, f); setXField(ret); return ret; } --- 170,180 ---- } template ! typename XField::Type_t xField(const F &f, const Init ¢ering) { ! typedef XField::Type_t Field_t; ! Field_t ret(centering, f.layout(), f.mesh()); setXField(ret); return ret; } Index: src/Field/tests/CrossBox.cpp =================================================================== RCS file: /home/pooma/Repository/r2/src/Field/tests/CrossBox.cpp,v retrieving revision 1.1 diff -c -p -r1.1 CrossBox.cpp *** src/Field/tests/CrossBox.cpp 2001/08/30 01:15:18 1.1 --- src/Field/tests/CrossBox.cpp 2001/10/10 00:33:08 *************** int main(int argc, char *argv[]) *** 82,93 **** Centering<2> allFace = canonicalCentering<2>(FaceType, Continuous); ! typedef UniformRectilinear<2> Geometry_t; typedef MultiPatch > EngineTag_t; ! typedef Field Field_t; ! typedef Field, EngineTag_t > VField_t; Vector<2> origin(0.0, 0.0); Vector<2> spacings(1.0, 1.0); --- 82,93 ---- Centering<2> allFace = canonicalCentering<2>(FaceType, Continuous); ! typedef UniformRectilinearMesh<2> Mesh_t; typedef MultiPatch > EngineTag_t; ! typedef Field Field_t; ! typedef Field, EngineTag_t > VField_t; Vector<2> origin(0.0, 0.0); Vector<2> spacings(1.0, 1.0); *************** int main(int argc, char *argv[]) *** 99,105 **** // Should really figure out how to repackage these three lines: DomainLayout<2> layoutDom(physicalVertexDomain, GuardLayers<2>(1)); ! XField::Type_t x(allFace, layoutDom, origin, spacings); setXField(x); b = 0.0; --- 99,105 ---- // Should really figure out how to repackage these three lines: DomainLayout<2> layoutDom(physicalVertexDomain, GuardLayers<2>(1)); ! XField::Type_t x(allFace, layoutDom, origin, spacings); setXField(x); b = 0.0; Index: src/Field/tests/Positions.cpp =================================================================== RCS file: /home/pooma/Repository/r2/src/Field/tests/Positions.cpp,v retrieving revision 1.1 diff -c -p -r1.1 Positions.cpp *** src/Field/tests/Positions.cpp 2001/08/30 01:15:18 1.1 --- src/Field/tests/Positions.cpp 2001/10/10 00:33:08 *************** int main(int argc, char *argv[]) *** 69,78 **** Centering<2> vert = canonicalCentering<2>(VertexType, Continuous); Centering<2> allFace = canonicalCentering<2>(FaceType, Continuous); ! typedef UniformRectilinear<2> Geometry_t; ! typedef Field Field_t; ! typedef XField::Type_t XField_t; Field_t f(cell, layout1, origin, spacings); XField_t x(cell, layout1, origin, spacings); --- 69,78 ---- Centering<2> vert = canonicalCentering<2>(VertexType, Continuous); Centering<2> allFace = canonicalCentering<2>(FaceType, Continuous); ! typedef UniformRectilinearMesh<2> Mesh_t; ! typedef Field Field_t; ! typedef XField::Type_t XField_t; Field_t f(cell, layout1, origin, spacings); XField_t x(cell, layout1, origin, spacings); Index: src/Pooma/Fields.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Pooma/Fields.h,v retrieving revision 1.13 diff -c -p -r1.13 Fields.h *** src/Pooma/Fields.h 2001/10/06 00:39:19 1.13 --- src/Pooma/Fields.h 2001/10/10 00:33:08 *************** *** 54,59 **** --- 54,60 ---- #include "Field/Mesh/NoMesh.h" #include "Field/Mesh/UniformRectilinearMesh.h" #include "Field/Mesh/MeshFunctions.h" + #include "Field/Mesh/PositionFunctions.h" // Relations: Index: src/Pooma/tests/pooma.cpp =================================================================== RCS file: /home/pooma/Repository/r2/src/Pooma/tests/pooma.cpp,v retrieving revision 1.4 diff -c -p -r1.4 pooma.cpp *** src/Pooma/tests/pooma.cpp 2001/05/24 17:17:36 1.4 --- src/Pooma/tests/pooma.cpp 2001/10/10 00:33:08 *************** *** 46,51 **** --- 46,54 ---- // Pooma general interface test program. //----------------------------------------------------------------------------- + #include + #include + #include "Pooma/Pooma.h" void newAbortHandler() *************** void newAbortHandler() *** 53,58 **** --- 56,70 ---- std::cerr << "Running newly installed abort handler." << std::endl; } + // This function is registered as the signal handler for SIGABRT. + + void abortSignalHandler(int) + { + // Exit with a `0' exit status to indicate that all went well. + // This test is *expected* to bort. + exit(0); + } + int main(int argc, char *argv[]) { *************** int main(int argc, char *argv[]) *** 107,116 **** Pooma::pinfo << "Shutting down POOMA with abort()..." << std::endl; Pooma::abortHandler(newAbortHandler); Pooma::pAbort("This is the abort message.", 2); ! return 0; } --- 119,134 ---- Pooma::pinfo << "Shutting down POOMA with abort()..." << std::endl; + // Register a signal handler so that when Pooma::pAbort calls the + // abort standard library function, this program does not exit with + // a nonzero exit code. + signal(SIGABRT, abortSignalHandler); + Pooma::abortHandler(newAbortHandler); Pooma::pAbort("This is the abort message.", 2); ! // If we get here, the call to Pooma::pAbort did not work. ! return 1; } From qmtrack at ns1.codesourcery.com Wed Oct 10 02:07:03 2001 From: qmtrack at ns1.codesourcery.com (qmtrack at ns1.codesourcery.com) Date: 10 Oct 2001 02:07:03 -0000 Subject: [QMTrack] new issue one_dim_relation Message-ID: <20011010020703.1324.qmail@mail.codesourcery.com> The issue one_dim_relation was created by oldham on 2001-10-09 20:07 MDT. Issue ID: one_dim_relation Modification Time: 2001-10-09 20:07 MDT Modifying User: oldham State: submitted Summary: One Dimension Relation Error? Categories: correctness Discussion: None Description: Stephen, src/Field/Relations/Relations.h:204 has three operands: target_m, r1_m, r2_m. It seems r2_m should be omitted. Do you agree? How do we test changing the code? Assignee: smith From qmtrack at ns1.codesourcery.com Wed Oct 10 02:18:48 2001 From: qmtrack at ns1.codesourcery.com (qmtrack at ns1.codesourcery.com) Date: 10 Oct 2001 02:18:48 -0000 Subject: [QMTrack] modification to issue scalar_advection_2d Message-ID: <20011010021848.1774.qmail@mail.codesourcery.com> The issue scalar_advection_2d was changed by oldham on 2001-10-09 20:18 MDT. The following fields were modified: Discussion: On 2001-10-09 20:18 MDT, oldham wrote: JDO writes: The problem occurs possilby because periodic boundary conditions are applied to all mesh faces of a field "u" that is cell centered. Is this reasonable? Should the code use a PInsist checking the centering type? From oldham at codesourcery.com Wed Oct 10 02:55:50 2001 From: oldham at codesourcery.com (Jeffrey Oldham) Date: Tue, 9 Oct 2001 19:55:50 -0700 Subject: [pooma-dev] RFA: Patch for fixes for regression test failures In-Reply-To: <20011010003525.1926753.qmail@n02.acl.lanl.gov>; from mark@codesourcery.com on Tue, Oct 09, 2001 at 06:35:25PM -0600 References: <20011010003525.1926753.qmail@n02.acl.lanl.gov> Message-ID: <20011009195550.A29024@codesourcery.com> On Tue, Oct 09, 2001 at 06:35:25PM -0600, Mark P Mitchell wrote: > > The attached patch attempts to fix several regression tests. > > Here is a summary: > > src/Array/tests/ScalarAdvection.cpp: > > Updated to use approximately the same code that Scott used in > examples/Field/ScalarAdvection/ScalarAdvection.cpp. > > Note that although this test now compiles, it still fails for dimension 2. Scott's code fails in dimension 2, as well. This code works in dimension 1 as does Scott's code. Was the original code dimension-independent? If so, it would be nice that the revised code is also dimension independent. > src/Connect/Lux/tests/*: > > These tests failed because LuxConnector.Field.h had not been > updated for the new fields. For me, lux_test2 still fails, but I believe that is a particle problem. > src/DynamicArray/tests/dynamic_array_badcreate.cpp: > > This test tests to make sure that you cannot dynamically change the > size of a DynamicArray when there is a view outstanding for the > DynamicArray. (Doing so could leave the view pointing at > nonsense.) > > However, nothing in the DynamicArray code actually seems to > enforce this constraint, so the test fails at run time. > > I couldn't fix this one. Should the test be changed? Should > such a check be implemented? > > src/Field/tests/Positions.cpp: > src/Field/tests/CrossBox.cpp: > > Also needed updating for the new fields. > > src/Pooma/tests/pooma.cpp: > > This test was written wrong -- it was not set up to exit with > code zero on success. > > OK to check in? Yes. I have attached a slightly different patch. Would you please list on which platforms you tested the code? I compiled and tested the code on Linux/g++. Thanks, Jeffrey D. Oldham oldham at codesourcery.com -------------- next part -------------- Index: src/Array/tests/ScalarAdvection.cpp =================================================================== RCS file: /home/pooma/Repository/r2/src/Array/tests/ScalarAdvection.cpp,v retrieving revision 1.4 diff -c -p -r1.4 ScalarAdvection.cpp *** src/Array/tests/ScalarAdvection.cpp 2000/07/20 15:36:24 1.4 --- src/Array/tests/ScalarAdvection.cpp 2001/10/10 02:48:28 *************** *** 28,56 **** // ---------------------------------------------------------------------------- // Scalar advection example, illustrating use of Field, Mesh, ! // DiscreteGeometry, and the canned second-order divergence operator ! // div() // ---------------------------------------------------------------------------- #include "Pooma/Fields.h" #include "Utilities/Clock.h" #include #include #include using namespace std; // Forward declarations: // Ensight output: void ensightCaseOut(char *fn, int increment, int lastTimeStep, double dt); template void ensightGeometryOut(char *fn, UniformRectilinearMesh &mesh); ! template ! void ensightVariableOut(char *fn, const Array<1, T, EngineTag> &a); ! template ! void ensightVariableOut(char *fn, const Array<2, T, EngineTag> &a); ! template ! void ensightVariableOut(char *fn, const Array<3, T, EngineTag> &a); // Workaround for not-yet-correct canned stencil-based div(): template --- 28,64 ---- // ---------------------------------------------------------------------------- // Scalar advection example, illustrating use of Field, Mesh, ! // DiscreteGeometry, and the canned second-order divergence operator div // ---------------------------------------------------------------------------- #include "Pooma/Fields.h" #include "Utilities/Clock.h" + #if POOMA_CHEETAH + typedef DistributedTag LayoutTag_t; + typedef Remote BrickTag_t; + #else + typedef ReplicatedTag LayoutTag_t; + typedef CompressibleBrick BrickTag_t; + #endif + #include #include #include using namespace std; + // Typedefs and constants. + const int Dim = 2; + typedef UniformRectilinearMesh Mesh_t; + typedef MultiPatch MP_t; + typedef Field Field_t; + // Forward declarations: // Ensight output: void ensightCaseOut(char *fn, int increment, int lastTimeStep, double dt); template void ensightGeometryOut(char *fn, UniformRectilinearMesh &mesh); ! void ensightVariableOut(char *fn, Field_t &f); // Workaround for not-yet-correct canned stencil-based div(): template *************** private: *** 136,187 **** }; - template - struct PeriodicBCThing - { - }; - - template<> - struct PeriodicBCThing<2> - { - template - PeriodicBCThing(const Layout &layout) - { - Interval<2> dom = layout.domain(); - int x1 = dom[0].first(); - int x2 = dom[0].last(); - int y1 = dom[1].first(); - int y2 = dom[1].last(); - - Interval<1> xinterior(x1 + 1, x2 - 1); - // Interval<1> yinterior(y1 + 1, y2 - 1); - Interval<1> yinterior(y1, y2); - - north_m = Interval<2>(xinterior, Interval<1>(y1, y1)); - south_m = Interval<2>(xinterior, Interval<1>(y2, y2)); - east_m = Interval<2>(Interval<1>(x1, x1), yinterior); - west_m = Interval<2>(Interval<1>(x2, x2), yinterior); - - northFrom_m = Interval<2>(xinterior, Interval<1>(y2 - 1, y2 - 1)); - southFrom_m = Interval<2>(xinterior, Interval<1>(y1 + 1, y1 + 1)); - eastFrom_m = Interval<2>(Interval<1>(x2 - 1, x2 - 1), yinterior); - westFrom_m = Interval<2>(Interval<1>(x1 + 1, x1 + 1), yinterior); - } - - template - void apply(const Array &a) - { - a(north_m) = a(northFrom_m); - a(south_m) = a(southFrom_m); - a(west_m) = a(westFrom_m); - a(east_m) = a(eastFrom_m); - } - - Interval<2> north_m, south_m, east_m, west_m; - Interval<2> northFrom_m, southFrom_m, eastFrom_m, westFrom_m; - }; - - int main(int argc, char *argv[]) { Pooma::initialize(argc,argv); // Initialize the library --- 144,149 ---- *************** int main(int argc, char *argv[]) *** 189,250 **** // PrintArray class, to format output as desired: PrintArray pa(3, 10, 3, 6, true, 1); - const int Dim = 2; // Set the dimensionality - // The SAOptions object sets the default option values // and parses argv for options that override the defaults. SAOptions opts(argc, argv); opts.print(pout); ! // Create the physical domains: ! Interval vertexDomain, cellDomain; int d; for (d = 0; d < Dim; d++) { vertexDomain[d] = Interval<1>(opts.nVerts[d]); - cellDomain[d] = Interval<1>(opts.nCells[d]); } // Create the (uniform, logically rectilinear) mesh. - Vector origin(0.0), spacings(0.2); - typedef UniformRectilinearMesh Mesh_t; - Mesh_t mesh(vertexDomain, origin, spacings); ! // Create two geometry objects - one allowing 1 guard layer to account for ! // stencil width and another with no guard layers to support temporaries: ! typedef DiscreteGeometry > Geometry_t; ! Geometry_t geom(mesh, GuardLayers(1)); ! Geometry_t geomNG(mesh); ! ! // Create the layouts ! Loc patches(8); ! for (d = 0; d < Dim; d++) { patches[d] = Loc<1>(opts.nPatches[d]); } ! GridLayout layoutc(cellDomain, patches, ! GuardLayers(1), GuardLayers(1), ! ReplicatedTag()); ! GridLayout layoutcNG(cellDomain, patches, ReplicatedTag()); ! typedef MultiPatch MP_t; // Create the Fields: - - // The flow Field u(x,t), a duplicate (stored at the previous - // timestep for staggered leapfrog), and a useful temporary: - - Array - u(layoutc), uPrev(layoutcNG), uTemp(layoutcNG), - uTemp2(layoutcNG); - - Interval<2> physical = uPrev.domain(); ! // Needed for div() bug WORKAROUND below: ! Array, MP_t> uv(layoutc); // Initialize Fields to zero everywhere, even global guard layers: ! u = 0.0; ! PeriodicBCThing pbc(u.engine().layout()); // Load initial condition u(x,0), a symmetric pulse centered around nCells/4 // and decaying to zero away from nCells/4 all directions, with a height of --- 151,206 ---- // PrintArray class, to format output as desired: PrintArray pa(3, 10, 3, 6, true, 1); // The SAOptions object sets the default option values // and parses argv for options that override the defaults. SAOptions opts(argc, argv); opts.print(pout); + + // Create the physical domains ! Interval vertexDomain; int d; for (d = 0; d < Dim; d++) { vertexDomain[d] = Interval<1>(opts.nVerts[d]); } + // Create some layouts. + Loc patches(opts.nPatches[0]); + UniformGridLayout layout(vertexDomain, patches, + GuardLayers(1), GuardLayers(1), + LayoutTag_t()); + UniformGridLayout layoutNG(vertexDomain, patches, LayoutTag_t()); + // Create the (uniform, logically rectilinear) mesh. ! Vector origin(0.0), spacings(0.2); ! Mesh_t mesh(layout, origin, spacings); ! Mesh_t meshNG(layoutNG, origin, spacings); ! // Create the centering. ! ! Centering cell = canonicalCentering(CellType, Continuous); // Create the Fields: ! // The flow Field u(x,t): ! ! Field_t u(cell, layout, mesh); ! Field, MP_t> dtvu(cell, layout, mesh); ! ! // The same, stored at the previous timestep for staggered leapfrog ! // plus a useful temporary: ! ! Field_t uPrev(cell, layoutNG, meshNG), uTemp(cell, layoutNG, meshNG); // Initialize Fields to zero everywhere, even global guard layers: ! u.all() = 0.0; ! // Set up periodic boundary conditions on all mesh faces: ! ! Pooma::addAllPeriodicFaceBC(u); // Load initial condition u(x,0), a symmetric pulse centered around nCells/4 // and decaying to zero away from nCells/4 all directions, with a height of *************** int main(int argc, char *argv[]) *** 256,263 **** for (d = 0; d < Dim; d++) { pulseCenter[d] = Loc<1>(opts.nCells[0]/4); } Pooma::blockAndEvaluate(); // Needed pre-scalar-indexing read ! Vector u0 = geom.x()(pulseCenter); ! u = 1.0 * exp(-dot(geom.x() - u0, geom.x() - u0) / (2.0 * pulseHalfWidth)); const Vector v(0.2); // Propagation velocity const double dt = 0.1; // Timestep --- 212,220 ---- for (d = 0; d < Dim; d++) { pulseCenter[d] = Loc<1>(opts.nCells[0]/4); } Pooma::blockAndEvaluate(); // Needed pre-scalar-indexing read ! PositionsTraits::Type_t ux = positions(u); ! Vector u0 = ux.read(pulseCenter); ! u = 1.0 * exp(-dot(ux - u0, ux - u0) / (2.0 * pulseHalfWidth)); const Vector v(0.2); // Propagation velocity const double dt = 0.1; // Timestep *************** int main(int argc, char *argv[]) *** 268,284 **** ensightGeometryOut("ScalarAdvection.geo", mesh); } ! // Print out information at t = 0: if (opts.purge) { ! u = where((fabs(u) < opts.epsilon), 0.0); // Purge initial conditions } Pooma::blockAndEvaluate(); // Needed for compressedFraction() validity pout << "t = " << double(0.0) << " ; compressedFraction(u) = " << compressedFraction(u) << std::endl; ! // pout << u(physical) << std::endl; ! pbc.apply(u); ! if (opts.doSumOut) pout << "sum(u) = " << sum(u(physical)) << std::endl; char timeStepFileName[6]; if (opts.doEnsightOut) { sprintf(timeStepFileName, "u.%04d", 0); --- 225,242 ---- ensightGeometryOut("ScalarAdvection.geo", mesh); } ! #if 0 if (opts.purge) { ! u = where(u, (fabs(u) < opts.epsilon), 0.0); // Purge initial conditions } + #endif + // Print out information at t = 0: Pooma::blockAndEvaluate(); // Needed for compressedFraction() validity pout << "t = " << double(0.0) << " ; compressedFraction(u) = " << compressedFraction(u) << std::endl; ! // pout << u << std::endl; ! if (opts.doSumOut) pout << "sum(u) = " << sum(u) << std::endl; char timeStepFileName[6]; if (opts.doEnsightOut) { sprintf(timeStepFileName, "u.%04d", 0); *************** int main(int argc, char *argv[]) *** 288,317 **** // Prime the leapfrog by setting the field at the previous timestep using the // initial conditions: ! uPrev = u(physical); // Do a preliminary timestep using forward Euler, using the canned POOMA ! // div() function: ! // BROKEN u -= div(v * dt * u); ! // WORKAROUND: ! // Use the Field temporay for most straightforward r1 comparison: ! uv = u * v * dt; ! ! Interval<1> I = geom.mesh().physicalCellDomain()[0]; ! Interval<1> J = geom.mesh().physicalCellDomain()[1]; ! ! Geometry_t::Mesh_t::PointType_t dx2i = geom.mesh().meshSpacing(); ! ! dx2i = 0.5/dx2i; ! ! uTemp2(I,J) = ! (uv.comp(0)(I + 1, J) - uv.comp(0)(I - 1, J))*dx2i(0) + ! (uv.comp(1)(I, J + 1) - uv.comp(1)(I, J - 1))*dx2i(1); ! ! // divv(uv, uTemp2); ! u(physical) -= uTemp2; ! pbc.apply(u); ! // WORKAROUND. // Start timer to time main loop; do blockAndEvaluate first so results are // meaningful: --- 246,258 ---- // Prime the leapfrog by setting the field at the previous timestep using the // initial conditions: ! uPrev = u; // Do a preliminary timestep using forward Euler, using the canned POOMA ! // stencil-based divergence operator div() for the spatial difference: ! ! dtvu.all() = dt * v * u.all(); ! u -= divCellToCell(dtvu); // Start timer to time main loop; do blockAndEvaluate first so results are // meaningful: *************** int main(int argc, char *argv[]) *** 323,356 **** // The spatial derivative is just the second-order finite difference in the // canned POOMA stencil-based divergence operator div(): for (int timestep = 2; timestep <= opts.lastTimeStep; timestep++) { ! uTemp = u(physical); ! ! // BROKEN u = uPrev - 2.0 * div(v * dt * u); ! // WORKAROUND: ! // Use the Field temporay for most straightforward r1 comparison: ! uv = u * v * dt; ! uTemp2(I,J) = ! (uv.comp(0)(I + 1, J) - uv.comp(0)(I - 1, J))*dx2i(0) + ! (uv.comp(1)(I, J + 1) - uv.comp(1)(I, J - 1))*dx2i(1); ! ! // divv(uv, uTemp2); ! u(physical) = uPrev - 2.0 * uTemp2; ! ! // WORKAROUND. ! //tjw workaround. ! if (opts.purge) { ! if ((timestep % opts.purgeIncrement) == 0) { ! u(physical) = where((fabs(u(physical)) < opts.epsilon), 0.0); ! // WORKAROUND for WCY ! } ! } if ((timestep % opts.outputIncrement) == 0) { Pooma::blockAndEvaluate(); // Needed for compressedFraction() validity pout << "t = " << timestep*dt << " ; compressedFraction(u) = " << compressedFraction(u) << std::endl; ! // pout << u(physical) << std::endl; ! if (opts.doSumOut) pout << "sum(u) = " << sum(u(physical)) << std::endl; if (opts.doEnsightOut) { // u.applyBoundaryConditions(); // Update prior to output. sprintf(timeStepFileName, "u.%04d", timestep); --- 264,279 ---- // The spatial derivative is just the second-order finite difference in the // canned POOMA stencil-based divergence operator div(): for (int timestep = 2; timestep <= opts.lastTimeStep; timestep++) { ! uTemp = u; ! dtvu.all() = dt * v * u.all(); ! u = uPrev - 2.0 * divCellToCell(dtvu); if ((timestep % opts.outputIncrement) == 0) { Pooma::blockAndEvaluate(); // Needed for compressedFraction() validity pout << "t = " << timestep*dt << " ; compressedFraction(u) = " << compressedFraction(u) << std::endl; ! // pout << u << std::endl; ! if (opts.doSumOut) pout << "sum(u) = " << sum(u) << std::endl; if (opts.doEnsightOut) { // u.applyBoundaryConditions(); // Update prior to output. sprintf(timeStepFileName, "u.%04d", timestep); *************** int main(int argc, char *argv[]) *** 359,366 **** if (opts.doTextOut) { pa.print(pout, u); } } - pbc.apply(u); - uPrev = uTemp; } --- 282,287 ---- *************** SAOptions() *** 391,397 **** for (int d = 0; d < D; ++d) { nPatches[d] = 10; ! nCells[d] = 100; nVerts[d] = nCells[d] + 1; } pulseHalfWidthCells = nCells[0]/8.0; --- 312,318 ---- for (int d = 0; d < D; ++d) { nPatches[d] = 10; ! nCells[d] = 99; nVerts[d] = nCells[d] + 1; } pulseHalfWidthCells = nCells[0]/8.0; *************** void ensightGeometryOut(char *fn, Unifor *** 797,803 **** int id[3]; int d; for (d = 0; d < Dim; d++) { ! id[d] = mesh.physicalDomain()[d].size(); } for (d = Dim; d < 3; d++) { id[d] = 1; --- 718,724 ---- int id[3]; int d; for (d = 0; d < Dim; d++) { ! id[d] = mesh.physicalVertexDomain()[d].size(); } for (d = Dim; d < 3; d++) { id[d] = 1; *************** void ensightGeometryOut(char *fn, Unifor *** 817,823 **** // Mesh spacings: float dxd[3]; for (d = 0; d < Dim; d++) { ! dxd[d] = mesh.meshSpacing()(d); } for (d = Dim; d < 3; d++) { dxd[d] = 0.0; --- 738,744 ---- // Mesh spacings: float dxd[3]; for (d = 0; d < Dim; d++) { ! dxd[d] = mesh.spacings()(d); } for (d = Dim; d < 3; d++) { dxd[d] = 0.0; *************** void ensightGeometryOut(char *fn, Unifor *** 827,867 **** } // Variable file: ! // Partial specializations for 1D, 2D, 3D Arrays: ! // 1D: ! template ! void ensightVariableOut(char *fn, const Array<1, T, EngineTag> &a) { - char descript[80]; - FILE *fp; - int ii; ! fp = fopen(fn, "w"); ! sprintf(descript,"Scalar Variable u at %s",fn); ! fwrite(descript,sizeof(char),80,fp); ! strcpy(descript,"part"); ! fwrite(descript,sizeof(char),80,fp); ! ii = 1; ! fwrite(&ii,sizeof(int),1,fp); ! strcpy(descript,"block uniform"); ! fwrite(descript,sizeof(char),80,fp); ! ! float *var; ! int nnodes = a.domain().size(); ! var = new float[nnodes]; ! for (int i = a.domain()[0].first(); i <= a.domain()[0].last(); i++) { ! var[i] = a(i); ! } ! ! fwrite (var, sizeof(float), nnodes, fp); ! delete [] var; ! fclose(fp); ! } - // 2D: - template - void ensightVariableOut(char *fn, const Array<2, T, EngineTag> &a) - { char descript[80]; FILE *fp; int ii; --- 748,759 ---- } // Variable file: ! void ensightVariableOut(char *fn, Field_t &f) { ! typedef Field_t::Domain_t Domain_t; ! Domain_t domain(f.layout().domain()); char descript[80]; FILE *fp; int ii; *************** void ensightVariableOut(char *fn, const *** 870,876 **** int nelems = 1; int d; for (d = 0; d < 2; d++) { ! id[d] = a.domain()[d].size(); nelems*= id[d]; } for (d = 2; d < 3; d++) { --- 762,768 ---- int nelems = 1; int d; for (d = 0; d < 2; d++) { ! id[d] = domain[d].size(); nelems*= id[d]; } for (d = 2; d < 3; d++) { *************** void ensightVariableOut(char *fn, const *** 889,939 **** float *var; var = new float[nelems]; - int count = 0; - for (int j = a.domain()[1].first(); j <= a.domain()[1].last(); j++) { - for (int i = a.domain()[0].first(); i <= a.domain()[0].last(); i++) { - var[count++] = a(i,j); - } - } - - fwrite (var, sizeof(float), nelems, fp); - delete [] var; - fclose(fp); - } - - // 3D: - template - void ensightVariableOut(char *fn, const Array<3, T, EngineTag> &a) - { - char descript[80]; - FILE *fp; - int ii; - - int id[3]; - int nelems = 1; - for (int d = 0; d < 3; d++) { - id[d] = a.domain()[d].size(); - nelems*= id[d]; - } - - fp = fopen(fn, "w"); - sprintf(descript,"Scalar Variable u at %s",fn); - fwrite(descript,sizeof(char),80,fp); - strcpy(descript,"part"); - fwrite(descript,sizeof(char),80,fp); - ii = 1; - fwrite(&ii,sizeof(int),1,fp); - strcpy(descript,"block uniform"); - fwrite(descript,sizeof(char),80,fp); - - float *var; - var = new float[nelems]; int count = 0; ! for (int k = a.domain()[2].first(); k <= a.domain()[2].last(); k++) { ! for (int j = a.domain()[1].first(); j <= a.domain()[1].last(); j++) { ! for (int i = a.domain()[0].first(); i <= a.domain()[0].last(); i++) { ! var[count++] = a(i,j,k); ! } } } --- 781,792 ---- float *var; var = new float[nelems]; int count = 0; ! // This should be rewritten in a domain-independent way. ! PInsist(Dim == 2, "Only code for dimension == 2 is currently available"); ! for (int j = domain[1].first(); j <= domain[1].last(); j++) { ! for (int i = domain[0].first(); i <= domain[0].last(); i++) { ! var[count++] = f(i,j); } } Index: src/Connect/Lux/LuxConnector.Field.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Connect/Lux/LuxConnector.Field.h,v retrieving revision 1.2 diff -c -p -r1.2 LuxConnector.Field.h *** src/Connect/Lux/LuxConnector.Field.h 2000/03/07 13:16:19 1.2 --- src/Connect/Lux/LuxConnector.Field.h 2001/10/10 02:48:28 *************** *** 81,90 **** // //----------------------------------------------------------------------------- ! template ! class Connector, Lux> ! : public Connector, ! typename Field::Domain_t>::Type_t, Lux> { public: --- 81,90 ---- // //----------------------------------------------------------------------------- ! template ! class Connector, Lux> ! : public Connector::dimensions, ! T, EngineTag>, Lux> { public: *************** public: *** 92,100 **** // Public typedefs and enums //============================================================ ! typedef Field Field_t; typedef typename Field_t::Domain_t Domain_t; ! typedef typename ArrayView::Type_t Array_t; typedef Connector Base_t; typedef Connection Connection_t; typedef Connector Connector_t; --- 92,101 ---- // Public typedefs and enums //============================================================ ! typedef Field Field_t; typedef typename Field_t::Domain_t Domain_t; ! typedef Array::dimensions, ! T, EngineTag> Array_t; typedef Connector Base_t; typedef Connection Connection_t; typedef Connector Connector_t; *************** private: *** 154,160 **** //============================================================ // Reset the mesh data in the base class to the data for the given ! // Field's geometry. void setupMeshInfo(const Field_t &f) { --- 155,161 ---- //============================================================ // Reset the mesh data in the base class to the data for the given ! // Field's mesh. void setupMeshInfo(const Field_t &f) { Index: src/Field/Mesh/PositionFunctions.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Field/Mesh/PositionFunctions.h,v retrieving revision 1.1 diff -c -p -r1.1 PositionFunctions.h *** src/Field/Mesh/PositionFunctions.h 2001/08/30 01:15:12 1.1 --- src/Field/Mesh/PositionFunctions.h 2001/10/10 02:48:29 *************** struct XField *** 157,166 **** template struct XField > { ! typedef UniformRectilinearMesh GeometryTag_t; typedef Vector PointType_t; typedef IndexFunction > PositionEngine_t; ! typedef Field Type_t; }; template --- 157,166 ---- template struct XField > { ! typedef UniformRectilinearMesh Mesh_t; typedef Vector PointType_t; typedef IndexFunction > PositionEngine_t; ! typedef Field Type_t; }; template *************** void setXField(F &f) *** 170,179 **** } template ! typename XField::Type_t xField(const F &f, const Init ¢ering) { ! typename XField::Type_t ret(centering, f); setXField(ret); return ret; } --- 170,180 ---- } template ! typename XField::Type_t xField(const F &f, const Init ¢ering) { ! typedef typename XField::Type_t Field_t; ! Field_t ret(centering, f.layout(), f.mesh()); setXField(ret); return ret; } Index: src/Field/tests/CrossBox.cpp =================================================================== RCS file: /home/pooma/Repository/r2/src/Field/tests/CrossBox.cpp,v retrieving revision 1.1 diff -c -p -r1.1 CrossBox.cpp *** src/Field/tests/CrossBox.cpp 2001/08/30 01:15:18 1.1 --- src/Field/tests/CrossBox.cpp 2001/10/10 02:48:30 *************** int main(int argc, char *argv[]) *** 82,93 **** Centering<2> allFace = canonicalCentering<2>(FaceType, Continuous); ! typedef UniformRectilinear<2> Geometry_t; typedef MultiPatch > EngineTag_t; ! typedef Field Field_t; ! typedef Field, EngineTag_t > VField_t; Vector<2> origin(0.0, 0.0); Vector<2> spacings(1.0, 1.0); --- 82,93 ---- Centering<2> allFace = canonicalCentering<2>(FaceType, Continuous); ! typedef UniformRectilinearMesh<2> Mesh_t; typedef MultiPatch > EngineTag_t; ! typedef Field Field_t; ! typedef Field, EngineTag_t > VField_t; Vector<2> origin(0.0, 0.0); Vector<2> spacings(1.0, 1.0); *************** int main(int argc, char *argv[]) *** 99,105 **** // Should really figure out how to repackage these three lines: DomainLayout<2> layoutDom(physicalVertexDomain, GuardLayers<2>(1)); ! XField::Type_t x(allFace, layoutDom, origin, spacings); setXField(x); b = 0.0; --- 99,105 ---- // Should really figure out how to repackage these three lines: DomainLayout<2> layoutDom(physicalVertexDomain, GuardLayers<2>(1)); ! XField::Type_t x(allFace, layoutDom, origin, spacings); setXField(x); b = 0.0; Index: src/Field/tests/Positions.cpp =================================================================== RCS file: /home/pooma/Repository/r2/src/Field/tests/Positions.cpp,v retrieving revision 1.1 diff -c -p -r1.1 Positions.cpp *** src/Field/tests/Positions.cpp 2001/08/30 01:15:18 1.1 --- src/Field/tests/Positions.cpp 2001/10/10 02:48:30 *************** int main(int argc, char *argv[]) *** 69,78 **** Centering<2> vert = canonicalCentering<2>(VertexType, Continuous); Centering<2> allFace = canonicalCentering<2>(FaceType, Continuous); ! typedef UniformRectilinear<2> Geometry_t; ! typedef Field Field_t; ! typedef XField::Type_t XField_t; Field_t f(cell, layout1, origin, spacings); XField_t x(cell, layout1, origin, spacings); --- 69,78 ---- Centering<2> vert = canonicalCentering<2>(VertexType, Continuous); Centering<2> allFace = canonicalCentering<2>(FaceType, Continuous); ! typedef UniformRectilinearMesh<2> Mesh_t; ! typedef Field Field_t; ! typedef XField::Type_t XField_t; Field_t f(cell, layout1, origin, spacings); XField_t x(cell, layout1, origin, spacings); Index: src/Pooma/Fields.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Pooma/Fields.h,v retrieving revision 1.13 diff -c -p -r1.13 Fields.h *** src/Pooma/Fields.h 2001/10/06 00:39:19 1.13 --- src/Pooma/Fields.h 2001/10/10 02:48:31 *************** *** 54,59 **** --- 54,60 ---- #include "Field/Mesh/NoMesh.h" #include "Field/Mesh/UniformRectilinearMesh.h" #include "Field/Mesh/MeshFunctions.h" + #include "Field/Mesh/PositionFunctions.h" // Relations: Index: src/Pooma/tests/pooma.cpp =================================================================== RCS file: /home/pooma/Repository/r2/src/Pooma/tests/pooma.cpp,v retrieving revision 1.4 diff -c -p -r1.4 pooma.cpp *** src/Pooma/tests/pooma.cpp 2001/05/24 17:17:36 1.4 --- src/Pooma/tests/pooma.cpp 2001/10/10 02:48:31 *************** *** 46,51 **** --- 46,54 ---- // Pooma general interface test program. //----------------------------------------------------------------------------- + #include + #include + #include "Pooma/Pooma.h" void newAbortHandler() *************** void newAbortHandler() *** 53,58 **** --- 56,70 ---- std::cerr << "Running newly installed abort handler." << std::endl; } + // This function is registered as the signal handler for SIGABRT. + + void abortSignalHandler(int) + { + // Exit with a `0' exit status to indicate that all went well. + // This test is *expected* to abort. + exit(0); + } + int main(int argc, char *argv[]) { *************** int main(int argc, char *argv[]) *** 107,116 **** Pooma::pinfo << "Shutting down POOMA with abort()..." << std::endl; Pooma::abortHandler(newAbortHandler); Pooma::pAbort("This is the abort message.", 2); ! return 0; } --- 119,134 ---- Pooma::pinfo << "Shutting down POOMA with abort()..." << std::endl; + // Register a signal handler so that when Pooma::pAbort calls the + // abort standard library function, this program does not exit with + // a nonzero exit code. + signal(SIGABRT, abortSignalHandler); + Pooma::abortHandler(newAbortHandler); Pooma::pAbort("This is the abort message.", 2); ! // If we get here, the call to Pooma::pAbort did not work. ! return 1; } From mark at codesourcery.com Wed Oct 10 08:28:41 2001 From: mark at codesourcery.com (Mark Mitchell) Date: Wed, 10 Oct 2001 01:28:41 -0700 Subject: [pooma-dev] RFA: Patch for fixes for regression test failures In-Reply-To: <20011009195550.A29024@codesourcery.com> Message-ID: <41690000.1002702521@warlock.codesourcery.com> --On Tuesday, October 09, 2001 07:55:50 PM -0700 Jeffrey Oldham wrote: > On Tue, Oct 09, 2001 at 06:35:25PM -0600, Mark P Mitchell wrote: >> >> The attached patch attempts to fix several regression tests. >> >> Here is a summary: >> >> src/Array/tests/ScalarAdvection.cpp: >> >> Updated to use approximately the same code that Scott used in >> examples/Field/ScalarAdvection/ScalarAdvection.cpp. >> >> Note that although this test now compiles, it still fails for >> dimension 2. Scott's code fails in dimension 2, as well. This code >> works in dimension 1 as does Scott's code. > > Was the original code dimension-independent? If so, it would be nice > that the revised code is also dimension independent. It's just as dimension-independent as the original. > >> src/Connect/Lux/tests/*: >> >> These tests failed because LuxConnector.Field.h had not been >> updated for the new fields. > > For me, lux_test2 still fails, but I believe that is a particle problem. Yes, sorry - I should not have written a `*' there. > Yes. I have attached a slightly different patch. Would you please > list on which platforms you tested the code? I compiled and tested > the code on Linux/g++. What's different in your patch? Which one should I check in? I tested on IRIX/KCC. Thanks, -- Mark Mitchell mark at codesourcery.com CodeSourcery, LLC http://www.codesourcery.com From cummings at linkline.com Wed Oct 10 10:50:35 2001 From: cummings at linkline.com (Julian C. Cummings) Date: Wed, 10 Oct 2001 03:50:35 -0700 Subject: [pooma-dev] Pooma Code Failures In-Reply-To: <200110012046.f91Kkmt21675@localhost.localdomain> Message-ID: I just wanted to note that I looked at the failure of dynamic_array_test5. The cause of the failure is as noted in the code comments; namely that patch-specific destroy and copy requests using iterator pairs will fail to compile if the iterators are not convertible to const int*. Apparently, the standard iterators in gcc 3.x are not convertible to raw pointers, so this part of the test code fails. If we skip this one line of dynamic_array_test5.cpp using a #if 0, as suggested in the code comments, the remainder of the code runs just fine under gcc 3.x. I don't see any nice way of fixing this problem, unless we make separate DestroyEventCodes for IPDomain and IPDomain, so that we can dynamically cast the ObserverEvent to the appropriate type of DestroyEvent. We would have to protect this extra code with a macro guard, to avoid the extra code in cases where there is no difference between the standard iterator and a raw int* or const int*. -- Julian C. > -----Original Message----- > From: Jeffrey Oldham [mailto:oldham at codesourcery.com] > Sent: Monday, October 01, 2001 1:47 PM > To: pooma-dev at pooma.codesourcery.com > Subject: [pooma-dev] Pooma Code Failures > > > > One of this week's tasks is to eliminate all these Pooma regressions. > I used sequential Linux and gcc3.1 so some of these might be gcc3.1 > failures. > > 1) Does anyone have a failure list when using KCC? > 2) Some of the examples and benchmarks run for a long time. It would > be nice to find these and reduce their running time. > > 34 ( 14%) tests FAIL > examples.field.caramana.caramana > : FAIL > examples.field.laplace.laplace > : FAIL > examples.field.laplace2.laplace2 > : FAIL > examples.field.scalaradvection.scalaradvection > : FAIL > examples.field.scalaradvection1d.scalaradvection1d > : FAIL > examples.field.statigraphicflow.statigraphicflow > : FAIL > examples.lattice.coordinate > : FAIL > examples.particles.bounce.bounce > : FAIL > examples.particles.oscillation.oscillation > : FAIL > examples.particles.pic2d.pic2d > : FAIL > examples.solvers.blockdecomposed.fivepoint.fivepointsolve > : FAIL > examples.solvers.blockdecomposed.ninepoint.ninepointsolve > : FAIL > regressions.array.scalaradvection > : FAIL > regressions.array.scalaradvectionxb > : FAIL > regressions.connect.lux.bytefield > : FAIL > regressions.connect.lux.lux_test1 > : FAIL > regressions.connect.lux.lux_test2 > : FAIL > regressions.databrowser.testdatabrowser > : FAIL > regressions.dynamicarray.dynamic_array_test5 > : FAIL > regressions.field.crossbox > : FAIL > regressions.field.localpatch > : FAIL > regressions.field.nearestneighbors > : FAIL > regressions.field.positions > : FAIL > regressions.io.filesetreadertest1 > : FAIL > regressions.io.filesetreadertest2 > : FAIL > regressions.particles.interpolate > : FAIL > regressions.particles.particle_bench1 > : FAIL > regressions.particles.particle_bench2 > : FAIL > regressions.particles.particle_bench3 > : FAIL > regressions.particles.particle_bench4 > : FAIL > regressions.particles.particle_test1 > : FAIL > regressions.particles.particle_test2 > : FAIL > regressions.particles.particle_test3 > : FAIL > regressions.particles.particle_test4 > : FAIL > > Thanks, > Jeffrey D. Oldham > oldham at codesourcery.com > From mark at codesourcery.com Wed Oct 10 17:59:14 2001 From: mark at codesourcery.com (Mark Mitchell) Date: Wed, 10 Oct 2001 10:59:14 -0700 Subject: Regression test failures Message-ID: <15430000.1002736754@warlock.codesourcery.com> After fixing some regression tests yesterday, the followig problems remain: regressions.dynamicarray.dynamic_array_badcreate: This test tests to make sure that you cannot dynamically change the size of a DynamicArray when there is a view outstanding for the DynamicArray. (Doing so could leave the view pointing at nonsense.) However, nothing in the DynamicArray code actually seems to enforce this constraint, so the test fails at run time. regressions.io.filesetreadertest1: regressions.io.filesetreadertest2: These fail with this assertion: ### POOMA Assertion Failure ### ### RemoteProxy(success).value() ### File /users/mitchell/dev/r2/src/IO/FileSetReader.cpp; Line 288. Jim, do these tests need input of some kind? If so, can we get the input checked into CVS, so that we can run the tests automatically? regressions.connect.lux.lux_test2: regressions.databrowser.testdatabrowser: regressions.particles.particle_bench4: regressions.particles.particle_bench2: regressions.particles.particle_bench3: regressions.particles.particle_bench1: regressions.particles.interpolate: regressions.particles.particle_test1: regressions.particles.particle_test2: regressions.particles.particle_test3: regressions.particles.particle_test4: All fail due to the particle code not yet being up to date. -- Mark Mitchell mark at codesourcery.com CodeSourcery, LLC http://www.codesourcery.com From jcrotinger at proximation.com Wed Oct 10 19:19:04 2001 From: jcrotinger at proximation.com (James Crotinger) Date: Wed, 10 Oct 2001 13:19:04 -0600 Subject: [pooma-dev] Regression test failures Message-ID: > > regressions.io.filesetreadertest1: > regressions.io.filesetreadertest2: > > These fail with this assertion: > > ### POOMA Assertion Failure ### > ### RemoteProxy(success).value() > ### File /users/mitchell/dev/r2/src/IO/FileSetReader.cpp; Line 288. > > Jim, do these tests need input of some kind? If so, can we get the > input checked into CVS, so that we can run the tests automatically? These attempt to read a nirvana-format file set. Unfortunately, the Linux compilers don't pack data into a struct the same way that the Win32 and SGI compilers do, and thus the failure. These will continue to fail until I modify FileSetReader/FileSetWriter to write a machine-independent file format (i.e. I'm going to make it so that everyone writes out the same structure as is written on nirvana, except perhaps with byte-reversal). This is the simpler of the two tasks that I'd like to spend a bit of time on this week. Unfortunately, Greg is pinging us daily about some new stuff we're working on, which makes it a bit difficult to squeeze in time on Pooma. Oh, I should mention that these tests do need input - the input files are generated by FileSetReaderTest0. With make, the files are generated in the correct place (the $SUITE directory). With other build systems, you need to run FileSetReaderTest0 and then move/copy the files to the appropriate places for FileSetReaderTest{1,2}. Jim -------------- next part -------------- An HTML attachment was scrubbed... URL: From oldham at codesourcery.com Wed Oct 10 21:50:22 2001 From: oldham at codesourcery.com (Jeffrey Oldham) Date: Wed, 10 Oct 2001 14:50:22 -0700 Subject: Patch: FileSetReaderTest[12] Prerequisites Message-ID: <20011010145022.B5152@codesourcery.com> Jim Crotinger indicated that src/IO/tests/FileSetReaderTest0 should run before FileSetReaderTest[12]. Ths patch guarantees that happens for the QMTest test database. 2001-10-10 Jeffrey D. Oldham * filesetreadertest1.qmt: Add prerequisite of FileSetReaderTest0 per Jim Crotinger's comments. * filesetreadertest2.qmt: Likewise. Tested by building all IO tests using QMTest twice. Applied to pooma-tests.qms CVS tree. Approved by Mark Mitchell Thanks, Jeffrey D. Oldham oldham at codesourcery.com -------------- next part -------------- Index: filesetreadertest1.qmt =================================================================== RCS file: /home/pooma/Repository/pooma-tests.qms/regressions.qms/io.qms/filesetreadertest1.qmt,v retrieving revision 1.1 diff -c -p -r1.1 filesetreadertest1.qmt *** filesetreadertest1.qmt 2001/10/09 18:43:48 1.1 --- filesetreadertest1.qmt 2001/10/10 21:29:15 *************** *** 20,23 **** --- 20,24 ---- + regressions.io.filesetreadertest0 Index: filesetreadertest2.qmt =================================================================== RCS file: /home/pooma/Repository/pooma-tests.qms/regressions.qms/io.qms/filesetreadertest2.qmt,v retrieving revision 1.1 diff -c -p -r1.1 filesetreadertest2.qmt *** filesetreadertest2.qmt 2001/10/09 18:43:48 1.1 --- filesetreadertest2.qmt 2001/10/10 21:29:15 *************** *** 20,23 **** --- 20,24 ---- + regressions.io.filesetreadertest0 From oldham at codesourcery.com Wed Oct 10 23:31:54 2001 From: oldham at codesourcery.com (Jeffrey Oldham) Date: Wed, 10 Oct 2001 16:31:54 -0700 Subject: Patch: src/IO/tests/makefile Message-ID: <20011010163154.A9045@codesourcery.com> 2001-10-10 Jeffrey D. Oldham * makefile (run_tests): FileSetReaderTest0 must run before FileSetReaderTest[12], according to Jim Crotinger. FileSetWriterTest0 does not exist. Tested on sequential Linux using g++ using 'make run' Applied to mainline Approved by Jim Crotinger Thanks, Jeffrey D. Oldham oldham at codesourcery.com -------------- next part -------------- Index: makefile =================================================================== RCS file: /home/pooma/Repository/r2/src/IO/tests/makefile,v retrieving revision 1.35 diff -c -p -r1.35 makefile *** makefile 2001/10/03 21:13:19 1.35 --- makefile 2001/10/10 23:29:55 *************** run: run_tests *** 45,53 **** run_tests: tests $(ODIR)/DiskLayoutTest1 $(TSTOPTS) 1>DiskLayoutTest1.out 2>&1 $(ODIR)/DiskMetaTest1 $(TSTOPTS) 1>DiskMetaTest1.out 2>&1 $(ODIR)/FileSetReaderTest1 $(TSTOPTS) 1>FileSetReaderTest1.out 2>&1 $(ODIR)/FileSetReaderTest2 $(TSTOPTS) 1>FileSetReaderTest2.out 2>&1 - $(ODIR)/FileSetWriterTest0 $(TSTOPTS) 1>FileSetWriterTest0.out 2>&1 $(ODIR)/FileSetWriterTest1 $(TSTOPTS) 1>FileSetWriterTest1.out 2>&1 $(ODIR)/FileSetWriterTest2 $(TSTOPTS) 1>FileSetWriterTest2.out 2>&1 $(ODIR)/MetaTokenIteratorTest1 $(TSTOPTS) 1>MetaTokenIteratorTest1.out 2>&1 --- 45,53 ---- run_tests: tests $(ODIR)/DiskLayoutTest1 $(TSTOPTS) 1>DiskLayoutTest1.out 2>&1 $(ODIR)/DiskMetaTest1 $(TSTOPTS) 1>DiskMetaTest1.out 2>&1 + $(ODIR)/FileSetReaderTest0 $(TSTOPTS) 1>FileSetReaderTest0.out 2>&1 $(ODIR)/FileSetReaderTest1 $(TSTOPTS) 1>FileSetReaderTest1.out 2>&1 $(ODIR)/FileSetReaderTest2 $(TSTOPTS) 1>FileSetReaderTest2.out 2>&1 $(ODIR)/FileSetWriterTest1 $(TSTOPTS) 1>FileSetWriterTest1.out 2>&1 $(ODIR)/FileSetWriterTest2 $(TSTOPTS) 1>FileSetWriterTest2.out 2>&1 $(ODIR)/MetaTokenIteratorTest1 $(TSTOPTS) 1>MetaTokenIteratorTest1.out 2>&1 From wdn at lanl.gov Thu Oct 11 18:47:33 2001 From: wdn at lanl.gov (Dave Nystrom) Date: Thu, 11 Oct 2001 12:47:33 -0600 Subject: Building 64 bit MM Message-ID: <15301.59717.392674.440188@saltydog.lanl.gov> Does anyone know how to build a 64 bit version of the MM shared memory library on Irix 6.5? I'm having trouble with it wanting to use ld32 and I have tried the following environment variables and configure options: CC = location to the MIPSpro cc compiler CFLAGS = -64 LDFLAGS = -64 configure --disable-shared --prefix=where_I_want_mm_installed I want to try using the Cheetah shmem interface on b18 with 64 bit. -- Dave Nystrom email: wdn at lanl.gov LANL X-3 phone: 505-667-7913 fax: 505-665-3046 From oldham at codesourcery.com Fri Oct 12 02:16:29 2001 From: oldham at codesourcery.com (Jeffrey Oldham) Date: Thu, 11 Oct 2001 19:16:29 -0700 Subject: Patch: Add Comments to TestBasicRelations.cpp Message-ID: <20011011191629.B17351@codesourcery.com> 2001-10-11 Jeffrey D. Oldham * TestBasicRelations.cpp (main): Add comments explaining field's meanings. Tested on sequential Linux using gcc3.1 by compiling Pooma library and field relations tests Approved by Stephen Smith Applied to mainline Thanks, Jeffrey D. Oldham oldham at codesourcery.com -------------- next part -------------- Index: TestBasicRelations.cpp =================================================================== RCS file: /home/pooma/Repository/r2/src/Field/tests/TestBasicRelations.cpp,v retrieving revision 1.1 diff -c -p -r1.1 TestBasicRelations.cpp *** TestBasicRelations.cpp 2001/08/30 01:15:18 1.1 --- TestBasicRelations.cpp 2001/10/11 23:54:32 *************** int main(int argc, char *argv[]) *** 79,90 **** --- 79,97 ---- Centering<2> cell = canonicalCentering<2>(CellType, Continuous); + // total energy Field_t E(cell, layout, Vector<2>(0.0), Vector<2>(1.0, 2.0)); + // kinetic energy Field_t K(cell, layout, Vector<2>(0.0), Vector<2>(1.0, 2.0)); + // potential energy Field_t U(cell, layout, Vector<2>(0.0), Vector<2>(1.0, 2.0)); + // velocity Field_t v(cell, layout, Vector<2>(0.0), Vector<2>(1.0, 2.0)); + // momentum Field_t p(cell, layout, Vector<2>(0.0), Vector<2>(1.0, 2.0)); + // mass Field_t m(cell, layout, Vector<2>(0.0), Vector<2>(1.0, 2.0)); + // height Field_t h(cell, layout, Vector<2>(0.0), Vector<2>(1.0, 2.0)); p = 2.0; From oldham at codesourcery.com Fri Oct 12 17:58:45 2001 From: oldham at codesourcery.com (Jeffrey Oldham) Date: Fri, 12 Oct 2001 10:58:45 -0700 Subject: Patch: Tidy Relations.h Message-ID: <20011012105845.A25816@codesourcery.com> 2001-10-12 Jeffrey D. Oldham * Relations.h: Fix typographical error in comment. (Relation1::apply): Remove extraneous argument. Tested on sequential Linux using gcc3.1 by compiling Pooma library and relations tests Approved by Stephen Smith Applied to mainline Thanks, Jeffrey D. Oldham oldham at codesourcery.com -------------- next part -------------- Index: Relations.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Field/Relations/Relations.h,v retrieving revision 1.1 diff -c -p -r1.1 Relations.h *** Relations.h 2001/08/30 01:15:13 1.1 --- Relations.h 2001/10/11 23:50:38 *************** public: *** 80,86 **** // Methods. // All of the action is in setDirty(). If we are already dirty, there's ! // nothing to do. If clean, we set our diry flag and then those in the // target's relation list. void setDirty() --- 80,86 ---- // Methods. // All of the action is in setDirty(). If we are already dirty, there's ! // nothing to do. If clean, we set our dirty flag and then those in the // target's relation list. void setDirty() *************** public: *** 201,207 **** void apply() { ! functor_m(target_m, r1_m, r2_m); } virtual RelationListItem *retarget(const Target &target) const --- 201,207 ---- void apply() { ! functor_m(target_m, r1_m); } virtual RelationListItem *retarget(const Target &target) const From stephens at proximation.com Fri Oct 12 18:50:36 2001 From: stephens at proximation.com (Stephen Smith) Date: Fri, 12 Oct 2001 12:50:36 -0600 Subject: patch: engine includes Message-ID: This patch adds a couple forward declarations and includes necessary to ensure that each .h file stands on its own. Tested on Linux w KCC. Reviewed by Jeffrey Oldham. <> Stephen -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: engine.inc.patch Type: application/octet-stream Size: 2837 bytes Desc: not available URL: From oldham at codesourcery.com Fri Oct 12 20:50:50 2001 From: oldham at codesourcery.com (Jeffrey Oldham) Date: Fri, 12 Oct 2001 13:50:50 -0700 Subject: Patch: Doof2d: Eliminate Duplicate Computations Message-ID: <20011012135050.A5731@codesourcery.com> 2001-10-12 Jeffrey D. Oldham This patch reduces duplicate computation in the Doof2d benchmarks. Both initialize() and run() set the initial conditions. In consultations with Stephen Smith, we have the untimed initialize() ensure that all the allocated memory pages are actually created and have run() set up the initial conditions. * Doof2d.h (Doof2dBase::initialize): Replace initialize() with statements to ensure all memory pages are actually created. (Doof2dBase::setInitialConditions): Removed in favor of code in initialize(). * Doof2dInC.h (Doof2dInC::initialize) and (Doof2dInC::setInitialConditions): Likewise. (Doof2dCoefsInC::initialize) and (Doof2dCoefsInC::setInitialConditions): Likewise. Tested on sequential Linux using g++3.1 by running Doof2d Approved by Stephen Smith Applied to mainline Thanks, Jeffrey D. Oldham oldham at codesourcery.com -------------- next part -------------- Index: Doof2d.h =================================================================== RCS file: /home/pooma/Repository/r2/benchmarks/Doof2d/Doof2d.h,v retrieving revision 1.1 diff -c -p -r1.1 Doof2d.h *** Doof2d.h 2001/09/28 03:41:36 1.1 --- Doof2d.h 2001/10/12 18:52:10 *************** public: *** 285,293 **** I = Interval<1>(2,n_m-1); J = Interval<1>(2,n_m-1); ! // Intialize Array element values. ! ! setInitialConditions(); } // Return value for checking result of benchmark run. --- 285,295 ---- I = Interval<1>(2,n_m-1); J = Interval<1>(2,n_m-1); ! // Ensure that all memory is paged in. ! ! a_m = 0.0; ! b_m = 0.0; ! Pooma::blockAndEvaluate(); } // Return value for checking result of benchmark run. *************** protected: *** 316,332 **** Interval<1> I, J; - private: - - void setInitialConditions() - { - // Initialize arrays. - - a_m = 0.0; - b_m = 0.0; - - Pooma::blockAndEvaluate(); - } }; --- 318,323 ---- Index: Doof2dInC.h =================================================================== RCS file: /home/pooma/Repository/r2/benchmarks/Doof2d/Doof2dInC.h,v retrieving revision 1.23 diff -c -p -r1.23 Doof2dInC.h *** Doof2dInC.h 2001/09/28 03:41:36 1.23 --- Doof2dInC.h 2001/10/12 18:52:10 *************** public: *** 93,100 **** // Save problem size. n_m = n; ! // initialize arrays ! setInitialConditions(); } void run() { --- 93,106 ---- // Save problem size. n_m = n; ! // Ensure that all memory is paged in. ! ! for (int j = 0; j < n_m; j++) { ! for (int i = 0; i < n_m; i++) { ! a_m[i + n_m * j] = 0.0; ! b_m[i + n_m * j] = 0.0; ! } ! } } void run() { *************** public: *** 124,141 **** private: - void setInitialConditions() - { - // initialize the arrays. - for (int j = 0; j < n_m; j++) { - for (int i = 0; i < n_m; i++) { - a_m[i + n_m * j] = 0.0; - b_m[i + n_m * j] = 0.0; - b_m[n_m / 2 - 1 + n_m * (n_m / 2 - 1)] = 1000.0; - } - } - } - // Data Arrays. double *a_m, *b_m; --- 130,135 ---- *************** public: *** 191,198 **** // Save problem size. n_m = n; ! // Initialize the arrays. ! setInitialConditions(); } void run() { --- 185,198 ---- // Save problem size. n_m = n; ! // Ensure that all memory is paged in. ! ! for (int j = 0; j < n_m; j++) { ! for (int i = 0; i < n_m; i++) { ! a_m[i + n_m * j] = 0.0; ! b_m[i + n_m * j] = 0.0; ! } ! } } void run() { *************** public: *** 220,237 **** double opCount() const { return ( 180 * ((double)n_m - 2) * ((double)n_m - 2) ); } private: - - void setInitialConditions() - { - // initialize the arrays. - for (int j = 0; j < n_m; j++) { - for (int i = 0; i < n_m; i++) { - a_m[i + n_m * j] = 0.0; - b_m[i + n_m * j] = 0.0; - } - } - b_m[n_m / 2 - 1 + n_m * (n_m / 2 - 1)] = 1000.0; - } // Data Arrays. --- 220,225 ---- From jcrotinger at proximation.com Fri Oct 12 20:58:26 2001 From: jcrotinger at proximation.com (James Crotinger) Date: Fri, 12 Oct 2001 14:58:26 -0600 Subject: [pooma-dev] Patch: Doof2d: Eliminate Duplicate Computations Message-ID: I wouldn't think you'd want to time the initial condition setup. Jim > -----Original Message----- > From: Jeffrey Oldham [mailto:oldham at codesourcery.com] > Sent: Friday, October 12, 2001 2:51 PM > To: pooma-dev at pooma.codesourcery.com > Subject: [pooma-dev] Patch: Doof2d: Eliminate Duplicate Computations > > > 2001-10-12 Jeffrey D. Oldham > > This patch reduces duplicate computation in the > Doof2d benchmarks. > Both initialize() and run() set the initial conditions. In > consultations with Stephen Smith, we have the untimed > initialize() > ensure that all the allocated memory pages are > actually created > and have run() set up the initial conditions. > > * Doof2d.h (Doof2dBase::initialize): Replace initialize() with > statements to ensure all memory pages are actually created. > (Doof2dBase::setInitialConditions): Removed in favor > of code in > initialize(). > * Doof2dInC.h (Doof2dInC::initialize) and > (Doof2dInC::setInitialConditions): Likewise. > (Doof2dCoefsInC::initialize) and > (Doof2dCoefsInC::setInitialConditions): Likewise. > > Tested on sequential Linux using g++3.1 by running Doof2d > Approved by Stephen Smith > Applied to mainline > > Thanks, > Jeffrey D. Oldham > oldham at codesourcery.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: From oldham at codesourcery.com Fri Oct 12 21:11:20 2001 From: oldham at codesourcery.com (Jeffrey Oldham) Date: Fri, 12 Oct 2001 14:11:20 -0700 Subject: [pooma-dev] Patch: Doof2d: Eliminate Duplicate Computations In-Reply-To: ; from jcrotinger@proximation.com on Fri, Oct 12, 2001 at 02:58:26PM -0600 References: Message-ID: <20011012141120.B5731@codesourcery.com> On Fri, Oct 12, 2001 at 02:58:26PM -0600, James Crotinger wrote: > I wouldn't think you'd want to time the initial condition setup. It's my understanding that the benchmark class subtracts out the runSetup() time after calling run(). > > -----Original Message----- > > From: Jeffrey Oldham [mailto:oldham at codesourcery.com] > > Sent: Friday, October 12, 2001 2:51 PM > > To: pooma-dev at pooma.codesourcery.com > > Subject: [pooma-dev] Patch: Doof2d: Eliminate Duplicate Computations > > > > > > 2001-10-12 Jeffrey D. Oldham > > > > This patch reduces duplicate computation in the > > Doof2d benchmarks. > > Both initialize() and run() set the initial conditions. In > > consultations with Stephen Smith, we have the untimed > > initialize() > > ensure that all the allocated memory pages are > > actually created > > and have run() set up the initial conditions. > > > > * Doof2d.h (Doof2dBase::initialize): Replace initialize() with > > statements to ensure all memory pages are actually created. > > (Doof2dBase::setInitialConditions): Removed in favor > > of code in > > initialize(). > > * Doof2dInC.h (Doof2dInC::initialize) and > > (Doof2dInC::setInitialConditions): Likewise. > > (Doof2dCoefsInC::initialize) and > > (Doof2dCoefsInC::setInitialConditions): Likewise. > > > > Tested on sequential Linux using g++3.1 by running Doof2d > > Approved by Stephen Smith > > Applied to mainline Thanks, Jeffrey D. Oldham oldham at codesourcery.com From oldham at codesourcery.com Fri Oct 12 23:27:15 2001 From: oldham at codesourcery.com (Jeffrey Oldham) Date: Fri, 12 Oct 2001 16:27:15 -0700 Subject: Patch: ABCTest: Complete Revision Message-ID: <20011012162715.A11241@codesourcery.com> 2001-10-12 Jeffrey D. Oldham Revise ABC, adding more implementations, and ensuring that all the computations are the same. I used Doof2d code as a model so any mistakes there are likely to be replicated here. These files were almost completely revised: * ABC.cpp * ABC.h * ABCInC.c * ABCInC.h even though 'diff' may be able to find a few matching lines. Tested on sequential Linux using g++3.1 by running the tests Approved by Stephen Smith Applied to mainline Thanks, Jeffrey D. Oldham oldham at codesourcery.com -------------- next part -------------- ? LINUXgcc ? ABC.12Oct.16.4.patch ? ABC.12Oct.13.5.ChangeLog Index: ABC.cpp =================================================================== RCS file: /home/pooma/Repository/r2/benchmarks/ABCTest/ABC.cpp,v retrieving revision 1.8 diff -c -p -r1.8 ABC.cpp *** ABC.cpp 2000/04/13 19:56:31 1.8 --- ABC.cpp 2001/10/12 23:25:19 *************** *** 31,58 **** // Include files #include "ABC.h" //----------------------------------------------------------------------------- // Main program. //----------------------------------------------------------------------------- int main(int argc, char* argv[]) { ! Pooma::initialize(argc, argv); Benchmark abc(argc, argv); ! abc.setSamplingParameters(100,0,1); ! abc.addImplementation(new ABCInC); ! abc.addImplementation(new ABCInCppTran); ! abc.addImplementation(new ABCInP2); ! abc.addImplementation(new ABCInP2); ! abc.addImplementation(new ABCInP2(abc.numPatches())); ! abc.addImplementation(new ABCInP2(abc.numPatches())); ! abc.run(); Pooma::finalize(); return 0; --- 31,129 ---- // Include files + #include "Pooma/Pooma.h" #include "ABC.h" + #include "ABCInC.h" + #if POOMA_CHEETAH + typedef Remote BrickTag_t; + typedef Remote CompressibleBrickTag_t; + #else + typedef Brick BrickTag_t; + typedef CompressibleBrick CompressibleBrickTag_t; + #endif + //----------------------------------------------------------------------------- // Main program. //----------------------------------------------------------------------------- int main(int argc, char* argv[]) { ! Pooma::initialize(argc, argv); Benchmark abc(argc, argv); ! typedef Array<2, double, BrickTag_t> ! BrickStore_t; ! typedef Array<2, double, CompressibleBrickTag_t> ! CompBrickStore_t; ! typedef Array<2, double, MultiPatch > ! MPBrickStore_t; ! typedef Array<2, double, MultiPatch > ! MPCompBrickStore_t; ! ! typedef Field, double, BrickTag_t> ! FBrickStore_t; ! typedef Field, double, CompressibleBrickTag_t> ! FCompBrickStore_t; ! typedef Field, double, ! MultiPatch > ! FMPBrickStore_t; ! typedef Field, double, ! MultiPatch > ! FMPCompBrickStore_t; ! ! // C versions ! #if !POOMA_NO_RESTRICT ! abc.addImplementation(new AbcInC()); ! #endif ! abc.addImplementation(new AbcInC()); ! ! // CppTran version Brick ! abc.addImplementation(new AbcCppTran); ! ! // Brick single patch ! abc.addImplementation(new AbcP2); ! ! // Compressible Brick single patch ! abc.addImplementation(new AbcP2); ! ! // Brick multi-patch no guards ! abc.addImplementation(new AbcP2(abc.numPatches())); ! ! // Brick multi-patch with 1 guard layer ! abc.addImplementation(new AbcP2(abc.numPatches(),1)); ! ! // Compressible brick multi-patch no guard layers ! abc.addImplementation(new AbcP2(abc.numPatches())); ! ! // Compressible brick multi-patch with 1 guard layer ! abc.addImplementation(new AbcP2(abc.numPatches(),1)); ! ! // Field CppTran version Brick ! abc.addImplementation(new AbcCppTran); ! ! // Field Brick single patch ! abc.addImplementation(new AbcP2); ! ! // Field Compressible Brick single patch ! abc.addImplementation(new AbcP2); ! ! // Field Brick multi-patch no guards ! abc.addImplementation(new AbcP2(abc.numPatches())); ! // Field Brick multi-patch with 1 guard layer ! abc.addImplementation(new AbcP2(abc.numPatches(),1)); ! ! // Field Compressible brick multi-patch no guard layers ! abc.addImplementation(new AbcP2(abc.numPatches())); + // Field Compressible brick multi-patch with 1 guard layer + abc.addImplementation(new AbcP2(abc.numPatches(),1)); + + abc.setSamplingParameters(100,0,1); + abc.run(); + Pooma::finalize(); return 0; *************** int main(int argc, char* argv[]) *** 60,66 **** // ACL:rcsinfo // ---------------------------------------------------------------------- ! // $RCSfile: ABC.cpp,v $ $Author: julianc $ ! // $Revision: 1.8 $ $Date: 2000/04/13 19:56:31 $ // ---------------------------------------------------------------------- // ACL:rcsinfo --- 131,137 ---- // ACL:rcsinfo // ---------------------------------------------------------------------- ! // $RCSfile: ABC.cpp,v $ $Author: oldham $ ! // $Revision: 1.20 $ $Date: 2001/09/28 03:41:36 $ // ---------------------------------------------------------------------- // ACL:rcsinfo Index: ABC.h =================================================================== RCS file: /home/pooma/Repository/r2/benchmarks/ABCTest/ABC.h,v retrieving revision 1.29 diff -c -p -r1.29 ABC.h *** ABC.h 2000/06/30 01:56:15 1.29 --- ABC.h 2001/10/12 23:25:19 *************** *** 25,231 **** // or visit the POOMA web page at http://www.acl.lanl.gov/pooma/. // ---------------------------------------------------------------------- // ACL:license //----------------------------------------------------------------------------- ! // Classes ABCTestBase, ABCInCppTran, ABCInP2. //----------------------------------------------------------------------------- ! #ifndef POOMA_BENCHMARKS_ABCTEST_ABC_H ! #define POOMA_BENCHMARKS_ABCTEST_ABC_H // Include files #include "Pooma/Arrays.h" #include "Utilities/Benchmark.h" ! #include #include ! ! // Function declarations ! ! extern "C" { ! void runABCInC(double *a, double *b, double *c, int n); ! } //----------------------------------------------------------------------------- ! // ABCTestBase class definitions. We define this as a partially specialized ! // class so it is easy to make subclasses work for UMP or not. //----------------------------------------------------------------------------- ! // General version. ! template ! class ABCTestBase { }; ! // Non-UMP version. ! template ! class ABCTestBase : public Implementation { ! public: ! // Dummy constructor. ! ! ABCTestBase(int xxx = 1) { } ! ! // Typedefs for the Array types we'll be using here. ! typedef Array<2,double,EngineTag> Array2D; ! // Initialize function gets the size and adjusts the arrays. ! ! void initialize(int n) ! { ! // Save the problem size. ! ! n_m = n; ! // Get new array domain. ! ! Interval<1> N(1, n_m); ! Interval<2> newDomain(N, N); ! // Resize the arrays. ! a_m.initialize(newDomain); ! b_m.initialize(newDomain); ! c_m.initialize(newDomain); ! // Intialize Array element values. ! ! setInitialConditions(); ! } ! ! // To set up the run, we simply need to update c. ! ! void runSetup() ! { ! c_m = 1000.0; ! Pooma::blockAndEvaluate(); } - - // Return references to arrays. - - Array2D &aRef() { return a_m; } - Array2D &bRef() { return b_m; } - Array2D &cRef() { return c_m; } - - // Return value for checking result of benchmark run. ! double resultCheck() const { return check_m; } ! // Return number of flops in this kernel. ! double opCount() const { return (40 * (double)n_m * (double)n_m); } ! protected: ! // 2D data arrays. ! Array2D a_m, b_m, c_m; ! // Problem check value. ! double check_m; ! // Problem size. ! int n_m; ! private: ! void setInitialConditions() { ! // Initialize arrays. ! bRef() = 1.0; ! Pooma::blockAndEvaluate(); ! } ! }; ! // UMP version. ! template ! class ABCTestBase : public Implementation { ! public: ! // Typedefs for the Array types we'll be using here. ! typedef Array<2,double, MultiPatch > Array2D; ! // Constructor allows us to specify the number of patches in each direction. ! ! ABCTestBase(int np = 1) ! : np_m(np), layout_m(NULL), a_m(NULL), b_m(NULL), c_m(NULL) ! { } ! ! // Destructor deletes pointers. ! ! ~ABCTestBase() ! { ! delete a_m; ! delete b_m; ! delete c_m; ! delete layout_m; ! } ! // Return references to arrays. ! ! Array2D &aRef() { return *a_m; } ! Array2D &bRef() { return *b_m; } ! Array2D &cRef() { return *c_m; } ! ! // Initialize function gets the size and adjusts the arrays. ! ! void initialize(int n) { ! // Save the problem size. We need to make sure we have evenly sized blocks. - n_m = (n / np_m) * np_m; - - // Delete old pointers. - - delete a_m; - delete b_m; - delete c_m; - delete layout_m; - // Get new array domain. ! Interval<1> N(1, n_m); Interval<2> newDomain(N, N); // Create the block sizes. ! Loc<2> blocks(np_m, np_m); ! // Create the partitioner. ! ! UniformGridPartition<2> partition(blocks); ! // Create the layout. ! layout_m = new UniformGridLayout<2>(newDomain, partition, ReplicatedTag()); ! // Create the arrays. ! ! a_m = new Array2D(*layout_m); ! b_m = new Array2D(*layout_m); ! c_m = new Array2D(*layout_m); ! // Intialize Array element values. ! ! setInitialConditions(); } ! // To set up the run, we simply need to update c. ! void runSetup() { ! *c_m = 1000.0; ! Pooma::blockAndEvaluate(); } // Return value for checking result of benchmark run. --- 25,292 ---- // or visit the POOMA web page at http://www.acl.lanl.gov/pooma/. // ---------------------------------------------------------------------- // ACL:license + //----------------------------------------------------------------------------- ! // Classes AbcCppTran, AbcP2, AbcNinePt, AbcOpt ! // Implementation Classes AbcStorage, AbcBase, //----------------------------------------------------------------------------- ! #ifndef POOMA_BENCHMARKS_ABC_H ! #define POOMA_BENCHMARKS_ABC_H // Include files #include "Pooma/Arrays.h" + #include "Pooma/Fields.h" #include "Utilities/Benchmark.h" ! #include #include ! #include + #if POOMA_CHEETAH + typedef DistributedTag LayoutTag_t; + #else + typedef ReplicatedTag LayoutTag_t; + #endif //----------------------------------------------------------------------------- ! // PatchString class definitions. These return a string notation of ! // the engine type. //----------------------------------------------------------------------------- ! template ! struct PatchString ! { ! static ! std::string get() ! { ! if (typeid(ETag) == typeid(Brick)) ! return "Bk"; ! else ! return "CmBk"; ! } ! }; ! template ! struct PatchString > ! { ! static ! std::string get() ! { ! return "r" + PatchString::get(); ! } ! }; ! template ! struct PatchString > ! { ! static ! std::string get() ! { ! return PatchString::get() + "MP"; ! } ! }; ! template ! std::string qualification(const Array &) ! { ! return PatchString::get(); ! } ! template ! std::string qualification(const Field &) ! { ! return "Fd" + PatchString::get(); ! } ! //----------------------------------------------------------------------------- ! // AbcStorage class definitions. These classes allocate the array ! // or field and initialize it. We define this as a partially ! // specialized class so it is easy to make subclasses work for Uniform ! // MultiPatch (UMP) or not. ! //----------------------------------------------------------------------------- ! template ! class AbcStorage ! { ! }; ! template ! class AbcStorage, false> ! { ! public: ! void initializeStorage(int &n, int np, int ng) ! { ! // Get new array domain, including "guards". ! Interval<1> N(1, n); ! Interval<2> vertDomain(N, N); ! // Resize the arrays. ! a_m.initialize(vertDomain); ! b_m.initialize(vertDomain); ! c_m.initialize(vertDomain); } ! Array<2, double, ETag> a_m, b_m, c_m; ! }; ! template ! class AbcStorage, false> ! { ! public: ! void initializeStorage(int &n, int np, int ng) ! { ! // Get new array domain, including "guards". ! Interval<1> N(1, n); ! Interval<2> vertDomain(N, N); ! DomainLayout<2> layout(vertDomain); ! Mesh mesh(layout, Vector<2>(0.0), Vector<2>(1.0, 1.0)); ! Centering<2> vert = canonicalCentering<2>(VertexType, Continuous, AllDim); ! // Initialize the fields. ! a_m.initialize(vert, layout, mesh); ! b_m.initialize(vert, layout, mesh); ! c_m.initialize(vert, layout, mesh); ! } ! Field a_m, b_m, c_m; ! }; ! template ! class AbcStorage, true> ! { ! public: ! void initializeStorage(int &n, int np, int ng) { ! n = (n / np) * np; ! // Get new array domain. ! ! Interval<1> N(1, n); ! Interval<2> newDomain(N, N); ! // Create the block sizes. ! ! Loc<2> blocks(np, np); ! // Create the partitioner: ! // We set the internal guard layers to ng_m, and don't allocate external ! // guard layers. The internal guard layers are unnecessary. ! ! UniformGridPartition<2> partition(blocks, ! GuardLayers<2>(ng), ! GuardLayers<2>(0)); ! // Create the layout. ! ! UniformGridLayout<2> layout(newDomain, partition, LayoutTag_t()); ! // Create the arrays. ! ! a_m.initialize(layout); ! b_m.initialize(layout); ! c_m.initialize(layout); ! } ! Array<2, double, ETag> a_m, b_m, c_m; ! }; ! template ! class AbcStorage, true> ! { ! public: ! void initializeStorage(int &n, int np, int ng) { ! n = (n / np) * np; // Get new array domain. ! Interval<1> N(1, n); Interval<2> newDomain(N, N); // Create the block sizes. ! Loc<2> blocks(np, np); ! // Create the partitioner: ! // We set the internal guard layers to ng_m, and don't allocate external ! // guard layers. The internal guard layers are unnecessary. ! UniformGridPartition<2> partition(blocks, ! GuardLayers<2>(ng), ! GuardLayers<2>(0)); ! // Create the layout. ! UniformGridLayout<2> layout(newDomain, partition, LayoutTag_t()); ! Mesh mesh(layout, Vector<2>(0.0), Vector<2>(1.0, 1.0)); ! Centering<2> vert = canonicalCentering<2>(VertexType, Continuous, AllDim); ! ! // Initialize the fields. ! ! a_m.initialize(vert, layout, mesh); ! b_m.initialize(vert, layout, mesh); ! c_m.initialize(vert, layout, mesh); } + + Field a_m, b_m, c_m; + }; + + template + struct StoreTraits + { + typedef typename Store::Engine_t Engine_t; + static const bool multiPatch = Engine_t::multiPatch; + }; + + + //----------------------------------------------------------------------------- + // AbcBase class definitions. We define this as a partially specialized + // class so it is easy to make subclasses work for Uniform MultiPatch + // (UMP) or not. + //----------------------------------------------------------------------------- + + template + class AbcBase : + public Implementation, + public AbcStorage::multiPatch> + { + public: + + // Dummy constructor. ! AbcBase(int np = 1, int ng = 0) ! : np_m(np), ng_m(ng) ! { } ! // Initialize function gets the size and adjusts the arrays. ! ! void initialize(int n) { ! // Save the problem size. ! n_m = n; ! ! // This call can decrease n_m to an integral multiple of np_m. ! initializeStorage(n_m, np_m, ng_m); ! ! // Set up domains for the internal cells. ! ! I = Interval<1>(1,n_m); ! J = Interval<1>(1,n_m); } // Return value for checking result of benchmark run. *************** public: *** 234,247 **** // Return number of flops in this kernel. ! double opCount() const { return (40 * (double)n_m * (double)n_m); } protected: - // 2D data arrays. - - Array2D *a_m, *b_m, *c_m; - // Problem check value. double check_m; --- 295,304 ---- // Return number of flops in this kernel. ! double opCount() const { return ( 40 * n_m * n_m ); } protected: // Problem check value. double check_m; *************** protected: *** 250,439 **** int n_m, np_m; ! // Layout. ! ! UniformGridLayout<2> *layout_m; ! ! private: ! ! void setInitialConditions() ! { ! // Initialize arrays. ! ! bRef() = 1.0; ! ! Pooma::blockAndEvaluate(); ! } ! }; ! ! ! //----------------------------------------------------------------------------- ! // ABCInC class definition. ! //----------------------------------------------------------------------------- ! ! class ABCInC : public ABCTestBase { ! public: ! ! // This is a C benchmark using brick engines. ! ! const char *type() const { return CType(); } ! ! void run() ! { ! // Run setup ! c_m = 1000.0; ! ! Pooma::blockAndEvaluate(); ! ! // Run kernel. ! ! runABCInC(&a_m(1, 1), &b_m(1, 1), &c_m(1, 1), n_m); ! check_m = a_m(n_m / 2, n_m / 2); ! } }; //----------------------------------------------------------------------------- ! // ABCInCppTran class definition. //----------------------------------------------------------------------------- ! template ! class ABCInCppTran : public ABCTestBase { public: ! // Constructor allows us to specify the number of patches in each direction ! // (if we're UMP-based). ! ABCInCppTran(int np = 1) ! : ABCTestBase(np) { } ! ! typedef typename ABCTestBase::Array2D Array2D; // This is a C++Tran benchmark, perhaps using UMP. const char* type() const { return CppTranType(); } const char* qualification() const { ! if (UMP) ! { ! if (typeid(EngineTag) == typeid(Brick)) ! return "BrickUMP"; ! else ! return "CompBrickUMP"; ! } ! else ! { ! if (typeid(EngineTag) == typeid(Brick)) ! return "Brick"; ! else ! return "CompBrick"; ! } } void run() { ! Array2D &a = aRef(), &c = cRef(); ! const Array2D &b = bRef(); ! int i, j, iter; ! // Run setup ! ! c = 1000.0; - Pooma::blockAndEvaluate(); - // Run kernel. ! ! for (iter = 0; iter < 10; ++iter) { ! double k = 1.0 / sqrt(double(iter + 1)); ! for (j = 1; j <= n_m; j++) { ! for (i = 1; i <= n_m; i++) { ! a(i, j) = b(i, j) + k * c(i, j); ! c(i, j) = 0.5 * (a(i, j) - b(i, j)); } } } ! check_m = a(n_m / 2, n_m / 2); } }; //----------------------------------------------------------------------------- ! // ABCInP2 class definition. //----------------------------------------------------------------------------- ! template ! class ABCInP2 : public ABCTestBase { public: ! // Constructor allows us to specify the number of patches in each direction ! // (if we're UMP-based). ! ABCInP2(int np = 1) ! : ABCTestBase(np) { } ! ! typedef typename ABCTestBase::Array2D Array2D; // This is a P2 benchmark, perhaps using UMP. const char* type() const { return P2Type(); } const char* qualification() const { ! if (UMP) ! { ! if (typeid(EngineTag) == typeid(Brick)) ! return "BrickUMP"; ! else ! return "CompBrickUMP"; ! } else ! { ! if (typeid(EngineTag) == typeid(Brick)) ! return "Brick"; ! else ! return "CompBrick"; ! } } void run() { ! Array2D &a = aRef(), &c = cRef(); ! const Array2D &b = bRef(); ! // Run setup ! c = 1000.0; ! ! Pooma::blockAndEvaluate(); // Run kernel. ! for (int iter = 0; iter< 10; ++iter) { ! double k = 1.0 / sqrt(double(iter + 1)); ! a = b + k * c; ! c = 0.5 * (a - b); } Pooma::blockAndEvaluate(); // Save result for checking. ! check_m = a(n_m / 2, n_m / 2); } }; ! #endif // POOMA_BENCHMARKS_ABCTEST_ABC_H // ACL:rcsinfo // ---------------------------------------------------------------------- ! // $RCSfile: ABC.h,v $ $Author: jac $ ! // $Revision: 1.29 $ $Date: 2000/06/30 01:56:15 $ // ---------------------------------------------------------------------- // ACL:rcsinfo --- 307,465 ---- int n_m, np_m; ! // Internal guard layers. ! int ng_m; ! // Domains for stencil. ! ! Interval<1> I, J; }; //----------------------------------------------------------------------------- ! // AbcCppTran class definition, executing a C++ version of ForTran code. //----------------------------------------------------------------------------- ! template ! class AbcCppTran : ! public AbcBase ! { public: ! // Constructor allows us to specify the number of patches for each direction. ! AbcCppTran(int np = 1) ! : AbcBase(np) ! { } // This is a C++Tran benchmark, perhaps using UMP. const char* type() const { return CppTranType(); } const char* qualification() const { ! typedef typename Store::Engine_t Engine_t; ! return ::qualification(a_m).c_str(); } void run() { ! // Run setup. ! runSetup(); // Run kernel. ! ! for (int iter = 0; iter < 10; ++iter) { ! const double k = 1.0 / sqrt(static_cast(iter+1)); ! for (int j = 1; j <= n_m; ++j) { ! for (int i = 1; i <= n_m; ++i) { ! a_m(i,j) = b_m(i,j) + k * c_m(i,j); ! c_m(i,j) = 0.5 * (a_m(i,j) - b_m(i,j)); } } } + + // Save result for checking. + + check_m = a_m(n_m / 2, n_m / 2); + } ! void runSetup() ! { ! for (int j = 1; j <= n_m; ++j) ! { ! for (int i = 1; i <= n_m; ++i) ! { ! b_m(i,j) = 0.0; ! c_m(i,j) = 1000.0; ! } ! } } }; //----------------------------------------------------------------------------- ! // AbcP2 class definition, executing Pooma data-parallel code. //----------------------------------------------------------------------------- ! template ! class AbcP2 ! : public AbcBase ! { public: ! // Constructor allows us to specify the number of patches for each direction. ! AbcP2(int np = 1, int ng = 0) ! : AbcBase(np,ng), ! guarded_m(ng > 0) ! { } // This is a P2 benchmark, perhaps using UMP. const char* type() const { return P2Type(); } const char* qualification() const { ! typedef typename Store::Engine_t Engine_t; ! ! std::string qual = ::qualification(a_m); ! ! if (guarded_m) ! { ! PAssert(Engine_t::multiPatch); ! return ("GC" + qual).c_str(); ! } else ! { ! return qual.c_str(); ! } } void run() { ! int k; ! // Run setup. ! runSetup(); // Run kernel. ! for (int iter = 0; iter < 10; ++iter) { ! const double k = 1.0 / sqrt(static_cast(iter+1)); ! a_m = b_m + k * c_m; ! c_m = 0.5 * (a_m - b_m); } Pooma::blockAndEvaluate(); // Save result for checking. + + check_m = a_m(n_m / 2, n_m / 2); + } + + void runSetup() + { + // Run setup. ! b_m = 0.0; ! c_m = 1000.0; } + + private: + bool guarded_m; }; ! #endif // POOMA_BENCHMARKS_ABC_H // ACL:rcsinfo // ---------------------------------------------------------------------- ! // $RCSfile: ABC.h,v $ $Author: oldham $ ! // $Revision: 1.1 $ $Date: 2001/09/28 03:41:36 $ // ---------------------------------------------------------------------- // ACL:rcsinfo Index: ABCInC.c =================================================================== RCS file: /home/pooma/Repository/r2/benchmarks/ABCTest/ABCInC.c,v retrieving revision 1.9 diff -c -p -r1.9 ABCInC.c *** ABCInC.c 2000/04/12 01:03:33 1.9 --- ABCInC.c 2001/10/12 23:25:19 *************** *** 27,55 **** */ /* ACL:license */ #include "Pooma/Configuration.h" #include #if POOMA_NO_RESTRICT #define restrict /**/ #endif #ifdef __cplusplus extern "C" { #endif void ! runABCInC(double * restrict a, double * b, double * restrict c, int n) { ! int i, j, iter; ! for (iter = 0; iter < 10; ++iter) { double k; k = 1.0 / sqrt((double)(iter + 1)); ! for (j = 0; j < n; j++) { ! for (i = 0; i < n; i++) { a[i + n * j] = b[i + n * j] + k * c[i + n * j]; c[i + n * j] = 0.5 * (a[i + n * j] - b[i + n * j]); --- 27,102 ---- */ /* ACL:license */ + /* include files */ + #include "Pooma/Configuration.h" #include + /* define away "restrict" if it is not supported */ + #if POOMA_NO_RESTRICT #define restrict /**/ #endif + /* wrapper for integrated C/C++ compilers */ + #ifdef __cplusplus extern "C" { #endif + void + runAbcSetup(double* a, double* b, double *c, int n) + { + int i, j; + + for (j = 0; j <= n - 1; j++) + { + for (i = 0; i <= n - 1; i++) + { + b[i + n * j] = 0.0; + c[i + n * j] = 1000.0; + } + } + } + + /* Abc kernels */ + + void + runAbcInCRestrict(double *restrict a, double *restrict b, + double *restrict c, int n) + { + int iter, j, i; + + runAbcSetup(a, b, c, n); + + for (iter = 0; iter < 10; ++iter) + { + const double k = 1.0 / sqrt((double)(iter+1)); + for (j = 0; j < n; ++j) + { + for (i = 0; i < n; ++i) + { + a[i + n * j] = b[i + n * j] + k * c[i + n * j]; + c[i + n * j] = 0.5 * (a[i + n * j] - b[i + n * j]); + } + } + } + } + void ! runAbcInC(double* a, double* b, double* c, int n) { ! int iter, j, i; ! ! runAbcSetup(a, b, c, n); ! for (iter = 0; iter < 10; ++iter) { double k; k = 1.0 / sqrt((double)(iter + 1)); ! for (j = 0; j < n; ++j) { ! for (i = 0; i < n; ++i) { a[i + n * j] = b[i + n * j] + k * c[i + n * j]; c[i + n * j] = 0.5 * (a[i + n * j] - b[i + n * j]); *************** runABCInC(double * restrict a, double * *** 64,71 **** /* ACL:rcsinfo */ /* ---------------------------------------------------------------------- ! * $RCSfile: ABCInC.c,v $ $Author: julianc $ ! * $Revision: 1.9 $ $Date: 2000/04/12 01:03:33 $ * ---------------------------------------------------------------------- */ /* ACL:rcsinfo */ --- 111,118 ---- /* ACL:rcsinfo */ /* ---------------------------------------------------------------------- ! * $RCSfile: AbcInC.c,v $ $Author: oldham $ ! * $Revision: 1.14 $ $Date: 2001/09/28 03:41:36 $ * ---------------------------------------------------------------------- */ /* ACL:rcsinfo */ Index: ABCInC.h =================================================================== RCS file: ABCInC.h diff -N ABCInC.h *** /dev/null Fri Mar 23 21:37:44 2001 --- ABCInC.h Fri Oct 12 17:25:19 2001 *************** *** 0 **** --- 1,147 ---- + // -*- C++ -*- + // ACL:license + // ---------------------------------------------------------------------- + // This software and ancillary information (herein called "SOFTWARE") + // called POOMA (Parallel Object-Oriented Methods and Applications) is + // made available under the terms described here. The SOFTWARE has been + // approved for release with associated LA-CC Number LA-CC-98-65. + // + // Unless otherwise indicated, this SOFTWARE has been authored by an + // employee or employees of the University of California, operator of the + // Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with + // the U.S. Department of Energy. The U.S. Government has rights to use, + // reproduce, and distribute this SOFTWARE. The public may copy, distribute, + // prepare derivative works and publicly display this SOFTWARE without + // charge, provided that this Notice and any statement of authorship are + // reproduced on all copies. Neither the Government nor the University + // makes any warranty, express or implied, or assumes any liability or + // responsibility for the use of this SOFTWARE. + // + // If SOFTWARE is modified to produce derivative works, such modified + // SOFTWARE should be clearly marked, so as not to confuse it with the + // version available from LANL. + // + // For more information about POOMA, send e-mail to pooma at acl.lanl.gov, + // or visit the POOMA web page at http://www.acl.lanl.gov/pooma/. + // ---------------------------------------------------------------------- + // ACL:license + + #ifndef POOMA_BENCHMARKS_ABC_ABCINC_H + #define POOMA_BENCHMARKS_ABC_ABCINC_H + + //----------------------------------------------------------------------------- + // Class AbcInC. + //----------------------------------------------------------------------------- + + // include files + + #include "Utilities/Benchmark.h" + #include "Utilities/PAssert.h" + + #include + + // function declarations + + extern "C" { + void runAbcSetup(double* a, double* b, double* c, int n); + void runAbcInC(double* a, double* b, double* c, int n); + void runAbcInCRestrict(double* a, double* b, double* c, int n); + }; + + + //----------------------------------------------------------------------------- + // Class definitions. + //----------------------------------------------------------------------------- + + template + class AbcInC : public Implementation { + public: + + // constructor: just set data pointers to null + AbcInC() : a_m(NULL), b_m(NULL), c_m(NULL) {} + + // destructor: clean up allocated memory + ~AbcInC() { + delete [] a_m; + delete [] b_m; + delete [] c_m; + } + + // This is a C benchmark. + + const char *type() const { return CType(); } + const char *qualification() const + { + if (UseRestrict) + return "restrict"; + else + return ""; + } + + void initialize(int n) { + // delete and reallocate the arrays + delete [] a_m; + delete [] b_m; + delete [] c_m; + + a_m = new double[n * n]; + b_m = new double[n * n]; + c_m = new double[n * n]; + + PInsist(a_m != NULL, "Memory allocation failure of a_m."); + PInsist(b_m != NULL, "Memory allocation failure of b_m."); + PInsist(c_m != NULL, "Memory allocation failure of c_m."); + + // Save problem size. + n_m = n; + } + + void run() { + // run kernel + + if (UseRestrict) + runAbcInCRestrict(a_m, b_m, c_m, n_m); + else + runAbcInC(a_m, b_m, c_m, n_m); + + // save result + check_m = a_m[n_m / 2 - 1 + n_m * (n_m / 2 - 1)]; + } + + void runSetup() + { + runAbcSetup(a_m, b_m, c_m, n_m); + } + + // Return value for checking result of benchmark run. + + double resultCheck() const { return check_m; } + + // Return number of flops in this kernel. + + double opCount() const { return ( 40 * n_m * n_m ); } + + private: + + // Data Arrays. + + double *a_m, *b_m, *c_m; + + // Problem check value. + + double check_m; + + // Problem Size. + + int n_m; + + }; + + #endif // POOMA_BENCHMARKS_ABC_ABCINC_H + + // ACL:rcsinfo + // ---------------------------------------------------------------------- + // $RCSfile: AbcInC.h,v $ $Author: oldham $ + // $Revision: 1.23 $ $Date: 2001/09/28 03:41:36 $ + // ---------------------------------------------------------------------- + // ACL:rcsinfo From oldham at codesourcery.com Sat Oct 13 03:54:11 2001 From: oldham at codesourcery.com (Jeffrey Oldham) Date: Fri, 12 Oct 2001 20:54:11 -0700 Subject: [pooma-dev] Building 64 bit MM In-Reply-To: <15301.59717.392674.440188@saltydog.lanl.gov>; from wdn@lanl.gov on Thu, Oct 11, 2001 at 12:47:33PM -0600 References: <15301.59717.392674.440188@saltydog.lanl.gov> Message-ID: <20011012205411.B11858@codesourcery.com> On Thu, Oct 11, 2001 at 12:47:33PM -0600, Dave Nystrom wrote: > Does anyone know how to build a 64 bit version of the MM shared memory > library on Irix 6.5? I'm having trouble with it wanting to use ld32 and I > have tried the following environment variables and configure options: > > CC = location to the MIPSpro cc compiler > CFLAGS = -64 > LDFLAGS = -64 > > configure --disable-shared --prefix=where_I_want_mm_installed > > I want to try using the Cheetah shmem interface on b18 with 64 bit. I used gcc, avoiding many problems. Here are the steps I used: setenv CC 'gcc -mabi=64' ./configure --prefix=${HOME}/pooma/mm-1.1.3 make test make install I have not yet tested it with Cheetah and/or Pooma. Thanks, Jeffrey D. Oldham oldham at codesourcery.com From oldham at codesourcery.com Sat Oct 13 19:18:43 2001 From: oldham at codesourcery.com (Jeffrey Oldham) Date: Sat, 13 Oct 2001 12:18:43 -0700 Subject: Patch: Pooma QMTest runner.sh Change Message-ID: <20011013121843.A28331@codesourcery.com> The Pooma QMTest interface changes slightly. Using this patch requirs having a recent qmtest. 2001-10-13 Jeffrey D. Oldham * runner.sh: Revise DIR's definition to reflect new location of QMTest test database. s/--db-path/--tdb/ per command-line change. Thanks, Jeffrey D. Oldham oldham at codesourcery.com -------------- next part -------------- Index: runner.sh =================================================================== RCS file: /home/pooma/Repository/pooma-tests.qms/runner.sh,v retrieving revision 1.1 diff -c -p -r1.1 runner.sh *** runner.sh 2001/10/09 19:50:56 1.1 --- runner.sh 2001/10/13 19:15:53 *************** *** 23,29 **** # Declare useful variables. # the directory containing the QMTest test programs ! DIR=${HOME}/pooma/tests # the file where the Pooma library construction results should be stored LOGFILE=${DIR}/results/`date +%b%d`.log # the file where the QMTest XML results should be stored --- 23,29 ---- # Declare useful variables. # the directory containing the QMTest test programs ! DIR=${HOME}/pooma/pooma-tests.qms # the file where the Pooma library construction results should be stored LOGFILE=${DIR}/results/`date +%b%d`.log # the file where the QMTest XML results should be stored *************** QMTEST_PARALLELISM=1 *** 43,49 **** # Functions. qmtester() { ! qmtest --db-path ${DIR} \ run --output ${DIR}/results/`date +%b%d`.xml \ -j ${QMTEST_PARALLELISM} \ -c poomasuite=${POOMASUITE} -c pooma_home=${POOMADIR} $@ 2>&1 | \ --- 43,49 ---- # Functions. qmtester() { ! qmtest --tdb ${DIR} \ run --output ${DIR}/results/`date +%b%d`.xml \ -j ${QMTEST_PARALLELISM} \ -c poomasuite=${POOMASUITE} -c pooma_home=${POOMADIR} $@ 2>&1 | \ From oldham at codesourcery.com Sat Oct 13 22:24:29 2001 From: oldham at codesourcery.com (Jeffrey Oldham) Date: Sat, 13 Oct 2001 15:24:29 -0700 Subject: Patch: Pooma QMTest runner.sh (2nd Patch) Message-ID: <20011013152429.A30933@codesourcery.com> 2001-10-13 Jeffrey D. Oldham * runner.sh: Use shell variables. Add '--format full', part of the new QMTest interface. Applied to Pooma QMTest CVS tree pooma-tests.qms Thanks, Jeffrey D. Oldham oldham at codesourcery.com -------------- next part -------------- Index: runner.sh =================================================================== RCS file: /home/pooma/Repository/pooma-tests.qms/runner.sh,v retrieving revision 1.2 diff -c -p -r1.2 runner.sh *** runner.sh 2001/10/13 19:18:03 1.2 --- runner.sh 2001/10/13 22:23:10 *************** QMTEST_PARALLELISM=1 *** 44,53 **** qmtester() { qmtest --tdb ${DIR} \ ! run --output ${DIR}/results/`date +%b%d`.xml \ -j ${QMTEST_PARALLELISM} \ -c poomasuite=${POOMASUITE} -c pooma_home=${POOMADIR} $@ 2>&1 | \ ! tee ${DIR}/results/`date +%b%d`.sum } usage() { --- 44,53 ---- qmtester() { qmtest --tdb ${DIR} \ ! run --format full --output ${XMLFILE} \ -j ${QMTEST_PARALLELISM} \ -c poomasuite=${POOMASUITE} -c pooma_home=${POOMADIR} $@ 2>&1 | \ ! tee ${SUMFILE} } usage() { From oldham at codesourcery.com Mon Oct 15 17:23:05 2001 From: oldham at codesourcery.com (Jeffrey Oldham) Date: Mon, 15 Oct 2001 10:23:05 -0700 Subject: Patch: TestRelationGroups.cpp: Fix Test Name. Message-ID: <20011015102305.A9538@codesourcery.com> 2001-10-15 Jeffrey D. Oldham * TestRelationGroups.cpp (main): Fix the name of the test given to tester. Tested on sequential Linux by running test Applied to mainline Approved by Stephen Smith Thanks, Jeffrey D. Oldham oldham at codesourcery.com -------------- next part -------------- Index: TestRelationGroups.cpp =================================================================== RCS file: /home/pooma/Repository/r2/src/Field/tests/TestRelationGroups.cpp,v retrieving revision 1.1 diff -c -p -r1.1 TestRelationGroups.cpp *** TestRelationGroups.cpp 2001/08/30 01:15:18 1.1 --- TestRelationGroups.cpp 2001/10/14 03:46:39 *************** int main(int argc, char *argv[]) *** 117,123 **** tester.out() << E << std::endl; ! int ret = tester.results("TestMeshFunctions"); Pooma::finalize(); return ret; } --- 117,123 ---- tester.out() << E << std::endl; ! int ret = tester.results("TestRelationGroups"); Pooma::finalize(); return ret; } From oldham at codesourcery.com Mon Oct 15 17:36:12 2001 From: oldham at codesourcery.com (Jeffrey Oldham) Date: Mon, 15 Oct 2001 10:36:12 -0700 Subject: Patch: Update Licenses Message-ID: <20011015103612.B9538@codesourcery.com> 2001-10-15 Jeffrey D. Oldham Update the licenses. Each file's change is the same. * benchmarks/Doof2d/Doof2dInC.c * bin/cleanproject.pooma * bin/cleanproject.pooma.cw * bin/installSGI * bin/makedistrib * bin/makeinstall * bin/mkproject.pooma * bin/mkrelease * bin/mkrelease.cw * bin/tagToDistrib.pl * config/head.mk * config/Shared/README.make * config/Shared/compilerules.mk * config/Shared/dependo.pl * config/Shared/findsuite.sh * config/Shared/include1.mk * config/Shared/include2.mk * config/Shared/mm.pl * config/Shared/new.pl * config/Shared/noop * config/Shared/pretty.pl * config/Shared/showtimes.pl * config/Shared/tail.mk * config/Shared/user_.mk * config/Shared/variables.mk * config/arch/AIXKCC.conf * config/arch/DECCXX.conf * config/arch/DECEGCS.conf * config/arch/LINUXEGCS.conf * config/arch/LINUXKCC.conf * config/arch/LINUXPGI.conf * config/arch/LINUXgcc.conf * config/arch/SGI64CC.conf * config/arch/SGI64EGCS.conf * config/arch/SGI64KCC.conf * config/arch/SGI64gcc.conf * config/arch/SGIN32CC.conf * config/arch/SGIN32EGCS.conf * config/arch/SGIN32KCC.conf * config/arch/SGIN32gcc.conf * config/arch/SUNEGCS.conf * config/arch/SUNKCC.conf * config/arch/SUNgcc.conf * config/arch/T3EKCC.conf * config/arch/WILDFIRECXX.conf * config/arch/WILDFIREEGCS.conf * docs/legal.html * examples/Solvers/BlockDecomposed/FivePoint/FivePoint.h * examples/Solvers/BlockDecomposed/FivePoint/FivePointIC0Stencil.h * examples/Solvers/BlockDecomposed/FivePoint/FivePointIC1Stencil.h * examples/Solvers/BlockDecomposed/FivePoint/include.mk * examples/Solvers/BlockDecomposed/FivePoint/makefile * examples/Solvers/BlockDecomposed/NinePoint/NinePoint.h * examples/Solvers/BlockDecomposed/NinePoint/NinePointIC0Stencil.h * examples/Solvers/BlockDecomposed/NinePoint/NinePointIC1Stencil.h * examples/Solvers/BlockDecomposed/NinePoint/include.mk * examples/Solvers/BlockDecomposed/NinePoint/makefile * examples/Solvers/BlockDecomposed/Tools/NullPreconditioner.h * src/Array/ArrayOperatorSpecializations.h * src/Connect/Lux/LuxConnector.DynamicArray.h * src/CoordinateSystems/CoordinateTypeInfo.h * src/Engine/EngineTypeInfo.h * src/Engine/tests/remoteBrickTest1.cpp * src/Evaluator/LoopApply.h * src/Evaluator/MultiArgEvaluator.h * src/Evaluator/MultiArgKernel.h * src/Evaluator/ScalarCode.h * src/Evaluator/ScalarCodeInfo.h * src/Evaluator/SimpleIntersector.h * src/Field/FieldOperatorSpecializations.h * src/Field/FieldTypeInfo.h * src/Field/Mesh/PositionFunctions.h * src/Functions/MultiArg.h * src/IO/DiskLayout.cmpl.cpp * src/IO/FileSetReader.cmpl.cpp * src/IO/FileSetReader.cpp * src/PETE/PETETypeInfo.h * src/PETE/PoomaPETE.h * src/Partition/BisectionMapper.h * src/Partition/DistributedMapper.h * src/Pooma/tests/finalize.cpp * src/Pooma/tests/include.mk * src/Pooma/tests/makefile * src/Pooma/tests/pooma.cpp * src/Utilities/NoInit.h * src/Utilities/PurifyConstructors.h * src/Utilities/TypeInfo.h * src/arch/DEC/complex.h Tested on sequential Linux using gcc3.1 by compiling Pooma library and soe Field tests Approved by Stephen Smith Applied to mainline Thanks, Jeffrey D. Oldham oldham at codesourcery.com -------------- next part -------------- Index: benchmarks/Doof2d/Doof2dInC.c =================================================================== RCS file: /home/pooma/Repository/r2/benchmarks/Doof2d/Doof2dInC.c,v retrieving revision 1.14 diff -c -p -r1.14 Doof2dInC.c *** benchmarks/Doof2d/Doof2dInC.c 2001/09/28 03:41:36 1.14 --- benchmarks/Doof2d/Doof2dInC.c 2001/10/13 02:25:43 *************** *** 8,21 **** * * Unless otherwise indicated, this SOFTWARE has been authored by an * employee or employees of the University of California, operator of the ! * Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with * the U.S. Department of Energy. The U.S. Government has rights to use, ! * reproduce, and distribute this SOFTWARE, and to allow others to do so. ! * The public may copy and use this SOFTWARE, FOR NONCOMMERCIAL USE ONLY, ! * without charge, provided that this Notice and any statement of ! * authorship are reproduced on all copies. Neither the Government nor ! * the University makes any warranty, express or implied, or assumes any ! * liability or responsibility for the use of this SOFTWARE. * * If SOFTWARE is modified to produce derivative works, such modified * SOFTWARE should be clearly marked, so as not to confuse it with the --- 8,21 ---- * * Unless otherwise indicated, this SOFTWARE has been authored by an * employee or employees of the University of California, operator of the ! * Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with * the U.S. Department of Energy. The U.S. Government has rights to use, ! * reproduce, and distribute this SOFTWARE. The public may copy, distribute, ! * prepare derivative works and publicly display this SOFTWARE without ! * charge, provided that this Notice and any statement of authorship are ! * reproduced on all copies. Neither the Government nor the University ! * makes any warranty, express or implied, or assumes any liability or ! * responsibility for the use of this SOFTWARE. * * If SOFTWARE is modified to produce derivative works, such modified * SOFTWARE should be clearly marked, so as not to confuse it with the Index: bin/cleanproject.pooma =================================================================== RCS file: /home/pooma/Repository/r2/bin/cleanproject.pooma,v retrieving revision 1.7 diff -c -p -r1.7 cleanproject.pooma *** bin/cleanproject.pooma 2000/08/18 04:14:29 1.7 --- bin/cleanproject.pooma 2001/10/13 02:25:43 *************** *** 10,21 **** # employee or employees of the University of California, operator of the # Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with # the U.S. Department of Energy. The U.S. Government has rights to use, ! # reproduce, and distribute this SOFTWARE, and to allow others to do so. ! # The public may copy and use this SOFTWARE, FOR NONCOMMERCIAL USE ONLY, ! # without charge, provided that this Notice and any statement of ! # authorship are reproduced on all copies. Neither the Government nor ! # the University makes any warranty, express or implied, or assumes any ! # liability or responsibility for the use of this SOFTWARE. # # If SOFTWARE is modified to produce derivative works, such modified # SOFTWARE should be clearly marked, so as not to confuse it with the --- 10,21 ---- # employee or employees of the University of California, operator of the # Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with # the U.S. Department of Energy. The U.S. Government has rights to use, ! # reproduce, and distribute this SOFTWARE. The public may copy, distribute, ! # prepare derivative works and publicly display this SOFTWARE without ! # charge, provided that this Notice and any statement of authorship are ! # reproduced on all copies. Neither the Government nor the University ! # makes any warranty, express or implied, or assumes any liability or ! # responsibility for the use of this SOFTWARE. # # If SOFTWARE is modified to produce derivative works, such modified # SOFTWARE should be clearly marked, so as not to confuse it with the Index: bin/cleanproject.pooma.cw =================================================================== RCS file: /home/pooma/Repository/r2/bin/cleanproject.pooma.cw,v retrieving revision 1.3 diff -c -p -r1.3 cleanproject.pooma.cw *** bin/cleanproject.pooma.cw 1999/07/21 05:36:48 1.3 --- bin/cleanproject.pooma.cw 2001/10/13 02:25:43 *************** *** 10,21 **** # employee or employees of the University of California, operator of the # Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with # the U.S. Department of Energy. The U.S. Government has rights to use, ! # reproduce, and distribute this SOFTWARE, and to allow others to do so. ! # The public may copy and use this SOFTWARE, FOR NONCOMMERCIAL USE ONLY, ! # without charge, provided that this Notice and any statement of ! # authorship are reproduced on all copies. Neither the Government nor ! # the University makes any warranty, express or implied, or assumes any ! # liability or responsibility for the use of this SOFTWARE. # # If SOFTWARE is modified to produce derivative works, such modified # SOFTWARE should be clearly marked, so as not to confuse it with the --- 10,21 ---- # employee or employees of the University of California, operator of the # Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with # the U.S. Department of Energy. The U.S. Government has rights to use, ! # reproduce, and distribute this SOFTWARE. The public may copy, distribute, ! # prepare derivative works and publicly display this SOFTWARE without ! # charge, provided that this Notice and any statement of authorship are ! # reproduced on all copies. Neither the Government nor the University ! # makes any warranty, express or implied, or assumes any liability or ! # responsibility for the use of this SOFTWARE. # # If SOFTWARE is modified to produce derivative works, such modified # SOFTWARE should be clearly marked, so as not to confuse it with the Index: bin/installSGI =================================================================== RCS file: /home/pooma/Repository/r2/bin/installSGI,v retrieving revision 1.4 diff -c -p -r1.4 installSGI *** bin/installSGI 1999/07/21 05:36:48 1.4 --- bin/installSGI 2001/10/13 02:25:43 *************** *** 10,21 **** # employee or employees of the University of California, operator of the # Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with # the U.S. Department of Energy. The U.S. Government has rights to use, ! # reproduce, and distribute this SOFTWARE, and to allow others to do so. ! # The public may copy and use this SOFTWARE, FOR NONCOMMERCIAL USE ONLY, ! # without charge, provided that this Notice and any statement of ! # authorship are reproduced on all copies. Neither the Government nor ! # the University makes any warranty, express or implied, or assumes any ! # liability or responsibility for the use of this SOFTWARE. # # If SOFTWARE is modified to produce derivative works, such modified # SOFTWARE should be clearly marked, so as not to confuse it with the --- 10,21 ---- # employee or employees of the University of California, operator of the # Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with # the U.S. Department of Energy. The U.S. Government has rights to use, ! # reproduce, and distribute this SOFTWARE. The public may copy, distribute, ! # prepare derivative works and publicly display this SOFTWARE without ! # charge, provided that this Notice and any statement of authorship are ! # reproduced on all copies. Neither the Government nor the University ! # makes any warranty, express or implied, or assumes any liability or ! # responsibility for the use of this SOFTWARE. # # If SOFTWARE is modified to produce derivative works, such modified # SOFTWARE should be clearly marked, so as not to confuse it with the Index: bin/makedistrib =================================================================== RCS file: /home/pooma/Repository/r2/bin/makedistrib,v retrieving revision 1.15 diff -c -p -r1.15 makedistrib *** bin/makedistrib 2000/08/18 04:14:29 1.15 --- bin/makedistrib 2001/10/13 02:25:43 *************** *** 10,21 **** # employee or employees of the University of California, operator of the # Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with # the U.S. Department of Energy. The U.S. Government has rights to use, ! # reproduce, and distribute this SOFTWARE, and to allow others to do so. ! # The public may copy and use this SOFTWARE, FOR NONCOMMERCIAL USE ONLY, ! # without charge, provided that this Notice and any statement of ! # authorship are reproduced on all copies. Neither the Government nor ! # the University makes any warranty, express or implied, or assumes any ! # liability or responsibility for the use of this SOFTWARE. # # If SOFTWARE is modified to produce derivative works, such modified # SOFTWARE should be clearly marked, so as not to confuse it with the --- 10,21 ---- # employee or employees of the University of California, operator of the # Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with # the U.S. Department of Energy. The U.S. Government has rights to use, ! # reproduce, and distribute this SOFTWARE. The public may copy, distribute, ! # prepare derivative works and publicly display this SOFTWARE without ! # charge, provided that this Notice and any statement of authorship are ! # reproduced on all copies. Neither the Government nor the University ! # makes any warranty, express or implied, or assumes any liability or ! # responsibility for the use of this SOFTWARE. # # If SOFTWARE is modified to produce derivative works, such modified # SOFTWARE should be clearly marked, so as not to confuse it with the Index: bin/makeinstall =================================================================== RCS file: /home/pooma/Repository/r2/bin/makeinstall,v retrieving revision 1.6 diff -c -p -r1.6 makeinstall *** bin/makeinstall 1999/12/23 03:07:22 1.6 --- bin/makeinstall 2001/10/13 02:25:43 *************** *** 10,21 **** # employee or employees of the University of California, operator of the # Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with # the U.S. Department of Energy. The U.S. Government has rights to use, ! # reproduce, and distribute this SOFTWARE, and to allow others to do so. ! # The public may copy and use this SOFTWARE, FOR NONCOMMERCIAL USE ONLY, ! # without charge, provided that this Notice and any statement of ! # authorship are reproduced on all copies. Neither the Government nor ! # the University makes any warranty, express or implied, or assumes any ! # liability or responsibility for the use of this SOFTWARE. # # If SOFTWARE is modified to produce derivative works, such modified # SOFTWARE should be clearly marked, so as not to confuse it with the --- 10,21 ---- # employee or employees of the University of California, operator of the # Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with # the U.S. Department of Energy. The U.S. Government has rights to use, ! # reproduce, and distribute this SOFTWARE. The public may copy, distribute, ! # prepare derivative works and publicly display this SOFTWARE without ! # charge, provided that this Notice and any statement of authorship are ! # reproduced on all copies. Neither the Government nor the University ! # makes any warranty, express or implied, or assumes any liability or ! # responsibility for the use of this SOFTWARE. # # If SOFTWARE is modified to produce derivative works, such modified # SOFTWARE should be clearly marked, so as not to confuse it with the Index: bin/mkproject.pooma =================================================================== RCS file: /home/pooma/Repository/r2/bin/mkproject.pooma,v retrieving revision 1.7 diff -c -p -r1.7 mkproject.pooma *** bin/mkproject.pooma 1999/08/20 01:09:06 1.7 --- bin/mkproject.pooma 2001/10/13 02:25:43 *************** *** 10,21 **** # employee or employees of the University of California, operator of the # Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with # the U.S. Department of Energy. The U.S. Government has rights to use, ! # reproduce, and distribute this SOFTWARE, and to allow others to do so. ! # The public may copy and use this SOFTWARE, FOR NONCOMMERCIAL USE ONLY, ! # without charge, provided that this Notice and any statement of ! # authorship are reproduced on all copies. Neither the Government nor ! # the University makes any warranty, express or implied, or assumes any ! # liability or responsibility for the use of this SOFTWARE. # # If SOFTWARE is modified to produce derivative works, such modified # SOFTWARE should be clearly marked, so as not to confuse it with the --- 10,21 ---- # employee or employees of the University of California, operator of the # Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with # the U.S. Department of Energy. The U.S. Government has rights to use, ! # reproduce, and distribute this SOFTWARE. The public may copy, distribute, ! # prepare derivative works and publicly display this SOFTWARE without ! # charge, provided that this Notice and any statement of authorship are ! # reproduced on all copies. Neither the Government nor the University ! # makes any warranty, express or implied, or assumes any liability or ! # responsibility for the use of this SOFTWARE. # # If SOFTWARE is modified to produce derivative works, such modified # SOFTWARE should be clearly marked, so as not to confuse it with the Index: bin/mkrelease =================================================================== RCS file: /home/pooma/Repository/r2/bin/mkrelease,v retrieving revision 1.7 diff -c -p -r1.7 mkrelease *** bin/mkrelease 1999/10/29 00:22:28 1.7 --- bin/mkrelease 2001/10/13 02:25:43 *************** *** 10,21 **** # employee or employees of the University of California, operator of the # Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with # the U.S. Department of Energy. The U.S. Government has rights to use, ! # reproduce, and distribute this SOFTWARE, and to allow others to do so. ! # The public may copy and use this SOFTWARE, FOR NONCOMMERCIAL USE ONLY, ! # without charge, provided that this Notice and any statement of ! # authorship are reproduced on all copies. Neither the Government nor ! # the University makes any warranty, express or implied, or assumes any ! # liability or responsibility for the use of this SOFTWARE. # # If SOFTWARE is modified to produce derivative works, such modified # SOFTWARE should be clearly marked, so as not to confuse it with the --- 10,21 ---- # employee or employees of the University of California, operator of the # Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with # the U.S. Department of Energy. The U.S. Government has rights to use, ! # reproduce, and distribute this SOFTWARE. The public may copy, distribute, ! # prepare derivative works and publicly display this SOFTWARE without ! # charge, provided that this Notice and any statement of authorship are ! # reproduced on all copies. Neither the Government nor the University ! # makes any warranty, express or implied, or assumes any liability or ! # responsibility for the use of this SOFTWARE. # # If SOFTWARE is modified to produce derivative works, such modified # SOFTWARE should be clearly marked, so as not to confuse it with the Index: bin/mkrelease.cw =================================================================== RCS file: /home/pooma/Repository/r2/bin/mkrelease.cw,v retrieving revision 1.2 diff -c -p -r1.2 mkrelease.cw *** bin/mkrelease.cw 1999/07/21 05:36:49 1.2 --- bin/mkrelease.cw 2001/10/13 02:25:43 *************** *** 10,21 **** # employee or employees of the University of California, operator of the # Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with # the U.S. Department of Energy. The U.S. Government has rights to use, ! # reproduce, and distribute this SOFTWARE, and to allow others to do so. ! # The public may copy and use this SOFTWARE, FOR NONCOMMERCIAL USE ONLY, ! # without charge, provided that this Notice and any statement of ! # authorship are reproduced on all copies. Neither the Government nor ! # the University makes any warranty, express or implied, or assumes any ! # liability or responsibility for the use of this SOFTWARE. # # If SOFTWARE is modified to produce derivative works, such modified # SOFTWARE should be clearly marked, so as not to confuse it with the --- 10,21 ---- # employee or employees of the University of California, operator of the # Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with # the U.S. Department of Energy. The U.S. Government has rights to use, ! # reproduce, and distribute this SOFTWARE. The public may copy, distribute, ! # prepare derivative works and publicly display this SOFTWARE without ! # charge, provided that this Notice and any statement of authorship are ! # reproduced on all copies. Neither the Government nor the University ! # makes any warranty, express or implied, or assumes any liability or ! # responsibility for the use of this SOFTWARE. # # If SOFTWARE is modified to produce derivative works, such modified # SOFTWARE should be clearly marked, so as not to confuse it with the Index: bin/tagToDistrib.pl =================================================================== RCS file: /home/pooma/Repository/r2/bin/tagToDistrib.pl,v retrieving revision 1.2 diff -c -p -r1.2 tagToDistrib.pl *** bin/tagToDistrib.pl 1999/07/21 05:36:49 1.2 --- bin/tagToDistrib.pl 2001/10/13 02:25:43 *************** *** 10,21 **** # employee or employees of the University of California, operator of the # Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with # the U.S. Department of Energy. The U.S. Government has rights to use, ! # reproduce, and distribute this SOFTWARE, and to allow others to do so. ! # The public may copy and use this SOFTWARE, FOR NONCOMMERCIAL USE ONLY, ! # without charge, provided that this Notice and any statement of ! # authorship are reproduced on all copies. Neither the Government nor ! # the University makes any warranty, express or implied, or assumes any ! # liability or responsibility for the use of this SOFTWARE. # # If SOFTWARE is modified to produce derivative works, such modified # SOFTWARE should be clearly marked, so as not to confuse it with the --- 10,21 ---- # employee or employees of the University of California, operator of the # Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with # the U.S. Department of Energy. The U.S. Government has rights to use, ! # reproduce, and distribute this SOFTWARE. The public may copy, distribute, ! # prepare derivative works and publicly display this SOFTWARE without ! # charge, provided that this Notice and any statement of authorship are ! # reproduced on all copies. Neither the Government nor the University ! # makes any warranty, express or implied, or assumes any liability or ! # responsibility for the use of this SOFTWARE. # # If SOFTWARE is modified to produce derivative works, such modified # SOFTWARE should be clearly marked, so as not to confuse it with the Index: config/head.mk =================================================================== RCS file: /home/pooma/Repository/r2/config/head.mk,v retrieving revision 1.7 diff -c -p -r1.7 head.mk *** config/head.mk 2001/03/17 11:23:01 1.7 --- config/head.mk 2001/10/13 02:25:43 *************** *** 10,21 **** # employee or employees of the University of California, operator of the # Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with # the U.S. Department of Energy. The U.S. Government has rights to use, ! # reproduce, and distribute this SOFTWARE, and to allow others to do so. ! # The public may copy and use this SOFTWARE, FOR NONCOMMERCIAL USE ONLY, ! # without charge, provided that this Notice and any statement of ! # authorship are reproduced on all copies. Neither the Government nor ! # the University makes any warranty, express or implied, or assumes any ! # liability or responsibility for the use of this SOFTWARE. # # If SOFTWARE is modified to produce derivative works, such modified # SOFTWARE should be clearly marked, so as not to confuse it with the --- 10,21 ---- # employee or employees of the University of California, operator of the # Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with # the U.S. Department of Energy. The U.S. Government has rights to use, ! # reproduce, and distribute this SOFTWARE. The public may copy, distribute, ! # prepare derivative works and publicly display this SOFTWARE without ! # charge, provided that this Notice and any statement of authorship are ! # reproduced on all copies. Neither the Government nor the University ! # makes any warranty, express or implied, or assumes any liability or ! # responsibility for the use of this SOFTWARE. # # If SOFTWARE is modified to produce derivative works, such modified # SOFTWARE should be clearly marked, so as not to confuse it with the Index: config/Shared/README.make =================================================================== RCS file: /home/pooma/Repository/r2/config/Shared/README.make,v retrieving revision 1.2 diff -c -p -r1.2 README.make *** config/Shared/README.make 1998/10/26 21:41:15 1.2 --- config/Shared/README.make 2001/10/13 02:25:43 *************** *** 10,21 **** # employee or employees of the University of California, operator of the # Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with # the U.S. Department of Energy. The U.S. Government has rights to use, ! # reproduce, and distribute this SOFTWARE, and to allow others to do so. ! # The public may copy and use this SOFTWARE, FOR NONCOMMERCIAL USE ONLY, ! # without charge, provided that this Notice and any statement of ! # authorship are reproduced on all copies. Neither the Government nor ! # the University makes any warranty, express or implied, or assumes any ! # liability or responsibility for the use of this SOFTWARE. # # If SOFTWARE is modified to produce derivative works, such modified # SOFTWARE should be clearly marked, so as not to confuse it with the --- 10,21 ---- # employee or employees of the University of California, operator of the # Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with # the U.S. Department of Energy. The U.S. Government has rights to use, ! # reproduce, and distribute this SOFTWARE. The public may copy, distribute, ! # prepare derivative works and publicly display this SOFTWARE without ! # charge, provided that this Notice and any statement of authorship are ! # reproduced on all copies. Neither the Government nor the University ! # makes any warranty, express or implied, or assumes any liability or ! # responsibility for the use of this SOFTWARE. # # If SOFTWARE is modified to produce derivative works, such modified # SOFTWARE should be clearly marked, so as not to confuse it with the Index: config/Shared/compilerules.mk =================================================================== RCS file: /home/pooma/Repository/r2/config/Shared/compilerules.mk,v retrieving revision 1.6 diff -c -p -r1.6 compilerules.mk *** config/Shared/compilerules.mk 1999/02/26 01:23:44 1.6 --- config/Shared/compilerules.mk 2001/10/13 02:25:43 *************** *** 10,21 **** # employee or employees of the University of California, operator of the # Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with # the U.S. Department of Energy. The U.S. Government has rights to use, ! # reproduce, and distribute this SOFTWARE, and to allow others to do so. ! # The public may copy and use this SOFTWARE, FOR NONCOMMERCIAL USE ONLY, ! # without charge, provided that this Notice and any statement of ! # authorship are reproduced on all copies. Neither the Government nor ! # the University makes any warranty, express or implied, or assumes any ! # liability or responsibility for the use of this SOFTWARE. # # If SOFTWARE is modified to produce derivative works, such modified # SOFTWARE should be clearly marked, so as not to confuse it with the --- 10,21 ---- # employee or employees of the University of California, operator of the # Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with # the U.S. Department of Energy. The U.S. Government has rights to use, ! # reproduce, and distribute this SOFTWARE. The public may copy, distribute, ! # prepare derivative works and publicly display this SOFTWARE without ! # charge, provided that this Notice and any statement of authorship are ! # reproduced on all copies. Neither the Government nor the University ! # makes any warranty, express or implied, or assumes any liability or ! # responsibility for the use of this SOFTWARE. # # If SOFTWARE is modified to produce derivative works, such modified # SOFTWARE should be clearly marked, so as not to confuse it with the Index: config/Shared/dependo.pl =================================================================== RCS file: /home/pooma/Repository/r2/config/Shared/dependo.pl,v retrieving revision 1.9 diff -c -p -r1.9 dependo.pl *** config/Shared/dependo.pl 2000/12/14 00:29:18 1.9 --- config/Shared/dependo.pl 2001/10/13 02:25:43 *************** *** 10,21 **** # employee or employees of the University of California, operator of the # Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with # the U.S. Department of Energy. The U.S. Government has rights to use, ! # reproduce, and distribute this SOFTWARE, and to allow others to do so. ! # The public may copy and use this SOFTWARE, FOR NONCOMMERCIAL USE ONLY, ! # without charge, provided that this Notice and any statement of ! # authorship are reproduced on all copies. Neither the Government nor ! # the University makes any warranty, express or implied, or assumes any ! # liability or responsibility for the use of this SOFTWARE. # # If SOFTWARE is modified to produce derivative works, such modified # SOFTWARE should be clearly marked, so as not to confuse it with the --- 10,21 ---- # employee or employees of the University of California, operator of the # Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with # the U.S. Department of Energy. The U.S. Government has rights to use, ! # reproduce, and distribute this SOFTWARE. The public may copy, distribute, ! # prepare derivative works and publicly display this SOFTWARE without ! # charge, provided that this Notice and any statement of authorship are ! # reproduced on all copies. Neither the Government nor the University ! # makes any warranty, express or implied, or assumes any liability or ! # responsibility for the use of this SOFTWARE. # # If SOFTWARE is modified to produce derivative works, such modified # SOFTWARE should be clearly marked, so as not to confuse it with the Index: config/Shared/findsuite.sh =================================================================== RCS file: /home/pooma/Repository/r2/config/Shared/findsuite.sh,v retrieving revision 1.2 diff -c -p -r1.2 findsuite.sh *** config/Shared/findsuite.sh 1998/10/26 21:41:18 1.2 --- config/Shared/findsuite.sh 2001/10/13 02:25:43 *************** *** 10,21 **** # employee or employees of the University of California, operator of the # Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with # the U.S. Department of Energy. The U.S. Government has rights to use, ! # reproduce, and distribute this SOFTWARE, and to allow others to do so. ! # The public may copy and use this SOFTWARE, FOR NONCOMMERCIAL USE ONLY, ! # without charge, provided that this Notice and any statement of ! # authorship are reproduced on all copies. Neither the Government nor ! # the University makes any warranty, express or implied, or assumes any ! # liability or responsibility for the use of this SOFTWARE. # # If SOFTWARE is modified to produce derivative works, such modified # SOFTWARE should be clearly marked, so as not to confuse it with the --- 10,21 ---- # employee or employees of the University of California, operator of the # Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with # the U.S. Department of Energy. The U.S. Government has rights to use, ! # reproduce, and distribute this SOFTWARE. The public may copy, distribute, ! # prepare derivative works and publicly display this SOFTWARE without ! # charge, provided that this Notice and any statement of authorship are ! # reproduced on all copies. Neither the Government nor the University ! # makes any warranty, express or implied, or assumes any liability or ! # responsibility for the use of this SOFTWARE. # # If SOFTWARE is modified to produce derivative works, such modified # SOFTWARE should be clearly marked, so as not to confuse it with the Index: config/Shared/include1.mk =================================================================== RCS file: /home/pooma/Repository/r2/config/Shared/include1.mk,v retrieving revision 1.2 diff -c -p -r1.2 include1.mk *** config/Shared/include1.mk 1998/10/26 21:41:21 1.2 --- config/Shared/include1.mk 2001/10/13 02:25:43 *************** *** 10,21 **** # employee or employees of the University of California, operator of the # Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with # the U.S. Department of Energy. The U.S. Government has rights to use, ! # reproduce, and distribute this SOFTWARE, and to allow others to do so. ! # The public may copy and use this SOFTWARE, FOR NONCOMMERCIAL USE ONLY, ! # without charge, provided that this Notice and any statement of ! # authorship are reproduced on all copies. Neither the Government nor ! # the University makes any warranty, express or implied, or assumes any ! # liability or responsibility for the use of this SOFTWARE. # # If SOFTWARE is modified to produce derivative works, such modified # SOFTWARE should be clearly marked, so as not to confuse it with the --- 10,21 ---- # employee or employees of the University of California, operator of the # Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with # the U.S. Department of Energy. The U.S. Government has rights to use, ! # reproduce, and distribute this SOFTWARE. The public may copy, distribute, ! # prepare derivative works and publicly display this SOFTWARE without ! # charge, provided that this Notice and any statement of authorship are ! # reproduced on all copies. Neither the Government nor the University ! # makes any warranty, express or implied, or assumes any liability or ! # responsibility for the use of this SOFTWARE. # # If SOFTWARE is modified to produce derivative works, such modified # SOFTWARE should be clearly marked, so as not to confuse it with the Index: config/Shared/include2.mk =================================================================== RCS file: /home/pooma/Repository/r2/config/Shared/include2.mk,v retrieving revision 1.3 diff -c -p -r1.3 include2.mk *** config/Shared/include2.mk 1998/10/26 21:41:22 1.3 --- config/Shared/include2.mk 2001/10/13 02:25:43 *************** *** 10,21 **** # employee or employees of the University of California, operator of the # Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with # the U.S. Department of Energy. The U.S. Government has rights to use, ! # reproduce, and distribute this SOFTWARE, and to allow others to do so. ! # The public may copy and use this SOFTWARE, FOR NONCOMMERCIAL USE ONLY, ! # without charge, provided that this Notice and any statement of ! # authorship are reproduced on all copies. Neither the Government nor ! # the University makes any warranty, express or implied, or assumes any ! # liability or responsibility for the use of this SOFTWARE. # # If SOFTWARE is modified to produce derivative works, such modified # SOFTWARE should be clearly marked, so as not to confuse it with the --- 10,21 ---- # employee or employees of the University of California, operator of the # Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with # the U.S. Department of Energy. The U.S. Government has rights to use, ! # reproduce, and distribute this SOFTWARE. The public may copy, distribute, ! # prepare derivative works and publicly display this SOFTWARE without ! # charge, provided that this Notice and any statement of authorship are ! # reproduced on all copies. Neither the Government nor the University ! # makes any warranty, express or implied, or assumes any liability or ! # responsibility for the use of this SOFTWARE. # # If SOFTWARE is modified to produce derivative works, such modified # SOFTWARE should be clearly marked, so as not to confuse it with the Index: config/Shared/mm.pl =================================================================== RCS file: /home/pooma/Repository/r2/config/Shared/mm.pl,v retrieving revision 1.9 diff -c -p -r1.9 mm.pl *** config/Shared/mm.pl 1999/07/21 22:19:34 1.9 --- config/Shared/mm.pl 2001/10/13 02:25:43 *************** *** 10,21 **** # employee or employees of the University of California, operator of the # Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with # the U.S. Department of Energy. The U.S. Government has rights to use, ! # reproduce, and distribute this SOFTWARE, and to allow others to do so. ! # The public may copy and use this SOFTWARE, FOR NONCOMMERCIAL USE ONLY, ! # without charge, provided that this Notice and any statement of ! # authorship are reproduced on all copies. Neither the Government nor ! # the University makes any warranty, express or implied, or assumes any ! # liability or responsibility for the use of this SOFTWARE. # # If SOFTWARE is modified to produce derivative works, such modified # SOFTWARE should be clearly marked, so as not to confuse it with the --- 10,21 ---- # employee or employees of the University of California, operator of the # Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with # the U.S. Department of Energy. The U.S. Government has rights to use, ! # reproduce, and distribute this SOFTWARE. The public may copy, distribute, ! # prepare derivative works and publicly display this SOFTWARE without ! # charge, provided that this Notice and any statement of authorship are ! # reproduced on all copies. Neither the Government nor the University ! # makes any warranty, express or implied, or assumes any liability or ! # responsibility for the use of this SOFTWARE. # # If SOFTWARE is modified to produce derivative works, such modified # SOFTWARE should be clearly marked, so as not to confuse it with the Index: config/Shared/new.pl =================================================================== RCS file: /home/pooma/Repository/r2/config/Shared/new.pl,v retrieving revision 1.7 diff -c -p -r1.7 new.pl *** config/Shared/new.pl 1999/07/21 22:19:34 1.7 --- config/Shared/new.pl 2001/10/13 02:25:43 *************** *** 10,21 **** # employee or employees of the University of California, operator of the # Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with # the U.S. Department of Energy. The U.S. Government has rights to use, ! # reproduce, and distribute this SOFTWARE, and to allow others to do so. ! # The public may copy and use this SOFTWARE, FOR NONCOMMERCIAL USE ONLY, ! # without charge, provided that this Notice and any statement of ! # authorship are reproduced on all copies. Neither the Government nor ! # the University makes any warranty, express or implied, or assumes any ! # liability or responsibility for the use of this SOFTWARE. # # If SOFTWARE is modified to produce derivative works, such modified # SOFTWARE should be clearly marked, so as not to confuse it with the --- 10,21 ---- # employee or employees of the University of California, operator of the # Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with # the U.S. Department of Energy. The U.S. Government has rights to use, ! # reproduce, and distribute this SOFTWARE. The public may copy, distribute, ! # prepare derivative works and publicly display this SOFTWARE without ! # charge, provided that this Notice and any statement of authorship are ! # reproduced on all copies. Neither the Government nor the University ! # makes any warranty, express or implied, or assumes any liability or ! # responsibility for the use of this SOFTWARE. # # If SOFTWARE is modified to produce derivative works, such modified # SOFTWARE should be clearly marked, so as not to confuse it with the Index: config/Shared/noop =================================================================== RCS file: /home/pooma/Repository/r2/config/Shared/noop,v retrieving revision 1.2 diff -c -p -r1.2 noop *** config/Shared/noop 1998/10/26 21:41:25 1.2 --- config/Shared/noop 2001/10/13 02:25:43 *************** *** 10,21 **** # employee or employees of the University of California, operator of the # Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with # the U.S. Department of Energy. The U.S. Government has rights to use, ! # reproduce, and distribute this SOFTWARE, and to allow others to do so. ! # The public may copy and use this SOFTWARE, FOR NONCOMMERCIAL USE ONLY, ! # without charge, provided that this Notice and any statement of ! # authorship are reproduced on all copies. Neither the Government nor ! # the University makes any warranty, express or implied, or assumes any ! # liability or responsibility for the use of this SOFTWARE. # # If SOFTWARE is modified to produce derivative works, such modified # SOFTWARE should be clearly marked, so as not to confuse it with the --- 10,21 ---- # employee or employees of the University of California, operator of the # Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with # the U.S. Department of Energy. The U.S. Government has rights to use, ! # reproduce, and distribute this SOFTWARE. The public may copy, distribute, ! # prepare derivative works and publicly display this SOFTWARE without ! # charge, provided that this Notice and any statement of authorship are ! # reproduced on all copies. Neither the Government nor the University ! # makes any warranty, express or implied, or assumes any liability or ! # responsibility for the use of this SOFTWARE. # # If SOFTWARE is modified to produce derivative works, such modified # SOFTWARE should be clearly marked, so as not to confuse it with the Index: config/Shared/pretty.pl =================================================================== RCS file: /home/pooma/Repository/r2/config/Shared/pretty.pl,v retrieving revision 1.11 diff -c -p -r1.11 pretty.pl *** config/Shared/pretty.pl 2001/08/16 21:36:51 1.11 --- config/Shared/pretty.pl 2001/10/13 02:25:43 *************** *** 10,21 **** # employee or employees of the University of California, operator of the # Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with # the U.S. Department of Energy. The U.S. Government has rights to use, ! # reproduce, and distribute this SOFTWARE, and to allow others to do so. ! # The public may copy and use this SOFTWARE, FOR NONCOMMERCIAL USE ONLY, ! # without charge, provided that this Notice and any statement of ! # authorship are reproduced on all copies. Neither the Government nor ! # the University makes any warranty, express or implied, or assumes any ! # liability or responsibility for the use of this SOFTWARE. # # If SOFTWARE is modified to produce derivative works, such modified # SOFTWARE should be clearly marked, so as not to confuse it with the --- 10,21 ---- # employee or employees of the University of California, operator of the # Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with # the U.S. Department of Energy. The U.S. Government has rights to use, ! # reproduce, and distribute this SOFTWARE. The public may copy, distribute, ! # prepare derivative works and publicly display this SOFTWARE without ! # charge, provided that this Notice and any statement of authorship are ! # reproduced on all copies. Neither the Government nor the University ! # makes any warranty, express or implied, or assumes any liability or ! # responsibility for the use of this SOFTWARE. # # If SOFTWARE is modified to produce derivative works, such modified # SOFTWARE should be clearly marked, so as not to confuse it with the Index: config/Shared/showtimes.pl =================================================================== RCS file: /home/pooma/Repository/r2/config/Shared/showtimes.pl,v retrieving revision 1.7 diff -c -p -r1.7 showtimes.pl *** config/Shared/showtimes.pl 1999/07/21 22:19:35 1.7 --- config/Shared/showtimes.pl 2001/10/13 02:25:43 *************** *** 10,21 **** # employee or employees of the University of California, operator of the # Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with # the U.S. Department of Energy. The U.S. Government has rights to use, ! # reproduce, and distribute this SOFTWARE, and to allow others to do so. ! # The public may copy and use this SOFTWARE, FOR NONCOMMERCIAL USE ONLY, ! # without charge, provided that this Notice and any statement of ! # authorship are reproduced on all copies. Neither the Government nor ! # the University makes any warranty, express or implied, or assumes any ! # liability or responsibility for the use of this SOFTWARE. # # If SOFTWARE is modified to produce derivative works, such modified # SOFTWARE should be clearly marked, so as not to confuse it with the --- 10,21 ---- # employee or employees of the University of California, operator of the # Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with # the U.S. Department of Energy. The U.S. Government has rights to use, ! # reproduce, and distribute this SOFTWARE. The public may copy, distribute, ! # prepare derivative works and publicly display this SOFTWARE without ! # charge, provided that this Notice and any statement of authorship are ! # reproduced on all copies. Neither the Government nor the University ! # makes any warranty, express or implied, or assumes any liability or ! # responsibility for the use of this SOFTWARE. # # If SOFTWARE is modified to produce derivative works, such modified # SOFTWARE should be clearly marked, so as not to confuse it with the Index: config/Shared/tail.mk =================================================================== RCS file: /home/pooma/Repository/r2/config/Shared/tail.mk,v retrieving revision 1.18 diff -c -p -r1.18 tail.mk *** config/Shared/tail.mk 2000/04/25 17:18:04 1.18 --- config/Shared/tail.mk 2001/10/13 02:25:44 *************** *** 10,21 **** # employee or employees of the University of California, operator of the # Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with # the U.S. Department of Energy. The U.S. Government has rights to use, ! # reproduce, and distribute this SOFTWARE, and to allow others to do so. ! # The public may copy and use this SOFTWARE, FOR NONCOMMERCIAL USE ONLY, ! # without charge, provided that this Notice and any statement of ! # authorship are reproduced on all copies. Neither the Government nor ! # the University makes any warranty, express or implied, or assumes any ! # liability or responsibility for the use of this SOFTWARE. # # If SOFTWARE is modified to produce derivative works, such modified # SOFTWARE should be clearly marked, so as not to confuse it with the --- 10,21 ---- # employee or employees of the University of California, operator of the # Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with # the U.S. Department of Energy. The U.S. Government has rights to use, ! # reproduce, and distribute this SOFTWARE. The public may copy, distribute, ! # prepare derivative works and publicly display this SOFTWARE without ! # charge, provided that this Notice and any statement of authorship are ! # reproduced on all copies. Neither the Government nor the University ! # makes any warranty, express or implied, or assumes any liability or ! # responsibility for the use of this SOFTWARE. # # If SOFTWARE is modified to produce derivative works, such modified # SOFTWARE should be clearly marked, so as not to confuse it with the Index: config/Shared/user_.mk =================================================================== RCS file: /home/pooma/Repository/r2/config/Shared/user_.mk,v retrieving revision 1.2 diff -c -p -r1.2 user_.mk *** config/Shared/user_.mk 1998/10/26 21:41:31 1.2 --- config/Shared/user_.mk 2001/10/13 02:25:44 *************** *** 10,21 **** # employee or employees of the University of California, operator of the # Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with # the U.S. Department of Energy. The U.S. Government has rights to use, ! # reproduce, and distribute this SOFTWARE, and to allow others to do so. ! # The public may copy and use this SOFTWARE, FOR NONCOMMERCIAL USE ONLY, ! # without charge, provided that this Notice and any statement of ! # authorship are reproduced on all copies. Neither the Government nor ! # the University makes any warranty, express or implied, or assumes any ! # liability or responsibility for the use of this SOFTWARE. # # If SOFTWARE is modified to produce derivative works, such modified # SOFTWARE should be clearly marked, so as not to confuse it with the --- 10,21 ---- # employee or employees of the University of California, operator of the # Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with # the U.S. Department of Energy. The U.S. Government has rights to use, ! # reproduce, and distribute this SOFTWARE. The public may copy, distribute, ! # prepare derivative works and publicly display this SOFTWARE without ! # charge, provided that this Notice and any statement of authorship are ! # reproduced on all copies. Neither the Government nor the University ! # makes any warranty, express or implied, or assumes any liability or ! # responsibility for the use of this SOFTWARE. # # If SOFTWARE is modified to produce derivative works, such modified # SOFTWARE should be clearly marked, so as not to confuse it with the Index: config/Shared/variables.mk =================================================================== RCS file: /home/pooma/Repository/r2/config/Shared/variables.mk,v retrieving revision 1.6 diff -c -p -r1.6 variables.mk *** config/Shared/variables.mk 1999/04/26 23:36:59 1.6 --- config/Shared/variables.mk 2001/10/13 02:25:44 *************** *** 10,21 **** # employee or employees of the University of California, operator of the # Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with # the U.S. Department of Energy. The U.S. Government has rights to use, ! # reproduce, and distribute this SOFTWARE, and to allow others to do so. ! # The public may copy and use this SOFTWARE, FOR NONCOMMERCIAL USE ONLY, ! # without charge, provided that this Notice and any statement of ! # authorship are reproduced on all copies. Neither the Government nor ! # the University makes any warranty, express or implied, or assumes any ! # liability or responsibility for the use of this SOFTWARE. # # If SOFTWARE is modified to produce derivative works, such modified # SOFTWARE should be clearly marked, so as not to confuse it with the --- 10,21 ---- # employee or employees of the University of California, operator of the # Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with # the U.S. Department of Energy. The U.S. Government has rights to use, ! # reproduce, and distribute this SOFTWARE. The public may copy, distribute, ! # prepare derivative works and publicly display this SOFTWARE without ! # charge, provided that this Notice and any statement of authorship are ! # reproduced on all copies. Neither the Government nor the University ! # makes any warranty, express or implied, or assumes any liability or ! # responsibility for the use of this SOFTWARE. # # If SOFTWARE is modified to produce derivative works, such modified # SOFTWARE should be clearly marked, so as not to confuse it with the Index: config/arch/AIXKCC.conf =================================================================== RCS file: /home/pooma/Repository/r2/config/arch/AIXKCC.conf,v retrieving revision 1.3 diff -c -p -r1.3 AIXKCC.conf *** config/arch/AIXKCC.conf 2000/05/05 07:44:36 1.3 --- config/arch/AIXKCC.conf 2001/10/13 02:25:44 *************** *** 10,21 **** # employee or employees of the University of California, operator of the # Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with # the U.S. Department of Energy. The U.S. Government has rights to use, ! # reproduce, and distribute this SOFTWARE, and to allow others to do so. ! # The public may copy and use this SOFTWARE, FOR NONCOMMERCIAL USE ONLY, ! # without charge, provided that this Notice and any statement of ! # authorship are reproduced on all copies. Neither the Government nor ! # the University makes any warranty, express or implied, or assumes any ! # liability or responsibility for the use of this SOFTWARE. # # If SOFTWARE is modified to produce derivative works, such modified # SOFTWARE should be clearly marked, so as not to confuse it with the --- 10,21 ---- # employee or employees of the University of California, operator of the # Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with # the U.S. Department of Energy. The U.S. Government has rights to use, ! # reproduce, and distribute this SOFTWARE. The public may copy, distribute, ! # prepare derivative works and publicly display this SOFTWARE without ! # charge, provided that this Notice and any statement of authorship are ! # reproduced on all copies. Neither the Government nor the University ! # makes any warranty, express or implied, or assumes any liability or ! # responsibility for the use of this SOFTWARE. # # If SOFTWARE is modified to produce derivative works, such modified # SOFTWARE should be clearly marked, so as not to confuse it with the Index: config/arch/DECCXX.conf =================================================================== RCS file: /home/pooma/Repository/r2/config/arch/DECCXX.conf,v retrieving revision 1.10 diff -c -p -r1.10 DECCXX.conf *** config/arch/DECCXX.conf 2000/05/05 07:44:36 1.10 --- config/arch/DECCXX.conf 2001/10/13 02:25:44 *************** *** 10,21 **** # employee or employees of the University of California, operator of the # Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with # the U.S. Department of Energy. The U.S. Government has rights to use, ! # reproduce, and distribute this SOFTWARE, and to allow others to do so. ! # The public may copy and use this SOFTWARE, FOR NONCOMMERCIAL USE ONLY, ! # without charge, provided that this Notice and any statement of ! # authorship are reproduced on all copies. Neither the Government nor ! # the University makes any warranty, express or implied, or assumes any ! # liability or responsibility for the use of this SOFTWARE. # # If SOFTWARE is modified to produce derivative works, such modified # SOFTWARE should be clearly marked, so as not to confuse it with the --- 10,21 ---- # employee or employees of the University of California, operator of the # Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with # the U.S. Department of Energy. The U.S. Government has rights to use, ! # reproduce, and distribute this SOFTWARE. The public may copy, distribute, ! # prepare derivative works and publicly display this SOFTWARE without ! # charge, provided that this Notice and any statement of authorship are ! # reproduced on all copies. Neither the Government nor the University ! # makes any warranty, express or implied, or assumes any liability or ! # responsibility for the use of this SOFTWARE. # # If SOFTWARE is modified to produce derivative works, such modified # SOFTWARE should be clearly marked, so as not to confuse it with the Index: config/arch/DECEGCS.conf =================================================================== RCS file: /home/pooma/Repository/r2/config/arch/DECEGCS.conf,v retrieving revision 1.15 diff -c -p -r1.15 DECEGCS.conf *** config/arch/DECEGCS.conf 2000/05/05 07:44:36 1.15 --- config/arch/DECEGCS.conf 2001/10/13 02:25:44 *************** *** 10,21 **** # employee or employees of the University of California, operator of the # Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with # the U.S. Department of Energy. The U.S. Government has rights to use, ! # reproduce, and distribute this SOFTWARE, and to allow others to do so. ! # The public may copy and use this SOFTWARE, FOR NONCOMMERCIAL USE ONLY, ! # without charge, provided that this Notice and any statement of ! # authorship are reproduced on all copies. Neither the Government nor ! # the University makes any warranty, express or implied, or assumes any ! # liability or responsibility for the use of this SOFTWARE. # # If SOFTWARE is modified to produce derivative works, such modified # SOFTWARE should be clearly marked, so as not to confuse it with the --- 10,21 ---- # employee or employees of the University of California, operator of the # Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with # the U.S. Department of Energy. The U.S. Government has rights to use, ! # reproduce, and distribute this SOFTWARE. The public may copy, distribute, ! # prepare derivative works and publicly display this SOFTWARE without ! # charge, provided that this Notice and any statement of authorship are ! # reproduced on all copies. Neither the Government nor the University ! # makes any warranty, express or implied, or assumes any liability or ! # responsibility for the use of this SOFTWARE. # # If SOFTWARE is modified to produce derivative works, such modified # SOFTWARE should be clearly marked, so as not to confuse it with the Index: config/arch/LINUXEGCS.conf =================================================================== RCS file: /home/pooma/Repository/r2/config/arch/LINUXEGCS.conf,v retrieving revision 1.25 diff -c -p -r1.25 LINUXEGCS.conf *** config/arch/LINUXEGCS.conf 2001/10/06 00:19:00 1.25 --- config/arch/LINUXEGCS.conf 2001/10/13 02:25:44 *************** *** 10,21 **** # employee or employees of the University of California, operator of the # Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with # the U.S. Department of Energy. The U.S. Government has rights to use, ! # reproduce, and distribute this SOFTWARE, and to allow others to do so. ! # The public may copy and use this SOFTWARE, FOR NONCOMMERCIAL USE ONLY, ! # without charge, provided that this Notice and any statement of ! # authorship are reproduced on all copies. Neither the Government nor ! # the University makes any warranty, express or implied, or assumes any ! # liability or responsibility for the use of this SOFTWARE. # # If SOFTWARE is modified to produce derivative works, such modified # SOFTWARE should be clearly marked, so as not to confuse it with the --- 10,21 ---- # employee or employees of the University of California, operator of the # Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with # the U.S. Department of Energy. The U.S. Government has rights to use, ! # reproduce, and distribute this SOFTWARE. The public may copy, distribute, ! # prepare derivative works and publicly display this SOFTWARE without ! # charge, provided that this Notice and any statement of authorship are ! # reproduced on all copies. Neither the Government nor the University ! # makes any warranty, express or implied, or assumes any liability or ! # responsibility for the use of this SOFTWARE. # # If SOFTWARE is modified to produce derivative works, such modified # SOFTWARE should be clearly marked, so as not to confuse it with the Index: config/arch/LINUXKCC.conf =================================================================== RCS file: /home/pooma/Repository/r2/config/arch/LINUXKCC.conf,v retrieving revision 1.35 diff -c -p -r1.35 LINUXKCC.conf *** config/arch/LINUXKCC.conf 2001/10/06 00:19:00 1.35 --- config/arch/LINUXKCC.conf 2001/10/13 02:25:44 *************** *** 10,21 **** # employee or employees of the University of California, operator of the # Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with # the U.S. Department of Energy. The U.S. Government has rights to use, ! # reproduce, and distribute this SOFTWARE, and to allow others to do so. ! # The public may copy and use this SOFTWARE, FOR NONCOMMERCIAL USE ONLY, ! # without charge, provided that this Notice and any statement of ! # authorship are reproduced on all copies. Neither the Government nor ! # the University makes any warranty, express or implied, or assumes any ! # liability or responsibility for the use of this SOFTWARE. # # If SOFTWARE is modified to produce derivative works, such modified # SOFTWARE should be clearly marked, so as not to confuse it with the --- 10,21 ---- # employee or employees of the University of California, operator of the # Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with # the U.S. Department of Energy. The U.S. Government has rights to use, ! # reproduce, and distribute this SOFTWARE. The public may copy, distribute, ! # prepare derivative works and publicly display this SOFTWARE without ! # charge, provided that this Notice and any statement of authorship are ! # reproduced on all copies. Neither the Government nor the University ! # makes any warranty, express or implied, or assumes any liability or ! # responsibility for the use of this SOFTWARE. # # If SOFTWARE is modified to produce derivative works, such modified # SOFTWARE should be clearly marked, so as not to confuse it with the Index: config/arch/LINUXPGI.conf =================================================================== RCS file: /home/pooma/Repository/r2/config/arch/LINUXPGI.conf,v retrieving revision 1.6 diff -c -p -r1.6 LINUXPGI.conf *** config/arch/LINUXPGI.conf 2000/05/05 07:44:36 1.6 --- config/arch/LINUXPGI.conf 2001/10/13 02:25:44 *************** *** 10,21 **** # employee or employees of the University of California, operator of the # Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with # the U.S. Department of Energy. The U.S. Government has rights to use, ! # reproduce, and distribute this SOFTWARE, and to allow others to do so. ! # The public may copy and use this SOFTWARE, FOR NONCOMMERCIAL USE ONLY, ! # without charge, provided that this Notice and any statement of ! # authorship are reproduced on all copies. Neither the Government nor ! # the University makes any warranty, express or implied, or assumes any ! # liability or responsibility for the use of this SOFTWARE. # # If SOFTWARE is modified to produce derivative works, such modified # SOFTWARE should be clearly marked, so as not to confuse it with the --- 10,21 ---- # employee or employees of the University of California, operator of the # Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with # the U.S. Department of Energy. The U.S. Government has rights to use, ! # reproduce, and distribute this SOFTWARE. The public may copy, distribute, ! # prepare derivative works and publicly display this SOFTWARE without ! # charge, provided that this Notice and any statement of authorship are ! # reproduced on all copies. Neither the Government nor the University ! # makes any warranty, express or implied, or assumes any liability or ! # responsibility for the use of this SOFTWARE. # # If SOFTWARE is modified to produce derivative works, such modified # SOFTWARE should be clearly marked, so as not to confuse it with the Index: config/arch/LINUXgcc.conf =================================================================== RCS file: /home/pooma/Repository/r2/config/arch/LINUXgcc.conf,v retrieving revision 1.3 diff -c -p -r1.3 LINUXgcc.conf *** config/arch/LINUXgcc.conf 2001/10/06 00:19:00 1.3 --- config/arch/LINUXgcc.conf 2001/10/13 02:25:44 *************** *** 10,21 **** # employee or employees of the University of California, operator of the # Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with # the U.S. Department of Energy. The U.S. Government has rights to use, ! # reproduce, and distribute this SOFTWARE, and to allow others to do so. ! # The public may copy and use this SOFTWARE, FOR NONCOMMERCIAL USE ONLY, ! # without charge, provided that this Notice and any statement of ! # authorship are reproduced on all copies. Neither the Government nor ! # the University makes any warranty, express or implied, or assumes any ! # liability or responsibility for the use of this SOFTWARE. # # If SOFTWARE is modified to produce derivative works, such modified # SOFTWARE should be clearly marked, so as not to confuse it with the --- 10,21 ---- # employee or employees of the University of California, operator of the # Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with # the U.S. Department of Energy. The U.S. Government has rights to use, ! # reproduce, and distribute this SOFTWARE. The public may copy, distribute, ! # prepare derivative works and publicly display this SOFTWARE without ! # charge, provided that this Notice and any statement of authorship are ! # reproduced on all copies. Neither the Government nor the University ! # makes any warranty, express or implied, or assumes any liability or ! # responsibility for the use of this SOFTWARE. # # If SOFTWARE is modified to produce derivative works, such modified # SOFTWARE should be clearly marked, so as not to confuse it with the Index: config/arch/SGI64CC.conf =================================================================== RCS file: /home/pooma/Repository/r2/config/arch/SGI64CC.conf,v retrieving revision 1.42 diff -c -p -r1.42 SGI64CC.conf *** config/arch/SGI64CC.conf 2001/10/06 00:19:00 1.42 --- config/arch/SGI64CC.conf 2001/10/13 02:25:44 *************** *** 10,21 **** # employee or employees of the University of California, operator of the # Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with # the U.S. Department of Energy. The U.S. Government has rights to use, ! # reproduce, and distribute this SOFTWARE, and to allow others to do so. ! # The public may copy and use this SOFTWARE, FOR NONCOMMERCIAL USE ONLY, ! # without charge, provided that this Notice and any statement of ! # authorship are reproduced on all copies. Neither the Government nor ! # the University makes any warranty, express or implied, or assumes any ! # liability or responsibility for the use of this SOFTWARE. # # If SOFTWARE is modified to produce derivative works, such modified # SOFTWARE should be clearly marked, so as not to confuse it with the --- 10,21 ---- # employee or employees of the University of California, operator of the # Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with # the U.S. Department of Energy. The U.S. Government has rights to use, ! # reproduce, and distribute this SOFTWARE. The public may copy, distribute, ! # prepare derivative works and publicly display this SOFTWARE without ! # charge, provided that this Notice and any statement of authorship are ! # reproduced on all copies. Neither the Government nor the University ! # makes any warranty, express or implied, or assumes any liability or ! # responsibility for the use of this SOFTWARE. # # If SOFTWARE is modified to produce derivative works, such modified # SOFTWARE should be clearly marked, so as not to confuse it with the Index: config/arch/SGI64EGCS.conf =================================================================== RCS file: /home/pooma/Repository/r2/config/arch/SGI64EGCS.conf,v retrieving revision 1.40 diff -c -p -r1.40 SGI64EGCS.conf *** config/arch/SGI64EGCS.conf 2001/10/06 00:19:00 1.40 --- config/arch/SGI64EGCS.conf 2001/10/13 02:25:44 *************** *** 10,21 **** # employee or employees of the University of California, operator of the # Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with # the U.S. Department of Energy. The U.S. Government has rights to use, ! # reproduce, and distribute this SOFTWARE, and to allow others to do so. ! # The public may copy and use this SOFTWARE, FOR NONCOMMERCIAL USE ONLY, ! # without charge, provided that this Notice and any statement of ! # authorship are reproduced on all copies. Neither the Government nor ! # the University makes any warranty, express or implied, or assumes any ! # liability or responsibility for the use of this SOFTWARE. # # If SOFTWARE is modified to produce derivative works, such modified # SOFTWARE should be clearly marked, so as not to confuse it with the --- 10,21 ---- # employee or employees of the University of California, operator of the # Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with # the U.S. Department of Energy. The U.S. Government has rights to use, ! # reproduce, and distribute this SOFTWARE. The public may copy, distribute, ! # prepare derivative works and publicly display this SOFTWARE without ! # charge, provided that this Notice and any statement of authorship are ! # reproduced on all copies. Neither the Government nor the University ! # makes any warranty, express or implied, or assumes any liability or ! # responsibility for the use of this SOFTWARE. # # If SOFTWARE is modified to produce derivative works, such modified # SOFTWARE should be clearly marked, so as not to confuse it with the Index: config/arch/SGI64KCC.conf =================================================================== RCS file: /home/pooma/Repository/r2/config/arch/SGI64KCC.conf,v retrieving revision 1.53 diff -c -p -r1.53 SGI64KCC.conf *** config/arch/SGI64KCC.conf 2001/10/06 00:19:00 1.53 --- config/arch/SGI64KCC.conf 2001/10/13 02:25:44 *************** *** 10,21 **** # employee or employees of the University of California, operator of the # Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with # the U.S. Department of Energy. The U.S. Government has rights to use, ! # reproduce, and distribute this SOFTWARE, and to allow others to do so. ! # The public may copy and use this SOFTWARE, FOR NONCOMMERCIAL USE ONLY, ! # without charge, provided that this Notice and any statement of ! # authorship are reproduced on all copies. Neither the Government nor ! # the University makes any warranty, express or implied, or assumes any ! # liability or responsibility for the use of this SOFTWARE. # # If SOFTWARE is modified to produce derivative works, such modified # SOFTWARE should be clearly marked, so as not to confuse it with the --- 10,21 ---- # employee or employees of the University of California, operator of the # Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with # the U.S. Department of Energy. The U.S. Government has rights to use, ! # reproduce, and distribute this SOFTWARE. The public may copy, distribute, ! # prepare derivative works and publicly display this SOFTWARE without ! # charge, provided that this Notice and any statement of authorship are ! # reproduced on all copies. Neither the Government nor the University ! # makes any warranty, express or implied, or assumes any liability or ! # responsibility for the use of this SOFTWARE. # # If SOFTWARE is modified to produce derivative works, such modified # SOFTWARE should be clearly marked, so as not to confuse it with the Index: config/arch/SGI64gcc.conf =================================================================== RCS file: /home/pooma/Repository/r2/config/arch/SGI64gcc.conf,v retrieving revision 1.3 diff -c -p -r1.3 SGI64gcc.conf *** config/arch/SGI64gcc.conf 2001/10/06 00:19:00 1.3 --- config/arch/SGI64gcc.conf 2001/10/13 02:25:44 *************** *** 10,21 **** # employee or employees of the University of California, operator of the # Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with # the U.S. Department of Energy. The U.S. Government has rights to use, ! # reproduce, and distribute this SOFTWARE, and to allow others to do so. ! # The public may copy and use this SOFTWARE, FOR NONCOMMERCIAL USE ONLY, ! # without charge, provided that this Notice and any statement of ! # authorship are reproduced on all copies. Neither the Government nor ! # the University makes any warranty, express or implied, or assumes any ! # liability or responsibility for the use of this SOFTWARE. # # If SOFTWARE is modified to produce derivative works, such modified # SOFTWARE should be clearly marked, so as not to confuse it with the --- 10,21 ---- # employee or employees of the University of California, operator of the # Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with # the U.S. Department of Energy. The U.S. Government has rights to use, ! # reproduce, and distribute this SOFTWARE. The public may copy, distribute, ! # prepare derivative works and publicly display this SOFTWARE without ! # charge, provided that this Notice and any statement of authorship are ! # reproduced on all copies. Neither the Government nor the University ! # makes any warranty, express or implied, or assumes any liability or ! # responsibility for the use of this SOFTWARE. # # If SOFTWARE is modified to produce derivative works, such modified # SOFTWARE should be clearly marked, so as not to confuse it with the Index: config/arch/SGIN32CC.conf =================================================================== RCS file: /home/pooma/Repository/r2/config/arch/SGIN32CC.conf,v retrieving revision 1.44 diff -c -p -r1.44 SGIN32CC.conf *** config/arch/SGIN32CC.conf 2001/10/06 00:19:00 1.44 --- config/arch/SGIN32CC.conf 2001/10/13 02:25:44 *************** *** 10,21 **** # employee or employees of the University of California, operator of the # Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with # the U.S. Department of Energy. The U.S. Government has rights to use, ! # reproduce, and distribute this SOFTWARE, and to allow others to do so. ! # The public may copy and use this SOFTWARE, FOR NONCOMMERCIAL USE ONLY, ! # without charge, provided that this Notice and any statement of ! # authorship are reproduced on all copies. Neither the Government nor ! # the University makes any warranty, express or implied, or assumes any ! # liability or responsibility for the use of this SOFTWARE. # # If SOFTWARE is modified to produce derivative works, such modified # SOFTWARE should be clearly marked, so as not to confuse it with the --- 10,21 ---- # employee or employees of the University of California, operator of the # Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with # the U.S. Department of Energy. The U.S. Government has rights to use, ! # reproduce, and distribute this SOFTWARE. The public may copy, distribute, ! # prepare derivative works and publicly display this SOFTWARE without ! # charge, provided that this Notice and any statement of authorship are ! # reproduced on all copies. Neither the Government nor the University ! # makes any warranty, express or implied, or assumes any liability or ! # responsibility for the use of this SOFTWARE. # # If SOFTWARE is modified to produce derivative works, such modified # SOFTWARE should be clearly marked, so as not to confuse it with the Index: config/arch/SGIN32EGCS.conf =================================================================== RCS file: /home/pooma/Repository/r2/config/arch/SGIN32EGCS.conf,v retrieving revision 1.35 diff -c -p -r1.35 SGIN32EGCS.conf *** config/arch/SGIN32EGCS.conf 2001/10/06 00:19:00 1.35 --- config/arch/SGIN32EGCS.conf 2001/10/13 02:25:44 *************** *** 10,21 **** # employee or employees of the University of California, operator of the # Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with # the U.S. Department of Energy. The U.S. Government has rights to use, ! # reproduce, and distribute this SOFTWARE, and to allow others to do so. ! # The public may copy and use this SOFTWARE, FOR NONCOMMERCIAL USE ONLY, ! # without charge, provided that this Notice and any statement of ! # authorship are reproduced on all copies. Neither the Government nor ! # the University makes any warranty, express or implied, or assumes any ! # liability or responsibility for the use of this SOFTWARE. # # If SOFTWARE is modified to produce derivative works, such modified # SOFTWARE should be clearly marked, so as not to confuse it with the --- 10,21 ---- # employee or employees of the University of California, operator of the # Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with # the U.S. Department of Energy. The U.S. Government has rights to use, ! # reproduce, and distribute this SOFTWARE. The public may copy, distribute, ! # prepare derivative works and publicly display this SOFTWARE without ! # charge, provided that this Notice and any statement of authorship are ! # reproduced on all copies. Neither the Government nor the University ! # makes any warranty, express or implied, or assumes any liability or ! # responsibility for the use of this SOFTWARE. # # If SOFTWARE is modified to produce derivative works, such modified # SOFTWARE should be clearly marked, so as not to confuse it with the Index: config/arch/SGIN32KCC.conf =================================================================== RCS file: /home/pooma/Repository/r2/config/arch/SGIN32KCC.conf,v retrieving revision 1.44 diff -c -p -r1.44 SGIN32KCC.conf *** config/arch/SGIN32KCC.conf 2001/10/06 00:19:00 1.44 --- config/arch/SGIN32KCC.conf 2001/10/13 02:25:44 *************** *** 10,21 **** # employee or employees of the University of California, operator of the # Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with # the U.S. Department of Energy. The U.S. Government has rights to use, ! # reproduce, and distribute this SOFTWARE, and to allow others to do so. ! # The public may copy and u se this SOFTWARE, FOR NONCOMMERCIAL USE ONLY, ! # without charge, provided that this Notice and any statement of ! # authorship are reproduced on all copies. Neither the Government nor ! # the University makes any warranty, express or implied, or assumes any ! # liability or responsibility for the use of this SOFTWARE. # # If SOFTWARE is modified to produce derivative works, such modified # SOFTWARE should be clearly marked, so as not to confuse it with the --- 10,21 ---- # employee or employees of the University of California, operator of the # Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with # the U.S. Department of Energy. The U.S. Government has rights to use, ! # reproduce, and distribute this SOFTWARE. The public may copy, distribute, ! # prepare derivative works and publicly display this SOFTWARE without ! # charge, provided that this Notice and any statement of authorship are ! # reproduced on all copies. Neither the Government nor the University ! # makes any warranty, express or implied, or assumes any liability or ! # responsibility for the use of this SOFTWARE. # # If SOFTWARE is modified to produce derivative works, such modified # SOFTWARE should be clearly marked, so as not to confuse it with the Index: config/arch/SGIN32gcc.conf =================================================================== RCS file: /home/pooma/Repository/r2/config/arch/SGIN32gcc.conf,v retrieving revision 1.3 diff -c -p -r1.3 SGIN32gcc.conf *** config/arch/SGIN32gcc.conf 2001/10/06 00:19:00 1.3 --- config/arch/SGIN32gcc.conf 2001/10/13 02:25:44 *************** *** 10,21 **** # employee or employees of the University of California, operator of the # Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with # the U.S. Department of Energy. The U.S. Government has rights to use, ! # reproduce, and distribute this SOFTWARE, and to allow others to do so. ! # The public may copy and use this SOFTWARE, FOR NONCOMMERCIAL USE ONLY, ! # without charge, provided that this Notice and any statement of ! # authorship are reproduced on all copies. Neither the Government nor ! # the University makes any warranty, express or implied, or assumes any ! # liability or responsibility for the use of this SOFTWARE. # # If SOFTWARE is modified to produce derivative works, such modified # SOFTWARE should be clearly marked, so as not to confuse it with the --- 10,21 ---- # employee or employees of the University of California, operator of the # Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with # the U.S. Department of Energy. The U.S. Government has rights to use, ! # reproduce, and distribute this SOFTWARE. The public may copy, distribute, ! # prepare derivative works and publicly display this SOFTWARE without ! # charge, provided that this Notice and any statement of authorship are ! # reproduced on all copies. Neither the Government nor the University ! # makes any warranty, express or implied, or assumes any liability or ! # responsibility for the use of this SOFTWARE. # # If SOFTWARE is modified to produce derivative works, such modified # SOFTWARE should be clearly marked, so as not to confuse it with the Index: config/arch/SUNEGCS.conf =================================================================== RCS file: /home/pooma/Repository/r2/config/arch/SUNEGCS.conf,v retrieving revision 1.12 diff -c -p -r1.12 SUNEGCS.conf *** config/arch/SUNEGCS.conf 2000/05/05 07:44:37 1.12 --- config/arch/SUNEGCS.conf 2001/10/13 02:25:44 *************** *** 10,21 **** # employee or employees of the University of California, operator of the # Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with # the U.S. Department of Energy. The U.S. Government has rights to use, ! # reproduce, and distribute this SOFTWARE, and to allow others to do so. ! # The public may copy and use this SOFTWARE, FOR NONCOMMERCIAL USE ONLY, ! # without charge, provided that this Notice and any statement of ! # authorship are reproduced on all copies. Neither the Government nor ! # the University makes any warranty, express or implied, or assumes any ! # liability or responsibility for the use of this SOFTWARE. # # If SOFTWARE is modified to produce derivative works, such modified # SOFTWARE should be clearly marked, so as not to confuse it with the --- 10,21 ---- # employee or employees of the University of California, operator of the # Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with # the U.S. Department of Energy. The U.S. Government has rights to use, ! # reproduce, and distribute this SOFTWARE. The public may copy, distribute, ! # prepare derivative works and publicly display this SOFTWARE without ! # charge, provided that this Notice and any statement of authorship are ! # reproduced on all copies. Neither the Government nor the University ! # makes any warranty, express or implied, or assumes any liability or ! # responsibility for the use of this SOFTWARE. # # If SOFTWARE is modified to produce derivative works, such modified # SOFTWARE should be clearly marked, so as not to confuse it with the Index: config/arch/SUNKCC.conf =================================================================== RCS file: /home/pooma/Repository/r2/config/arch/SUNKCC.conf,v retrieving revision 1.8 diff -c -p -r1.8 SUNKCC.conf *** config/arch/SUNKCC.conf 2001/10/06 00:19:00 1.8 --- config/arch/SUNKCC.conf 2001/10/13 02:25:44 *************** *** 10,21 **** # employee or employees of the University of California, operator of the # Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with # the U.S. Department of Energy. The U.S. Government has rights to use, ! # reproduce, and distribute this SOFTWARE, and to allow others to do so. ! # The public may copy and use this SOFTWARE, FOR NONCOMMERCIAL USE ONLY, ! # without charge, provided that this Notice and any statement of ! # authorship are reproduced on all copies. Neither the Government nor ! # the University makes any warranty, express or implied, or assumes any ! # liability or responsibility for the use of this SOFTWARE. # # If SOFTWARE is modified to produce derivative works, such modified # SOFTWARE should be clearly marked, so as not to confuse it with the --- 10,21 ---- # employee or employees of the University of California, operator of the # Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with # the U.S. Department of Energy. The U.S. Government has rights to use, ! # reproduce, and distribute this SOFTWARE. The public may copy, distribute, ! # prepare derivative works and publicly display this SOFTWARE without ! # charge, provided that this Notice and any statement of authorship are ! # reproduced on all copies. Neither the Government nor the University ! # makes any warranty, express or implied, or assumes any liability or ! # responsibility for the use of this SOFTWARE. # # If SOFTWARE is modified to produce derivative works, such modified # SOFTWARE should be clearly marked, so as not to confuse it with the Index: config/arch/SUNgcc.conf =================================================================== RCS file: /home/pooma/Repository/r2/config/arch/SUNgcc.conf,v retrieving revision 1.1 diff -c -p -r1.1 SUNgcc.conf *** config/arch/SUNgcc.conf 2001/03/21 00:45:21 1.1 --- config/arch/SUNgcc.conf 2001/10/13 02:25:44 *************** *** 10,21 **** # employee or employees of the University of California, operator of the # Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with # the U.S. Department of Energy. The U.S. Government has rights to use, ! # reproduce, and distribute this SOFTWARE, and to allow others to do so. ! # The public may copy and use this SOFTWARE, FOR NONCOMMERCIAL USE ONLY, ! # without charge, provided that this Notice and any statement of ! # authorship are reproduced on all copies. Neither the Government nor ! # the University makes any warranty, express or implied, or assumes any ! # liability or responsibility for the use of this SOFTWARE. # # If SOFTWARE is modified to produce derivative works, such modified # SOFTWARE should be clearly marked, so as not to confuse it with the --- 10,21 ---- # employee or employees of the University of California, operator of the # Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with # the U.S. Department of Energy. The U.S. Government has rights to use, ! # reproduce, and distribute this SOFTWARE. The public may copy, distribute, ! # prepare derivative works and publicly display this SOFTWARE without ! # charge, provided that this Notice and any statement of authorship are ! # reproduced on all copies. Neither the Government nor the University ! # makes any warranty, express or implied, or assumes any liability or ! # responsibility for the use of this SOFTWARE. # # If SOFTWARE is modified to produce derivative works, such modified # SOFTWARE should be clearly marked, so as not to confuse it with the Index: config/arch/T3EKCC.conf =================================================================== RCS file: /home/pooma/Repository/r2/config/arch/T3EKCC.conf,v retrieving revision 1.4 diff -c -p -r1.4 T3EKCC.conf *** config/arch/T3EKCC.conf 2000/05/05 07:44:37 1.4 --- config/arch/T3EKCC.conf 2001/10/13 02:25:44 *************** *** 10,21 **** # employee or employees of the University of California, operator of the # Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with # the U.S. Department of Energy. The U.S. Government has rights to use, ! # reproduce, and distribute this SOFTWARE, and to allow others to do so. ! # The public may copy and use this SOFTWARE, FOR NONCOMMERCIAL USE ONLY, ! # without charge, provided that this Notice and any statement of ! # authorship are reproduced on all copies. Neither the Government nor ! # the University makes any warranty, express or implied, or assumes any ! # liability or responsibility for the use of this SOFTWARE. # # If SOFTWARE is modified to produce derivative works, such modified # SOFTWARE should be clearly marked, so as not to confuse it with the --- 10,21 ---- # employee or employees of the University of California, operator of the # Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with # the U.S. Department of Energy. The U.S. Government has rights to use, ! # reproduce, and distribute this SOFTWARE. The public may copy, distribute, ! # prepare derivative works and publicly display this SOFTWARE without ! # charge, provided that this Notice and any statement of authorship are ! # reproduced on all copies. Neither the Government nor the University ! # makes any warranty, express or implied, or assumes any liability or ! # responsibility for the use of this SOFTWARE. # # If SOFTWARE is modified to produce derivative works, such modified # SOFTWARE should be clearly marked, so as not to confuse it with the Index: config/arch/WILDFIRECXX.conf =================================================================== RCS file: /home/pooma/Repository/r2/config/arch/WILDFIRECXX.conf,v retrieving revision 1.1 diff -c -p -r1.1 WILDFIRECXX.conf *** config/arch/WILDFIRECXX.conf 2000/10/23 19:04:54 1.1 --- config/arch/WILDFIRECXX.conf 2001/10/13 02:25:44 *************** *** 10,21 **** # employee or employees of the University of California, operator of the # Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with # the U.S. Department of Energy. The U.S. Government has rights to use, ! # reproduce, and distribute this SOFTWARE, and to allow others to do so. ! # The public may copy and use this SOFTWARE, FOR NONCOMMERCIAL USE ONLY, ! # without charge, provided that this Notice and any statement of ! # authorship are reproduced on all copies. Neither the Government nor ! # the University makes any warranty, express or implied, or assumes any ! # liability or responsibility for the use of this SOFTWARE. # # If SOFTWARE is modified to produce derivative works, such modified # SOFTWARE should be clearly marked, so as not to confuse it with the --- 10,21 ---- # employee or employees of the University of California, operator of the # Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with # the U.S. Department of Energy. The U.S. Government has rights to use, ! # reproduce, and distribute this SOFTWARE. The public may copy, distribute, ! # prepare derivative works and publicly display this SOFTWARE without ! # charge, provided that this Notice and any statement of authorship are ! # reproduced on all copies. Neither the Government nor the University ! # makes any warranty, express or implied, or assumes any liability or ! # responsibility for the use of this SOFTWARE. # # If SOFTWARE is modified to produce derivative works, such modified # SOFTWARE should be clearly marked, so as not to confuse it with the Index: config/arch/WILDFIREEGCS.conf =================================================================== RCS file: /home/pooma/Repository/r2/config/arch/WILDFIREEGCS.conf,v retrieving revision 1.1 diff -c -p -r1.1 WILDFIREEGCS.conf *** config/arch/WILDFIREEGCS.conf 2000/10/23 19:04:55 1.1 --- config/arch/WILDFIREEGCS.conf 2001/10/13 02:25:44 *************** *** 10,21 **** # employee or employees of the University of California, operator of the # Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with # the U.S. Department of Energy. The U.S. Government has rights to use, ! # reproduce, and distribute this SOFTWARE, and to allow others to do so. ! # The public may copy and use this SOFTWARE, FOR NONCOMMERCIAL USE ONLY, ! # without charge, provided that this Notice and any statement of ! # authorship are reproduced on all copies. Neither the Government nor ! # the University makes any warranty, express or implied, or assumes any ! # liability or responsibility for the use of this SOFTWARE. # # If SOFTWARE is modified to produce derivative works, such modified # SOFTWARE should be clearly marked, so as not to confuse it with the --- 10,21 ---- # employee or employees of the University of California, operator of the # Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with # the U.S. Department of Energy. The U.S. Government has rights to use, ! # reproduce, and distribute this SOFTWARE. The public may copy, distribute, ! # prepare derivative works and publicly display this SOFTWARE without ! # charge, provided that this Notice and any statement of authorship are ! # reproduced on all copies. Neither the Government nor the University ! # makes any warranty, express or implied, or assumes any liability or ! # responsibility for the use of this SOFTWARE. # # If SOFTWARE is modified to produce derivative works, such modified # SOFTWARE should be clearly marked, so as not to confuse it with the Index: docs/legal.html =================================================================== RCS file: /home/pooma/Repository/r2/docs/legal.html,v retrieving revision 1.1 diff -c -p -r1.1 legal.html *** docs/legal.html 2001/03/19 16:11:13 1.1 --- docs/legal.html 2001/10/13 02:25:45 *************** approved for release with associated LA- *** 21,32 **** employee or employees of the University of California, operator of the Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with the U.S. Department of Energy. The U.S. Government has rights to use, ! reproduce, and distribute this SOFTWARE, and to allow others to do so. ! The public may copy and use this SOFTWARE, FOR NONCOMMERCIAL USE ONLY, ! without charge, provided that this Notice and any statement of ! authorship are reproduced on all copies. Neither the Government nor ! the University makes any warranty, express or implied, or assumes any ! liability or responsibility for the use of this SOFTWARE.

If SOFTWARE is modified to produce derivative works, such modified SOFTWARE should be clearly marked, so as not to confuse it with the --- 21,32 ---- employee or employees of the University of California, operator of the Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with the U.S. Department of Energy. The U.S. Government has rights to use, ! reproduce, and distribute this SOFTWARE. The public may copy, distribute, ! prepare derivative works and publicly display this SOFTWARE without ! charge, provided that this Notice and any statement of authorship are ! reproduced on all copies. Neither the Government nor the University ! makes any warranty, express or implied, or assumes any liability or ! responsibility for the use of this SOFTWARE.

If SOFTWARE is modified to produce derivative works, such modified SOFTWARE should be clearly marked, so as not to confuse it with the Index: examples/Solvers/BlockDecomposed/FivePoint/FivePoint.h =================================================================== RCS file: /home/pooma/Repository/r2/examples/Solvers/BlockDecomposed/FivePoint/FivePoint.h,v retrieving revision 1.1 diff -c -p -r1.1 FivePoint.h *** examples/Solvers/BlockDecomposed/FivePoint/FivePoint.h 2000/07/27 16:10:47 1.1 --- examples/Solvers/BlockDecomposed/FivePoint/FivePoint.h 2001/10/13 02:25:45 *************** *** 10,21 **** // employee or employees of the University of California, operator of the // Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with // the U.S. Department of Energy. The U.S. Government has rights to use, ! // reproduce, and distribute this SOFTWARE, and to allow others to do so. ! // The public may copy and use this SOFTWARE, FOR NONCOMMERCIAL USE ONLY, ! // without charge, provided that this Notice and any statement of ! // authorship are reproduced on all copies. Neither the Government nor ! // the University makes any warranty, express or implied, or assumes any ! // liability or responsibility for the use of this SOFTWARE. // // If SOFTWARE is modified to produce derivative works, such modified // SOFTWARE should be clearly marked, so as not to confuse it with the --- 10,21 ---- // employee or employees of the University of California, operator of the // Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with // the U.S. Department of Energy. The U.S. Government has rights to use, ! // reproduce, and distribute this SOFTWARE. The public may copy, distribute, ! // prepare derivative works and publicly display this SOFTWARE without ! // charge, provided that this Notice and any statement of authorship are ! // reproduced on all copies. Neither the Government nor the University ! // makes any warranty, express or implied, or assumes any liability or ! // responsibility for the use of this SOFTWARE. // // If SOFTWARE is modified to produce derivative works, such modified // SOFTWARE should be clearly marked, so as not to confuse it with the Index: examples/Solvers/BlockDecomposed/FivePoint/FivePointIC0Stencil.h =================================================================== RCS file: /home/pooma/Repository/r2/examples/Solvers/BlockDecomposed/FivePoint/FivePointIC0Stencil.h,v retrieving revision 1.1 diff -c -p -r1.1 FivePointIC0Stencil.h *** examples/Solvers/BlockDecomposed/FivePoint/FivePointIC0Stencil.h 2000/07/27 16:10:47 1.1 --- examples/Solvers/BlockDecomposed/FivePoint/FivePointIC0Stencil.h 2001/10/13 02:25:45 *************** *** 10,21 **** // employee or employees of the University of California, operator of the // Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with // the U.S. Department of Energy. The U.S. Government has rights to use, ! // reproduce, and distribute this SOFTWARE, and to allow others to do so. ! // The public may copy and use this SOFTWARE, FOR NONCOMMERCIAL USE ONLY, ! // without charge, provided that this Notice and any statement of ! // authorship are reproduced on all copies. Neither the Government nor ! // the University makes any warranty, express or implied, or assumes any ! // liability or responsibility for the use of this SOFTWARE. // // If SOFTWARE is modified to produce derivative works, such modified // SOFTWARE should be clearly marked, so as not to confuse it with the --- 10,21 ---- // employee or employees of the University of California, operator of the // Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with // the U.S. Department of Energy. The U.S. Government has rights to use, ! // reproduce, and distribute this SOFTWARE. The public may copy, distribute, ! // prepare derivative works and publicly display this SOFTWARE without ! // charge, provided that this Notice and any statement of authorship are ! // reproduced on all copies. Neither the Government nor the University ! // makes any warranty, express or implied, or assumes any liability or ! // responsibility for the use of this SOFTWARE. // // If SOFTWARE is modified to produce derivative works, such modified // SOFTWARE should be clearly marked, so as not to confuse it with the Index: examples/Solvers/BlockDecomposed/FivePoint/FivePointIC1Stencil.h =================================================================== RCS file: /home/pooma/Repository/r2/examples/Solvers/BlockDecomposed/FivePoint/FivePointIC1Stencil.h,v retrieving revision 1.1 diff -c -p -r1.1 FivePointIC1Stencil.h *** examples/Solvers/BlockDecomposed/FivePoint/FivePointIC1Stencil.h 2000/07/27 16:10:47 1.1 --- examples/Solvers/BlockDecomposed/FivePoint/FivePointIC1Stencil.h 2001/10/13 02:25:45 *************** *** 10,21 **** // employee or employees of the University of California, operator of the // Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with // the U.S. Department of Energy. The U.S. Government has rights to use, ! // reproduce, and distribute this SOFTWARE, and to allow others to do so. ! // The public may copy and use this SOFTWARE, FOR NONCOMMERCIAL USE ONLY, ! // without charge, provided that this Notice and any statement of ! // authorship are reproduced on all copies. Neither the Government nor ! // the University makes any warranty, express or implied, or assumes any ! // liability or responsibility for the use of this SOFTWARE. // // If SOFTWARE is modified to produce derivative works, such modified // SOFTWARE should be clearly marked, so as not to confuse it with the --- 10,21 ---- // employee or employees of the University of California, operator of the // Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with // the U.S. Department of Energy. The U.S. Government has rights to use, ! // reproduce, and distribute this SOFTWARE. The public may copy, distribute, ! // prepare derivative works and publicly display this SOFTWARE without ! // charge, provided that this Notice and any statement of authorship are ! // reproduced on all copies. Neither the Government nor the University ! // makes any warranty, express or implied, or assumes any liability or ! // responsibility for the use of this SOFTWARE. // // If SOFTWARE is modified to produce derivative works, such modified // SOFTWARE should be clearly marked, so as not to confuse it with the Index: examples/Solvers/BlockDecomposed/FivePoint/include.mk =================================================================== RCS file: /home/pooma/Repository/r2/examples/Solvers/BlockDecomposed/FivePoint/include.mk,v retrieving revision 1.1 diff -c -p -r1.1 include.mk *** examples/Solvers/BlockDecomposed/FivePoint/include.mk 2000/07/27 16:10:48 1.1 --- examples/Solvers/BlockDecomposed/FivePoint/include.mk 2001/10/13 02:25:45 *************** *** 10,21 **** # employee or employees of the University of California, operator of the # Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with # the U.S. Department of Energy. The U.S. Government has rights to use, ! # reproduce, and distribute this SOFTWARE, and to allow others to do so. ! # The public may copy and use this SOFTWARE, FOR NONCOMMERCIAL USE ONLY, ! # without charge, provided that this Notice and any statement of ! # authorship are reproduced on all copies. Neither the Government nor ! # the University makes any warranty, express or implied, or assumes any ! # liability or responsibility for the use of this SOFTWARE. # # If SOFTWARE is modified to produce derivative works, such modified # SOFTWARE should be clearly marked, so as not to confuse it with the --- 10,21 ---- # employee or employees of the University of California, operator of the # Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with # the U.S. Department of Energy. The U.S. Government has rights to use, ! # reproduce, and distribute this SOFTWARE. The public may copy, distribute, ! # prepare derivative works and publicly display this SOFTWARE without ! # charge, provided that this Notice and any statement of authorship are ! # reproduced on all copies. Neither the Government nor the University ! # makes any warranty, express or implied, or assumes any liability or ! # responsibility for the use of this SOFTWARE. # # If SOFTWARE is modified to produce derivative works, such modified # SOFTWARE should be clearly marked, so as not to confuse it with the Index: examples/Solvers/BlockDecomposed/FivePoint/makefile =================================================================== RCS file: /home/pooma/Repository/r2/examples/Solvers/BlockDecomposed/FivePoint/makefile,v retrieving revision 1.2 diff -c -p -r1.2 makefile *** examples/Solvers/BlockDecomposed/FivePoint/makefile 2000/07/27 22:32:27 1.2 --- examples/Solvers/BlockDecomposed/FivePoint/makefile 2001/10/13 02:25:45 *************** *** 10,21 **** # employee or employees of the University of California, operator of the # Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with # the U.S. Department of Energy. The U.S. Government has rights to use, ! # reproduce, and distribute this SOFTWARE, and to allow others to do so. ! # The public may copy and use this SOFTWARE, FOR NONCOMMERCIAL USE ONLY, ! # without charge, provided that this Notice and any statement of ! # authorship are reproduced on all copies. Neither the Government nor ! # the University makes any warranty, express or implied, or assumes any ! # liability or responsibility for the use of this SOFTWARE. # # If SOFTWARE is modified to produce derivative works, such modified # SOFTWARE should be clearly marked, so as not to confuse it with the --- 10,21 ---- # employee or employees of the University of California, operator of the # Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with # the U.S. Department of Energy. The U.S. Government has rights to use, ! # reproduce, and distribute this SOFTWARE. The public may copy, distribute, ! # prepare derivative works and publicly display this SOFTWARE without ! # charge, provided that this Notice and any statement of authorship are ! # reproduced on all copies. Neither the Government nor the University ! # makes any warranty, express or implied, or assumes any liability or ! # responsibility for the use of this SOFTWARE. # # If SOFTWARE is modified to produce derivative works, such modified # SOFTWARE should be clearly marked, so as not to confuse it with the Index: examples/Solvers/BlockDecomposed/NinePoint/NinePoint.h =================================================================== RCS file: /home/pooma/Repository/r2/examples/Solvers/BlockDecomposed/NinePoint/NinePoint.h,v retrieving revision 1.1 diff -c -p -r1.1 NinePoint.h *** examples/Solvers/BlockDecomposed/NinePoint/NinePoint.h 2000/07/27 22:36:34 1.1 --- examples/Solvers/BlockDecomposed/NinePoint/NinePoint.h 2001/10/13 02:25:45 *************** *** 10,21 **** // employee or employees of the University of California, operator of the // Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with // the U.S. Department of Energy. The U.S. Government has rights to use, ! // reproduce, and distribute this SOFTWARE, and to allow others to do so. ! // The public may copy and use this SOFTWARE, FOR NONCOMMERCIAL USE ONLY, ! // without charge, provided that this Notice and any statement of ! // authorship are reproduced on all copies. Neither the Government nor ! // the University makes any warranty, express or implied, or assumes any ! // liability or responsibility for the use of this SOFTWARE. // // If SOFTWARE is modified to produce derivative works, such modified // SOFTWARE should be clearly marked, so as not to confuse it with the --- 10,21 ---- // employee or employees of the University of California, operator of the // Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with // the U.S. Department of Energy. The U.S. Government has rights to use, ! // reproduce, and distribute this SOFTWARE. The public may copy, distribute, ! // prepare derivative works and publicly display this SOFTWARE without ! // charge, provided that this Notice and any statement of authorship are ! // reproduced on all copies. Neither the Government nor the University ! // makes any warranty, express or implied, or assumes any liability or ! // responsibility for the use of this SOFTWARE. // // If SOFTWARE is modified to produce derivative works, such modified // SOFTWARE should be clearly marked, so as not to confuse it with the Index: examples/Solvers/BlockDecomposed/NinePoint/NinePointIC0Stencil.h =================================================================== RCS file: /home/pooma/Repository/r2/examples/Solvers/BlockDecomposed/NinePoint/NinePointIC0Stencil.h,v retrieving revision 1.1 diff -c -p -r1.1 NinePointIC0Stencil.h *** examples/Solvers/BlockDecomposed/NinePoint/NinePointIC0Stencil.h 2000/07/27 22:36:34 1.1 --- examples/Solvers/BlockDecomposed/NinePoint/NinePointIC0Stencil.h 2001/10/13 02:25:45 *************** *** 10,21 **** // employee or employees of the University of California, operator of the // Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with // the U.S. Department of Energy. The U.S. Government has rights to use, ! // reproduce, and distribute this SOFTWARE, and to allow others to do so. ! // The public may copy and use this SOFTWARE, FOR NONCOMMERCIAL USE ONLY, ! // without charge, provided that this Notice and any statement of ! // authorship are reproduced on all copies. Neither the Government nor ! // the University makes any warranty, express or implied, or assumes any ! // liability or responsibility for the use of this SOFTWARE. // // If SOFTWARE is modified to produce derivative works, such modified // SOFTWARE should be clearly marked, so as not to confuse it with the --- 10,21 ---- // employee or employees of the University of California, operator of the // Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with // the U.S. Department of Energy. The U.S. Government has rights to use, ! // reproduce, and distribute this SOFTWARE. The public may copy, distribute, ! // prepare derivative works and publicly display this SOFTWARE without ! // charge, provided that this Notice and any statement of authorship are ! // reproduced on all copies. Neither the Government nor the University ! // makes any warranty, express or implied, or assumes any liability or ! // responsibility for the use of this SOFTWARE. // // If SOFTWARE is modified to produce derivative works, such modified // SOFTWARE should be clearly marked, so as not to confuse it with the Index: examples/Solvers/BlockDecomposed/NinePoint/NinePointIC1Stencil.h =================================================================== RCS file: /home/pooma/Repository/r2/examples/Solvers/BlockDecomposed/NinePoint/NinePointIC1Stencil.h,v retrieving revision 1.1 diff -c -p -r1.1 NinePointIC1Stencil.h *** examples/Solvers/BlockDecomposed/NinePoint/NinePointIC1Stencil.h 2000/07/27 22:36:34 1.1 --- examples/Solvers/BlockDecomposed/NinePoint/NinePointIC1Stencil.h 2001/10/13 02:25:45 *************** *** 10,21 **** // employee or employees of the University of California, operator of the // Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with // the U.S. Department of Energy. The U.S. Government has rights to use, ! // reproduce, and distribute this SOFTWARE, and to allow others to do so. ! // The public may copy and use this SOFTWARE, FOR NONCOMMERCIAL USE ONLY, ! // without charge, provided that this Notice and any statement of ! // authorship are reproduced on all copies. Neither the Government nor ! // the University makes any warranty, express or implied, or assumes any ! // liability or responsibility for the use of this SOFTWARE. // // If SOFTWARE is modified to produce derivative works, such modified // SOFTWARE should be clearly marked, so as not to confuse it with the --- 10,21 ---- // employee or employees of the University of California, operator of the // Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with // the U.S. Department of Energy. The U.S. Government has rights to use, ! // reproduce, and distribute this SOFTWARE. The public may copy, distribute, ! // prepare derivative works and publicly display this SOFTWARE without ! // charge, provided that this Notice and any statement of authorship are ! // reproduced on all copies. Neither the Government nor the University ! // makes any warranty, express or implied, or assumes any liability or ! // responsibility for the use of this SOFTWARE. // // If SOFTWARE is modified to produce derivative works, such modified // SOFTWARE should be clearly marked, so as not to confuse it with the Index: examples/Solvers/BlockDecomposed/NinePoint/include.mk =================================================================== RCS file: /home/pooma/Repository/r2/examples/Solvers/BlockDecomposed/NinePoint/include.mk,v retrieving revision 1.1 diff -c -p -r1.1 include.mk *** examples/Solvers/BlockDecomposed/NinePoint/include.mk 2000/07/27 22:36:35 1.1 --- examples/Solvers/BlockDecomposed/NinePoint/include.mk 2001/10/13 02:25:45 *************** *** 10,21 **** # employee or employees of the University of California, operator of the # Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with # the U.S. Department of Energy. The U.S. Government has rights to use, ! # reproduce, and distribute this SOFTWARE, and to allow others to do so. ! # The public may copy and use this SOFTWARE, FOR NONCOMMERCIAL USE ONLY, ! # without charge, provided that this Notice and any statement of ! # authorship are reproduced on all copies. Neither the Government nor ! # the University makes any warranty, express or implied, or assumes any ! # liability or responsibility for the use of this SOFTWARE. # # If SOFTWARE is modified to produce derivative works, such modified # SOFTWARE should be clearly marked, so as not to confuse it with the --- 10,21 ---- # employee or employees of the University of California, operator of the # Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with # the U.S. Department of Energy. The U.S. Government has rights to use, ! # reproduce, and distribute this SOFTWARE. The public may copy, distribute, ! # prepare derivative works and publicly display this SOFTWARE without ! # charge, provided that this Notice and any statement of authorship are ! # reproduced on all copies. Neither the Government nor the University ! # makes any warranty, express or implied, or assumes any liability or ! # responsibility for the use of this SOFTWARE. # # If SOFTWARE is modified to produce derivative works, such modified # SOFTWARE should be clearly marked, so as not to confuse it with the Index: examples/Solvers/BlockDecomposed/NinePoint/makefile =================================================================== RCS file: /home/pooma/Repository/r2/examples/Solvers/BlockDecomposed/NinePoint/makefile,v retrieving revision 1.1 diff -c -p -r1.1 makefile *** examples/Solvers/BlockDecomposed/NinePoint/makefile 2000/07/27 22:36:35 1.1 --- examples/Solvers/BlockDecomposed/NinePoint/makefile 2001/10/13 02:25:45 *************** *** 10,21 **** # employee or employees of the University of California, operator of the # Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with # the U.S. Department of Energy. The U.S. Government has rights to use, ! # reproduce, and distribute this SOFTWARE, and to allow others to do so. ! # The public may copy and use this SOFTWARE, FOR NONCOMMERCIAL USE ONLY, ! # without charge, provided that this Notice and any statement of ! # authorship are reproduced on all copies. Neither the Government nor ! # the University makes any warranty, express or implied, or assumes any ! # liability or responsibility for the use of this SOFTWARE. # # If SOFTWARE is modified to produce derivative works, such modified # SOFTWARE should be clearly marked, so as not to confuse it with the --- 10,21 ---- # employee or employees of the University of California, operator of the # Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with # the U.S. Department of Energy. The U.S. Government has rights to use, ! # reproduce, and distribute this SOFTWARE. The public may copy, distribute, ! # prepare derivative works and publicly display this SOFTWARE without ! # charge, provided that this Notice and any statement of authorship are ! # reproduced on all copies. Neither the Government nor the University ! # makes any warranty, express or implied, or assumes any liability or ! # responsibility for the use of this SOFTWARE. # # If SOFTWARE is modified to produce derivative works, such modified # SOFTWARE should be clearly marked, so as not to confuse it with the Index: examples/Solvers/BlockDecomposed/Tools/NullPreconditioner.h =================================================================== RCS file: /home/pooma/Repository/r2/examples/Solvers/BlockDecomposed/Tools/NullPreconditioner.h,v retrieving revision 1.1 diff -c -p -r1.1 NullPreconditioner.h *** examples/Solvers/BlockDecomposed/Tools/NullPreconditioner.h 2000/07/27 16:10:52 1.1 --- examples/Solvers/BlockDecomposed/Tools/NullPreconditioner.h 2001/10/13 02:25:45 *************** *** 10,21 **** // employee or employees of the University of California, operator of the // Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with // the U.S. Department of Energy. The U.S. Government has rights to use, ! // reproduce, and distribute this SOFTWARE, and to allow others to do so. ! // The public may copy and use this SOFTWARE, FOR NONCOMMERCIAL USE ONLY, ! // without charge, provided that this Notice and any statement of ! // authorship are reproduced on all copies. Neither the Government nor ! // the University makes any warranty, express or implied, or assumes any ! // liability or responsibility for the use of this SOFTWARE. // // If SOFTWARE is modified to produce derivative works, such modified // SOFTWARE should be clearly marked, so as not to confuse it with the --- 10,21 ---- // employee or employees of the University of California, operator of the // Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with // the U.S. Department of Energy. The U.S. Government has rights to use, ! // reproduce, and distribute this SOFTWARE. The public may copy, distribute, ! // prepare derivative works and publicly display this SOFTWARE without ! // charge, provided that this Notice and any statement of authorship are ! // reproduced on all copies. Neither the Government nor the University ! // makes any warranty, express or implied, or assumes any liability or ! // responsibility for the use of this SOFTWARE. // // If SOFTWARE is modified to produce derivative works, such modified // SOFTWARE should be clearly marked, so as not to confuse it with the Index: src/Array/ArrayOperatorSpecializations.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Array/ArrayOperatorSpecializations.h,v retrieving revision 1.2 diff -c -p -r1.2 ArrayOperatorSpecializations.h *** src/Array/ArrayOperatorSpecializations.h 2000/07/20 15:36:24 1.2 --- src/Array/ArrayOperatorSpecializations.h 2001/10/13 02:25:46 *************** *** 10,21 **** // employee or employees of the University of California, operator of the // Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with // the U.S. Department of Energy. The U.S. Government has rights to use, ! // reproduce, and distribute this SOFTWARE, and to allow others to do so. ! // The public may copy and use this SOFTWARE, FOR NONCOMMERCIAL USE ONLY, ! // without charge, provided that this Notice and any statement of ! // authorship are reproduced on all copies. Neither the Government nor ! // the University makes any warranty, express or implied, or assumes any ! // liability or responsibility for the use of this SOFTWARE. // // If SOFTWARE is modified to produce derivative works, such modified // SOFTWARE should be clearly marked, so as not to confuse it with the --- 10,21 ---- // employee or employees of the University of California, operator of the // Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with // the U.S. Department of Energy. The U.S. Government has rights to use, ! // reproduce, and distribute this SOFTWARE. The public may copy, distribute, ! // prepare derivative works and publicly display this SOFTWARE without ! // charge, provided that this Notice and any statement of authorship are ! // reproduced on all copies. Neither the Government nor the University ! // makes any warranty, express or implied, or assumes any liability or ! // responsibility for the use of this SOFTWARE. // // If SOFTWARE is modified to produce derivative works, such modified // SOFTWARE should be clearly marked, so as not to confuse it with the Index: src/Connect/Lux/LuxConnector.DynamicArray.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Connect/Lux/LuxConnector.DynamicArray.h,v retrieving revision 1.2 diff -c -p -r1.2 LuxConnector.DynamicArray.h *** src/Connect/Lux/LuxConnector.DynamicArray.h 2000/03/07 13:16:19 1.2 --- src/Connect/Lux/LuxConnector.DynamicArray.h 2001/10/13 02:25:46 *************** *** 8,19 **** // employee or employees of the University of California, operator of the // Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with // the U.S. Department of Energy. The U.S. Government has rights to use, ! // reproduce, and distribute this SOFTWARE, and to allow others to do so. ! // The public may copy and use this SOFTWARE, FOR NONCOMMERCIAL USE ONLY, ! // without charge, provided that this Notice and any statement of ! // authorship are reproduced on all copies. Neither the Government nor ! // the University makes any warranty, express or implied, or assumes any ! // liability or responsibility for the use of this SOFTWARE. // // If SOFTWARE is modified to produce derivative works, such modified // SOFTWARE should be clearly marked, so as not to confuse it with the --- 8,19 ---- // employee or employees of the University of California, operator of the // Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with // the U.S. Department of Energy. The U.S. Government has rights to use, ! // reproduce, and distribute this SOFTWARE. The public may copy, distribute, ! // prepare derivative works and publicly display this SOFTWARE without ! // charge, provided that this Notice and any statement of authorship are ! // reproduced on all copies. Neither the Government nor the University ! // makes any warranty, express or implied, or assumes any liability or ! // responsibility for the use of this SOFTWARE. // // If SOFTWARE is modified to produce derivative works, such modified // SOFTWARE should be clearly marked, so as not to confuse it with the Index: src/CoordinateSystems/CoordinateTypeInfo.h =================================================================== RCS file: /home/pooma/Repository/r2/src/CoordinateSystems/CoordinateTypeInfo.h,v retrieving revision 1.1 diff -c -p -r1.1 CoordinateTypeInfo.h *** src/CoordinateSystems/CoordinateTypeInfo.h 2000/09/07 22:10:12 1.1 --- src/CoordinateSystems/CoordinateTypeInfo.h 2001/10/13 02:25:46 *************** *** 10,21 **** // employee or employees of the University of California, operator of the // Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with // the U.S. Department of Energy. The U.S. Government has rights to use, ! // reproduce, and distribute this SOFTWARE, and to allow others to do so. ! // The public may copy and use this SOFTWARE, FOR NONCOMMERCIAL USE ONLY, ! // without charge, provided that this Notice and any statement of ! // authorship are reproduced on all copies. Neither the Government nor ! // the University makes any warranty, express or implied, or assumes any ! // liability or responsibility for the use of this SOFTWARE. // // If SOFTWARE is modified to produce derivative works, such modified // SOFTWARE should be clearly marked, so as not to confuse it with the --- 10,21 ---- // employee or employees of the University of California, operator of the // Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with // the U.S. Department of Energy. The U.S. Government has rights to use, ! // reproduce, and distribute this SOFTWARE. The public may copy, distribute, ! // prepare derivative works and publicly display this SOFTWARE without ! // charge, provided that this Notice and any statement of authorship are ! // reproduced on all copies. Neither the Government nor the University ! // makes any warranty, express or implied, or assumes any liability or ! // responsibility for the use of this SOFTWARE. // // If SOFTWARE is modified to produce derivative works, such modified // SOFTWARE should be clearly marked, so as not to confuse it with the Index: src/Engine/EngineTypeInfo.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Engine/EngineTypeInfo.h,v retrieving revision 1.1 diff -c -p -r1.1 EngineTypeInfo.h *** src/Engine/EngineTypeInfo.h 2000/09/07 22:09:38 1.1 --- src/Engine/EngineTypeInfo.h 2001/10/13 02:25:46 *************** *** 10,21 **** // employee or employees of the University of California, operator of the // Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with // the U.S. Department of Energy. The U.S. Government has rights to use, ! // reproduce, and distribute this SOFTWARE, and to allow others to do so. ! // The public may copy and use this SOFTWARE, FOR NONCOMMERCIAL USE ONLY, ! // without charge, provided that this Notice and any statement of ! // authorship are reproduced on all copies. Neither the Government nor ! // the University makes any warranty, express or implied, or assumes any ! // liability or responsibility for the use of this SOFTWARE. // // If SOFTWARE is modified to produce derivative works, such modified // SOFTWARE should be clearly marked, so as not to confuse it with the --- 10,21 ---- // employee or employees of the University of California, operator of the // Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with // the U.S. Department of Energy. The U.S. Government has rights to use, ! // reproduce, and distribute this SOFTWARE. The public may copy, distribute, ! // prepare derivative works and publicly display this SOFTWARE without ! // charge, provided that this Notice and any statement of authorship are ! // reproduced on all copies. Neither the Government nor the University ! // makes any warranty, express or implied, or assumes any liability or ! // responsibility for the use of this SOFTWARE. // // If SOFTWARE is modified to produce derivative works, such modified // SOFTWARE should be clearly marked, so as not to confuse it with the Index: src/Engine/tests/remoteBrickTest1.cpp =================================================================== RCS file: /home/pooma/Repository/r2/src/Engine/tests/remoteBrickTest1.cpp,v retrieving revision 1.7 diff -c -p -r1.7 remoteBrickTest1.cpp *** src/Engine/tests/remoteBrickTest1.cpp 2000/03/27 18:38:09 1.7 --- src/Engine/tests/remoteBrickTest1.cpp 2001/10/13 02:25:46 *************** *** 10,21 **** // employee or employees of the University of California, operator of the // Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with // the U.S. Department of Energy. The U.S. Government has rights to use, ! // reproduce, and distribute this SOFTWARE, and to allow others to do so. ! // The public may copy and use this SOFTWARE, FOR NONCOMMERCIAL USE ONLY, ! // without charge, provided that this Notice and any statement of ! // authorship are reproduced on all copies. Neither the Government nor ! // the University makes any warranty, express or implied, or assumes any ! // liability or responsibility for the use of this SOFTWARE. // // If SOFTWARE is modified to produce derivative works, such modified // SOFTWARE should be clearly marked, so as not to confuse it with the --- 10,21 ---- // employee or employees of the University of California, operator of the // Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with // the U.S. Department of Energy. The U.S. Government has rights to use, ! // reproduce, and distribute this SOFTWARE. The public may copy, distribute, ! // prepare derivative works and publicly display this SOFTWARE without ! // charge, provided that this Notice and any statement of authorship are ! // reproduced on all copies. Neither the Government nor the University ! // makes any warranty, express or implied, or assumes any liability or ! // responsibility for the use of this SOFTWARE. // // If SOFTWARE is modified to produce derivative works, such modified // SOFTWARE should be clearly marked, so as not to confuse it with the Index: src/Evaluator/LoopApply.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Evaluator/LoopApply.h,v retrieving revision 1.4 diff -c -p -r1.4 LoopApply.h *** src/Evaluator/LoopApply.h 2001/04/13 02:15:06 1.4 --- src/Evaluator/LoopApply.h 2001/10/13 02:25:46 *************** *** 10,21 **** // employee or employees of the University of California, operator of the // Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with // the U.S. Department of Energy. The U.S. Government has rights to use, ! // reproduce, and distribute this SOFTWARE, and to allow others to do so. ! // The public may copy and use this SOFTWARE, FOR NONCOMMERCIAL USE ONLY, ! // without charge, provided that this Notice and any statement of ! // authorship are reproduced on all copies. Neither the Government nor ! // the University makes any warranty, express or implied, or assumes any ! // liability or responsibility for the use of this SOFTWARE. // // If SOFTWARE is modified to produce derivative works, such modified // SOFTWARE should be clearly marked, so as not to confuse it with the --- 10,21 ---- // employee or employees of the University of California, operator of the // Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with // the U.S. Department of Energy. The U.S. Government has rights to use, ! // reproduce, and distribute this SOFTWARE. The public may copy, distribute, ! // prepare derivative works and publicly display this SOFTWARE without ! // charge, provided that this Notice and any statement of authorship are ! // reproduced on all copies. Neither the Government nor the University ! // makes any warranty, express or implied, or assumes any liability or ! // responsibility for the use of this SOFTWARE. // // If SOFTWARE is modified to produce derivative works, such modified // SOFTWARE should be clearly marked, so as not to confuse it with the Index: src/Evaluator/MultiArgEvaluator.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Evaluator/MultiArgEvaluator.h,v retrieving revision 1.9 diff -c -p -r1.9 MultiArgEvaluator.h *** src/Evaluator/MultiArgEvaluator.h 2001/08/30 01:15:04 1.9 --- src/Evaluator/MultiArgEvaluator.h 2001/10/13 02:25:46 *************** *** 10,21 **** // employee or employees of the University of California, operator of the // Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with // the U.S. Department of Energy. The U.S. Government has rights to use, ! // reproduce, and distribute this SOFTWARE, and to allow others to do so. ! // The public may copy and use this SOFTWARE, FOR NONCOMMERCIAL USE ONLY, ! // without charge, provided that this Notice and any statement of ! // authorship are reproduced on all copies. Neither the Government nor ! // the University makes any warranty, express or implied, or assumes any ! // liability or responsibility for the use of this SOFTWARE. // // If SOFTWARE is modified to produce derivative works, such modified // SOFTWARE should be clearly marked, so as not to confuse it with the --- 10,21 ---- // employee or employees of the University of California, operator of the // Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with // the U.S. Department of Energy. The U.S. Government has rights to use, ! // reproduce, and distribute this SOFTWARE. The public may copy, distribute, ! // prepare derivative works and publicly display this SOFTWARE without ! // charge, provided that this Notice and any statement of authorship are ! // reproduced on all copies. Neither the Government nor the University ! // makes any warranty, express or implied, or assumes any liability or ! // responsibility for the use of this SOFTWARE. // // If SOFTWARE is modified to produce derivative works, such modified // SOFTWARE should be clearly marked, so as not to confuse it with the Index: src/Evaluator/MultiArgKernel.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Evaluator/MultiArgKernel.h,v retrieving revision 1.1 diff -c -p -r1.1 MultiArgKernel.h *** src/Evaluator/MultiArgKernel.h 2000/09/27 17:13:13 1.1 --- src/Evaluator/MultiArgKernel.h 2001/10/13 02:25:46 *************** *** 10,21 **** // employee or employees of the University of California, operator of the // Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with // the U.S. Department of Energy. The U.S. Government has rights to use, ! // reproduce, and distribute this SOFTWARE, and to allow others to do so. ! // The public may copy and use this SOFTWARE, FOR NONCOMMERCIAL USE ONLY, ! // without charge, provided that this Notice and any statement of ! // authorship are reproduced on all copies. Neither the Government nor ! // the University makes any warranty, express or implied, or assumes any ! // liability or responsibility for the use of this SOFTWARE. // // If SOFTWARE is modified to produce derivative works, such modified // SOFTWARE should be clearly marked, so as not to confuse it with the --- 10,21 ---- // employee or employees of the University of California, operator of the // Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with // the U.S. Department of Energy. The U.S. Government has rights to use, ! // reproduce, and distribute this SOFTWARE. The public may copy, distribute, ! // prepare derivative works and publicly display this SOFTWARE without ! // charge, provided that this Notice and any statement of authorship are ! // reproduced on all copies. Neither the Government nor the University ! // makes any warranty, express or implied, or assumes any liability or ! // responsibility for the use of this SOFTWARE. // // If SOFTWARE is modified to produce derivative works, such modified // SOFTWARE should be clearly marked, so as not to confuse it with the Index: src/Evaluator/ScalarCode.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Evaluator/ScalarCode.h,v retrieving revision 1.7 diff -c -p -r1.7 ScalarCode.h *** src/Evaluator/ScalarCode.h 2001/04/04 17:29:19 1.7 --- src/Evaluator/ScalarCode.h 2001/10/13 02:25:46 *************** *** 10,21 **** // employee or employees of the University of California, operator of the // Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with // the U.S. Department of Energy. The U.S. Government has rights to use, ! // reproduce, and distribute this SOFTWARE, and to allow others to do so. ! // The public may copy and use this SOFTWARE, FOR NONCOMMERCIAL USE ONLY, ! // without charge, provided that this Notice and any statement of ! // authorship are reproduced on all copies. Neither the Government nor ! // the University makes any warranty, express or implied, or assumes any ! // liability or responsibility for the use of this SOFTWARE. // // If SOFTWARE is modified to produce derivative works, such modified // SOFTWARE should be clearly marked, so as not to confuse it with the --- 10,21 ---- // employee or employees of the University of California, operator of the // Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with // the U.S. Department of Energy. The U.S. Government has rights to use, ! // reproduce, and distribute this SOFTWARE. The public may copy, distribute, ! // prepare derivative works and publicly display this SOFTWARE without ! // charge, provided that this Notice and any statement of authorship are ! // reproduced on all copies. Neither the Government nor the University ! // makes any warranty, express or implied, or assumes any liability or ! // responsibility for the use of this SOFTWARE. // // If SOFTWARE is modified to produce derivative works, such modified // SOFTWARE should be clearly marked, so as not to confuse it with the Index: src/Evaluator/ScalarCodeInfo.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Evaluator/ScalarCodeInfo.h,v retrieving revision 1.4 diff -c -p -r1.4 ScalarCodeInfo.h *** src/Evaluator/ScalarCodeInfo.h 2001/04/04 17:29:19 1.4 --- src/Evaluator/ScalarCodeInfo.h 2001/10/13 02:25:46 *************** *** 10,21 **** // employee or employees of the University of California, operator of the // Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with // the U.S. Department of Energy. The U.S. Government has rights to use, ! // reproduce, and distribute this SOFTWARE, and to allow others to do so. ! // The public may copy and use this SOFTWARE, FOR NONCOMMERCIAL USE ONLY, ! // without charge, provided that this Notice and any statement of ! // authorship are reproduced on all copies. Neither the Government nor ! // the University makes any warranty, express or implied, or assumes any ! // liability or responsibility for the use of this SOFTWARE. // // If SOFTWARE is modified to produce derivative works, such modified // SOFTWARE should be clearly marked, so as not to confuse it with the --- 10,21 ---- // employee or employees of the University of California, operator of the // Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with // the U.S. Department of Energy. The U.S. Government has rights to use, ! // reproduce, and distribute this SOFTWARE. The public may copy, distribute, ! // prepare derivative works and publicly display this SOFTWARE without ! // charge, provided that this Notice and any statement of authorship are ! // reproduced on all copies. Neither the Government nor the University ! // makes any warranty, express or implied, or assumes any liability or ! // responsibility for the use of this SOFTWARE. // // If SOFTWARE is modified to produce derivative works, such modified // SOFTWARE should be clearly marked, so as not to confuse it with the Index: src/Evaluator/SimpleIntersector.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Evaluator/SimpleIntersector.h,v retrieving revision 1.2 diff -c -p -r1.2 SimpleIntersector.h *** src/Evaluator/SimpleIntersector.h 2001/04/20 19:02:22 1.2 --- src/Evaluator/SimpleIntersector.h 2001/10/13 02:25:46 *************** *** 10,21 **** // employee or employees of the University of California, operator of the // Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with // the U.S. Department of Energy. The U.S. Government has rights to use, ! // reproduce, and distribute this SOFTWARE, and to allow others to do so. ! // The public may copy and use this SOFTWARE, FOR NONCOMMERCIAL USE ONLY, ! // without charge, provided that this Notice and any statement of ! // authorship are reproduced on all copies. Neither the Government nor ! // the University makes any warranty, express or implied, or assumes any ! // liability or responsibility for the use of this SOFTWARE. // // If SOFTWARE is modified to produce derivative works, such modified // SOFTWARE should be clearly marked, so as not to confuse it with the --- 10,21 ---- // employee or employees of the University of California, operator of the // Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with // the U.S. Department of Energy. The U.S. Government has rights to use, ! // reproduce, and distribute this SOFTWARE. The public may copy, distribute, ! // prepare derivative works and publicly display this SOFTWARE without ! // charge, provided that this Notice and any statement of authorship are ! // reproduced on all copies. Neither the Government nor the University ! // makes any warranty, express or implied, or assumes any liability or ! // responsibility for the use of this SOFTWARE. // // If SOFTWARE is modified to produce derivative works, such modified // SOFTWARE should be clearly marked, so as not to confuse it with the Index: src/Field/FieldOperatorSpecializations.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Field/FieldOperatorSpecializations.h,v retrieving revision 1.1 diff -c -p -r1.1 FieldOperatorSpecializations.h *** src/Field/FieldOperatorSpecializations.h 2001/08/30 01:15:06 1.1 --- src/Field/FieldOperatorSpecializations.h 2001/10/13 02:25:47 *************** *** 10,21 **** // employee or employees of the University of California, operator of the // Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with // the U.S. Department of Energy. The U.S. Government has rights to use, ! // reproduce, and distribute this SOFTWARE, and to allow others to do so. ! // The public may copy and use this SOFTWARE, FOR NONCOMMERCIAL USE ONLY, ! // without charge, provided that this Notice and any statement of ! // authorship are reproduced on all copies. Neither the Government nor ! // the University makes any warranty, express or implied, or assumes any ! // liability or responsibility for the use of this SOFTWARE. // // If SOFTWARE is modified to produce derivative works, such modified // SOFTWARE should be clearly marked, so as not to confuse it with the --- 10,21 ---- // employee or employees of the University of California, operator of the // Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with // the U.S. Department of Energy. The U.S. Government has rights to use, ! // reproduce, and distribute this SOFTWARE. The public may copy, distribute, ! // prepare derivative works and publicly display this SOFTWARE without ! // charge, provided that this Notice and any statement of authorship are ! // reproduced on all copies. Neither the Government nor the University ! // makes any warranty, express or implied, or assumes any liability or ! // responsibility for the use of this SOFTWARE. // // If SOFTWARE is modified to produce derivative works, such modified // SOFTWARE should be clearly marked, so as not to confuse it with the Index: src/Field/FieldTypeInfo.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Field/FieldTypeInfo.h,v retrieving revision 1.1 diff -c -p -r1.1 FieldTypeInfo.h *** src/Field/FieldTypeInfo.h 2001/08/30 01:15:06 1.1 --- src/Field/FieldTypeInfo.h 2001/10/13 02:25:47 *************** *** 10,21 **** // employee or employees of the University of California, operator of the // Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with // the U.S. Department of Energy. The U.S. Government has rights to use, ! // reproduce, and distribute this SOFTWARE, and to allow others to do so. ! // The public may copy and use this SOFTWARE, FOR NONCOMMERCIAL USE ONLY, ! // without charge, provided that this Notice and any statement of ! // authorship are reproduced on all copies. Neither the Government nor ! // the University makes any warranty, express or implied, or assumes any ! // liability or responsibility for the use of this SOFTWARE. // // If SOFTWARE is modified to produce derivative works, such modified // SOFTWARE should be clearly marked, so as not to confuse it with the --- 10,21 ---- // employee or employees of the University of California, operator of the // Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with // the U.S. Department of Energy. The U.S. Government has rights to use, ! // reproduce, and distribute this SOFTWARE. The public may copy, distribute, ! // prepare derivative works and publicly display this SOFTWARE without ! // charge, provided that this Notice and any statement of authorship are ! // reproduced on all copies. Neither the Government nor the University ! // makes any warranty, express or implied, or assumes any liability or ! // responsibility for the use of this SOFTWARE. // // If SOFTWARE is modified to produce derivative works, such modified // SOFTWARE should be clearly marked, so as not to confuse it with the Index: src/Field/Mesh/PositionFunctions.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Field/Mesh/PositionFunctions.h,v retrieving revision 1.2 diff -c -p -r1.2 PositionFunctions.h *** src/Field/Mesh/PositionFunctions.h 2001/10/10 17:55:01 1.2 --- src/Field/Mesh/PositionFunctions.h 2001/10/13 02:25:47 *************** *** 10,21 **** // employee or employees of the University of California, operator of the // Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with // the U.S. Department of Energy. The U.S. Government has rights to use, ! // reproduce, and distribute this SOFTWARE, and to allow others to do so. ! // The public may copy and use this SOFTWARE, FOR NONCOMMERCIAL USE ONLY, ! // without charge, provided that this Notice and any statement of ! // authorship are reproduced on all copies. Neither the Government nor ! // the University makes any warranty, express or implied, or assumes any ! // liability or responsibility for the use of this SOFTWARE. // // If SOFTWARE is modified to produce derivative works, such modified // SOFTWARE should be clearly marked, so as not to confuse it with the --- 10,21 ---- // employee or employees of the University of California, operator of the // Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with // the U.S. Department of Energy. The U.S. Government has rights to use, ! // reproduce, and distribute this SOFTWARE. The public may copy, distribute, ! // prepare derivative works and publicly display this SOFTWARE without ! // charge, provided that this Notice and any statement of authorship are ! // reproduced on all copies. Neither the Government nor the University ! // makes any warranty, express or implied, or assumes any liability or ! // responsibility for the use of this SOFTWARE. // // If SOFTWARE is modified to produce derivative works, such modified // SOFTWARE should be clearly marked, so as not to confuse it with the Index: src/Functions/MultiArg.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Functions/MultiArg.h,v retrieving revision 1.6 diff -c -p -r1.6 MultiArg.h *** src/Functions/MultiArg.h 2001/08/30 01:15:19 1.6 --- src/Functions/MultiArg.h 2001/10/13 02:25:47 *************** *** 10,21 **** // employee or employees of the University of California, operator of the // Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with // the U.S. Department of Energy. The U.S. Government has rights to use, ! // reproduce, and distribute this SOFTWARE, and to allow others to do so. ! // The public may copy and use this SOFTWARE, FOR NONCOMMERCIAL USE ONLY, ! // without charge, provided that this Notice and any statement of ! // authorship are reproduced on all copies. Neither the Government nor ! // the University makes any warranty, express or implied, or assumes any ! // liability or responsibility for the use of this SOFTWARE. // // If SOFTWARE is modified to produce derivative works, such modified // SOFTWARE should be clearly marked, so as not to confuse it with the --- 10,21 ---- // employee or employees of the University of California, operator of the // Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with // the U.S. Department of Energy. The U.S. Government has rights to use, ! // reproduce, and distribute this SOFTWARE. The public may copy, distribute, ! // prepare derivative works and publicly display this SOFTWARE without ! // charge, provided that this Notice and any statement of authorship are ! // reproduced on all copies. Neither the Government nor the University ! // makes any warranty, express or implied, or assumes any liability or ! // responsibility for the use of this SOFTWARE. // // If SOFTWARE is modified to produce derivative works, such modified // SOFTWARE should be clearly marked, so as not to confuse it with the Index: src/IO/DiskLayout.cmpl.cpp =================================================================== RCS file: /home/pooma/Repository/r2/src/IO/DiskLayout.cmpl.cpp,v retrieving revision 1.7 diff -c -p -r1.7 DiskLayout.cmpl.cpp *** src/IO/DiskLayout.cmpl.cpp 2001/10/03 21:07:48 1.7 --- src/IO/DiskLayout.cmpl.cpp 2001/10/13 02:25:47 *************** *** 10,21 **** // employee or employees of the University of California, operator of the // Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with // the U.S. Department of Energy. The U.S. Government has rights to use, ! // reproduce, and distribute this SOFTWARE, and to allow others to do so. ! // The public may copy and use this SOFTWARE, FOR NONCOMMERCIAL USE ONLY, ! // without charge, provided that this Notice and any statement of ! // authorship are reproduced on all copies. Neither the Government nor ! // the University makes any warranty, express or implied, or assumes any ! // liability or responsibility for the use of this SOFTWARE. // // If SOFTWARE is modified to produce derivative works, such modified // SOFTWARE should be clearly marked, so as not to confuse it with the --- 10,21 ---- // employee or employees of the University of California, operator of the // Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with // the U.S. Department of Energy. The U.S. Government has rights to use, ! // reproduce, and distribute this SOFTWARE. The public may copy, distribute, ! // prepare derivative works and publicly display this SOFTWARE without ! // charge, provided that this Notice and any statement of authorship are ! // reproduced on all copies. Neither the Government nor the University ! // makes any warranty, express or implied, or assumes any liability or ! // responsibility for the use of this SOFTWARE. // // If SOFTWARE is modified to produce derivative works, such modified // SOFTWARE should be clearly marked, so as not to confuse it with the Index: src/IO/FileSetReader.cmpl.cpp =================================================================== RCS file: /home/pooma/Repository/r2/src/IO/FileSetReader.cmpl.cpp,v retrieving revision 1.8 diff -c -p -r1.8 FileSetReader.cmpl.cpp *** src/IO/FileSetReader.cmpl.cpp 2001/10/03 21:08:50 1.8 --- src/IO/FileSetReader.cmpl.cpp 2001/10/13 02:25:47 *************** *** 10,21 **** // employee or employees of the University of California, operator of the // Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with // the U.S. Department of Energy. The U.S. Government has rights to use, ! // reproduce, and distribute this SOFTWARE, and to allow others to do so. ! // The public may copy and use this SOFTWARE, FOR NONCOMMERCIAL USE ONLY, ! // without charge, provided that this Notice and any statement of ! // authorship are reproduced on all copies. Neither the Government nor ! // the University makes any warranty, express or implied, or assumes any ! // liability or responsibility for the use of this SOFTWARE. // // If SOFTWARE is modified to produce derivative works, such modified // SOFTWARE should be clearly marked, so as not to confuse it with the --- 10,21 ---- // employee or employees of the University of California, operator of the // Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with // the U.S. Department of Energy. The U.S. Government has rights to use, ! // reproduce, and distribute this SOFTWARE. The public may copy, distribute, ! // prepare derivative works and publicly display this SOFTWARE without ! // charge, provided that this Notice and any statement of authorship are ! // reproduced on all copies. Neither the Government nor the University ! // makes any warranty, express or implied, or assumes any liability or ! // responsibility for the use of this SOFTWARE. // // If SOFTWARE is modified to produce derivative works, such modified // SOFTWARE should be clearly marked, so as not to confuse it with the Index: src/IO/FileSetReader.cpp =================================================================== RCS file: /home/pooma/Repository/r2/src/IO/FileSetReader.cpp,v retrieving revision 1.5 diff -c -p -r1.5 FileSetReader.cpp *** src/IO/FileSetReader.cpp 2001/10/10 00:16:02 1.5 --- src/IO/FileSetReader.cpp 2001/10/13 02:25:48 *************** *** 10,21 **** // employee or employees of the University of California, operator of the // Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with // the U.S. Department of Energy. The U.S. Government has rights to use, ! // reproduce, and distribute this SOFTWARE, and to allow others to do so. ! // The public may copy and use this SOFTWARE, FOR NONCOMMERCIAL USE ONLY, ! // without charge, provided that this Notice and any statement of ! // authorship are reproduced on all copies. Neither the Government nor ! // the University makes any warranty, express or implied, or assumes any ! // liability or responsibility for the use of this SOFTWARE. // // If SOFTWARE is modified to produce derivative works, such modified // SOFTWARE should be clearly marked, so as not to confuse it with the --- 10,21 ---- // employee or employees of the University of California, operator of the // Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with // the U.S. Department of Energy. The U.S. Government has rights to use, ! // reproduce, and distribute this SOFTWARE. The public may copy, distribute, ! // prepare derivative works and publicly display this SOFTWARE without ! // charge, provided that this Notice and any statement of authorship are ! // reproduced on all copies. Neither the Government nor the University ! // makes any warranty, express or implied, or assumes any liability or ! // responsibility for the use of this SOFTWARE. // // If SOFTWARE is modified to produce derivative works, such modified // SOFTWARE should be clearly marked, so as not to confuse it with the Index: src/PETE/PETETypeInfo.h =================================================================== RCS file: /home/pooma/Repository/r2/src/PETE/PETETypeInfo.h,v retrieving revision 1.1 diff -c -p -r1.1 PETETypeInfo.h *** src/PETE/PETETypeInfo.h 2000/09/07 22:07:37 1.1 --- src/PETE/PETETypeInfo.h 2001/10/13 02:25:48 *************** *** 10,21 **** // employee or employees of the University of California, operator of the // Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with // the U.S. Department of Energy. The U.S. Government has rights to use, ! // reproduce, and distribute this SOFTWARE, and to allow others to do so. ! // The public may copy and use this SOFTWARE, FOR NONCOMMERCIAL USE ONLY, ! // without charge, provided that this Notice and any statement of ! // authorship are reproduced on all copies. Neither the Government nor ! // the University makes any warranty, express or implied, or assumes any ! // liability or responsibility for the use of this SOFTWARE. // // If SOFTWARE is modified to produce derivative works, such modified // SOFTWARE should be clearly marked, so as not to confuse it with the --- 10,21 ---- // employee or employees of the University of California, operator of the // Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with // the U.S. Department of Energy. The U.S. Government has rights to use, ! // reproduce, and distribute this SOFTWARE. The public may copy, distribute, ! // prepare derivative works and publicly display this SOFTWARE without ! // charge, provided that this Notice and any statement of authorship are ! // reproduced on all copies. Neither the Government nor the University ! // makes any warranty, express or implied, or assumes any liability or ! // responsibility for the use of this SOFTWARE. // // If SOFTWARE is modified to produce derivative works, such modified // SOFTWARE should be clearly marked, so as not to confuse it with the Index: src/PETE/PoomaPETE.h =================================================================== RCS file: /home/pooma/Repository/r2/src/PETE/PoomaPETE.h,v retrieving revision 1.2 diff -c -p -r1.2 PoomaPETE.h *** src/PETE/PoomaPETE.h 2000/12/04 21:19:37 1.2 --- src/PETE/PoomaPETE.h 2001/10/13 02:25:48 *************** *** 10,21 **** // employee or employees of the University of California, operator of the // Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with // the U.S. Department of Energy. The U.S. Government has rights to use, ! // reproduce, and distribute this SOFTWARE, and to allow others to do so. ! // The public may copy and use this SOFTWARE, FOR NONCOMMERCIAL USE ONLY, ! // without charge, provided that this Notice and any statement of ! // authorship are reproduced on all copies. Neither the Government nor ! // the University makes any warranty, express or implied, or assumes any ! // liability or responsibility for the use of this SOFTWARE. // // If SOFTWARE is modified to produce derivative works, such modified // SOFTWARE should be clearly marked, so as not to confuse it with the --- 10,21 ---- // employee or employees of the University of California, operator of the // Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with // the U.S. Department of Energy. The U.S. Government has rights to use, ! // reproduce, and distribute this SOFTWARE. The public may copy, distribute, ! // prepare derivative works and publicly display this SOFTWARE without ! // charge, provided that this Notice and any statement of authorship are ! // reproduced on all copies. Neither the Government nor the University ! // makes any warranty, express or implied, or assumes any liability or ! // responsibility for the use of this SOFTWARE. // // If SOFTWARE is modified to produce derivative works, such modified // SOFTWARE should be clearly marked, so as not to confuse it with the Index: src/Partition/BisectionMapper.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Partition/BisectionMapper.h,v retrieving revision 1.4 diff -c -p -r1.4 BisectionMapper.h *** src/Partition/BisectionMapper.h 2001/03/29 00:41:23 1.4 --- src/Partition/BisectionMapper.h 2001/10/13 02:25:48 *************** *** 10,21 **** // employee or employees of the University of California, operator of the // Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with // the U.S. Department of Energy. The U.S. Government has rights to use, ! // reproduce, and distribute this SOFTWARE, and to allow others to do so. ! // The public may copy and use this SOFTWARE, FOR NONCOMMERCIAL USE ONLY, ! // without charge, provided that this Notice and any statement of ! // authorship are reproduced on all copies. Neither the Government nor ! // the University makes any warranty, express or implied, or assumes any ! // liability or responsibility for the use of this SOFTWARE. // // If SOFTWARE is modified to produce derivative works, such modified // SOFTWARE should be clearly marked, so as not to confuse it with the --- 10,21 ---- // employee or employees of the University of California, operator of the // Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with // the U.S. Department of Energy. The U.S. Government has rights to use, ! // reproduce, and distribute this SOFTWARE. The public may copy, distribute, ! // prepare derivative works and publicly display this SOFTWARE without ! // charge, provided that this Notice and any statement of authorship are ! // reproduced on all copies. Neither the Government nor the University ! // makes any warranty, express or implied, or assumes any liability or ! // responsibility for the use of this SOFTWARE. // // If SOFTWARE is modified to produce derivative works, such modified // SOFTWARE should be clearly marked, so as not to confuse it with the Index: src/Partition/DistributedMapper.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Partition/DistributedMapper.h,v retrieving revision 1.6 diff -c -p -r1.6 DistributedMapper.h *** src/Partition/DistributedMapper.h 2001/04/10 23:51:52 1.6 --- src/Partition/DistributedMapper.h 2001/10/13 02:25:48 *************** *** 10,21 **** // employee or employees of the University of California, operator of the // Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with // the U.S. Department of Energy. The U.S. Government has rights to use, ! // reproduce, and distribute this SOFTWARE, and to allow others to do so. ! // The public may copy and use this SOFTWARE, FOR NONCOMMERCIAL USE ONLY, ! // without charge, provided that this Notice and any statement of ! // authorship are reproduced on all copies. Neither the Government nor ! // the University makes any warranty, express or implied, or assumes any ! // liability or responsibility for the use of this SOFTWARE. // // If SOFTWARE is modified to produce derivative works, such modified // SOFTWARE should be clearly marked, so as not to confuse it with the --- 10,21 ---- // employee or employees of the University of California, operator of the // Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with // the U.S. Department of Energy. The U.S. Government has rights to use, ! // reproduce, and distribute this SOFTWARE. The public may copy, distribute, ! // prepare derivative works and publicly display this SOFTWARE without ! // charge, provided that this Notice and any statement of authorship are ! // reproduced on all copies. Neither the Government nor the University ! // makes any warranty, express or implied, or assumes any liability or ! // responsibility for the use of this SOFTWARE. // // If SOFTWARE is modified to produce derivative works, such modified // SOFTWARE should be clearly marked, so as not to confuse it with the Index: src/Pooma/tests/finalize.cpp =================================================================== RCS file: /home/pooma/Repository/r2/src/Pooma/tests/finalize.cpp,v retrieving revision 1.3 diff -c -p -r1.3 finalize.cpp *** src/Pooma/tests/finalize.cpp 1999/09/22 19:20:10 1.3 --- src/Pooma/tests/finalize.cpp 2001/10/13 02:25:48 *************** *** 10,21 **** // employee or employees of the University of California, operator of the // Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with // the U.S. Department of Energy. The U.S. Government has rights to use, ! // reproduce, and distribute this SOFTWARE, and to allow others to do so. ! // The public may copy and use this SOFTWARE, FOR NONCOMMERCIAL USE ONLY, ! // without charge, provided that this Notice and any statement of ! // authorship are reproduced on all copies. Neither the Government nor ! // the University makes any warranty, express or implied, or assumes any ! // liability or responsibility for the use of this SOFTWARE. // // If SOFTWARE is modified to produce derivative works, such modified // SOFTWARE should be clearly marked, so as not to confuse it with the --- 10,21 ---- // employee or employees of the University of California, operator of the // Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with // the U.S. Department of Energy. The U.S. Government has rights to use, ! // reproduce, and distribute this SOFTWARE. The public may copy, distribute, ! // prepare derivative works and publicly display this SOFTWARE without ! // charge, provided that this Notice and any statement of authorship are ! // reproduced on all copies. Neither the Government nor the University ! // makes any warranty, express or implied, or assumes any liability or ! // responsibility for the use of this SOFTWARE. // // If SOFTWARE is modified to produce derivative works, such modified // SOFTWARE should be clearly marked, so as not to confuse it with the Index: src/Pooma/tests/include.mk =================================================================== RCS file: /home/pooma/Repository/r2/src/Pooma/tests/include.mk,v retrieving revision 1.2 diff -c -p -r1.2 include.mk *** src/Pooma/tests/include.mk 1998/10/26 21:47:16 1.2 --- src/Pooma/tests/include.mk 2001/10/13 02:25:48 *************** *** 10,21 **** # employee or employees of the University of California, operator of the # Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with # the U.S. Department of Energy. The U.S. Government has rights to use, ! # reproduce, and distribute this SOFTWARE, and to allow others to do so. ! # The public may copy and use this SOFTWARE, FOR NONCOMMERCIAL USE ONLY, ! # without charge, provided that this Notice and any statement of ! # authorship are reproduced on all copies. Neither the Government nor ! # the University makes any warranty, express or implied, or assumes any ! # liability or responsibility for the use of this SOFTWARE. # # If SOFTWARE is modified to produce derivative works, such modified # SOFTWARE should be clearly marked, so as not to confuse it with the --- 10,21 ---- # employee or employees of the University of California, operator of the # Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with # the U.S. Department of Energy. The U.S. Government has rights to use, ! # reproduce, and distribute this SOFTWARE. The public may copy, distribute, ! # prepare derivative works and publicly display this SOFTWARE without ! # charge, provided that this Notice and any statement of authorship are ! # reproduced on all copies. Neither the Government nor the University ! # makes any warranty, express or implied, or assumes any liability or ! # responsibility for the use of this SOFTWARE. # # If SOFTWARE is modified to produce derivative works, such modified # SOFTWARE should be clearly marked, so as not to confuse it with the Index: src/Pooma/tests/makefile =================================================================== RCS file: /home/pooma/Repository/r2/src/Pooma/tests/makefile,v retrieving revision 1.5 diff -c -p -r1.5 makefile *** src/Pooma/tests/makefile 2001/06/28 18:51:25 1.5 --- src/Pooma/tests/makefile 2001/10/13 02:25:48 *************** *** 10,21 **** # employee or employees of the University of California, operator of the # Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with # the U.S. Department of Energy. The U.S. Government has rights to use, ! # reproduce, and distribute this SOFTWARE, and to allow others to do so. ! # The public may copy and use this SOFTWARE, FOR NONCOMMERCIAL USE ONLY, ! # without charge, provided that this Notice and any statement of ! # authorship are reproduced on all copies. Neither the Government nor ! # the University makes any warranty, express or implied, or assumes any ! # liability or responsibility for the use of this SOFTWARE. # # If SOFTWARE is modified to produce derivative works, such modified # SOFTWARE should be clearly marked, so as not to confuse it with the --- 10,21 ---- # employee or employees of the University of California, operator of the # Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with # the U.S. Department of Energy. The U.S. Government has rights to use, ! # reproduce, and distribute this SOFTWARE. The public may copy, distribute, ! # prepare derivative works and publicly display this SOFTWARE without ! # charge, provided that this Notice and any statement of authorship are ! # reproduced on all copies. Neither the Government nor the University ! # makes any warranty, express or implied, or assumes any liability or ! # responsibility for the use of this SOFTWARE. # # If SOFTWARE is modified to produce derivative works, such modified # SOFTWARE should be clearly marked, so as not to confuse it with the Index: src/Pooma/tests/pooma.cpp =================================================================== RCS file: /home/pooma/Repository/r2/src/Pooma/tests/pooma.cpp,v retrieving revision 1.5 diff -c -p -r1.5 pooma.cpp *** src/Pooma/tests/pooma.cpp 2001/10/10 17:55:01 1.5 --- src/Pooma/tests/pooma.cpp 2001/10/13 02:25:48 *************** *** 10,21 **** // employee or employees of the University of California, operator of the // Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with // the U.S. Department of Energy. The U.S. Government has rights to use, ! // reproduce, and distribute this SOFTWARE, and to allow others to do so. ! // The public may copy and use this SOFTWARE, FOR NONCOMMERCIAL USE ONLY, ! // without charge, provided that this Notice and any statement of ! // authorship are reproduced on all copies. Neither the Government nor ! // the University makes any warranty, express or implied, or assumes any ! // liability or responsibility for the use of this SOFTWARE. // // If SOFTWARE is modified to produce derivative works, such modified // SOFTWARE should be clearly marked, so as not to confuse it with the --- 10,21 ---- // employee or employees of the University of California, operator of the // Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with // the U.S. Department of Energy. The U.S. Government has rights to use, ! // reproduce, and distribute this SOFTWARE. The public may copy, distribute, ! // prepare derivative works and publicly display this SOFTWARE without ! // charge, provided that this Notice and any statement of authorship are ! // reproduced on all copies. Neither the Government nor the University ! // makes any warranty, express or implied, or assumes any liability or ! // responsibility for the use of this SOFTWARE. // // If SOFTWARE is modified to produce derivative works, such modified // SOFTWARE should be clearly marked, so as not to confuse it with the Index: src/Utilities/NoInit.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Utilities/NoInit.h,v retrieving revision 1.2 diff -c -p -r1.2 NoInit.h *** src/Utilities/NoInit.h 2000/06/27 04:23:00 1.2 --- src/Utilities/NoInit.h 2001/10/13 02:25:48 *************** *** 10,21 **** // employee or employees of the University of California, operator of the // Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with // the U.S. Department of Energy. The U.S. Government has rights to use, ! // reproduce, and distribute this SOFTWARE, and to allow others to do so. ! // The public may copy and use this SOFTWARE, FOR NONCOMMERCIAL USE ONLY, ! // without charge, provided that this Notice and any statement of ! // authorship are reproduced on all copies. Neither the Government nor ! // the University makes any warranty, express or implied, or assumes any ! // liability or responsibility for the use of this SOFTWARE. // // If SOFTWARE is modified to produce derivative works, such modified // SOFTWARE should be clearly marked, so as not to confuse it with the --- 10,21 ---- // employee or employees of the University of California, operator of the // Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with // the U.S. Department of Energy. The U.S. Government has rights to use, ! // reproduce, and distribute this SOFTWARE. The public may copy, distribute, ! // prepare derivative works and publicly display this SOFTWARE without ! // charge, provided that this Notice and any statement of authorship are ! // reproduced on all copies. Neither the Government nor the University ! // makes any warranty, express or implied, or assumes any liability or ! // responsibility for the use of this SOFTWARE. // // If SOFTWARE is modified to produce derivative works, such modified // SOFTWARE should be clearly marked, so as not to confuse it with the Index: src/Utilities/PurifyConstructors.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Utilities/PurifyConstructors.h,v retrieving revision 1.4 diff -c -p -r1.4 PurifyConstructors.h *** src/Utilities/PurifyConstructors.h 2000/05/26 00:28:29 1.4 --- src/Utilities/PurifyConstructors.h 2001/10/13 02:25:48 *************** *** 10,21 **** // employee or employees of the University of California, operator of the // Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with // the U.S. Department of Energy. The U.S. Government has rights to use, ! // reproduce, and distribute this SOFTWARE, and to allow others to do so. ! // The public may copy and use this SOFTWARE, FOR NONCOMMERCIAL USE ONLY, ! // without charge, provided that this Notice and any statement of ! // authorship are reproduced on all copies. Neither the Government nor ! // the University makes any warranty, express or implied, or assumes any ! // liability or responsibility for the use of this SOFTWARE. // // If SOFTWARE is modified to produce derivative works, such modified // SOFTWARE should be clearly marked, so as not to confuse it with the --- 10,21 ---- // employee or employees of the University of California, operator of the // Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with // the U.S. Department of Energy. The U.S. Government has rights to use, ! // reproduce, and distribute this SOFTWARE. The public may copy, distribute, ! // prepare derivative works and publicly display this SOFTWARE without ! // charge, provided that this Notice and any statement of authorship are ! // reproduced on all copies. Neither the Government nor the University ! // makes any warranty, express or implied, or assumes any liability or ! // responsibility for the use of this SOFTWARE. // // If SOFTWARE is modified to produce derivative works, such modified // SOFTWARE should be clearly marked, so as not to confuse it with the Index: src/Utilities/TypeInfo.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Utilities/TypeInfo.h,v retrieving revision 1.1 diff -c -p -r1.1 TypeInfo.h *** src/Utilities/TypeInfo.h 2000/09/07 22:06:23 1.1 --- src/Utilities/TypeInfo.h 2001/10/13 02:25:48 *************** *** 10,21 **** // employee or employees of the University of California, operator of the // Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with // the U.S. Department of Energy. The U.S. Government has rights to use, ! // reproduce, and distribute this SOFTWARE, and to allow others to do so. ! // The public may copy and use this SOFTWARE, FOR NONCOMMERCIAL USE ONLY, ! // without charge, provided that this Notice and any statement of ! // authorship are reproduced on all copies. Neither the Government nor ! // the University makes any warranty, express or implied, or assumes any ! // liability or responsibility for the use of this SOFTWARE. // // If SOFTWARE is modified to produce derivative works, such modified // SOFTWARE should be clearly marked, so as not to confuse it with the --- 10,21 ---- // employee or employees of the University of California, operator of the // Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with // the U.S. Department of Energy. The U.S. Government has rights to use, ! // reproduce, and distribute this SOFTWARE. The public may copy, distribute, ! // prepare derivative works and publicly display this SOFTWARE without ! // charge, provided that this Notice and any statement of authorship are ! // reproduced on all copies. Neither the Government nor the University ! // makes any warranty, express or implied, or assumes any liability or ! // responsibility for the use of this SOFTWARE. // // If SOFTWARE is modified to produce derivative works, such modified // SOFTWARE should be clearly marked, so as not to confuse it with the Index: src/arch/DEC/complex.h =================================================================== RCS file: /home/pooma/Repository/r2/src/arch/DEC/complex.h,v retrieving revision 1.2 diff -c -p -r1.2 complex.h *** src/arch/DEC/complex.h 2000/04/25 17:28:24 1.2 --- src/arch/DEC/complex.h 2001/10/13 02:25:48 *************** *** 10,21 **** // employee or employees of the University of California, operator of the // Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with // the U.S. Department of Energy. The U.S. Government has rights to use, ! // reproduce, and distribute this SOFTWARE, and to allow others to do so. ! // The public may copy and use this SOFTWARE, FOR NONCOMMERCIAL USE ONLY, ! // without charge, provided that this Notice and any statement of ! // authorship are reproduced on all copies. Neither the Government nor ! // the University makes any warranty, express or implied, or assumes any ! // liability or responsibility for the use of this SOFTWARE. // // If SOFTWARE is modified to produce derivative works, such modified // SOFTWARE should be clearly marked, so as not to confuse it with the --- 10,21 ---- // employee or employees of the University of California, operator of the // Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with // the U.S. Department of Energy. The U.S. Government has rights to use, ! // reproduce, and distribute this SOFTWARE. The public may copy, distribute, ! // prepare derivative works and publicly display this SOFTWARE without ! // charge, provided that this Notice and any statement of authorship are ! // reproduced on all copies. Neither the Government nor the University ! // makes any warranty, express or implied, or assumes any liability or ! // responsibility for the use of this SOFTWARE. // // If SOFTWARE is modified to produce derivative works, such modified // SOFTWARE should be clearly marked, so as not to confuse it with the From oldham at codesourcery.com Mon Oct 15 21:18:11 2001 From: oldham at codesourcery.com (Jeffrey Oldham) Date: Mon, 15 Oct 2001 14:18:11 -0700 Subject: Patch: Remove Interpolation Header Files from Particles.h Message-ID: <20011015141811.A13456@codesourcery.com> 2001Oct11, Julian Cummings (cummings at linkline.com) indicated, By the way, the Oscillation and Bounce examples don't compile only because Pooma/Particles.h includes the interpolation headers, which refer to some obsolete Field code. Other than that, they are fine. So I could temporarily comment out the include of interpolation headers in Pooma/Particles.h if you'd like. This patch implements the idea. Code relying on the interpolations would fail to compile both before and after this patch, according to his comments. 2001-10-15 Jeffrey D. Oldham * Particles.h: Remove inclusion of all interpolation header files. Tested on sequential Linux using gcc3.1 by compiling Oscillation and Bounce examples Approved by Stephen Smith Applied to mainline Thanks, Jeffrey D. Oldham oldham at codesourcery.com -------------- next part -------------- Index: Particles.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Pooma/Particles.h,v retrieving revision 1.8 diff -c -p -r1.8 Particles.h *** Particles.h 2000/03/07 13:18:03 1.8 --- Particles.h 2001/10/15 19:40:11 *************** *** 59,70 **** #include "Particles/ReflectBC.h" #include "Particles/ReverseBC.h" - // Include files for particle/field interpolators - - #include "Particles/InterpolatorNGP.h" - #include "Particles/InterpolatorCIC.h" - #include "Particles/InterpolatorSUDS.h" - #endif // ACL:rcsinfo --- 59,64 ---- From oldham at codesourcery.com Tue Oct 16 17:40:21 2001 From: oldham at codesourcery.com (Jeffrey Oldham) Date: Tue, 16 Oct 2001 10:40:21 -0700 Subject: Nirvana Queues Message-ID: <200110161740.f9GHeLk31226@oz.codesourcery.com> Scott asked about queues for large jobs. Here is data from a WWW page, which I hope reflects reality. According to http://www.acl.lanl.gov/nirvana/userguide/Queues.html: shared - 1 to 112 shared (oversubscription allowed) processors - RUNLIMIT of 12 hours - n02 (and with much less preference, n01) small - 1 to 128 dedicated processors - RUNLIMIT of 12 hours - n03 and n06 through n16 medium - 129 to 1024 dedicated processors - active Wednesday nights from the end of maintenance to 8AM and weekends from 6PM Friday to 8AM Monday - RUNLIMIT of 12 hours - n09 through n16 large - 1025 to 1792 dedicated processors - active Wednesday nights from the end of maintenance to 8AM and weekends from 6PM Friday to 8AM Monday - RUNLIMIT of 12 hours - n03 through n16 Thanks, Jeffrey D. Oldham oldham at codesourcery.com From stephens at proximation.com Tue Oct 16 17:47:46 2001 From: stephens at proximation.com (Stephen Smith) Date: Tue, 16 Oct 2001 11:47:46 -0600 Subject: patch: fix license Message-ID: Fixed the license in the FileTemplates directory. (These were propagating themselves throughout the source.) Stephen <> -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: license.difs Type: application/octet-stream Size: 15350 bytes Desc: not available URL: From stephens at proximation.com Tue Oct 16 18:23:51 2001 From: stephens at proximation.com (Stephen Smith) Date: Tue, 16 Oct 2001 12:23:51 -0600 Subject: patch: benchmarks Message-ID: Refixed the old problem with opCount rolling over at 2 billion. Tested on Linux. (noticed when we ran on the SGI's which collectively have billions and billions of words of memory <> ) Stephen -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: bench.patch Type: application/octet-stream Size: 1260 bytes Desc: not available URL: From scotth at proximation.com Tue Oct 16 20:13:22 2001 From: scotth at proximation.com (Scott Haney) Date: Tue, 16 Oct 2001 14:13:22 -0600 Subject: Fixed Scalar Advection Message-ID: <3FA73F48-C272-11D5-B1D0-003065B33F5E@proximation.com> Yet another bug in PeriodicFaceBC: Index: PeriodicFaceBC.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Field/Relations/PeriodicFaceBC.h,v retrieving revision 1.2 diff -p -c -2 -r1.2 PeriodicFaceBC.h *** PeriodicFaceBC.h 2001/10/04 22:06:18 1.2 --- PeriodicFaceBC.h 2001/10/16 20:12:46 *************** public: *** 80,84 **** PeriodicFaceBC(const PeriodicFaceBC &init, const Target &t) : domain_m(t.totalDomain()), ! srcDomain_m(Pooma::NoInit()), face_m(init.face_m) { --- 80,84 ---- PeriodicFaceBC(const PeriodicFaceBC &init, const Target &t) : domain_m(t.totalDomain()), ! srcDomain_m(t.totalDomain()), face_m(init.face_m) { Stephen reviewed this patch. I will be moving an R1 test that Jim wrote over to R2. Scott -- Scott W. Haney Development Manager Proximation LLC 2960 Rodeo Park Drive West Santa Fe, NM 87505 Voice: 505-424-3809 x101 FAX: 505-438-4161 -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 1041 bytes Desc: not available URL: From wdn at lanl.gov Tue Oct 16 22:13:40 2001 From: wdn at lanl.gov (Dave Nystrom) Date: Tue, 16 Oct 2001 16:13:40 -0600 Subject: Patch to NewField/PrintField.h Message-ID: <15308.45332.573384.755065@saltydog.lanl.gov> Below is a copy of a patched version of NewField/PrintField.h from the Blanca branch. Could someone add the changes to the Blanca branch of Pooma2. It adds a couple of update and blockAndEvaluate calls necessary for running in parallel. Thanks, Dave Nystrom email: wdn at lanl.gov LANL X-3 phone: 505-667-7913 fax: 505-665-3046 --------------------------NewField/PrintField.h----------------------------- // -*- C++ -*- // ACL:license // ---------------------------------------------------------------------- // This software and ancillary information (herein called "SOFTWARE") // called POOMA (Parallel Object-Oriented Methods and Applications) is // made available under the terms described here. The SOFTWARE has been // approved for release with associated LA-CC Number LA-CC-98-65. // // Unless otherwise indicated, this SOFTWARE has been authored by an // employee or employees of the University of California, operator of the // Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with // the U.S. Department of Energy. The U.S. Government has rights to use, // reproduce, and distribute this SOFTWARE. The public may copy, distribute, // prepare derivative works and publicly display this SOFTWARE without // charge, provided that this Notice and any statement of authorship are // reproduced on all copies. Neither the Government nor the University // makes any warranty, express or implied, or assumes any liability or // responsibility for the use of this SOFTWARE. // // If SOFTWARE is modified to produce derivative works, such modified // SOFTWARE should be clearly marked, so as not to confuse it with the // version available from LANL. // // For more information about POOMA, send e-mail to pooma at acl.lanl.gov, // or visit the POOMA web page at http://www.acl.lanl.gov/pooma/. // ---------------------------------------------------------------------- // ACL:license //----------------------------------------------------------------------------- // Classes: // PrintField - information and routines used to print out a // Field to a stream. //----------------------------------------------------------------------------- #ifndef POOMA_NEWFIELD_PRINTFIELD_H #define POOMA_NEWFIELD_PRINTFIELD_H //----------------------------------------------------------------------------- // Overview: // // PrintField // - Extract the elements of a Field and print out the // contents to a stream with some nice formatting. The user can select // how many elements to print per line, the precision, format, etc. // This is done by constructing an PrintField, and calling the // 'print' method with the stream to print to and the field to print. //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- // Includes: //----------------------------------------------------------------------------- #include "Utilities/PAssert.h" #include //----------------------------------------------------------------------------- // Forward References: //----------------------------------------------------------------------------- class PrintField; //----------------------------------------------------------------------------- // // Full Description: // // PrintField is a utility program for ConstField and Field object, used // to print (nicely) the contents of an field to a provided stream. All // the data in the field will be printed in ascii format; if you want to // display just a portion of an field, take a view of the field and give // that to the print() method. // // CONSTRUCTING A PrintField: // -------------------------- // When you construct a PrintField, you can give it several format parameters // to control how to display the field. These parameters are, in the // order they are given in the constructor (all have default values): // // domain width: the number of spaces that will be used to print out domain // numbers. If it is 3, say, then domains will be printed like // [003:008] // - query setting with "domainWidth()" // - change setting with "setDomainWidth(int newval)" // // data width: the number of spaces, total, used to print out data values. // - query setting with "dataWidth()" // - change setting with "setDataWidth(int newval)" // // data precision: the number of digits past the decimal point displayed // when data values are printed // - query setting with "dataPrecision()" // - change setting with "setDataPrecision(int newval)" // // carriage return: if this value is < 0, then for each row of values from // the field, no carriage return is printed until the end // of the row. If this number is > 0, it represents the // maximum number of values that will be printed before a // return. Only the first set of numbers for a row of // the field will have a domain prefix included. // - query setting with "carReturn()" // - change setting with "setCarReturn(int newval)" // // scientific notation: a boolean flag, if true numbers are printed using // scientific notation, e.g. 10e-14 // - query setting with "scientific()" // - change setting with "setScientific(bool newflag)" // // data spacing: the number of spaces to print between values // - query setting with "spacing()" // - change setting with "setSpacing(int newval)" // // PRINTING FIELDE OBJECTS WITH A PrintField: // ----------------------------------------- // PrintField is not templated, so that you can reuse the same formatter // for different fields. It has one templated member function 'print': // // template // void print(S &s, const A &a) const // // where 'S' must be an object with an ostream-like interface (such as // cout, or an Inform object), and 'A' must be an object with a Field // interface. 'print' will take data from A and print it to the stream // using the current format settings. // // 1-D fields just have the one row printed, perhaps on multiple lines // if carReturn is > 0. 2-D fields are printed as a table, with each // line prefixed by the domain it includes. For example: // [00:02][00] = 0 0 0 // [00:02][01] = 0 0 0 // prints the values for [0:2][0:1] of a 2D field. 3-D and higher arrays // have a sequence of 2-D slices printed for them, each slice separated // by a line indicating which slice it is, and a separator. Example: // [0:2:1][0:3:1][2]: // ---------------------------------------------------- // [00:02][00][02] = 0 0 0 // [00:02][01][02] = 0 0 0 // [00:02][02][02] = 0 0 0 // [00:02][03][02] = 0 0 0 // //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- // Open POOMA namespace: //----------------------------------------------------------------------------- // namespace POOMA { //----------------------------------------------------------------------------- // PerformPrintField struct: a simple wrapper around the templated 'print' // method of PrintField. This is here as a workaround to a Metrowerks // problem that prevents having templated member functions defined as // out-of-line. This struct defines one static method 'print', which // prints an field to a stream (the two template parameters). The Dim // parameter is used to specialize this to the case of a 1D domain. This is // called by the 'print' templated member function of PrintField. //----------------------------------------------------------------------------- template struct PerformPrintField { static void print(const PrintField &, S &, const A &); }; template struct PerformPrintField { static void print(const PrintField &, S &, const A &); }; //----------------------------------------------------------------------------- // PrintAarry class declaration //----------------------------------------------------------------------------- class PrintField { public: //============================================================ // Constructors. //============================================================ //------------------------------------------------------------ // Construct an PrintField object with an field, and the settings for // how the field should be printed. PrintField(int domainWidth = 3, int dataWidth = 10, int dataPrecision = 4, int carReturn = -1, bool scientific = false, int spacing = 1) : domainwidth_m(domainWidth), datawidth_m(dataWidth), dataprecision_m(dataPrecision), carreturn_m(carReturn), spacing_m(spacing), scientific_m(scientific) { PAssert(domainwidth_m > 0); PAssert(datawidth_m > 0); PAssert(dataprecision_m > 0); PAssert(spacing_m >= 0); } //------------------------------------------------------------ // Copy constructor. PrintField(const PrintField &a) : domainwidth_m(a.domainwidth_m), datawidth_m(a.datawidth_m), dataprecision_m(a.dataprecision_m), carreturn_m(a.carreturn_m), scientific_m(a.scientific_m) { } //============================================================ // Destructor. //============================================================ ~PrintField() { } //============================================================ // PrintField print methods. //============================================================ //------------------------------------------------------------ // print this field to the given stream. This just invokes a // static method in an external class in order to get around a // Metrowerks bug. template void print(S &s, const A &a) const { int n = a.numSubFields(); if (n == 0) { PerformPrintField::print(*this, s, a); } else { for (int i = 0; i < n; i++) { s << "subfield #" << i << ":\n"<< "-------------\n"; print(s, a[i]); } } } //============================================================ // PrintField format settings accessors. //============================================================ //------------------------------------------------------------ // get/set the number of places used to print out domain numbers int domainWidth() const { return domainwidth_m; } void setDomainWidth(int val) { domainwidth_m = val; PAssert(domainwidth_m > 0); } //------------------------------------------------------------ // get/set the number of places used to print out field data values int dataWidth() const { return datawidth_m; } void setDataWidth(int val) { datawidth_m = val; PAssert(datawidth_m > 0); } //------------------------------------------------------------ // get/set the precision of the field data values int dataPrecision() const { return dataprecision_m; } void setDataPrecision(int val) { dataprecision_m = val; PAssert(dataprecision_m > 0); } //------------------------------------------------------------ // get/set the number of carriage returns used int carReturn() const { return carreturn_m; } void setCarReturn(int val) { carreturn_m = val; } //------------------------------------------------------------ // get/set the flag indicating whether to use scientific notation bool scientific() const { return scientific_m; } void setScientific(bool val) { scientific_m = val; } //------------------------------------------------------------ // get/set the number of spaces between numbers int spacing() const { return spacing_m; } void setSpacing(int val) { spacing_m = val; PAssert(spacing_m >= 0); } private: //------------------------------------------------------------ // The width for domain numbers. int domainwidth_m; //------------------------------------------------------------ // The width for field element values. int datawidth_m; //------------------------------------------------------------ // The precision of the field element values. int dataprecision_m; //------------------------------------------------------------ // How long before a carriage return is printed. int carreturn_m; //------------------------------------------------------------ // The number of spaces between values. int spacing_m; //------------------------------------------------------------ // Should scientific notation be used? bool scientific_m; }; //----------------------------------------------------------------------------- // PerformPrintField print method definition. // print takes data from an field, and prints it nicely to a stream. // S is a template parameter for an ostream-like object. // A is a template parameter for a Field-like object. // This is the 1-D specialized case. //----------------------------------------------------------------------------- template void PerformPrintField::print(const PrintField &p, S &s, const A &a) { // make sure this is the right function CTAssert(A::dimensions == 1); // Output should update the field before printing. John Hall a.update(); Pooma::blockAndEvaluate(); // determine the domain and domain-iterator type in the given field typedef typename A::Domain_t Domain_t; typedef typename Domain_t::const_iterator Iterator_t; // create an iterator over the domain of the field Iterator_t griditer = a.domain().begin(); Iterator_t enditer = a.domain().end(); // print out the prefix s << "["; if (a.domain()[0].first() < 0) s.fill(' '); else s.fill('0'); s.width(p.domainWidth()); s << a.domain()[0].first() << ":"; if (a.domain()[0].last() < 0) s.fill(' '); else s.fill('0'); s.width(p.domainWidth()); s << a.domain()[0].last() << "] = "; s.fill(' '); // loop over the elements, printing out values as necessary int i, printed = 0; while (griditer != enditer) { // determine the number of spaces to print first int spacing = 0; if (printed > 0) { spacing = p.spacing(); if (p.carReturn() >= 0 && printed >= p.carReturn()) { s << "\n"; spacing = 2*p.domainWidth() + 6; printed = 0; } } // print out spaces for (i=0; i < spacing; ++i) s << " "; // print the number if (p.scientific()) s.setf(std::ios::scientific); s.precision(p.dataPrecision()); s.width(p.dataWidth()); s << a.read(*griditer); // increment iterator and counter ++griditer; ++printed; } // print final newline when done s << "\n"; } //----------------------------------------------------------------------------- // PerformPrintField print method definition. // print takes data from an field, and prints it nicely to a stream. // S is a template parameter for an ostream-like object. // A is a template parameter for a Field-like object. // This is the N-D general case, for N > 1. It prints out 2D 'slices' for // the first two dimensions, and loops over the other dimensions. //----------------------------------------------------------------------------- template void PerformPrintField::print(const PrintField &p, S &s, const A &a) { int i, j, k; // make sure this is the right function CTAssert(A::dimensions == Dim && Dim > 1); // Output should update the field before printing. John Hall a.update(); Pooma::blockAndEvaluate(); // determine the domain and domain-iterator type in the given field typedef typename A::Domain_t Domain_t; typedef typename Domain_t::Element_t Element_t; typedef typename Domain_t::const_iterator Iterator_t; // create an iterator over the domain of the field Iterator_t griditer = a.domain().begin(); Iterator_t enditer = a.domain().end(); // get 1-D domains info for the first two dimensions, and use these sizes // to determine how to do the inner dimensional loops Element_t x0 = a.domain()[0].first(); Element_t x1 = a.domain()[0].last(); Element_t xs = a.domain()[0].stride(); Element_t y0 = a.domain()[1].first(); Element_t y1 = a.domain()[1].last(); Element_t ys = a.domain()[1].stride(); // Start looping over all the elements. We can stop printing when // we hit the end of the griditer. We print out 2D slices, and for // higher dimensions, we print out a line saying which slice is coming // up next, for example: // [1:5:1][2:8:1][2][4][0]: // ------------------------------------------- while (griditer != enditer) { // print out the higher-dim size statement, if necessary if (Dim > 2) { s << '\n' << a.domain()[0] << a.domain()[1]; for (i=2; i < Dim; ++i) s << "[" << (*griditer)[i].first() << "]"; s << ":" << '\n'; s << "----------------------------------------------------\n"; } // loop over all the elements of the next 2D slice now for (j=y0; j <= y1; j += ys) { // print out the prefix for the next 2D slice line s << "["; if (x0 < 0) s.fill(' '); else s.fill('0'); s.width(p.domainWidth()); s << x0 << ":"; if (x1 < 0) s.fill(' '); else s.fill('0'); s.width(p.domainWidth()); s << x1 << "]"; for (i=1; i < Dim; ++i) { s << "["; if ((*griditer)[i].first() < 0) s.fill(' '); else s.fill('0'); s.width(p.domainWidth()); s << (*griditer)[i].first() << "]"; } s.fill(' '); s << " = "; // print all the values along this 1-D strip int printed = 0; for (i=x0; i <= x1; i += xs) { // determine the number of spaces to print first int spacing = 0; if (printed > 0) { spacing = p.spacing(); if (p.carReturn() >= 0 && printed >= p.carReturn()) { s << '\n'; spacing = (Dim + 1)*(p.domainWidth() + 2) + 4; printed = 0; } } // print out spaces for (k=0; k < spacing; ++k) s << ' '; // print the number if (p.scientific()) s.setf(std::ios::scientific); s.precision(p.dataPrecision()); s.width(p.dataWidth()); s << a.read(*griditer); // increment iterator and counter ++griditer; ++printed; } // print final newline when done with this line s << '\n'; } } } // } // namespace Pooma #endif // POOMA_NEWFIELD_PRINTFIELD_H // ACL:rcsinfo // ---------------------------------------------------------------------- // $RCSfile: PrintField.h,v $ $Author: oldham $ // $Revision: 1.3 $ $Date: 2001/03/29 18:17:32 $ // ---------------------------------------------------------------------- // ACL:rcsinfo From wdn at lanl.gov Tue Oct 16 22:26:40 2001 From: wdn at lanl.gov (Dave Nystrom) Date: Tue, 16 Oct 2001 16:26:40 -0600 Subject: Patch to NewField/Field.h (3/3) Message-ID: <200110162226.f9GMQeX02802@saltydog.lanl.gov> } //----------------------------------------------------------------------------- // Functions for getting the number of materials for Arrays and Fields. // // This is complicated because of the recursive nature of sub-field storage. // We assume that multi-material fields are constructed by replicating // a centering. This means that // (1) multi-material fields must have sub-fields; if not, there is one // material // (2) if there is one sub-field at the top level, there is one material // (3) if there are multiple sub-fields and those have sub-fields themselves, // we assume they represent materials // (4) if there are multiple sub-fields and they do not have sub-fields, // they represent materials if the data is replicated //----------------------------------------------------------------------------- template inline int numMaterials(const Array &a) { return 1; } template int numMaterials(const Field &f) { int n0 = f.numSubFields(); if (n0 < 2) { return 1; } else { int n1 = f[0].numSubFields(); if (n1 > 0) { return n1; } else if (f[0].fieldEngine().offsets() == f[1].fieldEngine().offsets()) { return n0; } else { return 1; } } } //----------------------------------------------------------------------------- // Functions for getting the number of centering points for Arrays and Fields. // We assume that multi-material fields are constructed by replicating // a centering. The analysis goes much like numMaterials above. //----------------------------------------------------------------------------- template inline int centeringSize(const Array &a) { return 1; } template int centeringSize(const Field &f) { int n0 = f.numSubFields(); if (n0 == 0) { return 1; } else { int n1 = f[0].numSubFields(); if (n1 == 0) { if (n0 == 1 || f[0].fieldEngine().offsets() == f[1].fieldEngine().offsets()) { return 1; } else { return n0; } } else { return n1; } } } //----------------------------------------------------------------------------- // Functions for taking subfield views of Arrays and Fields. //----------------------------------------------------------------------------- template inline Array &subField(Array &a, int, int) { return a; } template typename SubFieldView >::Type_t subField(const Field &f, int m, int c) { int n0 = f.numSubFields(); if (n0 == 0) { PAssert(m == 0); PAssert(c == 0); return f; } else { if (m == 0) { PAssert(c < n0); return f[c]; } else if (c == 0) { PAssert(m < n0); return f[m]; } else { return subField(f[m], 0, c); } } } #endif // POOMA_NEWFIELD_FIELD_H // ACL:rcsinfo // ---------------------------------------------------------------------- // $RCSfile: Field.h,v $ $Author: haney $ // $Revision: 1.16.2.1 $ $Date: 2001/09/21 19:42:25 $ // ---------------------------------------------------------------------- // ACL:rcsinfo From wdn at lanl.gov Tue Oct 16 22:26:40 2001 From: wdn at lanl.gov (Dave Nystrom) Date: Tue, 16 Oct 2001 16:26:40 -0600 Subject: Patch to NewField/Field.h (2/3) Message-ID: <200110162226.f9GMQeJ02801@saltydog.lanl.gov> // Model-initializer constructor. Used by SubFieldView and // View1Implementation above and by MakeFieldReturn in FieldCreateLeaf.h. template Field(const Field &model, const Initializer &i) : fieldEngine_m(model.fieldEngine(), i) { } // Centering-Model constructor. This version differs from the one above // in that it constructs a field with uninitialized engines with a new // centering. The new field gets its mesh and domain information from // the model field. template Field(const Centering &baseInit, const Field &model) : fieldEngine_m(baseInit, model.fieldEngine()) { } //--------------------------------------------------------------------------- // Empty destructor is fine for us. ~Field() { } //--------------------------------------------------------------------------- // Accessors. inline const Engine_t &engine() const { return fieldEngine_m.engine(); } inline const FieldEngine_t &fieldEngine() const { return fieldEngine_m; } inline FieldEngine_t &fieldEngine() { return fieldEngine_m; } inline int numSubFields() const { return fieldEngine_m.numSubFields(); } inline const Domain_t physicalCellDomain() const { return fieldEngine_m.physicalCellDomain(); } inline Domain_t totalCellDomain() const { return fieldEngine_m.totalCellDomain(); } Domain_t physicalDomain(int iSubfield) const { return fieldEngine_m.physicalDomain(iSubfield); } Domain_t totalDomain(int iSubfield) const { return fieldEngine_m.totalDomain(iSubfield); } Domain_t physicalDomain() const { return fieldEngine_m.physicalDomain(); } Domain_t totalDomain() const { return fieldEngine_m.totalDomain(); } Domain_t domain() const { return fieldEngine_m.physicalDomain(); } Layout_t layout() const { return fieldEngine_m.engine().layout(); } //--------------------------------------------------------------------------- // Instruct the field to make its own copy of its data. // Recursively call ourself with subfield views of this field. When we're // through, tell the fieldEngine to make a distinct copy of itself. void makeOwnCopy() { if (numSubFields() == 0) { // Make a distinct copy of the fieldEngine. fieldEngine_m.makeOwnCopy(*this); } else { for (int i = 0; i < numSubFields(); i++) (*this)[i].makeOwnCopy(); } } //--------------------------------------------------------------------------- // Sub-field view creation function. // A field consists of (potentially) several sub-fields. This function // returns a view of one of these. inline typename SubFieldView::Type_t operator[](int iSubfield) const { typedef SubFieldView Ret_t; return Ret_t::make(*this, iSubfield); } //--------------------------------------------------------------------------- // View-creation operations. These operator() and read() functions take // zero or more sub-domains, which combine to form a domain with // dimensionality identical to the rank of the field. The zero argument // version returns a view of the physical domain and the 'All'-suffixed // versions return a view of the total domain. inline typename View1::ReadType_t read() const { typedef View1 Ret_t; return Ret_t::makeRead(*this, physicalDomain()); } inline typename View1::ReadType_t readAll() const { typedef View1 Ret_t; return Ret_t::makeRead(*this, totalDomain()); } template inline typename View1::ReadType_t read(const Sub1 &s1) const { typedef View1 Ret_t; return Ret_t::makeRead(*this, s1); } template inline typename View2::ReadType_t read(const Sub1 &s1, const Sub2 &s2) const { typedef View2 Ret_t; return Ret_t::makeRead(*this, s1, s2); } template inline typename View3::ReadType_t read(const Sub1 &s1, const Sub2 &s2, const Sub3 &s3) const { typedef View3 Ret_t; return Ret_t::makeRead(*this, s1, s2, s3); } inline typename View1::Type_t operator()() const { typedef View1 Ret_t; return Ret_t::make(*this, physicalDomain()); } inline typename View1::Type_t all() const { typedef View1 Ret_t; return Ret_t::make(*this, totalDomain()); } template inline typename View1::Type_t operator()(const Sub1 &s1) const { typedef View1 Ret_t; return Ret_t::make(*this, s1); } template inline typename View2::Type_t operator()(const Sub1 &s1, const Sub2 &s2) const { typedef View2 Ret_t; return Ret_t::make(*this, s1, s2); } template inline typename View3::Type_t operator()(const Sub1 &s1, const Sub2 &s2, const Sub3 &s3) const { typedef View3 Ret_t; return Ret_t::make(*this, s1, s2, s3); } //--------------------------------------------------------------------------- // Component-forwarding functions. These work quite similar to the ones from // Array except we produce a Field with the same GeometryTag. inline typename ComponentView, This_t>::Type_t comp(const int &i1) const { return ComponentView, This_t>::make(*this, Loc<1>(i1)); } inline typename ComponentView, This_t>::Type_t comp(int i1, int i2) const { return ComponentView, This_t>::make(*this, Loc<2>(i1, i2)); } template inline typename ComponentView::Type_t comp(const Components &loc) const { return ComponentView::make(*this, loc); } //--------------------------------------------------------------------------- // Patch accessor functions returns the i'th patch. inline typename Patch::Type_t patchLocal(EnginePatch::PatchID_t i) const { return Patch::make(*this, i); } inline int numPatchesLocal() const { return engineFunctor(engine(), EngineNumPatches()); } //--------------------------------------------------------------------------- // Copy assignment operators. We pack this assignment expression into a // PETE binary expression tree node and then use this to construct an // array with an expression engine. We then pass this on to an evaluator, // which handles the computation. The first three versions handle assigning // Arrays and ConstArrays to Arrays and the fourth one handles assigning // scalars. This_t &operator=(const This_t &rhs) { assign(*this, rhs, OpAssign()); return *this; } const This_t &operator=(const This_t &rhs) const { return assign(*this, rhs, OpAssign()); } template const This_t &operator=(const T1 &rhs) const { return assign(*this, rhs, OpAssign()); } //--------------------------------------------------------------------------- // Op-assignment operators. // Addition. template const This_t &operator+=(const T1 &rhs) const { return assign(*this, rhs, OpAddAssign()); } // Subtraction. template const This_t &operator-=(const T1 &rhs) const { return assign(*this, rhs, OpSubtractAssign()); } // Multiplication. template const This_t &operator*=(const T1 &rhs) const { return assign(*this, rhs, OpMultiplyAssign()); } // Division. template const This_t &operator/=(const T1 &rhs) const { return assign(*this, rhs, OpDivideAssign()); } // Modulus. template const This_t &operator%=(const T1 &rhs) const { return assign(*this, rhs, OpModAssign()); } // Bitwise-Or. template const This_t &operator|=(const T1 &rhs) const { return assign(*this, rhs, OpBitwiseOrAssign()); } // Bitwise-And. template const This_t &operator&=(const T1 &rhs) const { return assign(*this, rhs, OpBitwiseAndAssign()); } // Bitwise-Xor. template const This_t &operator^=(const T1 &rhs) const { return assign(*this, rhs, OpBitwiseXorAssign()); } // Left shift. template const This_t &operator<<=(const T1 &rhs) const { return assign(*this, rhs, OpLeftShiftAssign()); } // Right shift. template const This_t &operator>>=(const T1 &rhs) const { return assign(*this, rhs, OpRightShiftAssign()); } //--------------------------------------------------------------------------- // Automatic update support. template void addUpdater(const Category &bc) { if (numSubFields() == 0) { fieldEngine_m.updaters().addUpdater(createUpdater(*this, bc)); } else { for (int i = 0; i < numSubFields(); i++) (*this)[i].addUpdater(bc); } } template void addUpdaters(const UpdaterIntitializer &init) { init(*this); } void removeUpdaters() { if (numSubFields() == 0) fieldEngine_m.updaters().erase(); else { for (int i = 0; i < numSubFields(); i++) (*this)[i].removeUpdaters(); } } void update(bool makeDirty = false) const { if (numSubFields() == 0) { if (makeDirty) fieldEngine_m.updaters().setDirty(); fieldEngine_m.updaters().notifyPreRead(); } else { for (int i = 0; i < numSubFields(); i++) (*this)[i].update(makeDirty); } } void setDirty() const { if (numSubFields() == 0) { fieldEngine_m.updaters().setDirty(); } else { for (int i = 0; i < numSubFields(); i++) (*this)[i].setDirty(); } } void clearDirty() const { if (numSubFields() == 0) { fieldEngine_m.updaters().clearDirty(); } else { for (int i = 0; i < numSubFields(); i++) (*this)[i].clearDirty(); } } private: FieldEngine_t fieldEngine_m; }; //---------------------------------------------------------------------- // Set up a little traits class that distinguishes between OpAssign and // other assignment operators that read the LHS. //---------------------------------------------------------------------- template struct AssignOpReadWriteTraits { enum { readLHS = true }; }; template<> struct AssignOpReadWriteTraits { enum { readLHS = false }; }; //---------------------------------------------------------------------- // Apply the ConformTag to the leaves of the tree. // Check to see if a given Field conforms. //---------------------------------------------------------------------- template struct LeafFunctor, ConformTag > { typedef bool Type_t; static Type_t apply1(const Interval &d, const ConformTag &ct) { return conforms(d, ct); } template static Type_t apply1(const Interval &d, const ConformTag &ct) { return false; } static Type_t apply(const Field &f, const ConformTag &ct) { return apply1(f.physicalDomain(), ct); } }; //---------------------------------------------------------------------- // This specialization of LeafFunctor is used to pass the // DataObjectRequest functor down into the FieldEngine. The default // behavior, given in the functor below, is to just pass it on to the // fieldEngine's engine. //---------------------------------------------------------------------- template struct LeafFunctor, DataObjectRequest > { typedef Field Subject_t; typedef typename Subject_t::FieldEngine_t FieldEngine_t; typedef LeafFunctor > LeafFunctor_t; typedef typename LeafFunctor_t::Type_t Type_t; enum { dataObject = LeafFunctor_t::dataObject }; inline static Type_t apply(const Subject_t &f, const DataObjectRequest &functor) { return LeafFunctor_t::apply(field.fieldEngine(), functor); } }; template struct LeafFunctor, DataObjectRequest > { typedef typename FieldEngine::Engine_t Engine_t; enum { dataObject = Engine_t::dataObject }; typedef typename DataObjectRequest::Type_t Type_t; inline static Type_t apply(const FieldEngine &f, const DataObjectRequest &functor) { return DataObjectApply::apply(f.engine(), functor); } }; //----------------------------------------------------------------------------- // This specialization of LeafFunctor is used to get the domain type or the // (zero-based) domain itself from a Field. Used only by Expression-Engine. //----------------------------------------------------------------------------- template struct LeafFunctor, DomainFunctorTag> { typedef typename Field::Domain_t Type_t; inline static Type_t apply(const Field &f, const DomainFunctorTag &) { // Return zero-based domain. return f.physicalDomain() - f.physicalDomain().firsts(); } }; //----------------------------------------------------------------------------- // This specialization of LeafFunctor is used to pass the ExpressionApply // functor // down into the FieldEngine. The default behavior, given in the functor // below, is to just pass it on to the fieldEngine's engine. //----------------------------------------------------------------------------- template struct LeafFunctor, ExpressionApply > { typedef Field Subject_t; typedef typename Subject_t::FieldEngine_t FieldEngine_t; typedef LeafFunctor > LeafFunctor_t; typedef int Type_t; inline static Type_t apply(const Subject_t &field, const ExpressionApply &tag) { return LeafFunctor_t::apply(field.fieldEngine(), tag); } }; template struct LeafFunctor, ExpressionApply > { typedef FieldEngine Subject_t; typedef typename Subject_t::Base_t Base_t; typedef LeafFunctor > LeafFunctor_t; typedef int Type_t; inline static Type_t apply(const Subject_t &fieldEngine, const ExpressionApply &tag) { return LeafFunctor_t::apply(fieldEngine, tag); } }; template struct LeafFunctor, EngineView > { typedef Field Subject_t; typedef typename Subject_t::Engine_t Engine_t; typedef typename LeafFunctor >::Type_t NewEngine_t; typedef typename NewEngine_t::Tag_t NewEngineTag_t; // Don't bother computing NewGeometry tag yet. // For now all EngineView operations are equivalent to Interval views. typedef Field Type_t; inline static Type_t apply(const Subject_t &field, const EngineView &tag) { return Type_t(field, tag); } }; //----------------------------------------------------------------------------- // Handle general engine functor requests. //----------------------------------------------------------------------------- template struct LeafFunctor, EngineFunctorTag > { typedef typename Field::Engine_t Engine_t; typedef typename EngineFunctor::Type_t Type_t; inline static Type_t apply(const Field &field, const EngineFunctorTag &tag) { return EngineFunctor::apply(field.engine(), tag.tag()); } }; //--------------------------------------------------------------------------- // A specialization of EngineFunctor for field. //--------------------------------------------------------------------------- template struct EngineFunctor, Tag> { typedef typename Field::Engine_t Engine_t; typedef typename EngineFunctor::Type_t Type_t; inline static Type_t apply(const Field &field, const Tag &tag) { return engineFunctor(field.engine(), tag); } }; //----------------------------------------------------------------------------- // This version of LeafFunctor is used by Expression-Engines to used to // evaluate a Field using indices. //----------------------------------------------------------------------------- template struct LeafFunctor, EvalLeaf > { typedef typename Field::Element_t Type_t; inline static Type_t apply(const Field &f, const EvalLeaf &t) { return t.eval(f.engine()); } }; //----------------------------------------------------------------------------- // These leaf functor specializations are used to notify a field or expression // that it is going to be read and, therefore, needs to update itself. // // The first LeafFunctor represents default behavior, which is to do nothing. // The second handles fields other than those with expression-engines by simply // calling update(). The third passes the tag to the leaves. // // Fields with engines that store internal fields AND don't copy those // fields' updaters to its list must provide a specialization to get the // internal fields to update. // // NOTE: we don't use the ExpressionApply machinery here because this really // operate on the engines. // //----------------------------------------------------------------------------- struct PerformUpdateTag { POOMA_PURIFY_CONSTRUCTORS(PerformUpdateTag) }; template struct LeafFunctor { typedef int Type_t; inline static Type_t apply(const Node &, const PerformUpdateTag &) { return 0; } }; template struct LeafFunctor, PerformUpdateTag> { typedef Field Subject_t; typedef int Type_t; inline static Type_t apply(const Subject_t &f, const PerformUpdateTag &) { f.update(); return 0; } }; template struct LeafFunctor >, PerformUpdateTag> { typedef Field > Subject_t; typedef int Type_t; inline static Type_t apply(const Subject_t &f, const PerformUpdateTag &tag) { forEach(f.engine().expression(), tag, NullCombine()); return 0; } }; //----------------------------------------------------------------------------- // This version of LeafFunctor is used to determine the type resulting from a // sub-field view. //----------------------------------------------------------------------------- template struct LeafFunctor, SubFieldViewFunctorTag> { typedef Field Type_t; }; template struct LeafFunctor, SubFieldViewFunctorTag> { typedef Scalar Type_t; }; //----------------------------------------------------------------------------- // This specialization of LeafFunctor is used to apply a view (subsetting) // operation to a Field. The domain will always be zero-based since this // is used only by Expression-Engine. This is why we add the firsts() to // the domain. //----------------------------------------------------------------------------- template struct LeafFunctor, ViewFunctorTag > { typedef typename View1, Domain>::Type_t Type_t; }; //----------------------------------------------------------------------------- // Overload the << operator to print a Field to a stream. This // uses the 'PrintField' class to perform the formatting of the data. // It will create a default printer, print out the field with it, and // return the stream object. //----------------------------------------------------------------------------- template std::ostream &operator<<(std::ostream &o, const Field &cf) { Pooma::blockAndEvaluate(); PrintField().print(o, cf); return o; } template std::fstream &operator<<(std::fstream &f, const Field &cf) { Pooma::blockAndEvaluate(); PrintField().print(f, cf); return f; } //----------------------------------------------------------------------------- // assign() function for Field assign-op array. //----------------------------------------------------------------------------- template const Field & assign(const Field &lhs, const Array &rhs, const Op &op) { int nsf = lhs.numSubFields(); if (nsf != 0) { // We need to take sub-field views in order to get at all of the // internal fields. for (int i = 0; i < nsf; i++) assign(lhs[i], rhs, op); } else { if (AssignOpReadWriteTraits::readLHS) lhs.update(); // Evaluate. Evaluator().evaluate(lhs, op, rhs); // Having done the evaluation, we need to notify the LHS // that we've just written. lhs.setDirty(); } return lhs; } //----------------------------------------------------------------------------- // assign() function for Field assign-op Field. //----------------------------------------------------------------------------- template const Field & assign(const Field &lhs, const Field &rhs, const Op &op) { int nsf = lhs.numSubFields(); if (nsf != 0) { // We need to take sub-field views in order to get at all of the // internal fields. for (int i = 0; i < nsf; i++) assign(lhs[i], rhs[i], op); } else { // We need to notify the RHS and, when not doing pure assignment, the // LHS that we are getting ready to read. forEach(rhs, PerformUpdateTag(), NullCombine()); if (AssignOpReadWriteTraits::readLHS) lhs.update(); // Evaluate. Evaluator().evaluate(lhs, op, rhs); // Having done the evaluation, we need to notify the LHS // that we've just written. lhs.setDirty(); } return lhs; } //----------------------------------------------------------------------------- // assign() function for Field assign-op scalar. //----------------------------------------------------------------------------- template const Field & assign(const Field &lhs, const T1 &rhs, const Op &op) { int nsf = lhs.numSubFields(); if (nsf != 0) { // We need to take sub-field views in order to get at all of the // internal fields. for (int i = 0; i < nsf; i++) assign(lhs[i], rhs, op); } else { if (AssignOpReadWriteTraits::readLHS) lhs.update(); // Make an array out of the scalar. typedef Field LHS_t; Array rhsExpr(lhs.physicalDomain()); rhsExpr.engine().setConstant(rhs); // Evaluate. Evaluator().evaluate(lhs, op, rhsExpr); // Having done the evaluation, we need to notify the LHS // that we've just written. lhs.setDirty(); } return lhs; } //----------------------------------------------------------------------------- // assign() function for Array assign-op Field. //----------------------------------------------------------------------------- template const Array & assign(const Array &lhs, const Field &rhs, const Op &op) { forEach(rhs, PerformUpdateTag(), NullCombine()); Evaluator().evaluate(lhs, op, rhs); return lhs; } //----------------------------------------------------------------------------- // Compute whether or not a Field is currently compressed. // // This is only a sensible thing to do if there are no subfields, hence the // assertion. //----------------------------------------------------------------------------- template inline bool compressed(const Field &f) { PAssert(f.numSubFields() == 0); return compressed(f.engine()); } //----------------------------------------------------------------------------- // Compute the fraction of the total domain that is currently compressed. // // This is only a sensible thing to do if there are no subfields, hence the // assertion. //----------------------------------------------------------------------------- template inline double compressedFraction( const Field > &f) { PAssert(f.numSubFields() == 0); return compressedFraction(f.engine()); } //----------------------------------------------------------------------------- // (Try to) compress all the patches of the Field. Only need to do work with // multipatch engines. //----------------------------------------------------------------------------- template void compress(Field > &) { if (numSubFields() == 0) { compress(f.engine()); } else { for (int i = 0; i < numSubFields(); i++) compress(f[i]); } } //----------------------------------------------------------------------------- // Manually uncompress all the patches of the Field. Only need to do work with // multipatch engines. //----------------------------------------------------------------------------- template void uncompress(Field > &f) { From wdn at lanl.gov Tue Oct 16 22:26:40 2001 From: wdn at lanl.gov (Dave Nystrom) Date: Tue, 16 Oct 2001 16:26:40 -0600 Subject: Patch to NewField/Field.h (1/3) Message-ID: <200110162226.f9GMQe202800@saltydog.lanl.gov> Below is a patched version of NewField/Field.h. One change eliminates the use of "sv" which eliminates a ton of templates that could not be explicitly instantiated. The fix was proposed by Jim Crotinger. The second change is adding a const qualifier to allow compilation by KCC in strict mode. This was a change by John Hall. Could someone make these changes to the Blanca cvs branch of Pooma 2? Thanks, Dave Nystrom email: wdn at lanl.gov LANL X-3 phone: 505-667-7913 fax: 505-665-3046 --------------------------NewField/Field.h------------------------------- // -*- C++ -*- // ACL:license // ---------------------------------------------------------------------- // This software and ancillary information (herein called "SOFTWARE") // called POOMA (Parallel Object-Oriented Methods and Applications) is // made available under the terms described here. The SOFTWARE has been // approved for release with associated LA-CC Number LA-CC-98-65. // // Unless otherwise indicated, this SOFTWARE has been authored by an // employee or employees of the University of California, operator of the // Los Alamos National Laboratory under Contract No. W-7405-ENG-36 with // the U.S. Department of Energy. The U.S. Government has rights to use, // reproduce, and distribute this SOFTWARE. The public may copy, distribute, // prepare derivative works and publicly display this SOFTWARE without // charge, provided that this Notice and any statement of authorship are // reproduced on all copies. Neither the Government nor the University // makes any warranty, express or implied, or assumes any liability or // responsibility for the use of this SOFTWARE. // // If SOFTWARE is modified to produce derivative works, such modified // SOFTWARE should be clearly marked, so as not to confuse it with the // version available from LANL. // // For more information about POOMA, send e-mail to pooma at acl.lanl.gov, // or visit the POOMA web page at http://www.acl.lanl.gov/pooma/. // ---------------------------------------------------------------------- // ACL:license //----------------------------------------------------------------------------- // Classes: // Field //----------------------------------------------------------------------------- #ifndef POOMA_NEWFIELD_FIELD_H #define POOMA_NEWFIELD_FIELD_H //----------------------------------------------------------------------------- // Overview: // // Field // - ties together the notions of field-category and mesh. //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- // Includes: //----------------------------------------------------------------------------- #include "Array/Array.h" #include "Domain/CombineDomainOpt.h" #include "Domain/NewDomain.h" #include "Engine/ConstantFunctionEngine.h" #include "Engine/Engine.h" #include "Engine/EnginePatch.h" #include "Engine/ExpressionEngine.h" #include "Evaluator/Evaluator.h" #include "PETE/PETE.h" #include "Pooma/View.h" #include "Utilities/PAssert.h" #include "Utilities/RefCountedBlockPtr.h" // NOTE: The current order of includes puts FieldCreateLeaf after the // operators files to work around a bug with template instantiation in KCC. #include "NewField/FieldMakeReturn.h" #include "NewField/FieldOperators.h" #include "NewField/PoomaFieldOperators.h" #include "NewField/VectorFieldOperators.h" #include "NewField/FieldCreateLeaf.h" #include "NewField/PrintField.h" #include "NewField/FieldEngine/FieldEnginePatch.h" //----------------------------------------------------------------------------- // Forward declarations: //----------------------------------------------------------------------------- struct CompressibleBrick; template class Field; template class FieldEngine; template struct MultiPatch; template struct NoGeometry; struct POOMA_DEFAULT_ENGINE_TYPE; template class SubFieldView; template struct View1Implementation; //----------------------------------------------------------------------------- // Prototypes for the assign function used to assign an expression to a Field. // // Prototypes defined here: // Field = Field // Field = Array // Field = scalar /// // If you wish to have Field work with other types of objects on the right- // hand side (for example, other classes that derive from Field), define // extra assign() functions that take the following arguments: // // assign(Field, yourclass, Operator) // // where "yourclass" is the class that you would like to work on the // right-hand side in an expression with a Field on the left-hand side. //----------------------------------------------------------------------------- template const Field & assign(const Field &lhs, const Field &rhs, const Op &op); template const Field & assign(const Field &lhs, const Array &rhs, const Op &op); template const Field & assign(const Field &lhs, const T1 &rhs, const Op &op); template const Array & assign(const Array &lhs, const Field &rhs, const Op &op); //----------------------------------------------------------------------------- // SubFieldView is used to implement the syntax f[i], which selects the // ith SubField for field f. //----------------------------------------------------------------------------- struct SubFieldViewFunctorTag; template class SubFieldView > { public: // Use it to construct the output field type. typedef Field Type_t; // The function that actually creates the view. inline static Type_t make(const Type_t &s, int iSubField) { #if POOMA_BOUNDS_CHECK PInsist(iSubField >= 0 && iSubField < s.numSubFields(), "Field::operator[] indexing error."); #endif return Type_t(s, iSubField); } }; template class SubFieldView > > { public: // Use it to construct the output field type. typedef Field > Subject_t; typedef typename ForEach::Type_t Expr_t; typedef Field > Type_t; // The function that actually creates the view. inline static Type_t make(const Subject_t &s, int iSubField) { #if POOMA_BOUNDS_CHECK PInsist(iSubField >= 0 && iSubField < s.numSubFields(), "Field::operator[] indexing error."); #endif return Type_t(s, iSubField); } }; //----------------------------------------------------------------------------- // View1Implementation specialization for indexing a field // with a single domain. There is a single-valued version (SV == true) // and a multi-valued version (SV == false). //----------------------------------------------------------------------------- // Single-valued version. Handles scalars and Locs. template struct View1Implementation, Domain, true> { // Convenience typedef for the thing we're taking a view of. typedef Field Subject_t; // All views need to get types from the FieldEngine class to avoid // recursion. typedef FieldEngine FieldEngine_t; typedef typename FieldEngine_t::Engine_t Engine_t; // The return types are pretty simple here. typedef typename Engine_t::Element_t ReadType_t; typedef typename Engine_t::ElementRef_t Type_t; template inline static Type_t make(const Subject_t &f, const S1 &s1, const Combine &) { PAssert(f.numSubFields() == 0); Domain s(Combine::make(f, s1)); #if POOMA_BOUNDS_CHECK PInsist(contains(f.totalDomain(), s), "Field view bounds error."); #endif return f.engine()(s); } template inline static Type_t make(const Subject_t &f, const S1 &s1, const S2 &s2, const Combine &) { PAssert(f.numSubFields() == 0); Domain s(Combine::make(f, s1, s2)); #if POOMA_BOUNDS_CHECK PInsist(contains(f.totalDomain(), s), "Field view bounds error."); #endif return f.engine()(s); } template inline static Type_t make(const Subject_t &f, const S1 &s1, const S2 &s2, const S3 &s3, const Combine &) { PAssert(f.numSubFields() == 0); Domain s(Combine::make(f, s1, s2, s3)); #if POOMA_BOUNDS_CHECK PInsist(contains(f.totalDomain(), s), "Field view bounds error."); #endif return f.engine()(s); } template inline static ReadType_t makeRead(const Subject_t &f, const S1 &s1, const Combine &) { PAssert(f.numSubFields() == 0); Domain s(Combine::make(f, s1)); #if POOMA_BOUNDS_CHECK PInsist(contains(f.totalDomain(), s), "Field view bounds error."); #endif return f.engine().read(s); } template inline static ReadType_t makeRead(const Subject_t &f, const S1 &s1, const S2 &s2, const Combine &) { PAssert(f.numSubFields() == 0); Domain s(Combine::make(f, s1, s2)); #if POOMA_BOUNDS_CHECK PInsist(contains(f.totalDomain(), s), "Field view bounds error."); #endif return f.engine().read(s); } template inline static ReadType_t makeRead(const Subject_t &f, const S1 &s1, const S2 &s2, const S3 &s3, const Combine &) { PAssert(f.numSubFields() == 0); Domain s(Combine::make(f, s1, s2, s3)); #if POOMA_BOUNDS_CHECK PInsist(contains(f.totalDomain(), s), "Field view bounds error."); #endif return f.engine().read(s); } }; // Non-single-valued implementation. Works for general domains // including Nodes and INodes. // Use this little traits class to deduce the geometry tag for a view. // It is always a NoGeometry unless the view is from an interval or // an INode. template struct NewGeometryTag { typedef NoGeometry Type_t; }; template struct NewGeometryTag > { typedef GeometryTag Type_t; }; template struct NewGeometryTag > { typedef GeometryTag Type_t; }; template struct View1Implementation, Domain, false> { // Convenience typedef for the thing we're taking a view of. typedef Field Subject_t; // All views need to get types from the FieldEngine class to avoid // recursion. typedef FieldEngine FieldEngine_t; // Deduce domains for the output type. typedef typename FieldEngine_t::Engine_t Engine_t; typedef typename NewEngine::Type_t NewEngine_t; typedef typename NewEngine_t::Element_t NewT_t; typedef typename NewEngine_t::Tag_t NewEngineTag_t; // Deduce the new GeometryTag. typedef typename NewGeometryTag::Type_t NewGeometryTag_t; // The output types. typedef Field ReadType_t; typedef Field Type_t; template static Type_t make(const Subject_t &f, const S1 &s1, const Combine &) { Domain s(Combine::make(f, s1)); #if POOMA_BOUNDS_CHECK PInsist(contains(f.totalDomain(), s), "Field view bounds error."); #endif return Type_t(f, s); } template static Type_t make(const Subject_t &f, const S1 &s1, const S2 &s2, const Combine &) { Domain s(Combine::make(f, s1, s2)); #if POOMA_BOUNDS_CHECK PInsist(contains(f.totalDomain(), s), "Field view bounds error."); #endif return Type_t(f, s); } template static Type_t make(const Subject_t &f, const S1 &s1, const S2 &s2, const S3 &s3, const Combine &) { Domain s(Combine::make(f, s1, s2, s3)); #if POOMA_BOUNDS_CHECK PInsist(contains(f.totalDomain(), s), "Field view bounds error."); #endif return Type_t(f, s); } template inline static Type_t makeRead(const Subject_t &f, const S1 &s1, const Combine &c) { return make(f, s1, c); } template inline static Type_t makeRead(const Subject_t &f, const S1 &s1, const S2 &s2, const Combine &c) { return make(f, s1, s2, c); } template inline static Type_t makeRead(const Subject_t &f, const S1 &s1, const S2 &s2, const S3 &s3, const Combine &c) { return make(f, s1, s2, s3, c); } }; //----------------------------------------------------------------------------- // View1 specialization for indexing a field with a single domain. //----------------------------------------------------------------------------- template struct View1, Sub1> { // Convenience typedef for the thing we're taking a view of. typedef Field Subject_t; // All views need to get types from the FieldEngine class to avoid // recursion. typedef FieldEngine FieldEngine_t; // Deduce domains for the output type. // At some point, we need to fix NewDomain1; until then, use // the temporary version from NewDomain.h. typedef typename FieldEngine_t::Domain_t Domain_t; typedef TemporaryNewDomain1 NewDomain_t; typedef typename NewDomain_t::SliceType_t SDomain_t; // Deduce appropriate version of implementation to dispatch to. // static const bool sv = DomainTraits::singleValued; typedef View1Implementation::singleValued> Dispatch_t; // The optimized domain combiner. typedef CombineDomainOpt::singleValued> Combine_t; // The return types. typedef typename Dispatch_t::ReadType_t ReadType_t; typedef typename Dispatch_t::Type_t Type_t; // The functions that create the view. inline static Type_t make(const Subject_t &f, const Sub1 &s1) { return Dispatch_t::make(f, s1, Combine_t()); } inline static ReadType_t makeRead(const Subject_t &f, const Sub1 &s1) { return Dispatch_t::makeRead(f, s1, Combine_t()); } }; //----------------------------------------------------------------------------- // View1 specialization for indexing a field with an int. //----------------------------------------------------------------------------- template struct View1, int> { // Convenience typedef for the thing we're taking a view of. typedef Field Subject_t; // All views need to get types from the FieldEngine class to avoid // recursion. typedef FieldEngine FieldEngine_t; typedef typename FieldEngine_t::Engine_t Engine_t; // The return types. typedef typename Engine_t::Element_t ReadType_t; typedef typename Engine_t::ElementRef_t Type_t; // The functions that do the indexing. inline static Type_t make(const Subject_t &f, int s1) { PAssert(f.numSubFields() == 0); #if POOMA_BOUNDS_CHECK PInsist(contains(f.totalDomain(), Loc<1>(s1)), "Field view bounds error."); #endif return f.engine()(s1); } inline static ReadType_t makeRead(const Subject_t &f, int s1) { PAssert(f.numSubFields() == 0); #if POOMA_BOUNDS_CHECK PInsist(contains(f.totalDomain(), Loc<1>(s1)), "Field view bounds error."); #endif return f.engine().read(s1); } }; //----------------------------------------------------------------------------- // View2 specialization for indexing a field with two // domains. //----------------------------------------------------------------------------- template struct View2, Sub1, Sub2> { // Convenience typedef for the thing we're taking a view of. typedef Field Subject_t; // All views need to get types from the FieldEngine class to avoid // recursion. typedef FieldEngine FieldEngine_t; // Deduce domains for the output type. typedef typename FieldEngine_t::Domain_t Domain_t; typedef NewDomain2 NewDomain_t; typedef typename NewDomain_t::SliceType_t SDomain_t; // Deduce appropriate version of implementation to dispatch to. // static const bool sv = DomainTraits::singleValued; typedef View1Implementation::singleValued> Dispatch_t; // The optimized domain combiner. typedef CombineDomainOpt::singleValued> Combine_t; // The return types. typedef typename Dispatch_t::ReadType_t ReadType_t; typedef typename Dispatch_t::Type_t Type_t; // The functions that create the view. inline static Type_t make(const Subject_t &f, const Sub1 &s1, const Sub2 &s2) { return Dispatch_t::make(f, s1, s2, Combine_t()); } inline static ReadType_t makeRead(const Subject_t &f, const Sub1 &s1, const Sub2 &s2) { return Dispatch_t::makeRead(f, s1, s2, Combine_t()); } }; //----------------------------------------------------------------------------- // View2 specialization for indexing a field with two // integers. //----------------------------------------------------------------------------- template struct View2, int, int> { // Convenience typedef for the thing we're taking a view of. typedef Field Subject_t; // All views need to get types from the FieldEngine class to avoid // recursion. typedef FieldEngine FieldEngine_t; typedef typename FieldEngine_t::Engine_t Engine_t; // The return types. typedef typename Engine_t::Element_t ReadType_t; typedef typename Engine_t::ElementRef_t Type_t; // The functions that do the indexing. inline static Type_t make(const Subject_t &f, int s1, int s2) { PAssert(f.numSubFields() == 0); #if POOMA_BOUNDS_CHECK PInsist(contains(f.totalDomain(), Loc<2>(s1, s2)), "Field view bounds error."); #endif return f.engine()(s1, s2); } inline static ReadType_t makeRead(const Subject_t &f, int s1, int s2) { PAssert(f.numSubFields() == 0); #if POOMA_BOUNDS_CHECK PInsist(contains(f.totalDomain(), Loc<2>(s1, s2)), "Field view bounds error."); #endif return f.engine().read(s1, s2); } }; //----------------------------------------------------------------------------- // View3 specialization for indexing a field with three // domains. //----------------------------------------------------------------------------- template struct View3, Sub1, Sub2, Sub3> { // Convenience typedef for the thing we're taking a view of. typedef Field Subject_t; // All views need to get types from the FieldEngine class to avoid // recursion. typedef FieldEngine FieldEngine_t; // Deduce domains for the output type. typedef typename FieldEngine_t::Domain_t Domain_t; typedef NewDomain3 NewDomain_t; typedef typename NewDomain_t::SliceType_t SDomain_t; // Deduce appropriate version of implementation to dispatch to. // static const bool sv = DomainTraits::singleValued; typedef View1Implementation::singleValued> Dispatch_t; // The optimized domain combiner. typedef CombineDomainOpt::singleValued> Combine_t; // The return types. typedef typename Dispatch_t::ReadType_t ReadType_t; typedef typename Dispatch_t::Type_t Type_t; // The functions that create the view. inline static Type_t make(const Subject_t &f, const Sub1 &s1, const Sub2 &s2, const Sub3 &s3) { return Dispatch_t::make(f, s1, s2, s3, Combine_t()); } inline static ReadType_t makeRead(const Subject_t &f, const Sub1 &s1, const Sub2 &s2, const Sub3 &s3) { return Dispatch_t::makeRead(f, s1, s2, s3, Combine_t()); } }; //----------------------------------------------------------------------------- // View3 specialization for indexing a field with three // integers. //----------------------------------------------------------------------------- template struct View3, int, int, int> { // Convenience typedef for the thing we're taking a view of. typedef Field Subject_t; // All views need to get types from the FieldEngine class to avoid // recursion. typedef FieldEngine FieldEngine_t; typedef typename FieldEngine_t::Engine_t Engine_t; // The return types. typedef typename Engine_t::Element_t ReadType_t; typedef typename Engine_t::ElementRef_t Type_t; // The functions that do the indexing. inline static Type_t make(const Subject_t &f, int s1, int s2, int s3) { PAssert(f.numSubFields() == 0); #if POOMA_BOUNDS_CHECK PInsist(contains(f.totalDomain(), Loc<3>(s1, s2, s3)), "Field view bounds error."); #endif return f.engine()(s1, s2, s3); } inline static ReadType_t makeRead(const Subject_t &f, int s1, int s2, int s3) { PAssert(f.numSubFields() == 0); #if POOMA_BOUNDS_CHECK PInsist(contains(f.totalDomain(), Loc<3>(s1, s2, s3)), "Field view bounds error."); #endif return f.engine().read(s1, s2, s3); } }; //----------------------------------------------------------------------------- // Patch specialization for Field. //----------------------------------------------------------------------------- template struct Patch; template struct Patch > { typedef Field Subject_t; typedef FieldEngine FieldEngine_t; typedef typename FieldEngine_t::Engine_t OldEngine_t; typedef typename EngineFunctor::Type_t Engine_t; // We've assumed that GeometryTag and T are the same for the patch engine. typedef Field Type_t; enum { dim = OldEngine_t::dimensions }; inline static Type_t make(const Subject_t &f, int i) { PAssert(f.numSubFields() == 0); return Type_t(f, FieldEnginePatch(i, f.physicalDomain())); } }; template struct Patch > > { typedef Field > Subject_t; typedef FieldEngine FieldEngine_t; typedef typename FieldEngine_t::Engine_t OldEngine_t; typedef typename EngineFunctor::Type_t Engine_t; // We've assumed that GeometryTag and T are the same for the patch engine. typedef Field Type_t; enum { dim = OldEngine_t::dimensions }; typedef typename OldEngine_t::Layout_t Layout_t; typedef typename Layout_t::Value_t Node_t; inline static Type_t make(const Subject_t &f, int i) { PAssert(f.numSubFields() == 0); Node_t *node = f.engine().layout().nodeListLocal()[i]; return Type_t(f, FieldEnginePatch(i, intersect(f.physicalDomain(), node->domain()))); } }; //----------------------------------------------------------------------------- // ComponentView specialization for Field. Implements views of the form // f.comp(loc). //----------------------------------------------------------------------------- template struct ComponentView; template class ComponentWrapper { public: explicit ComponentWrapper(const Components &c) : c_m(c) { } const Components &components() const { return c_m; } private: const Components &c_m; }; template struct ComponentView > { // Convenience typedef for the thing we're taking a component view of. typedef Field Subject_t; // All views need to get types from the FieldEngine class to avoid // recursion. typedef FieldEngine FieldEngine_t; typedef typename FieldEngine_t::Engine_t Engine_t; // Deduce the template parameters for the output type. typedef typename Engine_t::Element_t Element_t; typedef typename ComponentAccess::Element_t NewT_t; typedef CompFwd NewEngineTag_t; // The output type. typedef Field Type_t; // A function that creates the view. inline static Type_t make(const Subject_t &f, const Components &c) { return Type_t(f, ComponentWrapper(c)); } }; //----------------------------------------------------------------------------- // Field. //----------------------------------------------------------------------------- template class Field { public: //--------------------------------------------------------------------------- // Exported typedefs and enumerations. // The specification type. typedef GeometryTag GeometryTag_t; // The type. typedef T T_t; // The engine tag. typedef EngineTag EngineTag_t; // This class. typedef Field This_t; // The field engine type. typedef FieldEngine FieldEngine_t; // The dimension (i.e., the number of indices required to select a point). enum { dimensions = FieldEngine_t::dimensions }; // The engine type. typedef Engine Engine_t; // Element_t is the type of elements managed by this field's engine. // ElementRef_t is the writable version. typedef typename Engine_t::Element_t Element_t; typedef typename Engine_t::ElementRef_t ElementRef_t; // Layout_t is the Engine's layout. typedef typename Engine_t::Layout_t Layout_t; // The types of the our domains. typedef typename Engine_t::Domain_t Domain_t; //--------------------------------------------------------------------------- // User-callable constructors. These ctors are meant to be called by users. // GeometryTag/centering/layout constructors. We use the specified mesh // object to initialize our mesh and the layout to initialize // the engines. Clearly, these must be synchronized. This is appropriate // for multi-patch engines. We just store the centering. Field() : fieldEngine_m() { } template explicit Field(const I1 &i1) : fieldEngine_m(i1) { } template Field(const I1 &i1, const I2 &i2) : fieldEngine_m(i1, i2) { } template Field(const I1 &i1, const I2 &i2, const I3 &i3) : fieldEngine_m(i1, i2, i3) { } template Field(const I1 &i1, const I2 &i2, const I3 &i3, const I4 &i4) : fieldEngine_m(i1, i2, i3, i4) { } // Copy constructor. Field(const This_t &model) : fieldEngine_m(model.fieldEngine()) { } // Copy initializer. void initialize(const This_t &model) { fieldEngine_m = model.fieldEngine(); } //--------------------------------------------------------------------------- // Internal POOMA constructors. These ctors are used internally by POOMA. From oldham at codesourcery.com Tue Oct 16 22:44:11 2001 From: oldham at codesourcery.com (Jeffrey Oldham) Date: Tue, 16 Oct 2001 15:44:11 -0700 Subject: [pooma-dev] Patch to NewField/PrintField.h In-Reply-To: <15308.45332.573384.755065@saltydog.lanl.gov>; from wdn@lanl.gov on Tue, Oct 16, 2001 at 04:13:40PM -0600 References: <15308.45332.573384.755065@saltydog.lanl.gov> Message-ID: <20011016154411.A32223@codesourcery.com> On Tue, Oct 16, 2001 at 04:13:40PM -0600, Dave Nystrom wrote: > Below is a copy of a patched version of NewField/PrintField.h from the Blanca > branch. Could someone add the changes to the Blanca branch of Pooma2. It > adds a couple of update and blockAndEvaluate calls necessary for running in > parallel. I'm working on it. Thanks, Jeffrey D. Oldham oldham at codesourcery.com From oldham at codesourcery.com Tue Oct 16 22:54:06 2001 From: oldham at codesourcery.com (Jeffrey Oldham) Date: Tue, 16 Oct 2001 15:54:06 -0700 Subject: [pooma-dev] Patch to NewField/PrintField.h In-Reply-To: <15308.45332.573384.755065@saltydog.lanl.gov>; from wdn@lanl.gov on Tue, Oct 16, 2001 at 04:13:40PM -0600 References: <15308.45332.573384.755065@saltydog.lanl.gov> Message-ID: <20011016155406.A32585@codesourcery.com> On Tue, Oct 16, 2001 at 04:13:40PM -0600, Dave Nystrom wrote: > Below is a copy of a patched version of NewField/PrintField.h from the Blanca > branch. Could someone add the changes to the Blanca branch of Pooma2. It > adds a couple of update and blockAndEvaluate calls necessary for running in > parallel. Scott, would you please verify my use of a.applyRelations() rather than a.update()? OK to commit this patch? 2001-10-16 Jeffrey D. Oldham These changes were suggested by Dave Nystrom and John Hall's use of 'blanca-2001Oct01'. * PrintField.h (PerformPrintField::print): Ensure the field is up-to-date before printing. (PerformPrintField::print): Likewise. Tested on sequential Linux using gcc3.1 by running src/Field/tests/FieldTour[123] Approved by ???you??? Applied to mainline Thanks, Jeffrey D. Oldham oldham at codesourcery.com -------------- next part -------------- Index: PrintField.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Field/PrintField.h,v retrieving revision 1.3 diff -c -p -r1.3 PrintField.h *** PrintField.h 2001/08/30 01:15:07 1.3 --- PrintField.h 2001/10/16 22:54:24 *************** PerformPrintField::print(const Pr *** 377,382 **** --- 377,387 ---- CTAssert(A::dimensions == 1); + // Output should update the field before printing. + + a.applyRelations(); + Pooma::blockAndEvaluate(); + // determine the domain and domain-iterator type in the given field typedef typename A::Domain_t Domain_t; *************** PerformPrintField::print(const *** 462,467 **** --- 467,477 ---- // make sure this is the right function CTAssert(A::dimensions == Dim && Dim > 1); + + // Output should update the field before printing. + + a.applyRelations(); + Pooma::blockAndEvaluate(); // determine the domain and domain-iterator type in the given field From oldham at codesourcery.com Tue Oct 16 23:01:13 2001 From: oldham at codesourcery.com (Jeffrey Oldham) Date: Tue, 16 Oct 2001 16:01:13 -0700 Subject: Nirvana Queue Question Message-ID: <200110162301.f9GN1D232637@oz.codesourcery.com> I was trying to execute bsub -K -q shared -n 49 'mpirun -np 49 ./SGI64KCC/Doof2d --sim-params 2800 0 1 --num-patches 7 --run-impls 5 --pooma-stats --pooma-nocompress -mpi > results_mpi_5_p49_400_7' && pprof -m >> field_mpi_5_p49_400_7 The job got stuck for over an hour. Do you think this is user error or did the job allocator refuse to allocate the job because every possible 49-processor chunk already had something running? Note the latter does not make since because there are more shared jobs running than the 112 nodes running them. Also note I experienced no such problem yesterday with similar jobs up to 36 processors. Thanks for the information, Jeffrey D. Oldham oldham at codesourcery.com From oldham at codesourcery.com Tue Oct 16 23:37:49 2001 From: oldham at codesourcery.com (Jeffrey Oldham) Date: Tue, 16 Oct 2001 16:37:49 -0700 Subject: Patch: blockAndEvaluate() ABC runSetup() Message-ID: <20011016163749.B32673@codesourcery.com> 2001-10-16 Jeffrey D. Oldham * ABC.h (AbcP2::runSetup): Add blockAndEvaluate() so the benchmark timing is more accurate. Tested on sequential Linux using gcc3.1 by running ABC Approved by Stephen Smith Applied to mainline Thanks, Jeffrey D. Oldham oldham at codesourcery.com -------------- next part -------------- Index: ABC.h =================================================================== RCS file: /home/pooma/Repository/r2/benchmarks/ABCTest/ABC.h,v retrieving revision 1.31 diff -c -p -r1.31 ABC.h *** ABC.h 2001/10/16 18:26:09 1.31 --- ABC.h 2001/10/16 23:37:13 *************** public: *** 449,454 **** --- 449,455 ---- b_m = 0.0; c_m = 1000.0; + Pooma::blockAndEvaluate(); } private: From oldham at codesourcery.com Wed Oct 17 02:05:16 2001 From: oldham at codesourcery.com (Jeffrey Oldham) Date: Tue, 16 Oct 2001 19:05:16 -0700 Subject: RFA: Patch: Fix Parallel Performance of PrintField.h Message-ID: <20011016190516.A3425@codesourcery.com> This request replaces my early request. Scott, would you please verify my use of a.applyRelations() rather than a.update(), for the mainline? Anyone, OK to commit these two patches? **** Patch to 'mainline' 2001-10-16 Jeffrey D. Oldham These changes were suggested by Dave Nystrom and John Hall's use of 'blanca-2001Oct01'. * PrintField.h (PerformPrintField::print): Ensure the field is up-to-date before printing. (PerformPrintField::print): Likewise. Mainline: Tested on sequential Linux using gcc3.1 by running src/Field/tests/FieldTour[123] blanca-2001Oct01: Tested on sequential Linux using gcc3.1 by running src/Field/tests/FieldTour[12] Approved by ???you??? Thanks, Jeffrey D. Oldham oldham at codesourcery.com -------------- next part -------------- Index: PrintField.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Field/PrintField.h,v retrieving revision 1.3 diff -c -p -r1.3 PrintField.h *** PrintField.h 2001/08/30 01:15:07 1.3 --- PrintField.h 2001/10/16 22:54:24 *************** PerformPrintField::print(const Pr *** 377,382 **** --- 377,387 ---- CTAssert(A::dimensions == 1); + // Output should update the field before printing. + + a.applyRelations(); + Pooma::blockAndEvaluate(); + // determine the domain and domain-iterator type in the given field typedef typename A::Domain_t Domain_t; *************** PerformPrintField::print(const *** 462,467 **** --- 467,477 ---- // make sure this is the right function CTAssert(A::dimensions == Dim && Dim > 1); + + // Output should update the field before printing. + + a.applyRelations(); + Pooma::blockAndEvaluate(); // determine the domain and domain-iterator type in the given field -------------- next part -------------- Index: PrintField.h =================================================================== RCS file: /home/pooma/Repository/r2/src/NewField/Attic/PrintField.h,v retrieving revision 1.3 diff -c -p -r1.3 PrintField.h *** PrintField.h 2001/03/29 18:17:32 1.3 --- PrintField.h 2001/10/17 00:19:53 *************** PerformPrintField::print(const Pr *** 379,384 **** --- 379,389 ---- CTAssert(A::dimensions == 1); + // Output should update the field before printing. + + a.update(); + Pooma::blockAndEvaluate(); + // determine the domain and domain-iterator type in the given field typedef typename A::Domain_t Domain_t; *************** PerformPrintField::print(const *** 464,469 **** --- 469,479 ---- // make sure this is the right function CTAssert(A::dimensions == Dim && Dim > 1); + + // Output should update the field before printing. + + a.update(); + Pooma::blockAndEvaluate(); // determine the domain and domain-iterator type in the given field From oldham at codesourcery.com Wed Oct 17 02:58:22 2001 From: oldham at codesourcery.com (Jeffrey Oldham) Date: Tue, 16 Oct 2001 19:58:22 -0700 Subject: r1, MPI, and doof2d: What is Wrong? Message-ID: <20011016195822.B3425@codesourcery.com> Attached is the the r1 version of doof2d. I have tried to run it using MPI, but it keeps falling over, probably because I do not know how to use MPI or I am too tired. Is the problem and a solution obvious? > mpirun -np 1 ./doof2d --comm MPI --nofieldcompression 400 1 > results_mpi_p1_400_1 MPI: MPI_COMM_WORLD rank 0 has terminated without calling MPI_Finalize() MPI: aborting job mpirun -np 1 ./doof2d --comm MPI --nofieldcompression 400 1 > results_mpi_p1_400_1 died at ./r1-Doof2d-tester.pl line 28. > mpirun -np 4 ./doof2d --comm MPI --nofieldcompression 800 2 > results_mpi_p4_400_2 MPI: MPI_COMM_WORLD rank 3 has terminated without calling MPI_Finalize() MPI: aborting job mpirun -np 4 ./doof2d --comm MPI --nofieldcompression 800 2 > results_mpi_p4_400_2 died at ./r1-Doof2d-tester.pl line 28. Pooma r1 was configured with './conf SGI64 KAI OPTIMIZE MPI'. Thanks, Jeffrey D. Oldham oldham at codesourcery.com -------------- next part -------------- /*************************************************************************** * * The POOMA Framework * * This program was prepared by the Regents of the University of * California at Los Alamos National Laboratory (the University) under * Contract No. W-7405-ENG-36 with the U.S. Department of Energy (DOE). * The University has certain rights in the program pursuant to the * contract and the program should not be copied or distributed outside * your organization. All rights in the program are reserved by the DOE * and the University. Neither the U.S. Government nor the University * makes any warranty, express or implied, or assumes any liability or * responsibility for the use of this software * * Visit http://www.acl.lanl.gov/POOMA for more details * ***************************************************************************/ #include #include #include "Pooma.h" // Command-line arguments: // 0. executable name // 1. N = sizeX = sizeY = size of a side of the domain // 2. nuPatches = total number of patches in the entire domain int main(int argc, char *argv[]) { Pooma pooma(argc,argv); Inform msg("doof2d"); const int Parent = 0; if (argc < 3 && Pooma::Comm->myNode() == Parent) { msg << argv[0] << ": ... domain-size number-patches\n"; return !0; } const int sizeX = strtol(argv[argc-2], static_cast(0), 0); const int nuPatches = strtol(argv[argc-1], static_cast(0), 0); const int sizeY = sizeX; const int centerX = sizeX / 2; const int centerY = sizeY / 2; const int iterations = 5; const unsigned Dim=2; Index I(sizeX); Index J(sizeY); FieldLayout layout(I,J,PARALLEL,PARALLEL, nuPatches, nuPatches); Field A(layout,GuardCellSizes(1)); Field B(layout,GuardCellSizes(1)); A = 0.0; B = 0.0; B[centerX][centerY] = 1000.0; const double fact = 1.0/9.0; PoomaTimings::TimerRef val = PoomaTimings::getTimer("doof2d timer"); PoomaTimings::startTimer(val); for(int iter = 0 ; iter < iterations ; iter++ ) { assign(A[I][J], fact*(B[I+1][J+1] + B[I+1][J ] + B[I+1][J-1] + B[I ][J+1] + B[I ][J ] + B[I ][J-1] + B[I-1][J+1] + B[I-1][J ] + B[I-1][J-1])); assign(B[I][J], fact*(A[I+1][J+1] + A[I+1][J ] + A[I+1][J-1] + A[I ][J+1] + A[I ][J ] + A[I ][J-1] + A[I-1][J+1] + A[I-1][J ] + A[I-1][J-1])); } PoomaTimings::stopTimer(val); if (Pooma::Comm->myNode() == Parent) { msg << "Correctness value = " << B[centerX][centerY] << endl; PoomaTimings::print(); } return 0; } /*************************************************************************** * $RCSfile: doof2d.cpp,v $ $Author: julianc $ * $Revision: 1.9 $ $Date: 1998/04/17 00:19:00 $ * POOMA_VERSION_ID: $Id: doof2d.cpp,v 1.9 1998/04/17 00:19:00 julianc Exp $ ***************************************************************************/ From scotth at proximation.com Wed Oct 17 15:05:18 2001 From: scotth at proximation.com (Scott Haney) Date: Wed, 17 Oct 2001 09:05:18 -0600 Subject: [pooma-dev] RFA: Patch: Fix Parallel Performance of PrintField.h In-Reply-To: <20011016190516.A3425@codesourcery.com> Message-ID: <6084279C-C310-11D5-AEEA-003065B33F5E@proximation.com> Jeffrey, The patch to the mainline is unnecessary. This change is already done, but in a slightly different way. See the code in the print() function. Your patch to the blanca branch is OK. Scott On Tuesday, October 16, 2001, at 08:05 PM, Jeffrey Oldham wrote: > This request replaces my early request. > > Scott, would you please verify my use of a.applyRelations() rather > than a.update(), for the mainline? > > Anyone, OK to commit these two patches? > -- Scott W. Haney Development Manager Proximation LLC 2960 Rodeo Park Drive West Santa Fe, NM 87505 Voice: 505-424-3809 x101 FAX: 505-438-4161 -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 645 bytes Desc: not available URL: From scotth at proximation.com Wed Oct 17 15:12:15 2001 From: scotth at proximation.com (Scott Haney) Date: Wed, 17 Oct 2001 09:12:15 -0600 Subject: [pooma-dev] r1, MPI, and doof2d: What is Wrong? In-Reply-To: <20011016195822.B3425@codesourcery.com> Message-ID: <59766E62-C311-11D5-AEEA-003065B33F5E@proximation.com> I'm hazy about the R1 options, but isn't it --commlib? Also, I don't recall whether it is mandatory to give the number of processes with --processes NP. It may be redundant since you specified the -np for mpirun, but I'm not sure. Scott On Tuesday, October 16, 2001, at 08:58 PM, Jeffrey Oldham wrote: > Attached is the the r1 version of doof2d. I have tried to run it > using MPI, but it keeps falling over, probably because I do not know > how to use MPI or I am too tired. > > Is the problem and a solution obvious? > >> mpirun -np 1 ./doof2d --comm MPI --nofieldcompression 400 1 > >> results_mpi_p1_400_1 > MPI: MPI_COMM_WORLD rank 0 has terminated without calling MPI_Finalize() > MPI: aborting job > mpirun -np 1 ./doof2d --comm MPI --nofieldcompression 400 1 > > results_mpi_p1_400_1 died at ./r1-Doof2d-tester.pl line 28. > >> mpirun -np 4 ./doof2d --comm MPI --nofieldcompression 800 2 > >> results_mpi_p4_400_2 > MPI: MPI_COMM_WORLD rank 3 has terminated without calling MPI_Finalize() > MPI: aborting job > mpirun -np 4 ./doof2d --comm MPI --nofieldcompression 800 2 > > results_mpi_p4_400_2 died at ./r1-Doof2d-tester.pl line 28. > > Pooma r1 was configured with './conf SGI64 KAI OPTIMIZE MPI'. > > Thanks, > Jeffrey D. Oldham > oldham at codesourcery.com > > -- Scott W. Haney Development Manager Proximation LLC 2960 Rodeo Park Drive West Santa Fe, NM 87505 Voice: 505-424-3809 x101 FAX: 505-438-4161 -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 1470 bytes Desc: not available URL: From stephens at proximation.com Wed Oct 17 17:52:03 2001 From: stephens at proximation.com (Stephen Smith) Date: Wed, 17 Oct 2001 11:52:03 -0600 Subject: patch: Brick optimization Message-ID: Mark noticed some refcounted goo in the inner loop, so we cached a pointer to the data in the Brick engine. This improves the brick performance by as much as 15%. (This used to be in there, oh well.) Tested on Linux (ran all the array and field tests). Reviewed by Scott and Mark. Stephen -------------- next part -------------- An HTML attachment was scrubbed... URL: From oldham at codesourcery.com Wed Oct 17 22:59:57 2001 From: oldham at codesourcery.com (Jeffrey Oldham) Date: Wed, 17 Oct 2001 15:59:57 -0700 Subject: [pooma-dev] Nirvana Queues In-Reply-To: <200110161740.f9GHeLk31226@oz.codesourcery.com>; from oldham@codesourcery.com on Tue, Oct 16, 2001 at 10:40:21AM -0700 References: <200110161740.f9GHeLk31226@oz.codesourcery.com> Message-ID: <20011017155957.A20597@codesourcery.com> On Tue, Oct 16, 2001 at 10:40:21AM -0700, Jeffrey Oldham wrote: > > Scott asked about queues for large jobs. Here is data from a WWW > page, which I hope reflects reality. > > According to http://www.acl.lanl.gov/nirvana/userguide/Queues.html: > > shared > - 1 to 112 shared (oversubscription allowed) processors > - RUNLIMIT of 12 hours > - n02 (and with much less preference, n01) > > small > - 1 to 128 dedicated processors > - RUNLIMIT of 12 hours > - n03 and n06 through n16 > > medium > - 129 to 1024 dedicated processors > - active Wednesday nights from the end of maintenance to 8AM and weekends from 6PM Friday to 8AM Monday > - RUNLIMIT of 12 hours > - n09 through n16 > > large > - 1025 to 1792 dedicated processors > - active Wednesday nights from the end of maintenance to 8AM and weekends from 6PM Friday to 8AM Monday > - RUNLIMIT of 12 hours > - n03 through n16 Unfortunately, I do not have permission to use 'large' or 'medium'. Instead, I'll use scavenger: scavenger - 1 to 1792 dedicated processors - RUNLIMIT of 1 hour - n03 and n06 through n16 - scavenger allows computing once a project has exceeded its allocation, but it's still accounted for and isn't free Thanks, Jeffrey D. Oldham oldham at codesourcery.com From oldham at codesourcery.com Fri Oct 19 21:36:39 2001 From: oldham at codesourcery.com (Jeffrey Oldham) Date: Fri, 19 Oct 2001 14:36:39 -0700 Subject: Patch: Fix Parallel Performance of PrintField.h Message-ID: <20011019143639.A24601@codesourcery.com> 2001-10-16 Jeffrey D. Oldham These changes were suggested by Dave Nystrom and John Hall's use of 'blanca-2001Oct01'. * PrintField.h (PerformPrintField::print): Ensure the field is up-to-date before printing. (PerformPrintField::print): Likewise. Tested on sequential Linux using gcc3.1 by running src/Field/tests/FieldTour[12] Approved by Scott Haney Applied to blanca-2001Oct01 Thanks, Jeffrey D. Oldham oldham at codesourcery.com -------------- next part -------------- Index: PrintField.h =================================================================== RCS file: /home/pooma/Repository/r2/src/NewField/Attic/PrintField.h,v retrieving revision 1.3 diff -c -p -r1.3 PrintField.h *** PrintField.h 2001/03/29 18:17:32 1.3 --- PrintField.h 2001/10/17 00:19:53 *************** PerformPrintField::print(const Pr *** 379,384 **** --- 379,389 ---- CTAssert(A::dimensions == 1); + // Output should update the field before printing. + + a.update(); + Pooma::blockAndEvaluate(); + // determine the domain and domain-iterator type in the given field typedef typename A::Domain_t Domain_t; *************** PerformPrintField::print(const *** 464,469 **** --- 469,479 ---- // make sure this is the right function CTAssert(A::dimensions == Dim && Dim > 1); + + // Output should update the field before printing. + + a.update(); + Pooma::blockAndEvaluate(); // determine the domain and domain-iterator type in the given field From oldham at codesourcery.com Tue Oct 23 17:19:45 2001 From: oldham at codesourcery.com (Jeffrey Oldham) Date: Tue, 23 Oct 2001 10:19:45 -0700 Subject: 23Oct Pooma Meeting Notes Message-ID: <200110231719.f9NHJj002815@oz.codesourcery.com> Participants in this week's Pooma meeting: Jim Crotinger, Scott Haney, Mark Mitchell, Jeffrey D. Oldham, Stephen Smith LANL decision on Pooma released Thursday. Scott Haney is optimistic. Proximation people will minimize Pooma work this week. Measurements: Scheduling takes much more time than expected, but the measurements are too gross to determine the exact area of waste. Pooma::blockAndEvaluate() is taking a lot of time. Jeffrey also worries about excessive variability in execution times but does not know whether this is Pooma or the underlying machine. Scott suggested asking the Blanca people to run some tests on a reserved section of Bluemountain. Both Scott and Mark want Pooma classes to profile the code using Tau. The classes should compile away when not used. Contact John Hall (via Jean Marshall 505.665.4486) for the classes developed by Blanca. See also the r1 profiling. The profiling should be semantically based in fine enough granularity to differentiate different portions of code while coarse enough to avoid profiling skew. (In subsequent conversation between Mark and Jeffrey, Mark explained that 1) the profiling code can remain in Pooma at all times and 2) the profiling code can be added to and maintained by hand. Jeffrey did not realize either of these were permissible.) Optimizations: Ensure all fields are turned into arrays. STEPHEN, will send email with details. Clues: o Compressed fields on the left-hand side already have this implemented, but regular fields do not yet. o Use a zero-based field view to turn into an array. Deferred: Cache guard cell fills. Clues: o Look for fillGuard() or fillGuardCells(). o Store in multipatch engines. o Need a mechanism to save and retrieve iterates. Thanks, Jeffrey D. Oldham oldham at codesourcery.com From stephens at proximation.com Wed Oct 24 15:03:34 2001 From: stephens at proximation.com (Stephen Smith) Date: Wed, 24 Oct 2001 09:03:34 -0600 Subject: [pooma-dev] patch: Brick optimization Message-ID: Attached are the diffs I forgot to attach to the first message. Stephen -----Original Message----- From: Stephen Smith [mailto:stephens at proximation.com] Sent: Wednesday, October 17, 2001 11:52 AM To: Pooma-Dev (E-mail) Subject: [pooma-dev] patch: Brick optimization Mark noticed some refcounted goo in the inner loop, so we cached a pointer to the data in the Brick engine. This improves the brick performance by as much as 15%. (This used to be in there, oh well.) Tested on Linux (ran all the array and field tests). Reviewed by Scott and Mark. Stephen -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: brick.opt.patch Type: application/octet-stream Size: 16852 bytes Desc: not available URL: From oldham at codesourcery.com Wed Oct 24 15:38:34 2001 From: oldham at codesourcery.com (Jeffrey Oldham) Date: Wed, 24 Oct 2001 08:38:34 -0700 Subject: Patch: Fix Comments in BrickBase.h Message-ID: <20011024083834.B20206@codesourcery.com> 2001-10-24 Jeffrey D. Oldham * BrickBase.h: Revise comments since BrickViewBase has only one template parameter. Not tested since only comments are changed. Approved by Stephen Smith Applied to mainline. Thanks, Jeffrey D. Oldham oldham at codesourcery.com -------------- next part -------------- Index: BrickBase.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Engine/BrickBase.h,v retrieving revision 1.12 diff -c -p -r1.12 BrickBase.h *** BrickBase.h 2001/08/30 01:15:02 1.12 --- BrickBase.h 2001/10/24 01:22:05 *************** *** 30,36 **** // Classes: // BrickBase // - Base class for Brick-like engines ! // BrickViewBase // - Base class for BrickView-like engines // DoubleSliceHelper // - Helper functions for initializing slice-of-slice BrickViewBases --- 30,36 ---- // Classes: // BrickBase // - Base class for Brick-like engines ! // BrickViewBase // - Base class for BrickView-like engines // DoubleSliceHelper // - Helper functions for initializing slice-of-slice BrickViewBases *************** namespace Pooma { *** 93,99 **** // BrickBase encapsulates the strides, domain, and the calculation // of indexing offsets brick-like engines. // ! // BrickViewBase, which is defined below, is used to represent // subsets of a data block described by a BrickBase. // BrickViewBase serves as the base class for brick-view types of engines. // --- 93,99 ---- // BrickBase encapsulates the strides, domain, and the calculation // of indexing offsets brick-like engines. // ! // BrickViewBase, which is defined below, is used to represent // subsets of a data block described by a BrickBase. // BrickViewBase serves as the base class for brick-view types of engines. // *************** struct DoubleSliceHelper *** 385,393 **** //----------------------------------------------------------------------------- // // Full Description: ! // BrickViewBase // ! // BrickViewBase is the base-class for engines that are "views" // into brick-like engines. // // The template parameters are: --- 385,393 ---- //----------------------------------------------------------------------------- // // Full Description: ! // BrickViewBase // ! // BrickViewBase is the base-class for engines that are "views" // into brick-like engines. // // The template parameters are: From wdn at lanl.gov Fri Oct 26 20:05:55 2001 From: wdn at lanl.gov (Dave Nystrom) Date: Fri, 26 Oct 2001 14:05:55 -0600 Subject: GCC Questions Message-ID: <15321.49699.661966.146124@saltydog.lanl.gov> I am revisiting my earlier efforts to try to use gcc to compile our source code base and have several questions. 1. I am currently using gcc-3.0. Should I upgrade to a more recent snapshot? If so, which one? 2. How do I turn on/off exceptions with gcc? 3. What options do I use in order to try to force as strict as possible compliance of my code with the C++ Standard? 4. Are there particular options which you would recommend for either my debug or optimized builds for our Pooma 2 based code? 5. Are there any provisions or analogs to the library closure features that are used with EDG based compilers? 6. What loader does gcc use when building on SGI Irix 6.5 systems? If it is the SGI loader, is it possible to use the GNU loader on SGI Irix 6.5 systems? There appears to be a problem with the SGI loader which prevents it from using libraries that are larger than about 512 MBytes. Some of our debug libraries are larger than this limiting size. -- Dave Nystrom email: wdn at lanl.gov LANL X-3 phone: 505-667-7913 fax: 505-665-3046 From wdn at lanl.gov Fri Oct 26 20:15:27 2001 From: wdn at lanl.gov (Dave Nystrom) Date: Fri, 26 Oct 2001 14:15:27 -0600 Subject: [pooma-dev] GCC Questions In-Reply-To: <15321.49699.661966.146124@saltydog.lanl.gov> References: <15321.49699.661966.146124@saltydog.lanl.gov> Message-ID: <15321.50271.994470.697915@saltydog.lanl.gov> Also, what options do I use to build and use shared libraries? Dave Nystrom email: wdn at lanl.gov LANL X-3 phone: 505-667-7913 fax: 505-665-3046 Dave Nystrom writes: > I am revisiting my earlier efforts to try to use gcc to compile our source > code base and have several questions. > > 1. I am currently using gcc-3.0. Should I upgrade to a more recent > snapshot? If so, which one? > > 2. How do I turn on/off exceptions with gcc? > > 3. What options do I use in order to try to force as strict as possible > compliance of my code with the C++ Standard? > > 4. Are there particular options which you would recommend for either my > debug or optimized builds for our Pooma 2 based code? > > 5. Are there any provisions or analogs to the library closure features that > are used with EDG based compilers? > > 6. What loader does gcc use when building on SGI Irix 6.5 systems? If it is > the SGI loader, is it possible to use the GNU loader on SGI Irix 6.5 > systems? There appears to be a problem with the SGI loader which > prevents it from using libraries that are larger than about 512 MBytes. > Some of our debug libraries are larger than this limiting size. > > -- > Dave Nystrom email: wdn at lanl.gov > LANL X-3 phone: 505-667-7913 fax: 505-665-3046 > From mark at codesourcery.com Fri Oct 26 20:30:49 2001 From: mark at codesourcery.com (Mark Mitchell) Date: Fri, 26 Oct 2001 13:30:49 -0700 Subject: GCC Questions In-Reply-To: <15321.49699.661966.146124@saltydog.lanl.gov> Message-ID: <72070000.1004128249@gandalf.codesourcery.com> --On Friday, October 26, 2001 02:05:55 PM -0600 Dave Nystrom wrote: > I am revisiting my earlier efforts to try to use gcc to compile our source > code base and have several questions. > > 1. I am currently using gcc-3.0. Should I upgrade to a more recent > snapshot? If so, which one? The new 3.0.2 release may compile faster. But, I have not tested POOMA with it. > 2. How do I turn on/off exceptions with gcc? -fno-exceptions > 3. What options do I use in order to try to force as strict as possible > compliance of my code with the C++ Standard? -ansi > 4. Are there particular options which you would recommend for either my > debug or optimized builds for our Pooma 2 based code? -g for debug, -O2 for optimization > 5. Are there any provisions or analogs to the library closure features > that are used with EDG based compilers? No. > 6. What loader does gcc use when building on SGI Irix 6.5 systems? If > it is the SGI loader, is it possible to use the GNU loader on SGI > Irix 6.5 systems? There appears to be a problem with the SGI loader > which prevents it from using libraries that are larger than about 512 > MBytes. Some of our debug libraries are larger than this limiting > size. Under contract from LANL, we mostly completed a port of the GNU loader to IRIX. However, that port was never finished (we were asked to work on other projects). So, GCC uses the SGI loader. -- Mark Mitchell mark at codesourcery.com CodeSourcery, LLC http://www.codesourcery.com From wdn at lanl.gov Fri Oct 26 22:34:55 2001 From: wdn at lanl.gov (Dave Nystrom) Date: Fri, 26 Oct 2001 16:34:55 -0600 Subject: Another GCC question Message-ID: <15321.58639.92968.33424@saltydog.lanl.gov> Does GCC support the "long double" type? If so, are there any special options that are needed to get this support? Thanks, -- Dave Nystrom email: wdn at lanl.gov LANL X-3 phone: 505-667-7913 fax: 505-665-3046 From cummings at linkline.com Fri Oct 26 23:01:14 2001 From: cummings at linkline.com (Julian C. Cummings) Date: Fri, 26 Oct 2001 16:01:14 -0700 Subject: [pooma-dev] GCC Questions In-Reply-To: <15321.50271.994470.697915@saltydog.lanl.gov> Message-ID: Hi Dave, With gcc, you use -fpic on the compile line to produce position-independent code and use -shared on the link line to produce a shared library rather than an executable. -- Julian C. Dr. Julian C. Cummings Staff Scientist, CACR/Caltech (626) 395-2543 cummings at cacr.caltech.edu > -----Original Message----- > From: Dave Nystrom [mailto:wdn at lanl.gov] > Sent: Friday, October 26, 2001 1:15 PM > To: Dave Nystrom > Cc: pooma-dev; Jeffrey Oldham > Subject: RE: [pooma-dev] GCC Questions > > > Also, what options do I use to build and use shared libraries? > > Dave Nystrom email: wdn at lanl.gov > LANL X-3 phone: 505-667-7913 fax: 505-665-3046 > > Dave Nystrom writes: > > I am revisiting my earlier efforts to try to use gcc to > compile our source > > code base and have several questions. > > > > 1. I am currently using gcc-3.0. Should I upgrade to a more recent > > snapshot? If so, which one? > > > > 2. How do I turn on/off exceptions with gcc? > > > > 3. What options do I use in order to try to force as strict > as possible > > compliance of my code with the C++ Standard? > > > > 4. Are there particular options which you would recommend for > either my > > debug or optimized builds for our Pooma 2 based code? > > > > 5. Are there any provisions or analogs to the library closure > features that > > are used with EDG based compilers? > > > > 6. What loader does gcc use when building on SGI Irix 6.5 > systems? If it is > > the SGI loader, is it possible to use the GNU loader on > SGI Irix 6.5 > > systems? There appears to be a problem with the SGI loader which > > prevents it from using libraries that are larger than > about 512 MBytes. > > Some of our debug libraries are larger than this limiting size. > > > > -- > > Dave Nystrom email: wdn at lanl.gov > > LANL X-3 phone: 505-667-7913 fax: 505-665-3046 > > > From oldham at codesourcery.com Fri Oct 26 23:00:50 2001 From: oldham at codesourcery.com (Jeffrey Oldham) Date: Fri, 26 Oct 2001 16:00:50 -0700 Subject: [pooma-dev] Another GCC question In-Reply-To: <15321.58639.92968.33424@saltydog.lanl.gov>; from wdn@lanl.gov on Fri, Oct 26, 2001 at 04:34:55PM -0600 References: <15321.58639.92968.33424@saltydog.lanl.gov> Message-ID: <20011026160050.A23484@codesourcery.com> On Fri, Oct 26, 2001 at 04:34:55PM -0600, Dave Nystrom wrote: > Does GCC support the "long double" type? If so, are there any special > options that are needed to get this support? Yes, it is supported by default. Thanks, Jeffrey D. Oldham oldham at codesourcery.com From wdn at lanl.gov Fri Oct 26 23:11:14 2001 From: wdn at lanl.gov (Dave Nystrom) Date: Fri, 26 Oct 2001 17:11:14 -0600 Subject: Still more questions on GCC Message-ID: <15321.60818.200045.990288@saltydog.lanl.gov> I am trying to build one of our low level library packages called TecFramework. I seem to be having tons of difficulty. TecFramework makes heavy use of templates. So far, I have yet to get the first file to compile. I'm beginning to fear that gcc may work fundamentally different than either EDG based compilers or CodeWarrior. We can compile TecFramework with CodeWarrior and with EDG based compilers like KCC in strict mode and SGI CC. I don't know about CodeWarrior but I believe that EDG based compilers like KCC only compile templates when they are referenced and on the initial pass only do rudimentary analysis like checking for matching curly braces, etc. So, if a template with certain values for the template parameters is never referenced, the code never gets compiled and thus may even have bugs that would prevent it from compiling if it were referenced. Does GCC work in some different manner so that templates get compiled even if they are not referenced. I don't know if I am even making sense here but I am worried that I may be trying to compile code in TecFramework that has never been compiled by our other compilers and thus may be buggy. Is that possible? Thanks, -- Dave Nystrom email: wdn at lanl.gov LANL X-3 phone: 505-667-7913 fax: 505-665-3046 From wdn at lanl.gov Mon Oct 29 17:53:13 2001 From: wdn at lanl.gov (Dave Nystrom) Date: Mon, 29 Oct 2001 10:53:13 -0700 Subject: Uploading files Message-ID: <15325.38793.299134.74035@saltydog.lanl.gov> Is there a place at Code Sourcery that I can upload a couple of files to? If I try to send anything too big with XEmacs it insists in breaking it up into a bazillion small files. Previous versions of XEmacs which I have used did not have this problem. So far, I have not been able to figure out how to change this behavior. Anyway, I have a file that does some explicit instantiations of some Engine templates that I am trying to compile with g++ 3.0 and am getting a bunch of error messages. This particular file uses Pooma 2 with Cheetah and uses the Remote engine. g++ compiled all of my serial explicit instantiations which used the Compressible Brick engine. I am able to compile the file in question with KCC-4.0f on Red Hat Linux 7.1 with no problems at all using --strict. Also, do you want just the file which only includes Pooma 2 header files from the Blanca branch or would you prefer the output of -E or do you want both? Thanks, -- Dave Nystrom email: wdn at lanl.gov LANL X-3 phone: 505-667-7913 fax: 505-665-3046 From mark at codesourcery.com Mon Oct 29 21:31:54 2001 From: mark at codesourcery.com (Mark Mitchell) Date: Mon, 29 Oct 2001 13:31:54 -0800 Subject: [pooma-dev] GCC Questions In-Reply-To: <15321.50271.994470.697915@saltydog.lanl.gov> Message-ID: <40770000.1004391114@warlock.codesourcery.com> --On Friday, October 26, 2001 02:15:27 PM -0600 Dave Nystrom wrote: > Also, what options do I use to build and use shared libraries? It is slightly different from system to system. On most systems: gcc -fPIC -c a.c // Compile the objects in the shared // library. gcc -shared -o a.so a.o // Build the shared library. On IRIX 6, I think all objects are implicitly PIC, so you probably don't need the -fPIC. -- Mark Mitchell mark at codesourcery.com CodeSourcery, LLC http://www.codesourcery.com From mark at codesourcery.com Mon Oct 29 21:35:20 2001 From: mark at codesourcery.com (Mark Mitchell) Date: Mon, 29 Oct 2001 13:35:20 -0800 Subject: Still more questions on GCC In-Reply-To: <15321.60818.200045.990288@saltydog.lanl.gov> Message-ID: <42020000.1004391320@warlock.codesourcery.com> Does GCC work in some different manner so that templates get compiled > even if they are not referenced. I don't know if I am even making sense > here but I am worried that I may be trying to compile code in > TecFramework that has never been compiled by our other compilers and thus > may be buggy. Is that possible? Yes. Many compilers, for example, will allow: template void f() { if } as long as "f" is not compiled. The standard requires a diagnostic for this code, and GCC will issue the error. There are many more complex examples of a roughly similar nature; for example, many compilers will not complain about: template void f() { int i = "abc"; } but that is invalid according to the standard as well. The exact rules are complex (they involve the notion of "dependent types") but basically the code must be fairly reasonable, even if it is not instantiated. Of course, you may also be running into bugs in G++. -- Mark Mitchell mark at codesourcery.com CodeSourcery, LLC http://www.codesourcery.com From mark at codesourcery.com Mon Oct 29 21:51:59 2001 From: mark at codesourcery.com (Mark Mitchell) Date: Mon, 29 Oct 2001 13:51:59 -0800 Subject: Uploading files In-Reply-To: <15325.38793.299134.74035@saltydog.lanl.gov> Message-ID: <42490000.1004392319@warlock.codesourcery.com> --On Monday, October 29, 2001 10:53:13 AM -0700 Dave Nystrom wrote: > Is there a place at Code Sourcery that I can upload a couple of files to? Yes; you can upload via anonymous FTP to ftp.codesourcery.com in the /incoming/lanl directory. Please tell me when you are done. However, bear in mind that we no longer have a support contract for GCC from LANL; therefore, if the errors turn out to be a bug in G++, there's nothing we can do. Yours, -- Mark Mitchell mark at codesourcery.com CodeSourcery, LLC http://www.codesourcery.com From gdr at codesourcery.com Tue Oct 30 08:16:21 2001 From: gdr at codesourcery.com (Gabriel Dos Reis) Date: 30 Oct 2001 09:16:21 +0100 Subject: [pooma-dev] GCC Questions In-Reply-To: Dave Nystrom's message of "Fri, 26 Oct 2001 14:05:55 -0600" References: <15321.49699.661966.146124@saltydog.lanl.gov> Message-ID: Dave Nystrom writes: | I am revisiting my earlier efforts to try to use gcc to compile our source | code base and have several questions. | | 1. I am currently using gcc-3.0. Should I upgrade to a more recent | snapshot? If so, which one? I think GCC-3.0.2 is a good candidate. In case you might want to experiment with the GCC-3.1.x experimental series, please remember that that series is unable to correctly output depencies so the build will fail with clueless messages. | 2. How do I turn on/off exceptions with gcc? -fno-exceptions | 3. What options do I use in order to try to force as strict as possible | compliance of my code with the C++ Standard? -ansi -pedantic-errors (-ansi alone unfortunately isn't sufficient to enfore strict adherence to ISO C++) | 4. Are there particular options which you would recommend for either my | debug or optimized builds for our Pooma 2 based code? -g -O2 And for debugging purpose, I would add also -Wall -W for the build stage. | 5. Are there any provisions or analogs to the library closure features that | are used with EDG based compilers? Hmm, I'm unsure as to what you mean here? Please could you elaborate? -- Gaby CodeSourcery, LLC http://www.codesourcery.com From gdr at codesourcery.com Tue Oct 30 08:23:02 2001 From: gdr at codesourcery.com (Gabriel Dos Reis) Date: 30 Oct 2001 09:23:02 +0100 Subject: [pooma-dev] Still more questions on GCC In-Reply-To: Dave Nystrom's message of "Fri, 26 Oct 2001 17:11:14 -0600" References: <15321.60818.200045.990288@saltydog.lanl.gov> Message-ID: Dave Nystrom writes: [...] | Does GCC work in some different manner so that templates get compiled even if | they are not referenced. Formally, if the template is never referenced in a wya which requires its instantiation, then GCC (at least, since the 2.95 series) won't instantiate it. Do you have a specific example on which EDG-base compilers and GCC fundamentally different behaviour? | I don't know if I am even making sense here but I | am worried that I may be trying to compile code in TecFramework that has | never been compiled by our other compilers and thus may be buggy. Is that | possible? That is possible, but without no concrete example, anything I could say would be speculations. I find it a good thing to exercise your code with at least two different compilers. Best, -- Gaby CodeSourcery, LLC http://www.codesourcery.com