From rguenth at tat.physik.uni-tuebingen.de Fri Apr 2 11:52:30 2004 From: rguenth at tat.physik.uni-tuebingen.de (Richard Guenther) Date: Fri, 2 Apr 2004 13:52:30 +0200 (CEST) Subject: [PATCH] Add relation like constructor to ScalarCode Message-ID: Hi! This adds a relation functor required constructor to ScalarCode to be able to use ScalarCode objects as relation functors. It also updates TestBasicRelations check to excercise this and also adds actual checking to the test. Tested partly (relation and scalarcode tests) on ia32-linux, ok? Richard. 2004Apr02 Richard Guenther * src/Evaluator/ScalarCode.h: add copy constructor with extra LHS argument for relation functor compatibility. src/Field/tests/TestBasicRelations.cpp: check using ScalarCode object as relation functor. ===== Evaluator/ScalarCode.h 1.5 vs edited ===== --- 1.5/r2/src/Evaluator/ScalarCode.h Thu Oct 23 14:41:02 2003 +++ edited/Evaluator/ScalarCode.h Fri Apr 2 13:29:26 2004 @@ -403,6 +403,14 @@ { } + /// Constructor to allow ScalarCode being used as RelationFunctor + + template + ScalarCode(const ScalarCode& sc, const LHS&) + : function_m(sc.function_m) + { + } + template static inline bool checkValidity(const F& f, WrappedInt) { ===== Field/tests/TestBasicRelations.cpp 1.1 vs edited ===== --- 1.1/r2/src/Field/tests/TestBasicRelations.cpp Mon May 13 17:47:37 2002 +++ edited/Field/tests/TestBasicRelations.cpp Fri Apr 2 13:37:14 2004 @@ -54,10 +54,31 @@ } }; -void computePotentialEnergy(const Field_t &U, const Field_t &m, const Field_t &h) -{ - U = m * g * h; -} +template +struct computePotentialEnergy { + computePotentialEnergy() {} + void scalarCodeInfo(ScalarCodeInfo& info) const + { + info.dimensions(Dim); + info.arguments(3); + info.write(0, true); + info.write(1, false); + info.write(2, false); + info.useGuards(0, false); + info.useGuards(1, false); + info.useGuards(2, false); + for (int i=0; i + void operator()(const F1& U, const F2& m, const F3& h, const Loc& loc) const + { + U(loc) = m(loc) * g * h(loc); + } +}; struct ComputeVelocity { @@ -102,14 +123,16 @@ Pooma::newRelation(Pooma::functionPtr(computeTotalEnergy), E, K, U); Pooma::newRelation(ComputeKineticEnergy(), K, m, v); - Pooma::newRelation(Pooma::functionPtr(computePotentialEnergy), U, m, h); + Pooma::newRelation(ScalarCode >(), U, m, h); Pooma::newRelation(Pooma::memberPtr(obj, &ComputeVelocity::doit), v, p, m); tester.out() << E << std::endl; + tester.check("Total energy at h=4.0", all(E == 3.0*g*4.0 + 0.5*3.0*pow(2.0/3.0, 2))); h = 0; tester.out() << E << std::endl; + tester.check("Total energy at h=0.0", all(E == 3.0*g*0.0 + 0.5*3.0*pow(2.0/3.0, 2))); int ret = tester.results("TestBasicRelations"); Pooma::finalize(); From mwh_acs at hotmail.com Tue Apr 6 21:30:32 2004 From: mwh_acs at hotmail.com (Michael) Date: Tue, 06 Apr 2004 22:30:32 +0100 Subject: FW: Building POOMA on Mac OS X In-Reply-To: <4072E222.6040003@codesourcery.com> Message-ID: Hi all Mark Mitchell at CodeSourcery asked me to forward this request here - please see below. Michael _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ _/ _/ _/_/_/ Hopkins Research Limited _/ _/ _/ _/ _/_/_/_/ _/_/_/ Optimal Solutions via Virtual Systems _/ _/ _/ _/ _/ _/ _/ _/ Tel: +44(0) 781 3467 381 _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ `All models are wrong, but some are useful' - George Box ------ Forwarded Message From: Mark Mitchell Organization: CodeSourcery, LLC Date: Tue, 06 Apr 2004 10:00:18 -0700 To: Michael Subject: Re: Building POOMA on Mac OS X Michael wrote: >Hi > >I am planning to build the POOMA library on Mac OS 10.2.8, which as you >probably know is UNIX-based and uses the GCC 3.3 compiler. > >I have a little experience of building projects like this, but before I >start and things get complicated I wondered if there was an architecture >setting/install script for OS X available anywhere? There doesn't seem to be >anything in the 2.4.0 download. I'm guessing that a Linux-GCC build might >work, but as I say, I thought I would ask first. Also, one of my machines >is dual-processor (soon to be followed by a nice, fast dual G5) so I >wondered if I should build using the Cheetah option? > > Michael -- Please resend your question to the pooma-dev at codesourcery.com mailing list. (I am not sure if anyone has built POOMA for MacOS X.) Yours, -- Mark Mitchell CodeSourcery, LLC (916) 791-8304 mark at codesourcery.com ------ End of Forwarded Message From oldham at codesourcery.com Tue Apr 6 22:05:49 2004 From: oldham at codesourcery.com (Jeffrey D. Oldham) Date: Tue, 06 Apr 2004 15:05:49 -0700 Subject: [PATCH] Add relation like constructor to ScalarCode In-Reply-To: References: Message-ID: <407329BD.7010501@codesourcery.com> Richard Guenther wrote: >Hi! > >This adds a relation functor required constructor to ScalarCode to be able >to use ScalarCode objects as relation functors. It also updates >TestBasicRelations check to excercise this and also adds actual checking >to the test. > >Tested partly (relation and scalarcode tests) on ia32-linux, ok? > >Richard. > > >2004Apr02 Richard Guenther > > * src/Evaluator/ScalarCode.h: add copy constructor with > extra LHS argument for relation functor compatibility. > src/Field/tests/TestBasicRelations.cpp: check using > ScalarCode object as relation functor. > >===== Evaluator/ScalarCode.h 1.5 vs edited ===== >--- 1.5/r2/src/Evaluator/ScalarCode.h Thu Oct 23 14:41:02 2003 >+++ edited/Evaluator/ScalarCode.h Fri Apr 2 13:29:26 2004 >@@ -403,6 +403,14 @@ > { > } > >+ /// Constructor to allow ScalarCode being used as RelationFunctor >+ >+ template >+ ScalarCode(const ScalarCode& sc, const LHS&) >+ : function_m(sc.function_m) >+ { >+ } >+ > template > static inline bool checkValidity(const F& f, WrappedInt) > { >===== Field/tests/TestBasicRelations.cpp 1.1 vs edited ===== >--- 1.1/r2/src/Field/tests/TestBasicRelations.cpp Mon May 13 17:47:37 2002 >+++ edited/Field/tests/TestBasicRelations.cpp Fri Apr 2 13:37:14 2004 >@@ -54,10 +54,31 @@ > } > }; > >-void computePotentialEnergy(const Field_t &U, const Field_t &m, const Field_t &h) >-{ >- U = m * g * h; >-} >+template >+struct computePotentialEnergy { >+ computePotentialEnergy() {} >+ void scalarCodeInfo(ScalarCodeInfo& info) const >+ { >+ info.dimensions(Dim); >+ info.arguments(3); >+ info.write(0, true); >+ info.write(1, false); >+ info.write(2, false); >+ info.useGuards(0, false); >+ info.useGuards(1, false); >+ info.useGuards(2, false); >+ for (int i=0; i+ { >+ info.lowerExtent(i) = 0; >+ info.upperExtent(i) = 0; >+ } >+ } >+ template >+ void operator()(const F1& U, const F2& m, const F3& h, const Loc& loc) const >+ { >+ U(loc) = m(loc) * g * h(loc); >+ } >+}; > > struct ComputeVelocity > { >@@ -102,14 +123,16 @@ > > Pooma::newRelation(Pooma::functionPtr(computeTotalEnergy), E, K, U); > Pooma::newRelation(ComputeKineticEnergy(), K, m, v); >- Pooma::newRelation(Pooma::functionPtr(computePotentialEnergy), U, m, h); >+ Pooma::newRelation(ScalarCode >(), U, m, h); > Pooma::newRelation(Pooma::memberPtr(obj, &ComputeVelocity::doit), v, p, m); > > tester.out() << E << std::endl; >+ tester.check("Total energy at h=4.0", all(E == 3.0*g*4.0 + 0.5*3.0*pow(2.0/3.0, 2))); > > h = 0; > > tester.out() << E << std::endl; >+ tester.check("Total energy at h=0.0", all(E == 3.0*g*0.0 + 0.5*3.0*pow(2.0/3.0, 2))); > > int ret = tester.results("TestBasicRelations"); > Pooma::finalize(); > > If I understand correctly, this modifies the code to support computation at a particular Loc (location). I had assumed that relations worked on fields, not individual locations within fields. Thus, a field might be lazily evaluated. If a value at a particular location is needed, the field can be queried at that location. Why do we need the proposed code changes? -- Jeffrey D. Oldham oldham at codesourcery.com From rguenth at tat.physik.uni-tuebingen.de Wed Apr 7 07:47:56 2004 From: rguenth at tat.physik.uni-tuebingen.de (Richard Guenther) Date: Wed, 7 Apr 2004 09:47:56 +0200 (CEST) Subject: [pooma-dev] FW: Building POOMA on Mac OS X In-Reply-To: References: Message-ID: On Tue, 6 Apr 2004, Michael wrote: > >Hi > > > >I am planning to build the POOMA library on Mac OS 10.2.8, which as you > >probably know is UNIX-based and uses the GCC 3.3 compiler. > > > >I have a little experience of building projects like this, but before I > >start and things get complicated I wondered if there was an architecture > >setting/install script for OS X available anywhere? There doesn't seem to be > >anything in the 2.4.0 download. I'm guessing that a Linux-GCC build might > >work, but as I say, I thought I would ask first. Also, one of my machines > >is dual-processor (soon to be followed by a nice, fast dual G5) so I > >wondered if I should build using the Cheetah option? You can try building with the LINUXgcc config, it should work with Apple's gcc 3.3 compiler. I never used Cheetah in threads mode, but with MPI it should work. CVS HEAD has OpenMP support, so if you got a compiler that can do OpenMP (gcc can't), you probably should go for CVS HEAD and OpenMP. Richard. -- Richard Guenther WWW: http://www.tat.physik.uni-tuebingen.de/~rguenth/ From rguenth at tat.physik.uni-tuebingen.de Wed Apr 7 08:11:19 2004 From: rguenth at tat.physik.uni-tuebingen.de (Richard Guenther) Date: Wed, 7 Apr 2004 10:11:19 +0200 (CEST) Subject: [pooma-dev] Re: [PATCH] Add relation like constructor to ScalarCode In-Reply-To: <407329BD.7010501@codesourcery.com> References: <407329BD.7010501@codesourcery.com> Message-ID: On Tue, 6 Apr 2004, Jeffrey D. Oldham wrote: > Richard Guenther wrote: > > >Hi! > > > >This adds a relation functor required constructor to ScalarCode to be able > >to use ScalarCode objects as relation functors. It also updates > >TestBasicRelations check to excercise this and also adds actual checking > >to the test. > > > >Tested partly (relation and scalarcode tests) on ia32-linux, ok? > > > >Richard. > > > > > >2004Apr02 Richard Guenther > > > > * src/Evaluator/ScalarCode.h: add copy constructor with > > extra LHS argument for relation functor compatibility. > > src/Field/tests/TestBasicRelations.cpp: check using > > ScalarCode object as relation functor. > > > >===== Evaluator/ScalarCode.h 1.5 vs edited ===== > >--- 1.5/r2/src/Evaluator/ScalarCode.h Thu Oct 23 14:41:02 2003 > >+++ edited/Evaluator/ScalarCode.h Fri Apr 2 13:29:26 2004 > >@@ -403,6 +403,14 @@ > > { > > } > > > >+ /// Constructor to allow ScalarCode being used as RelationFunctor > >+ > >+ template > >+ ScalarCode(const ScalarCode& sc, const LHS&) > >+ : function_m(sc.function_m) > >+ { > >+ } > >+ > > template > > static inline bool checkValidity(const F& f, WrappedInt) > > { > >===== Field/tests/TestBasicRelations.cpp 1.1 vs edited ===== > >--- 1.1/r2/src/Field/tests/TestBasicRelations.cpp Mon May 13 17:47:37 2002 > >+++ edited/Field/tests/TestBasicRelations.cpp Fri Apr 2 13:37:14 2004 > If I understand correctly, this modifies the code to support computation > at a particular Loc (location). I had assumed that relations worked on > fields, not individual locations within fields. Thus, a field might be > lazily evaluated. If a value at a particular location is needed, the > field can be queried at that location. Why do we need the proposed > code changes? You misunderstood the intent of the patch. It's just I can use my existing ScalarCode<> functors with a relation, i.e. say Pooma::newRelation(ScalarCode >(), U, m, h); in order for this to work, ScalarCode needs the above constructor (I snipped all other parts of the patch), else it would not compile. The changes to the testcase just use a ScalarCode for one of the relations and further actually check for correct operation. Richard. -- Richard Guenther WWW: http://www.tat.physik.uni-tuebingen.de/~rguenth/ From oldham at codesourcery.com Wed Apr 7 13:58:13 2004 From: oldham at codesourcery.com (Jeffrey D. Oldham) Date: Wed, 07 Apr 2004 06:58:13 -0700 Subject: [pooma-dev] Re: [PATCH] Add relation like constructor to ScalarCode In-Reply-To: References: <407329BD.7010501@codesourcery.com> Message-ID: <407408F5.2060309@codesourcery.com> Richard Guenther wrote: >On Tue, 6 Apr 2004, Jeffrey D. Oldham wrote: > > > >>Richard Guenther wrote: >> >> >> >>>Hi! >>> >>>This adds a relation functor required constructor to ScalarCode to be able >>>to use ScalarCode objects as relation functors. It also updates >>>TestBasicRelations check to excercise this and also adds actual checking >>>to the test. >>> >>>Tested partly (relation and scalarcode tests) on ia32-linux, ok? >>> >>>Richard. >>> >>> >>>2004Apr02 Richard Guenther >>> >>> * src/Evaluator/ScalarCode.h: add copy constructor with >>> extra LHS argument for relation functor compatibility. >>> src/Field/tests/TestBasicRelations.cpp: check using >>> ScalarCode object as relation functor. >>> >>>===== Evaluator/ScalarCode.h 1.5 vs edited ===== >>>--- 1.5/r2/src/Evaluator/ScalarCode.h Thu Oct 23 14:41:02 2003 >>>+++ edited/Evaluator/ScalarCode.h Fri Apr 2 13:29:26 2004 >>>@@ -403,6 +403,14 @@ >>> { >>> } >>> >>>+ /// Constructor to allow ScalarCode being used as RelationFunctor >>>+ >>>+ template >>>+ ScalarCode(const ScalarCode& sc, const LHS&) >>>+ : function_m(sc.function_m) >>>+ { >>>+ } >>>+ >>> template >>> static inline bool checkValidity(const F& f, WrappedInt) >>> { >>>===== Field/tests/TestBasicRelations.cpp 1.1 vs edited ===== >>>--- 1.1/r2/src/Field/tests/TestBasicRelations.cpp Mon May 13 17:47:37 2002 >>>+++ edited/Field/tests/TestBasicRelations.cpp Fri Apr 2 13:37:14 2004 >>> >>> > > > > >>If I understand correctly, this modifies the code to support computation >>at a particular Loc (location). I had assumed that relations worked on >>fields, not individual locations within fields. Thus, a field might be >>lazily evaluated. If a value at a particular location is needed, the >>field can be queried at that location. Why do we need the proposed >>code changes? >> >> > >You misunderstood the intent of the patch. It's just I can use my >existing ScalarCode<> functors with a relation, i.e. say > >Pooma::newRelation(ScalarCode >(), U, m, h); > >in order for this to work, ScalarCode needs the above constructor (I >snipped all other parts of the patch), else it would not compile. > >The changes to the testcase just use a ScalarCode for one of the relations >and further actually check for correct operation. > > OK. Thank you for the explanation. Please commit the change. -- Jeffrey D. Oldham oldham at codesourcery.com From rguenth at tat.physik.uni-tuebingen.de Mon Apr 19 11:33:48 2004 From: rguenth at tat.physik.uni-tuebingen.de (Richard Guenther) Date: Mon, 19 Apr 2004 13:33:48 +0200 (CEST) Subject: Anyone working on Mesh classes? Message-ID: Hi! Is anyone currently working on the Mesh classes? I'll plan to merge some of my cleanups/extensions upstream - if not already a rewrite is going on. Please speak up before I start doing useless work, Thanks, Richard. -- Richard Guenther WWW: http://www.tat.physik.uni-tuebingen.de/~rguenth/ From rguenth at tat.physik.uni-tuebingen.de Mon Apr 26 13:05:40 2004 From: rguenth at tat.physik.uni-tuebingen.de (Richard Guenther) Date: Mon, 26 Apr 2004 15:05:40 +0200 (CEST) Subject: no ViewIndexer::innerDomain()? Message-ID: Hi! MeshFunctions::positions() called on a Field with a GridLayoutView causes NoMesh to be created which calls layout.innerDomain() which in turn gets multiplexed to pdata_m->indexer_m.innerDomain() by LayoutBaseView class while ViewIndexer doesn't have such method. Oops(?). Any idea how to fix this the right way(TM)? Just adding innerDomain() methods to ViewIndexer, returning the domain? Not dispatching to the indexer_m for innerDomain() in LayoutBaseView, but just directly returning the same as domain()? Other options? Thanks for any help, Richard. -- Richard Guenther WWW: http://www.tat.physik.uni-tuebingen.de/~rguenth/ From DateChatters at directcastle.com Wed Apr 28 00:12:15 2004 From: DateChatters at directcastle.com (Date Chatters) Date: Wed, 28 Apr 2004 08:12:15 +0800 Subject: Ready and (0nline) pooma-dev preview.jpg Message-ID: Chat and Date all 0nline: http://www.datechatters.com "I met the girl of my dreams!" - Ross M. "Internet dating has never been so fun!" -Natalie K. You can post profiles, chat, and hook up @ ZER0 C0ST! http://www.datechatters.com Don't want any more? http://www.roadsings.com/nomoremail/