From andrius.kurtinaitis at maf.vu.lt Tue Apr 2 07:12:29 2002 From: andrius.kurtinaitis at maf.vu.lt (Andrius Kurtinaitis) Date: Tue, 02 Apr 2002 09:12:29 +0200 Subject: How to do partial reduction Message-ID: <3CA959DD.6040701@maf.vu.lt> Hello, Is there an easy and elegant way to do partial reduction of POOMA arrays? For example: how to get an 1D array which contains sums of the row values of an 2D array? Andrius Kurtinaitis From andrius.kurtinaitis at maf.vu.lt Fri Apr 5 14:02:49 2002 From: andrius.kurtinaitis at maf.vu.lt (Andrius Kurtinaitis) Date: Fri, 05 Apr 2002 16:02:49 +0200 Subject: How to join two domains? Message-ID: <3CADAE89.70907@maf.vu.lt> Hello, I am solving a problem where I need a chess-table-like grids: the 2D domain should consist of the points (i,j) where (i+j) mod 2 == 0 or 1. No built-in POOMA domain type (except Grid) supports such domains. And Grid construction is too complex. And its iteration is probably not optimal. However, I could create such a domain by "joining" two 2D Ranges. I was also unable to find out, how to do that, either. Thank you for any help you can provide. Andrius Kurtinaitis P.S. Am I on the correct list asking the questions? pooma-dev - sounds to be only for the POOMA authors. Is there some other list for users? From nilsb at cns.mpg.de Fri Apr 12 18:22:01 2002 From: nilsb at cns.mpg.de (Nils H. Busch) Date: Fri, 12 Apr 2002 20:22:01 +0200 Subject: Ref counting Message-ID: <3CB725C9.3D20D4F5@cns.mpg.de> Hello, I am sorry, if this is not the correct mailing list to pose user questions regarding pooma, so please redirect this question to whatever list is appropriate or mail me with such information. I am trying to create arrays/fields in a custom function and return them as the functions return value. Apparently, this cores as the ref count of the array/field goes to zero when going out of function scope, precisely ist RectilinearGeometryBase in my case. Is there a way to increase ref count of object to reference it outside of function scope or am trying to do something deprecated ? Should I be passing in a reference argument and initialize Array/Field in the function ? Thanks in advance. -- Nils H. Busch Max-Planck-Institute of Cognitive Neuroscience phone: ++49 (341) 9940-335 fax: ++49 (341) 9940-204 e-mail: nilsb at cns.mpg.de From mark at codesourcery.com Fri Apr 12 20:42:38 2002 From: mark at codesourcery.com (Mark Mitchell) Date: Fri, 12 Apr 2002 13:42:38 -0700 Subject: Ref counting In-Reply-To: <3CB725C9.3D20D4F5@cns.mpg.de> References: <3CB725C9.3D20D4F5@cns.mpg.de> Message-ID: <17740000.1018644158@gandalf.codesourcery.com> > Is there a way to increase ref count of object to reference it outside > of function scope or am trying to do something deprecated ? Should I be > passing in a reference argument and initialize Array/Field in the > function ? I suggest allocating the new Array/Field with "new", rather than as a local variable, and then returning it the pointer. Jeffrey, do you have alternative ideas? -- Mark Mitchell mark at codesourcery.com CodeSourcery, LLC http://www.codesourcery.com From jcrotinger at proximation.com Fri Apr 12 22:35:55 2002 From: jcrotinger at proximation.com (James Crotinger) Date: Fri, 12 Apr 2002 16:35:55 -0600 Subject: [pooma-dev] Re: Ref counting Message-ID: Something else is wrong. Array and Field are just wrappers around ref-counted engines. Thus there should be no problem doing something like: Array<1> foo() { Array<1> retval(10,10); retval = 3; return retval; } Memory could be getting stepped on, or he might be returning a reference instead of a value. Jim >-----Original Message----- >From: Mark Mitchell [mailto:mark at codesourcery.com] >Sent: Friday, April 12, 2002 2:43 PM >To: Nils H. Busch; pooma-dev at pooma.codesourcery.com >Subject: [pooma-dev] Re: Ref counting > >> Is there a way to increase ref count of object to reference it outside >> of function scope or am trying to do something deprecated ? Should I be >> passing in a reference argument and initialize Array/Field in the >> function ? > >I suggest allocating the new Array/Field with "new", rather than as a >local variable, and then returning it the pointer. > >Jeffrey, do you have alternative ideas? > >-- >Mark Mitchell mark at codesourcery.com >CodeSourcery, LLC http://www.codesourcery.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From nilsb at cns.mpg.de Sat Apr 13 16:03:40 2002 From: nilsb at cns.mpg.de (Nils H. Busch) Date: Sat, 13 Apr 2002 18:03:40 +0200 Subject: [pooma-dev] Re: Ref counting References: Message-ID: <3CB856DB.9BB1E5C4@cns.mpg.de> Hi, thanks for quick reply. I am definitely returning a value. I will try using new. Will it help, if I send anyone the debugger output ? Thanks. > -- Nils H. Busch Max-Planck-Institute of Cognitive Neuroscience phone: ++49 (341) 9940-335 fax: ++49 (341) 9940-204 e-mail: nilsb at cns.mpg.de From andrius.kurtinaitis at maf.vu.lt Mon Apr 15 08:47:19 2002 From: andrius.kurtinaitis at maf.vu.lt (Andrius Kurtinaitis) Date: Mon, 15 Apr 2002 10:47:19 +0200 Subject: [pooma-dev] Re: Ref counting References: <3CB856DB.9BB1E5C4@cns.mpg.de> Message-ID: <3CBA9397.9050807@maf.vu.lt> Hello, I also had core dumps when returning a value of Array in a function. But only in optimized version. Andrius Kurtinaitis From rguenth at tat.physik.uni-tuebingen.de Fri Apr 19 09:31:48 2002 From: rguenth at tat.physik.uni-tuebingen.de (Richard Guenther) Date: Fri, 19 Apr 2002 11:31:48 +0200 (CEST) Subject: Compiling with gcc3 Message-ID: Hi! I'm in the process to become familiar with POOMA and discovered the r2 "version". Is CVS HEAD ok to start development on, or should I stay with 2.3.0? I'm currently using cheetah-1.1.4 rather than the suggested 1.0.1 version - is this still recommended? Also I'm building with gcc3.0 and/or upcoming gcc3.1 which both need adjusted configuration [new LINUXGCC3 config attached]. Does anyone have experience with optimization switches for these compilers to max out performance (the C implementations of the benchmarks seem to be way ahead of the C++/PII ones)? Thanx, Richard. -- Richard Guenther WWW: http://www.tat.physik.uni-tuebingen.de/~rguenth/ The GLAME Project: http://www.glame.de/ From rguenth at tat.physik.uni-tuebingen.de Fri Apr 19 09:33:37 2002 From: rguenth at tat.physik.uni-tuebingen.de (Richard Guenther) Date: Fri, 19 Apr 2002 11:33:37 +0200 (CEST) Subject: [pooma-dev] Compiling with gcc3 In-Reply-To: Message-ID: forgot the attachement -- Richard Guenther WWW: http://www.tat.physik.uni-tuebingen.de/~rguenth/ The GLAME Project: http://www.glame.de/ -------------- next part -------------- # Perl input file # 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 ########################################################################### # POOMA configuration settings # # Platform: LINUX (Intel Pentium running Linux) # Compiler: GCC3 # ########################################################################### # # This file contains specialized settings indicating how to build POOMA # with this platform and compiler. This is a perl script executed by # the 'configure' script at the top level of the POOMA directory structure. # This file has two sections: # 1) The locations of include files and libraries for external packages. # 3) The specialized settings on how to use this platform and compiler. # You should edit the lines in section 1) to the proper location of the # external packages. Do not edit the lines in section 2) unless you # know what you're doing. # ########################################################################### ########################################################################### # 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. # Library filenames should just list the name or use -l prefix as needed. # Required defines should have -a '-D' prepended. ########################################################################### ### location of SMARTS files for threads $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++"; ### location of TAU files for profiling $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"; ### location of PAWS files for program coupling $paws_able = 1; $paws_default_dir = "/home/paws/build/paws-current"; $paws_lib_subdir = "$archtype/lib"; $paws_makefile = "Makefile.paws-egcs"; ### location of HDF5 files for I/O $hdf5_able = 1; $hdf5_default_dir = "/usr/local/pooma/packages/hdf5"; ### 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"; ### location of LUX files for runtime visualization $lux_able = 0; ### location and names of Purify analysis package $purify_able = 0; ### location and names of Insure++ analysis package $insure_able = 1; $cppinsure = "g++"; $cinsure = "gcc"; $cpp_insure_run = "insure"; $cpp_insure_arg = "-Zvm -Zoi \"compiler $cppinsure\""; $c_insure_run = "insure"; $c_insure_arg = "-Zvm -Zoi \"compiler $cinsure\""; $ar_insure_run = "ar"; $ar_insure_arg = ""; $ld_insure_run = "insure"; $ld_insure_arg = "-Zvm -Zoi \"compiler $cppinsure\""; ########################################################################### # Section 2: compilation settings ########################################################################### ################### ### characteristics ################### $comptype = "gcc3"; $compext = "-gcc3"; ### are shared libraries supported? $canmakesharedlib = 1; $shared = 0; $sharedext = "so"; ### other special characteristics: for all special cases for this ### architecture that differ from the standard, include a line ### here to indicate what the differences are, setting a variable ### equal to one. If the architecture does the "right thing", though, ### there is no reason to mention anything here, although you can set ### the special characteristics variables to 0 if you want. # GCC3 does not have the C++ standard stringstream class $no_stringstream = 1; # GCC3 does have all the proper iomanips $no_complete_iomanips = 0; # GCC3 does have restrict (use __restrict__) $no_restrict = 0; # GCC3 does have complex in the std:: namespace $no_std_complex = 0; # GCC3 does have a ios_base class in std:: namespace $no_std_iosbase = 0; # Must include to get POSIX file modes $inc_sys_stat_h_file_modes = 1; # Use gettimeofday in Utilities/Clock.h $clock_uses_gettimeofday = 1; ################ ### C++ settings ################ ### general settings for using the C++ compiler, for both libs and apps $cpp = "g++"; $cppargs = "-ftemplate-depth-60 -Drestrict=__restrict__"; $cppex = ""; # flag to use exceptions $cppnoex = "-fno-exceptions"; # flag to use to turn off exceptions $cppverbose = "-v"; # flag for verbose compiler output $cpponeper = ""; # flag to turn on one-instantance-per-obj $cppstrict = " -ansi"; # flag for ANSI conformance checking ### debug or optimized build settings for C++ applications $cppdbg_app = "-g"; $cppopt_app = "-DNOPAssert -DNOCTAssert -O2 -fno-default-inline -funroll-loops -fstrict-aliasing"; ### debug or optimized build settings for C++ libraries $cppdbg_lib = $cppdbg_app; $cppopt_lib = $cppopt_app; ############## ### C settings ############## ### general settings for using the C compiler, for both libs and apps $c = "gcc"; $cargs = "-Drestrict=__restrict__"; $cverbose = "-v -Wall"; ### debug or optimized build settings for C applications $cdbg_app = "-g"; $copt_app = "-O3 -funroll-loops -fstrict-aliasing"; ### debug or optimized build settings for C libraries $cdbg_lib = $cdbg_app; $copt_lib = $copt_app; ################ ### F77 settings ################ ### general settings for using the F77 compiler, for both libs and apps $f77 = "g77"; $f77args = ""; $f77libs = ""; $f77verbose = "-v"; ### debug or optimized build settings for F77 applications $f77dbg_app = "-g"; $f77opt_app = "-O3 -funroll-loops"; ### debug or optimized build settings for F77 libraries $f77dbg_lib = $f77dbg_app; $f77opt_lib = $f77opt_app; ################### ### linker settings ################### $link = $cpp; $linkargs = ""; $linkverbose = "-Wl,-v"; $linkshare = "-Wl,-rpath \$(POOMA_LIBDIR)"; ##################### ### archiver settings ##################### $ar = "ar"; # program to make static lib $arshare = $cpp; # program to make shared lib # arguments for making static lib $arargs = "rc"; # arguments for making shared lib $arshareargs = "-Wl,-noinhibit-exec -shared -o"; # flag to turn on verbose ar output $arverbose = ""; $arshareverbose = $cppverbose; # flag for exceptions $arex = ""; $arshareex = $cppex; # flag for no exceptions $arnoex = ""; $arsharenoex = $cppnoex; # flag for one instantiation per object $aroneper = ""; $arshareoneper = $cpponeper; # flag for ANSI conformance checking $arstrict = ""; $arsharestrict = $cppstrict; ### debug or optimized build settings for archiving libraries $ardbg = ""; $aropt = ""; $arsharedbg = $cppdbg_app; $arshareopt = $cppopt_app; # ACL:rcsinfo # ---------------------------------------------------------------------- # $RCSfile: LINUXEGCS.conf,v $ $Author: oldham $ # $Revision: 1.26 $ $Date: 2001/10/15 17:34:28 $ # ---------------------------------------------------------------------- # ACL:rcsinfo ########################################################################### # the last line of this file must be a '1' so that Perl sees a non-zero # results from this file ########################################################################### 1; From rguenth at tat.physik.uni-tuebingen.de Fri Apr 19 10:17:44 2002 From: rguenth at tat.physik.uni-tuebingen.de (Richard Guenther) Date: Fri, 19 Apr 2002 12:17:44 +0200 (CEST) Subject: [PATCH] Doof3d doesnt evaluate Message-ID: Hi! The Doof3d benchmark doesnt evaluate for the P2 implementations (neither in 2.3.0, nor in HEAD). Richard. Index: Doof3dInP2.h =================================================================== RCS file: /home/pooma/Repository/r2/benchmarks/Doof3d/Doof3dInP2.h,v retrieving revision 1.16 diff -u -r1.16 Doof3dInP2.h --- Doof3dInP2.h 2000/07/04 05:06:39 1.16 +++ Doof3dInP2.h 2002/04/19 10:16:21 @@ -94,6 +94,8 @@ a_m(I-1,J, K+1) + a_m(I, J, K+1) + a_m(I+1,J, K+1) + a_m(I-1,J+1,K+1) + a_m(I, J+1,K+1) + a_m(I+1,J+1,K+1)); + Pooma::blockAndEvaluate(); + // save results for checking check_m = b_m(n_m / 2, n_m / 2, n_m / 2); } @@ -213,6 +215,8 @@ void run() { // apply diffusion stencil b_m(I,J, K) = stencil_m( a_m ); + + Pooma::blockAndEvaluate(); // save results for checking check_m = b_m(n_m/2,n_m/2,n_m/2); -- Richard Guenther WWW: http://www.tat.physik.uni-tuebingen.de/~rguenth/ The GLAME Project: http://www.glame.de/ From nilsb at cns.mpg.de Fri Apr 19 12:19:35 2002 From: nilsb at cns.mpg.de (Nils H. Busch) Date: Fri, 19 Apr 2002 14:19:35 +0200 Subject: [pooma-dev] Re: Ref counting References: <3CB856DB.9BB1E5C4@cns.mpg.de> <20020415091037.A1985@codesourcery.com> Message-ID: <3CC00B56.590C0D3A@cns.mpg.de> Hi, below is the small program that causes the assertion failure ### POOMA Assertion Failure ### ### initialized() ### File /home/elster1/busch/local/pooma/sgi64/src/Geometry/RectilinearGeometryBase.h; Line 218. Pooma::pAbort called. In default abort handler. Abort (core dumped) . As I found out the problem lies not with returning a field/array, but with creating a C array of pooma arrays or fields. It doesn't make any difference whether it's allocated on the stack or on the heap. The assertion comes from the Field::operator=() call and the underlying assign. I might be doing something stupid, but it looks like vaild C++ code to me. The program: #include //#include "Pooma/Arrays.h" #include "Pooma/Fields.h" const int Dim = 1; // typedefs typedef UniformRectilinearMesh, double> Mesh_t; typedef DiscreteGeometry Geometry_t; typedef MultiPatch Engine_t; typedef Field Field_t; // main int main(int argc, char *argv[]) { Pooma::initialize(argc,argv); Interval dom(10); Mesh_t::PointType_t origin(0.0); Mesh_t::PointType_t spacings(1.0); Mesh_t mesh(dom, origin, spacings); Geometry_t geom(mesh); UniformGridLayout layout(geom.totalDomain(), ReplicatedTag()); Field_t a[2]; a[0] = Field_t(geom, layout); a[1] = Field_t(geom, layout); a[0] = 3; a[1] = a[0]; std::cout << a[0] << std::endl << a[1] << std::endl; Pooma::finalize(); return 0; } The dbx output: > 0 _kill(0xf861, 0x6, 0x0, 0x0, 0x1, 0x2, 0xffffffa770, 0x0) ["/xlv51/6.5.5f/work/irix/lib/libc/libc_64_M4/signal/kill.s":15, 0xda5cc98] 1 _raise(0xf861, 0x6, 0x0, 0x0, 0x1, 0x2, 0xffffffa770, 0x0) ["/xlv51/6.5.5f/work/irix/lib/libc/libc_64_M4/signal/raise.c":27, 0xda5d664] 2 abort(0xf861, 0x6, 0x0, 0x0, 0x1, 0x2, 0xffffffa770, 0x0) ["/xlv51/6.5.5f/work/irix/lib/libc/libc_64_M4/gen/abort.c":52, 0xd9cd0e0] 3 Pooma::toss_cookies(const char*,const char*,int ...)(0xf861, 0x1, 0xda00000000, 0x0, 0x8, 0xffffffad40, 0x10044f50, 0xffffffad40) ["/scr/origin3/nilsb/apps/pooma-2.3.0/src/IO/Serializers.cmpl.cpp":498, 0xdffbcb6c] 4 ::RectilinearGeometryBase,double> >::physicalDomain(void) const(this = 0xffffffac98, = 0xffffffa9f0) ["/home/elster1/busch/local/pooma/sgi64/src/Geometry/RectilinearGeometryBase.h":218, 0x10028664] 5 ::ConstField,double> >,double,MultiPatch >::physicalDomain(void) const(this = 0xffffffac38, = 0xffffffa9f0) ["/home/elster1/busch/local/pooma/sgi64/src/Field/ConstField.h":944, 0x100331d4] 6 ::Field,double> >,double,MultiPatch >::operator()(void) const(this = 0xffffffac38, = 0xffffffaa10) ["/home/elster1/busch/local/pooma/sgi64/src/Field/Field.h":1041, 0x100335b0] 7 ::assign(const Field,double> >,double,MultiPatch >&,const Field,double> >,double,MultiPatch >&,const OpAssign&)(lhs = 0xffffffac38, rhs = 0xffffffad28, op = 0xffffffab80) ["/home/elster1/busch/local/pooma/sgi64/src/Field/Field.cpp":236, 0x1001a214] 8 ::Field,double> >,double,MultiPatch >::operator=(const Field,double> >,double,MultiPatch >&)(this = 0xffffffac38, rhs = 0xffffffad28) ["/home/elster1/busch/local/pooma/sgi64/src/Field/Field.h":1138, 0x10033610] 9 ::main(argc = 1, argv = 0xffffffae68) ["/home/elster1/busch/prg/pooma/test/fieldtest.cpp":51, 0x1001a034] 10 __start() ["/xlv55/kudzu-apr12/work/irix/lib/libc/libc_64_M4/csu/crt1text.s":177, 0x10019888] (dbx) up 4 ::RectilinearGeometryBase,double> >::physicalDomain(void) const(this = 0xffffffac98, = 0xffffffa9f0) ["/home/elster1/busch/local/pooma/sgi64/src/Geometry/RectilinearGeometryBase.h":218, 0x10028664] (dbx) up 3 :assign: 236 ViewedLHS_t vlhs = lhs(); (dbx) dump ::assign(const Field,double> >,double,MultiPatch >&,const Field,double> >,double,MultiPatch >&,const OpAssign&)(lhs = 0xffffffac38, rhs = 0xffffffad28, op = 0xffffffab80) ["/home/elster1/busch/local/pooma/sgi64/src/Field/Field.cpp":236, 0x1001a214] vlhs = class { } vrhs = class { } rhsExpr = struct { reference_m = 0xa } (dbx) up 2 ::main: 51 a[0] = Field_t(geom, layout); It seems to me that only a combination of default constructors and then Field::initialize works and I don't understand why. Thanks. -- Nils H. Busch Max-Planck-Institute of Cognitive Neuroscience phone: ++49 (341) 9940-335 fax: ++49 (341) 9940-204 e-mail: nilsb at cns.mpg.de From nilsb at cns.mpg.de Fri Apr 19 12:24:15 2002 From: nilsb at cns.mpg.de (Nils H. Busch) Date: Fri, 19 Apr 2002 14:24:15 +0200 Subject: [pooma-dev] Re: Ref counting References: <3CB856DB.9BB1E5C4@cns.mpg.de> <20020415091037.A1985@codesourcery.com> <3CC00B56.590C0D3A@cns.mpg.de> Message-ID: <3CC00C6F.655FFBC2@cns.mpg.de> I forgot to mention, I compiled and ran the program on Irix 6.5.5 with SGI CC 7.3 and that ominous patch removed both in debug and optimized version. -- Nils H. Busch Max-Planck-Institute of Cognitive Neuroscience phone: ++49 (341) 9940-335 fax: ++49 (341) 9940-204 e-mail: nilsb at cns.mpg.de From andrius.kurtinaitis at maf.vu.lt Fri Apr 19 12:41:58 2002 From: andrius.kurtinaitis at maf.vu.lt (Andrius Kurtinaitis) Date: Fri, 19 Apr 2002 14:41:58 +0200 Subject: [pooma-dev] Re: Ref counting References: <3CB856DB.9BB1E5C4@cns.mpg.de> <20020415091037.A1985@codesourcery.com> <3CC00B56.590C0D3A@cns.mpg.de> Message-ID: <3CC01096.5090001@maf.vu.lt> It seems, you are right. Here is what i read in the Pooma manual about Arrays: An uninitialized Array, created using its parameter-less constructor, must have a specified domain before it can be used. Andrius Kurtinaitis > It seems to me that only a combination of default constructors and then > Field::initialize works and I don't understand why. From mark at codesourcery.com Fri Apr 19 17:16:51 2002 From: mark at codesourcery.com (Mark Mitchell) Date: Fri, 19 Apr 2002 10:16:51 -0700 Subject: Compiling with gcc3 In-Reply-To: References: Message-ID: <41890000.1019236611@gandalf.codesourcery.com> --On Friday, April 19, 2002 11:31:48 AM +0200 Richard Guenther wrote: > Hi! > > I'm in the process to become familiar with POOMA and discovered > the r2 "version". Is CVS HEAD ok to start development on, or > should I stay with 2.3.0? I'm currently using cheetah-1.1.4 > rather than the suggested 1.0.1 version - is this still > recommended? The CVS HEAD should be fine. I don't know about which Cheetah version is most appropriate. As far as I know, there's not yet any optimization option to G++ which makes it perform as fast as C code on most of the benchmarks. I would suggest *not* using -O3; it generally actually makes code with heavy use of inlining slower than -O2. Thanks, -- Mark Mitchell mark at codesourcery.com CodeSourcery, LLC http://www.codesourcery.com From toon.knapen at si-lab.com Wed Apr 24 17:25:13 2002 From: toon.knapen at si-lab.com (Toon Knapen) Date: Wed, 24 Apr 2002 13:25:13 -0400 Subject: fields on unstructured meshes Message-ID: <20020424112046.19F852040F@eos.telenet-ops.be> The documentation of pooma 2.3 indicates that one of the next releases will contain unstructured meshes. I guess it's not yet for 2.4 since I can't find them in the CVS. But I don't see how the Field concept will be extended to unstructured meshes. A field currently supports Array-like indexing (e.g. 2 indices for 2-dimensional meshes). But on unstructured meshes, the elements need be numbered using some numbering scheme that is not purely based on the position of the element. But what happens with the Array-like indexing in this case ? I'm also curious why you decided to use the dimension (of the problem) as a template parameter . As a consequence, you need different executables to simulate input-files describing a 2D and a 3D problem. But I guess the decision is based on the performance that can be gained by fixing the dimension ? toon From rguenth at tat.physik.uni-tuebingen.de Wed Apr 24 13:24:42 2002 From: rguenth at tat.physik.uni-tuebingen.de (Richard Guenther) Date: Wed, 24 Apr 2002 15:24:42 +0200 (CEST) Subject: pooma status wrt AMR/HDF5 Message-ID: Hi! First a short introduction to myself - I'm a PhD student at University of Tuebingen doing 3D Magneto-Radiation-Hydrodynamics and like to use pooma [or at least technology like pete] as the framework for the code. Whats the current status of HDF5 IO support? From looking at the CVS HEAD I cannot see hdf usage anywhere - has anyone used pooma with parallel/serial IO using hdf5? Also what is the state of AMR support - is it straight forward to integrate or will it require changes of the engine architectures? Has anyone started doing AMR (or static mesh refinement)? Thanx, Richard. -- Richard Guenther WWW: http://www.tat.physik.uni-tuebingen.de/~rguenth/ The GLAME Project: http://www.glame.de/ From oldham at codesourcery.com Wed Apr 24 13:50:18 2002 From: oldham at codesourcery.com (Jeffrey Oldham) Date: Wed, 24 Apr 2002 06:50:18 -0700 Subject: [pooma-dev] pooma status wrt AMR/HDF5 In-Reply-To: ; from rguenth@tat.physik.uni-tuebingen.de on Wed, Apr 24, 2002 at 03:24:42PM +0200 References: Message-ID: <20020424065018.A20592@codesourcery.com> On Wed, Apr 24, 2002 at 03:24:42PM +0200, Richard Guenther wrote: > Hi! > > First a short introduction to myself - I'm a PhD student at > University of Tuebingen doing 3D Magneto-Radiation-Hydrodynamics > and like to use pooma [or at least technology like pete] as the > framework for the code. > > Whats the current status of HDF5 IO support? From looking at the > CVS HEAD I cannot see hdf usage anywhere - has anyone used pooma > with parallel/serial IO using hdf5? I am not aware of anyone who has integrated HDF5 with Pooma. > Also what is the state of AMR support - is it straight forward to > integrate or will it require changes of the engine architectures? > Has anyone started doing AMR (or static mesh refinement)? AMR would be a nice addition to Pooma. Jeffrey D. Oldham oldham at codesourcery.com From rguenth at tat.physik.uni-tuebingen.de Thu Apr 25 09:48:46 2002 From: rguenth at tat.physik.uni-tuebingen.de (Richard Guenther) Date: Thu, 25 Apr 2002 11:48:46 +0200 (CEST) Subject: examples/ status Message-ID: Hi! The following examples do not compile: Field/Caramana Field/Laplace Field/Laplace2 Field/ScalarAdvection1D Field/StatigraphicFlow (expected to fail from comments inside code) Lattice Particles/PIC2d Richard. -- Richard Guenther WWW: http://www.tat.physik.uni-tuebingen.de/~rguenth/ The GLAME Project: http://www.glame.de/ From nilsb at cns.mpg.de Thu Apr 25 16:45:33 2002 From: nilsb at cns.mpg.de (Nils H. Busch) Date: Thu, 25 Apr 2002 18:45:33 +0200 Subject: Runtime optimized/non-optimized Message-ID: <3CC832AD.8A656C19@cns.mpg.de> Hello, I have a general question, I could not exactly answer myself. Why is the runtime of Pooma code so much longer when running in debug mode (-g) compared to optimized code (-Ox), order of magnitude at least 10x? This concerns both apps compiled in both ways as also the library itself. Even for parts that are not Pooma related, there is a great runtime difference. I suspect, it has to do with the template expression mechanism, but I would like to understand exactly what the compiler does so differently. Thanks. -- Nils H. Busch Max-Planck-Institute of Cognitive Neuroscience phone: ++49 (341) 9940-335 fax: ++49 (341) 9940-204 e-mail: nilsb at cns.mpg.de From rguenth at tat.physik.uni-tuebingen.de Thu Apr 25 19:41:56 2002 From: rguenth at tat.physik.uni-tuebingen.de (Richard Guenther) Date: Thu, 25 Apr 2002 21:41:56 +0200 (CEST) Subject: [pooma-dev] Runtime optimized/non-optimized In-Reply-To: <3CC832AD.8A656C19@cns.mpg.de> Message-ID: On Thu, 25 Apr 2002, Nils H. Busch wrote: > Hello, > > I have a general question, I could not exactly answer myself. > > Why is the runtime of Pooma code so much longer when running in debug > mode (-g) compared to optimized code (-Ox), order of magnitude at least > 10x? This concerns both apps compiled in both ways as also the library > itself. > Even for parts that are not Pooma related, there is a great runtime > difference. > I suspect, it has to do with the template expression mechanism, but I > would like to understand exactly what the compiler does so differently. The compiler usually refrains from inlining any functions with -g - and inlining is essential for the expression template mechanism to work with acceptable performance. Try using -O -g instead - at least gcc does inlining with -O, so you should get better performance while still being able to debug (with some restrictions for the expression templates, of course). Richard. -- Richard Guenther WWW: http://www.tat.physik.uni-tuebingen.de/~rguenth/ The GLAME Project: http://www.glame.de/ From oldham at codesourcery.com Fri Apr 26 00:47:32 2002 From: oldham at codesourcery.com (Jeffrey Oldham) Date: Thu, 25 Apr 2002 17:47:32 -0700 Subject: [pooma-dev] fields on unstructured meshes In-Reply-To: <20020424112046.19F852040F@eos.telenet-ops.be>; from toon.knapen@si-lab.com on Wed, Apr 24, 2002 at 01:25:13PM -0400 References: <20020424112046.19F852040F@eos.telenet-ops.be> Message-ID: <20020425174732.A7024@codesourcery.com> On Wed, Apr 24, 2002 at 01:25:13PM -0400, Toon Knapen wrote: > > The documentation of pooma 2.3 indicates that one of the next releases will > contain unstructured meshes. I guess it's not yet for 2.4 since I can't find > them in the CVS. > > But I don't see how the Field concept will be extended to unstructured > meshes. A field currently supports Array-like indexing (e.g. 2 indices for > 2-dimensional meshes). But on unstructured meshes, the elements need be > numbered using some numbering scheme that is not purely based on the position > of the element. But what happens with the Array-like indexing in this case ? I personally have not thought about unstructured Fields. Perhaps a one-dimensional index scheme to number regions even for a multi-dimensional might work. > I'm also curious why you decided to use the dimension (of the problem) as a > template parameter . As a consequence, you need different executables to > simulate input-files describing a 2D and a 3D problem. But I guess the > decision is based on the performance that can be gained by fixing the > dimension ? As you point out, dimensions are template parameters. Since the dimension is known at compile-time, only member functions related to these parameters need be present in the executable. Also, this decision need not be made at run-time. For example, it could be known that only two-dimensional read operators are needed. One can avoid this restriction by writing a set of functions, each creating containers of a particular dimension. All other functions will have templates to handle arbitrary dimensions. At run-time, a comamnd-line option can determine which function will be invoked. Of course, space requirements would be larger than if the dimension was known at compile time. Thanks, Jeffrey D. Oldham oldham at codesourcery.com From jcrotinger at proximation.com Fri Apr 26 15:20:12 2002 From: jcrotinger at proximation.com (James Crotinger) Date: Fri, 26 Apr 2002 09:20:12 -0600 Subject: [pooma-dev] examples/ status Message-ID: These were probably never ported to work with the new Field abstraction, which was the major thrust of 2.4. Jim >-----Original Message----- >From: Richard Guenther [mailto:rguenth at tat.physik.uni-tuebingen.de] >Sent: Thursday, April 25, 2002 3:49 AM >To: pooma-dev at pooma.codesourcery.com >Subject: [pooma-dev] examples/ status > >Hi! > >The following examples do not compile: > >Field/Caramana >Field/Laplace >Field/Laplace2 >Field/ScalarAdvection1D >Field/StatigraphicFlow (expected to fail from comments inside code) >Lattice >Particles/PIC2d > > >Richard. > >-- >Richard Guenther >WWW: http://www.tat.physik.uni-tuebingen.de/~rguenth/ >The GLAME Project: http://www.glame.de/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From jcrotinger at proximation.com Fri Apr 26 15:59:29 2002 From: jcrotinger at proximation.com (James Crotinger) Date: Fri, 26 Apr 2002 09:59:29 -0600 Subject: [pooma-dev] fields on unstructured meshes Message-ID: >-----Original Message----- >From: Toon Knapen [mailto:toon.knapen at si-lab.com] >Sent: Wednesday, April 24, 2002 11:25 AM >To: pooma-dev at pooma.codesourcery.com >Subject: [pooma-dev] fields on unstructured meshes > > >The documentation of pooma 2.3 indicates that one of the next releases will >contain unstructured meshes. I guess it's not yet for 2.4 since I can't >find >them in the CVS. That was the plan when the Pooma team was still at Los Alamos. Obviously the docs were not given a thorough review when 2.3 was released. When 2.4 was started, I think there was still some hope that unstructured might be a follow-on project - probably 2.5. As the lab cut funding for 2.4 in the middle of the project, that is very unlikely. >But I don't see how the Field concept will be extended to unstructured >meshes. A field currently supports Array-like indexing (e.g. 2 indices for >2-dimensional meshes). But on unstructured meshes, the elements need be >numbered using some numbering scheme that is not purely based on the >position >of the element. But what happens with the Array-like indexing in this case >? There would be no tensor product indexing. This was definitely a research-area that we had not explored in much depth. But we did believe that there was value to data-parallel abstractions with unstructured. >I'm also curious why you decided to use the dimension (of the problem) as a >template parameter . As a consequence, you need different executables to >simulate input-files describing a 2D and a 3D problem. But I guess the >decision is based on the performance that can be gained by fixing the >dimension ? This is required for the compile-time optimizations to work. Indexing has to know the dimensionality in order for expressions like A(I,J) = B(I,J+1) - B(I-1,J); to effectively turn into a set of nested loops each containing a(i,j) = b(i,j+1) - b(i-1,j); // Fortran notation This has to happen at compile time in order for the expression templates to yield the kind of efficiency that one would get using hand-coded loops. This does lead to code bloat in certain applications, but it is basically unavoidable if you're going to use expression templates. Jim -------------- next part -------------- An HTML attachment was scrubbed... URL: From rguenth at tat.physik.uni-tuebingen.de Tue Apr 30 15:03:16 2002 From: rguenth at tat.physik.uni-tuebingen.de (Richard Guenther) Date: Tue, 30 Apr 2002 17:03:16 +0200 (CEST) Subject: Field semantics Message-ID: Hi! Just spent the last two days debugging my HD simulation to figure out that (p,T,rh, etc. being Fields with 1 guard cell) Interval<1> It = rh.totalDomain(); p(It) = T * rh; is not the same as p(It) = T(It) * rh(It); why is this so? Do I generally need to specify the domain on both sides of the equations? Richard. -- Richard Guenther WWW: http://www.tat.physik.uni-tuebingen.de/~rguenth/ The GLAME Project: http://www.glame.de/ From jcrotinger at proximation.com Tue Apr 30 15:41:31 2002 From: jcrotinger at proximation.com (James Crotinger) Date: Tue, 30 Apr 2002 09:41:31 -0600 Subject: [pooma-dev] Field semantics Message-ID: I have to say that I'm surprised that this wasn't caught by some assertion. You don't give all of the details, but it looks like the problem was due to a domain mismatch. When you say T * rh This operation is, I believe, only performed on the "physical" domain - i.e. it is not extended into the guards. But your p(It) explicitly says to assign into the guards (since It is the "totalDomain", which includes the guards). Now, given that the domain of the RHS is not the same as the domain of the LHS, this ought to raise an exception somewhere. Jim >-----Original Message----- >From: Richard Guenther [mailto:rguenth at tat.physik.uni-tuebingen.de] >Sent: Tuesday, April 30, 2002 9:03 AM >To: pooma-dev at pooma.codesourcery.com >Subject: [pooma-dev] Field semantics > >Hi! > >Just spent the last two days debugging my HD simulation to figure out >that (p,T,rh, etc. being Fields with 1 guard cell) > >Interval<1> It = rh.totalDomain(); >p(It) = T * rh; > >is not the same as > >p(It) = T(It) * rh(It); > >why is this so? Do I generally need to specify the domain on >both sides of the equations? > >Richard. > >-- >Richard Guenther >WWW: http://www.tat.physik.uni-tuebingen.de/~rguenth/ >The GLAME Project: http://www.glame.de/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From rguenth at tat.physik.uni-tuebingen.de Tue Apr 30 19:05:56 2002 From: rguenth at tat.physik.uni-tuebingen.de (Richard Guenther) Date: Tue, 30 Apr 2002 21:05:56 +0200 (CEST) Subject: [pooma-dev] Field semantics In-Reply-To: Message-ID: On Tue, 30 Apr 2002, James Crotinger wrote: > I have to say that I'm surprised that this wasn't caught by some assertion. > > You don't give all of the details, but it looks like the problem was due to > a domain mismatch. When you say > > T * rh > > This operation is, I believe, only performed on the "physical" domain - i.e. Ah, ok - that makes sense. For a simple rh(rh.totalDomain()) = T; I dont need to specify the domain of T? I assumed a conforming domain gets selected by the engine for the RHS... > it is not extended into the guards. But your p(It) explicitly says to assign > into the guards (since It is the "totalDomain", which includes the guards). > Now, given that the domain of the RHS is not the same as the domain of the > LHS, this ought to raise an exception somewhere. Hmm - I compiled the pooma lib with optimizations (i.e. assertions off), but my program with debugging and assertions not switched off - maybe the exception in question is not raised within templated code. I'll try re-building pooma with debugging information (but it gets slow as hell). Thanx, Richard. From jcrotinger at proximation.com Tue Apr 30 19:11:37 2002 From: jcrotinger at proximation.com (James Crotinger) Date: Tue, 30 Apr 2002 13:11:37 -0600 Subject: [pooma-dev] Field semantics Message-ID: >Ah, ok - that makes sense. For a simple > rh(rh.totalDomain()) = T; >I dont need to specify the domain of T? I assumed a conforming domain gets >selected by the engine for the RHS... Again, I'm not sure what the details are here, but this is probably wrong. You probably want to either do rh = T; or do Interval<1> I = rh.totalDomain(); rh(I) = T(I); The latter will assign to the external guards; the former will not. Pooma can't easily guess what you want - yes, for the total domain there is no ambiguity, but then Pooma would have to have some way to figure out that the domain passed in was the total domain. For a subdomain, it could be almost anything; e.g. rh(I) = T(I+1); I don't know if the domain check was a "PAssert" or a "PInsist". It wasn't in an inner loop, so I'd have thought it would be the latter (which do not compile away in optimized code). Jim -------------- next part -------------- An HTML attachment was scrubbed... URL: