From mark at codesourcery.com Fri Mar 9 21:57:28 2001 From: mark at codesourcery.com (Mark Mitchell) Date: Fri, 09 Mar 2001 13:57:28 -0800 Subject: CVS Message-ID: <20010309135728O.mitchell@codesourcery.com> I hope everyone enjoyed our meeting over the last couple of days. I know I did! We've set up the read-only anonymous CVS Repository for POOMA. The repository contains the exact bits as of this morning from LANL. Here is how you access it: cvs -d :pserver:anoncvs at pooma.codesourcery.com:/home/pooma/Repository login That should be one giant line. When you are prompted for a password, use `anoncvs'. You only have to do this step once; the authentication token will be stored forever on your computer. Then, do: cvs -d :pserver:anoncvs at pooma.codesourcery.com:/home/pooma/Repository co r2 to check out the sources. If you don't want to have to type the giant `-d' bit, set the CVSROOT environment variable to contain the `:pserver...' bit. Of course, once you have the `r2' directory checked out, you'll not have to type the `-d' bit again. I've researched the idea of using password (rather than SSH) based CVS a little more, and the news isn't good. The risks are greater than I had hoped; apparently, there is a good chance that compromise will result in much greater damage than simply a mangled repository. In general, the attacker could get lots of other machine access as well. So, it would be really good if we could use SSH1 keys. Please generate a new SSH key and send me the public key at your convenience. (Except for Jeffrey; I've already got a key for you.) If this presents a real problem for the Mac folks, we need to figure out what to do. One possibility is to allow connections only from certain IP addresses; I'm not sure whether everyone has static IP addresses or not. We definitely need to figure out how to make things convenient for everyone. Thank you, -- Mark Mitchell mark at codesourcery.com CodeSourcery, LLC http://www.codesourcery.com From mark at codesourcery.com Fri Mar 9 23:55:11 2001 From: mark at codesourcery.com (Mark Mitchell) Date: Fri, 09 Mar 2001 15:55:11 -0800 Subject: Mailing lists Message-ID: <20010309155511P.mitchell@codesourcery.com> [RESENT -- Mailing list server snafu the first time around...] As per our discussions yesterday, we have set up three new mailing lists: pooma-design at pooma.codesourcery.com pooma-cvs at pooma.codesourcery.com pooma-support at pooma.codesourcery.com Our mailing list software does not (sadly) make it easy to drop the redundant `pooma' in the mailing list name. The purpose of the `pooma-design' list is to discuss interfaces, major changes, etc. -- things that people at the lab are likely to care about. It's not for discussions of every minor change; we don't want to fill up John and Jean's email boxes needlessly. The `pooma-design' list contains the `pooma-dev' mailing list as a sublist; there is no need to post to both lists. The subscribers to the `pooma-design' list include John Hall and Jean Marshall, as well as the developers on the `pooma-dev' list. The `pooma-cvs' list will not accept postings from the oustide world; it's only purpose is to log changes to the repository. You can subscribe to this list if you want to get a message whenever a change occurs. The `pooma-support' list is for now just an alias for the `pooma-dev' list. That way a developers will see the support requests quickly. As discussed yesterday, once QMTrack comes along a little further, we'll set that up to handle support requests. Also, it appears that I gave the wrong name for the development mailing list. It should have been `pooma-dev at pooma.codesourcery.com', not `pooma-devel at pooma.codesourcery.com'. All of the lists are public. Other people may subscribe by sending mail to `pooma-dev-request', `pooma-design-request', `pooma-cvs-request', etc. So pass that information along if you think there are other people who should be on the lists. Or, send the addresses to me, and I will add them. There are also digest versions of every list that will collect multiple messages and send them along as a single message every so often. Sending mail (of any kind) to the `-request' addresses will explain how to get on the digest version of the lists, if that would be more convenient to you. Yours, -- Mark Mitchell mark at codesourcery.com CodeSourcery, LLC http://www.codesourcery.com From mark at codesourcery.com Sun Mar 11 18:01:29 2001 From: mark at codesourcery.com (Mark Mitchell) Date: Sun, 11 Mar 2001 10:01:29 -0800 Subject: Meeting Message-ID: <20010311100129C.mitchell@codesourcery.com> Thanks to all for a good meeting. So that we're all on the same page, and present a consistent picture to the lab, let's agree that the Wednesday meeting went 9 AM - 6 PM (9 hours) and the Thursday meeting 9 AM - 3 PM (6 hours). Of course, if you did additional work outside this time period, record that too. Let me know if you have any difficulties with the timekeeping machinery. Thanks, -- Mark Mitchell mark at codesourcery.com CodeSourcery, LLC http://www.codesourcery.com From mark at codesourcery.com Tue Mar 13 16:34:31 2001 From: mark at codesourcery.com (Mark Mitchell) Date: Tue, 13 Mar 2001 08:34:31 -0800 Subject: Pooma 2 and GCC In-Reply-To: <15022.17686.262402.224782@mutley.lanl.gov> References: <15021.9361.569506.651272@mutley.lanl.gov> <20010312184309Q.mitchell@codesourcery.com> <15022.17686.262402.224782@mutley.lanl.gov> Message-ID: <20010313083431N.mitchell@codesourcery.com> >>>>> "Dave" == Dave Nystrom writes: Dave> Mark Mitchell writes: >> >>>>> "Dave" == Dave Nystrom writes: >> Dave> Anyway, the build of Pooma 2 failed to complete - actually Dave> failed on about the second or third translation unit. Could >> Right. POOMA 2 is known not to compile with any released >> version of GCC -- and certainly not with the old versions of >> EGCS. Dave> Thanks Mark. I had thought that Pooma 2 would compile with Dave> the versions of EGCS that you were working on and that your Dave> version of EGCS had been folded into the current GCC Dave> development tree. Was the version of EGCS that I quoted to Dave> you pretty old? There were intermediate points at which certain versions of EGCS would compile certain versions of POOMA -- but never a released version of EGCS and a released version of POOMA. >> The GCC 3.0 release will compile POOMA 2 -- but it is not yet >> available. Dave> Are you able to speculate on when GCC 3.0 will become Dave> available? No -- this really isn't something I can control. I can say when to stop -- but I can't make volunteers volunteer. Dave> Also, are the new Pooma 2 mail aliases available yet? I Dave> kept getting bounced email until I tried the support email Dave> address. There was a typo on the board -- it's `pooma-dev' not `pooma-devl'. Thanks, -- Mark Mitchell mark at codesourcery.com CodeSourcery, LLC http://www.codesourcery.com From mark at codesourcery.com Tue Mar 13 16:52:46 2001 From: mark at codesourcery.com (Mark Mitchell) Date: Tue, 13 Mar 2001 08:52:46 -0800 Subject: Fw: processing .fm materials Message-ID: <20010313085246P.mitchell@codesourcery.com> Allan asks how we're supposed to deal with the FrameMaker files in the doc directory. That's a significant obstacle to open-source acceptance; nobody can read FrameMaker files. We can buy copies of FrameMaker, but they are expensive. Does anyone know of a FrameMaker->HTML converter that works well? Since we had sort-of decided to standardize on HTML, that would be a reasonable choice. Or, does anyone have a copy of FrameMaker that they could use to do `Save As HTML' so that we would have HTML copies of the docs? Thoughts? -- Mark Mitchell mark at codesourcery.com CodeSourcery, LLC http://www.codesourcery.com -------------- next part -------------- An embedded message was scrubbed... From: "Allan Stokes" Subject: processing .fm materials Date: Mon, 12 Mar 2001 20:48:52 -0800 Size: 1849 URL: From mark at codesourcery.com Tue Mar 13 17:55:46 2001 From: mark at codesourcery.com (Mark Mitchell) Date: Tue, 13 Mar 2001 09:55:46 -0800 Subject: Fw: processing .fm materials In-Reply-To: <20010313085246P.mitchell@codesourcery.com> References: <20010313085246P.mitchell@codesourcery.com> Message-ID: <20010313095546P.mitchell@codesourcery.com> >>>>> "Mark" == Mark Mitchell writes: Mark> Allan asks how we're supposed to deal with the FrameMaker Mark> files in the doc directory. That's a significant obstacle Mark> to open-source acceptance; nobody can read FrameMaker files. I've talked to Scott about this. It turns out that the old FrameMaker docs are a) out of date, and b) not very good anyhow. Instead, the top-level HTML directory is the place to look for documentation, and the place to add new documentation. -- Mark Mitchell mark at codesourcery.com CodeSourcery, LLC http://www.codesourcery.com From allan at stokes.ca Wed Mar 14 21:26:23 2001 From: allan at stokes.ca (Allan Stokes) Date: Wed, 14 Mar 2001 13:26:23 -0800 Subject: problems loading Visual Studio projects Message-ID: Hello everyone, I'm slowly mastering the mechanics of working with the Pooma tree. So far I have CVS working with write access and I was able to compile Pooma in a FreeBSD/gcc environment. The test code is producing errors in this environment, but that is the subject of another mail. Yesterday I began the process of getting Pooma to compile in my w2k environment. I upgraded myself to Intel 5.0 and then tried to load the VisualC++ workspaces into Visual Studio 6 for a test compile. The workspaces file (.dsw) load without error, but I end up with an empty workspace (no projects). I was working in the benchmark workspace at the time, so I thought I would just add maybe eight projects (.dsp files) into this workspace manually. When I try to load one of these project files into an empty workspace (I've also tried this with a virgin workspace) VS6 complains that the "project file was not generated by VS6" and offers to wrap the project file, a process which creates a new .dsp file (which I save under a new name). I can now load the new-and-improved .dsp project into my blank workspace, but my workspace project tree still shows (0) projects loaded. Recognizing that I'm in the land of Lilliput, I checked the VS menus and sure enough VS6 has added an option to the menu for me to build the project which I still can not see under my project tree. If I try to compile the phantom project via the menu option, I get complaints pertaining to NMAKE. Whoa, one problem at a time. Working in this environment a few weeks ago, but with Intel 4.5 installed instead, I was able to load and compile these same workspaces from the 2.3 Pooma off the internet. Either Intel 5.0 has "enhanced" Visual Studio, or something has changed in the structure of the .dsp files incorporated into the r2 checkout tree. If someone can send me a "works for me" against the r2 tree, then I can resume banging my head against the wall in my own corner of the room without concern that I'm duplicating effort. Allan From oldham at codesourcery.com Thu Mar 15 06:27:25 2001 From: oldham at codesourcery.com (Jeffrey Oldham) Date: Wed, 14 Mar 2001 22:27:25 -0800 Subject: Pooma RFA: New gcc Configuration Files Message-ID: <20010314222725.A20646@codesourcery.com> Attached are proposed configuration files for compiling the Pooma source code with the latest mainline gcc. Basically, I copied the *EGCS.conf files, substituting "gcc" for "ecgs" and removing a few variables indicating that ECGS did not support some C++ features. I have used the LINUXgcc.conf and the SGIN32gcc.conf files but not SUNgcc.conf nor SGI64gcc.conf. Is it OK to place these files in the Pooma CVS tree? (I will be away for the next four days so response time will lag.) Thanks, Jeffrey D. Oldham oldham at codesourcery.com -------------- 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, 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 ########################################################################### # POOMA configuration settings # # Platform: LINUX (Intel Pentium running Linux) # Compiler: gcc # ########################################################################### # # 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 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 = "linux/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_lib_subdir = "linux/lib"; $profile_basic_makefile = "Makefile.tau-gcc"; $profile_smarts_makefile = "Makefile.tau-smarts-gcc"; $profile_pthreads_makefile = "Makefile.tau-pthread-gcc"; ### location of PAWS files for program coupling $paws_able = 1; $paws_default_dir = "/home/paws/build/paws-current"; $paws_lib_subdir = "linux/lib"; $paws_makefile = "Makefile.paws-gcc"; ### 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/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"; ### 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 ################### ### the name of this architecture $archtype = "linux"; $comptype = "gcc"; $compext = "-gcc"; ### 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. # Must include to get POSIX file modes $inc_sys_stat_h_file_modes = 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: luchini $ # $Revision: 1.23 $ $Date: 2000/05/05 07:44:36 $ # ---------------------------------------------------------------------- # ACL:rcsinfo ########################################################################### # the last line of this file must be a '1' so that Perl sees a non-zero # results from this file ########################################################################### 1; -------------- 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, 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 ########################################################################### # POOMA configuration settings # # Platform: SGI64 (Silicon Graphics 64-bit) # Compiler: GCC # ########################################################################### # # 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 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 = "sgi64/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_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"; ### location of PAWS files for program coupling $paws_able = 1; $paws_default_dir = "/home/paws/build/paws-current"; $paws_lib_subdir = "sgi64/lib"; $paws_makefile = "Makefile.paws-gcc"; ### location of HDF5 files for I/O $hdf5_able = 1; $hdf5_default_dir = "/usr/local/pooma/packages/hdf5"; ### location of cheetah $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"; ### 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 ########################################################################### $sgibits = "-mabi=64 -mips4"; ################### ### characteristics ################### ### the name of this architecture $archtype = "sgi64"; $comptype = "gcc"; $compext = "-gcc"; ### 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. ################ ### C++ settings ################ ### general settings for using the C++ compiler, for both libs and apps $cpp = "g++"; $cppargs = "$sgibits -ftemplate-depth-60"; $cppargs .= " -D__SGI_STL_INTERNAL_RELOPS -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 = "$sgibits -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 = "$sgibits"; $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 = "$sgibits"; $linkverbose = "-v"; $linkshare = "-rpath \$(POOMA_LIBDIR)"; ##################### ### archiver settings ##################### $ar = "ar"; # program to make static lib $arshare = $cpp; # program to make shared lib $arargs = "rc"; # arguments for making static lib $arshareargs = "$sgibits -shared -o"; # arguments for making shared lib # 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: SGI64GCC.conf,v $ $Author: luchini $ # $Revision: 1.38 $ $Date: 2000/05/05 07:44:36 $ # ---------------------------------------------------------------------- # ACL:rcsinfo ########################################################################### # the last line of this file must be a '1' so that Perl sees a non-zero # results from this file ########################################################################### 1; -------------- 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, 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 ########################################################################### # POOMA configuration settings # # Platform: SGIN32 (Silicon Graphics n32 format) # Compiler: GCC # ########################################################################### # # 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 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 = "sgin32/lib"; $threads_basic_makefile = "Makefile.smarts-gcc"; $threads_profile_makefile = "Makefile.smarts-tau-gcc"; ### 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_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"; ### location of PAWS files for program coupling $paws_able = 1; $paws_default_dir = "/home/paws/build/paws-current"; $paws_lib_subdir = "sgin32/lib"; $paws_makefile = "Makefile.paws-gcc"; ### location of HDF5 files for I/O $hdf5_able = 1; $hdf5_default_dir = "/usr/local/pooma/packages/hdf5"; ### location of cheetah $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"; ### 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 ########################################################################### $sgibits = "-mabi=n32 -mips4"; ################### ### characteristics ################### ### the name of this architecture $archtype = "sgin32"; $comptype = "gcc"; $compext = "-gcc"; ### 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. ################ ### C++ settings ################ ### general settings for using the C++ compiler, for both libs and apps $cpp = "g++"; $cppargs = "$sgibits -ftemplate-depth-60"; $cppargs .= " -D__SGI_STL_INTERNAL_RELOPS -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 -O3 -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 = "$sgibits -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 = "$sgibits"; $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 = "$sgibits"; $linkverbose = "-v"; $linkshare = "-rpath \$(POOMA_LIBDIR)"; ##################### ### archiver settings ##################### $ar = "ar"; # program to make static lib $arshare = $cpp; # program to make shared lib $arargs = "rc"; # arguments for making static lib $arshareargs = "$sgibits -shared -o"; # arguments for making shared lib # 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: SGIN32GCC.conf,v $ $Author: luchini $ # $Revision: 1.33 $ $Date: 2000/05/05 07:44:36 $ # ---------------------------------------------------------------------- # ACL:rcsinfo ########################################################################### # the last line of this file must be a '1' so that Perl sees a non-zero # results from this file ########################################################################### 1; -------------- 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, 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 ########################################################################### # POOMA configuration settings # # Platform: SUN UltraSPARC # Compiler: GCC # ########################################################################### # # 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 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 = 0; ### location of TAU files for profiling $profile_able = 0; ### location of PAWS files for program coupling $paws_able = 0; ### location of HDF5 files for I/O $hdf5_able = 0; ### location of cheetah $cheetah_able = 0; ### 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 ################### ### the name of this architecture $archtype = "sun"; $comptype = "gcc"; $compext = "-gcc"; ### 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. # SUN requires include of for file modes $inc_sys_stat_h_file_modes = 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 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 -O3 -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 = "-v"; $linkshare = "-rpath \$(POOMA_LIBDIR)"; ##################### ### archiver settings ##################### $ar = "ar"; # program to make static lib $arshare = $cpp; # program to make shared lib $arargs = "rc"; # arguments for making static lib $arshareargs = "-shared -o"; # arguments for making shared lib # 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: SUNGCC.conf,v $ $Author: luchini $ # $Revision: 1.12 $ $Date: 2000/05/05 07:44:37 $ # ---------------------------------------------------------------------- # 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 oldham at codesourcery.com Thu Mar 15 06:39:39 2001 From: oldham at codesourcery.com (Jeffrey Oldham) Date: Wed, 14 Mar 2001 22:39:39 -0800 Subject: RFA: Proposed Modifications to Test Files Message-ID: <20010314223939.A20645@codesourcery.com> Are the attached changes to the files in the Pooma "test" directory acceptable? Is it possible to create a Loc<1> from a scalar? Is the dclock.cpp code portable to your computer? Note that BrickEngineTest.cpp still does not compile; it seems to have been written for an older version of BrickEngine. Array/Test/ArrayTest.cpp: * Prepend iostream functions with "std::". Domain/Loc/Characteristics/LocCharacteristics.cpp: * Creating a Loc<1> from a scalar does not seem to be supported. Domain/NewDomain/Constructors/NewDomainConstructor.cpp: * Prepend iostream functions with "std::". Domain/Range/Constructors/RangeConstructor.cpp: * Prepend iostream functions with "std::". Domain/Range/Constructors/makefile: * Fix typo in main target from creating this makefile by copying. Engine/BrickEngine/BrickEngine/BrickEngineTest.cpp: * s/BaseDomain_t/Base_t/ Shared/dclock.cpp: * Rewrite from non-portable SGI code to (hopefully) portable Gnu C Library code. Utilities/RefCounting/RefCountedBlockPtr/RefCountedBlockPtrTest.cpp: * Change abs() to fabs() for floating point numbers. * Add some static_casts to convert from float to int to avoid compiler warnings. * Remove tests for nonexistent .isInBounds(). (I will be away for the next four days.) Thanks, Jeffrey D. Oldham oldham at codesourcery.com -------------- next part -------------- Index: Array/Test/ArrayTest.cpp =================================================================== RCS file: /home/pooma/Repository/r2/test/Array/Test/ArrayTest.cpp,v retrieving revision 1.5 diff -c -p -r1.5 ArrayTest.cpp *** Array/Test/ArrayTest.cpp 1999/03/02 23:06:32 1.5 --- Array/Test/ArrayTest.cpp 2001/03/15 06:27:54 *************** int reportResults(int n, char *test, boo *** 19,33 **** { char* statusString = "passed"; if(!testStatus) statusString = "failed"; ! cout << " Test " << setw(3) << n << ", " ! << setw(42) << test << ": " << statusString << "\n"; return 0; } void uncaughtErrorReport(const char *what, int n) { ! cerr << "\nAck! Caught assertion during test # " << n << ":" << endl; ! cerr << what << endl; } //----------------------------------------------------------------------------- --- 19,33 ---- { char* statusString = "passed"; if(!testStatus) statusString = "failed"; ! std::cout << " Test " << std::setw(3) << n << ", " ! << std::setw(42) << test << ": " << statusString << "\n"; return 0; } void uncaughtErrorReport(const char *what, int n) { ! std::cerr << "\nAck! Caught assertion during test # " << n << ":" << std::endl; ! std::cerr << what << std::endl; } //----------------------------------------------------------------------------- *************** int main( int argc, char *argv[] ) *** 74,106 **** // bool testStatus; try { ! cout << "IArray1B\n"; ! cout << "dimensions: " << IArray1B::dimensions << endl; ! cout << "rank: " << IArray1B::rank << endl; ! cout << "IArray7B\n"; ! cout << "dimensions: " << IArray7B::dimensions << endl; ! cout << "rank: " << IArray7B::rank << endl; ! cout << "ULArray7B\n"; ! cout << "dimensions: " << ULArray7B::dimensions << endl; ! cout << "rank: " << ULArray7B::rank << endl; ! cout << "CxArray7B\n"; ! cout << "dimensions: " << CxArray7B::dimensions << endl; ! cout << "rank: " << CxArray7B::rank << endl; ! cout << "IArray8B\n"; ! cout << "dimensions: " << IArray8B::dimensions << endl; ! cout << "rank: " << IArray8B::rank << endl; // // compile error: ! // cout << "IArrayNeg1\n"; ! // cout << "dimensions: " << IArrayNeg1::dimensions << endl; ! // cout << "rank: " << IArrayNeg1::rank << endl; IArray1B a(10); a = 0; a(0) = 1; IArray1B b = a; b(1) = 2; ! cout << "a: " << a << endl; ! cout << "b: " << b << endl; // // compile error: // IArrayNeg1 n1( 2 ); --- 74,106 ---- // bool testStatus; try { ! std::cout << "IArray1B\n"; ! std::cout << "dimensions: " << IArray1B::dimensions << std::endl; ! std::cout << "rank: " << IArray1B::rank << std::endl; ! std::cout << "IArray7B\n"; ! std::cout << "dimensions: " << IArray7B::dimensions << std::endl; ! std::cout << "rank: " << IArray7B::rank << std::endl; ! std::cout << "ULArray7B\n"; ! std::cout << "dimensions: " << ULArray7B::dimensions << std::endl; ! std::cout << "rank: " << ULArray7B::rank << std::endl; ! std::cout << "CxArray7B\n"; ! std::cout << "dimensions: " << CxArray7B::dimensions << std::endl; ! std::cout << "rank: " << CxArray7B::rank << std::endl; ! std::cout << "IArray8B\n"; ! std::cout << "dimensions: " << IArray8B::dimensions << std::endl; ! std::cout << "rank: " << IArray8B::rank << std::endl; // // compile error: ! // std::cout << "IArrayNeg1\n"; ! // std::cout << "dimensions: " << IArrayNeg1::dimensions << std::endl; ! // std::cout << "rank: " << IArrayNeg1::rank << std::endl; IArray1B a(10); a = 0; a(0) = 1; IArray1B b = a; b(1) = 2; ! std::cout << "a: " << a << std::endl; ! std::cout << "b: " << b << std::endl; // // compile error: // IArrayNeg1 n1( 2 ); *************** int main( int argc, char *argv[] ) *** 121,127 **** // CxArray7B cxd( 2,2,2,2,2,2,2 ); // cxd = (1.0, 0.0); // cxd( 0,0,0,0,0,0,1 ) = (3.14159, -0.5); ! // cout << "cxd\n" << cxd; } catch( const char *err ) --- 121,127 ---- // CxArray7B cxd( 2,2,2,2,2,2,2 ); // cxd = (1.0, 0.0); // cxd( 0,0,0,0,0,0,1 ) = (3.14159, -0.5); ! // std::cout << "cxd\n" << cxd; } catch( const char *err ) *************** int main( int argc, char *argv[] ) *** 129,137 **** catch( const Pooma::Assertion &err ) { uncaughtErrorReport( err.what(), nTest ); } catch( ... ) ! { cerr << "Unknown exception!" << endl; } ! cout << "\n" << endl; Pooma::finalize(); --- 129,137 ---- catch( const Pooma::Assertion &err ) { uncaughtErrorReport( err.what(), nTest ); } catch( ... ) ! { cerr << "Unknown exception!" << std::endl; } ! std::cout << "\n" << std::endl; Pooma::finalize(); Index: Domain/Loc/Characteristics/LocCharacteristics.cpp =================================================================== RCS file: /home/pooma/Repository/r2/test/Domain/Loc/Characteristics/LocCharacteristics.cpp,v retrieving revision 1.9 diff -c -p -r1.9 LocCharacteristics.cpp *** Domain/Loc/Characteristics/LocCharacteristics.cpp 1999/03/09 17:04:55 1.9 --- Domain/Loc/Characteristics/LocCharacteristics.cpp 2001/03/15 06:27:55 *************** main(int argc, char *argv[]) { *** 133,139 **** cout << endl; ! Loc<1>a1 = 1; //Loc<1> b1(Loc<1>()); Loc<2> b2(a1,Loc<1>(2)); Loc<3> b3(b2,Loc<1>(3)); --- 133,139 ---- 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)); Index: Domain/NewDomain/Constructors/NewDomainConstructor.cpp =================================================================== RCS file: /home/pooma/Repository/r2/test/Domain/NewDomain/Constructors/NewDomainConstructor.cpp,v retrieving revision 1.5 diff -c -p -r1.5 NewDomainConstructor.cpp *** Domain/NewDomain/Constructors/NewDomainConstructor.cpp 1999/03/02 23:11:55 1.5 --- Domain/NewDomain/Constructors/NewDomainConstructor.cpp 2001/03/15 06:27:55 *************** void reportResults(int n, char *test, bo *** 16,35 **** { 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; } --- 16,35 ---- { char* statusString = "passed"; if(!testStatus) statusString = "failed"; ! std::cout << " Test " << std::setw(3) << n << ", " ! << std::setw(10) << test << ": " << statusString << "\n"; } void uncaughtErrorReport(const char *what, int n) { ! cerr << "\nAck! Caught assertion during test # " << n << ":" << std::endl; ! cerr << what << std::endl; } template Interval<1> testElement(const T &dom, int no) { //get the nth element of dom, and store it in a separte variable ! typename T::OneDomain_t singleElem = dom[no]; return singleElem; } *************** main(int argc, char *argv[]) { *** 57,87 **** 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)); --- 57,87 ---- bool testStatus; if ((argc > 1) && (!strcmp(argv[1],"-d"))) debug = 1; ! std::cout << "\n" ! << " ==============================================================\n" ! << " Domain test for Constructors on NewDomain object \n" ! << " ==============================================================\n" ! << std::endl; if (debug){ ! std::cout << "=========================DEBUG===================================" ! << std::endl; ! std::cout << std::endl; ! std::cout << "Starting domain test for Constructors on NewDomain object" ! << std::endl; ! std::cout << "A set of simple structs which tell how to combine." << std::endl; ! std::cout << std::endl; ! std::cout << " different Domain object together. TThey are named " << std::endl; ! std::cout << "NewDomain1 - NewDoamin7 and are templated on from 1 .. 7 " ! << std::endl; ! std::cout << "different domain types. If you have a domain as the last " ! << std::endl; ! std::cout << "argrment you must have a space between this argument and the" ! << std::endl; ! std::cout << "last >,NewDomain2,Loc<1> >::Type_t newdomain2; " ! << std::endl; } ! std::cout << std::endl; Loc<1> D1(1); Loc<1> D2(2); Range<2> R1(Interval<1>(5,10),Interval<1>(-1,100)); *************** main(int argc, char *argv[]) { *** 92,224 **** 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; ! } - - - - - - - - --- 92,215 ---- 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){ ! std::cout << "================================================================" ! << std::endl; ! std::cout << std::endl; ! std::cout << " NewDomain7,Range<2>,Loc<1>,Loc<2>,Interval<2>, Interval<2>,int>::combine(R1,R2,D1,newdomain2a,I1,I2,999) " << newdomain7a << std::endl; ! std::cout << " R1 " << R1 << std::endl; ! std::cout << " R2 " << R2 << std::endl; ! std::cout << " D1 " << D1 << std::endl; ! std::cout << " newdomain2a " << newdomain2a << std::endl; ! std::cout << " I1 " << I1 << std::endl; ! std::cout << " I2 " << I2 << std::endl; ! std::cout << " newdomain2 " << newdomain2 << std::endl; ! std::cout << " newdomain2a " << newdomain2a << std::endl; ! std::cout << " newdomain3 " << newdomain3 << std::endl; ! std::cout << " newdomain3a " << newdomain3a << std::endl; ! std::cout << " newdomain4 " << newdomain4 << std::endl; ! std::cout << " newdomain4a " << newdomain4a << std::endl; ! std::cout << " newdomain5 " << newdomain5 << std::endl; ! std::cout << " newdomain5a \n" << " " << newdomain5a << std::endl; ! std::cout << " newdomain6 \n " << " " << newdomain6 << std::endl; ! std::cout << " newdomain6a \n " << " " << newdomain6a << std::endl; ! std::cout << " newdomain7 \n " << " " << newdomain7 << std::endl; ! std::cout << " newdomain7a \n " << " " << newdomain7a << std::endl; ! std::cout << " newdomain2.dimensions " << newdomain2.dimensions << std::endl; ! std::cout << " newdomain3.dimensions " << newdomain3.dimensions << std::endl; ! std::cout << " newdomain4.dimensions " << newdomain4.dimensions << std::endl; ! std::cout << " newdomain5.dimensions " << newdomain5.dimensions << std::endl; ! std::cout << " newdomain6.dimensions " << newdomain6.dimensions << std::endl; ! std::cout << " newdomain7.dimensions " << newdomain7.dimensions << std::endl; ! std::cout << " newdomain2a.dimensions " << newdomain2a.dimensions << std::endl; ! std::cout << " newdomain3a.dimensions " << newdomain3a.dimensions << std::endl; ! std::cout << " newdomain4a.dimensions " << newdomain4a.dimensions << std::endl; ! std::cout << " newdomain5a.dimensions " << newdomain5a.dimensions << std::endl; ! std::cout << " newdomain6a.dimensions " << newdomain6a.dimensions << std::endl; ! std::cout << " newdomain7a.dimensions " << newdomain7a.dimensions << std::endl; ! std::cout << std::endl; ! std::cout << "================================================================" << std::endl; } ! std::cout << "Testing NewDomain<*> constructors methods:" << std::endl; ! std::cout << "----------------------------------------------------------" << std::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!" << std::endl; } ! std::cout << std::endl; } Index: Domain/Range/Constructors/RangeConstructor.cpp =================================================================== RCS file: /home/pooma/Repository/r2/test/Domain/Range/Constructors/RangeConstructor.cpp,v retrieving revision 1.6 diff -c -p -r1.6 RangeConstructor.cpp *** Domain/Range/Constructors/RangeConstructor.cpp 1999/03/02 23:12:23 1.6 --- Domain/Range/Constructors/RangeConstructor.cpp 2001/03/15 06:27:55 *************** void reportResults(int n, char *test, bo *** 18,31 **** { 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; } --- 18,31 ---- { char* statusString = "passed"; if(!testStatus) statusString = "failed"; ! std::cout << " Test " << std::setw(3) << n << ", " ! << std::setw(10) << test << ": " << statusString << "\n"; } void uncaughtErrorReport(const char *what, int n) { ! std::cerr << "\nAck! Caught assertion during test # " << n << ":" << std::endl; ! std::cerr << what << std::endl; } *************** main(int argc, char *argv[]) { *** 40,67 **** 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); --- 40,67 ---- if ((argc > 1) && (!strcmp(argv[1],"-d"))) debug = 1; ! std::cout << "\n" ! << " ==============================================================\n" ! << " Domain test for Constructors on Range object \n" ! << " ==============================================================\n" ! << std::endl; if (debug){ ! std::cout << "=========================DEBUG===================================" ! << std::endl; ! std::cout << "Range represents a sequence of integers [a,a+s,... b], with " ! << std::endl; ! std::cout << "endpoints a and b, and stride s. Each dimension is independent" ! << std::endl; ! std::cout << "of the other. The endpoints may be positive or negative." << std::endl; ! std::cout << std::endl; ! std::cout << "If you construct a Range with 2 dimensions [Range<2> a2i]" << std::endl; ! std::cout << "and only give it one value [Range<2> a2ia(1))] the second dimension" << std::endl; ! std::cout << "value will not be intitalized to 0 but will have ramdom junk. I" ! << std::endl; ! std::cout << "have not come up with a way to do a pass/fail on the feature." ! << std::endl; ! std::cout << "Float and Double values are truncated." << std::endl; } Range<1> a1(1); *************** main(int argc, char *argv[]) { *** 82,102 **** 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); --- 82,102 ---- if (debug){ ! std::cout << "Range<1> Length Constructor for test."<< std::endl; ! std::cout << " 1D default Range<1> a1(1) " << a1 << std::endl; ! std::cout << " 1D default Range<1> a2(-3) " << a2 << std::endl; ! std::cout << " 1D default Range<1> a3(3) " << a3 << std::endl; ! std::cout << " 1D default Range<1> a4(4) " << a4 << std::endl; ! std::cout << " 1D default Range<1> a5(-5) " << a5 << std::endl; ! std::cout << " 1D default Range<1> a6(6) " << a6 << std::endl; ! std::cout << " 1D default Range<1> a1i(1) " << a1i << std::endl; ! std::cout << " 1D default Range<1> a1ia(1,5) " << a1ia << std::endl; ! std::cout << " 1D default Range<1> a1ib(0,5) " << a1ib << std::endl; ! std::cout << " 1D default Range<1> a1ic(0,6,2) " << a1ic << std::endl; ! std::cout << " 1D default Range<1> a1id(2,8,-3) " << a1id << std::endl; ! std::cout << " 1D default Range<1> a1ie(0,10,2) " << a1ie << std::endl; ! std::cout << " 1D default Range<1> a1if(1,1001,100) " << a1if << std::endl; ! std::cout << std::endl; } Range<1> n1(-100); *************** main(int argc, char *argv[]) { *** 136,177 **** 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)); --- 136,177 ---- Range<6> FDR6(DI3,NI1a, DI2); if (debug){ ! std::cout << " 1D default Range<1> b1(a1if) " << b1 << std::endl; ! std::cout << " 2D default Range<2> b2(b1,a1) " << b2 << std::endl; ! std::cout << " 3D default Range<3> b3(b2,a3) " << b3 << std::endl; ! std::cout << " 4D default Range<4> b4(b3,a4) " << std::endl; ! std::cout << " " << b4 << std::endl; ! std::cout << " 5D default Range<5> b5(b4,Range<1>(1,5)) " << std::endl; ! std::cout << " " << b5 << std::endl; ! std::cout << " 6D default Range<6> b6(b5,a6) " << std::endl; ! std::cout << " " << b6 << std::endl; ! std::cout << " 1D Negative Range<1> n1(-100) " << n1 << std::endl; ! std::cout << " 2D Negative Range<2> n2(Range<1>(-100,100,10)," << std::endl; ! std::cout << " Range<1>(100,-100,10)) " << n2 << std::endl; ! std::cout << " 3D Negative Range<3> n3(n2,a1) " << std::endl; ! std::cout << " " << n3 << std::endl; ! ! std::cout << " 2D Mixed object Range<2> RL2(Loc<1> L1,Range<2>b1 " << std::endl; ! std::cout << " " << RL2 << std::endl; ! std::cout << " 3D Mixed object Range<3> RL3(RL1,L1) " << std::endl; ! std::cout << " " << RL3 << std::endl; ! std::cout << " 4D Mixed object Range<4> RL4(RL3,I1) = " << std::endl; ! std::cout << " " << RL4 << std::endl; ! std::cout << " 5D Mixed object Range<5> RL5(I2,RL3) " << std::endl; ! std::cout << " " << RL5 << std::endl; ! std::cout << " 2D Mixed object Negative Range<2> NRL2(NI1,Interval<1>(-6,0)) "<< std::endl; ! std::cout << " " << NRL2 << std::endl; ! std::cout << " 3D Mixed object Negative Range<3> NRL3(NRL2,NI1a) " << std::endl; ! std::cout << " " << NRL3 << std::endl; ! std::cout << " 5D Mixed object Negative Range<5> NRL5(NL1,NRL2,NI1a) " ! << std::endl; ! std::cout << " " << NRL5 << std::endl; ! std::cout << " 6D Mixed object DF Range<6> FDR6(DI3,NI1a, DI2) " ! << std::endl; ! std::cout << " " << FDR6 << std::endl; ! std::cout << "=========================END DEBUG============================" ! << std::endl; ! std::cout << std::endl; } try { testStatus = (a3 == Range<1>(3)); *************** main(int argc, char *argv[]) { *** 209,216 **** catch(const Pooma::Assertion &err) {uncaughtErrorReport(err.what(),testNumber); } catch(...) ! { cerr << "Unknown exception!" << endl; } ! cout << endl; Pooma::finalize(); } --- 209,216 ---- catch(const Pooma::Assertion &err) {uncaughtErrorReport(err.what(),testNumber); } catch(...) ! { std::cerr << "Unknown exception!" << std::endl; } ! std::cout << std::endl; Pooma::finalize(); } Index: Domain/Range/Constructors/makefile =================================================================== RCS file: /home/pooma/Repository/r2/test/Domain/Range/Constructors/makefile,v retrieving revision 1.2 diff -c -p -r1.2 makefile *** Domain/Range/Constructors/makefile 1998/10/25 00:08:47 1.2 --- Domain/Range/Constructors/makefile 2001/03/15 06:27:55 *************** include $(PROJECT_ROOT)/config/head.mk *** 6,11 **** default:: $(ODIR)/RangeConstructor ! $(ODIR)/LocOperations: $(ODIR)/RangeOperations.o $(LinkToSuite) include $(SHARED_ROOT)/tail.mk --- 6,11 ---- default:: $(ODIR)/RangeConstructor ! $(ODIR)/RangeConstructor: $(ODIR)/RangeConstructor.o $(LinkToSuite) include $(SHARED_ROOT)/tail.mk Index: Engine/BrickEngine/BrickEngine/BrickEngineTest.cpp =================================================================== RCS file: /home/pooma/Repository/r2/test/Engine/BrickEngine/BrickEngine/BrickEngineTest.cpp,v retrieving revision 1.18 diff -c -p -r1.18 BrickEngineTest.cpp *** Engine/BrickEngine/BrickEngine/BrickEngineTest.cpp 1999/03/25 19:03:21 1.18 --- Engine/BrickEngine/BrickEngine/BrickEngineTest.cpp 2001/03/15 06:27:56 *************** main(int argc, char* argv[]) { *** 269,275 **** ++testNumber; { ! typedef Engine3Df_t::BaseDomain_t Try_t; typedef Range<3> Correct_t; testStatus = TypeMatchTester::Result; } --- 269,275 ---- ++testNumber; { ! typedef Engine3Df_t::Base_t Try_t; typedef Range<3> Correct_t; testStatus = TypeMatchTester::Result; } Index: Shared/dclock.cpp =================================================================== RCS file: /home/pooma/Repository/r2/test/Shared/dclock.cpp,v retrieving revision 1.1 diff -c -p -r1.1 dclock.cpp *** Shared/dclock.cpp 1998/10/29 17:29:57 1.1 --- Shared/dclock.cpp 2001/03/15 06:27:56 *************** *** 5,10 **** --- 5,12 ---- //----------------------------------------------------------------------------- #include + #include + #include extern "C" { *************** void dclock_init() *** 15,23 **** double dclock() { ! struct timespec ts; ! clock_gettime(CLOCK_SGI_CYCLE,&ts); ! return ts.tv_sec + 1e-9*ts.tv_nsec; } }; --- 17,27 ---- double dclock() { ! struct tms ts; ! clock_t answer = times(&ts); ! if (answer == static_cast(-1)) ! abort(); ! return static_cast(answer) / CLOCKS_PER_SEC; } }; Index: Utilities/RefCounting/RefCountedBlockPtr/RefCountedBlockPtrTest.cpp =================================================================== RCS file: /home/pooma/Repository/r2/test/Utilities/RefCounting/RefCountedBlockPtr/RefCountedBlockPtrTest.cpp,v retrieving revision 1.12 diff -c -p -r1.12 RefCountedBlockPtrTest.cpp *** Utilities/RefCounting/RefCountedBlockPtr/RefCountedBlockPtrTest.cpp 1999/03/02 23:15:47 1.12 --- Utilities/RefCounting/RefCountedBlockPtr/RefCountedBlockPtrTest.cpp 2001/03/15 06:27:56 *************** main(int argc, char* argv[]) { *** 363,370 **** fptrT_t fp2(fp1+4,16); float fdiff = zero; ! for(int i = 0; i < 16; i++) fdiff += abs(fp2[i] - fp1[i+4]); ! int itrunc1 = fp2[4]; testStatus = (fdiff == zero) && (itrunc1 == 108) && testStatus; testStatus = fp2.isValid() && !fp2.isShared(); --- 363,370 ---- fptrT_t fp2(fp1+4,16); float fdiff = zero; ! for(int i = 0; i < 16; i++) fdiff += fabs(fp2[i] - fp1[i+4]); ! int itrunc1 = static_cast(fp2[4]); testStatus = (fdiff == zero) && (itrunc1 == 108) && testStatus; testStatus = fp2.isValid() && !fp2.isShared(); *************** main(int argc, char* argv[]) { *** 380,386 **** ++testNumber; try { ! itrunc1 = fp2[30]; throw reportResults(testNumber,"constructor; user-allocated pointer, II", false); } --- 380,386 ---- ++testNumber; try { ! itrunc1 = static_cast(fp2[30]); throw reportResults(testNumber,"constructor; user-allocated pointer, II", false); } *************** main(int argc, char* argv[]) { *** 400,406 **** testStatus = fp4.isValid() && fp4.isShared() && testStatus; fdiff = zero; ! for(int i = 0; i < 16; i++) fdiff += abs(fp2[i] - fp3[i]); testStatus = (fdiff == zero) && testStatus; testStatus = (fp4 == fp2) && testStatus; reportResults(testNumber,"assignment functions (both BC polarities)", --- 400,406 ---- testStatus = fp4.isValid() && fp4.isShared() && testStatus; fdiff = zero; ! for(int i = 0; i < 16; i++) fdiff += fabs(fp2[i] - fp3[i]); testStatus = (fdiff == zero) && testStatus; testStatus = (fp4 == fp2) && testStatus; reportResults(testNumber,"assignment functions (both BC polarities)", *************** main(int argc, char* argv[]) { *** 440,453 **** testStatus); ! //---------------------------------------------------- ! // test 16: pointers, II: begin(), end(), isInBounds() ! //---------------------------------------------------- ++testNumber; // test pointer arithmetic operators +=, -=, +, - and ! // functions begin(), end(), isInBounds() iptrT_t ip13(19,0); testStatus = (ip13 == ip13.begin()); --- 440,453 ---- testStatus); ! //-------------------------------------- ! // test 16: pointers, II: begin(), end() ! //-------------------------------------- ++testNumber; // test pointer arithmetic operators +=, -=, +, - and ! // functions begin(), end() iptrT_t ip13(19,0); testStatus = (ip13 == ip13.begin()); *************** main(int argc, char* argv[]) { *** 457,466 **** ip13 += 3; } - testStatus = ip13.isInBounds() && testStatus; testStatus = ((ip13+1) == ip13.end()) && testStatus; ip13 += 1; - testStatus = !ip13.isInBounds() && testStatus; // ip13 is now past end of block; need to reset to beginning for // correct operator [] access. Note, however, that operator [] --- 457,464 ---- *************** main(int argc, char* argv[]) { *** 476,484 **** ip13 -= 10; testStatus = (*ip13 == 3) && testStatus; ip13 -= 30; - testStatus = !ip13.isInBounds() && testStatus; ! reportResults(testNumber,"pointers, II: begin(), end(), isInBounds()", testStatus); --- 474,481 ---- ip13 -= 10; testStatus = (*ip13 == 3) && testStatus; ip13 -= 30; ! reportResults(testNumber,"pointers, II: begin(), end()", testStatus); From oldham at codesourcery.com Thu Mar 15 06:43:33 2001 From: oldham at codesourcery.com (Jeffrey Oldham) Date: Wed, 14 Mar 2001 22:43:33 -0800 Subject: RFA: Modify BlockDecomposed Example Files Message-ID: <20010314224333.B20645@codesourcery.com> Are the attached changes to the Pooma examples/Solvers/BlockDecomposed directory acceptable to add to the Pooma CVS tree? FivePoint/FivePointSolve.cpp: * Reorder the header files to fix a dependency problem. NinePoint/NinePointSolve.cpp: * Likewise. Thanks, Jeffrey D. Oldham oldham at codesourcery.com -------------- next part -------------- Index: FivePoint/FivePointSolve.cpp =================================================================== RCS file: /home/pooma/Repository/r2/examples/Solvers/BlockDecomposed/FivePoint/FivePointSolve.cpp,v retrieving revision 1.2 diff -c -p -r1.2 FivePointSolve.cpp *** FivePoint/FivePointSolve.cpp 2000/07/27 22:32:27 1.2 --- FivePoint/FivePointSolve.cpp 2001/03/15 06:40:29 *************** private: *** 51,61 **** Layout layout_m; }; #include "FivePointJacobi.h" // new stuff #include "FivePointSymmetricGaussSeidel.h" // new stuff #include "FivePointIncompleteCholeski0.h" // new stuff #include "FivePointIncompleteCholeski1.h" // new stuff - #include "../Tools/ExtendedPatchEvaluator.h" #include "../Tools/NullPreconditioner.h" #include --- 51,61 ---- Layout layout_m; }; + #include "../Tools/ExtendedPatchEvaluator.h" #include "FivePointJacobi.h" // new stuff #include "FivePointSymmetricGaussSeidel.h" // new stuff #include "FivePointIncompleteCholeski0.h" // new stuff #include "FivePointIncompleteCholeski1.h" // new stuff #include "../Tools/NullPreconditioner.h" #include Index: NinePoint/NinePointSolve.cpp =================================================================== RCS file: /home/pooma/Repository/r2/examples/Solvers/BlockDecomposed/NinePoint/NinePointSolve.cpp,v retrieving revision 1.1 diff -c -p -r1.1 NinePointSolve.cpp *** NinePoint/NinePointSolve.cpp 2000/07/27 22:36:35 1.1 --- NinePoint/NinePointSolve.cpp 2001/03/15 06:40:29 *************** private: *** 51,62 **** Layout layout_m; }; #include "NinePointMatrix.h" // new stuff #include "NinePointJacobi.h" // new stuff #include "NinePointSymmetricGaussSeidel.h" // new stuff #include "NinePointIncompleteCholeski0.h" // new stuff #include "NinePointIncompleteCholeski1.h" // new stuff - #include "../Tools/ExtendedPatchEvaluator.h" #include "../Tools/NullPreconditioner.h" #include --- 51,62 ---- Layout layout_m; }; + #include "../Tools/ExtendedPatchEvaluator.h" #include "NinePointMatrix.h" // new stuff #include "NinePointJacobi.h" // new stuff #include "NinePointSymmetricGaussSeidel.h" // new stuff #include "NinePointIncompleteCholeski0.h" // new stuff #include "NinePointIncompleteCholeski1.h" // new stuff #include "../Tools/NullPreconditioner.h" #include From oldham at codesourcery.com Thu Mar 15 06:47:18 2001 From: oldham at codesourcery.com (Jeffrey Oldham) Date: Wed, 14 Mar 2001 22:47:18 -0800 Subject: RFA: Prevent Thousands of Calls to findsuite.sh Message-ID: <20010314224718.C20645@codesourcery.com> The attached patch empirically reduced 3567 calls to findsuite.sh to one call during one "make". Is it acceptable to add this change to the Pooma CVS tree? (I will be away for the next four days.) Thanks, Jeffrey D. Oldham oldham at codesourcery.com -------------- next part -------------- Index: head.mk =================================================================== RCS file: /home/pooma/Repository/r2/config/head.mk,v retrieving revision 1.6 diff -c -p -r1.6 head.mk *** head.mk 1999/07/21 04:56:08 1.6 --- head.mk 2001/03/15 06:44:28 *************** SUITE = $(POOMASUITE) *** 43,49 **** endif ifndef SUITE ! SUITE = $(shell $(SHARED_ROOT)/findsuite.sh $(PROJECT_ROOT)) endif LIBRARY_ROOT = $(PROJECT_ROOT)/lib/$(SUITE) --- 43,49 ---- endif ifndef SUITE ! SUITE := $(shell $(SHARED_ROOT)/findsuite.sh $(PROJECT_ROOT)) endif LIBRARY_ROOT = $(PROJECT_ROOT)/lib/$(SUITE) From oldham at codesourcery.com Thu Mar 15 06:50:03 2001 From: oldham at codesourcery.com (Jeffrey Oldham) Date: Wed, 14 Mar 2001 22:50:03 -0800 Subject: RFA: Permit Compiling MessageMain.cpp Message-ID: <20010314225003.D20645@codesourcery.com> The attached patch permits compiling benchmarks/Messaging/MessageMain.cpp on a sequential machine without MPI. Is it acceptable to add this patch to the Pooma CVS tree? (I will be away for the next four days.) Thanks, Jeffrey D. Oldham oldham at codesourcery.com -------------- next part -------------- Index: MessageMain.cpp =================================================================== RCS file: /home/pooma/Repository/r2/benchmarks/Messaging/MessageMain.cpp,v retrieving revision 1.9 diff -c -p -r1.9 MessageMain.cpp *** MessageMain.cpp 2000/07/24 16:40:11 1.9 --- MessageMain.cpp 2001/03/15 06:48:16 *************** int main(int argc, char **argv) *** 188,197 **** --- 188,199 ---- // messagingParameters(argc,argv); + #if defined(POOMA_BENCHMARKS_MESSAGING_TULIP) || defined(POOMA_BENCHMARKS_MESSAGING_MPI) // // Build a benchmark object to hold the benchmarks we will do. // Benchmark messaging(argc,argv,"Border exchange messaging"); + #endif // POOMA_BENCHMARKS_MESSAGING_TULIP || POOMA_BENCHMARKS_MESSAGING_MPI #ifdef POOMA_BENCHMARKS_MESSAGING_TULIP *************** int main(int argc, char **argv) *** 252,263 **** --- 254,267 ---- #endif // POOMA_BENCHMARKS_MESSAGING_MPI + #if defined(POOMA_BENCHMARKS_MESSAGING_TULIP) || defined(POOMA_BENCHMARKS_MESSAGING_MPI) // // Do the benchmark: // messaging.setSamplingParameters(patch_real_elems_s,0,1); messaging.setIterations(iterations_s); messaging.run(); + #endif // POOMA_BENCHMARKS_MESSAGING_TULIP || POOMA_BENCHMARKS_MESSAGING_MPI #ifdef POOMA_BENCHMARKS_MESSAGING_MPI *mpiInform << "Finished messaging.run\n"; From oldham at codesourcery.com Thu Mar 15 06:51:38 2001 From: oldham at codesourcery.com (Jeffrey Oldham) Date: Wed, 14 Mar 2001 22:51:38 -0800 Subject: [pooma-dev] RFA: Prevent Thousands of Calls to findsuite.sh In-Reply-To: <20010314224718.C20645@codesourcery.com>; from oldham@codesourcery.com on Wed, Mar 14, 2001 at 10:47:18PM -0800 References: <20010314224718.C20645@codesourcery.com> Message-ID: <20010314225138.E20645@codesourcery.com> On Wed, Mar 14, 2001 at 10:47:18PM -0800, Jeffrey Oldham wrote: > The attached patch empirically reduced 3567 calls to findsuite.sh to > one call during one "make". head.mk is located in the config Pooma directory. > Is it acceptable to add this change to the Pooma CVS tree? > > (I will be away for the next four days.) > > Thanks, > Jeffrey D. Oldham > oldham at codesourcery.com > Index: head.mk > =================================================================== > RCS file: /home/pooma/Repository/r2/config/head.mk,v > retrieving revision 1.6 > diff -c -p -r1.6 head.mk > *** head.mk 1999/07/21 04:56:08 1.6 > --- head.mk 2001/03/15 06:44:28 > *************** SUITE = $(POOMASUITE) > *** 43,49 **** > endif > > ifndef SUITE > ! SUITE = $(shell $(SHARED_ROOT)/findsuite.sh $(PROJECT_ROOT)) > endif > > LIBRARY_ROOT = $(PROJECT_ROOT)/lib/$(SUITE) > --- 43,49 ---- > endif > > ifndef SUITE > ! SUITE := $(shell $(SHARED_ROOT)/findsuite.sh $(PROJECT_ROOT)) > endif > > LIBRARY_ROOT = $(PROJECT_ROOT)/lib/$(SUITE) -- Jeffrey D. Oldham oldham at codesourcery.com -------------- next part -------------- Index: head.mk =================================================================== RCS file: /home/pooma/Repository/r2/config/head.mk,v retrieving revision 1.6 diff -c -p -r1.6 head.mk *** head.mk 1999/07/21 04:56:08 1.6 --- head.mk 2001/03/15 06:44:28 *************** SUITE = $(POOMASUITE) *** 43,49 **** endif ifndef SUITE ! SUITE = $(shell $(SHARED_ROOT)/findsuite.sh $(PROJECT_ROOT)) endif LIBRARY_ROOT = $(PROJECT_ROOT)/lib/$(SUITE) --- 43,49 ---- endif ifndef SUITE ! SUITE := $(shell $(SHARED_ROOT)/findsuite.sh $(PROJECT_ROOT)) endif LIBRARY_ROOT = $(PROJECT_ROOT)/lib/$(SUITE) From oldham at codesourcery.com Thu Mar 15 06:59:43 2001 From: oldham at codesourcery.com (Jeffrey Oldham) Date: Wed, 14 Mar 2001 22:59:43 -0800 Subject: RFA: Fix Utilities Typos and Prevent Warnings Message-ID: <20010314225943.F20645@codesourcery.com> Are the attached changes to the src/Utilities Pooma directory acceptable? I compiled them using gcc mainline on a sequential Linux computer. ElementProperties.h: * Add a missing include directive. Inform.h: * Permit use of std::ios_base::fmtflags for current gcc versions. RefCountedBlockPtr.h: * Add a missing include directive. tests/delete_test1.cpp: * Add a static_cast for conversion from float to int to avoid a compiler warning. * Add a static_cast around iterator. tests/find_most_common_test1.cpp: * Change which overloaded check function to use to permit compilation. (I will be away for the next four days.) Thanks, Jeffrey D. Oldham oldham at codesourcery.com -------------- next part -------------- ? LINUXgcc ? Utilities.patch ? Utilities.ChangeLog ? tests/LINUXgcc Index: ElementProperties.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Utilities/ElementProperties.h,v retrieving revision 1.13 diff -c -p -r1.13 ElementProperties.h *** ElementProperties.h 2000/04/27 18:30:38 1.13 --- ElementProperties.h 2001/03/15 06:57:32 *************** *** 54,60 **** --- 54,64 ---- // - specializations for basic C++ data types. //----------------------------------------------------------------------------- + //----------------------------------------------------------------------------- + // Include Files + //----------------------------------------------------------------------------- + #include "Utilities/PAssert.h" //----------------------------------------------------------------------------- // Index: Inform.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Utilities/Inform.h,v retrieving revision 1.27 diff -c -p -r1.27 Inform.h *** Inform.h 2000/06/14 16:40:09 1.27 --- Inform.h 2001/03/15 06:57:32 *************** public: *** 275,281 **** void print() { flush(); } void output() { flush(); } ! #if defined(__MWERKS__) && __MWERKS__ >= 0x2301 typedef std::ios_base::fmtflags FmtFlags_t; #else typedef long FmtFlags_t; --- 275,281 ---- void print() { flush(); } void output() { flush(); } ! #if (defined(__MWERKS__) && __MWERKS__ >= 0x2301) || __GLIBCPP__ >= 20001129 typedef std::ios_base::fmtflags FmtFlags_t; #else typedef long FmtFlags_t; Index: RefCountedBlockPtr.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Utilities/RefCountedBlockPtr.h,v retrieving revision 1.56 diff -c -p -r1.56 RefCountedBlockPtr.h *** RefCountedBlockPtr.h 2000/07/14 17:46:37 1.56 --- RefCountedBlockPtr.h 2001/03/15 06:57:33 *************** *** 51,56 **** --- 51,57 ---- #include #include + #include #include "Utilities/ElementProperties.h" #include "Utilities/RefCounted.h" Index: tests/delete_test1.cpp =================================================================== RCS file: /home/pooma/Repository/r2/src/Utilities/tests/delete_test1.cpp,v retrieving revision 1.6 diff -c -p -r1.6 delete_test1.cpp *** tests/delete_test1.cpp 2000/06/27 20:06:37 1.6 --- tests/delete_test1.cpp 2001/03/15 06:57:33 *************** void test(Pooma::Tester &t, *** 120,126 **** { const int size = num_elements; const int trials = num_trials; ! const int inc_size = 2.0 / delete_fraction; const bool verbose = t.verbose() && print_results; using std::endl; --- 120,126 ---- { const int size = num_elements; const int trials = num_trials; ! const int inc_size = static_cast(2.0 / delete_fraction); const bool verbose = t.verbose() && print_results; using std::endl; *************** void test(Pooma::Tester &t, *** 220,226 **** end = a.end(); while (pos != end) { ! Ret_t status = result_set.insert(*pos++); t.check(status.second); } } --- 220,226 ---- end = a.end(); while (pos != end) { ! Ret_t status = result_set.insert(static_cast::key_type>(*pos++)); t.check(status.second); } } Index: tests/find_most_common_test1.cpp =================================================================== RCS file: /home/pooma/Repository/r2/src/Utilities/tests/find_most_common_test1.cpp,v retrieving revision 1.1 diff -c -p -r1.1 find_most_common_test1.cpp *** tests/find_most_common_test1.cpp 2000/03/31 16:56:37 1.1 --- tests/find_most_common_test1.cpp 2001/03/15 06:57:33 *************** void test(Pooma::Tester &t, int numEleme *** 94,100 **** Pooma::Algorithms::find_most_common(v.begin(), v.end()); if (numElements == 0) ! t.check("zero length", mc, v.end()); else { int cmc, nmc = -1; --- 94,100 ---- Pooma::Algorithms::find_most_common(v.begin(), v.end()); if (numElements == 0) ! t.check ("zero length", mc == v.end()); else { int cmc, nmc = -1; From oldham at codesourcery.com Thu Mar 15 07:05:53 2001 From: oldham at codesourcery.com (Jeffrey Oldham) Date: Wed, 14 Mar 2001 23:05:53 -0800 Subject: RFA: src Changes to Permit Compilation using gcc Message-ID: <20010314230553.G20645@codesourcery.com> Are the attached changes to the src Pooma directory acceptable? They compile using the most recent gcc. Domain/DomainTraits.Interval.h: * Add a static_cast to avoid a conversion problem. Evaluator/OpMask.h: * Modify a comment to avoid "multiline comment" warnings. Layout/Node.h: * Remove an extraneous '\' to avoid a "multiline comment" warning. Pooma/PETE/AssertEquals.h: * Modify to conform with previous changes to Pooma/PETE/Combiners.h. (I will be away for the next four days.) Thanks, Jeffrey D. Oldham oldham at codesourcery.com -------------- next part -------------- Index: Domain/DomainTraits.Interval.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Domain/DomainTraits.Interval.h,v retrieving revision 1.23 diff -c -p -r1.23 DomainTraits.Interval.h *** Domain/DomainTraits.Interval.h 2000/06/27 01:58:27 1.23 --- Domain/DomainTraits.Interval.h 2001/03/15 07:00:04 *************** struct DomainTraits< Interval<1> > *** 262,268 **** CTAssert(DomainTraits::singleValued == 1); CTAssert(DomainTraits::singleValued == 1); dom[0] = begval; ! dom[1] = (endval - begval + 1); PAssert(begval <= endval || dom[1] == 0); } --- 262,268 ---- CTAssert(DomainTraits::singleValued == 1); CTAssert(DomainTraits::singleValued == 1); dom[0] = begval; ! dom[1] = static_cast(endval - begval + 1); PAssert(begval <= endval || dom[1] == 0); } Index: Evaluator/OpMask.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Evaluator/OpMask.h,v retrieving revision 1.18 diff -c -p -r1.18 OpMask.h *** Evaluator/OpMask.h 2000/03/07 13:17:03 1.18 --- Evaluator/OpMask.h 2001/03/15 07:00:04 *************** *** 75,84 **** // To implement this behaviour, the expression is translated to the tree: // // OpMask ! // / \ // A WhereMask ! // / \ ! // F B // // ForEach is specialized for WhereMask to evaluate B only if F is true. // The result is returned in a MaskAssign, which contains --- 75,84 ---- // To implement this behaviour, the expression is translated to the tree: // // OpMask ! // / | // A WhereMask ! // / | ! // F B // // ForEach is specialized for WhereMask to evaluate B only if F is true. // The result is returned in a MaskAssign, which contains Index: Layout/Node.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Layout/Node.h,v retrieving revision 1.32 diff -c -p -r1.32 Node.h *** Layout/Node.h 2000/05/05 13:41:11 1.32 --- Layout/Node.h 2001/03/15 07:00:04 *************** *** 69,75 **** // is locating. It stores domains describing the owned and allocated // domains of the patch, the latter being in reference to the actual // underlying layout domain, the context where the patch should be stored, ! // and two ID values:\ // // 1) a global ID, which, for a set of N subdomains partitioned across ALL // the contexts, should be a unique value from 0 ... N-1 --- 69,75 ---- // is locating. It stores domains describing the owned and allocated // domains of the patch, the latter being in reference to the actual // underlying layout domain, the context where the patch should be stored, ! // and two ID values: // // 1) a global ID, which, for a set of N subdomains partitioned across ALL // the contexts, should be a unique value from 0 ... N-1 Index: Pooma/PETE/AssertEquals.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Pooma/PETE/AssertEquals.h,v retrieving revision 1.2 diff -c -p -r1.2 AssertEquals.h *** Pooma/PETE/AssertEquals.h 2000/03/07 13:18:06 1.2 --- Pooma/PETE/AssertEquals.h 2001/03/15 07:00:05 *************** struct Combine2 Message-ID: on 3/14/01 11:39 PM, Jeffrey Oldham at oldham at codesourcery.com wrote: > Are the attached changes to the files in the Pooma "test" directory > acceptable? I'm not at all sure about the status of anything under the "r2/test" directory. Once upon a time we had a testing team and under their auspices we formed the r2/test directory. This was supposed to test things based on specifications; i.e. it was supposed to be somewhat black-box, whereas the unit tests (src/Engine/tests, etc) were written by the developers and were pretty much white-box. This process did not work out (we spent more time debugging the test-team's test codes than we did debugging the things they were testing). I don't even know if these were included in Graham Mark's regression tests or in the distribution - I'm guessing not. In other words, this is probably not a big deal as we may want to nuke r2/test. Given that, I'll make a comment or two... > Array/Test/ArrayTest.cpp: > > * Prepend iostream functions with "std::". This is not needed since we include and not . We did this on purpose. At the time, some systems did not yet supporting the ANSI iostreams. I seem to recall that this was particularly an issue with SGI's CC. Ah, yes, here is the text of my message on this: > Matt Austern said that 7.2.1 beta 2 should definitely have some (not all) > of the .h-less header files. However, SGI has decided to only put things in > the std:: namespace if they are conforming. Their streams are not, so they > don't put streams in the std:: namespace. Almost everyone thought this was > a dumb idea, but I don't know if anyone convinced Matt. Even though SGI isn't the platform of the future at LANL, it is the platform of the present, and so we don't want to break things there. I guess we need to check if this has been fixed in SGI CC. If not, we probably need to stick with the current practice of include . As a practical matter, even if we go to I'd prefer a using std::cout; using std::endl; approach to writing "std::" in a million places in these test files. > Shared/dclock.cpp: > > * Rewrite from non-portable SGI code to (hopefully) portable Gnu C > Library code. I'm not sure about this code, but there are places where we used SGI's high-speed timers and I think we want to keep that code. I think that those places all provide portable versions, though. > Utilities/RefCounting/RefCountedBlockPtr/RefCountedBlockPtrTest.cpp: > > * Change abs() to fabs() for floating point numbers. Stroustrup says and are supposed to include double abs(double); Is that not true. Jim From jcrotinger at mac.com Thu Mar 15 16:01:31 2001 From: jcrotinger at mac.com (James Crotinger) Date: Thu, 15 Mar 2001 09:01:31 -0700 Subject: [pooma-dev] RFA: Modify BlockDecomposed Example Files In-Reply-To: <20010314224333.B20645@codesourcery.com> Message-ID: on 3/14/01 11:43 PM, Jeffrey Oldham at oldham at codesourcery.com wrote: > Are the attached changes to the Pooma examples/Solvers/BlockDecomposed > directory acceptable to add to the Pooma CVS tree? > > FivePoint/FivePointSolve.cpp: > > * Reorder the header files to fix a dependency problem. This is, by my definition, a bug in the header files. Mike? (Is Mike on this list?) Jim From jcrotinger at mac.com Thu Mar 15 16:03:56 2001 From: jcrotinger at mac.com (James Crotinger) Date: Thu, 15 Mar 2001 09:03:56 -0700 Subject: [pooma-dev] RFA: Prevent Thousands of Calls to findsuite.sh In-Reply-To: <20010314224718.C20645@codesourcery.com> Message-ID: on 3/14/01 11:47 PM, Jeffrey Oldham at oldham at codesourcery.com wrote: > The attached patch empirically reduced 3567 calls to findsuite.sh to > one call during one "make". That ought to speed things up! The build system is a disaster and everyone always complains that it is too slow, but none of us wanted to figure it out and try to speed it up (we borrowed it pretty much in-tact from Blanca). But fixes like this are great! Jim From jcrotinger at mac.com Thu Mar 15 16:21:41 2001 From: jcrotinger at mac.com (James Crotinger) Date: Thu, 15 Mar 2001 09:21:41 -0700 Subject: [pooma-dev] RFA: Fix Utilities Typos and Prevent Warnings In-Reply-To: <20010314225943.F20645@codesourcery.com> Message-ID: on 3/14/01 11:59 PM, Jeffrey Oldham at oldham at codesourcery.com wrote: > Are the attached changes to the src/Utilities Pooma directory > acceptable? These look fine. One comment.... > tests/delete_test1.cpp: > > * Add a static_cast for conversion from float to int to avoid a > compiler warning. > * Add a static_cast around iterator. This is probably a bug in the test itself - I suspect I originally had Array_t be a vector and, for whatever reason, changed it to vector or something. (Perhaps to compare timings?) Jim From mark at codesourcery.com Thu Mar 15 16:59:51 2001 From: mark at codesourcery.com (Mark Mitchell) Date: Thu, 15 Mar 2001 08:59:51 -0800 Subject: [pooma-dev] RFA: Modify BlockDecomposed Example Files In-Reply-To: References: <20010314224333.B20645@codesourcery.com> Message-ID: <20010315085951K.mitchell@codesourcery.com> >>>>> "James" == James Crotinger writes: James> This is, by my definition, a bug in the header files. Mike? James> (Is Mike on this list?) He should be. Thanks, -- Mark Mitchell mark at codesourcery.com CodeSourcery, LLC http://www.codesourcery.com From mark at codesourcery.com Fri Mar 16 17:03:55 2001 From: mark at codesourcery.com (Mark Mitchell) Date: Fri, 16 Mar 2001 09:03:55 -0800 Subject: Status Reports Message-ID: <20010316090355H.mitchell@codesourcery.com> It's Friday -- status report day. Please send me a short status report, covering: - What you did this week. - What you plan to do next week. - Any questions, concerns, problems that you are having. I'll summarize, both on the mailing list and directly to the lab. Thanks, -- Mark Mitchell mark at codesourcery.com CodeSourcery, LLC http://www.codesourcery.com From allan at stokes.ca Sat Mar 17 08:10:23 2001 From: allan at stokes.ca (Allan Stokes) Date: Sat, 17 Mar 2001 00:10:23 -0800 Subject: abs vs flabs In-Reply-To: Message-ID: Yes, Jim's comment is correct. This is a case where C++ takes advantage of operator overloading to define abs() separately for each of int, long, float, double, and long double. In C++ fabs and labs are unnecessary flesh. Allan > Utilities/RefCounting/RefCountedBlockPtr/RefCountedBlockPtrTest.cpp: > > * Change abs() to fabs() for floating point numbers. Stroustrup says and are supposed to include double abs(double); Is that not true. Jim From allan at stokes.ca Sat Mar 17 10:15:48 2001 From: allan at stokes.ca (Allan Stokes) Date: Sat, 17 Mar 2001 02:15:48 -0800 Subject: [pooma-dev] Pooma RFA: New gcc Configuration Files In-Reply-To: <20010314222725.A20646@codesourcery.com> Message-ID: Jeffrey, Looks like you reversed two files. SGIN32gcc.conf contains SUN UltraSparc definition. SUNgcc.conf contains SGIN32 definition. I noticed that you removed 5 EGCS variances from each of these files. Four of these were in the negative sense (missing capabilities of EGCS), but the restrict block was in the positive sense (EGCS does have restrict). So I suspect you want to leave the $no_restrict = 0; for gcc as well. I'll leave these for you to check these into the tree after reviewing my comments. Allan -----Original Message----- From: Jeffrey Oldham [mailto:oldham at codesourcery.com] Sent: Wednesday 14 March 2001 22:27 To: pooma-dev at pooma.codesourcery.com Cc: Jeffrey Oldham Subject: [pooma-dev] Pooma RFA: New gcc Configuration Files Attached are proposed configuration files for compiling the Pooma source code with the latest mainline gcc. Basically, I copied the *EGCS.conf files, substituting "gcc" for "ecgs" and removing a few variables indicating that ECGS did not support some C++ features. I have used the LINUXgcc.conf and the SGIN32gcc.conf files but not SUNgcc.conf nor SGI64gcc.conf. Is it OK to place these files in the Pooma CVS tree? (I will be away for the next four days so response time will lag.) Thanks, Jeffrey D. Oldham oldham at codesourcery.com From allan at stokes.ca Sat Mar 17 10:55:14 2001 From: allan at stokes.ca (Allan Stokes) Date: Sat, 17 Mar 2001 02:55:14 -0800 Subject: [pooma-dev] RFA: Proposed Modifications to Test Files In-Reply-To: Message-ID: <<< Once upon a time we had a testing team and under their auspices we formed the r2/test directory. This was supposed to test things based on specifications; i.e. it was supposed to be somewhat black-box, whereas the unit tests (src/Engine/tests, etc) were written by the developers and were pretty much white-box. This process did not work out (we spent more time debugging the test-team's test codes than we did debugging the things they were testing). >>> Jim's comments mirror my experience with other projects. IIRC back in the early eighties when the Mathematica/Maple kernels were still under intense development, it was fashionable to validate huge chunks of the implementation by computing difficult Ricci tensors for thousands of hours. This was surprisingly effective at catching small coding discrepancies which escaped many other forms of testing. You can go a long way with a couple of intense application level tests if they are chosen with good internal structure. The first problem with black-box testing at the specification level is that specifications rarely succeed in defining the problem domain without making unwarranted incursions into the implementation domain. A second problem is that specifications rarely map directly onto test cases anyway. For example, the specification for a reference counted allocated will have the invariant that the reference count is equal to the number of live objects holding an external reference, but in practical terms this invariant is generally inaccessible to direct inspection. Finally, black box testing often fails to find problems even in the cases where the criteria really are self evident. A good example of this is the Intel FDIV bug. Intel's ultimate response was to put more effort into ensuring that their white-box testing covered the implementation space. I agree with the comment raised at the Proximation meeting that if people are dilligent about posting unit tests with each new feature or bug fix most issues can be tracked more effectively on the ground floor. I'll hold off reviewing these changes until I hear it decreed that test remains a going concern. Allan From allan at stokes.ca Sat Mar 17 11:26:21 2001 From: allan at stokes.ca (Allan Stokes) Date: Sat, 17 Mar 2001 03:26:21 -0800 Subject: [pooma-dev] RFA: Prevent Thousands of Calls to findsuite.sh In-Reply-To: <20010314224718.C20645@codesourcery.com> Message-ID: Committed to tree. -----Original Message----- From: Jeffrey Oldham [mailto:oldham at codesourcery.com] Sent: Wednesday 14 March 2001 22:47 To: pooma-dev at pooma.codesourcery.com Subject: [pooma-dev] RFA: Prevent Thousands of Calls to findsuite.sh The attached patch empirically reduced 3567 calls to findsuite.sh to one call during one "make". Is it acceptable to add this change to the Pooma CVS tree? (I will be away for the next four days.) Thanks, Jeffrey D. Oldham oldham at codesourcery.com From allan at stokes.ca Sat Mar 17 12:29:53 2001 From: allan at stokes.ca (Allan Stokes) Date: Sat, 17 Mar 2001 04:29:53 -0800 Subject: [pooma-dev] RFA: Fix Utilities Typos and Prevent Warnings In-Reply-To: <20010314225943.F20645@codesourcery.com> Message-ID: ElementProperties.h: * Add a missing include directive. I would need gcc to check this. I'll take your word for it. Inform.h: * Permit use of std::ios_base::fmtflags for current gcc versions. This is what you have: <<<< #if (defined(__MWERKS__) && __MWERKS__ >= 0x2301) || __GLIBCPP__ >= 20001129 >>>> Do you want this instead? <<<< #if (defined(__MWERKS__) && __MWERKS__ >= 0x2301) || defined(__GLIBCPP__) && __GLIBCPP__ >= 20001129 >>>> I'm concerned that the first form will crap out on platforms where __GLIBCPP__ is not defined at all. RefCountedBlockPtr.h: * Add a missing include directive. Harmless at worst. tests/delete_test1.cpp: * Add a static_cast for conversion from float to int to avoid a compiler warning. Can't be any worse than it was, and now the badness is more apparent. * Add a static_cast around iterator. Ugh. Syntactically correct, but not desirable as written. This is the one where Jim thinks he wanked vector to become vector for some spurious reason. I propose a different fix in the included file (the CVS server went moribund so I couldn't take a diff). I'm using some extra type declarations and a value constructor on the target type rather than a static cast. kcc compiled my version without complaint. tests/find_most_common_test1.cpp: * Change which overloaded check function to use to permit compilation. Stylistically, this unit leaves a lot to be desired. It's conventional practice with the STL that you typedef your use of container types like this: typedef std::map my_map; typedef my_map::iterator my_map_iter; // or better typedef int my_key; typedef int my_value; typedef std::map my_map; typedef my_map::iterator my_map_iter; If you find yourself fixing this kind of mess frequently, just slap in the missing typedefs and try to make sense of things from there. The actual problem here doesn't involve STL types, but it would take some time to track t.check() backwards and I'm tired. KCC doesn't complain about the use of the three argument call to check(). So I have some doubts that your change reflects the semantic intent, whatever it might have been. -------------- next part -------------- A non-text attachment was scrubbed... Name: delete_test1.cpp Type: application/octet-stream Size: 17541 bytes Desc: not available URL: From allan at stokes.ca Sat Mar 17 16:22:00 2001 From: allan at stokes.ca (Allan Stokes) Date: Sat, 17 Mar 2001 08:22:00 -0800 Subject: [pooma-dev] missing reductions In-Reply-To: Message-ID: In benchmarks/Solvers/Jacobi/JacobiInP2.h there is this comment: // Since we don't have reductions yet, do this by hand. The hand-wrought code looks like a simple nine-point stencil reduction with multiplicative co-efficients for each cell. It doesn't look like something that Pooma couldn't implement. Is there a technical reason this operation is not yet provided? Allan From allan at stokes.ca Sat Mar 17 17:04:49 2001 From: allan at stokes.ca (Allan Stokes) Date: Sat, 17 Mar 2001 09:04:49 -0800 Subject: [pooma-dev] allocation assert In-Reply-To: Message-ID: I'm in benchmarks/Solvers/Krylov with a linux/kcc --opt build. All the benchmarks run and produce correct results, the timing table prints out (with some unflattering results for PoomaII MP) and then this: POOMA Assertion Failure Not all of the pooled memory was freed! File Utilities/Pool.cmpl.cpp; Line 82. ... Aborted Is this news? From sasmith at cybermesa.com Sat Mar 17 17:32:52 2001 From: sasmith at cybermesa.com (Stephen A. Smith) Date: Sat, 17 Mar 2001 10:32:52 -0700 Subject: [pooma-dev] missing reductions References: Message-ID: <3AB39FC3.CB444BC6@cybermesa.com> The comment refers to the error term, and we actually do have reductions now. (By reductions, we mean getting the sum of elements in an array, the maximum element in an array, etc.) The loop could now be replaced with: error_m(I,J) = -b_m(I,J) + e0 * x0_m(I,J) - e1 * (x0_m(I-1,J) + x0_m(I+1,J) + x0_m(I,J+1) + x0_m(I,J-1)) - e2 * (x0_m(I-1,J-1) + x0_m(I+1,J-1) + x0_m(I-1,J+1) + x0_m(I+1,J+1)); err = sum(error_m*error_m); provided the array error_m is added as a member. We can implement the stencil object you suggest as well, and this code actually is intended to illustrate the advantage of doing so. The code in the class JacobiInP2UnOpt should be rewritten as above, while the code in the class JacobiInP2Opt should be written as: WeightedAverage wa(e0, e1, e2); Stencil average(wa); error_m(I,J) = -b_m(I,J) + average(x0_m); err = sum(error_m*error_m); if you provide a WeightedAverage object like the NinePoint object already there. I agree that it would be good to update the examples and benchmarks to use the best features of POOMA. It might worth asking, if you're looking at the solver benchmarks, if all those solver variations are really useful. Eventually, POOMA should provide more predefined stencil objects. Since they're easy to write, and Blanca likes to write their own stencils anyway, the contract should probably focus on the functionality we provide through the stencil engines and the evaluator. For example, one feature that has yet to be implemented is multi-argument stencils for fields and arrays, so you could write code for non-constant weights: x = weightedAverage(w0, w1, y); to implement: x(i) = w1(i) * y(i -1) + w0(i) * y(i) + w1(i) * y(i + 1); or similar things. This may not be high-priority, however. I think John Hall told me this was not needed for their current code. In the long term, they will need something like this functionality under the hood to represent differential operators on non-uniform meshes, where the coefficients are computed from arrays instead of constants. Stephen Allan Stokes wrote: > In benchmarks/Solvers/Jacobi/JacobiInP2.h there is this comment: > > // Since we don't have reductions yet, do this by hand. > > The hand-wrought code looks like a simple nine-point stencil reduction with > multiplicative co-efficients for each cell. It doesn't look like something > that Pooma couldn't implement. > > Is there a technical reason this operation is not yet provided? > > Allan From sasmith at cybermesa.com Sat Mar 17 18:00:59 2001 From: sasmith at cybermesa.com (Stephen A. Smith) Date: Sat, 17 Mar 2001 11:00:59 -0700 Subject: [pooma-dev] allocation assert References: Message-ID: <3AB3A65B.D1F0320E@cybermesa.com> I don't remember seeing this error, even though I would have run this code in the past. Currently, Node is the only pooled object, so the error could be one of three things: 1) A layout is not deleted by the end of the code. (There are layouts in the implementations, but the benchmark should delete the implementations at the end of the code.) 2) A node object is created in some temporary structure that isn't deleted. 3) The Pool code could be faulty. This has happened in the past because of some compiler reorderings of code using reinterpreted pointers looking at the same piece of memory. It would be nice to track this down. If we have a real memory leak, that's bad. If the pool code has problems, we should replace it with something safer or eliminate it's use. (There is a known leak with the new field, so you will see this error from some of the NewField test codes.) Stephen Allan Stokes wrote: > I'm in benchmarks/Solvers/Krylov with a linux/kcc --opt build. All the > benchmarks run and produce correct results, the timing table prints out > (with some unflattering results for PoomaII MP) and then this: > > POOMA Assertion Failure > Not all of the pooled memory was freed! > File Utilities/Pool.cmpl.cpp; Line 82. > ... > Aborted > > Is this news? From mark at codesourcery.com Sat Mar 17 18:07:57 2001 From: mark at codesourcery.com (Mark Mitchell) Date: Sat, 17 Mar 2001 10:07:57 -0800 Subject: [pooma-dev] allocation assert In-Reply-To: <3AB3A65B.D1F0320E@cybermesa.com> References: <3AB3A65B.D1F0320E@cybermesa.com> Message-ID: <20010317100757N.mitchell@codesourcery.com> >>>>> "Stephen" == Stephen A Smith writes: Stephen> 3) The Pool code could be faulty. This has happened in Stephen> the past because of some compiler reorderings of code Stephen> using reinterpreted pointers looking at the same piece of Stephen> memory. In particular, the Pool code at some point violated the C/C++ rules about type aliasing. Therefore, clever compilers (including G++ after I implemented this optimization) woudl reorder assignments in ways that were not anticipated. I *thought* I fixed the Pool code, but I could be wrong. -- Mark Mitchell mark at codesourcery.com CodeSourcery, LLC http://www.codesourcery.com From jcrotinger at mac.com Sat Mar 17 18:13:26 2001 From: jcrotinger at mac.com (James Crotinger) Date: Sat, 17 Mar 2001 11:13:26 -0700 Subject: [pooma-dev] allocation assert In-Reply-To: Message-ID: This appears to be an original message, but the subject labeled it as a reply. Any idea why? Jim on 3/17/01 10:04 AM, Allan Stokes at allan at stokes.ca wrote: > > I'm in benchmarks/Solvers/Krylov with a linux/kcc --opt build. All the > benchmarks run and produce correct results, the timing table prints out > (with some unflattering results for PoomaII MP) and then this: > > POOMA Assertion Failure > Not all of the pooled memory was freed! > File Utilities/Pool.cmpl.cpp; Line 82. > ... > Aborted > > Is this news? > > From allan at stokes.ca Mon Mar 19 06:41:49 2001 From: allan at stokes.ca (Allan Stokes) Date: Sun, 18 Mar 2001 22:41:49 -0800 Subject: [pooma-dev] comments on Pool In-Reply-To: Message-ID: I performed some more tests. The same Krylov Pool assert is occuring on FreeBSD/gcc as well as Linux/kcc and Linux/kcc --opt builds. Along the way I also took a look inside the Pool module and I have a couple of comments. Comments within Pool state that Pool "maintains a set of page-sized chunks of memory". Currently, the page sized used by the implementation is 4096-8. I noted that the grow() function makes no special effort to allocate page-sized chunks on VM page boundaries. It just calls new char[alloc_this]; Perhaps the implementation is relying on certain C++ platforms to return near-page-size allocations on VM boundaries on best effort? In additional to its potential impact on VM behaviour, there is also the issue of virtual memory TLB entries (translation lookaside buffers). I've seen code (primarily x86 platforms) where TLB thrash was a significant performance factor. Enforcing true VM page alignment can also benefit TLB locality. The forced scalar alignment in Pool is currently on 8 byte boundaries, which Pool describes as "align on double words". I believe there are now some architectural scalar types where a 16-byte alignment is desirable, if not mandatory (SSE on x86, extended floats on IA-64). Ultimately, this should be under the control of an allocator policy type. Going one more level up, there are some situations where you are best served by imposing alignment on cache-line boundaries. For example, on an architecture with 64 byte cache lines, objects of size ~= 64-8 will average two full cache line fetches when accessed, and the average cache line will contain portions of two different blocks (which can become painful if the Pool is allowed to contain objects capable of being run concurrently under different physical threads of execution). Perhaps the best thing to do is note some of these issues in Pool.h for attention the next time the surgeon cuts. Allan From mark at codesourcery.com Mon Mar 19 08:41:20 2001 From: mark at codesourcery.com (Mark Mitchell) Date: Mon, 19 Mar 2001 00:41:20 -0800 Subject: Weekly Status Report Message-ID: <20010319004120S.mitchell@codesourcery.com> Last Week ========= Most of the effort was on setting up development infrastructure. Mitchell moved the POOMA CVS repository from LANL to CodeSourcery. Haney spent some time figuring out how to set up a Macintosh to perform the check outs. Stokes installed a variety of compilers in order to begin testing some of POOMA code. Oldham made a variety of minor improvements to POOMA aimed at increasing its portability. Stokes considered various approaches to documenting POOMA. Mitchell approached Pete Beckman about obtaining the `pooma.com' domain name from him. Agreement was reached about transferring the domain to CodeSourcery, but full transfer has not yet taken place. Mitchell responded to NDA requests from LANL regarding the Compaq hardware. Next Week ========= Development will begin in earnest, now that everyone is able to access the code base, and now that Proximation has met an internal deadline that took up a good bit of Crotinger's time last week. Haney, Crotinger will begin implementing new features in POOMA as per our kickoff meeting. Smith will isolate, and hopefully fix, John Hall's scalar code problem. In addition, Smith will analyze a request from John Hall for a new feature allowing the mixing of fields with different guard layers in stencils and scalar code. Oldham and Cummings will work on implementing the Field and Particle kernels, respectively. Issues ====== No progress has been made on security clearances. Who should we contact in order to make progress on this front? -- Mark Mitchell mark at codesourcery.com CodeSourcery, LLC http://www.codesourcery.com From swhaney at earthlink.net Mon Mar 19 14:13:01 2001 From: swhaney at earthlink.net (Scott Haney) Date: Mon, 19 Mar 2001 07:13:01 -0700 Subject: [pooma-dev] RFA: Proposed Modifications to Test Files In-Reply-To: Message-ID: on 3/17/01 3:55 AM, Allan Stokes at allan at stokes.ca wrote: > I'll hold off reviewing these changes until I hear it decreed that test > remains a going concern. I would suggest the following. After archiving the contests somewhere: (1) delete r2/regression (2) delete r2/test (3) delete r2/docs All of the stuff in these directories is old and essentially unsupported. We might want to move the stuff in the html directory to docs (seems a bit more standard). Comments? Do people like putting tests in the source directories? In retrospect, I think this clutters things up and complicates the build process, so it might not be a bad idea to move these to a centralized tests directory. Comments? Scott From swhaney at earthlink.net Mon Mar 19 14:15:36 2001 From: swhaney at earthlink.net (Scott Haney) Date: Mon, 19 Mar 2001 07:15:36 -0700 Subject: [pooma-dev] comments on Pool In-Reply-To: Message-ID: on 3/18/01 11:41 PM, Allan Stokes at allan at stokes.ca wrote: > > I noted that the grow() function makes no special effort to allocate > page-sized chunks on VM page boundaries. It just calls new > char[alloc_this]; Perhaps the implementation is relying on certain C++ > platforms to return near-page-size allocations on VM boundaries on best > effort? Doubt it. :-) > > Perhaps the best thing to do is note some of these issues in Pool.h for > attention the next time the surgeon cuts. > This is a great idea. It sounds like there might be benefit to be gained with only a little work, but we should probably defer this a bit. Scott From mark at codesourcery.com Mon Mar 19 15:55:28 2001 From: mark at codesourcery.com (Mark Mitchell) Date: Mon, 19 Mar 2001 07:55:28 -0800 Subject: [pooma-dev] RFA: Proposed Modifications to Test Files In-Reply-To: References: Message-ID: <20010319075528N.mitchell@codesourcery.com> >>>>> "Scott" == Scott Haney writes: Scott> I would suggest the following. After archiving the contests Scott> somewhere: Scott> (1) delete r2/regression (2) delete r2/test (3) delete Scott> r2/docs I'll do that. Scott> All of the stuff in these directories is old and Scott> essentially unsupported. Scott> We might want to move the stuff in the html directory to Scott> docs (seems a bit more standard). Comments? Yes, this is a good idea; I'll do that, too. Scott> Do people like putting tests in the source directories? In Scott> retrospect, I think this clutters things up and complicates Scott> the build process, so it might not be a bad idea to move Scott> these to a centralized tests directory. Comments? I think that's a good idea -- but I'll not volunteer for that one. It would definitely be nice to have the test-suite broken out from the source code. Thanks, -- Mark Mitchell mark at codesourcery.com CodeSourcery, LLC http://www.codesourcery.com From cummings at linkline.com Mon Mar 19 18:46:56 2001 From: cummings at linkline.com (Julian C. Cummings) Date: Mon, 19 Mar 2001 10:46:56 -0800 Subject: [pooma-dev] RFA: Permit Compiling MessageMain.cpp In-Reply-To: <20010314225003.D20645@codesourcery.com> Message-ID: I see nothing wrong with this proposed change. -- Julian C. -----Original Message----- From: Jeffrey Oldham [mailto:oldham at codesourcery.com] Sent: Wednesday, March 14, 2001 10:50 PM To: pooma-dev at pooma.codesourcery.com Subject: [pooma-dev] RFA: Permit Compiling MessageMain.cpp The attached patch permits compiling benchmarks/Messaging/MessageMain.cpp on a sequential machine without MPI. Is it acceptable to add this patch to the Pooma CVS tree? (I will be away for the next four days.) Thanks, Jeffrey D. Oldham oldham at codesourcery.com From cummings at linkline.com Mon Mar 19 18:46:55 2001 From: cummings at linkline.com (Julian C. Cummings) Date: Mon, 19 Mar 2001 10:46:55 -0800 Subject: [pooma-dev] problems loading Visual Studio projects In-Reply-To: Message-ID: Allan, I suspect the problems are due to conversions between VS5 and VS6 project files. I thought I converted everything over to VS6 successfully, but maybe not. I will check on that today. Incidentally, are you working with the CVS repository in a Windows environment? If so, perhaps you could help me figure out how to get WinCVS and SSH to play nice together. I only have read-only access to the repository via my Windows machine right now. I was hoping to work with VS6 and Intel VTune (or perhaps gcc under cygwin) on my local machine, rather than logging in to a Unix machine at Caltech and working from there. If you know the secrets, could you please e-mail me instructions? Thanks, Julian C. -----Original Message----- From: Allan Stokes [mailto:allan at stokes.ca] Sent: Wednesday, March 14, 2001 1:26 PM To: Poomadev Subject: [pooma-dev] problems loading Visual Studio projects Hello everyone, I'm slowly mastering the mechanics of working with the Pooma tree. So far I have CVS working with write access and I was able to compile Pooma in a FreeBSD/gcc environment. The test code is producing errors in this environment, but that is the subject of another mail. Yesterday I began the process of getting Pooma to compile in my w2k environment. I upgraded myself to Intel 5.0 and then tried to load the VisualC++ workspaces into Visual Studio 6 for a test compile. The workspaces file (.dsw) load without error, but I end up with an empty workspace (no projects). I was working in the benchmark workspace at the time, so I thought I would just add maybe eight projects (.dsp files) into this workspace manually. When I try to load one of these project files into an empty workspace (I've also tried this with a virgin workspace) VS6 complains that the "project file was not generated by VS6" and offers to wrap the project file, a process which creates a new .dsp file (which I save under a new name). I can now load the new-and-improved .dsp project into my blank workspace, but my workspace project tree still shows (0) projects loaded. Recognizing that I'm in the land of Lilliput, I checked the VS menus and sure enough VS6 has added an option to the menu for me to build the project which I still can not see under my project tree. If I try to compile the phantom project via the menu option, I get complaints pertaining to NMAKE. Whoa, one problem at a time. Working in this environment a few weeks ago, but with Intel 4.5 installed instead, I was able to load and compile these same workspaces from the 2.3 Pooma off the internet. Either Intel 5.0 has "enhanced" Visual Studio, or something has changed in the structure of the .dsp files incorporated into the r2 checkout tree. If someone can send me a "works for me" against the r2 tree, then I can resume banging my head against the wall in my own corner of the room without concern that I'm duplicating effort. Allan From cummings at linkline.com Mon Mar 19 18:57:02 2001 From: cummings at linkline.com (Julian C. Cummings) Date: Mon, 19 Mar 2001 10:57:02 -0800 Subject: [pooma-dev] Pooma RFA: New gcc Configuration Files In-Reply-To: Message-ID: Those configuration file variables such as $no_restrict all have an implicit value of "0" or "false". So when the implicit value is the correct one, it is OK to just delete that line, or you can leave it there just for informational purposes. In this case, I only realized late in the game that if you define "restrict" to be "__restrict__", gcc will accept it. So that $no_restrict used to be set to "1" in our gcc .conf files. I'm happy with renaming the EGCS files to GCC. -- Julian C. -----Original Message----- From: Allan Stokes [mailto:allan at stokes.ca] Sent: Saturday, March 17, 2001 2:16 AM To: Jeffrey Oldham; pooma-dev at pooma.codesourcery.com Subject: RE: [pooma-dev] Pooma RFA: New gcc Configuration Files Jeffrey, Looks like you reversed two files. SGIN32gcc.conf contains SUN UltraSparc definition. SUNgcc.conf contains SGIN32 definition. I noticed that you removed 5 EGCS variances from each of these files. Four of these were in the negative sense (missing capabilities of EGCS), but the restrict block was in the positive sense (EGCS does have restrict). So I suspect you want to leave the $no_restrict = 0; for gcc as well. I'll leave these for you to check these into the tree after reviewing my comments. Allan -----Original Message----- From: Jeffrey Oldham [mailto:oldham at codesourcery.com] Sent: Wednesday 14 March 2001 22:27 To: pooma-dev at pooma.codesourcery.com Cc: Jeffrey Oldham Subject: [pooma-dev] Pooma RFA: New gcc Configuration Files Attached are proposed configuration files for compiling the Pooma source code with the latest mainline gcc. Basically, I copied the *EGCS.conf files, substituting "gcc" for "ecgs" and removing a few variables indicating that ECGS did not support some C++ features. I have used the LINUXgcc.conf and the SGIN32gcc.conf files but not SUNgcc.conf nor SGI64gcc.conf. Is it OK to place these files in the Pooma CVS tree? (I will be away for the next four days so response time will lag.) Thanks, Jeffrey D. Oldham oldham at codesourcery.com From swhaney at earthlink.net Mon Mar 19 22:57:40 2001 From: swhaney at earthlink.net (Scott Haney) Date: Mon, 19 Mar 2001 15:57:40 -0700 Subject: [pooma-dev] RFA: Proposed Modifications to Test Files In-Reply-To: <20010319075528N.mitchell@codesourcery.com> Message-ID: On 3/19/01 8:55 AM, "Mark Mitchell" wrote: > > Scott> I would suggest the following. After archiving the contests > Scott> somewhere: > > Scott> (1) delete r2/regression (2) delete r2/test (3) delete > Scott> r2/docs > > I'll do that. We do have to take care with this. We can certainly delete the contents of these directories with no problem. However, I think actually deleting directories from CVS requires some hacking of the repository, which, in the past, has invalidated everyone's remote repository. Maybe you CodeSourcery guys know how to do this better? Scott -- Proximation LLC 2960 Rodeo Park Drive West Santa Fe, NM 87505 Voice: (505) 424-3809 x101 FAX: (505) 438-4161 From mark at codesourcery.com Mon Mar 19 23:09:40 2001 From: mark at codesourcery.com (Mark Mitchell) Date: Mon, 19 Mar 2001 15:09:40 -0800 Subject: [pooma-dev] RFA: Proposed Modifications to Test Files In-Reply-To: References: <20010319075528N.mitchell@codesourcery.com> Message-ID: <20010319150940F.mitchell@codesourcery.com> >>>>> "Scott" == Scott Haney writes: Scott> However, I think actually deleting directories from CVS Scott> requires some hacking of the repository, which, in the Scott> past, has invalidated everyone's remote repository. Maybe Scott> you CodeSourcery guys know how to do this better? Nope -- so I don't do that way. :-) I just `cvs remove' all the files. Then, if you use `cvs update -p' (or put that in your .cvsrc) the empty directories go away by magic. It's already done, so a cvs update should do the right thing for everybody. -- Mark Mitchell mark at codesourcery.com CodeSourcery, LLC http://www.codesourcery.com From allan at stokes.ca Tue Mar 20 03:44:58 2001 From: allan at stokes.ca (Allan Stokes) Date: Mon, 19 Mar 2001 19:44:58 -0800 Subject: [pooma-dev] RFA: Proposed Modifications to Test Files In-Reply-To: <20010319150940F.mitchell@codesourcery.com> Message-ID: <<< I just `cvs remove' all the files. Then, if you use `cvs update -p' (or put that in your .cvsrc) the empty directories go away by magic. It's already done, so a cvs update should do the right thing for everybody. >>> Capital P on my cvs. cvs update -P worked like a charm. From allan at stokes.ca Tue Mar 20 05:09:39 2001 From: allan at stokes.ca (Allan Stokes) Date: Mon, 19 Mar 2001 21:09:39 -0800 Subject: [pooma-dev] problems loading Visual Studio projects In-Reply-To: Message-ID: <<< Incidentally, are you working with the CVS repository in a Windows environment? If so, perhaps you could help me figure out how to get WinCVS and SSH to play nice together. I only have read-only access to the repository via my Windows machine right now. I was hoping to work with VS6 and Intel VTune (or perhaps gcc under cygwin) on my local machine, rather than logging in to a Unix machine at Caltech and working from there. If you know the secrets, could you please e-mail me instructions? >>> I have used several methods in the past, but I've haven't used WinCVS before. I don't see any reason why WinCVS would respect the usual settings. The easiest method recently is the new Cygwin. The version of Cygwin I'm using presently I downloaded under a directory named 1.8, supposing that means anything. It comes with a very up-to-date version of SSH: OpenSSH_2.3.0p1 My ENV settings are as follows: export CVSROOT=:ext:pooma:/home/pooma/Repository export CVS_RSH="/usr/bin/ssh" I put these in a file and activate them with the bash "source" command. In your USER directory (cygwin set me up under /home/administrator) add the .ssh directory with your Pooma public key identity. My identity files are called pooma and pooma.pub I also added into ~/.ssh/config this option block: Host pooma Hostname pooma.codesourcery.com EscapeChar none IdentityFile ~/.ssh/pooma User pooma If you have this working and your public key is set up at both ends, you can do this: $ ssh pooma Enter passphrase for RSA key 'allan at camel.wloo.nat' If it asks for a password instead of a passphrase, you're hosed. ssh -v -v pooma Will do the whole process again with everything of interest printed to the console. If you do enter the passphrase you'll be stuck at an empty prompt. Mark has cleverly set up cvs to do a forced "cvs server" command, so no shell games here. An empty prompt means it worked. As far as CVS is concerned, you just to get it to call the right SSH and to have the right ENV variables set at the time SSH is called. The crucial ENV var for Cygwin SSH is USER=your_path. There may be others, but these are set up correctly by default if you are working *within* the Cygwin bash shell. Well, I tried wincvs myself for ten minutes. Good luck. The SSH integration is minimal at best. First, you'll need to set your Windows path to include c:\cygwin\bin WinCVS uses the windows path to locate SSH. Next, your RSA identity needs to be c:\cygwin\home\administrator\.ssh\pooma (match to your w2k username and identity file). Finally, you'll need the patience of Job to determine what environment variables are configured (and what vars are required) when WinCVS invokes whatever SSH it finds in the PATH. The usual message "end of file from server" just means that _something_ wasn't correct. Allan -----Original Message----- From: Allan Stokes [mailto:allan at stokes.ca] Sent: Wednesday, March 14, 2001 1:26 PM To: Poomadev Subject: [pooma-dev] problems loading Visual Studio projects Hello everyone, I'm slowly mastering the mechanics of working with the Pooma tree. So far I have CVS working with write access and I was able to compile Pooma in a FreeBSD/gcc environment. The test code is producing errors in this environment, but that is the subject of another mail. Yesterday I began the process of getting Pooma to compile in my w2k environment. I upgraded myself to Intel 5.0 and then tried to load the VisualC++ workspaces into Visual Studio 6 for a test compile. The workspaces file (.dsw) load without error, but I end up with an empty workspace (no projects). I was working in the benchmark workspace at the time, so I thought I would just add maybe eight projects (.dsp files) into this workspace manually. When I try to load one of these project files into an empty workspace (I've also tried this with a virgin workspace) VS6 complains that the "project file was not generated by VS6" and offers to wrap the project file, a process which creates a new .dsp file (which I save under a new name). I can now load the new-and-improved .dsp project into my blank workspace, but my workspace project tree still shows (0) projects loaded. Recognizing that I'm in the land of Lilliput, I checked the VS menus and sure enough VS6 has added an option to the menu for me to build the project which I still can not see under my project tree. If I try to compile the phantom project via the menu option, I get complaints pertaining to NMAKE. Whoa, one problem at a time. Working in this environment a few weeks ago, but with Intel 4.5 installed instead, I was able to load and compile these same workspaces from the 2.3 Pooma off the internet. Either Intel 5.0 has "enhanced" Visual Studio, or something has changed in the structure of the .dsp files incorporated into the r2 checkout tree. If someone can send me a "works for me" against the r2 tree, then I can resume banging my head against the wall in my own corner of the room without concern that I'm duplicating effort. Allan From swhaney at earthlink.net Tue Mar 20 12:48:55 2001 From: swhaney at earthlink.net (Scott Haney) Date: Tue, 20 Mar 2001 05:48:55 -0700 Subject: [pooma-dev] problems loading Visual Studio projects In-Reply-To: Message-ID: on 3/19/01 11:46 AM, Julian C. Cummings at cummings at linkline.com wrote: > Incidentally, are you working with the CVS repository in > a Windows environment? If so, perhaps you could help me > figure out how to get WinCVS and SSH to play nice together. > I only have read-only access to the repository via my > Windows machine right now. I was hoping to work with VS6 > and Intel VTune (or perhaps gcc under cygwin) on my local > machine, rather than logging in to a Unix machine at Caltech > and working from there. If you know the secrets, could you > please e-mail me instructions? Hi Julian, There is a discussion about using WinCVS with SSH at: http://www.wincvs.org/ssh.html Scott From oldham at codesourcery.com Tue Mar 20 23:45:27 2001 From: oldham at codesourcery.com (Jeffrey Oldham) Date: Tue, 20 Mar 2001 15:45:27 -0800 Subject: Patch: src Changes to Permit Compilation using gcc Message-ID: <20010320154527.A12291@codesourcery.com> These changes to the Pooma src directory were committed. Domain/DomainTraits.Interval.h: * Add a static_cast to avoid a conversion problem. Evaluator/OpMask.h: * Modify a comment to avoid "multiline comment" warnings. Layout/Node.h: * Remove an extraneous '\' to avoid a "multiline comment" warning. Pooma/PETE/AssertEquals.h: * Modify to conform with previous changes to Pooma/PETE/Combiners.h. Tested on gcc and Linux. Reviewed by Jim Crodinger. Thanks, Jeffrey D. Oldham oldham at codesourcery.com -------------- next part -------------- Index: Domain/DomainTraits.Interval.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Domain/DomainTraits.Interval.h,v retrieving revision 1.23 diff -c -p -r1.23 DomainTraits.Interval.h *** Domain/DomainTraits.Interval.h 2000/06/27 01:58:27 1.23 --- Domain/DomainTraits.Interval.h 2001/03/15 07:00:04 *************** struct DomainTraits< Interval<1> > *** 262,268 **** CTAssert(DomainTraits::singleValued == 1); CTAssert(DomainTraits::singleValued == 1); dom[0] = begval; ! dom[1] = (endval - begval + 1); PAssert(begval <= endval || dom[1] == 0); } --- 262,268 ---- CTAssert(DomainTraits::singleValued == 1); CTAssert(DomainTraits::singleValued == 1); dom[0] = begval; ! dom[1] = static_cast(endval - begval + 1); PAssert(begval <= endval || dom[1] == 0); } Index: Evaluator/OpMask.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Evaluator/OpMask.h,v retrieving revision 1.18 diff -c -p -r1.18 OpMask.h *** Evaluator/OpMask.h 2000/03/07 13:17:03 1.18 --- Evaluator/OpMask.h 2001/03/15 07:00:04 *************** *** 75,84 **** // To implement this behaviour, the expression is translated to the tree: // // OpMask ! // / \ // A WhereMask ! // / \ ! // F B // // ForEach is specialized for WhereMask to evaluate B only if F is true. // The result is returned in a MaskAssign, which contains --- 75,84 ---- // To implement this behaviour, the expression is translated to the tree: // // OpMask ! // / | // A WhereMask ! // / | ! // F B // // ForEach is specialized for WhereMask to evaluate B only if F is true. // The result is returned in a MaskAssign, which contains Index: Layout/Node.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Layout/Node.h,v retrieving revision 1.32 diff -c -p -r1.32 Node.h *** Layout/Node.h 2000/05/05 13:41:11 1.32 --- Layout/Node.h 2001/03/15 07:00:04 *************** *** 69,75 **** // is locating. It stores domains describing the owned and allocated // domains of the patch, the latter being in reference to the actual // underlying layout domain, the context where the patch should be stored, ! // and two ID values:\ // // 1) a global ID, which, for a set of N subdomains partitioned across ALL // the contexts, should be a unique value from 0 ... N-1 --- 69,75 ---- // is locating. It stores domains describing the owned and allocated // domains of the patch, the latter being in reference to the actual // underlying layout domain, the context where the patch should be stored, ! // and two ID values: // // 1) a global ID, which, for a set of N subdomains partitioned across ALL // the contexts, should be a unique value from 0 ... N-1 Index: Pooma/PETE/AssertEquals.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Pooma/PETE/AssertEquals.h,v retrieving revision 1.2 diff -c -p -r1.2 AssertEquals.h *** Pooma/PETE/AssertEquals.h 2000/03/07 13:18:06 1.2 --- Pooma/PETE/AssertEquals.h 2001/03/15 07:00:05 *************** struct Combine2 I committed the attached patch to permit compiling benchmarks/Messaging/MessageMain.cpp on a sequential machine without MPI. Thanks, Jeffrey D. Oldham oldham at codesourcery.com -------------- next part -------------- Index: MessageMain.cpp =================================================================== RCS file: /home/pooma/Repository/r2/benchmarks/Messaging/MessageMain.cpp,v retrieving revision 1.9 diff -c -p -r1.9 MessageMain.cpp *** MessageMain.cpp 2000/07/24 16:40:11 1.9 --- MessageMain.cpp 2001/03/15 06:48:16 *************** int main(int argc, char **argv) *** 188,197 **** --- 188,199 ---- // messagingParameters(argc,argv); + #if defined(POOMA_BENCHMARKS_MESSAGING_TULIP) || defined(POOMA_BENCHMARKS_MESSAGING_MPI) // // Build a benchmark object to hold the benchmarks we will do. // Benchmark messaging(argc,argv,"Border exchange messaging"); + #endif // POOMA_BENCHMARKS_MESSAGING_TULIP || POOMA_BENCHMARKS_MESSAGING_MPI #ifdef POOMA_BENCHMARKS_MESSAGING_TULIP *************** int main(int argc, char **argv) *** 252,263 **** --- 254,267 ---- #endif // POOMA_BENCHMARKS_MESSAGING_MPI + #if defined(POOMA_BENCHMARKS_MESSAGING_TULIP) || defined(POOMA_BENCHMARKS_MESSAGING_MPI) // // Do the benchmark: // messaging.setSamplingParameters(patch_real_elems_s,0,1); messaging.setIterations(iterations_s); messaging.run(); + #endif // POOMA_BENCHMARKS_MESSAGING_TULIP || POOMA_BENCHMARKS_MESSAGING_MPI #ifdef POOMA_BENCHMARKS_MESSAGING_MPI *mpiInform << "Finished messaging.run\n"; From oldham at codesourcery.com Wed Mar 21 00:00:12 2001 From: oldham at codesourcery.com (Jeffrey Oldham) Date: Tue, 20 Mar 2001 16:00:12 -0800 Subject: [pooma-dev] Patch: Permit Compiling MessageMain.cpp In-Reply-To: <20010320155314.B12291@codesourcery.com>; from oldham@codesourcery.com on Tue, Mar 20, 2001 at 03:53:14PM -0800 References: <20010320155314.B12291@codesourcery.com> Message-ID: <20010320160012.C12291@codesourcery.com> On Tue, Mar 20, 2001 at 03:53:14PM -0800, Jeffrey Oldham wrote: > I committed the attached patch to permit compiling > benchmarks/Messaging/MessageMain.cpp on a sequential machine without > MPI. Approved by Julian Cummings Tested on Linux with gcc mainline. > Thanks, > Jeffrey D. Oldham > oldham at codesourcery.com -------------- next part -------------- Index: MessageMain.cpp =================================================================== RCS file: /home/pooma/Repository/r2/benchmarks/Messaging/MessageMain.cpp,v retrieving revision 1.9 diff -c -p -r1.9 MessageMain.cpp *** MessageMain.cpp 2000/07/24 16:40:11 1.9 --- MessageMain.cpp 2001/03/15 06:48:16 *************** int main(int argc, char **argv) *** 188,197 **** --- 188,199 ---- // messagingParameters(argc,argv); + #if defined(POOMA_BENCHMARKS_MESSAGING_TULIP) || defined(POOMA_BENCHMARKS_MESSAGING_MPI) // // Build a benchmark object to hold the benchmarks we will do. // Benchmark messaging(argc,argv,"Border exchange messaging"); + #endif // POOMA_BENCHMARKS_MESSAGING_TULIP || POOMA_BENCHMARKS_MESSAGING_MPI #ifdef POOMA_BENCHMARKS_MESSAGING_TULIP *************** int main(int argc, char **argv) *** 252,263 **** --- 254,267 ---- #endif // POOMA_BENCHMARKS_MESSAGING_MPI + #if defined(POOMA_BENCHMARKS_MESSAGING_TULIP) || defined(POOMA_BENCHMARKS_MESSAGING_MPI) // // Do the benchmark: // messaging.setSamplingParameters(patch_real_elems_s,0,1); messaging.setIterations(iterations_s); messaging.run(); + #endif // POOMA_BENCHMARKS_MESSAGING_TULIP || POOMA_BENCHMARKS_MESSAGING_MPI #ifdef POOMA_BENCHMARKS_MESSAGING_MPI *mpiInform << "Finished messaging.run\n"; From oldham at codesourcery.com Wed Mar 21 00:50:46 2001 From: oldham at codesourcery.com (Jeffrey Oldham) Date: Tue, 20 Mar 2001 16:50:46 -0800 Subject: Patch: New gcc Configuration Files Message-ID: <20010320165046.A12595@codesourcery.com> Attached are proposed configuration files for compiling the Pooma source code with the latest mainline gcc. Basically, I copied the *EGCS.conf files, substituting "gcc" for "ecgs" and removing a few variables indicating that ECGS did not support some C++ features. (Allan asked if I reversed SGIN32gcc.conf and SUNgcc.conf. I do not think so, but please let me know if I did.) Approved by Jim Crotinger Tested on Linux and gcc Thanks, Jeffrey D. Oldham oldham at codesourcery.com -------------- 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, 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 ########################################################################### # POOMA configuration settings # # Platform: LINUX (Intel Pentium running Linux) # Compiler: gcc # ########################################################################### # # 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 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 = "linux/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_lib_subdir = "linux/lib"; $profile_basic_makefile = "Makefile.tau-gcc"; $profile_smarts_makefile = "Makefile.tau-smarts-gcc"; $profile_pthreads_makefile = "Makefile.tau-pthread-gcc"; ### location of PAWS files for program coupling $paws_able = 1; $paws_default_dir = "/home/paws/build/paws-current"; $paws_lib_subdir = "linux/lib"; $paws_makefile = "Makefile.paws-gcc"; ### 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/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"; ### 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 ################### ### the name of this architecture $archtype = "linux"; $comptype = "gcc"; $compext = "-gcc"; ### 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. # gcc does not have restrict (use __restrict__) $no_restrict = 1; # Must include to get POSIX file modes $inc_sys_stat_h_file_modes = 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: LINUXgcc.conf,v $ $Author: oldham $ # $Revision: 1.1 $ $Date: 2001/03/21 00:45:21 $ # ---------------------------------------------------------------------- # ACL:rcsinfo ########################################################################### # the last line of this file must be a '1' so that Perl sees a non-zero # results from this file ########################################################################### 1; -------------- 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, 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 ########################################################################### # POOMA configuration settings # # Platform: SGI64 (Silicon Graphics 64-bit) # Compiler: GCC # ########################################################################### # # 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 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 = "sgi64/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_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"; ### location of PAWS files for program coupling $paws_able = 1; $paws_default_dir = "/home/paws/build/paws-current"; $paws_lib_subdir = "sgi64/lib"; $paws_makefile = "Makefile.paws-gcc"; ### location of HDF5 files for I/O $hdf5_able = 1; $hdf5_default_dir = "/usr/local/pooma/packages/hdf5"; ### location of cheetah $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"; ### 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 ########################################################################### $sgibits = "-mabi=64 -mips4"; ################### ### characteristics ################### ### the name of this architecture $archtype = "sgi64"; $comptype = "gcc"; $compext = "-gcc"; ### 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. # gcc does not have restrict (use __restrict__) $no_restrict = 1; ################ ### C++ settings ################ ### general settings for using the C++ compiler, for both libs and apps $cpp = "g++"; $cppargs = "$sgibits -ftemplate-depth-60"; $cppargs .= " -D__SGI_STL_INTERNAL_RELOPS -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 = "$sgibits -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 = "$sgibits"; $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 = "$sgibits"; $linkverbose = "-v"; $linkshare = "-rpath \$(POOMA_LIBDIR)"; ##################### ### archiver settings ##################### $ar = "ar"; # program to make static lib $arshare = $cpp; # program to make shared lib $arargs = "rc"; # arguments for making static lib $arshareargs = "$sgibits -shared -o"; # arguments for making shared lib # 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: SGI64gcc.conf,v $ $Author: oldham $ # $Revision: 1.1 $ $Date: 2001/03/21 00:45:21 $ # ---------------------------------------------------------------------- # ACL:rcsinfo ########################################################################### # the last line of this file must be a '1' so that Perl sees a non-zero # results from this file ########################################################################### 1; -------------- 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, 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 ########################################################################### # POOMA configuration settings # # Platform: SGIN32 (Silicon Graphics n32 format) # Compiler: GCC # ########################################################################### # # 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 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 = "sgin32/lib"; $threads_basic_makefile = "Makefile.smarts-gcc"; $threads_profile_makefile = "Makefile.smarts-tau-gcc"; ### 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_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"; ### location of PAWS files for program coupling $paws_able = 1; $paws_default_dir = "/home/paws/build/paws-current"; $paws_lib_subdir = "sgin32/lib"; $paws_makefile = "Makefile.paws-gcc"; ### location of HDF5 files for I/O $hdf5_able = 1; $hdf5_default_dir = "/usr/local/pooma/packages/hdf5"; ### location of cheetah $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"; ### 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 ########################################################################### $sgibits = "-mabi=n32 -mips4"; ################### ### characteristics ################### ### the name of this architecture $archtype = "sgin32"; $comptype = "gcc"; $compext = "-gcc"; ### 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. # gcc does not have restrict (use __restrict__) $no_restrict = 1; ################ ### C++ settings ################ ### general settings for using the C++ compiler, for both libs and apps $cpp = "g++"; $cppargs = "$sgibits -ftemplate-depth-60"; $cppargs .= " -D__SGI_STL_INTERNAL_RELOPS -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 -O3 -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 = "$sgibits -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 = "$sgibits"; $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 = "$sgibits"; $linkverbose = "-v"; $linkshare = "-rpath \$(POOMA_LIBDIR)"; ##################### ### archiver settings ##################### $ar = "ar"; # program to make static lib $arshare = $cpp; # program to make shared lib $arargs = "rc"; # arguments for making static lib $arshareargs = "$sgibits -shared -o"; # arguments for making shared lib # 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: SGIN32gcc.conf,v $ $Author: oldham $ # $Revision: 1.1 $ $Date: 2001/03/21 00:45:21 $ # ---------------------------------------------------------------------- # ACL:rcsinfo ########################################################################### # the last line of this file must be a '1' so that Perl sees a non-zero # results from this file ########################################################################### 1; -------------- 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, 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 ########################################################################### # POOMA configuration settings # # Platform: SUN UltraSPARC # Compiler: GCC # ########################################################################### # # 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 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 = 0; ### location of TAU files for profiling $profile_able = 0; ### location of PAWS files for program coupling $paws_able = 0; ### location of HDF5 files for I/O $hdf5_able = 0; ### location of cheetah $cheetah_able = 0; ### 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 ################### ### the name of this architecture $archtype = "sun"; $comptype = "gcc"; $compext = "-gcc"; ### 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. # gcc does not have restrict (use __restrict__) $no_restrict = 1; # SUN requires include of for file modes $inc_sys_stat_h_file_modes = 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 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 -O3 -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 = "-v"; $linkshare = "-rpath \$(POOMA_LIBDIR)"; ##################### ### archiver settings ##################### $ar = "ar"; # program to make static lib $arshare = $cpp; # program to make shared lib $arargs = "rc"; # arguments for making static lib $arshareargs = "-shared -o"; # arguments for making shared lib # 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: SUNgcc.conf,v $ $Author: oldham $ # $Revision: 1.1 $ $Date: 2001/03/21 00:45:21 $ # ---------------------------------------------------------------------- # 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 oldham at codesourcery.com Wed Mar 21 00:58:03 2001 From: oldham at codesourcery.com (Jeffrey Oldham) Date: Tue, 20 Mar 2001 16:58:03 -0800 Subject: Patch: Fix Utilities Typos and Prevent Warnings Message-ID: <20010320165803.A12628@codesourcery.com> ElementProperties.h: * Add a missing include directive. Inform.h: * Permit use of std::ios_base::fmtflags for current gcc versions. RefCountedBlockPtr.h: * Add a missing include directive. tests/delete_test1.cpp: * Add a static_cast for conversion from float to int to avoid a compiler warning. * Add a static_cast around iterator. tests/find_most_common_test1.cpp: * Change which overloaded check function to use to permit compilation. Approved by Jim Crotinger Tested on sequential Linux and gcc. Unresolved: tests/delete_test1.cpp's static_casts may reveal a testing error. Thanks, Jeffrey D. Oldham oldham at codesourcery.com -------------- next part -------------- ? LINUXgcc ? Utilities.patch ? Utilities.ChangeLog ? tests/LINUXgcc Index: ElementProperties.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Utilities/ElementProperties.h,v retrieving revision 1.13 diff -c -p -r1.13 ElementProperties.h *** ElementProperties.h 2000/04/27 18:30:38 1.13 --- ElementProperties.h 2001/03/15 06:57:32 *************** *** 54,60 **** --- 54,64 ---- // - specializations for basic C++ data types. //----------------------------------------------------------------------------- + //----------------------------------------------------------------------------- + // Include Files + //----------------------------------------------------------------------------- + #include "Utilities/PAssert.h" //----------------------------------------------------------------------------- // Index: Inform.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Utilities/Inform.h,v retrieving revision 1.27 diff -c -p -r1.27 Inform.h *** Inform.h 2000/06/14 16:40:09 1.27 --- Inform.h 2001/03/15 06:57:32 *************** public: *** 275,281 **** void print() { flush(); } void output() { flush(); } ! #if defined(__MWERKS__) && __MWERKS__ >= 0x2301 typedef std::ios_base::fmtflags FmtFlags_t; #else typedef long FmtFlags_t; --- 275,281 ---- void print() { flush(); } void output() { flush(); } ! #if (defined(__MWERKS__) && __MWERKS__ >= 0x2301) || __GLIBCPP__ >= 20001129 typedef std::ios_base::fmtflags FmtFlags_t; #else typedef long FmtFlags_t; Index: RefCountedBlockPtr.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Utilities/RefCountedBlockPtr.h,v retrieving revision 1.56 diff -c -p -r1.56 RefCountedBlockPtr.h *** RefCountedBlockPtr.h 2000/07/14 17:46:37 1.56 --- RefCountedBlockPtr.h 2001/03/15 06:57:33 *************** *** 51,56 **** --- 51,57 ---- #include #include + #include #include "Utilities/ElementProperties.h" #include "Utilities/RefCounted.h" Index: tests/delete_test1.cpp =================================================================== RCS file: /home/pooma/Repository/r2/src/Utilities/tests/delete_test1.cpp,v retrieving revision 1.6 diff -c -p -r1.6 delete_test1.cpp *** tests/delete_test1.cpp 2000/06/27 20:06:37 1.6 --- tests/delete_test1.cpp 2001/03/15 06:57:33 *************** void test(Pooma::Tester &t, *** 120,126 **** { const int size = num_elements; const int trials = num_trials; ! const int inc_size = 2.0 / delete_fraction; const bool verbose = t.verbose() && print_results; using std::endl; --- 120,126 ---- { const int size = num_elements; const int trials = num_trials; ! const int inc_size = static_cast(2.0 / delete_fraction); const bool verbose = t.verbose() && print_results; using std::endl; *************** void test(Pooma::Tester &t, *** 220,226 **** end = a.end(); while (pos != end) { ! Ret_t status = result_set.insert(*pos++); t.check(status.second); } } --- 220,226 ---- end = a.end(); while (pos != end) { ! Ret_t status = result_set.insert(static_cast::key_type>(*pos++)); t.check(status.second); } } Index: tests/find_most_common_test1.cpp =================================================================== RCS file: /home/pooma/Repository/r2/src/Utilities/tests/find_most_common_test1.cpp,v retrieving revision 1.1 diff -c -p -r1.1 find_most_common_test1.cpp *** tests/find_most_common_test1.cpp 2000/03/31 16:56:37 1.1 --- tests/find_most_common_test1.cpp 2001/03/15 06:57:33 *************** void test(Pooma::Tester &t, int numEleme *** 94,100 **** Pooma::Algorithms::find_most_common(v.begin(), v.end()); if (numElements == 0) ! t.check("zero length", mc, v.end()); else { int cmc, nmc = -1; --- 94,100 ---- Pooma::Algorithms::find_most_common(v.begin(), v.end()); if (numElements == 0) ! t.check ("zero length", mc == v.end()); else { int cmc, nmc = -1; From oldham at codesourcery.com Wed Mar 21 05:17:04 2001 From: oldham at codesourcery.com (Jeffrey Oldham) Date: Tue, 20 Mar 2001 21:17:04 -0800 Subject: [pooma-dev] RFA: Modify BlockDecomposed Example Files In-Reply-To: ; from allan@stokes.ca on Sat, Mar 17, 2001 at 03:17:59AM -0800 References: <20010314224333.B20645@codesourcery.com> Message-ID: <20010320211704.A13051@codesourcery.com> On Sat, Mar 17, 2001 at 03:17:59AM -0800, Allan Stokes wrote: > > I have to defer checking this until I'm doing more in a gcc env. KCC likes > it OK the way it was, and the only direct declarations are templates which > have no reason to be order dependent. I revisited this code to see if g++ was producing bad code. Preprocessing examples/Solvers/BlockDecomposed/FivePoint/FivePointSolve.cpp using g++ yields a use of "GuardedPatchEvaluator::evaluate" before the templatized class definition of "GuardedPatchEvaluator" appears. Is not this illegal code? > -----Original Message----- > From: Jeffrey Oldham [mailto:oldham at codesourcery.com] > Sent: Wednesday 14 March 2001 22:44 > To: pooma-dev at pooma.codesourcery.com > Subject: [pooma-dev] RFA: Modify BlockDecomposed Example Files > > > Are the attached changes to the Pooma examples/Solvers/BlockDecomposed > directory acceptable to add to the Pooma CVS tree? > > FivePoint/FivePointSolve.cpp: > > * Reorder the header files to fix a dependency problem. > > NinePoint/NinePointSolve.cpp: > > * Likewise. Thanks, Jeffrey D. Oldham oldham at codesourcery.com From oldham at codesourcery.com Wed Mar 21 05:21:16 2001 From: oldham at codesourcery.com (Jeffrey Oldham) Date: Tue, 20 Mar 2001 21:21:16 -0800 Subject: Patch: Modify BlockDecomposed Example Files Message-ID: <20010320212116.A13082@codesourcery.com> FivePoint/FivePointSolve.cpp: * Reorder the header files to fix a dependency problem. NinePoint/NinePointSolve.cpp: * Likewise. Reviewed by Mike. Tested on sequential Linux with gcc mainline Thanks, Jeffrey D. Oldham oldham at codesourcery.com -------------- next part -------------- Index: FivePoint/FivePointSolve.cpp =================================================================== RCS file: /home/pooma/Repository/r2/examples/Solvers/BlockDecomposed/FivePoint/FivePointSolve.cpp,v retrieving revision 1.2 diff -c -p -r1.2 FivePointSolve.cpp *** FivePoint/FivePointSolve.cpp 2000/07/27 22:32:27 1.2 --- FivePoint/FivePointSolve.cpp 2001/03/15 06:40:29 *************** private: *** 51,61 **** Layout layout_m; }; #include "FivePointJacobi.h" // new stuff #include "FivePointSymmetricGaussSeidel.h" // new stuff #include "FivePointIncompleteCholeski0.h" // new stuff #include "FivePointIncompleteCholeski1.h" // new stuff - #include "../Tools/ExtendedPatchEvaluator.h" #include "../Tools/NullPreconditioner.h" #include --- 51,61 ---- Layout layout_m; }; + #include "../Tools/ExtendedPatchEvaluator.h" #include "FivePointJacobi.h" // new stuff #include "FivePointSymmetricGaussSeidel.h" // new stuff #include "FivePointIncompleteCholeski0.h" // new stuff #include "FivePointIncompleteCholeski1.h" // new stuff #include "../Tools/NullPreconditioner.h" #include Index: NinePoint/NinePointSolve.cpp =================================================================== RCS file: /home/pooma/Repository/r2/examples/Solvers/BlockDecomposed/NinePoint/NinePointSolve.cpp,v retrieving revision 1.1 diff -c -p -r1.1 NinePointSolve.cpp *** NinePoint/NinePointSolve.cpp 2000/07/27 22:36:35 1.1 --- NinePoint/NinePointSolve.cpp 2001/03/15 06:40:29 *************** private: *** 51,62 **** Layout layout_m; }; #include "NinePointMatrix.h" // new stuff #include "NinePointJacobi.h" // new stuff #include "NinePointSymmetricGaussSeidel.h" // new stuff #include "NinePointIncompleteCholeski0.h" // new stuff #include "NinePointIncompleteCholeski1.h" // new stuff - #include "../Tools/ExtendedPatchEvaluator.h" #include "../Tools/NullPreconditioner.h" #include --- 51,62 ---- Layout layout_m; }; + #include "../Tools/ExtendedPatchEvaluator.h" #include "NinePointMatrix.h" // new stuff #include "NinePointJacobi.h" // new stuff #include "NinePointSymmetricGaussSeidel.h" // new stuff #include "NinePointIncompleteCholeski0.h" // new stuff #include "NinePointIncompleteCholeski1.h" // new stuff #include "../Tools/NullPreconditioner.h" #include From oldham at codesourcery.com Wed Mar 21 05:47:07 2001 From: oldham at codesourcery.com (Jeffrey Oldham) Date: Tue, 20 Mar 2001 21:47:07 -0800 Subject: Patch: Test Files Message-ID: <20010320214707.A13199@codesourcery.com> Previously proposed changes to Array/Test/ArrayTest.cpp, Shared/dclock.cpp, and Utilities/RefCounting/RefCountedBlockPtr/RefCountedBlockPtrTest.cpp were omitted. (Did we reach any consensus on portable dclock.cpp code?) Domain/Loc/Characteristics/LocCharacteristics.cpp: * Creating a Loc<1> from a scalar does not seem to be supported. Domain/NewDomain/Constructors/NewDomainConstructor.cpp: * Prepend iostream functions with "std::". Domain/Range/Constructors/RangeConstructor.cpp: * Prepend iostream functions with "std::". Domain/Range/Constructors/makefile: * Fix typo in main target from creating this makefile by copying. Engine/BrickEngine/BrickEngine/BrickEngineTest.cpp: * s/BaseDomain_t/Base_t/ Review by: Jim Crotinger Tested on sequential Linux with gcc mainline Thanks, Jeffrey D. Oldham oldham at codesourcery.com -------------- next part -------------- Index: Domain/Loc/Characteristics/LocCharacteristics.cpp =================================================================== RCS file: /home/pooma/Repository/r2/test/Domain/Loc/Characteristics/LocCharacteristics.cpp,v retrieving revision 1.9 diff -c -p -r1.9 LocCharacteristics.cpp *** Domain/Loc/Characteristics/LocCharacteristics.cpp 1999/03/09 17:04:55 1.9 --- Domain/Loc/Characteristics/LocCharacteristics.cpp 2001/03/15 06:27:55 *************** main(int argc, char *argv[]) { *** 133,139 **** cout << endl; ! Loc<1>a1 = 1; //Loc<1> b1(Loc<1>()); Loc<2> b2(a1,Loc<1>(2)); Loc<3> b3(b2,Loc<1>(3)); --- 133,139 ---- 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)); Index: Domain/NewDomain/Constructors/NewDomainConstructor.cpp =================================================================== RCS file: /home/pooma/Repository/r2/test/Domain/NewDomain/Constructors/NewDomainConstructor.cpp,v retrieving revision 1.5 diff -c -p -r1.5 NewDomainConstructor.cpp *** Domain/NewDomain/Constructors/NewDomainConstructor.cpp 1999/03/02 23:11:55 1.5 --- Domain/NewDomain/Constructors/NewDomainConstructor.cpp 2001/03/15 06:27:55 *************** void reportResults(int n, char *test, bo *** 16,35 **** { 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; } --- 16,35 ---- { char* statusString = "passed"; if(!testStatus) statusString = "failed"; ! std::cout << " Test " << std::setw(3) << n << ", " ! << std::setw(10) << test << ": " << statusString << "\n"; } void uncaughtErrorReport(const char *what, int n) { ! cerr << "\nAck! Caught assertion during test # " << n << ":" << std::endl; ! cerr << what << std::endl; } template Interval<1> testElement(const T &dom, int no) { //get the nth element of dom, and store it in a separte variable ! typename T::OneDomain_t singleElem = dom[no]; return singleElem; } *************** main(int argc, char *argv[]) { *** 57,87 **** 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)); --- 57,87 ---- bool testStatus; if ((argc > 1) && (!strcmp(argv[1],"-d"))) debug = 1; ! std::cout << "\n" ! << " ==============================================================\n" ! << " Domain test for Constructors on NewDomain object \n" ! << " ==============================================================\n" ! << std::endl; if (debug){ ! std::cout << "=========================DEBUG===================================" ! << std::endl; ! std::cout << std::endl; ! std::cout << "Starting domain test for Constructors on NewDomain object" ! << std::endl; ! std::cout << "A set of simple structs which tell how to combine." << std::endl; ! std::cout << std::endl; ! std::cout << " different Domain object together. TThey are named " << std::endl; ! std::cout << "NewDomain1 - NewDoamin7 and are templated on from 1 .. 7 " ! << std::endl; ! std::cout << "different domain types. If you have a domain as the last " ! << std::endl; ! std::cout << "argrment you must have a space between this argument and the" ! << std::endl; ! std::cout << "last >,NewDomain2,Loc<1> >::Type_t newdomain2; " ! << std::endl; } ! std::cout << std::endl; Loc<1> D1(1); Loc<1> D2(2); Range<2> R1(Interval<1>(5,10),Interval<1>(-1,100)); *************** main(int argc, char *argv[]) { *** 92,224 **** 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; ! } - - - - - - - - --- 92,215 ---- 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){ ! std::cout << "================================================================" ! << std::endl; ! std::cout << std::endl; ! std::cout << " NewDomain7,Range<2>,Loc<1>,Loc<2>,Interval<2>, Interval<2>,int>::combine(R1,R2,D1,newdomain2a,I1,I2,999) " << newdomain7a << std::endl; ! std::cout << " R1 " << R1 << std::endl; ! std::cout << " R2 " << R2 << std::endl; ! std::cout << " D1 " << D1 << std::endl; ! std::cout << " newdomain2a " << newdomain2a << std::endl; ! std::cout << " I1 " << I1 << std::endl; ! std::cout << " I2 " << I2 << std::endl; ! std::cout << " newdomain2 " << newdomain2 << std::endl; ! std::cout << " newdomain2a " << newdomain2a << std::endl; ! std::cout << " newdomain3 " << newdomain3 << std::endl; ! std::cout << " newdomain3a " << newdomain3a << std::endl; ! std::cout << " newdomain4 " << newdomain4 << std::endl; ! std::cout << " newdomain4a " << newdomain4a << std::endl; ! std::cout << " newdomain5 " << newdomain5 << std::endl; ! std::cout << " newdomain5a \n" << " " << newdomain5a << std::endl; ! std::cout << " newdomain6 \n " << " " << newdomain6 << std::endl; ! std::cout << " newdomain6a \n " << " " << newdomain6a << std::endl; ! std::cout << " newdomain7 \n " << " " << newdomain7 << std::endl; ! std::cout << " newdomain7a \n " << " " << newdomain7a << std::endl; ! std::cout << " newdomain2.dimensions " << newdomain2.dimensions << std::endl; ! std::cout << " newdomain3.dimensions " << newdomain3.dimensions << std::endl; ! std::cout << " newdomain4.dimensions " << newdomain4.dimensions << std::endl; ! std::cout << " newdomain5.dimensions " << newdomain5.dimensions << std::endl; ! std::cout << " newdomain6.dimensions " << newdomain6.dimensions << std::endl; ! std::cout << " newdomain7.dimensions " << newdomain7.dimensions << std::endl; ! std::cout << " newdomain2a.dimensions " << newdomain2a.dimensions << std::endl; ! std::cout << " newdomain3a.dimensions " << newdomain3a.dimensions << std::endl; ! std::cout << " newdomain4a.dimensions " << newdomain4a.dimensions << std::endl; ! std::cout << " newdomain5a.dimensions " << newdomain5a.dimensions << std::endl; ! std::cout << " newdomain6a.dimensions " << newdomain6a.dimensions << std::endl; ! std::cout << " newdomain7a.dimensions " << newdomain7a.dimensions << std::endl; ! std::cout << std::endl; ! std::cout << "================================================================" << std::endl; } ! std::cout << "Testing NewDomain<*> constructors methods:" << std::endl; ! std::cout << "----------------------------------------------------------" << std::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!" << std::endl; } ! std::cout << std::endl; } Index: Domain/Range/Constructors/RangeConstructor.cpp =================================================================== RCS file: /home/pooma/Repository/r2/test/Domain/Range/Constructors/RangeConstructor.cpp,v retrieving revision 1.6 diff -c -p -r1.6 RangeConstructor.cpp *** Domain/Range/Constructors/RangeConstructor.cpp 1999/03/02 23:12:23 1.6 --- Domain/Range/Constructors/RangeConstructor.cpp 2001/03/15 06:27:55 *************** void reportResults(int n, char *test, bo *** 18,31 **** { 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; } --- 18,31 ---- { char* statusString = "passed"; if(!testStatus) statusString = "failed"; ! std::cout << " Test " << std::setw(3) << n << ", " ! << std::setw(10) << test << ": " << statusString << "\n"; } void uncaughtErrorReport(const char *what, int n) { ! std::cerr << "\nAck! Caught assertion during test # " << n << ":" << std::endl; ! std::cerr << what << std::endl; } *************** main(int argc, char *argv[]) { *** 40,67 **** 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); --- 40,67 ---- if ((argc > 1) && (!strcmp(argv[1],"-d"))) debug = 1; ! std::cout << "\n" ! << " ==============================================================\n" ! << " Domain test for Constructors on Range object \n" ! << " ==============================================================\n" ! << std::endl; if (debug){ ! std::cout << "=========================DEBUG===================================" ! << std::endl; ! std::cout << "Range represents a sequence of integers [a,a+s,... b], with " ! << std::endl; ! std::cout << "endpoints a and b, and stride s. Each dimension is independent" ! << std::endl; ! std::cout << "of the other. The endpoints may be positive or negative." << std::endl; ! std::cout << std::endl; ! std::cout << "If you construct a Range with 2 dimensions [Range<2> a2i]" << std::endl; ! std::cout << "and only give it one value [Range<2> a2ia(1))] the second dimension" << std::endl; ! std::cout << "value will not be intitalized to 0 but will have ramdom junk. I" ! << std::endl; ! std::cout << "have not come up with a way to do a pass/fail on the feature." ! << std::endl; ! std::cout << "Float and Double values are truncated." << std::endl; } Range<1> a1(1); *************** main(int argc, char *argv[]) { *** 82,102 **** 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); --- 82,102 ---- if (debug){ ! std::cout << "Range<1> Length Constructor for test."<< std::endl; ! std::cout << " 1D default Range<1> a1(1) " << a1 << std::endl; ! std::cout << " 1D default Range<1> a2(-3) " << a2 << std::endl; ! std::cout << " 1D default Range<1> a3(3) " << a3 << std::endl; ! std::cout << " 1D default Range<1> a4(4) " << a4 << std::endl; ! std::cout << " 1D default Range<1> a5(-5) " << a5 << std::endl; ! std::cout << " 1D default Range<1> a6(6) " << a6 << std::endl; ! std::cout << " 1D default Range<1> a1i(1) " << a1i << std::endl; ! std::cout << " 1D default Range<1> a1ia(1,5) " << a1ia << std::endl; ! std::cout << " 1D default Range<1> a1ib(0,5) " << a1ib << std::endl; ! std::cout << " 1D default Range<1> a1ic(0,6,2) " << a1ic << std::endl; ! std::cout << " 1D default Range<1> a1id(2,8,-3) " << a1id << std::endl; ! std::cout << " 1D default Range<1> a1ie(0,10,2) " << a1ie << std::endl; ! std::cout << " 1D default Range<1> a1if(1,1001,100) " << a1if << std::endl; ! std::cout << std::endl; } Range<1> n1(-100); *************** main(int argc, char *argv[]) { *** 136,177 **** 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)); --- 136,177 ---- Range<6> FDR6(DI3,NI1a, DI2); if (debug){ ! std::cout << " 1D default Range<1> b1(a1if) " << b1 << std::endl; ! std::cout << " 2D default Range<2> b2(b1,a1) " << b2 << std::endl; ! std::cout << " 3D default Range<3> b3(b2,a3) " << b3 << std::endl; ! std::cout << " 4D default Range<4> b4(b3,a4) " << std::endl; ! std::cout << " " << b4 << std::endl; ! std::cout << " 5D default Range<5> b5(b4,Range<1>(1,5)) " << std::endl; ! std::cout << " " << b5 << std::endl; ! std::cout << " 6D default Range<6> b6(b5,a6) " << std::endl; ! std::cout << " " << b6 << std::endl; ! std::cout << " 1D Negative Range<1> n1(-100) " << n1 << std::endl; ! std::cout << " 2D Negative Range<2> n2(Range<1>(-100,100,10)," << std::endl; ! std::cout << " Range<1>(100,-100,10)) " << n2 << std::endl; ! std::cout << " 3D Negative Range<3> n3(n2,a1) " << std::endl; ! std::cout << " " << n3 << std::endl; ! ! std::cout << " 2D Mixed object Range<2> RL2(Loc<1> L1,Range<2>b1 " << std::endl; ! std::cout << " " << RL2 << std::endl; ! std::cout << " 3D Mixed object Range<3> RL3(RL1,L1) " << std::endl; ! std::cout << " " << RL3 << std::endl; ! std::cout << " 4D Mixed object Range<4> RL4(RL3,I1) = " << std::endl; ! std::cout << " " << RL4 << std::endl; ! std::cout << " 5D Mixed object Range<5> RL5(I2,RL3) " << std::endl; ! std::cout << " " << RL5 << std::endl; ! std::cout << " 2D Mixed object Negative Range<2> NRL2(NI1,Interval<1>(-6,0)) "<< std::endl; ! std::cout << " " << NRL2 << std::endl; ! std::cout << " 3D Mixed object Negative Range<3> NRL3(NRL2,NI1a) " << std::endl; ! std::cout << " " << NRL3 << std::endl; ! std::cout << " 5D Mixed object Negative Range<5> NRL5(NL1,NRL2,NI1a) " ! << std::endl; ! std::cout << " " << NRL5 << std::endl; ! std::cout << " 6D Mixed object DF Range<6> FDR6(DI3,NI1a, DI2) " ! << std::endl; ! std::cout << " " << FDR6 << std::endl; ! std::cout << "=========================END DEBUG============================" ! << std::endl; ! std::cout << std::endl; } try { testStatus = (a3 == Range<1>(3)); *************** main(int argc, char *argv[]) { *** 209,216 **** catch(const Pooma::Assertion &err) {uncaughtErrorReport(err.what(),testNumber); } catch(...) ! { cerr << "Unknown exception!" << endl; } ! cout << endl; Pooma::finalize(); } --- 209,216 ---- catch(const Pooma::Assertion &err) {uncaughtErrorReport(err.what(),testNumber); } catch(...) ! { std::cerr << "Unknown exception!" << std::endl; } ! std::cout << std::endl; Pooma::finalize(); } Index: Domain/Range/Constructors/makefile =================================================================== RCS file: /home/pooma/Repository/r2/test/Domain/Range/Constructors/makefile,v retrieving revision 1.2 diff -c -p -r1.2 makefile *** Domain/Range/Constructors/makefile 1998/10/25 00:08:47 1.2 --- Domain/Range/Constructors/makefile 2001/03/15 06:27:55 *************** include $(PROJECT_ROOT)/config/head.mk *** 6,11 **** default:: $(ODIR)/RangeConstructor ! $(ODIR)/LocOperations: $(ODIR)/RangeOperations.o $(LinkToSuite) include $(SHARED_ROOT)/tail.mk --- 6,11 ---- default:: $(ODIR)/RangeConstructor ! $(ODIR)/RangeConstructor: $(ODIR)/RangeConstructor.o $(LinkToSuite) include $(SHARED_ROOT)/tail.mk Index: Engine/BrickEngine/BrickEngine/BrickEngineTest.cpp =================================================================== RCS file: /home/pooma/Repository/r2/test/Engine/BrickEngine/BrickEngine/BrickEngineTest.cpp,v retrieving revision 1.18 diff -c -p -r1.18 BrickEngineTest.cpp *** Engine/BrickEngine/BrickEngine/BrickEngineTest.cpp 1999/03/25 19:03:21 1.18 --- Engine/BrickEngine/BrickEngine/BrickEngineTest.cpp 2001/03/15 06:27:56 *************** main(int argc, char* argv[]) { *** 269,275 **** ++testNumber; { ! typedef Engine3Df_t::BaseDomain_t Try_t; typedef Range<3> Correct_t; testStatus = TypeMatchTester::Result; } --- 269,275 ---- ++testNumber; { ! typedef Engine3Df_t::Base_t Try_t; typedef Range<3> Correct_t; testStatus = TypeMatchTester::Result; } From cummings at linkline.com Wed Mar 21 16:46:35 2001 From: cummings at linkline.com (Julian C. Cummings) Date: Wed, 21 Mar 2001 08:46:35 -0800 Subject: [pooma-dev] problems loading Visual Studio projects In-Reply-To: Message-ID: Hi Scott, Yes, this is the information I was working from. Unfortunately, the version of SSH that I have from DataFellows does not seem to be compatible with WinCVS. I tried to download SSH from ftp.ssh.com as suggested, but they have moved on to SSH2 and no longer offer SSH1 for Windows. I'm going to try to follow up on Allan's suggestions regarding OpenSSH under cygwin. Wish me luck! Julian C. -----Original Message----- From: Scott Haney [mailto:swhaney at earthlink.net] Sent: Tuesday, March 20, 2001 4:49 AM To: Poomadev Subject: Re: [pooma-dev] problems loading Visual Studio projects Hi Julian, There is a discussion about using WinCVS with SSH at: http://www.wincvs.org/ssh.html Scott From cummings at linkline.com Wed Mar 21 16:46:36 2001 From: cummings at linkline.com (Julian C. Cummings) Date: Wed, 21 Mar 2001 08:46:36 -0800 Subject: [pooma-dev] problems loading Visual Studio projects In-Reply-To: Message-ID: Allan, Back up a bit and tell me where to download the specific version of cygwin that you are using. Does it come with both ssh and cvs? Julian C. -----Original Message----- From: Allan Stokes [mailto:allan at stokes.ca] Sent: Monday, March 19, 2001 9:10 PM To: cummings at linkline.com; Poomadev Subject: RE: [pooma-dev] problems loading Visual Studio projects <<< Incidentally, are you working with the CVS repository in a Windows environment? If so, perhaps you could help me figure out how to get WinCVS and SSH to play nice together. I only have read-only access to the repository via my Windows machine right now. I was hoping to work with VS6 and Intel VTune (or perhaps gcc under cygwin) on my local machine, rather than logging in to a Unix machine at Caltech and working from there. If you know the secrets, could you please e-mail me instructions? >>> I have used several methods in the past, but I've haven't used WinCVS before. I don't see any reason why WinCVS would respect the usual settings. The easiest method recently is the new Cygwin. The version of Cygwin I'm using presently I downloaded under a directory named 1.8, supposing that means anything. It comes with a very up-to-date version of SSH: OpenSSH_2.3.0p1 My ENV settings are as follows: export CVSROOT=:ext:pooma:/home/pooma/Repository export CVS_RSH="/usr/bin/ssh" I put these in a file and activate them with the bash "source" command. In your USER directory (cygwin set me up under /home/administrator) add the .ssh directory with your Pooma public key identity. My identity files are called pooma and pooma.pub I also added into ~/.ssh/config this option block: Host pooma Hostname pooma.codesourcery.com EscapeChar none IdentityFile ~/.ssh/pooma User pooma If you have this working and your public key is set up at both ends, you can do this: $ ssh pooma Enter passphrase for RSA key 'allan at camel.wloo.nat' If it asks for a password instead of a passphrase, you're hosed. ssh -v -v pooma Will do the whole process again with everything of interest printed to the console. If you do enter the passphrase you'll be stuck at an empty prompt. Mark has cleverly set up cvs to do a forced "cvs server" command, so no shell games here. An empty prompt means it worked. As far as CVS is concerned, you just to get it to call the right SSH and to have the right ENV variables set at the time SSH is called. The crucial ENV var for Cygwin SSH is USER=your_path. There may be others, but these are set up correctly by default if you are working *within* the Cygwin bash shell. Well, I tried wincvs myself for ten minutes. Good luck. The SSH integration is minimal at best. First, you'll need to set your Windows path to include c:\cygwin\bin WinCVS uses the windows path to locate SSH. Next, your RSA identity needs to be c:\cygwin\home\administrator\.ssh\pooma (match to your w2k username and identity file). Finally, you'll need the patience of Job to determine what environment variables are configured (and what vars are required) when WinCVS invokes whatever SSH it finds in the PATH. The usual message "end of file from server" just means that _something_ wasn't correct. Allan -----Original Message----- From: Allan Stokes [mailto:allan at stokes.ca] Sent: Wednesday, March 14, 2001 1:26 PM To: Poomadev Subject: [pooma-dev] problems loading Visual Studio projects Hello everyone, I'm slowly mastering the mechanics of working with the Pooma tree. So far I have CVS working with write access and I was able to compile Pooma in a FreeBSD/gcc environment. The test code is producing errors in this environment, but that is the subject of another mail. Yesterday I began the process of getting Pooma to compile in my w2k environment. I upgraded myself to Intel 5.0 and then tried to load the VisualC++ workspaces into Visual Studio 6 for a test compile. The workspaces file (.dsw) load without error, but I end up with an empty workspace (no projects). I was working in the benchmark workspace at the time, so I thought I would just add maybe eight projects (.dsp files) into this workspace manually. When I try to load one of these project files into an empty workspace (I've also tried this with a virgin workspace) VS6 complains that the "project file was not generated by VS6" and offers to wrap the project file, a process which creates a new .dsp file (which I save under a new name). I can now load the new-and-improved .dsp project into my blank workspace, but my workspace project tree still shows (0) projects loaded. Recognizing that I'm in the land of Lilliput, I checked the VS menus and sure enough VS6 has added an option to the menu for me to build the project which I still can not see under my project tree. If I try to compile the phantom project via the menu option, I get complaints pertaining to NMAKE. Whoa, one problem at a time. Working in this environment a few weeks ago, but with Intel 4.5 installed instead, I was able to load and compile these same workspaces from the 2.3 Pooma off the internet. Either Intel 5.0 has "enhanced" Visual Studio, or something has changed in the structure of the .dsp files incorporated into the r2 checkout tree. If someone can send me a "works for me" against the r2 tree, then I can resume banging my head against the wall in my own corner of the room without concern that I'm duplicating effort. Allan From cummings at linkline.com Wed Mar 21 17:06:47 2001 From: cummings at linkline.com (Julian C. Cummings) Date: Wed, 21 Mar 2001 09:06:47 -0800 Subject: [pooma-dev] Patch: Test Files In-Reply-To: <20010320214707.A13199@codesourcery.com> Message-ID: Jeffrey, I'm a bit concerned about your changes to prepend std:: to uses of iostream. Jim raised the point that this may not yet be supported by all compilers in use. Also, this sort of change needs to be done in a universal way across the entire Pooma code base. Finally, as Jim noted, it might be better to go with specific using declarations at the top of .cpp files, rather than writing std:: everywhere. Did you ever address these points that Jim raised? I tend to agree with him on these things. Julian C. -----Original Message----- From: Jeffrey Oldham [mailto:oldham at codesourcery.com] Sent: Tuesday, March 20, 2001 9:47 PM To: pooma-dev at pooma.codesourcery.com Subject: [pooma-dev] Patch: Test Files Previously proposed changes to Array/Test/ArrayTest.cpp, Shared/dclock.cpp, and Utilities/RefCounting/RefCountedBlockPtr/RefCountedBlockPtrTest.cpp were omitted. (Did we reach any consensus on portable dclock.cpp code?) Domain/Loc/Characteristics/LocCharacteristics.cpp: * Creating a Loc<1> from a scalar does not seem to be supported. Domain/NewDomain/Constructors/NewDomainConstructor.cpp: * Prepend iostream functions with "std::". Domain/Range/Constructors/RangeConstructor.cpp: * Prepend iostream functions with "std::". Domain/Range/Constructors/makefile: * Fix typo in main target from creating this makefile by copying. Engine/BrickEngine/BrickEngine/BrickEngineTest.cpp: * s/BaseDomain_t/Base_t/ Review by: Jim Crotinger Tested on sequential Linux with gcc mainline Thanks, Jeffrey D. Oldham oldham at codesourcery.com From cummings at linkline.com Wed Mar 21 17:06:48 2001 From: cummings at linkline.com (Julian C. Cummings) Date: Wed, 21 Mar 2001 09:06:48 -0800 Subject: cvs commit messages Message-ID: Is anyone else getting many multiple copies of these cvs commit messages, or is it just me? Maybe something is wrong with the cvs setup? Julian C. -----Original Message----- From: pooma-cvs-return-80-cummings=linkline.com at pooma.codesourcery.com [mailto:pooma-cvs-return-80-cummings=linkline.com at pooma.codesourcery.com ] Sent: Tuesday, March 20, 2001 3:43 PM To: undisclosed-recipients: Subject: Update of /home/pooma/Repository/r2/src/Pooma/PETE In directory merlin.codesourcery.com:/tmp/cvs-serv18387/Pooma/PETE Subject: [pooma-cvs] Modified Files: AssertEquals.h Log Message: Domain/DomainTraits.Interval.h: * Add a static_cast to avoid a conversion problem. Evaluator/OpMask.h: * Modify a comment to avoid "multiline comment" warnings. Layout/Node.h: * Remove an extraneous '\' to avoid a "multiline comment" warning. Pooma/PETE/AssertEquals.h: * Modify to conform with previous changes to Pooma/PETE/Combiners.h. Author: oldham Date: Tue Mar 20 16:42:48 MST 2001 From mark at codesourcery.com Wed Mar 21 17:19:02 2001 From: mark at codesourcery.com (Mark Mitchell) Date: Wed, 21 Mar 2001 09:19:02 -0800 Subject: [pooma-dev] Patch: Test Files In-Reply-To: References: <20010320214707.A13199@codesourcery.com> Message-ID: <20010321091902T.mitchell@codesourcery.com> >>>>> "Julian" == Julian C Cummings writes: Julian> Jeffrey, Julian> I'm a bit concerned about your changes to prepend std:: to Julian> uses of iostream. Jim raised the point that this may not Julian> yet be supported by all compilers in use. Also, this sort Julian> of change needs to be done in a universal way across the Julian> entire Pooma code base. Finally, as Jim noted, it might Julian> be better to go with specific using declarations at the Julian> top of .cpp files, rather than writing std:: everywhere. Julian> Did you ever address these points that Jim raised? I tend Julian> to agree with him on these things. Me, too. We should definitely *not* put `std::' in everywhere. That assumes a compliant library, and relatively many compilers do not provide this. There should simply be: #if USING_STD_NAMESPACE using std::istream; ... #endif in the files that need it. -- Mark Mitchell mark at codesourcery.com CodeSourcery, LLC http://www.codesourcery.com From oldham at codesourcery.com Wed Mar 21 18:07:15 2001 From: oldham at codesourcery.com (Jeffrey Oldham) Date: Wed, 21 Mar 2001 10:07:15 -0800 Subject: [pooma-dev] Patch: Test Files In-Reply-To: ; from cummings@linkline.com on Wed, Mar 21, 2001 at 09:06:47AM -0800 References: <20010320214707.A13199@codesourcery.com> Message-ID: <20010321100715.C29493@codesourcery.com> On Wed, Mar 21, 2001 at 09:06:47AM -0800, Julian C. Cummings wrote: > Jeffrey, > > I'm a bit concerned about your changes to > prepend std:: to uses of iostream. Jim > raised the point that this may not yet be > supported by all compilers in use. Also, > this sort of change needs to be done in a > universal way across the entire Pooma code > base. Finally, as Jim noted, it might be > better to go with specific using declarations > at the top of .cpp files, rather than writing > std:: everywhere. Did you ever address these > points that Jim raised? I tend to agree with > him on these things. That was a mistake. I just reversed the changes to Domain/NewDomain/Constructors/NewDomainConstructor.cpp and Domain/Range/Constructors/RangeConstructor.cpp. I am just going to let the other changes drop. They are not important right now, especially considering the uncertainty whether any of the test code is important. Note the attached patch was _reversed_. Sorry, Jeffrey D. Oldham oldham at codesourcery.com > -----Original Message----- > From: Jeffrey Oldham [mailto:oldham at codesourcery.com] > Sent: Tuesday, March 20, 2001 9:47 PM > To: pooma-dev at pooma.codesourcery.com > Subject: [pooma-dev] Patch: Test Files > > > Previously proposed changes to Array/Test/ArrayTest.cpp, > Shared/dclock.cpp, and > Utilities/RefCounting/RefCountedBlockPtr/RefCountedBlockPtrTest.cpp > were omitted. (Did we reach any consensus on portable dclock.cpp > code?) > > Domain/Loc/Characteristics/LocCharacteristics.cpp: > > * Creating a Loc<1> from a scalar does not seem to be supported. > > Domain/NewDomain/Constructors/NewDomainConstructor.cpp: > > * Prepend iostream functions with "std::". > > Domain/Range/Constructors/RangeConstructor.cpp: > > * Prepend iostream functions with "std::". > > Domain/Range/Constructors/makefile: > > * Fix typo in main target from creating this makefile by copying. > > Engine/BrickEngine/BrickEngine/BrickEngineTest.cpp: > > * s/BaseDomain_t/Base_t/ > > Review by: Jim Crotinger > Tested on sequential Linux with gcc mainline -------------- next part -------------- Index: Domain/NewDomain/Constructors/NewDomainConstructor.cpp =================================================================== RCS file: /home/pooma/Repository/r2/test/Domain/NewDomain/Constructors/NewDomainConstructor.cpp,v retrieving revision 1.5 diff -c -p -r1.5 NewDomainConstructor.cpp *** Domain/NewDomain/Constructors/NewDomainConstructor.cpp 1999/03/02 23:11:55 1.5 --- Domain/NewDomain/Constructors/NewDomainConstructor.cpp 2001/03/15 06:27:55 *************** void reportResults(int n, char *test, bo *** 16,35 **** { 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; } --- 16,35 ---- { char* statusString = "passed"; if(!testStatus) statusString = "failed"; ! std::cout << " Test " << std::setw(3) << n << ", " ! << std::setw(10) << test << ": " << statusString << "\n"; } void uncaughtErrorReport(const char *what, int n) { ! cerr << "\nAck! Caught assertion during test # " << n << ":" << std::endl; ! cerr << what << std::endl; } template Interval<1> testElement(const T &dom, int no) { //get the nth element of dom, and store it in a separte variable ! typename T::OneDomain_t singleElem = dom[no]; return singleElem; } *************** main(int argc, char *argv[]) { *** 57,87 **** 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)); --- 57,87 ---- bool testStatus; if ((argc > 1) && (!strcmp(argv[1],"-d"))) debug = 1; ! std::cout << "\n" ! << " ==============================================================\n" ! << " Domain test for Constructors on NewDomain object \n" ! << " ==============================================================\n" ! << std::endl; if (debug){ ! std::cout << "=========================DEBUG===================================" ! << std::endl; ! std::cout << std::endl; ! std::cout << "Starting domain test for Constructors on NewDomain object" ! << std::endl; ! std::cout << "A set of simple structs which tell how to combine." << std::endl; ! std::cout << std::endl; ! std::cout << " different Domain object together. TThey are named " << std::endl; ! std::cout << "NewDomain1 - NewDoamin7 and are templated on from 1 .. 7 " ! << std::endl; ! std::cout << "different domain types. If you have a domain as the last " ! << std::endl; ! std::cout << "argrment you must have a space between this argument and the" ! << std::endl; ! std::cout << "last >,NewDomain2,Loc<1> >::Type_t newdomain2; " ! << std::endl; } ! std::cout << std::endl; Loc<1> D1(1); Loc<1> D2(2); Range<2> R1(Interval<1>(5,10),Interval<1>(-1,100)); *************** main(int argc, char *argv[]) { *** 92,224 **** 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; ! } - - - - - - - - --- 92,215 ---- 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){ ! std::cout << "================================================================" ! << std::endl; ! std::cout << std::endl; ! std::cout << " NewDomain7,Range<2>,Loc<1>,Loc<2>,Interval<2>, Interval<2>,int>::combine(R1,R2,D1,newdomain2a,I1,I2,999) " << newdomain7a << std::endl; ! std::cout << " R1 " << R1 << std::endl; ! std::cout << " R2 " << R2 << std::endl; ! std::cout << " D1 " << D1 << std::endl; ! std::cout << " newdomain2a " << newdomain2a << std::endl; ! std::cout << " I1 " << I1 << std::endl; ! std::cout << " I2 " << I2 << std::endl; ! std::cout << " newdomain2 " << newdomain2 << std::endl; ! std::cout << " newdomain2a " << newdomain2a << std::endl; ! std::cout << " newdomain3 " << newdomain3 << std::endl; ! std::cout << " newdomain3a " << newdomain3a << std::endl; ! std::cout << " newdomain4 " << newdomain4 << std::endl; ! std::cout << " newdomain4a " << newdomain4a << std::endl; ! std::cout << " newdomain5 " << newdomain5 << std::endl; ! std::cout << " newdomain5a \n" << " " << newdomain5a << std::endl; ! std::cout << " newdomain6 \n " << " " << newdomain6 << std::endl; ! std::cout << " newdomain6a \n " << " " << newdomain6a << std::endl; ! std::cout << " newdomain7 \n " << " " << newdomain7 << std::endl; ! std::cout << " newdomain7a \n " << " " << newdomain7a << std::endl; ! std::cout << " newdomain2.dimensions " << newdomain2.dimensions << std::endl; ! std::cout << " newdomain3.dimensions " << newdomain3.dimensions << std::endl; ! std::cout << " newdomain4.dimensions " << newdomain4.dimensions << std::endl; ! std::cout << " newdomain5.dimensions " << newdomain5.dimensions << std::endl; ! std::cout << " newdomain6.dimensions " << newdomain6.dimensions << std::endl; ! std::cout << " newdomain7.dimensions " << newdomain7.dimensions << std::endl; ! std::cout << " newdomain2a.dimensions " << newdomain2a.dimensions << std::endl; ! std::cout << " newdomain3a.dimensions " << newdomain3a.dimensions << std::endl; ! std::cout << " newdomain4a.dimensions " << newdomain4a.dimensions << std::endl; ! std::cout << " newdomain5a.dimensions " << newdomain5a.dimensions << std::endl; ! std::cout << " newdomain6a.dimensions " << newdomain6a.dimensions << std::endl; ! std::cout << " newdomain7a.dimensions " << newdomain7a.dimensions << std::endl; ! std::cout << std::endl; ! std::cout << "================================================================" << std::endl; } ! std::cout << "Testing NewDomain<*> constructors methods:" << std::endl; ! std::cout << "----------------------------------------------------------" << std::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!" << std::endl; } ! std::cout << std::endl; } Index: Domain/Range/Constructors/RangeConstructor.cpp =================================================================== RCS file: /home/pooma/Repository/r2/test/Domain/Range/Constructors/RangeConstructor.cpp,v retrieving revision 1.6 diff -c -p -r1.6 RangeConstructor.cpp *** Domain/Range/Constructors/RangeConstructor.cpp 1999/03/02 23:12:23 1.6 --- Domain/Range/Constructors/RangeConstructor.cpp 2001/03/15 06:27:55 *************** void reportResults(int n, char *test, bo *** 18,31 **** { 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; } --- 18,31 ---- { char* statusString = "passed"; if(!testStatus) statusString = "failed"; ! std::cout << " Test " << std::setw(3) << n << ", " ! << std::setw(10) << test << ": " << statusString << "\n"; } void uncaughtErrorReport(const char *what, int n) { ! std::cerr << "\nAck! Caught assertion during test # " << n << ":" << std::endl; ! std::cerr << what << std::endl; } *************** main(int argc, char *argv[]) { *** 40,67 **** 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); --- 40,67 ---- if ((argc > 1) && (!strcmp(argv[1],"-d"))) debug = 1; ! std::cout << "\n" ! << " ==============================================================\n" ! << " Domain test for Constructors on Range object \n" ! << " ==============================================================\n" ! << std::endl; if (debug){ ! std::cout << "=========================DEBUG===================================" ! << std::endl; ! std::cout << "Range represents a sequence of integers [a,a+s,... b], with " ! << std::endl; ! std::cout << "endpoints a and b, and stride s. Each dimension is independent" ! << std::endl; ! std::cout << "of the other. The endpoints may be positive or negative." << std::endl; ! std::cout << std::endl; ! std::cout << "If you construct a Range with 2 dimensions [Range<2> a2i]" << std::endl; ! std::cout << "and only give it one value [Range<2> a2ia(1))] the second dimension" << std::endl; ! std::cout << "value will not be intitalized to 0 but will have ramdom junk. I" ! << std::endl; ! std::cout << "have not come up with a way to do a pass/fail on the feature." ! << std::endl; ! std::cout << "Float and Double values are truncated." << std::endl; } Range<1> a1(1); *************** main(int argc, char *argv[]) { *** 82,102 **** 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); --- 82,102 ---- if (debug){ ! std::cout << "Range<1> Length Constructor for test."<< std::endl; ! std::cout << " 1D default Range<1> a1(1) " << a1 << std::endl; ! std::cout << " 1D default Range<1> a2(-3) " << a2 << std::endl; ! std::cout << " 1D default Range<1> a3(3) " << a3 << std::endl; ! std::cout << " 1D default Range<1> a4(4) " << a4 << std::endl; ! std::cout << " 1D default Range<1> a5(-5) " << a5 << std::endl; ! std::cout << " 1D default Range<1> a6(6) " << a6 << std::endl; ! std::cout << " 1D default Range<1> a1i(1) " << a1i << std::endl; ! std::cout << " 1D default Range<1> a1ia(1,5) " << a1ia << std::endl; ! std::cout << " 1D default Range<1> a1ib(0,5) " << a1ib << std::endl; ! std::cout << " 1D default Range<1> a1ic(0,6,2) " << a1ic << std::endl; ! std::cout << " 1D default Range<1> a1id(2,8,-3) " << a1id << std::endl; ! std::cout << " 1D default Range<1> a1ie(0,10,2) " << a1ie << std::endl; ! std::cout << " 1D default Range<1> a1if(1,1001,100) " << a1if << std::endl; ! std::cout << std::endl; } Range<1> n1(-100); *************** main(int argc, char *argv[]) { *** 136,177 **** 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)); --- 136,177 ---- Range<6> FDR6(DI3,NI1a, DI2); if (debug){ ! std::cout << " 1D default Range<1> b1(a1if) " << b1 << std::endl; ! std::cout << " 2D default Range<2> b2(b1,a1) " << b2 << std::endl; ! std::cout << " 3D default Range<3> b3(b2,a3) " << b3 << std::endl; ! std::cout << " 4D default Range<4> b4(b3,a4) " << std::endl; ! std::cout << " " << b4 << std::endl; ! std::cout << " 5D default Range<5> b5(b4,Range<1>(1,5)) " << std::endl; ! std::cout << " " << b5 << std::endl; ! std::cout << " 6D default Range<6> b6(b5,a6) " << std::endl; ! std::cout << " " << b6 << std::endl; ! std::cout << " 1D Negative Range<1> n1(-100) " << n1 << std::endl; ! std::cout << " 2D Negative Range<2> n2(Range<1>(-100,100,10)," << std::endl; ! std::cout << " Range<1>(100,-100,10)) " << n2 << std::endl; ! std::cout << " 3D Negative Range<3> n3(n2,a1) " << std::endl; ! std::cout << " " << n3 << std::endl; ! ! std::cout << " 2D Mixed object Range<2> RL2(Loc<1> L1,Range<2>b1 " << std::endl; ! std::cout << " " << RL2 << std::endl; ! std::cout << " 3D Mixed object Range<3> RL3(RL1,L1) " << std::endl; ! std::cout << " " << RL3 << std::endl; ! std::cout << " 4D Mixed object Range<4> RL4(RL3,I1) = " << std::endl; ! std::cout << " " << RL4 << std::endl; ! std::cout << " 5D Mixed object Range<5> RL5(I2,RL3) " << std::endl; ! std::cout << " " << RL5 << std::endl; ! std::cout << " 2D Mixed object Negative Range<2> NRL2(NI1,Interval<1>(-6,0)) "<< std::endl; ! std::cout << " " << NRL2 << std::endl; ! std::cout << " 3D Mixed object Negative Range<3> NRL3(NRL2,NI1a) " << std::endl; ! std::cout << " " << NRL3 << std::endl; ! std::cout << " 5D Mixed object Negative Range<5> NRL5(NL1,NRL2,NI1a) " ! << std::endl; ! std::cout << " " << NRL5 << std::endl; ! std::cout << " 6D Mixed object DF Range<6> FDR6(DI3,NI1a, DI2) " ! << std::endl; ! std::cout << " " << FDR6 << std::endl; ! std::cout << "=========================END DEBUG============================" ! << std::endl; ! std::cout << std::endl; } try { testStatus = (a3 == Range<1>(3)); *************** main(int argc, char *argv[]) { *** 209,216 **** catch(const Pooma::Assertion &err) {uncaughtErrorReport(err.what(),testNumber); } catch(...) ! { cerr << "Unknown exception!" << endl; } ! cout << endl; Pooma::finalize(); } --- 209,216 ---- catch(const Pooma::Assertion &err) {uncaughtErrorReport(err.what(),testNumber); } catch(...) ! { std::cerr << "Unknown exception!" << std::endl; } ! std::cout << std::endl; Pooma::finalize(); } From oldham at codesourcery.com Wed Mar 21 18:31:24 2001 From: oldham at codesourcery.com (Jeffrey Oldham) Date: Wed, 21 Mar 2001 10:31:24 -0800 Subject: Tutorials's PDF Version Message-ID: <200103211831.KAA29693@oz.codesourcery.com> http://www.acl.lanl.gov/pooma/html/ has a link to a PDF version of the tutorials, but the PDF file omits tutorial 5. How was this PDF file created? Is there a makefile? Are the source files for the PDF file and the HTML tutorials the same? Are these the .html and .gif files in r2/docs? Today, I hope to submit a few typographical fixes to the tutorals. Am I right in assuming that the tutorials are important enough to fix small mistakes, at least in the short term? Thanks, Jeffrey D. Oldham oldham at codesourcery.com From swhaney at earthlink.net Wed Mar 21 18:50:33 2001 From: swhaney at earthlink.net (Scott Haney) Date: Wed, 21 Mar 2001 11:50:33 -0700 Subject: [pooma-dev] Tutorials's PDF Version In-Reply-To: <200103211831.KAA29693@oz.codesourcery.com> Message-ID: On 3/21/01 11:31 AM, "Jeffrey Oldham" wrote: > http://www.acl.lanl.gov/pooma/html/ has a link to a PDF > version of the tutorials, but the PDF file omits tutorial 5. How was > this PDF file created? Is there a makefile? Are the source files for > the PDF file and the HTML tutorials the same? Are these the .html and > .gif files in r2/docs? > > Today, I hope to submit a few typographical fixes to the > tutorals. Am I right in assuming that the tutorials are important > enough to fix small mistakes, at least in the short term? Hi Jeffrey, The PDF was generated by Adobe Acrobat from the HTML. It isn't essential to keep this up to date as the HTML evolves. I will figure out how to generate the PDF for th future. No idea why tutorial 5 isn't included. I believe that fixing the tutorials is important. One note: please take care to either use an HTML editor like Dreamweaver that doesn't mangle the HTML or change the HML directly. Otherwise, it is a nightmare to merge changes. Scott -- Proximation LLC 2960 Rodeo Park Drive West Santa Fe, NM 87505 Voice: (505) 424-3809 x101 FAX: (505) 438-4161 From oldham at codesourcery.com Wed Mar 21 20:42:49 2001 From: oldham at codesourcery.com (Jeffrey Oldham) Date: Wed, 21 Mar 2001 12:42:49 -0800 Subject: [RFA]: Tutorial Typographical Changes Message-ID: <20010321124249.A29937@codesourcery.com> Attached are proposed changes to some of the Pooma tutorials in r2/docs. Most are minor typographical changes. More questionable changes are annotated with "?" in the left column below. OK to commit? Wed Mar 21 12:03:54 2001 Jeffrey D. Oldham * background.html (struct AddOp): Match parameter name with parameter use. (struct MulOp): Likewise. * tut-02.html: Add several missing spaces. ? (RBJacobi): Change array's name to match previous line. (Periodic Boundary Conditions): Fix line numbers for ApplyPeriodic. * tut-04.html: Move sentence regarding component forwarding from next paragraph to preceding paragraph concerning component forwarding. Remove an extra space and an extraneous comma. Add a missing parenthesis. Fix array's name to match the other text. ? Emphasize "ghost," which is implicitly defined. ? Reword last sentence to de\"{e}mphasize Pooma developers' programming expertise. (accumulateWithLoop): Substitute "first0" and "last0" for "f0" and "l0". "l0" looks like the number 10. Remove some extraneous words. * tut-06.html: "Recurring," not "recursing." * tut-07.html: Remove extraneous word. Fix a comma. Fix capitalization. Remove one of double word. Add space between closing ">" in nested template. ? s/VectorFace/VectorFaceRCTag/g Change expression font to typewriter. s/>/
  struct AddOp
  {
!     static inline double apply(const double & left, const double & y)
      {
          return x + y;
      }
--- 761,767 ----
  
  struct AddOp
  {
!     static inline double apply(const double & x, const double & y)
      {
          return x + y;
      }
*************** struct AddOp
*** 769,775 ****
  
  struct MulOp
  {
!     static inline double apply(const double & left, const double & y)
      {
          return x * y;
      }
--- 769,775 ----
  
  struct MulOp
  {
!     static inline double apply(const double & x, const double & y)
      {
          return x * y;
      }
Index: tut-02.html
===================================================================
RCS file: /home/pooma/Repository/r2/docs/tut-02.html,v
retrieving revision 1.1
diff -c -p -r1.1 tut-02.html
*** tut-02.html	2001/03/19 16:11:13	1.1
--- tut-02.html	2001/03/21 19:59:59
*************** objects in some way.
*** 445,451 ****
  

In POOMA, that way is to use a 2-dimensional Interval or Range instead of a pair of 1-dimensional Intervals or ! Ranges. A 2-dimensionalInterval is just the cross-product of its 1-dimensional constituents: it specifies a dense rectangular patch of an array. Similarly, a 2-dimensional Range is a generalization of the red or black squares --- 445,451 ----

In POOMA, that way is to use a 2-dimensional Interval or Range instead of a pair of 1-dimensional Intervals or ! Ranges. A 2-dimensional Interval is just the cross-product of its 1-dimensional constituents: it specifies a dense rectangular patch of an array. Similarly, a 2-dimensional Range is a generalization of the red or black squares *************** need not have the same spacing along dif *** 455,461 ****

An N-dimensionalInterval is declared in the same way as its 1-dimensional cousin. An N-dimensional Interval is usually initialized by giving its ! constructor N 1-dimensionalIntervals as arguments, as shown in the following example:

--- 455,461 ----
  

An N-dimensionalInterval is declared in the same way as its 1-dimensional cousin. An N-dimensional Interval is usually initialized by giving its ! constructor N 1-dimensional Intervals as arguments, as shown in the following example:

*************** using 2-dimensional subscripting:
*** 537,543 ****
  32
  33      // The array we'll be solving for.
  34      Array<2> V(guarded);
! 35      x = 0.0;
  36
  37      // The right hand side of the equation.
  38      Array<2> b(calc);
--- 537,543 ----
  32
  33      // The array we'll be solving for.
  34      Array<2> V(guarded);
! 35      V = 0.0;
  36
  37      // The right hand side of the equation.
  38      Array<2> b(calc);
*************** used to ensure zero boundary conditions.
*** 577,584 ****
  condition could be represented equally well by assigning values to
  these padding elements.
  
! 

UsingInterval objects that run from 1 to N-2 to ! specify the dimensions of theInterval object calc defined on line 28 means that when the array b is defined (line 38), its legal indices also run from 1 to N-2 along each axis. While POOMA uses 0..N-1 indexing by --- 577,584 ---- condition could be represented equally well by assigning values to these padding elements. !

Using Interval objects that run from 1 to N-2 to ! specify the dimensions of the Interval object calc defined on line 28 means that when the array b is defined (line 38), its legal indices also run from 1 to N-2 along each axis. While POOMA uses 0..N-1 indexing by *************** either axis are padding, and are to be o *** 632,638 **** iteration.

The function that actually updates the periodic boundary conditions ! is called ApplyPeriodic(), and is shown on lines 20-28 below. The key to understanding this code is that when a "naked" integer is used to subscript a POOMA array, the result of that subscripting operation is reduced by one dimension in relation to that --- 632,638 ---- iteration.

The function that actually updates the periodic boundary conditions ! is called ApplyPeriodic(), and is shown on lines 20-33 below. The key to understanding this code is that when a "naked" integer is used to subscript a POOMA array, the result of that subscripting operation is reduced by one dimension in relation to that *************** point yields an Array with just *** 650,656 **** zero-dimensional Array (at least not in this release of POOMA), which is what the Loc<2> would have returned. The reduction in rank has to come from compile-time information, so ! Loc and integers reduce dimensionality, butInterval and Range do not.

--- 650,656 ----
  zero-dimensional Array (at least not in this release of
  POOMA), which is what the Loc<2> would have returned.
  The reduction in rank has to come from compile-time information, so
! Loc and integers reduce dimensionality, but Interval
  and Range do not.
  
  
*************** this, using the declarations:
*** 788,794 ****
  
  
      
!       Taking a view using anInterval
      
        
a(I)
--- 788,794 ---- ! Taking a view using an Interval
a(I)
*************** this, using the declarations: *** 833,839 **** ! Taking a read-only view using anInterval
a.read(I)
--- 833,839 ---- ! Taking a read-only view using an Interval
a.read(I)
Index: tut-04.html =================================================================== RCS file: /home/pooma/Repository/r2/docs/tut-04.html,v retrieving revision 1.1 diff -c -p -r1.1 tut-04.html *** tut-04.html 2001/03/19 16:11:14 1.1 --- tut-04.html 2001/03/21 20:00:00 *************** supported. Please contact pooma-devel at lanl.gov for information on using other, more complicated types. !

The Array::comp() method used on line 16 does ! component forwarding. The expression rays.comp(2) returns an Array<double> that supports writing into the second component of each vector element of rays. This is a data-parallel --- 404,411 ---- href="mailto:pooma-devel at lanl.gov">pooma-devel at lanl.gov for information on using other, more complicated types. !

The Array::comp() method used on line 16 does component forwarding. The expression rays.comp(2) returns an Array<double> that supports writing into the second component of each vector element of rays. This is a data-parallel *************** statement that works in a way analogous *** 413,421 **** except that the POOMA evaluator will calculate patches in parallel. Thus, if a program had an array of tensors T, it could change the element in the 0th row, 1st column with T.comp(0, ! 1). Note that, unlike Array, both ! Vector and Tensor always index from ! zero.

Line 24 shows that, as expected, the ith component of a Vector V can be accessed for both --- 413,422 ---- except that the POOMA evaluator will calculate patches in parallel. Thus, if a program had an array of tensors T, it could change the element in the 0th row, 1st column with T.comp(0, ! 1). Note that, unlike Array, both Vector and ! Tensor always index from zero. Component forwarding is ! intimately related to the notion of component views, which are ! discussed below.

Line 24 shows that, as expected, the ith component of a Vector V can be accessed for both *************** reading and writing using the syntax rays(i)(0) returns the ith element of the Vector rays, while the second subscript returns the zeroth component of that vector. - Component forwarding is intimately related to the notion of component - views, which are discussed below.

Line 28 shows that Vectors can be initialized with Size element values. Similarly, instances of --- 425,430 ---- *************** as are the following named functions on *** 508,524 **** (i,j) of the transpose is equal to element (j,i) of the input tensor t. !

template<class OutputEngineTag, int D, class T, class EngineTag>
Tensor<D,T,OutputEngineTag> &symmetrize(Tensor<D,T,E> &t)
:
Returns a tensor of type ! Tensor<D,T,E>, applying a n appropriate symmetrizing operation to convert from the symmetry of the input EngineTag (for example, Full) to the symmetry of the OutputEngineTag (for example, ! Antisymmetric. This is invoked using explicit template instantiation for the desired OutputEngineTag. For example:
! Tensor>2,double,Full> t(1.0, 2.0, 3.0, 4.0);
! Tensor>2,double,Antisymmetric> at = symmetrize<Antisymmetric>(t);
  std::cout << " t = " << t << std::endl;
  std::cout << "at = " << at << std::endl;
  
--- 507,523 ---- (i,j) of the transpose is equal to element (j,i) of the input tensor t. !

template<class OutputEngineTag, int D, class T, class E>
Tensor<D,T,OutputEngineTag> &symmetrize(Tensor<D,T,E> &t)
:
Returns a tensor of type ! Tensor<D,T,E>, applying an appropriate symmetrizing operation to convert from the symmetry of the input EngineTag (for example, Full) to the symmetry of the OutputEngineTag (for example, ! Antisymmetric). This is invoked using explicit template instantiation for the desired OutputEngineTag. For example:
! Tensor<2,double,Full> t(1.0, 2.0, 3.0, 4.0);
! Tensor<2,double,Antisymmetric> at = symmetrize<Antisymmetric>(t);
  std::cout << " t = " << t << std::endl;
  std::cout << "at = " << at << std::endl;
  
*************** via matrix-matrix product of the two arg *** 547,553 **** These functions also operate on Arrays of Tensor ! and Vector elements (and DynamicArrays, and Fields.)

Lines 37-39 show construction of a diagonal tensor using the Tensor class with Diagonal for the EngineTag --- 546,552 ---- These functions also operate on Arrays of Tensor ! and Vector elements (and DynamicArrays and Fields).

Lines 37-39 show construction of a diagonal tensor using the Tensor class with Diagonal for the EngineTag *************** like arrays of any other type. *** 568,574 ****

Accumulation operators such as operator*=() acting on Tensor<D,T,EngineTag> may result in a Tensor having ! different symmetry (different EngineTag than what you are accumulating into. For example,

  Tensor<2,double,Antisymmetric> t1, t2;
  // ... assign values
--- 567,573 ----
  
  

Accumulation operators such as operator*=() acting on Tensor<D,T,EngineTag> may result in a Tensor having ! different symmetry (different EngineTag than what you are accumulating into). For example,

  Tensor<2,double,Antisymmetric> t1, t2;
  // ... assign values
*************** Array< 2, double, MultiPatch<Unifo
*** 611,617 ****
  logical domain of the array being created.  The 10×10
  Loc is then used in the UniformGridLayout
  declaration to specify that the total domain is to be managed using a
! total of 100 patches.  When the Array a is
  finally declared, Array's third template parameter is
  explicitly instantiated using MultiPatch, and
  the layout object layout is used as a constructor parameter.
--- 610,616 ----
  logical domain of the array being created.  The 10×10
  Loc is then used in the UniformGridLayout
  declaration to specify that the total domain is to be managed using a
! total of 100 patches.  When the Array A is
  finally declared, Array's third template parameter is
  explicitly instantiated using MultiPatch, and
  the layout object layout is used as a constructor parameter.
*************** patch. As the overhead for evaluating a 
*** 752,758 ****
  small sub-patch evaluations hurt efficiency.
  
  

One mechanism for fixing this problem is to introduce ! guard (or ghost) layers. This done by having the individual patches overlap slightly. Each patch still "owns" the same data as before, but surrounds that data with a layer of guards. These guards duplicate data that is owned by other patches, and can only be read --- 751,757 ---- small sub-patch evaluations hurt efficiency.

One mechanism for fixing this problem is to introduce ! guard (or ghost) layers. This done by having the individual patches overlap slightly. Each patch still "owns" the same data as before, but surrounds that data with a layer of guards. These guards duplicate data that is owned by other patches, and can only be read *************** glossed over, since the main intent of t *** 815,829 **** intermediate or advanced users of the library can tailor it to their needs. !

The most common array layout in POOMA is called a brick ! layout, and is signaled by the use of the class Brick as an ! engine specifier in template instantiation. Conceptually, a brick is ! a dense, rectangular patch of multi-dimensional space, such as the ! area [0..10]×[0..10]. Programs written by the typical user ! access the elements of bricks using nested loops, the indices of which ! sweep through the brick's extent along a particular axis. Programs ! written by POOMA's developers use more complicated access ! loops in order to take full advantage of cache behavior.

The three functions accumulateWithLoop() defined below are the guts of the general-purpose adding routine that we will build up --- 814,828 ---- intermediate or advanced users of the library can tailor it to their needs. !

The most common array layout in POOMA is called a brick layout, and ! is signaled by the use of the class Brick as an engine ! specifier in template instantiation. Conceptually, a brick is a ! dense, rectangular patch of multi-dimensional space, such as the area ! [0..10]×[0..10]. Programs written by the typical user access ! the elements of bricks using nested loops, the indices of which sweep ! through the brick's extent along a particular axis. POOMA code uses ! more complicated access loops in order to take full advantage of cache ! behavior.

The three functions accumulateWithLoop() defined below are the guts of the general-purpose adding routine that we will build up *************** inline T accumulateWithLoop( *** 844,851 **** const ConstArray<1,T,E>& x ){ T sum = 0; ! int f0 = x.first(0), l0 = x.last(0); ! for (int i0=f0; i0<=l0; ++i0) sum += x(i0); return sum; } --- 843,850 ---- const ConstArray<1,T,E>& x ){ T sum = 0; ! int first0 = x.first(0), last0 = x.last(0); ! for (int i0=first0; i0<=last0; ++i0) sum += x(i0); return sum; } *************** inline T accumulateWithLoop( *** 855,864 **** const ConstArray<2,T,E>& x ){ T sum = 0; ! int f0 = x.first(0), f1 = x.first(1); ! int l0 = x.last(0), l1 = x.last(1); for (int i1=f1; i1<=l1; ++i1) ! for (int i0=f0; i0<=l0; ++i0) sum += x(i0, i1); return sum; } --- 854,863 ---- const ConstArray<2,T,E>& x ){ T sum = 0; ! int first0 = x.first(0), f1 = x.first(1); ! int last0 = x.last(0), l1 = x.last(1); for (int i1=f1; i1<=l1; ++i1) ! for (int i0=first0; i0<=last0; ++i0) sum += x(i0, i1); return sum; } *************** inline T accumulateWithLoop( *** 868,878 **** const ConstArray<3,T,E>& x ){ T sum = 0; ! int f0 = x.first(0), f1 = x.first(1), f2 = x.first(2); ! int l0 = x.last(0), l1 = x.last(1), l2 = x.last(2); for (int i2=f2; i2<=l2; ++i2) for (int i1=f1; i1<=l1; ++i1) ! for (int i0=f0; i0<=l0; ++i0) sum += x(i0, i1, i2); return sum; } --- 867,877 ---- const ConstArray<3,T,E>& x ){ T sum = 0; ! int first0 = x.first(0), f1 = x.first(1), f2 = x.first(2); ! int last0 = x.last(0), l1 = x.last(1), l2 = x.last(2); for (int i2=f2; i2<=l2; ++i2) for (int i1=f1; i1<=l1; ++i1) ! for (int i0=first0; i0<=last0; ++i0) sum += x(i0, i1, i2); return sum; } *************** T accumulate( *** 894,900 **** }

!

This function just calls through to whichever version of accumulateWithLoop() handles arrays of dimension D. Since accumulateWithLoop() is an inline function, this one extra function call will be eliminated by the compiler when --- 893,899 ---- }

!

This function just calls whichever version of accumulateWithLoop() handles arrays of dimension D. Since accumulateWithLoop() is an inline function, this one extra function call will be eliminated by the compiler when Index: tut-06.html =================================================================== RCS file: /home/pooma/Repository/r2/docs/tut-06.html,v retrieving revision 1.1 diff -c -p -r1.1 tut-06.html *** tut-06.html 2001/03/19 16:11:14 1.1 --- tut-06.html 2001/03/21 20:00:01 *************** in the <math.h> header file.) *** 215,221 ****

The second version of fft() does the real number-crunching. If the computation has reached its final stage, odd and even elements are combined directly (lines 106-111). If the ! computation is still recursing, the elements are shuffled, a half-sized transform is applied on each subsection, and the results are combined (lines 100-102). All of these operations use indirect addressing to move data values around. Most of the rest of the --- 215,221 ----

The second version of fft() does the real number-crunching. If the computation has reached its final stage, odd and even elements are combined directly (lines 106-111). If the ! computation is still recurring, the elements are shuffled, a half-sized transform is applied on each subsection, and the results are combined (lines 100-102). All of these operations use indirect addressing to move data values around. Most of the rest of the Index: tut-07.html =================================================================== RCS file: /home/pooma/Repository/r2/docs/tut-07.html,v retrieving revision 1.1 diff -c -p -r1.1 tut-07.html *** tut-07.html 2001/03/19 16:11:14 1.1 --- tut-07.html 2001/03/21 20:00:02 *************** class RectilinearCentering *** 339,345 ****

The RectilinearCenteringTag template parameter can be ! instantiated using a class whose centerings which are defined componentwise. This means that each component of a multicomponent field element type such as Vector or Tensor can have its own independent centering position. The value of the Boolean --- 339,345 ----

The RectilinearCenteringTag template parameter can be ! instantiated using a class whose centerings are defined componentwise. This means that each component of a multicomponent field element type such as Vector or Tensor can have its own independent centering position. The value of the Boolean *************** mesh with complete set of centering poin *** 426,432 ****

As an example of componentwise centering, consider ! RectilinearCentering<2,VectorFaceRCTag<2>>. The Y components of a field element of Vector type are centered on the faces perpendicular to the Y axis, while the X components are centered on the faces perpendicular to --- 426,432 ----

As an example of componentwise centering, consider ! RectilinearCentering<2,VectorFaceRCTag<2> >. The Y components of a field element of Vector type are centered on the faces perpendicular to the Y axis, while the X components are centered on the faces perpendicular to *************** WIDTH="451"> *** 448,454 **** Figure 4: Example of componentwise centering, showing ! RectilinearCentering<2,VectorFace<2>> --- 448,454 ---- Figure 4: Example of componentwise centering, showing ! RectilinearCentering<2,VectorFaceRCTag<2>> *************** WIDTH="451"> *** 457,463 ****

A Note on Allocation

For componentwise rectilinear centerings such as ! RectilinearCentering<2,VectorFace<2> >, POOMA currently allocates Field domains (and Array domains in the associated DiscreteGeometry) with storage for nVerts elements in each dimension, so storage for a --- 457,463 ----

A Note on Allocation

For componentwise rectilinear centerings such as ! RectilinearCentering<2,VectorFaceRCTag<2> >, POOMA currently allocates Field domains (and Array domains in the associated DiscreteGeometry) with storage for nVerts elements in each dimension, so storage for a *************** following methods: *** 593,599 **** representation, such as a parameterized function object defining the bounding surface of the domain, with a method to determine whether a point in the space is inside or outside the set. The type of this ! object must be Domain_t,

totalDomain(): --- 593,599 ---- representation, such as a parameterized function object defining the bounding surface of the domain, with a method to determine whether a point in the space is inside or outside the set. The type of this ! object must be Domain_t.
totalDomain(): *************** following methods: *** 604,610 ****
x(): !
returns an array of centering positions corresponding to the total domain. --- 604,610 ----
x(): !
Returns an array of centering positions corresponding to the total domain. *************** told to update themselves if necessary. *** 765,771 **** Fields that are based on its rectilinear mesh geometry classes. The current release provides periodic, reflecting, constant, and linear-extrapolation boundary condition types; future releases may ! may include others. More importantly, the required interface for the boundary condition classes is meant to make it easy for users to implement their own special boundary conditions. By following this interface prescription, applications can attach their own boundary --- 765,771 ---- Fields that are based on its rectilinear mesh geometry classes. The current release provides periodic, reflecting, constant, and linear-extrapolation boundary condition types; future releases may ! include others. More importantly, the required interface for the boundary condition classes is meant to make it easy for users to implement their own special boundary conditions. By following this interface prescription, applications can attach their own boundary *************** volumes by making use of the fact that t *** 795,801 **** beyond the number of vertices at the other side. The existence of guard layers affects the information that Fields provide about the spatial position of their ! elements. The expression f.x(0) is actually the position of one corner of the total domain of the Field f only if f has no guard layers, since the rule is that the physical domain of a Field is always zero-based. This means that in --- 795,801 ---- beyond the number of vertices at the other side. The existence of guard layers affects the information that Fields provide about the spatial position of their ! elements. The expression f.x(0) is actually the position of one corner of the total domain of the Field f only if f has no guard layers, since the rule is that the physical domain of a Field is always zero-based. This means that in *************** line 13 in the following source code: *** 1165,1171 **** 013 const int Dim = 2; 014 const int nVerts = 129; 015 const int nCells = nVerts - 1; ! 016 Interval>Dim> vertexDomain; 017 int d; 018 for (d = 0; d < Dim; d++) 019 { --- 1165,1171 ---- 013 const int Dim = 2; 014 const int nVerts = 129; 015 const int nCells = nVerts - 1; ! 016 Interval<Dim> vertexDomain; 017 int d; 018 for (d = 0; d < Dim; d++) 019 { Index: tut-08.html =================================================================== RCS file: /home/pooma/Repository/r2/docs/tut-08.html,v retrieving revision 1.1 diff -c -p -r1.1 tut-08.html *** tut-08.html 2001/03/19 16:11:14 1.1 --- tut-08.html 2001/03/21 20:00:03 *************** average(const ConstField<Geometry, T, *** 228,234 **** TW, MeshTraits<typename Geometry::Mesh_t>::isLogicallyRectilinear> > Functor_t; typedef ConstField<Geometry, T, EngineTag> Expression1_t; ! typedef ConstField<Geometry, TW, EngineTagW> Expression1_t; typedef View2<Functor_t, Expression1_t, Expression2_t> Ret_t; return Ret_t::make(Functor_t(), f, weight); } --- 228,234 ---- TW, MeshTraits<typename Geometry::Mesh_t>::isLogicallyRectilinear> > Functor_t; typedef ConstField<Geometry, T, EngineTag> Expression1_t; ! typedef ConstField<Geometry, TW, EngineTagW> Expression2_t; typedef View2<Functor_t, Expression1_t, Expression2_t> Ret_t; return Ret_t::make(Functor_t(), f, weight); } *************** files. *** 308,319 **** - SurfaceNormalsArray_t - The type of ConstArray returned by - cellSurfaceNormals(). - - - This_t The type of this class. --- 308,313 ---- *************** href="#dimension-def">dimensionsDim template parameter for their Array data members, such as the array of vertex-vertex mesh spacings returned by vertexDeltas(). This ! value is also the number of integers require to index a single mesh element. While the mesh class's dimension and its spatial dimensionality are the same for logically-rectilinear meshes, an unstructured mesh might well use one-dimensional Arrays to --- 446,452 ---- logically-rectilinear mesh classes is the Dim template parameter for their Array data members, such as the array of vertex-vertex mesh spacings returned by vertexDeltas(). This ! value is also the number of integers required to index a single mesh element. While the mesh class's dimension and its spatial dimensionality are the same for logically-rectilinear meshes, an unstructured mesh might well use one-dimensional Arrays to *************** are lost. POOMA represents this notion b *** 578,584 **** geometry, there is no way to know what the geometry of the resulting Field should be. (The library could make an arbitrary choice, such as always using the geometry from the left operand, but ! this would be wrong as often as it was right). If the two Fields have the same geometry type, it is still not possible to know until run-time whether they really hold equivalent geometry objects. Lacking a clear idea of how to construct the geometry, the --- 572,578 ---- geometry, there is no way to know what the geometry of the resulting Field should be. (The library could make an arbitrary choice, such as always using the geometry from the left operand, but ! this would be wrong as often as it was correct). If the two Fields have the same geometry type, it is still not possible to know until run-time whether they really hold equivalent geometry objects. Lacking a clear idea of how to construct the geometry, the *************** example: *** 985,991 ****
  // Create the geometries, assuming RectilinearMesh object mesh:
! typedef RectilinearMesh<Dim, Cartesian<Dim> > Mesh_t
  DiscreteGeometry<Vert, Mesh_t> geomv(mesh, GuardLayers<Dim>(1));
  DiscreteGeometry<Cell, Mesh_t> geomc(mesh, GuardLayers<Dim>(1));
  
--- 979,985 ----
  
  
  // Create the geometries, assuming RectilinearMesh object mesh:
! typedef RectilinearMesh<Dim, Cartesian<Dim> > Mesh_t;
  DiscreteGeometry<Vert, Mesh_t> geomv(mesh, GuardLayers<Dim>(1));
  DiscreteGeometry<Cell, Mesh_t> geomc(mesh, GuardLayers<Dim>(1));
  
*************** typedef Div<Cell, DiscreteGeometry<
*** 998,1004 ****
  FieldStencil<Div_t> divVV2SC();
  
  // Divergence, Vector/Vert-->Scalar/Cell
! sc = divV2SC(fv);
  

Programmers may also find it convenient to create wrappers by --- 992,998 ---- FieldStencil<Div_t> divVV2SC(); // Divergence, Vector/Vert-->Scalar/Cell ! sc = divV2SC(vv);

Programmers may also find it convenient to create wrappers by *************** the scalar loop; and *** 1044,1050 ****

In addition, boundary conditions are not automatically evaluated before a field is printed. Applications should therefore call applyBoundaryConditions() before output statements to ensure ! that the boundary values displayed are up to date..

Using Pre-Built Boundary Conditions

--- 1038,1044 ----

In addition, boundary conditions are not automatically evaluated before a field is printed. Applications should therefore call applyBoundaryConditions() before output statements to ensure ! that the boundary values displayed are up to date.

Using Pre-Built Boundary Conditions

*************** conditions are added in the functor's This release of POOMA predefines the functors listed below. Their ! effects can be inferred by comparing them with the the boundary conditions given in the previous table.
    --- 1208,1214 ---- which is called internally by the field.

    This release of POOMA predefines the functors listed below. Their ! effects can be inferred by comparing them with the boundary conditions given in the previous table.

      *************** with operators. The source code below, t *** 1555,1564 **** 170 }
!

This is a simple Jacobi saolver for Laplace's equation using the PositionFaceBC boundary condition discussed above. Lines 110-130 set up the mesh, the geometry, and the Brick-engine-based Field. Notice that we do not add any boundary conditions ! to this field, but we do reserve one layer of external guard layers (line 125) We then initialize the Field v and begin iterating. Since we need a temporary field to store the result of the Laplacian stencil, we can efficiently perform two applications of the stencil for each loop (lines 147 and 148). We know --- 1549,1558 ---- 170 } !

This is a simple Jacobi solver for Laplace's equation using the PositionFaceBC boundary condition discussed above. Lines 110-130 set up the mesh, the geometry, and the Brick-engine-based Field. Notice that we do not add any boundary conditions ! to this field, but we do reserve one layer of external guard layers (line 125). We then initialize the Field v and begin iterating. Since we need a temporary field to store the result of the Laplacian stencil, we can efficiently perform two applications of the stencil for each loop (lines 147 and 148). We know *************** to monitor wall-clock time (lines 1 *** 1568,1574 ****

The function applyLaplacian (lines 97-101) takes a Field to assign to and a Field to stencil as arguments. This is where the boundary conditions are ! applied, follwed by the stencil. The Field stencil object Laplace is straightforward, except for the static function applyBoundaryConditions that, on the fly, creates boundary conditions for each face of the input field f and applies them.

--- 1562,1568 ----

The function applyLaplacian (lines 97-101) takes a Field to assign to and a Field to stencil as arguments. This is where the boundary conditions are ! applied, followed by the stencil. The Field stencil object Laplace is straightforward, except for the static function applyBoundaryConditions that, on the fly, creates boundary conditions for each face of the input field f and applies them.

From oldham at codesourcery.com Wed Mar 21 23:25:39 2001 From: oldham at codesourcery.com (Jeffrey Oldham) Date: Wed, 21 Mar 2001 15:25:39 -0800 Subject: RFA: More Minor Changes to Tutorials Message-ID: <20010321152539.A30268@codesourcery.com> Here are changes to tutorials starting with tut-09.html. OK to commit? Wed Mar 21 15:05:19 2001 Jeffrey D. Oldham * tut-09.html: Fix minor typographical errors. Fix line number references. (Summary): Change "particles" to typewriter font. Correct possessive of singular Particles. Change second parameter of "deferredDestroy" to match the following text. * tut-11.html: Remove second of two contiguous periods. (PrintArray Class): Change "print" to typewriter font. Fix typos. Add a space between a type and a variable. (dbprint): s/;/,/ s/dB*/db*/ Change type's and function's names to typewriter fonts. * tut-12.html (Object Serialization): s/principle/principal/ (Using POOMA I/O): Add a comma and change "type" to typewriter font. How do we verify these changes? Thanks, Jeffrey D. Oldham oldham at codesourcery.com -------------- next part -------------- Index: tut-09.html =================================================================== RCS file: /home/pooma/Repository/r2/docs/tut-09.html,v retrieving revision 1.1 diff -c -p -r1.1 tut-09.html *** tut-09.html 2001/03/19 16:11:14 1.1 --- tut-09.html 2001/03/21 23:22:01 *************** then randomize the balls' initial positi *** 869,881 ****

Lines 103-110 are the most novel part of this simulation, as they create reflecting boundary conditions for the simulation, and add them ! to the balls object. Lines 103-108 defines where particles bounce; again, this is done in a dimension-independent fashion in ! order to make code evolution as easy as possible. Line 104 turns upper and lower into a reversing boundary condition, ! which line 105 then adds to balls. The main simulation loop now consists of nothing more than advancing the balls in each ! time step, and calling sync() to enforce the boundary conditions. --- 869,881 ----

Lines 103-110 are the most novel part of this simulation, as they create reflecting boundary conditions for the simulation, and add them ! to the balls object. Lines 103-108 define where particles bounce; again, this is done in a dimension-independent fashion in ! order to make code evolution as easy as possible. Line 109 turns upper and lower into a reversing boundary condition, ! which line 110 then adds to balls. The main simulation loop now consists of nothing more than advancing the balls in each ! time step, and calling applyBoundaryCondition() to enforce the boundary conditions. *************** list below summarizes the most important *** 892,898 ****

  • Particles<PL>::initialize(PL &layout): ! Initialize the particles object with the given particle layout. This should be used if the Particles object was created with the default constructor. --- 892,898 ----
    • Particles<PL>::initialize(PL &layout): ! Initialize the Particles object with the given particle layout. This should be used if the Particles object was created with the default constructor. *************** Return the number of registered attribut *** 909,918 ****
    • addAttribute(attrib): Add the given attribute (should be a DynamicArray of the ! proper engine type) to the Particles' attribute list.
    • removeAttribute(attrib): ! Remove the given attribute from the Particles' attribute list.
    • sync(posattrib): --- 909,918 ----
    • addAttribute(attrib): Add the given attribute (should be a DynamicArray of the ! proper engine type) to the Particles's attribute list.
    • removeAttribute(attrib): ! Remove the given attribute from the Particles's attribute list.
    • sync(posattrib): *************** Destroy any particles that were specifie *** 933,939 ****
    • renumber(): Recalculate the per-patch and total domain of the system by inspecting ! the Particles' attribute layout.
    • create(N, patch, renum): Create N particles in the specified patch (and optionally --- 933,939 ----
    • renumber(): Recalculate the per-patch and total domain of the system by inspecting ! the Particles's attribute layout.
    • create(N, patch, renum): Create N particles in the specified patch (and optionally *************** renumber. The domain may be a one-dimen *** 951,957 **** numbers or a list of index numbers. (See the note below on the patchId parameter.) !
    • deferredDestroy(domain, patch): Put the indices of the particles in the given domain in the deferred destroy list of the Particles object, so that they will be destroyed by the next call to performDestroy(). --- 951,957 ---- numbers or a list of index numbers. (See the note below on the patchId parameter.) !
    • deferredDestroy(domain, patchId): Put the indices of the particles in the given domain in the deferred destroy list of the Particles object, so that they will be destroyed by the next call to performDestroy(). Index: tut-11.html =================================================================== RCS file: /home/pooma/Repository/r2/docs/tut-11.html,v retrieving revision 1.1 diff -c -p -r1.1 tut-11.html *** tut-11.html 2001/03/19 16:11:14 1.1 --- tut-11.html 2001/03/21 23:22:01 *************** special "off" setting, by calling se *** 147,153 ****

      When running with multiple threads in a context, only one thread does the output, either for standard C++ stream output, or for Inform ! output.. This is the "control" thread, which manages task assignment to the others. It is important to note that any output to an Inform which reads data from a multi-patch container is independent of whether other threads might be currently modifying those values. To avoid this, insert a --- 147,153 ----

      When running with multiple threads in a context, only one thread does the output, either for standard C++ stream output, or for Inform ! output. This is the "control" thread, which manages task assignment to the others. It is important to note that any output to an Inform which reads data from a multi-patch container is independent of whether other threads might be currently modifying those values. To avoid this, insert a *************** containers.

      *** 218,224 ****

      The PrintArray Class

      The typical way to use PrintArray is to construct a ! PrintArray object, then use its print() methods for sending formatted ASCII output of POOMA container data to a stream such as cout or an Inform object. The constructor accepts values for six formatting parameters, which are maintained as member data in the object. --- 218,224 ----

      The PrintArray Class

      The typical way to use PrintArray is to construct a ! PrintArray object, then use its print() methods for sending formatted ASCII output of POOMA container data to a stream such as cout or an Inform object. The constructor accepts values for six formatting parameters, which are maintained as member data in the object. *************** the total number of significant digits.< *** 261,267 **** setCarReturn(), carReturn() :

      ! If less than 0, print all values in a row (first array index) one one like of output. If greater than 0, specifies the number of values to print before breaking the output with a carriage return.
      --- 261,267 ---- setCarReturn(), carReturn() :
      ! If less than 0, print all values in a row (first array index) on one line of output. If greater than 0, specifies the number of values to print before breaking the output with a carriage return.
      *************** attributes from Particles), but *** 302,308 **** restrictions are that the container must export an enum value dimensions, such as Array::dimensions, and must have an array-indexing capability such that ! operator()(int io, int i1, ..., int iN) returns a contained data value. (Here, N=dimensions-1.)

      If you pass in a view of an Array, for example, to the first --- 302,308 ---- restrictions are that the container must export an enum value dimensions, such as Array::dimensions, and must have an array-indexing capability such that ! operator()(int i0, int i1, ..., int iN) returns a contained data value. (Here, N=dimensions-1.)

      If you pass in a view of an Array, for example, to the first *************** These code snips illustrate the differen *** 314,320 **** like for a 3D Array:

      ! Range<3>r(Range<1>(2,10,2),Range<1>(1,3,1),Range<1>(3));
        Array<3> a(20,20,20); // ... assign values to a ...
        
        Inform pout;   // An output stream
      --- 314,320 ----
        like for a 3D Array:
        
        
      ! Range<3> r(Range<1>(2,10,2),Range<1>(1,3,1),Range<1>(3));
        Array<3> a(20,20,20); // ... assign values to a ...
        
        Inform pout;   // An output stream
      *************** prints
      *** 389,395 ****
        

      Many debuggers have a command prompt or expression-evaluation window and allow interactive calling of functions with simple arguments. Few, if any, of these debuggers have a convenient means to invoke template functions even when ! the templates have been instantiated in the executable code; and none allow interactive construction of objects or invocation of objects' member functions, whether the associated class and/or member functions are templated or not.

      --- 389,395 ----

      Many debuggers have a command prompt or expression-evaluation window and allow interactive calling of functions with simple arguments. Few, if any, of these debuggers have a convenient means to invoke template functions even when ! the templates have been instantiated in the executable code, and none allow interactive construction of objects or invocation of objects' member functions, whether the associated class and/or member functions are templated or not.

      *************** or s(s.physicalDomain()), to ex *** 739,745 **** not possible interactively.

      The dbSetCarReturn() invocations illustrate more of the POOMA ! dB*() function family. These invoke the corresponding PrintArray functions on a global PrintArray object maintained internally by POOMA. This sets a format state that persists from one interactive function call to the next. Here is the set of these --- 739,745 ---- not possible interactively.

      The dbSetCarReturn() invocations illustrate more of the POOMA ! db*() function family. These invoke the corresponding PrintArray functions on a global PrintArray object maintained internally by POOMA. This sets a format state that persists from one interactive function call to the next. Here is the set of these *************** int dbSpacing(); *** 761,768 **** void dbSetSpacing(int val);

      !

      Two additional functions allow toggling between the default Inform object ! used by dbprint() and one or more user-defined Inform objects:

      --- 761,768 ---- void dbSetSpacing(int val);
      !

      Two additional functions allow toggling between the default Inform object ! used by dbprint() and one or more user-defined Inform objects:

      Index: tut-12.html =================================================================== RCS file: /home/pooma/Repository/r2/docs/tut-12.html,v retrieving revision 1.1 diff -c -p -r1.1 tut-12.html *** tut-12.html 2001/03/19 16:11:14 1.1 --- tut-12.html 2001/03/21 23:22:02 *************** but not as good for multi-application co *** 93,99 **** other hand, there are many situations when one would just as soon not have the overhead of an object-oriented database no matter how streamlined.

      Object-oriented applications benefit enormously from object-oriented ! data management. After all, the principle reason many programmers prefer object-oriented languages is so that they can create and exploit new data types. Object storage systems provide a way to store and retrieve user-defined types as easily as intrinsic types. --- 93,99 ---- other hand, there are many situations when one would just as soon not have the overhead of an object-oriented database no matter how streamlined.

      Object-oriented applications benefit enormously from object-oriented ! data management. After all, the principal reason many programmers prefer object-oriented languages is so that they can create and exploit new data types. Object storage systems provide a way to store and retrieve user-defined types as easily as intrinsic types. *************** may be summarized as follows: *** 234,240 **** Report the number of distinct types in the object set.

    • ! Report the name of a type given its index k, where k = 0, ... (number of types -1).
    • --- 234,240 ---- Report the number of distinct types in the object set.
    • ! Report the name of a type given its index k, where k = 0, ..., (number of types -1).
    • *************** instances.
    • *** 245,251 **** For a given type indicated by type name or index k, report the name of object j where j = 0 , ..., (number of instances -1).
    ! The ID of an object is an integer (type long) that by convention is the position of the object in the list of instances of that type. That is, if an instance of a given type is second on the list, its ID is 1 (indexed from zero). The primary key for objects contained in an object set is the --- 245,251 ---- For a given type indicated by type name or index k, report the name of object j where j = 0 , ..., (number of instances -1).
! The ID of an object is an integer (type long) that by convention is the position of the object in the list of instances of that type. That is, if an instance of a given type is second on the list, its ID is 1 (indexed from zero). The primary key for objects contained in an object set is the From oldham at codesourcery.com Wed Mar 21 23:26:40 2001 From: oldham at codesourcery.com (Jeffrey Oldham) Date: Wed, 21 Mar 2001 15:26:40 -0800 Subject: (Minor) Pooma Tutorial Questions Message-ID: <20010321152640.B30268@codesourcery.com> Here are three questions raised when reading the Pooma tutorials. tut-04.html: Line 13 of examples/Tiny: "MultiPatch" has not been defined. Line 620: Have evaluators been discussed? tut-09.html: Why is renumber() exposed to the user? Why not use an iterator to access the particles? Thanks, Jeffrey D. Oldham oldham at codesourcery.com From oldham at codesourcery.com Thu Mar 22 16:44:09 2001 From: oldham at codesourcery.com (Jeffrey Oldham) Date: Thu, 22 Mar 2001 08:44:09 -0800 Subject: RFA: src/Utilities/Inform.h: Fix Preprocessor Expression Message-ID: <20010322084409.A1886@codesourcery.com> Allan's suggested improvement was lost in the flurry of responses to my previous Pooma patches. OK to commit? 2001-03-22 Jeffrey Oldham * Inform.h: Modify preprocessing constant expression to be more robust. Thanks, Jeffrey D. Oldham oldham at codesourcery.com -------------- next part -------------- Index: Inform.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Utilities/Inform.h,v retrieving revision 1.28 diff -c -p -r1.28 Inform.h *** Inform.h 2001/03/21 00:56:09 1.28 --- Inform.h 2001/03/22 16:40:14 *************** public: *** 275,281 **** void print() { flush(); } void output() { flush(); } ! #if (defined(__MWERKS__) && __MWERKS__ >= 0x2301) || __GLIBCPP__ >= 20001129 typedef std::ios_base::fmtflags FmtFlags_t; #else typedef long FmtFlags_t; --- 275,282 ---- void print() { flush(); } void output() { flush(); } ! #if (defined(__MWERKS__) && __MWERKS__ >= 0x2301) \ ! || (defined(__GLIBCPP__) && __GLIBCPP__ >= 20001129) typedef std::ios_base::fmtflags FmtFlags_t; #else typedef long FmtFlags_t; From drnuke at lanl.gov Thu Mar 22 16:53:03 2001 From: drnuke at lanl.gov (Steve Nolen) Date: Thu, 22 Mar 2001 09:53:03 -0700 Subject: Using Dynamic Arrays Message-ID: How does one use a dynamic array with something other than an intrinsic type. even when i tried instantiation one with an empty class, the compiler complained about ElementProperties< classname >::construct( classname*) i'm using metrowerks 6.1 -steve From cummings at linkline.com Thu Mar 22 17:33:46 2001 From: cummings at linkline.com (Julian C. Cummings) Date: Thu, 22 Mar 2001 09:33:46 -0800 Subject: [pooma-dev] (Minor) Pooma Tutorial Questions In-Reply-To: <20010321152640.B30268@codesourcery.com> Message-ID: The purpose of renumber() is to recompute the global domain of the particle data arrays, which are DynamicArrays and can change size as particles are created or destroyed. Pooma also has to keep track of the size of the various patches, which can change if particles are moved from one patch to another during a swap. The domain size information is used to locate individual particles and to loop over particles in data parallel operations. This second task could be done using iterators. At one point, I asked about introducing iterators for DynamicArrays, since they are inherently 1D data structures. I think that idea got shot down, but we could revisit the issue. In any event, many particle simulations require that the particles have a global indexing scheme. In Pooma r1, the "ID" was a mandatory data element for each particle, but we got rid of this in Pooma r2. Still, you can look up particle 42 and get the "same" one, no matter how many processors or patches there are. That's important. You would need random access iterators to do that, and you would still have to maintain a global indexing. Julian C. -----Original Message----- From: Jeffrey Oldham [mailto:oldham at codesourcery.com] Sent: Wednesday, March 21, 2001 3:27 PM To: pooma-dev at pooma.codesourcery.com Subject: [pooma-dev] (Minor) Pooma Tutorial Questions tut-09.html: Why is renumber() exposed to the user? Why not use an iterator to access the particles? Thanks, Jeffrey D. Oldham oldham at codesourcery.com From jcrotinger at mac.com Fri Mar 23 13:53:00 2001 From: jcrotinger at mac.com (James Crotinger) Date: Fri, 23 Mar 2001 06:53:00 -0700 Subject: [pooma-dev] Using Dynamic Arrays In-Reply-To: Message-ID: on 3/22/01 9:53 AM, Steve Nolen at drnuke at lanl.gov wrote: > How does one use a dynamic array with something other than an intrinsic > type. even when i tried instantiation one with an empty class, the compiler > complained about ElementProperties< classname >::construct( classname*) > > i'm using metrowerks 6.1 > > -steve > The array machinery uses ElementProperties to decide on certain construction semantics. By default, element construction is done with the default constructor, etc. We override these for the basic types to skip construction. And we override these for types with shallow copy semantics to properly make deep copies. What I don't understand is why it isn't just using the general template. Perhaps it isn't being included somewhere where it needs to be. Jim From jcrotinger at mac.com Fri Mar 23 13:59:10 2001 From: jcrotinger at mac.com (James Crotinger) Date: Fri, 23 Mar 2001 06:59:10 -0700 Subject: [pooma-dev] (Minor) Pooma Tutorial Questions In-Reply-To: Message-ID: on 3/22/01 10:33 AM, Julian C. Cummings at cummings at linkline.com wrote: > I asked about introducing iterators > for DynamicArrays, since they are inherently 1D > data structures. The problem, I believe, is that multi-patch dynamic arrays only look 1D. Implementation wise they're not like a 1D array at all; i.e. they are not in a single contiguous block of memory. Thus the iterator has to have an if-test. If people are willing to live with this (as they seem to be for indexing, which also has this problem if done on the whole multi-patch dynamic array), the using an iterator would avoid he need to have the particles numbered. On the other hand, without numbering and the ability to do for (i = 0; i < size; ++i) a(i); the array 'a' is not very array-like. I think the above has to be possible if we're calling a an Array. If we want to have a ParticleSet that can only be iterated through, that would be a different data structure. Jim From oldham at codesourcery.com Fri Mar 23 15:36:40 2001 From: oldham at codesourcery.com (Jeffrey Oldham) Date: Fri, 23 Mar 2001 07:36:40 -0800 Subject: Patch: src/Utilities/Inform.h More Robust Message-ID: <20010323073640.A1429@codesourcery.com> Per Allan Stokes's good suggestion, 2001-03-22 Jeffrey Oldham * Inform.h: Modify preprocessing constant expression to be more robust. Tested on sequential, Linux, and mainline gcc Reviewed by Jim Crotinger. Thanks, Jeffrey D. Oldham oldham at codesourcery.com -------------- next part -------------- Index: Inform.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Utilities/Inform.h,v retrieving revision 1.28 diff -c -p -r1.28 Inform.h *** Inform.h 2001/03/21 00:56:09 1.28 --- Inform.h 2001/03/22 16:40:14 *************** public: *** 275,281 **** void print() { flush(); } void output() { flush(); } ! #if (defined(__MWERKS__) && __MWERKS__ >= 0x2301) || __GLIBCPP__ >= 20001129 typedef std::ios_base::fmtflags FmtFlags_t; #else typedef long FmtFlags_t; --- 275,282 ---- void print() { flush(); } void output() { flush(); } ! #if (defined(__MWERKS__) && __MWERKS__ >= 0x2301) \ ! || (defined(__GLIBCPP__) && __GLIBCPP__ >= 20001129) typedef std::ios_base::fmtflags FmtFlags_t; #else typedef long FmtFlags_t; From cummings at cacr.caltech.edu Fri Mar 23 20:43:06 2001 From: cummings at cacr.caltech.edu (Julian Cummings) Date: Fri, 23 Mar 2001 12:43:06 -0800 Subject: enums vs. static data members Message-ID: <3ABBB55A.76CBDAA9@cacr.caltech.edu> Hi All, This is mostly directed at the Mac/Metrowerks folks, but anyone is welcome to comment. A couple of months ago, I was trying to get Pooma 2.3 to build under the HP aCC C++ compiler. This is of interest here because the HP V-class machine and the new "Superdome" machine are major parallel platforms for us. The aCC compiler has a flag "-AA" which makes it quite ANSI standard compliant. It even does Koenig name lookup and warns of future errors once the C++ standard is fully enforced. I fixed some glitches in the code base detected by this compiler and commited the fixes back when the cvs repository was still at LANL. But there is still a fairly major thing preventing the Pooma library from building under aCC. It gets unhappy with the usage of the enum "wildcard" in the Domain classes. These classes define an enumerator called "wildcard" and set the value to either 1 or 0 to indicate if the Domain is a wildcard type of domain. Then there are function templates taking a bool template argument and specialized for "true" or "false" that do something different depending upon whether a Domain is a wildcard type of domain or not. So you see the expression "(wildcard==1)" being passed as a template argument to these functions. The aCC alternately complains that either "wildcard" is not defined in the current context or that there is no appropriate operator== defined to evaluate the expression. I'm not really sure if the aCC compiler is correct in its complaints or not. For example, is the compiler supposed to look in the namespace of a base class for enumerator definitions? The aCC compiler seemed happier if "wildcard" was qualified by the name of the class in which it was defined. With respect to comparisons between enumerators and literal int's, you are supposed to compare like types by promoting the int to the enumeration type. Unfortunately, most of our Pooma enumerators don't have an explicit enumeration type, because we write them as enum { wildcard = 0 }; I'm not sure how to go about fixing this problem. It looks like there are random places in the code where we have cast the enumerator to be an int so that the comparison works. This is a pretty ugly solution. I hate using these enums because different compilers seem to treat them differently. An alternative would be to define a static bool "wildcard" in these classes, set it to "true" or "false", and then pass that as the template argument. But as I recall, there was some problem with the Metrowerks compiler that made this not a viable option. I guess I am wondering if that problem still exists or whether it would be OK to overhaul the Domain classes to use static data types instead of enums. The one drawback to this approach that I see is you have to add some compiled source file that initializes these static variables. You can't just stick this in the class definition. On the other hand, if you think the aCC compiler is full of it and there is nothing at all wrong with this code in the Domain sources, please let me know that, too. I am on a list for developers using aCC, and I can report compiler problems. But I had a hard time trying trim down the problems in the Domain sources to something simple I could submit as a bug report for the HP technical support group. For a specific example of the sort of thing aCC is unhappy with, take a look at src/Domain/Contains.h, line 174. A static member function of the class template ContainsDomainSingle is being invoked, with "(USN==0)" given as the third template argument. The aCC compiler gives the following error: Non-type template arguments must be integral constant expressions, addresses of objects or functions with external linkage, or static class members. The error goes away if I make "USN" a static const int data member of class ContainsDomain and initialize its value as DomainTraits::unitStride. The code would be simpler if DomainTraits::unitStride were already a static bool, making the comparison with zero unnecessary. There are zillions of these sorts of things littered throughout the Domain code. Regards, Julian C. -- Dr. Julian C. Cummings E-mail: cummings at cacr.caltech.edu California Institute of Technology Phone: 626-395-2543 1200 E. California Blvd., Mail Code 158-79 Fax: 626-584-5917 Pasadena, CA 91125 From JimC at proximation.com Fri Mar 23 21:15:07 2001 From: JimC at proximation.com (James Crotinger) Date: Fri, 23 Mar 2001 13:15:07 -0800 Subject: [pooma-dev] enums vs. static data members Message-ID: Not sure if this reply will work as outgoing mail has been problematic here in the past, but I'll give it a try... I hate using these enums because different compilers seem to treat them differently. An alternative would be to define a static bool "wildcard" in these classes, set it to "true" or "false", and then pass that as the template argument. But as I recall, there was some problem with the Metrowerks compiler that made this not a viable option. I guess I'd be surprised if Metrowerks had a problem with this - we use exactly this sort of thing in ElementProperties. Moreover... I guess I am wondering if that problem still exists or whether it would be OK to overhaul the Domain classes to use static data types instead of enums. The one drawback to this approach that I see is you have to add some compiled source file that initializes these static variables. You can't just stick this in the class definition. Yes you can. The compilers we're using have supported this for quite some time. You just say: template struct Foo { static const bool wildcard = true; }; On the other hand, if you think the aCC compiler is full of it and there is nothing at all wrong with this code in the Domain sources, please let me know that, too. Whether aCC is full of it or not, I like the "static const" traits better than enums. I was astonished recently when I tried this with VC++ and was told that only virtual functions could be made abstract, and beside, you could only use the value "0" in declaring an pure virtual function. But VC++ isn't a target here and I think everyone else does this right. Jim -------------- next part -------------- An HTML attachment was scrubbed... URL: From JimC at proximation.com Fri Mar 23 22:41:22 2001 From: JimC at proximation.com (James Crotinger) Date: Fri, 23 Mar 2001 14:41:22 -0800 Subject: error checking files in... Message-ID: I just checked in a file (just added a comment to ElementProperties.h) and got the following message: ezmlm-send: fatal: unable to switch to /home/pooma/lists/pooma-cvs: access denied I'm currently using the :ext: method with my username and ssh password (I just sent Mark a new key so hopefully I can use RSA RSN). So far I haven't received a CVS message regarding the check-in, but the check-in appears to have taken place. Jim --------------------------------------------------- James A. Crotinger Software Research Scientist Proximation, LLC -------------- next part -------------- An HTML attachment was scrubbed... URL: From dmar at lanl.gov Sat Mar 24 05:25:00 2001 From: dmar at lanl.gov (Don A. Marshall) Date: Fri, 23 Mar 2001 22:25:00 -0700 Subject: My proposal for the test kernel. Message-ID: <5.0.2.1.2.20010323211538.00c0e160@x-mail.lanl.gov> Jeffry, The attached Word document gives a revised description of the test problem to make it more specific. As I originally proposed it during the closing hours of the meeting, it left a number of details to the reader, who if he was on the code project would have understood implicitly what I meant. I have attached a "bmp" file showing an example of the kind of mesh I am talking about. I tried sending most of this email on 3/8/01, but I guess there were still problems with the email address. At that time I tried to use pooma-devel at .... The next day we got a message from Mark saying to use pooma-dev, but then Dave Nystrom tried to use it only to have his email bounce. My message never came back, so I assumed you had it. The test problem contains a number of interesting "features" of the hydro that we modeled using a fine mesh to contain subcell information. It makes use of cell centered, vertex centered, and face centered arrays. Missing are the edge centered arrays; however, in our implementation of the geometry calculations, we also made use of edge centered arrays. In other words, this test problem requires the use of arrays having more than one size as well as different centerings. No matter how it is coded, it contains lots of special cases which we took care of in "R1" by using "NDIndexes." The kernel can be handled without resorting to scalar code. The Word document also suggests using the artificial viscosity routine as a kernel for scalar code. Our version of the artificial viscosity code right now has an error in it. If I am lucky, I will be able to fix it tomorrow. This afternoon we got our first stripped down version of the code running in POOMA R2. The movies looked good. When John Hall gets back on Monday or Tuesday, we will send you a copy of the working routines for the predictor step as well as for the artificial viscosity. I just talked to Jean, she said we need to send more than just those 2 routines. My real intent when I proposed the kernels was more for you to see how many arrays we have to deal with routinely and how much complexity arises because of the mixture of different centerings. I just finished talking to John Hall; he has a different agenda. We will thrash it all out early next week. Hope this helps. I am anxious to get the collaboration going. If there is anything I can do to help speed it along, please don't hesitate to give me a call, or better yet drop me an email message. I respond to email better than to the phone. The numbers that we gave you over the phone are the best bet. We rotate around through the offices. Right now we are spending most of our time in John Hall's office. Again the numbers are: 505 667-8996 Don Marshall 505 665-4488 Jean Marshall 505-667-7568 John Hall 505-667-7913 William "Dave" Nystrom We all have the same fax number: 505-667-3726 I certainly prefer email because it can contain snips of listings and code examples which can be compared with data or existing code without having to type very much. Good luck, and glad to have you "on board". :) Don -------------- next part -------------- A non-text attachment was scrubbed... Name: POOMA_TP.doc Type: application/msword Size: 23040 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: mesh.bmp Type: application/octet-stream Size: 283414 bytes Desc: not available URL: From mark at codesourcery.com Sun Mar 25 02:12:25 2001 From: mark at codesourcery.com (Mark Mitchell) Date: Sat, 24 Mar 2001 18:12:25 -0800 Subject: [pooma-dev] enums vs. static data members In-Reply-To: <3ABBB55A.76CBDAA9@cacr.caltech.edu> References: <3ABBB55A.76CBDAA9@cacr.caltech.edu> Message-ID: <20010324181225J.mitchell@codesourcery.com> >>>>> "Julian" == Julian Cummings writes: Julian> the expression "(wildcard==1)" being passed as a template Julian> argument to these functions. The aCC alternately Julian> complains that either "wildcard" is not defined in the Julian> current context or that there is no appropriate operator== Julian> defined to evaluate the expression. I'm not sure what would cause the former problem, but the second complaint is most likely bogus. Conversion from an enumeration type to an integer type is an integral promotion, and, as such, a "usual arithmetic conversion". However, if there were weird template `operator==' functions in scope, that could prompt this problem, perhaps. Julian> I hate using these enums because different compilers seem Julian> to treat them differently. An alternative would be to Julian> define a static bool "wildcard" in these classes, set it Yes, that is definitely cleaner. Old compilers will not accept this, but I don't think we care anymore. Julian> static variables. You can't just stick this in the class Julian> definition. Well, that's pedantically true. Most compilers will let you slide by without defining the static data member, but you should do it anyhow. -- Mark Mitchell mark at codesourcery.com CodeSourcery, LLC http://www.codesourcery.com From mark at codesourcery.com Sun Mar 25 02:18:17 2001 From: mark at codesourcery.com (Mark Mitchell) Date: Sat, 24 Mar 2001 18:18:17 -0800 Subject: [pooma-dev] error checking files in... In-Reply-To: References: Message-ID: <20010324181817S.mitchell@codesourcery.com> >>>>> "James" == James Crotinger writes: James> I just checked in a file (just added a comment to James> ElementProperties.h) and got the following message: James> ezmlm-send: fatal: unable to switch to James> /home/pooma/lists/pooma-cvs: access denied James> I'm currently using the :ext: method with my username and James> ssh password (I just sent Mark a new key so hopefully I can James> use RSA RSN). James> So far I haven't received a CVS message regarding the James> check-in, but the check-in appears to have taken place. Ah, yes. I can see that this won't work with the :ext: method. I've tried to fix it -- but it's a little non-trivial, so it still might not work. The check-ins should still go through though. Thanks, -- Mark Mitchell mark at codesourcery.com CodeSourcery, LLC http://www.codesourcery.com From mark at codesourcery.com Mon Mar 26 16:53:43 2001 From: mark at codesourcery.com (Mark Mitchell) Date: Mon, 26 Mar 2001 08:53:43 -0800 Subject: Status Reports Message-ID: <20010326085343I.mitchell@codesourcery.com> I was out of town Friday, and so unable to prod y'all to send in weekly status reports. Only Jeffrey remembered. Let's have 'em... Thanks! -- Mark Mitchell mark at codesourcery.com CodeSourcery, LLC http://www.codesourcery.com From cummings at linkline.com Mon Mar 26 20:39:10 2001 From: cummings at linkline.com (Julian C. Cummings) Date: Mon, 26 Mar 2001 12:39:10 -0800 Subject: [pooma-dev] enums vs. static data members In-Reply-To: <3ABBB55A.76CBDAA9@cacr.caltech.edu> Message-ID: OK, thanks for your input on this subject. I didn't realize it was all right to initialize static const data members inside the class definition as Jim showed. That's handy! I am not completely sure that changing these enums to static const bools will solve all of aCC's problems, but I will take a crack at it and see. If nothing else, it will simplify the Domain code, which is far too complicated already. -- Julian C. Dr. Julian C. Cummings Staff Scientist, CACR/Caltech (626) 395-2543 cummings at cacr.caltech.edu -----Original Message----- From: cummings at cacr.caltech.edu [mailto:cummings at cacr.caltech.edu] Sent: Friday, March 23, 2001 12:43 PM To: pooma-dev at pooma.codesourcery.com Subject: [pooma-dev] enums vs. static data members Hi All, This is mostly directed at the Mac/Metrowerks folks, but anyone is welcome to comment. A couple of months ago, I was trying to get Pooma 2.3 to build under the HP aCC C++ compiler. This is of interest here because the HP V-class machine and the new "Superdome" machine are major parallel platforms for us. The aCC compiler has a flag "-AA" which makes it quite ANSI standard compliant. It even does Koenig name lookup and warns of future errors once the C++ standard is fully enforced. I fixed some glitches in the code base detected by this compiler and commited the fixes back when the cvs repository was still at LANL. But there is still a fairly major thing preventing the Pooma library from building under aCC. It gets unhappy with the usage of the enum "wildcard" in the Domain classes. These classes define an enumerator called "wildcard" and set the value to either 1 or 0 to indicate if the Domain is a wildcard type of domain. Then there are function templates taking a bool template argument and specialized for "true" or "false" that do something different depending upon whether a Domain is a wildcard type of domain or not. So you see the expression "(wildcard==1)" being passed as a template argument to these functions. The aCC alternately complains that either "wildcard" is not defined in the current context or that there is no appropriate operator== defined to evaluate the expression. I'm not really sure if the aCC compiler is correct in its complaints or not. For example, is the compiler supposed to look in the namespace of a base class for enumerator definitions? The aCC compiler seemed happier if "wildcard" was qualified by the name of the class in which it was defined. With respect to comparisons between enumerators and literal int's, you are supposed to compare like types by promoting the int to the enumeration type. Unfortunately, most of our Pooma enumerators don't have an explicit enumeration type, because we write them as enum { wildcard = 0 }; I'm not sure how to go about fixing this problem. It looks like there are random places in the code where we have cast the enumerator to be an int so that the comparison works. This is a pretty ugly solution. I hate using these enums because different compilers seem to treat them differently. An alternative would be to define a static bool "wildcard" in these classes, set it to "true" or "false", and then pass that as the template argument. But as I recall, there was some problem with the Metrowerks compiler that made this not a viable option. I guess I am wondering if that problem still exists or whether it would be OK to overhaul the Domain classes to use static data types instead of enums. The one drawback to this approach that I see is you have to add some compiled source file that initializes these static variables. You can't just stick this in the class definition. On the other hand, if you think the aCC compiler is full of it and there is nothing at all wrong with this code in the Domain sources, please let me know that, too. I am on a list for developers using aCC, and I can report compiler problems. But I had a hard time trying trim down the problems in the Domain sources to something simple I could submit as a bug report for the HP technical support group. For a specific example of the sort of thing aCC is unhappy with, take a look at src/Domain/Contains.h, line 174. A static member function of the class template ContainsDomainSingle is being invoked, with "(USN==0)" given as the third template argument. The aCC compiler gives the following error: Non-type template arguments must be integral constant expressions, addresses of objects or functions with external linkage, or static class members. The error goes away if I make "USN" a static const int data member of class ContainsDomain and initialize its value as DomainTraits::unitStride. The code would be simpler if DomainTraits::unitStride were already a static bool, making the comparison with zero unnecessary. There are zillions of these sorts of things littered throughout the Domain code. Regards, Julian C. -- Dr. Julian C. Cummings E-mail: cummings at cacr.caltech.edu California Institute of Technology Phone: 626-395-2543 1200 E. California Blvd., Mail Code 158-79 Fax: 626-584-5917 Pasadena, CA 91125 From oldham at codesourcery.com Mon Mar 26 21:38:02 2001 From: oldham at codesourcery.com (Jeffrey Oldham) Date: Mon, 26 Mar 2001 13:38:02 -0800 Subject: [pooma-dev] [RFA]: Tutorial Typographical Changes In-Reply-To: <20010321124249.A29937@codesourcery.com>; from oldham@codesourcery.com on Wed, Mar 21, 2001 at 12:42:49PM -0800 References: <20010321124249.A29937@codesourcery.com> Message-ID: <20010326133802.A1279@codesourcery.com> Would someone be willing to review these proposed changes or tell me if I missed a reply email? Thanks, Jeffrey D. Oldham oldham at codesourcery.com On Wed, Mar 21, 2001 at 12:42:49PM -0800, Jeffrey Oldham wrote: > Attached are proposed changes to some of the Pooma tutorials in > r2/docs. Most are minor typographical changes. More questionable > changes are annotated with "?" in the left column below. > > OK to commit? > > Wed Mar 21 12:03:54 2001 Jeffrey D. Oldham > > * background.html (struct AddOp): Match parameter name with > parameter use. > (struct MulOp): Likewise. > * tut-02.html: Add several missing spaces. > ? (RBJacobi): Change array's name to match previous line. > (Periodic Boundary Conditions): Fix line numbers for ApplyPeriodic. > * tut-04.html: Move sentence regarding component forwarding from > next paragraph to preceding paragraph concerning component > forwarding. > Remove an extra space and an extraneous comma. Add a missing > parenthesis. Fix array's name to match the other text. > ? Emphasize "ghost," which is implicitly defined. > ? Reword last sentence to de\"{e}mphasize Pooma developers' programming > expertise. > (accumulateWithLoop): Substitute "first0" and "last0" for "f0" and > "l0". "l0" looks like the number 10. > Remove some extraneous words. > * tut-06.html: "Recurring," not "recursing." > * tut-07.html: Remove extraneous word. Fix a comma. Fix > capitalization. Remove one of double word. > Add space between closing ">" in nested template. > ? s/VectorFace/VectorFaceRCTag/g > Change expression font to typewriter. > s/>/ ? * tut-08.html: (average): Change second "Expression1_t" to > "Expression2_t". > (Exported typedefs): Remove second, extraneous > "SurfaceNormalsArray_t". > Fix typo. Remove second of two contiguous periods. Remove second > of repeated world. > Suggested substitution s/right/correct/ to avoid confusion with > "left". > ? (FieldStencil example): Add ending ";". s/fv/vv/ to match > previous variable declaration. > Fix misspelled words. Add period at the end of a sentence. > > Thanks, > Jeffrey D. Oldham > oldham at codesourcery.com -------------- next part -------------- Index: background.html =================================================================== RCS file: /home/pooma/Repository/r2/docs/background.html,v retrieving revision 1.1 diff -c -p -r1.1 background.html *** background.html 2001/03/19 16:11:13 1.1 --- background.html 2001/03/21 19:59:59 *************** arithmetic operations: *** 761,767 ****
  struct AddOp
  {
!     static inline double apply(const double & left, const double & y)
      {
          return x + y;
      }
--- 761,767 ----
  
  struct AddOp
  {
!     static inline double apply(const double & x, const double & y)
      {
          return x + y;
      }
*************** struct AddOp
*** 769,775 ****
  
  struct MulOp
  {
!     static inline double apply(const double & left, const double & y)
      {
          return x * y;
      }
--- 769,775 ----
  
  struct MulOp
  {
!     static inline double apply(const double & x, const double & y)
      {
          return x * y;
      }
Index: tut-02.html
===================================================================
RCS file: /home/pooma/Repository/r2/docs/tut-02.html,v
retrieving revision 1.1
diff -c -p -r1.1 tut-02.html
*** tut-02.html	2001/03/19 16:11:13	1.1
--- tut-02.html	2001/03/21 19:59:59
*************** objects in some way.
*** 445,451 ****
  

In POOMA, that way is to use a 2-dimensional Interval or Range instead of a pair of 1-dimensional Intervals or ! Ranges. A 2-dimensionalInterval is just the cross-product of its 1-dimensional constituents: it specifies a dense rectangular patch of an array. Similarly, a 2-dimensional Range is a generalization of the red or black squares --- 445,451 ----

In POOMA, that way is to use a 2-dimensional Interval or Range instead of a pair of 1-dimensional Intervals or ! Ranges. A 2-dimensional Interval is just the cross-product of its 1-dimensional constituents: it specifies a dense rectangular patch of an array. Similarly, a 2-dimensional Range is a generalization of the red or black squares *************** need not have the same spacing along dif *** 455,461 ****

An N-dimensionalInterval is declared in the same way as its 1-dimensional cousin. An N-dimensional Interval is usually initialized by giving its ! constructor N 1-dimensionalIntervals as arguments, as shown in the following example:

--- 455,461 ----
  

An N-dimensionalInterval is declared in the same way as its 1-dimensional cousin. An N-dimensional Interval is usually initialized by giving its ! constructor N 1-dimensional Intervals as arguments, as shown in the following example:

*************** using 2-dimensional subscripting:
*** 537,543 ****
  32
  33      // The array we'll be solving for.
  34      Array<2> V(guarded);
! 35      x = 0.0;
  36
  37      // The right hand side of the equation.
  38      Array<2> b(calc);
--- 537,543 ----
  32
  33      // The array we'll be solving for.
  34      Array<2> V(guarded);
! 35      V = 0.0;
  36
  37      // The right hand side of the equation.
  38      Array<2> b(calc);
*************** used to ensure zero boundary conditions.
*** 577,584 ****
  condition could be represented equally well by assigning values to
  these padding elements.
  
! 

UsingInterval objects that run from 1 to N-2 to ! specify the dimensions of theInterval object calc defined on line 28 means that when the array b is defined (line 38), its legal indices also run from 1 to N-2 along each axis. While POOMA uses 0..N-1 indexing by --- 577,584 ---- condition could be represented equally well by assigning values to these padding elements. !

Using Interval objects that run from 1 to N-2 to ! specify the dimensions of the Interval object calc defined on line 28 means that when the array b is defined (line 38), its legal indices also run from 1 to N-2 along each axis. While POOMA uses 0..N-1 indexing by *************** either axis are padding, and are to be o *** 632,638 **** iteration.

The function that actually updates the periodic boundary conditions ! is called ApplyPeriodic(), and is shown on lines 20-28 below. The key to understanding this code is that when a "naked" integer is used to subscript a POOMA array, the result of that subscripting operation is reduced by one dimension in relation to that --- 632,638 ---- iteration.

The function that actually updates the periodic boundary conditions ! is called ApplyPeriodic(), and is shown on lines 20-33 below. The key to understanding this code is that when a "naked" integer is used to subscript a POOMA array, the result of that subscripting operation is reduced by one dimension in relation to that *************** point yields an Array with just *** 650,656 **** zero-dimensional Array (at least not in this release of POOMA), which is what the Loc<2> would have returned. The reduction in rank has to come from compile-time information, so ! Loc and integers reduce dimensionality, butInterval and Range do not.

--- 650,656 ----
  zero-dimensional Array (at least not in this release of
  POOMA), which is what the Loc<2> would have returned.
  The reduction in rank has to come from compile-time information, so
! Loc and integers reduce dimensionality, but Interval
  and Range do not.
  
  
*************** this, using the declarations:
*** 788,794 ****
  
  
      
!       Taking a view using anInterval
      
        
a(I)
--- 788,794 ---- ! Taking a view using an Interval
a(I)
*************** this, using the declarations: *** 833,839 **** ! Taking a read-only view using anInterval
a.read(I)
--- 833,839 ---- ! Taking a read-only view using an Interval
a.read(I)
Index: tut-04.html =================================================================== RCS file: /home/pooma/Repository/r2/docs/tut-04.html,v retrieving revision 1.1 diff -c -p -r1.1 tut-04.html *** tut-04.html 2001/03/19 16:11:14 1.1 --- tut-04.html 2001/03/21 20:00:00 *************** supported. Please contact pooma-devel at lanl.gov for information on using other, more complicated types. !

The Array::comp() method used on line 16 does ! component forwarding. The expression rays.comp(2) returns an Array<double> that supports writing into the second component of each vector element of rays. This is a data-parallel --- 404,411 ---- href="mailto:pooma-devel at lanl.gov">pooma-devel at lanl.gov for information on using other, more complicated types. !

The Array::comp() method used on line 16 does component forwarding. The expression rays.comp(2) returns an Array<double> that supports writing into the second component of each vector element of rays. This is a data-parallel *************** statement that works in a way analogous *** 413,421 **** except that the POOMA evaluator will calculate patches in parallel. Thus, if a program had an array of tensors T, it could change the element in the 0th row, 1st column with T.comp(0, ! 1). Note that, unlike Array, both ! Vector and Tensor always index from ! zero.

Line 24 shows that, as expected, the ith component of a Vector V can be accessed for both --- 413,422 ---- except that the POOMA evaluator will calculate patches in parallel. Thus, if a program had an array of tensors T, it could change the element in the 0th row, 1st column with T.comp(0, ! 1). Note that, unlike Array, both Vector and ! Tensor always index from zero. Component forwarding is ! intimately related to the notion of component views, which are ! discussed below.

Line 24 shows that, as expected, the ith component of a Vector V can be accessed for both *************** reading and writing using the syntax rays(i)(0) returns the ith element of the Vector rays, while the second subscript returns the zeroth component of that vector. - Component forwarding is intimately related to the notion of component - views, which are discussed below.

Line 28 shows that Vectors can be initialized with Size element values. Similarly, instances of --- 425,430 ---- *************** as are the following named functions on *** 508,524 **** (i,j) of the transpose is equal to element (j,i) of the input tensor t. !

template<class OutputEngineTag, int D, class T, class EngineTag>
Tensor<D,T,OutputEngineTag> &symmetrize(Tensor<D,T,E> &t)
:
Returns a tensor of type ! Tensor<D,T,E>, applying a n appropriate symmetrizing operation to convert from the symmetry of the input EngineTag (for example, Full) to the symmetry of the OutputEngineTag (for example, ! Antisymmetric. This is invoked using explicit template instantiation for the desired OutputEngineTag. For example:
! Tensor>2,double,Full> t(1.0, 2.0, 3.0, 4.0);
! Tensor>2,double,Antisymmetric> at = symmetrize<Antisymmetric>(t);
  std::cout << " t = " << t << std::endl;
  std::cout << "at = " << at << std::endl;
  
--- 507,523 ---- (i,j) of the transpose is equal to element (j,i) of the input tensor t. !

template<class OutputEngineTag, int D, class T, class E>
Tensor<D,T,OutputEngineTag> &symmetrize(Tensor<D,T,E> &t)
:
Returns a tensor of type ! Tensor<D,T,E>, applying an appropriate symmetrizing operation to convert from the symmetry of the input EngineTag (for example, Full) to the symmetry of the OutputEngineTag (for example, ! Antisymmetric). This is invoked using explicit template instantiation for the desired OutputEngineTag. For example:
! Tensor<2,double,Full> t(1.0, 2.0, 3.0, 4.0);
! Tensor<2,double,Antisymmetric> at = symmetrize<Antisymmetric>(t);
  std::cout << " t = " << t << std::endl;
  std::cout << "at = " << at << std::endl;
  
*************** via matrix-matrix product of the two arg *** 547,553 **** These functions also operate on Arrays of Tensor ! and Vector elements (and DynamicArrays, and Fields.)

Lines 37-39 show construction of a diagonal tensor using the Tensor class with Diagonal for the EngineTag --- 546,552 ---- These functions also operate on Arrays of Tensor ! and Vector elements (and DynamicArrays and Fields).

Lines 37-39 show construction of a diagonal tensor using the Tensor class with Diagonal for the EngineTag *************** like arrays of any other type. *** 568,574 ****

Accumulation operators such as operator*=() acting on Tensor<D,T,EngineTag> may result in a Tensor having ! different symmetry (different EngineTag than what you are accumulating into. For example,

  Tensor<2,double,Antisymmetric> t1, t2;
  // ... assign values
--- 567,573 ----
  
  

Accumulation operators such as operator*=() acting on Tensor<D,T,EngineTag> may result in a Tensor having ! different symmetry (different EngineTag than what you are accumulating into). For example,

  Tensor<2,double,Antisymmetric> t1, t2;
  // ... assign values
*************** Array< 2, double, MultiPatch<Unifo
*** 611,617 ****
  logical domain of the array being created.  The 10×10
  Loc is then used in the UniformGridLayout
  declaration to specify that the total domain is to be managed using a
! total of 100 patches.  When the Array a is
  finally declared, Array's third template parameter is
  explicitly instantiated using MultiPatch, and
  the layout object layout is used as a constructor parameter.
--- 610,616 ----
  logical domain of the array being created.  The 10×10
  Loc is then used in the UniformGridLayout
  declaration to specify that the total domain is to be managed using a
! total of 100 patches.  When the Array A is
  finally declared, Array's third template parameter is
  explicitly instantiated using MultiPatch, and
  the layout object layout is used as a constructor parameter.
*************** patch. As the overhead for evaluating a 
*** 752,758 ****
  small sub-patch evaluations hurt efficiency.
  
  

One mechanism for fixing this problem is to introduce ! guard (or ghost) layers. This done by having the individual patches overlap slightly. Each patch still "owns" the same data as before, but surrounds that data with a layer of guards. These guards duplicate data that is owned by other patches, and can only be read --- 751,757 ---- small sub-patch evaluations hurt efficiency.

One mechanism for fixing this problem is to introduce ! guard (or ghost) layers. This done by having the individual patches overlap slightly. Each patch still "owns" the same data as before, but surrounds that data with a layer of guards. These guards duplicate data that is owned by other patches, and can only be read *************** glossed over, since the main intent of t *** 815,829 **** intermediate or advanced users of the library can tailor it to their needs. !

The most common array layout in POOMA is called a brick ! layout, and is signaled by the use of the class Brick as an ! engine specifier in template instantiation. Conceptually, a brick is ! a dense, rectangular patch of multi-dimensional space, such as the ! area [0..10]×[0..10]. Programs written by the typical user ! access the elements of bricks using nested loops, the indices of which ! sweep through the brick's extent along a particular axis. Programs ! written by POOMA's developers use more complicated access ! loops in order to take full advantage of cache behavior.

The three functions accumulateWithLoop() defined below are the guts of the general-purpose adding routine that we will build up --- 814,828 ---- intermediate or advanced users of the library can tailor it to their needs. !

The most common array layout in POOMA is called a brick layout, and ! is signaled by the use of the class Brick as an engine ! specifier in template instantiation. Conceptually, a brick is a ! dense, rectangular patch of multi-dimensional space, such as the area ! [0..10]×[0..10]. Programs written by the typical user access ! the elements of bricks using nested loops, the indices of which sweep ! through the brick's extent along a particular axis. POOMA code uses ! more complicated access loops in order to take full advantage of cache ! behavior.

The three functions accumulateWithLoop() defined below are the guts of the general-purpose adding routine that we will build up *************** inline T accumulateWithLoop( *** 844,851 **** const ConstArray<1,T,E>& x ){ T sum = 0; ! int f0 = x.first(0), l0 = x.last(0); ! for (int i0=f0; i0<=l0; ++i0) sum += x(i0); return sum; } --- 843,850 ---- const ConstArray<1,T,E>& x ){ T sum = 0; ! int first0 = x.first(0), last0 = x.last(0); ! for (int i0=first0; i0<=last0; ++i0) sum += x(i0); return sum; } *************** inline T accumulateWithLoop( *** 855,864 **** const ConstArray<2,T,E>& x ){ T sum = 0; ! int f0 = x.first(0), f1 = x.first(1); ! int l0 = x.last(0), l1 = x.last(1); for (int i1=f1; i1<=l1; ++i1) ! for (int i0=f0; i0<=l0; ++i0) sum += x(i0, i1); return sum; } --- 854,863 ---- const ConstArray<2,T,E>& x ){ T sum = 0; ! int first0 = x.first(0), f1 = x.first(1); ! int last0 = x.last(0), l1 = x.last(1); for (int i1=f1; i1<=l1; ++i1) ! for (int i0=first0; i0<=last0; ++i0) sum += x(i0, i1); return sum; } *************** inline T accumulateWithLoop( *** 868,878 **** const ConstArray<3,T,E>& x ){ T sum = 0; ! int f0 = x.first(0), f1 = x.first(1), f2 = x.first(2); ! int l0 = x.last(0), l1 = x.last(1), l2 = x.last(2); for (int i2=f2; i2<=l2; ++i2) for (int i1=f1; i1<=l1; ++i1) ! for (int i0=f0; i0<=l0; ++i0) sum += x(i0, i1, i2); return sum; } --- 867,877 ---- const ConstArray<3,T,E>& x ){ T sum = 0; ! int first0 = x.first(0), f1 = x.first(1), f2 = x.first(2); ! int last0 = x.last(0), l1 = x.last(1), l2 = x.last(2); for (int i2=f2; i2<=l2; ++i2) for (int i1=f1; i1<=l1; ++i1) ! for (int i0=first0; i0<=last0; ++i0) sum += x(i0, i1, i2); return sum; } *************** T accumulate( *** 894,900 **** }

!

This function just calls through to whichever version of accumulateWithLoop() handles arrays of dimension D. Since accumulateWithLoop() is an inline function, this one extra function call will be eliminated by the compiler when --- 893,899 ---- }

!

This function just calls whichever version of accumulateWithLoop() handles arrays of dimension D. Since accumulateWithLoop() is an inline function, this one extra function call will be eliminated by the compiler when Index: tut-06.html =================================================================== RCS file: /home/pooma/Repository/r2/docs/tut-06.html,v retrieving revision 1.1 diff -c -p -r1.1 tut-06.html *** tut-06.html 2001/03/19 16:11:14 1.1 --- tut-06.html 2001/03/21 20:00:01 *************** in the <math.h> header file.) *** 215,221 ****

The second version of fft() does the real number-crunching. If the computation has reached its final stage, odd and even elements are combined directly (lines 106-111). If the ! computation is still recursing, the elements are shuffled, a half-sized transform is applied on each subsection, and the results are combined (lines 100-102). All of these operations use indirect addressing to move data values around. Most of the rest of the --- 215,221 ----

The second version of fft() does the real number-crunching. If the computation has reached its final stage, odd and even elements are combined directly (lines 106-111). If the ! computation is still recurring, the elements are shuffled, a half-sized transform is applied on each subsection, and the results are combined (lines 100-102). All of these operations use indirect addressing to move data values around. Most of the rest of the Index: tut-07.html =================================================================== RCS file: /home/pooma/Repository/r2/docs/tut-07.html,v retrieving revision 1.1 diff -c -p -r1.1 tut-07.html *** tut-07.html 2001/03/19 16:11:14 1.1 --- tut-07.html 2001/03/21 20:00:02 *************** class RectilinearCentering *** 339,345 ****

The RectilinearCenteringTag template parameter can be ! instantiated using a class whose centerings which are defined componentwise. This means that each component of a multicomponent field element type such as Vector or Tensor can have its own independent centering position. The value of the Boolean --- 339,345 ----

The RectilinearCenteringTag template parameter can be ! instantiated using a class whose centerings are defined componentwise. This means that each component of a multicomponent field element type such as Vector or Tensor can have its own independent centering position. The value of the Boolean *************** mesh with complete set of centering poin *** 426,432 ****

As an example of componentwise centering, consider ! RectilinearCentering<2,VectorFaceRCTag<2>>. The Y components of a field element of Vector type are centered on the faces perpendicular to the Y axis, while the X components are centered on the faces perpendicular to --- 426,432 ----

As an example of componentwise centering, consider ! RectilinearCentering<2,VectorFaceRCTag<2> >. The Y components of a field element of Vector type are centered on the faces perpendicular to the Y axis, while the X components are centered on the faces perpendicular to *************** WIDTH="451"> *** 448,454 **** Figure 4: Example of componentwise centering, showing ! RectilinearCentering<2,VectorFace<2>> --- 448,454 ---- Figure 4: Example of componentwise centering, showing ! RectilinearCentering<2,VectorFaceRCTag<2>> *************** WIDTH="451"> *** 457,463 ****

A Note on Allocation

For componentwise rectilinear centerings such as ! RectilinearCentering<2,VectorFace<2> >, POOMA currently allocates Field domains (and Array domains in the associated DiscreteGeometry) with storage for nVerts elements in each dimension, so storage for a --- 457,463 ----

A Note on Allocation

For componentwise rectilinear centerings such as ! RectilinearCentering<2,VectorFaceRCTag<2> >, POOMA currently allocates Field domains (and Array domains in the associated DiscreteGeometry) with storage for nVerts elements in each dimension, so storage for a *************** following methods: *** 593,599 **** representation, such as a parameterized function object defining the bounding surface of the domain, with a method to determine whether a point in the space is inside or outside the set. The type of this ! object must be Domain_t,

totalDomain(): --- 593,599 ---- representation, such as a parameterized function object defining the bounding surface of the domain, with a method to determine whether a point in the space is inside or outside the set. The type of this ! object must be Domain_t.
totalDomain(): *************** following methods: *** 604,610 ****
x(): !
returns an array of centering positions corresponding to the total domain. --- 604,610 ----
x(): !
Returns an array of centering positions corresponding to the total domain. *************** told to update themselves if necessary. *** 765,771 **** Fields that are based on its rectilinear mesh geometry classes. The current release provides periodic, reflecting, constant, and linear-extrapolation boundary condition types; future releases may ! may include others. More importantly, the required interface for the boundary condition classes is meant to make it easy for users to implement their own special boundary conditions. By following this interface prescription, applications can attach their own boundary --- 765,771 ---- Fields that are based on its rectilinear mesh geometry classes. The current release provides periodic, reflecting, constant, and linear-extrapolation boundary condition types; future releases may ! include others. More importantly, the required interface for the boundary condition classes is meant to make it easy for users to implement their own special boundary conditions. By following this interface prescription, applications can attach their own boundary *************** volumes by making use of the fact that t *** 795,801 **** beyond the number of vertices at the other side. The existence of guard layers affects the information that Fields provide about the spatial position of their ! elements. The expression f.x(0) is actually the position of one corner of the total domain of the Field f only if f has no guard layers, since the rule is that the physical domain of a Field is always zero-based. This means that in --- 795,801 ---- beyond the number of vertices at the other side. The existence of guard layers affects the information that Fields provide about the spatial position of their ! elements. The expression f.x(0) is actually the position of one corner of the total domain of the Field f only if f has no guard layers, since the rule is that the physical domain of a Field is always zero-based. This means that in *************** line 13 in the following source code: *** 1165,1171 **** 013 const int Dim = 2; 014 const int nVerts = 129; 015 const int nCells = nVerts - 1; ! 016 Interval>Dim> vertexDomain; 017 int d; 018 for (d = 0; d < Dim; d++) 019 { --- 1165,1171 ---- 013 const int Dim = 2; 014 const int nVerts = 129; 015 const int nCells = nVerts - 1; ! 016 Interval<Dim> vertexDomain; 017 int d; 018 for (d = 0; d < Dim; d++) 019 { Index: tut-08.html =================================================================== RCS file: /home/pooma/Repository/r2/docs/tut-08.html,v retrieving revision 1.1 diff -c -p -r1.1 tut-08.html *** tut-08.html 2001/03/19 16:11:14 1.1 --- tut-08.html 2001/03/21 20:00:03 *************** average(const ConstField<Geometry, T, *** 228,234 **** TW, MeshTraits<typename Geometry::Mesh_t>::isLogicallyRectilinear> > Functor_t; typedef ConstField<Geometry, T, EngineTag> Expression1_t; ! typedef ConstField<Geometry, TW, EngineTagW> Expression1_t; typedef View2<Functor_t, Expression1_t, Expression2_t> Ret_t; return Ret_t::make(Functor_t(), f, weight); } --- 228,234 ---- TW, MeshTraits<typename Geometry::Mesh_t>::isLogicallyRectilinear> > Functor_t; typedef ConstField<Geometry, T, EngineTag> Expression1_t; ! typedef ConstField<Geometry, TW, EngineTagW> Expression2_t; typedef View2<Functor_t, Expression1_t, Expression2_t> Ret_t; return Ret_t::make(Functor_t(), f, weight); } *************** files. *** 308,319 **** - SurfaceNormalsArray_t - The type of ConstArray returned by - cellSurfaceNormals(). - - - This_t The type of this class. --- 308,313 ---- *************** href="#dimension-def">dimensionsDim template parameter for their Array data members, such as the array of vertex-vertex mesh spacings returned by vertexDeltas(). This ! value is also the number of integers require to index a single mesh element. While the mesh class's dimension and its spatial dimensionality are the same for logically-rectilinear meshes, an unstructured mesh might well use one-dimensional Arrays to --- 446,452 ---- logically-rectilinear mesh classes is the Dim template parameter for their Array data members, such as the array of vertex-vertex mesh spacings returned by vertexDeltas(). This ! value is also the number of integers required to index a single mesh element. While the mesh class's dimension and its spatial dimensionality are the same for logically-rectilinear meshes, an unstructured mesh might well use one-dimensional Arrays to *************** are lost. POOMA represents this notion b *** 578,584 **** geometry, there is no way to know what the geometry of the resulting Field should be. (The library could make an arbitrary choice, such as always using the geometry from the left operand, but ! this would be wrong as often as it was right). If the two Fields have the same geometry type, it is still not possible to know until run-time whether they really hold equivalent geometry objects. Lacking a clear idea of how to construct the geometry, the --- 572,578 ---- geometry, there is no way to know what the geometry of the resulting Field should be. (The library could make an arbitrary choice, such as always using the geometry from the left operand, but ! this would be wrong as often as it was correct). If the two Fields have the same geometry type, it is still not possible to know until run-time whether they really hold equivalent geometry objects. Lacking a clear idea of how to construct the geometry, the *************** example: *** 985,991 ****
  // Create the geometries, assuming RectilinearMesh object mesh:
! typedef RectilinearMesh<Dim, Cartesian<Dim> > Mesh_t
  DiscreteGeometry<Vert, Mesh_t> geomv(mesh, GuardLayers<Dim>(1));
  DiscreteGeometry<Cell, Mesh_t> geomc(mesh, GuardLayers<Dim>(1));
  
--- 979,985 ----
  
  
  // Create the geometries, assuming RectilinearMesh object mesh:
! typedef RectilinearMesh<Dim, Cartesian<Dim> > Mesh_t;
  DiscreteGeometry<Vert, Mesh_t> geomv(mesh, GuardLayers<Dim>(1));
  DiscreteGeometry<Cell, Mesh_t> geomc(mesh, GuardLayers<Dim>(1));
  
*************** typedef Div<Cell, DiscreteGeometry<
*** 998,1004 ****
  FieldStencil<Div_t> divVV2SC();
  
  // Divergence, Vector/Vert-->Scalar/Cell
! sc = divV2SC(fv);
  

Programmers may also find it convenient to create wrappers by --- 992,998 ---- FieldStencil<Div_t> divVV2SC(); // Divergence, Vector/Vert-->Scalar/Cell ! sc = divV2SC(vv);

Programmers may also find it convenient to create wrappers by *************** the scalar loop; and *** 1044,1050 ****

In addition, boundary conditions are not automatically evaluated before a field is printed. Applications should therefore call applyBoundaryConditions() before output statements to ensure ! that the boundary values displayed are up to date..

Using Pre-Built Boundary Conditions

--- 1038,1044 ----

In addition, boundary conditions are not automatically evaluated before a field is printed. Applications should therefore call applyBoundaryConditions() before output statements to ensure ! that the boundary values displayed are up to date.

Using Pre-Built Boundary Conditions

*************** conditions are added in the functor's This release of POOMA predefines the functors listed below. Their ! effects can be inferred by comparing them with the the boundary conditions given in the previous table.
    --- 1208,1214 ---- which is called internally by the field.

    This release of POOMA predefines the functors listed below. Their ! effects can be inferred by comparing them with the boundary conditions given in the previous table.

      *************** with operators. The source code below, t *** 1555,1564 **** 170 }
!

This is a simple Jacobi saolver for Laplace's equation using the PositionFaceBC boundary condition discussed above. Lines 110-130 set up the mesh, the geometry, and the Brick-engine-based Field. Notice that we do not add any boundary conditions ! to this field, but we do reserve one layer of external guard layers (line 125) We then initialize the Field v and begin iterating. Since we need a temporary field to store the result of the Laplacian stencil, we can efficiently perform two applications of the stencil for each loop (lines 147 and 148). We know --- 1549,1558 ---- 170 } !

This is a simple Jacobi solver for Laplace's equation using the PositionFaceBC boundary condition discussed above. Lines 110-130 set up the mesh, the geometry, and the Brick-engine-based Field. Notice that we do not add any boundary conditions ! to this field, but we do reserve one layer of external guard layers (line 125). We then initialize the Field v and begin iterating. Since we need a temporary field to store the result of the Laplacian stencil, we can efficiently perform two applications of the stencil for each loop (lines 147 and 148). We know *************** to monitor wall-clock time (lines 1 *** 1568,1574 ****

The function applyLaplacian (lines 97-101) takes a Field to assign to and a Field to stencil as arguments. This is where the boundary conditions are ! applied, follwed by the stencil. The Field stencil object Laplace is straightforward, except for the static function applyBoundaryConditions that, on the fly, creates boundary conditions for each face of the input field f and applies them.

--- 1562,1568 ----

The function applyLaplacian (lines 97-101) takes a Field to assign to and a Field to stencil as arguments. This is where the boundary conditions are ! applied, followed by the stencil. The Field stencil object Laplace is straightforward, except for the static function applyBoundaryConditions that, on the fly, creates boundary conditions for each face of the input field f and applies them.

From oldham at codesourcery.com Mon Mar 26 21:43:11 2001 From: oldham at codesourcery.com (Jeffrey Oldham) Date: Mon, 26 Mar 2001 13:43:11 -0800 Subject: Patch: tut-09.html: Minor Typos Message-ID: <20010326134311.B1279@codesourcery.com> Mon Mar 26 13:42:25 2001 Jeffrey D. Oldham * tut-09.html: Fix minor typographical errors. Fix line number references. (Summary): Change "particles" to typewriter font. Correct possessive of singular Particles. Change second parameter of "deferredDestroy" to match the following text. Tested on Netscape 4.76 on Linux Reviewed by Julian Cummings Thanks, Jeffrey D. Oldham oldham at codesourcery.com -------------- next part -------------- Index: tut-09.html =================================================================== RCS file: /home/pooma/Repository/r2/docs/tut-09.html,v retrieving revision 1.1 diff -c -p -r1.1 tut-09.html *** tut-09.html 2001/03/19 16:11:14 1.1 --- tut-09.html 2001/03/26 21:40:15 *************** then randomize the balls' initial positi *** 869,881 ****

Lines 103-110 are the most novel part of this simulation, as they create reflecting boundary conditions for the simulation, and add them ! to the balls object. Lines 103-108 defines where particles bounce; again, this is done in a dimension-independent fashion in ! order to make code evolution as easy as possible. Line 104 turns upper and lower into a reversing boundary condition, ! which line 105 then adds to balls. The main simulation loop now consists of nothing more than advancing the balls in each ! time step, and calling sync() to enforce the boundary conditions. --- 869,881 ----

Lines 103-110 are the most novel part of this simulation, as they create reflecting boundary conditions for the simulation, and add them ! to the balls object. Lines 103-108 define where particles bounce; again, this is done in a dimension-independent fashion in ! order to make code evolution as easy as possible. Line 109 turns upper and lower into a reversing boundary condition, ! which line 110 then adds to balls. The main simulation loop now consists of nothing more than advancing the balls in each ! time step, and calling applyBoundaryCondition() to enforce the boundary conditions. *************** list below summarizes the most important *** 892,898 ****

  • Particles<PL>::initialize(PL &layout): ! Initialize the particles object with the given particle layout. This should be used if the Particles object was created with the default constructor. --- 892,898 ----
    • Particles<PL>::initialize(PL &layout): ! Initialize the Particles object with the given particle layout. This should be used if the Particles object was created with the default constructor. *************** Return the number of registered attribut *** 909,918 ****
    • addAttribute(attrib): Add the given attribute (should be a DynamicArray of the ! proper engine type) to the Particles' attribute list.
    • removeAttribute(attrib): ! Remove the given attribute from the Particles' attribute list.
    • sync(posattrib): --- 909,918 ----
    • addAttribute(attrib): Add the given attribute (should be a DynamicArray of the ! proper engine type) to the Particles's attribute list.
    • removeAttribute(attrib): ! Remove the given attribute from the Particles's attribute list.
    • sync(posattrib): *************** Destroy any particles that were specifie *** 933,939 ****
    • renumber(): Recalculate the per-patch and total domain of the system by inspecting ! the Particles' attribute layout.
    • create(N, patch, renum): Create N particles in the specified patch (and optionally --- 933,939 ----
    • renumber(): Recalculate the per-patch and total domain of the system by inspecting ! the Particles's attribute layout.
    • create(N, patch, renum): Create N particles in the specified patch (and optionally *************** renumber. The domain may be a one-dimen *** 951,957 **** numbers or a list of index numbers. (See the note below on the patchId parameter.) !
    • deferredDestroy(domain, patch): Put the indices of the particles in the given domain in the deferred destroy list of the Particles object, so that they will be destroyed by the next call to performDestroy(). --- 951,957 ---- numbers or a list of index numbers. (See the note below on the patchId parameter.) !
    • deferredDestroy(domain, patchId): Put the indices of the particles in the given domain in the deferred destroy list of the Particles object, so that they will be destroyed by the next call to performDestroy(). From oldham at codesourcery.com Mon Mar 26 21:46:45 2001 From: oldham at codesourcery.com (Jeffrey Oldham) Date: Mon, 26 Mar 2001 13:46:45 -0800 Subject: [pooma-dev] RFA: More Minor Changes to Tutorials In-Reply-To: <20010321152539.A30268@codesourcery.com>; from oldham@codesourcery.com on Wed, Mar 21, 2001 at 03:25:39PM -0800 References: <20010321152539.A30268@codesourcery.com> Message-ID: <20010326134645.C1279@codesourcery.com> Would someone be willing to review these trivial tutorial changes or tell me if I lost an email reply? Thanks to Julian for reviewing the tut-09.html changes. Thanks, Jeffrey D. Oldham oldham at codesourcery.com On Wed, Mar 21, 2001 at 03:25:39PM -0800, Jeffrey Oldham wrote: > Here are changes to tutorials starting with tut-11.html. OK to > commit? > > Wed Mar 21 15:05:19 2001 Jeffrey D. Oldham > * tut-11.html: Remove second of two contiguous periods. > (PrintArray Class): Change "print" to typewriter font. Fix > typos. Add a space between a type and a variable. > (dbprint): s/;/,/ > s/dB*/db*/ > Change type's and function's names to typewriter fonts. > * tut-12.html (Object Serialization): s/principle/principal/ > (Using POOMA I/O): Add a comma and change "type" to typewriter > font. > > Thanks, > Jeffrey D. Oldham > oldham at codesourcery.com -------------- next part -------------- Index: tut-11.html =================================================================== RCS file: /home/pooma/Repository/r2/docs/tut-11.html,v retrieving revision 1.1 diff -c -p -r1.1 tut-11.html *** tut-11.html 2001/03/19 16:11:14 1.1 --- tut-11.html 2001/03/26 21:46:24 *************** special "off" setting, by calling se *** 147,153 ****

      When running with multiple threads in a context, only one thread does the output, either for standard C++ stream output, or for Inform ! output.. This is the "control" thread, which manages task assignment to the others. It is important to note that any output to an Inform which reads data from a multi-patch container is independent of whether other threads might be currently modifying those values. To avoid this, insert a --- 147,153 ----

      When running with multiple threads in a context, only one thread does the output, either for standard C++ stream output, or for Inform ! output. This is the "control" thread, which manages task assignment to the others. It is important to note that any output to an Inform which reads data from a multi-patch container is independent of whether other threads might be currently modifying those values. To avoid this, insert a *************** containers.

      *** 218,224 ****

      The PrintArray Class

      The typical way to use PrintArray is to construct a ! PrintArray object, then use its print() methods for sending formatted ASCII output of POOMA container data to a stream such as cout or an Inform object. The constructor accepts values for six formatting parameters, which are maintained as member data in the object. --- 218,224 ----

      The PrintArray Class

      The typical way to use PrintArray is to construct a ! PrintArray object, then use its print() methods for sending formatted ASCII output of POOMA container data to a stream such as cout or an Inform object. The constructor accepts values for six formatting parameters, which are maintained as member data in the object. *************** the total number of significant digits.< *** 261,267 **** setCarReturn(), carReturn() :

      ! If less than 0, print all values in a row (first array index) one one like of output. If greater than 0, specifies the number of values to print before breaking the output with a carriage return.
      --- 261,267 ---- setCarReturn(), carReturn() :
      ! If less than 0, print all values in a row (first array index) on one line of output. If greater than 0, specifies the number of values to print before breaking the output with a carriage return.
      *************** attributes from Particles), but *** 302,308 **** restrictions are that the container must export an enum value dimensions, such as Array::dimensions, and must have an array-indexing capability such that ! operator()(int io, int i1, ..., int iN) returns a contained data value. (Here, N=dimensions-1.)

      If you pass in a view of an Array, for example, to the first --- 302,308 ---- restrictions are that the container must export an enum value dimensions, such as Array::dimensions, and must have an array-indexing capability such that ! operator()(int i0, int i1, ..., int iN) returns a contained data value. (Here, N=dimensions-1.)

      If you pass in a view of an Array, for example, to the first *************** These code snips illustrate the differen *** 314,320 **** like for a 3D Array:

      ! Range<3>r(Range<1>(2,10,2),Range<1>(1,3,1),Range<1>(3));
        Array<3> a(20,20,20); // ... assign values to a ...
        
        Inform pout;   // An output stream
      --- 314,320 ----
        like for a 3D Array:
        
        
      ! Range<3> r(Range<1>(2,10,2),Range<1>(1,3,1),Range<1>(3));
        Array<3> a(20,20,20); // ... assign values to a ...
        
        Inform pout;   // An output stream
      *************** prints
      *** 389,395 ****
        

      Many debuggers have a command prompt or expression-evaluation window and allow interactive calling of functions with simple arguments. Few, if any, of these debuggers have a convenient means to invoke template functions even when ! the templates have been instantiated in the executable code; and none allow interactive construction of objects or invocation of objects' member functions, whether the associated class and/or member functions are templated or not.

      --- 389,395 ----

      Many debuggers have a command prompt or expression-evaluation window and allow interactive calling of functions with simple arguments. Few, if any, of these debuggers have a convenient means to invoke template functions even when ! the templates have been instantiated in the executable code, and none allow interactive construction of objects or invocation of objects' member functions, whether the associated class and/or member functions are templated or not.

      *************** or s(s.physicalDomain()), to ex *** 739,745 **** not possible interactively.

      The dbSetCarReturn() invocations illustrate more of the POOMA ! dB*() function family. These invoke the corresponding PrintArray functions on a global PrintArray object maintained internally by POOMA. This sets a format state that persists from one interactive function call to the next. Here is the set of these --- 739,745 ---- not possible interactively.

      The dbSetCarReturn() invocations illustrate more of the POOMA ! db*() function family. These invoke the corresponding PrintArray functions on a global PrintArray object maintained internally by POOMA. This sets a format state that persists from one interactive function call to the next. Here is the set of these *************** int dbSpacing(); *** 761,768 **** void dbSetSpacing(int val);

      !

      Two additional functions allow toggling between the default Inform object ! used by dbprint() and one or more user-defined Inform objects:

      --- 761,768 ---- void dbSetSpacing(int val);
      !

      Two additional functions allow toggling between the default Inform object ! used by dbprint() and one or more user-defined Inform objects:

      Index: tut-12.html =================================================================== RCS file: /home/pooma/Repository/r2/docs/tut-12.html,v retrieving revision 1.1 diff -c -p -r1.1 tut-12.html *** tut-12.html 2001/03/19 16:11:14 1.1 --- tut-12.html 2001/03/26 21:46:25 *************** but not as good for multi-application co *** 93,99 **** other hand, there are many situations when one would just as soon not have the overhead of an object-oriented database no matter how streamlined.

      Object-oriented applications benefit enormously from object-oriented ! data management. After all, the principle reason many programmers prefer object-oriented languages is so that they can create and exploit new data types. Object storage systems provide a way to store and retrieve user-defined types as easily as intrinsic types. --- 93,99 ---- other hand, there are many situations when one would just as soon not have the overhead of an object-oriented database no matter how streamlined.

      Object-oriented applications benefit enormously from object-oriented ! data management. After all, the principal reason many programmers prefer object-oriented languages is so that they can create and exploit new data types. Object storage systems provide a way to store and retrieve user-defined types as easily as intrinsic types. *************** may be summarized as follows: *** 234,240 **** Report the number of distinct types in the object set.

    • ! Report the name of a type given its index k, where k = 0, ... (number of types -1).
    • --- 234,240 ---- Report the number of distinct types in the object set.
    • ! Report the name of a type given its index k, where k = 0, ..., (number of types -1).
    • *************** instances.
    • *** 245,251 **** For a given type indicated by type name or index k, report the name of object j where j = 0 , ..., (number of instances -1).
    ! The ID of an object is an integer (type long) that by convention is the position of the object in the list of instances of that type. That is, if an instance of a given type is second on the list, its ID is 1 (indexed from zero). The primary key for objects contained in an object set is the --- 245,251 ---- For a given type indicated by type name or index k, report the name of object j where j = 0 , ..., (number of instances -1).
! The ID of an object is an integer (type long) that by convention is the position of the object in the list of instances of that type. That is, if an instance of a given type is second on the list, its ID is 1 (indexed from zero). The primary key for objects contained in an object set is the From allan at stokes.ca Mon Mar 26 22:44:28 2001 From: allan at stokes.ca (Allan Stokes) Date: Mon, 26 Mar 2001 14:44:28 -0800 Subject: [pooma-dev] [RFA]: Tutorial Typographical Changes In-Reply-To: <20010326133802.A1279@codesourcery.com> Message-ID: Review of Jeffrey's patch. Everything seems fine. Didn't understand implication of s/VectorFace/VectorFaceRCTag/g so this is not confirmed. Two small suggestions (one on EngineTag, one about "Pooma code"). > * background.html (struct AddOp): Match parameter name with > parameter use. OK > (struct MulOp): Likewise. OK > * tut-02.html: Add several missing spaces. OK > ? (RBJacobi): Change array's name to match previous line. OK > (Periodic Boundary Conditions): Fix line numbers for ApplyPeriodic. OK > * tut-04.html: Move sentence regarding component forwarding from > next paragraph to preceding paragraph concerning component > forwarding. 404,411 all I see here is the lexemes " Remove an extra space and an extraneous comma. Add a missing > parenthesis. Fix array's name to match the other text. EngineTag is still mentioned in the descriptive text. Maybe better to remove emphasis and just say "input EngineTag" meaning E > ? Emphasize "ghost," which is implicitly defined. OK > ? Reword last sentence to de\"{e}mphasize Pooma developers' programming > expertise. Rather than "Pooma code uses" how about something along the lines of "Production code will employ" more complicated access loops ... advantage of cache behavior. > (accumulateWithLoop): Substitute "first0" and "last0" for "f0" and > "l0". "l0" looks like the number 10. Good. Didn't check myself that you got them all. > Remove some extraneous words. OK > * tut-06.html: "Recurring," not "recursing." OK > * tut-07.html: Remove extraneous word. Fix a comma. Fix > capitalization. Remove one of double word. OK > Add space between closing ">" in nested template. OK > ? s/VectorFace/VectorFaceRCTag/g I'm not up to speed on this. > Change expression font to typewriter. OK > s/>/ ? * tut-08.html: (average): Change second "Expression1_t" to > "Expression2_t". OK > (Exported typedefs): Remove second, extraneous > "SurfaceNormalsArray_t". OK > Fix typo. Remove second of two contiguous periods. Remove second > of repeated world. OK > Suggested substitution s/right/correct/ to avoid confusion with > "left". OK > ? (FieldStencil example): Add ending ";". s/fv/vv/ to match > previous variable declaration. OK if this really was just a typo. I don't see any fv declared. > Fix misspelled words. Add period at the end of a sentence. OK > > Thanks, > Jeffrey D. Oldham > oldham at codesourcery.com From oldham at codesourcery.com Mon Mar 26 23:27:13 2001 From: oldham at codesourcery.com (Jeffrey Oldham) Date: Mon, 26 Mar 2001 15:27:13 -0800 Subject: Patch: More Minor Changes to Tutorials Message-ID: <20010326152713.A1697@codesourcery.com> Mon Mar 26 15:26:35 2001 Jeffrey D. Oldham * tut-11.html: Remove second of two contiguous periods. (PrintArray Class): Change "print" to typewriter font. Fix typos. Add a space between a type and a variable. (dbprint): s/;/,/ s/dB*/db*/ Change type's and function's names to typewriter fonts. * tut-12.html (Object Serialization): s/principle/principal/ (Using POOMA I/O): Add a comma and change "type" to typewriter font. Tested on Netscape 4.76 on Linux Approved by Allan Stokes Thanks! Thanks, Jeffrey D. Oldham oldham at codesourcery.com From oldham at codesourcery.com Mon Mar 26 23:51:44 2001 From: oldham at codesourcery.com (Jeffrey Oldham) Date: Mon, 26 Mar 2001 15:51:44 -0800 Subject: Patch: Tutorial Typographical Errors Message-ID: <20010326155144.A1707@codesourcery.com> Mon Mar 26 15:50:55 2001 Jeffrey D. Oldham * background.html (struct AddOp): Match parameter name with parameter use. (struct MulOp): Likewise. * tut-02.html: Add several missing spaces. (RBJacobi): Change array's name to match previous line. (Periodic Boundary Conditions): Fix line numbers for ApplyPeriodic. * tut-04.html: Move sentence regarding component forwarding from next paragraph to preceding paragraph concerning component forwarding. Remove an extra space and an extraneous comma. Add a missing parenthesis. Fix array's name to match the other text. Emphasize "ghost," which is implicitly defined. Reword last sentence to de\"{e}mphasize Pooma developers' programming expertise. (accumulateWithLoop): Substitute "first0" and "last0" for "f0" and "l0". "l0" looks like the number 10. Remove some extraneous words. * tut-06.html: "Recurring," not "recursing." * tut-07.html: Remove extraneous word. Fix a comma. Fix capitalization. Remove one of double word. Add space between closing ">" in nested template. Change expression font to typewriter. s/>/
  struct AddOp
  {
!     static inline double apply(const double & left, const double & y)
      {
          return x + y;
      }
--- 761,767 ----
  
  struct AddOp
  {
!     static inline double apply(const double & x, const double & y)
      {
          return x + y;
      }
*************** struct AddOp
*** 769,775 ****
  
  struct MulOp
  {
!     static inline double apply(const double & left, const double & y)
      {
          return x * y;
      }
--- 769,775 ----
  
  struct MulOp
  {
!     static inline double apply(const double & x, const double & y)
      {
          return x * y;
      }
Index: tut-02.html
===================================================================
RCS file: /home/pooma/Repository/r2/docs/tut-02.html,v
retrieving revision 1.1
diff -c -p -r1.1 tut-02.html
*** tut-02.html	2001/03/19 16:11:13	1.1
--- tut-02.html	2001/03/21 19:59:59
*************** objects in some way.
*** 445,451 ****
  

In POOMA, that way is to use a 2-dimensional Interval or Range instead of a pair of 1-dimensional Intervals or ! Ranges. A 2-dimensionalInterval is just the cross-product of its 1-dimensional constituents: it specifies a dense rectangular patch of an array. Similarly, a 2-dimensional Range is a generalization of the red or black squares --- 445,451 ----

In POOMA, that way is to use a 2-dimensional Interval or Range instead of a pair of 1-dimensional Intervals or ! Ranges. A 2-dimensional Interval is just the cross-product of its 1-dimensional constituents: it specifies a dense rectangular patch of an array. Similarly, a 2-dimensional Range is a generalization of the red or black squares *************** need not have the same spacing along dif *** 455,461 ****

An N-dimensionalInterval is declared in the same way as its 1-dimensional cousin. An N-dimensional Interval is usually initialized by giving its ! constructor N 1-dimensionalIntervals as arguments, as shown in the following example:

--- 455,461 ----
  

An N-dimensionalInterval is declared in the same way as its 1-dimensional cousin. An N-dimensional Interval is usually initialized by giving its ! constructor N 1-dimensional Intervals as arguments, as shown in the following example:

*************** using 2-dimensional subscripting:
*** 537,543 ****
  32
  33      // The array we'll be solving for.
  34      Array<2> V(guarded);
! 35      x = 0.0;
  36
  37      // The right hand side of the equation.
  38      Array<2> b(calc);
--- 537,543 ----
  32
  33      // The array we'll be solving for.
  34      Array<2> V(guarded);
! 35      V = 0.0;
  36
  37      // The right hand side of the equation.
  38      Array<2> b(calc);
*************** used to ensure zero boundary conditions.
*** 577,584 ****
  condition could be represented equally well by assigning values to
  these padding elements.
  
! 

UsingInterval objects that run from 1 to N-2 to ! specify the dimensions of theInterval object calc defined on line 28 means that when the array b is defined (line 38), its legal indices also run from 1 to N-2 along each axis. While POOMA uses 0..N-1 indexing by --- 577,584 ---- condition could be represented equally well by assigning values to these padding elements. !

Using Interval objects that run from 1 to N-2 to ! specify the dimensions of the Interval object calc defined on line 28 means that when the array b is defined (line 38), its legal indices also run from 1 to N-2 along each axis. While POOMA uses 0..N-1 indexing by *************** either axis are padding, and are to be o *** 632,638 **** iteration.

The function that actually updates the periodic boundary conditions ! is called ApplyPeriodic(), and is shown on lines 20-28 below. The key to understanding this code is that when a "naked" integer is used to subscript a POOMA array, the result of that subscripting operation is reduced by one dimension in relation to that --- 632,638 ---- iteration.

The function that actually updates the periodic boundary conditions ! is called ApplyPeriodic(), and is shown on lines 20-33 below. The key to understanding this code is that when a "naked" integer is used to subscript a POOMA array, the result of that subscripting operation is reduced by one dimension in relation to that *************** point yields an Array with just *** 650,656 **** zero-dimensional Array (at least not in this release of POOMA), which is what the Loc<2> would have returned. The reduction in rank has to come from compile-time information, so ! Loc and integers reduce dimensionality, butInterval and Range do not.

--- 650,656 ----
  zero-dimensional Array (at least not in this release of
  POOMA), which is what the Loc<2> would have returned.
  The reduction in rank has to come from compile-time information, so
! Loc and integers reduce dimensionality, but Interval
  and Range do not.
  
  
*************** this, using the declarations:
*** 788,794 ****
  
  
      
!       Taking a view using anInterval
      
        
a(I)
--- 788,794 ---- ! Taking a view using an Interval
a(I)
*************** this, using the declarations: *** 833,839 **** ! Taking a read-only view using anInterval
a.read(I)
--- 833,839 ---- ! Taking a read-only view using an Interval
a.read(I)
Index: tut-04.html =================================================================== RCS file: /home/pooma/Repository/r2/docs/tut-04.html,v retrieving revision 1.1 diff -c -p -r1.1 tut-04.html *** tut-04.html 2001/03/19 16:11:14 1.1 --- tut-04.html 2001/03/21 20:00:00 *************** supported. Please contact pooma-devel at lanl.gov for information on using other, more complicated types. !

The Array::comp() method used on line 16 does ! component forwarding. The expression rays.comp(2) returns an Array<double> that supports writing into the second component of each vector element of rays. This is a data-parallel --- 404,411 ---- href="mailto:pooma-devel at lanl.gov">pooma-devel at lanl.gov for information on using other, more complicated types. !

The Array::comp() method used on line 16 does component forwarding. The expression rays.comp(2) returns an Array<double> that supports writing into the second component of each vector element of rays. This is a data-parallel *************** statement that works in a way analogous *** 413,421 **** except that the POOMA evaluator will calculate patches in parallel. Thus, if a program had an array of tensors T, it could change the element in the 0th row, 1st column with T.comp(0, ! 1). Note that, unlike Array, both ! Vector and Tensor always index from ! zero.

Line 24 shows that, as expected, the ith component of a Vector V can be accessed for both --- 413,422 ---- except that the POOMA evaluator will calculate patches in parallel. Thus, if a program had an array of tensors T, it could change the element in the 0th row, 1st column with T.comp(0, ! 1). Note that, unlike Array, both Vector and ! Tensor always index from zero. Component forwarding is ! intimately related to the notion of component views, which are ! discussed below.

Line 24 shows that, as expected, the ith component of a Vector V can be accessed for both *************** reading and writing using the syntax rays(i)(0) returns the ith element of the Vector rays, while the second subscript returns the zeroth component of that vector. - Component forwarding is intimately related to the notion of component - views, which are discussed below.

Line 28 shows that Vectors can be initialized with Size element values. Similarly, instances of --- 425,430 ---- *************** as are the following named functions on *** 508,524 **** (i,j) of the transpose is equal to element (j,i) of the input tensor t. !

template<class OutputEngineTag, int D, class T, class EngineTag>
Tensor<D,T,OutputEngineTag> &symmetrize(Tensor<D,T,E> &t)
:
Returns a tensor of type ! Tensor<D,T,E>, applying a n appropriate symmetrizing operation to convert from the symmetry of the input EngineTag (for example, Full) to the symmetry of the OutputEngineTag (for example, ! Antisymmetric. This is invoked using explicit template instantiation for the desired OutputEngineTag. For example:
! Tensor>2,double,Full> t(1.0, 2.0, 3.0, 4.0);
! Tensor>2,double,Antisymmetric> at = symmetrize<Antisymmetric>(t);
  std::cout << " t = " << t << std::endl;
  std::cout << "at = " << at << std::endl;
  
--- 507,523 ---- (i,j) of the transpose is equal to element (j,i) of the input tensor t. !

template<class OutputEngineTag, int D, class T, class E>
Tensor<D,T,OutputEngineTag> &symmetrize(Tensor<D,T,E> &t)
:
Returns a tensor of type ! Tensor<D,T,E>, applying an appropriate symmetrizing operation to convert from the symmetry of the input EngineTag (for example, Full) to the symmetry of the OutputEngineTag (for example, ! Antisymmetric). This is invoked using explicit template instantiation for the desired OutputEngineTag. For example:
! Tensor<2,double,Full> t(1.0, 2.0, 3.0, 4.0);
! Tensor<2,double,Antisymmetric> at = symmetrize<Antisymmetric>(t);
  std::cout << " t = " << t << std::endl;
  std::cout << "at = " << at << std::endl;
  
*************** via matrix-matrix product of the two arg *** 547,553 **** These functions also operate on Arrays of Tensor ! and Vector elements (and DynamicArrays, and Fields.)

Lines 37-39 show construction of a diagonal tensor using the Tensor class with Diagonal for the EngineTag --- 546,552 ---- These functions also operate on Arrays of Tensor ! and Vector elements (and DynamicArrays and Fields).

Lines 37-39 show construction of a diagonal tensor using the Tensor class with Diagonal for the EngineTag *************** like arrays of any other type. *** 568,574 ****

Accumulation operators such as operator*=() acting on Tensor<D,T,EngineTag> may result in a Tensor having ! different symmetry (different EngineTag than what you are accumulating into. For example,

  Tensor<2,double,Antisymmetric> t1, t2;
  // ... assign values
--- 567,573 ----
  
  

Accumulation operators such as operator*=() acting on Tensor<D,T,EngineTag> may result in a Tensor having ! different symmetry (different EngineTag than what you are accumulating into). For example,

  Tensor<2,double,Antisymmetric> t1, t2;
  // ... assign values
*************** Array< 2, double, MultiPatch<Unifo
*** 611,617 ****
  logical domain of the array being created.  The 10×10
  Loc is then used in the UniformGridLayout
  declaration to specify that the total domain is to be managed using a
! total of 100 patches.  When the Array a is
  finally declared, Array's third template parameter is
  explicitly instantiated using MultiPatch, and
  the layout object layout is used as a constructor parameter.
--- 610,616 ----
  logical domain of the array being created.  The 10×10
  Loc is then used in the UniformGridLayout
  declaration to specify that the total domain is to be managed using a
! total of 100 patches.  When the Array A is
  finally declared, Array's third template parameter is
  explicitly instantiated using MultiPatch, and
  the layout object layout is used as a constructor parameter.
*************** patch. As the overhead for evaluating a 
*** 752,758 ****
  small sub-patch evaluations hurt efficiency.
  
  

One mechanism for fixing this problem is to introduce ! guard (or ghost) layers. This done by having the individual patches overlap slightly. Each patch still "owns" the same data as before, but surrounds that data with a layer of guards. These guards duplicate data that is owned by other patches, and can only be read --- 751,757 ---- small sub-patch evaluations hurt efficiency.

One mechanism for fixing this problem is to introduce ! guard (or ghost) layers. This done by having the individual patches overlap slightly. Each patch still "owns" the same data as before, but surrounds that data with a layer of guards. These guards duplicate data that is owned by other patches, and can only be read *************** glossed over, since the main intent of t *** 815,829 **** intermediate or advanced users of the library can tailor it to their needs. !

The most common array layout in POOMA is called a brick ! layout, and is signaled by the use of the class Brick as an ! engine specifier in template instantiation. Conceptually, a brick is ! a dense, rectangular patch of multi-dimensional space, such as the ! area [0..10]×[0..10]. Programs written by the typical user ! access the elements of bricks using nested loops, the indices of which ! sweep through the brick's extent along a particular axis. Programs ! written by POOMA's developers use more complicated access ! loops in order to take full advantage of cache behavior.

The three functions accumulateWithLoop() defined below are the guts of the general-purpose adding routine that we will build up --- 814,828 ---- intermediate or advanced users of the library can tailor it to their needs. !

The most common array layout in POOMA is called a brick layout, and ! is signaled by the use of the class Brick as an engine ! specifier in template instantiation. Conceptually, a brick is a ! dense, rectangular patch of multi-dimensional space, such as the area ! [0..10]×[0..10]. Programs written by the typical user access ! the elements of bricks using nested loops, the indices of which sweep ! through the brick's extent along a particular axis. POOMA code uses ! more complicated access loops in order to take full advantage of cache ! behavior.

The three functions accumulateWithLoop() defined below are the guts of the general-purpose adding routine that we will build up *************** inline T accumulateWithLoop( *** 844,851 **** const ConstArray<1,T,E>& x ){ T sum = 0; ! int f0 = x.first(0), l0 = x.last(0); ! for (int i0=f0; i0<=l0; ++i0) sum += x(i0); return sum; } --- 843,850 ---- const ConstArray<1,T,E>& x ){ T sum = 0; ! int first0 = x.first(0), last0 = x.last(0); ! for (int i0=first0; i0<=last0; ++i0) sum += x(i0); return sum; } *************** inline T accumulateWithLoop( *** 855,864 **** const ConstArray<2,T,E>& x ){ T sum = 0; ! int f0 = x.first(0), f1 = x.first(1); ! int l0 = x.last(0), l1 = x.last(1); for (int i1=f1; i1<=l1; ++i1) ! for (int i0=f0; i0<=l0; ++i0) sum += x(i0, i1); return sum; } --- 854,863 ---- const ConstArray<2,T,E>& x ){ T sum = 0; ! int first0 = x.first(0), f1 = x.first(1); ! int last0 = x.last(0), l1 = x.last(1); for (int i1=f1; i1<=l1; ++i1) ! for (int i0=first0; i0<=last0; ++i0) sum += x(i0, i1); return sum; } *************** inline T accumulateWithLoop( *** 868,878 **** const ConstArray<3,T,E>& x ){ T sum = 0; ! int f0 = x.first(0), f1 = x.first(1), f2 = x.first(2); ! int l0 = x.last(0), l1 = x.last(1), l2 = x.last(2); for (int i2=f2; i2<=l2; ++i2) for (int i1=f1; i1<=l1; ++i1) ! for (int i0=f0; i0<=l0; ++i0) sum += x(i0, i1, i2); return sum; } --- 867,877 ---- const ConstArray<3,T,E>& x ){ T sum = 0; ! int first0 = x.first(0), f1 = x.first(1), f2 = x.first(2); ! int last0 = x.last(0), l1 = x.last(1), l2 = x.last(2); for (int i2=f2; i2<=l2; ++i2) for (int i1=f1; i1<=l1; ++i1) ! for (int i0=first0; i0<=last0; ++i0) sum += x(i0, i1, i2); return sum; } *************** T accumulate( *** 894,900 **** }

!

This function just calls through to whichever version of accumulateWithLoop() handles arrays of dimension D. Since accumulateWithLoop() is an inline function, this one extra function call will be eliminated by the compiler when --- 893,899 ---- }

!

This function just calls whichever version of accumulateWithLoop() handles arrays of dimension D. Since accumulateWithLoop() is an inline function, this one extra function call will be eliminated by the compiler when Index: tut-06.html =================================================================== RCS file: /home/pooma/Repository/r2/docs/tut-06.html,v retrieving revision 1.1 diff -c -p -r1.1 tut-06.html *** tut-06.html 2001/03/19 16:11:14 1.1 --- tut-06.html 2001/03/21 20:00:01 *************** in the <math.h> header file.) *** 215,221 ****

The second version of fft() does the real number-crunching. If the computation has reached its final stage, odd and even elements are combined directly (lines 106-111). If the ! computation is still recursing, the elements are shuffled, a half-sized transform is applied on each subsection, and the results are combined (lines 100-102). All of these operations use indirect addressing to move data values around. Most of the rest of the --- 215,221 ----

The second version of fft() does the real number-crunching. If the computation has reached its final stage, odd and even elements are combined directly (lines 106-111). If the ! computation is still recurring, the elements are shuffled, a half-sized transform is applied on each subsection, and the results are combined (lines 100-102). All of these operations use indirect addressing to move data values around. Most of the rest of the Index: tut-07.html =================================================================== RCS file: /home/pooma/Repository/r2/docs/tut-07.html,v retrieving revision 1.1 diff -c -p -r1.1 tut-07.html *** tut-07.html 2001/03/19 16:11:14 1.1 --- tut-07.html 2001/03/21 20:00:02 *************** class RectilinearCentering *** 339,345 ****

The RectilinearCenteringTag template parameter can be ! instantiated using a class whose centerings which are defined componentwise. This means that each component of a multicomponent field element type such as Vector or Tensor can have its own independent centering position. The value of the Boolean --- 339,345 ----

The RectilinearCenteringTag template parameter can be ! instantiated using a class whose centerings are defined componentwise. This means that each component of a multicomponent field element type such as Vector or Tensor can have its own independent centering position. The value of the Boolean *************** mesh with complete set of centering poin *** 426,432 ****

As an example of componentwise centering, consider ! RectilinearCentering<2,VectorFaceRCTag<2>>. The Y components of a field element of Vector type are centered on the faces perpendicular to the Y axis, while the X components are centered on the faces perpendicular to --- 426,432 ----

As an example of componentwise centering, consider ! RectilinearCentering<2,VectorFaceRCTag<2> >. The Y components of a field element of Vector type are centered on the faces perpendicular to the Y axis, while the X components are centered on the faces perpendicular to *************** WIDTH="451"> *** 448,454 **** Figure 4: Example of componentwise centering, showing ! RectilinearCentering<2,VectorFace<2>> --- 448,454 ---- Figure 4: Example of componentwise centering, showing ! RectilinearCentering<2,VectorFace<2>> *************** WIDTH="451"> *** 457,463 ****

A Note on Allocation

For componentwise rectilinear centerings such as ! RectilinearCentering<2,VectorFace<2> >, POOMA currently allocates Field domains (and Array domains in the associated DiscreteGeometry) with storage for nVerts elements in each dimension, so storage for a --- 457,463 ----

A Note on Allocation

For componentwise rectilinear centerings such as ! RectilinearCentering<2,VectorFaceRCTag<2> >, POOMA currently allocates Field domains (and Array domains in the associated DiscreteGeometry) with storage for nVerts elements in each dimension, so storage for a *************** following methods: *** 593,599 **** representation, such as a parameterized function object defining the bounding surface of the domain, with a method to determine whether a point in the space is inside or outside the set. The type of this ! object must be Domain_t,

totalDomain(): --- 593,599 ---- representation, such as a parameterized function object defining the bounding surface of the domain, with a method to determine whether a point in the space is inside or outside the set. The type of this ! object must be Domain_t.
totalDomain(): *************** following methods: *** 604,610 ****
x(): !
returns an array of centering positions corresponding to the total domain. --- 604,610 ----
x(): !
Returns an array of centering positions corresponding to the total domain. *************** told to update themselves if necessary. *** 765,771 **** Fields that are based on its rectilinear mesh geometry classes. The current release provides periodic, reflecting, constant, and linear-extrapolation boundary condition types; future releases may ! may include others. More importantly, the required interface for the boundary condition classes is meant to make it easy for users to implement their own special boundary conditions. By following this interface prescription, applications can attach their own boundary --- 765,771 ---- Fields that are based on its rectilinear mesh geometry classes. The current release provides periodic, reflecting, constant, and linear-extrapolation boundary condition types; future releases may ! include others. More importantly, the required interface for the boundary condition classes is meant to make it easy for users to implement their own special boundary conditions. By following this interface prescription, applications can attach their own boundary *************** volumes by making use of the fact that t *** 795,801 **** beyond the number of vertices at the other side. The existence of guard layers affects the information that Fields provide about the spatial position of their ! elements. The expression f.x(0) is actually the position of one corner of the total domain of the Field f only if f has no guard layers, since the rule is that the physical domain of a Field is always zero-based. This means that in --- 795,801 ---- beyond the number of vertices at the other side. The existence of guard layers affects the information that Fields provide about the spatial position of their ! elements. The expression f.x(0) is actually the position of one corner of the total domain of the Field f only if f has no guard layers, since the rule is that the physical domain of a Field is always zero-based. This means that in *************** line 13 in the following source code: *** 1165,1171 **** 013 const int Dim = 2; 014 const int nVerts = 129; 015 const int nCells = nVerts - 1; ! 016 Interval>Dim> vertexDomain; 017 int d; 018 for (d = 0; d < Dim; d++) 019 { --- 1165,1171 ---- 013 const int Dim = 2; 014 const int nVerts = 129; 015 const int nCells = nVerts - 1; ! 016 Interval<Dim> vertexDomain; 017 int d; 018 for (d = 0; d < Dim; d++) 019 { Index: tut-08.html =================================================================== RCS file: /home/pooma/Repository/r2/docs/tut-08.html,v retrieving revision 1.1 diff -c -p -r1.1 tut-08.html *** tut-08.html 2001/03/19 16:11:14 1.1 --- tut-08.html 2001/03/21 20:00:03 *************** average(const ConstField<Geometry, T, *** 228,234 **** TW, MeshTraits<typename Geometry::Mesh_t>::isLogicallyRectilinear> > Functor_t; typedef ConstField<Geometry, T, EngineTag> Expression1_t; ! typedef ConstField<Geometry, TW, EngineTagW> Expression1_t; typedef View2<Functor_t, Expression1_t, Expression2_t> Ret_t; return Ret_t::make(Functor_t(), f, weight); } --- 228,234 ---- TW, MeshTraits<typename Geometry::Mesh_t>::isLogicallyRectilinear> > Functor_t; typedef ConstField<Geometry, T, EngineTag> Expression1_t; ! typedef ConstField<Geometry, TW, EngineTagW> Expression2_t; typedef View2<Functor_t, Expression1_t, Expression2_t> Ret_t; return Ret_t::make(Functor_t(), f, weight); } *************** files. *** 308,319 **** - SurfaceNormalsArray_t - The type of ConstArray returned by - cellSurfaceNormals(). - - - This_t The type of this class. --- 308,313 ---- *************** href="#dimension-def">dimensionsDim template parameter for their Array data members, such as the array of vertex-vertex mesh spacings returned by vertexDeltas(). This ! value is also the number of integers require to index a single mesh element. While the mesh class's dimension and its spatial dimensionality are the same for logically-rectilinear meshes, an unstructured mesh might well use one-dimensional Arrays to --- 446,452 ---- logically-rectilinear mesh classes is the Dim template parameter for their Array data members, such as the array of vertex-vertex mesh spacings returned by vertexDeltas(). This ! value is also the number of integers required to index a single mesh element. While the mesh class's dimension and its spatial dimensionality are the same for logically-rectilinear meshes, an unstructured mesh might well use one-dimensional Arrays to *************** are lost. POOMA represents this notion b *** 578,584 **** geometry, there is no way to know what the geometry of the resulting Field should be. (The library could make an arbitrary choice, such as always using the geometry from the left operand, but ! this would be wrong as often as it was right). If the two Fields have the same geometry type, it is still not possible to know until run-time whether they really hold equivalent geometry objects. Lacking a clear idea of how to construct the geometry, the --- 572,578 ---- geometry, there is no way to know what the geometry of the resulting Field should be. (The library could make an arbitrary choice, such as always using the geometry from the left operand, but ! this would be wrong as often as it was correct). If the two Fields have the same geometry type, it is still not possible to know until run-time whether they really hold equivalent geometry objects. Lacking a clear idea of how to construct the geometry, the *************** example: *** 985,991 ****
  // Create the geometries, assuming RectilinearMesh object mesh:
! typedef RectilinearMesh<Dim, Cartesian<Dim> > Mesh_t
  DiscreteGeometry<Vert, Mesh_t> geomv(mesh, GuardLayers<Dim>(1));
  DiscreteGeometry<Cell, Mesh_t> geomc(mesh, GuardLayers<Dim>(1));
  
--- 979,985 ----
  
  
  // Create the geometries, assuming RectilinearMesh object mesh:
! typedef RectilinearMesh<Dim, Cartesian<Dim> > Mesh_t;
  DiscreteGeometry<Vert, Mesh_t> geomv(mesh, GuardLayers<Dim>(1));
  DiscreteGeometry<Cell, Mesh_t> geomc(mesh, GuardLayers<Dim>(1));
  
*************** typedef Div<Cell, DiscreteGeometry<
*** 998,1004 ****
  FieldStencil<Div_t> divVV2SC();
  
  // Divergence, Vector/Vert-->Scalar/Cell
! sc = divV2SC(fv);
  

Programmers may also find it convenient to create wrappers by --- 992,998 ---- FieldStencil<Div_t> divVV2SC(); // Divergence, Vector/Vert-->Scalar/Cell ! sc = divV2SC(vv);

Programmers may also find it convenient to create wrappers by *************** the scalar loop; and *** 1044,1050 ****

In addition, boundary conditions are not automatically evaluated before a field is printed. Applications should therefore call applyBoundaryConditions() before output statements to ensure ! that the boundary values displayed are up to date..

Using Pre-Built Boundary Conditions

--- 1038,1044 ----

In addition, boundary conditions are not automatically evaluated before a field is printed. Applications should therefore call applyBoundaryConditions() before output statements to ensure ! that the boundary values displayed are up to date.

Using Pre-Built Boundary Conditions

*************** conditions are added in the functor's This release of POOMA predefines the functors listed below. Their ! effects can be inferred by comparing them with the the boundary conditions given in the previous table.
    --- 1208,1214 ---- which is called internally by the field.

    This release of POOMA predefines the functors listed below. Their ! effects can be inferred by comparing them with the boundary conditions given in the previous table.

      *************** with operators. The source code below, t *** 1555,1564 **** 170 }
!

This is a simple Jacobi saolver for Laplace's equation using the PositionFaceBC boundary condition discussed above. Lines 110-130 set up the mesh, the geometry, and the Brick-engine-based Field. Notice that we do not add any boundary conditions ! to this field, but we do reserve one layer of external guard layers (line 125) We then initialize the Field v and begin iterating. Since we need a temporary field to store the result of the Laplacian stencil, we can efficiently perform two applications of the stencil for each loop (lines 147 and 148). We know --- 1549,1558 ---- 170 } !

This is a simple Jacobi solver for Laplace's equation using the PositionFaceBC boundary condition discussed above. Lines 110-130 set up the mesh, the geometry, and the Brick-engine-based Field. Notice that we do not add any boundary conditions ! to this field, but we do reserve one layer of external guard layers (line 125). We then initialize the Field v and begin iterating. Since we need a temporary field to store the result of the Laplacian stencil, we can efficiently perform two applications of the stencil for each loop (lines 147 and 148). We know *************** to monitor wall-clock time (lines 1 *** 1568,1574 ****

The function applyLaplacian (lines 97-101) takes a Field to assign to and a Field to stencil as arguments. This is where the boundary conditions are ! applied, follwed by the stencil. The Field stencil object Laplace is straightforward, except for the static function applyBoundaryConditions that, on the fly, creates boundary conditions for each face of the input field f and applies them.

--- 1562,1568 ----

The function applyLaplacian (lines 97-101) takes a Field to assign to and a Field to stencil as arguments. This is where the boundary conditions are ! applied, followed by the stencil. The Field stencil object Laplace is straightforward, except for the static function applyBoundaryConditions that, on the fly, creates boundary conditions for each face of the input field f and applies them.

From oldham at codesourcery.com Mon Mar 26 23:54:24 2001 From: oldham at codesourcery.com (Jeffrey Oldham) Date: Mon, 26 Mar 2001 15:54:24 -0800 Subject: [pooma-dev] [RFA]: Tutorial Typographical Changes In-Reply-To: ; from allan@stokes.ca on Mon, Mar 26, 2001 at 02:44:28PM -0800 References: <20010326133802.A1279@codesourcery.com> Message-ID: <20010326155424.B1707@codesourcery.com> Thanks for the comments. On Mon, Mar 26, 2001 at 02:44:28PM -0800, Allan Stokes wrote: > > Review of Jeffrey's patch. Everything seems fine. Didn't understand > implication of s/VectorFace/VectorFaceRCTag/g so this is not confirmed. Two > small suggestions (one on EngineTag, one about "Pooma code"). I backed out the s/VectorFace/VectorFaceRCTag/g and will await someone else's comments. > > * tut-04.html: Move sentence regarding component forwarding from > > next paragraph to preceding paragraph concerning component > > forwarding. > > 404,411 all I see here is the lexemes " line. > Assuming this is spurious. Yes, just overzealous Emacs's paragraph refilling. > OK on 413,430 > > > Remove an extra space and an extraneous comma. Add a missing > > parenthesis. Fix array's name to match the other text. > > EngineTag is still mentioned in the descriptive text. Maybe better > to remove emphasis and just say "input EngineTag" meaning E I am not sure how to word this. Thanks, Jeffrey D. Oldham oldham at codesourcery.com From oldham at codesourcery.com Tue Mar 27 00:06:12 2001 From: oldham at codesourcery.com (Jeffrey Oldham) Date: Mon, 26 Mar 2001 16:06:12 -0800 Subject: RFA: s/VectorFace/VectorFaceRCTag/g Message-ID: <20010326160612.C1707@codesourcery.com> Are these changes acceptable? "VectorFace" seems to have disappeared from Pooma in favor of "VectorFaceRCTag". Mon Mar 26 15:50:55 2001 Jeffrey D. Oldham * tut-07.html: s/VectorFace/VectorFaceRCTag/g * tut-08.html: Likewise. Tested on Netscape 4.76 on Linux Thanks, Jeffrey D. Oldham oldham at codesourcery.com -------------- next part -------------- Index: tut-07.html =================================================================== RCS file: /home/pooma/Repository/r2/docs/tut-07.html,v retrieving revision 1.2 diff -c -p -r1.2 tut-07.html *** tut-07.html 2001/03/26 23:49:59 1.2 --- tut-07.html 2001/03/27 00:00:24 *************** WIDTH="451"> *** 448,454 **** Figure 4: Example of componentwise centering, showing ! RectilinearCentering<2,VectorFace<2>> --- 448,454 ---- Figure 4: Example of componentwise centering, showing ! RectilinearCentering<2,VectorFaceRCTag<2>> *************** WIDTH="451"> *** 457,463 ****

A Note on Allocation

For componentwise rectilinear centerings such as ! RectilinearCentering<2,VectorFace<2> >, POOMA currently allocates Field domains (and Array domains in the associated DiscreteGeometry) with storage for nVerts elements in each dimension, so storage for a --- 457,463 ----

A Note on Allocation

For componentwise rectilinear centerings such as ! RectilinearCentering<2,VectorFaceRCTag<2> >, POOMA currently allocates Field domains (and Array domains in the associated DiscreteGeometry) with storage for nVerts elements in each dimension, so storage for a *************** defined in the RectilinearMesh *** 822,828 ****

A Note on Allocation

What's going on under the hood when an application makes a ! DiscreteGeometry object with this VectorFace type of componentwise centering for its Centering parameter? The DiscreteGeometry::totalDomain() method returns a domain with an extent of nVerts×nVerts×nVerts (in three --- 822,828 ----

A Note on Allocation

What's going on under the hood when an application makes a ! DiscreteGeometry object with this VectorFaceRCTag type of componentwise centering for its Centering parameter? The DiscreteGeometry::totalDomain() method returns a domain with an extent of nVerts×nVerts×nVerts (in three *************** the existing DiscreteGeometry p *** 837,843 **** storage.

The domains of these Arrays must still be specified. In a ! geometry class which has VectorFace for its Centering template parameter, these compute-based Array data members have their domains set to nVerts×nVerts×nVerts. Any Field which --- 837,843 ---- storage.

The domains of these Arrays must still be specified. In a ! geometry class which has VectorFaceRCTag for its Centering template parameter, these compute-based Array data members have their domains set to nVerts×nVerts×nVerts. Any Field which Index: tut-08.html =================================================================== RCS file: /home/pooma/Repository/r2/docs/tut-08.html,v retrieving revision 1.2 diff -c -p -r1.2 tut-08.html *** tut-08.html 2001/03/26 23:49:59 1.2 --- tut-08.html 2001/03/27 00:00:26 *************** which these functors are defined with pa *** 169,175 **** set duplicates all the functions provided in version 1 of POOMA. More input and output centering combinations will be added as this version is developed, in particular face, edge, and component-wise centerings ! such as VectorFace.

--- 169,175 ---- set duplicates all the functions provided in version 1 of POOMA. More input and output centering combinations will be added as this version is developed, in particular face, edge, and component-wise centerings ! such as VectorFaceRCTag.
Input Output
From oldham at codesourcery.com Tue Mar 27 00:10:58 2001 From: oldham at codesourcery.com (Jeffrey Oldham) Date: Mon, 26 Mar 2001 16:10:58 -0800 Subject: Patch: FieldStencil Typo in tut-08.html Message-ID: <20010326161058.D1707@codesourcery.com> Is this change acceptable? (The CVS log file for tut-08.html erroneously says this was already changed. I do not know how to fix the log file entry.) Mon Mar 26 16:09:55 2001 Jeffrey D. Oldham * tut-08.html (FieldStencil example): s/fv/vv/ to match previous variable declaration. Tested on Netscape 4.76 on Linux Thanks, Jeffrey D. Oldham oldham at codesourcery.com -------------- next part -------------- Index: tut-08.html =================================================================== RCS file: /home/pooma/Repository/r2/docs/tut-08.html,v retrieving revision 1.2 diff -c -p -r1.2 tut-08.html *** tut-08.html 2001/03/26 23:49:59 1.2 --- tut-08.html 2001/03/27 00:08:07 *************** typedef Div<Cell, DiscreteGeometry< *** 992,998 **** FieldStencil<Div_t> divVV2SC(); // Divergence, Vector/Vert-->Scalar/Cell ! sc = divV2SC(fv);

Programmers may also find it convenient to create wrappers by --- 992,998 ---- FieldStencil<Div_t> divVV2SC(); // Divergence, Vector/Vert-->Scalar/Cell ! sc = divV2SC(vv);

Programmers may also find it convenient to create wrappers by From swhaney at earthlink.net Tue Mar 27 00:11:51 2001 From: swhaney at earthlink.net (Scott Haney) Date: Mon, 26 Mar 2001 17:11:51 -0700 Subject: [pooma-dev] RFA: s/VectorFace/VectorFaceRCTag/g In-Reply-To: <20010326160612.C1707@codesourcery.com> Message-ID: On 3/26/01 5:06 PM, "Jeffrey Oldham" wrote: > Are these changes acceptable? "VectorFace" seems to have disappeared > from Pooma in favor of "VectorFaceRCTag". Jeffrey, Both of these are remnants of the old Field implementation and will be deleted. The new field handles centering in a completely new way, so I suggest not worrying about this. Scott -- Proximation LLC 2960 Rodeo Park Drive West Santa Fe, NM 87505 Voice: (505) 424-3809 x101 FAX: (505) 438-4161 From oldham at codesourcery.com Tue Mar 27 01:42:25 2001 From: oldham at codesourcery.com (Jeffrey Oldham) Date: Mon, 26 Mar 2001 17:42:25 -0800 Subject: My proposal for the test kernel. In-Reply-To: <5.0.2.1.2.20010323211538.00c0e160@x-mail.lanl.gov>; from dmar@lanl.gov on Fri, Mar 23, 2001 at 10:25:00PM -0700 References: <5.0.2.1.2.20010323211538.00c0e160@x-mail.lanl.gov> Message-ID: <20010326174225.B2206@codesourcery.com> Attached are the algorithmic outline I wrote for myself as I read the paper. Skip over Section 1 to Secton 2. I guess the Section 2 algorithm is more complicated because you suggest using only one (or a small constant) predictor steps so the cells do not change shape.. Is this the correct interpretation of The corner forces going into the velocity update and the energy update are all calculated based upon the initial geometry of the test problem. (One might consider using the velocity update to update the coordinates which would have then updated all the cell volumes and face areas, density etc.---fortunately this complexity is not in the model.) ? Thanks, Jeffrey D. Oldham oldham at codesourcery.com Attached (all the same material but in different formats): 1. PDF file 2. PostScript file 3. LaTeX file -------------- next part -------------- A non-text attachment was scrubbed... Name: hydrodynamics-outline.pdf Type: application/pdf Size: 39300 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: hydrodynamics-outline.ps Type: application/postscript Size: 84528 bytes Desc: not available URL: -------------- next part -------------- %%% Oldham, Jeffrey D. %%% 2001Mar22 %%% Pooma %%% %%% Outline of Hydrodynamics Algorithm \documentclass[12pt]{article} %\usepackage{vmargin} %\setpapersize{USletter} %\setmarg{0.75in}{0.5in}{7.0in}{9.0in} %\usepackage{tabularx} \usepackage{amsmath} \renewcommand{\thefootnote}{\arabic{footnote}} % Permits good HTML footnotes. %\usepackage{times} % for PDF only \usepackage[english]{babel} \selectlanguage{english} %% Definitions and Declarations \newcommand{\assign}{\ensuremath{\leftarrow}} % Produces an assignment symbol. % Requires no parameters. \newcommand{\coordinate}[1]{\ensuremath{\vec{r}_{#1}}} % Produces a coordinate position. % Requires: 1. the subscript \newcommand{\cornerMass}[2]{\ensuremath{m^{#1}_{#2}}}% % Produces a corner mass. % Requires: 1. the superscript % 2. the subscript \newcommand{\density}[1]{\ensuremath{\rho_{#1}}} % Produces a notation of density. % Requires: 1. the subscript \newcommand{\deriv}[3]{\ensuremath{\frac{#1 #2}{#1 #3}}}% % Produces a derivative. % Requires: 1. the derivative symbol, e.g., d % 2. the term of which to take derivative % 3. the variable for the derivative \newcommand{\energy}[1]{\ensuremath{E_{#1}}} % Produces an energy. % Requires: 1. the subscript \newcommand{\force}[2]{\ensuremath{\vec{f}^{#1}_{#2}}}% % Produces a corner force. % Requires: 1. the superscript % 2. the subscript \newcommand{\intEnergy}[1]{\ensuremath{e_{#1}}} % Produces a specific internal energy. % Requires: 1. the subscript \newcommand{\mass}[1]{\ensuremath{M_{#1}}} % Produces a mass. % Requires: 1. the subscript \newcommand{\normal}[1]{\ensuremath{\vec{a}_{#1}}} % Produces a notation for a normal vector. % Requires: 1. a subscript \newcommand{\point}{\ensuremath{p}} % Produces a point. % Requires no parameters. \newcommand{\pressure}[1]{\ensuremath{P_{#1}}} % Produces a pressure. % Requires: 1. an optional subscript \newcommand{\tim}{\ensuremath{t}} % Produces a time. % Requires no parameters. \newcommand{\timeStep}{\ensuremath{n}} % Produces a notation for a timestep. % Requires no parameters. \newcommand{\velocity}[1]{\ensuremath{\vec{v}_{#1}}} % Produces a velocity. % Requires: 1. an optional subscript \newcommand{\volume}[1]{\ensuremath{V_{#1}}} % Produces a volume. % Requires: 1. an optional subscript \newcommand{\zone}{\ensuremath{z}} % Produces a zone. % Requires no parameters. \begin{document} \title{Outline of Hydrodynamics Algorithm} \author{Jeffrey~D. Oldham} \date{2001 Mar~26} \maketitle \section{Equations} \subsection{Momentum Equations} \paragraph{integral and corner force form} \begin{equation} \mass{\point} \deriv{d}{\velocity{\point}}{\tim} = - \int_{\volume{\point}} \vec{\nabla} \pressure{} d\volume{} = - \oint_b \pressure{} d\vec{S} = \sum_{\zone} \force{\point}{\zone} \equiv \vec{F}_{\point} \tag{7} \end{equation} \paragraph{discrete form} \begin{equation} \mass{\point} \Delta \velocity{\point} = \sum_{\zone} \force{\point,\sigma}{\zone} \Delta \tim \tag{17} \end{equation} \subsection{Specific Internal Energy Equations} \paragraph{corner force form} \begin{equation} \mass{z} \deriv{d}{\intEnergy{\zone}}{\tim} = - \sum_{\point} \force{\zone}{\point} \cdot \velocity{\point} \tag{12} \end{equation} \paragraph{coordinate form} \begin{equation} \mass{z} \deriv{d}{\intEnergy{\zone}}{\tim} = - \pressure{\zone} \left( (\normal{8} + \normal{1}) \cdot \velocity{1} + (\normal{2} + \normal{3}) \cdot \velocity{2} + (\normal{4} + \normal{5}) \cdot \velocity{3} + (\normal{6} + \normal{7}) \cdot \velocity{4} \right) \tag{13} \end{equation} \paragraph{discrete form} \begin{equation} \Delta \intEnergy{\zone} = -\sum_{\point} \force{\zone,\sigma}{\point} \cdot \velocity{\point}^{n+1/2} \Delta \tim / \mass{\zone} \tag{20} \end{equation} \subsection{Energy Equations} \paragraph{time-dependent form} \begin{equation} \energy{T}(\tim) = \energy{T}(0) + \sum_{m = 1\ldots n} \Delta \tim_m \sum_i \force{\sigma}{bd,i} \cdot \velocity{bd,i}^{m+1/2} \tag{15} \end{equation} \section{Algorithm} \subsection{Don Marshall's Memo} \label{don-marshall-section} \begin{itemize} \item Use $xy$-Cartesian geometry. \item The mesh will have five radial lines in $\pi/2$ radians, i.e., four cells in the angular direction. Use ten equally spaced radial shells with an outermost radius of~1.0. \item For the pressure~\pressure{}, use gamma law (ideal gas) equation of state \[ \pressure{} = (\gamma - 1) \density{} \intEnergy{}. \] $\gamma$ is a constant, e.g., $5/3$ or $4/3$. \item initial $\intEnergy{\zone} = 1$ \item initial $\density{\zone} = 1$ \item initial $\velocity{\point} = \vec{0}$ \item Use a predictor corrector method. \end{itemize} \subsection{Mesh Values} \begin{center} \begin{tabular}{r|l} value & location \\ \hline corner force \force{\zone}{\point} & point \\ corner mass \cornerMass{\zone}{\point} & point \\ coordinate positions \coordinate{\point}& point \\ density \density{\zone} & zone \\ internal energy \intEnergy{\zone} & zone \\ mass \mass{\zone} & zone \\ pressure \pressure{\zone} & zone \\ velocity \velocity{\point} & point \\ \end{tabular} \end{center} Initially, $\cornerMass{\zone}{\point} = \density{\zone} * \text{corner volume}$. \subsection{Constants} \begin{itemize} \item $\gamma$, e.g., $4/3$ or $5/3$ \item mass $\mass{\zone} = \sum_{\point} \cornerMass{\zone}{\point}$, where $\cornerMass{\zone}{\point} = \density{\zone} * \text{corner volume}$. \item timestep $\Delta \tim = 0.01$, divided by two for predictor and corrector phases \end{itemize} \subsection{Boundary Conditions} Use a velocity of $\vec{0}$ for all cell vertices at the origin. Velocity vectors along axes should have zero normal components. (I should use a Pooma ?`enforce?\ condition. John Hall knows more about this.) \subsection{What An Iteration Impacts} The algorithm consists of a series of iterations, one for each time period. We number each time period, e.g.,~\timeStep. Each iteration takes a set of values as input and performs some computations, changing some values. \begin{center} \begin{tabular}{r|ccc} values & predictor & corrector & output \\ \hline coordinate positions \coordinate{\point}& \timeStep & $\timeStep +1/2$ & y \\ density \density{\zone} & \timeStep & $\timeStep + 1$ & y \\ internal energy \intEnergy{\zone} & \timeStep & $\timeStep + 1$ & y \\ mass \mass{\zone} & constant & constant & n \\ constant timestep $\Delta \tim$ & 0.005 & 0.005 & n \\ velocity \velocity{\point} & \timeStep & $\timeStep + 1$ & y \\ \end{tabular} \end{center} Both the predictor and corrector iterations have the same form, but they use input values from different iterations. These are listed in the above table. The ``output'' column has a ``y'' if an iteration changes the corresponding value. The Marshalls say to use only the predictor iterations, not the corrector iterations. \subsection{Preparation Before Beginning the Iterations} Before starting the iterations, initial values for the input values must be computed. \begin{enumerate} \item Compute the coordinate positions~\coordinate{\point}. Use the mesh description listed in Section~\ref{don-marshall-section}. \item Use an initial internal energy~\intEnergy{\zone}\ of one. \item Use an initial pressure density~\density{\zone}\ of one. \item The initial masses~\mass{\zone}\ can be computed using the density~\density{\zone}\ and the initial volume. \begin{gather} \mass{\zone} = \density{\zone} \volume{\zone} \\ \volume{\zone} = \frac{1}{2} \left( (r_2 - r_4)(z_3 - z_1) + (r_1 - r_3)(z_2 - z_4) \right) \tag{56} \end{gather} \item The timestep $\Delta \tim$ is a constant. \item Use an arbitrary initial velocity~\velocity{\point}, e.g., zero. \end{enumerate} \subsection{An Iteration} The steps of an iteration include: \begin{enumerate} \item Compute zone pressures~\pressure{\zone}. \begin{equation*} \pressure{\zone} = (\gamma - 1) \density{\zone} \intEnergy{\zone} \end{equation*} \item Compute the outward normals. \begin{equation} \normal{2i-1} = \normal{2i} = \frac{1}{2} (z_{i+1} - z_{i}) \hat{r} - \frac{1}{2} (r_{i+1} - r_{i}) \hat{z} \tag{60} \end{equation} where the coordinate subscripts $i = 1, \ldots, 4$ are computed modulo~4. \item Compute the corner forces. \begin{eqnarray*} \force{1}{\zone} & = & \pressure{\zone} (\normal{8} + \normal{1}) \\ \force{2}{\zone} & = & \pressure{\zone} (\normal{2} + \normal{3}) \\ \force{3}{\zone} & = & \pressure{\zone} (\normal{4} + \normal{5}) \\ \force{4}{\zone} & = & \pressure{\zone} (\normal{6} + \normal{7}), \\ \end{eqnarray*} using the notation of Fig.~1. \item Change velocity using Eq.~(17). \begin{equation} \Delta \velocity{\point} = \frac{\Delta \tim}{\mass{\point}} \sum_{\zone} \force{\point,\sigma}{\zone} \tag{$17'$} \end{equation} Thus, one has $\velocity{\point}^{n}$ and $\velocity{\point}^{n+1}$. \item Change the specific internal energy using Eq.~(20). \begin{gather} \Delta \intEnergy{\zone} = - \frac{\Delta \tim}{\mass{\zone}} \sum_{\point} \force{\zone,\sigma}{\point} \cdot \velocity{\point}^{n+1/2} \tag{$20'$} \\ \velocity{\point}^{n+1/2} = (\velocity{\point}^{n} + \velocity{\point}^{n+1})/2 \notag \end{gather} \item Change coordinates. \begin{equation*} \coordinate{\point} \assign \coordinate{\point} + \velocity{\point}^{n+1/2} \Delta \tim \end{equation*} \item Update volume. \begin{equation} \volume{\zone} = \frac{1}{2} \left( (r_2 - r_4)(z_3 - z_1) + (r_1 - r_3)(z_2 - z_4) \right) \tag{56} \end{equation} \item Update density. \begin{equation*} \density{\zone}(\tim) = \mass{\zone} / \volume{\zone}(\tim) \end{equation*} \end{enumerate} \subsection{Termination} For the kernel, we will just run the algorithm for a fixed number of iterations, e.g., 1 or 2 or~3. \end{document} From oldham at codesourcery.com Wed Mar 28 02:48:35 2001 From: oldham at codesourcery.com (Jeffrey Oldham) Date: Tue, 27 Mar 2001 18:48:35 -0800 Subject: RFA: Field-Related Pooma Code Changes Message-ID: <20010327184835.A7346@codesourcery.com> The majority of these changes consist of: o Reorder constructor's initializers to reflect class declaration order. o Add an initializer for the base class. o Add `typename's. o Change preprocessor line from `if' to `ifdef'. Are these changes OK to commit? 2001-03-27 Jeffrey D. Oldham * Array/PrintArray.h (PrintArray::PrintArray): Reorder constructor's initializers to reflect class declaration order. * BConds/BCondList.h (BCondListData::BCondListData): Add an initializer for the base class. (BCondListData::~BCondListData): Change loop counter's type. (BCondListData): Add typedef for vector iteration. * BConds/LinExtrapFaceBC.h (LinearExtrapolateFaceBC::LinearExtrapolateFaceBC): Add a base class initializer. * BConds/NegReflectFaceBC.h (NegReflectFaceBC::NegReflectFaceBC): Likewise. * BConds/PeriodicFaceBC.h (PeriodicFaceBC::PeriodicFaceBC): Likewise. * BConds/PosReflectFaceBC.h (PosReflectFaceBC::PosReflectFaceBC): Likewise. * BConds/ZeroFaceBC.h (ZeroFaceBC::ZeroFaceBC): Likewise. * Domain/DomainRemoveOverlap.h (DomainRemoveOverlap): Add `typename's. * Domain/DomainTraits.Grid.h (DomainTraits::setDomain): Rewrite to ensure that comparisons occur between the same types. * Domain/DomainTraits.Interval.h (DomainTraits::setDomain): Likewise. * Domain/DomainTraits.Range.h (DomainTraits::setDomain): Likewise. * Domain/Grid.h (Grid::Grid): Add a base class initializer. * Engine/IndexFunctionEngine.h (Engine): Reorder constructor's initializers to reflect class declaration order. * Engine/RemoteEngine.h (GatherContextsData::GatherContextsData): Add a base class initializer. (Evaluator::evaluate): Add `typename's. * Evaluator/Evaluator.h (Evaluate::evaluate): Likewise. * Evaluator/ExpressionKernel.h (ExpressionKernel::ExpressionKernel): Change preprocessor line to `ifdef'. * Evaluator/MultiArgEvaluator.h (MultiArgEvaluator::evaluate): Add `typename's. * Evaluator/Reduction.h (Reduction::evaluate): Likewise. * Field/Field.cpp (assign): Likewise. * Field/Field.h (Field::array): Reorder template and `inline'. (Field::arrayAll): Likewise. * Field/PrintField.h (PrintField::PrintField): Reorder constructor's initializers to reflect class declaration order. * Layout/DynamicEvents.h (CreateEvent::CreateEvent): Likewise. (DestroyEvent::DestroyEvent): Likewise. (CopyEvent::CopyEvent): Likewise. (CopyPatchEvent::CopyPatchEvent): Likewise. * Layout/GlobalIDDataBase.h (Pack::Pack): Likewise. * Layout/GridLayout.cpp (GridLayoutData::initialize): Add `typename's. * Layout/SparseTileLayout.cpp (SparseTileLayoutData::~SparseTileLayoutData): Likewise. (SparseTileLayoutData::calcMaps): Likewise. (SparseTileLayoutData::calcAllocMaps): Likewise. (SparseTileLayoutData::calcGCFillList): Likewise. (SparseTileLayoutData::touches): Likewise. (SparseTileLayoutData::touchesAlloc): Likewise. (SparseTileLayoutData::print): Likewise. * Layout/UniformGridLayout.cpp (UniformGridLayoutData::partition): Likewise. (UniformGridLayoutData::initialize): Likewise. * Partition/BisectionMapper.h (BisectionMapper::map): Likewise. * Partition/UniformMapper.h (UniformMapper::~UniformMapper): New empty function. * Pooma/Pooma.h (poll): Change preprocessor line to `ifdef'. * Pooma/PoomaOperatorTags.h (FnMin::operator()): Likewise. (FnMax::operator()): Likewise. (FnMinAssign::operator()): Likewise. (FnMaxAssign::operator()): Likewise. * Threads/PoomaCSem.h: Likewise. * Threads/Scheduler.h: Likewise. * Utilities/Observer.h (SingleObserver::~SingleObserver): Make virtual. * Utilities/RefCountedBlockPtr.h (RefBlockController::RefBlockController): Reorder constructor's initializers to reflect class declaration order. (RefCountedBlockPtr): Change preprocessor line. (RefCountedBlockPtr::RefCountedBlockPtr): Reorder constructor's initializers to reflect class declaration order. * Utilities/algorithms.h (copy_special): Change preprocessor line to `ifdef'. (delete_backfill): Likewise. Tested on sequential Linux by compiling Pooma library using g++ mainline Reviewed by ????you???? **************** These errors were revealed by compiling this program: #include #include #include "Pooma/Fields.h" int main(int argc, char *argv[]) { // Set up the Pooma library. Pooma::initialize(argc,argv); Pooma::finalize(); return EXIT_SUCCESS; } Thanks, Jeffrey D. Oldham oldham at codesourcery.com -------------- next part -------------- Index: Array/PrintArray.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Array/PrintArray.h,v retrieving revision 1.20 diff -c -p -r1.20 PrintArray.h *** Array/PrintArray.h 2000/07/20 15:36:24 1.20 --- Array/PrintArray.h 2001/03/28 01:59:29 *************** public: *** 202,208 **** bool scientific = false, int spacing = 1) : domainwidth_m(domainWidth), datawidth_m(dataWidth), dataprecision_m(dataPrecision), carreturn_m(carReturn), ! scientific_m(scientific), spacing_m(spacing) { PAssert(domainwidth_m > 0); PAssert(datawidth_m > 0); --- 202,208 ---- 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); Index: BConds/BCondList.h =================================================================== RCS file: /home/pooma/Repository/r2/src/BConds/BCondList.h,v retrieving revision 1.13 diff -c -p -r1.13 BCondList.h *** BConds/BCondList.h 2000/04/27 22:33:53 1.13 --- BConds/BCondList.h 2001/03/28 01:59:29 *************** public: *** 62,68 **** // Copy constructor. BCondListData(const BCondListData &model) ! : data_m(model.data_m) { } //--------------------------------------------------------------------------- // Copy assignment operator. --- 62,68 ---- // Copy constructor. BCondListData(const BCondListData &model) ! : RefCounted (), data_m(model.data_m) { } //--------------------------------------------------------------------------- // Copy assignment operator. *************** public: *** 79,85 **** ~BCondListData() { ! for (int i = 0; i < data_m.size(); i++) delete data_m[i]; } --- 79,85 ---- ~BCondListData() { ! for (size_type i = 0; i < data_m.size(); i++) delete data_m[i]; } *************** public: *** 115,120 **** --- 115,121 ---- private: std::vector data_m; + typedef std::vector::size_type size_type; }; Index: BConds/LinExtrapFaceBC.h =================================================================== RCS file: /home/pooma/Repository/r2/src/BConds/LinExtrapFaceBC.h,v retrieving revision 1.9 diff -c -p -r1.9 LinExtrapFaceBC.h *** BConds/LinExtrapFaceBC.h 2000/03/07 13:16:12 1.9 --- BConds/LinExtrapFaceBC.h 2001/03/28 01:59:30 *************** public: *** 85,90 **** --- 85,91 ---- LinearExtrapolateFaceBC(int face) : face_m(face) { } LinearExtrapolateFaceBC(const LinearExtrapolateFaceBC &model) : + BCondCategory(), face_m(model.face()) { } //--------------------------------------------------------------------------- Index: BConds/NegReflectFaceBC.h =================================================================== RCS file: /home/pooma/Repository/r2/src/BConds/NegReflectFaceBC.h,v retrieving revision 1.9 diff -c -p -r1.9 NegReflectFaceBC.h *** BConds/NegReflectFaceBC.h 2000/03/07 13:16:12 1.9 --- BConds/NegReflectFaceBC.h 2001/03/28 01:59:30 *************** public: *** 82,87 **** --- 82,88 ---- NegReflectFaceBC(int face, bool enforceZeroBoundary = false) : face_m(face), enforceZeroBoundary_m(enforceZeroBoundary) { } NegReflectFaceBC(const NegReflectFaceBC &model) : + BCondCategory(), face_m(model.face()), enforceZeroBoundary_m(model.enforceZeroBoundary()) { } Index: BConds/PeriodicFaceBC.h =================================================================== RCS file: /home/pooma/Repository/r2/src/BConds/PeriodicFaceBC.h,v retrieving revision 1.8 diff -c -p -r1.8 PeriodicFaceBC.h *** BConds/PeriodicFaceBC.h 2000/03/07 13:16:13 1.8 --- BConds/PeriodicFaceBC.h 2001/03/28 01:59:30 *************** public: *** 79,84 **** --- 79,85 ---- PeriodicFaceBC(int face) : face_m(face) { } PeriodicFaceBC(const PeriodicFaceBC &model) : + BCondCategory(), face_m(model.face()) { } Index: BConds/PosReflectFaceBC.h =================================================================== RCS file: /home/pooma/Repository/r2/src/BConds/PosReflectFaceBC.h,v retrieving revision 1.10 diff -c -p -r1.10 PosReflectFaceBC.h *** BConds/PosReflectFaceBC.h 2000/03/07 13:16:13 1.10 --- BConds/PosReflectFaceBC.h 2001/03/28 01:59:30 *************** public: *** 82,87 **** --- 82,88 ---- PosReflectFaceBC(int face, bool enforceZeroBoundary = false) : face_m(face), enforceZeroBoundary_m(enforceZeroBoundary) { } PosReflectFaceBC(const PosReflectFaceBC &model) : + BCondCategory(), face_m(model.face()), enforceZeroBoundary_m(model.enforceZeroBoundary()) { } Index: BConds/ZeroFaceBC.h =================================================================== RCS file: /home/pooma/Repository/r2/src/BConds/ZeroFaceBC.h,v retrieving revision 1.12 diff -c -p -r1.12 ZeroFaceBC.h *** BConds/ZeroFaceBC.h 2000/03/07 13:16:13 1.12 --- BConds/ZeroFaceBC.h 2001/03/28 01:59:30 *************** public: *** 78,83 **** --- 78,84 ---- ZeroFaceBC(int face, bool enforceZeroBoundary = false) : face_m(face), enforceZeroBoundary_m(enforceZeroBoundary) { } ZeroFaceBC(const ZeroFaceBC &model) : + BCondCategory(), face_m(model.face()), enforceZeroBoundary_m(model.enforceZeroBoundary()) { } Index: Domain/DomainRemoveOverlap.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Domain/DomainRemoveOverlap.h,v retrieving revision 1.6 diff -c -p -r1.6 DomainRemoveOverlap.h *** Domain/DomainRemoveOverlap.h 2000/03/07 13:16:35 1.6 --- Domain/DomainRemoveOverlap.h 2001/03/28 01:59:30 *************** DomainRemoveOverlap(const Interval *** 47,54 **** for (int i=0;i(r[i].min()))) --- 47,54 ---- for (int i=0;i(r[i].min()))) *************** DomainRemoveOverlap(const Interval *** 90,97 **** temp.clear(); } ! DomainList_t::iterator start = result.begin(); ! DomainList_t::iterator end = result.end(); for ( ; start!=end ; ++start) { if (!touches(*start,r ) ) --- 90,97 ---- temp.clear(); } ! typename DomainList_t::iterator start = result.begin(); ! typename DomainList_t::iterator end = result.end(); for ( ; start!=end ; ++start) { if (!touches(*start,r ) ) Index: Domain/DomainTraits.Grid.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Domain/DomainTraits.Grid.h,v retrieving revision 1.8 diff -c -p -r1.8 DomainTraits.Grid.h *** Domain/DomainTraits.Grid.h 2000/04/28 16:29:38 1.8 --- Domain/DomainTraits.Grid.h 2001/03/28 01:59:31 *************** struct DomainTraits< Grid<1> > *** 257,264 **** CTAssert(DomainTraits::dimensions == 1); CTAssert(DomainTraits::singleValued == 1); CTAssert(DomainTraits::singleValued == 1); ! Element_t strideval = (endval < begval ? -1 : 1); ! dom = Storage_t(begval, strideval, (endval - begval)/strideval + 1); } // a specialized version of setDomain which accepts begin & end values and --- 257,265 ---- CTAssert(DomainTraits::dimensions == 1); CTAssert(DomainTraits::singleValued == 1); CTAssert(DomainTraits::singleValued == 1); ! const T2 bgval = static_cast(begval); ! Element_t strideval = (endval < bgval ? -1 : 1); ! dom = Storage_t(begval, strideval, (endval - bgval)/strideval + 1); } // a specialized version of setDomain which accepts begin & end values and Index: Domain/DomainTraits.Interval.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Domain/DomainTraits.Interval.h,v retrieving revision 1.24 diff -c -p -r1.24 DomainTraits.Interval.h *** Domain/DomainTraits.Interval.h 2001/03/20 23:42:47 1.24 --- Domain/DomainTraits.Interval.h 2001/03/28 01:59:31 *************** struct DomainTraits< Interval<1> > *** 263,269 **** CTAssert(DomainTraits::singleValued == 1); dom[0] = begval; dom[1] = static_cast(endval - begval + 1); ! PAssert(begval <= endval || dom[1] == 0); } // change the loop variable for this object. For Interval, this is a no-op. --- 263,269 ---- CTAssert(DomainTraits::singleValued == 1); dom[0] = begval; dom[1] = static_cast(endval - begval + 1); ! PAssert(static_cast(begval) <= endval || dom[1] == 0); } // change the loop variable for this object. For Interval, this is a no-op. Index: Domain/DomainTraits.Range.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Domain/DomainTraits.Range.h,v retrieving revision 1.21 diff -c -p -r1.21 DomainTraits.Range.h *** Domain/DomainTraits.Range.h 2000/03/07 13:16:35 1.21 --- Domain/DomainTraits.Range.h 2001/03/28 01:59:31 *************** struct DomainTraits< Range<1> > *** 238,244 **** CTAssert(DomainTraits::dimensions == 1); CTAssert(DomainTraits::singleValued == 1); CTAssert(DomainTraits::singleValued == 1); ! Element_t strideval = (endval < begval ? -1 : 1); dom[0] = begval; dom[1] = (endval - begval)/strideval + 1; dom[2] = strideval; --- 238,244 ---- CTAssert(DomainTraits::dimensions == 1); CTAssert(DomainTraits::singleValued == 1); CTAssert(DomainTraits::singleValued == 1); ! Element_t strideval = (endval < static_cast(begval) ? -1 : 1); dom[0] = begval; dom[1] = (endval - begval)/strideval + 1; dom[2] = strideval; Index: Domain/Grid.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Domain/Grid.h,v retrieving revision 1.10 diff -c -p -r1.10 Grid.h *** Domain/Grid.h 2000/06/27 01:58:27 1.10 --- Domain/Grid.h 2001/03/28 01:59:32 *************** public: *** 352,358 **** Grid() { } // copy constructor ! Grid(const Grid<1> &a) { NewDomain1 >::fill(*this, a); } --- 352,360 ---- Grid() { } // copy constructor ! Grid(const Grid<1> &a) ! : Base_t () ! { NewDomain1 >::fill(*this, a); } Index: Engine/IndexFunctionEngine.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Engine/IndexFunctionEngine.h,v retrieving revision 1.19 diff -c -p -r1.19 IndexFunctionEngine.h *** Engine/IndexFunctionEngine.h 2000/09/26 21:04:29 1.19 --- Engine/IndexFunctionEngine.h 2001/03/28 01:59:32 *************** public: *** 122,128 **** // Construct from a domain object and an optional Functor object. Engine(const Domain_t &domain, const Functor &f = Functor()) ! : domain_m(domain), funct_m(f) { for (int d = 0; d < Dim; ++d) firsts_m[d] = domain[d].first(); --- 122,128 ---- // Construct from a domain object and an optional Functor object. Engine(const Domain_t &domain, const Functor &f = Functor()) ! : funct_m(f), domain_m(domain) { for (int d = 0; d < Dim; ++d) firsts_m[d] = domain[d].first(); *************** public: *** 139,145 **** // Construct from another index-function-engine. Engine(const This_t &model) ! : domain_m(model.domain()), funct_m(model.functor()) { for (int d = 0; d < Dim; ++d) firsts_m[d] = model.firsts_m[d]; --- 139,145 ---- // Construct from another index-function-engine. Engine(const This_t &model) ! : funct_m(model.functor()), domain_m(model.domain()) { for (int d = 0; d < Dim; ++d) firsts_m[d] = model.firsts_m[d]; Index: Engine/RemoteEngine.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Engine/RemoteEngine.h,v retrieving revision 1.30 diff -c -p -r1.30 RemoteEngine.h *** Engine/RemoteEngine.h 2000/09/20 16:22:07 1.30 --- Engine/RemoteEngine.h 2001/03/28 01:59:33 *************** private: *** 1671,1677 **** inline GatherContextsData() {} inline GatherContextsData(const GatherContextsData &model) ! : contexts_m(model.contexts_m) {} inline ~GatherContextsData() {} //------------------------------------------------------------------------- --- 1671,1677 ---- inline GatherContextsData() {} inline GatherContextsData(const GatherContextsData &model) ! : RefCounted (), contexts_m(model.contexts_m) {} inline ~GatherContextsData() {} //------------------------------------------------------------------------- *************** struct Evaluator(inter)); expressionApply(rhs, IntersectorTag(inter)); ! Inter_t::const_iterator i = inter.begin(); while (i != inter.end()) { Evaluator(). --- 1890,1896 ---- expressionApply(lhs, IntersectorTag(inter)); expressionApply(rhs, IntersectorTag(inter)); ! typename Inter_t::const_iterator i = inter.begin(); while (i != inter.end()) { Evaluator(). *************** struct Reduction present(inter.size()); std::vector computationalContext(inter.size()); ! Inter_t::const_iterator i = inter.begin(); int j, k, n = 0; for (j = 0; j < inter.size(); j++) { --- 2017,2023 ---- std::vector present(inter.size()); std::vector computationalContext(inter.size()); ! typename Inter_t::const_iterator i = inter.begin(); int j, k, n = 0; for (j = 0; j < inter.size(); j++) { Index: Evaluator/Evaluator.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Evaluator/Evaluator.h,v retrieving revision 1.56 diff -c -p -r1.56 Evaluator.h *** Evaluator/Evaluator.h 2000/09/20 16:22:10 1.56 --- Evaluator/Evaluator.h 2001/03/28 01:59:33 *************** struct Evaluator *** 201,207 **** expressionApply(lhs, IntersectorTag(inter)); expressionApply(rhs, IntersectorTag(inter)); ! Inter_t::const_iterator i = inter.begin(); while (i != inter.end()) { Evaluator().evaluate(lhs(*i), op, rhs(*i)); --- 201,207 ---- expressionApply(lhs, IntersectorTag(inter)); expressionApply(rhs, IntersectorTag(inter)); ! typename Inter_t::const_iterator i = inter.begin(); while (i != inter.end()) { Evaluator().evaluate(lhs(*i), op, rhs(*i)); Index: Evaluator/ExpressionKernel.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Evaluator/ExpressionKernel.h,v retrieving revision 1.44 diff -c -p -r1.44 ExpressionKernel.h *** Evaluator/ExpressionKernel.h 2000/05/31 02:40:03 1.44 --- Evaluator/ExpressionKernel.h 2001/03/28 01:59:33 *************** private: *** 128,134 **** template ExpressionKernel:: ExpressionKernel(const LHS& lhs,const Op& op,const RHS& rhs) ! #if POOMA_SMARTS_1_0 : Pooma::Iterate_t(Pooma::scheduler(), engineFunctor(lhs, DataObjectRequest()) + engineFunctor(rhs, DataObjectRequest()), --- 128,134 ---- template ExpressionKernel:: ExpressionKernel(const LHS& lhs,const Op& op,const RHS& rhs) ! #ifdef POOMA_SMARTS_1_0 : Pooma::Iterate_t(Pooma::scheduler(), engineFunctor(lhs, DataObjectRequest()) + engineFunctor(rhs, DataObjectRequest()), Index: Evaluator/MultiArgEvaluator.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Evaluator/MultiArgEvaluator.h,v retrieving revision 1.5 diff -c -p -r1.5 MultiArgEvaluator.h *** Evaluator/MultiArgEvaluator.h 2001/03/04 06:46:48 1.5 --- Evaluator/MultiArgEvaluator.h 2001/03/28 01:59:33 *************** public: *** 248,254 **** applyMultiArg(multiArg, inter, info.writers()); ! Inter_t::const_iterator i = inter.begin(); while (i != inter.end()) { INode inode = info.extendDomain(*i); --- 248,254 ---- applyMultiArg(multiArg, inter, info.writers()); ! typename Inter_t::const_iterator i = inter.begin(); while (i != inter.end()) { INode inode = info.extendDomain(*i); *************** struct MultiArgEvaluator(). --- 349,355 ---- applyMultiArg(multiArg, inter, info.writers()); ! typename Inter_t::const_iterator i = inter.begin(); while (i != inter.end()) { MultiArgEvaluator(). Index: Evaluator/Reduction.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Evaluator/Reduction.h,v retrieving revision 1.9 diff -c -p -r1.9 Reduction.h *** Evaluator/Reduction.h 2000/09/20 16:22:10 1.9 --- Evaluator/Reduction.h 2001/03/28 01:59:33 *************** struct Reduction *** 222,228 **** Pooma::scheduler().beginGeneration(); ! Inter_t::const_iterator i = inter.begin(); int j = 0; while (j < n) { --- 222,228 ---- Pooma::scheduler().beginGeneration(); ! typename Inter_t::const_iterator i = inter.begin(); int j = 0; while (j < n) { Index: Field/Field.cpp =================================================================== RCS file: /home/pooma/Repository/r2/src/Field/Field.cpp,v retrieving revision 1.8 diff -c -p -r1.8 Field.cpp *** Field/Field.cpp 2000/07/20 15:39:27 1.8 --- Field/Field.cpp 2001/03/28 01:59:34 *************** assign(const Field & *** 114,120 **** // if the rhs is an expression. // This will allow subsequent functors to actually reach the leaves. ! CreateLeaf::Leaf_t rhsExpr = CreateLeaf::make(vrhs); // Optionally, check conformance. --- 114,120 ---- // if the rhs is an expression. // This will allow subsequent functors to actually reach the leaves. ! typename CreateLeaf::Leaf_t rhsExpr = CreateLeaf::make(vrhs); // Optionally, check conformance. *************** assign(const Field & *** 175,181 **** // if the rhs is an expression. // This will allow subsequent functors to actually reach the leaves. ! CreateLeaf::Leaf_t rhsExpr = CreateLeaf::make(vrhs); // Optionally, check conformance. --- 175,181 ---- // if the rhs is an expression. // This will allow subsequent functors to actually reach the leaves. ! typename CreateLeaf::Leaf_t rhsExpr = CreateLeaf::make(vrhs); // Optionally, check conformance. *************** assign(const Field & *** 240,246 **** // if the rhs is an expression. // This will allow subsequent functors to actually reach the leaves. ! CreateLeaf::Leaf_t rhsExpr = CreateLeaf::make(vrhs); // Optionally, check conformance. --- 240,246 ---- // if the rhs is an expression. // This will allow subsequent functors to actually reach the leaves. ! typename CreateLeaf::Leaf_t rhsExpr = CreateLeaf::make(vrhs); // Optionally, check conformance. *************** assign(const Array &l *** 309,315 **** // if the rhs is an expression. // This will allow subsequent functors to actually reach the leaves. ! CreateLeaf::Leaf_t rhsExpr = CreateLeaf::make(vrhs); // Optionally, check conformance. --- 309,315 ---- // if the rhs is an expression. // This will allow subsequent functors to actually reach the leaves. ! typename CreateLeaf::Leaf_t rhsExpr = CreateLeaf::make(vrhs); // Optionally, check conformance. *************** assign(const Array &l *** 366,372 **** // if the rhs is an expression. // This will allow subsequent functors to actually reach the leaves. ! CreateLeaf::Leaf_t rhsExpr = CreateLeaf::make(vrhs); // Optionally, check conformance. --- 366,372 ---- // if the rhs is an expression. // This will allow subsequent functors to actually reach the leaves. ! typename CreateLeaf::Leaf_t rhsExpr = CreateLeaf::make(vrhs); // Optionally, check conformance. Index: Field/Field.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Field/Field.h,v retrieving revision 1.68 diff -c -p -r1.68 Field.h *** Field/Field.h 2000/09/20 16:22:13 1.68 --- Field/Field.h 2001/03/28 01:59:34 *************** public: *** 1074,1089 **** //--------------------------------------------------------------------------- // View-creation operations yielding Arrays. ! typename ArrayView::Type_t ! inline array() const { typedef ArrayView Ret_t; return Ret_t::make(*this, physicalDomain()); }; typename ArrayView::Type_t ! inline arrayAll() const { typedef ArrayView Ret_t; return Ret_t::make(*this, totalDomain()); --- 1074,1091 ---- //--------------------------------------------------------------------------- // View-creation operations yielding Arrays. ! ! inline typename ArrayView::Type_t ! array() const { typedef ArrayView Ret_t; return Ret_t::make(*this, physicalDomain()); }; + inline typename ArrayView::Type_t ! arrayAll() const { typedef ArrayView Ret_t; return Ret_t::make(*this, totalDomain()); Index: Field/PrintField.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Field/PrintField.h,v retrieving revision 1.2 diff -c -p -r1.2 PrintField.h *** Field/PrintField.h 2000/03/07 13:17:08 1.2 --- Field/PrintField.h 2001/03/28 01:59:35 *************** public: *** 188,194 **** bool scientific = false, int spacing = 1) : domainwidth_m(domainWidth), datawidth_m(dataWidth), dataprecision_m(dataPrecision), carreturn_m(carReturn), ! scientific_m(scientific), spacing_m(spacing) { PAssert(domainwidth_m > 0); PAssert(datawidth_m > 0); --- 188,194 ---- 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); Index: Layout/DynamicEvents.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Layout/DynamicEvents.h,v retrieving revision 1.11 diff -c -p -r1.11 DynamicEvents.h *** Layout/DynamicEvents.h 2000/03/07 13:17:34 1.11 --- Layout/DynamicEvents.h 2001/03/28 01:59:35 *************** public: *** 249,256 **** // is < 0, the create should be done in the last local patch. CreateEvent(CreateSize_t num, PatchID_t p) ! : amount_m(num), patch_m(p), ! ObserverEvent(DynamicEvents::create) { } --- 249,256 ---- // is < 0, the create should be done in the last local patch. CreateEvent(CreateSize_t num, PatchID_t p) ! : ObserverEvent(DynamicEvents::create), ! amount_m(num), patch_m(p) { } *************** public: *** 330,337 **** template DestroyEvent(const D &d, PatchID_t p, int method) ! : domain_m(d), patch_m(p), method_m(method), ! ObserverEvent(DynamicEventType::destroyCode) { CTAssert(DynamicEventType::dimensions == 1); } --- 330,337 ---- template DestroyEvent(const D &d, PatchID_t p, int method) ! : ObserverEvent(DynamicEventType::destroyCode), ! domain_m(d), patch_m(p), method_m(method) { CTAssert(DynamicEventType::dimensions == 1); } *************** public: *** 421,436 **** // copy to. CopyEvent(const Dom &d, PatchID_t fromp, PatchID_t top) ! : domain_m(d), from_m(fromp), to_m(top), ! ObserverEvent(DynamicEventType::copyCode) { CTAssert(DynamicEventType::dimensions == 1); } template CopyEvent(const D &d, PatchID_t fromp, PatchID_t top) ! : domain_m(d), from_m(fromp), to_m(top), ! ObserverEvent(DynamicEventType::copyCode) { CTAssert(DynamicEventType::dimensions == 1); } --- 421,436 ---- // copy to. CopyEvent(const Dom &d, PatchID_t fromp, PatchID_t top) ! : ObserverEvent(DynamicEventType::copyCode), ! domain_m(d), from_m(fromp), to_m(top) { CTAssert(DynamicEventType::dimensions == 1); } template CopyEvent(const D &d, PatchID_t fromp, PatchID_t top) ! : ObserverEvent(DynamicEventType::copyCode), ! domain_m(d), from_m(fromp), to_m(top) { CTAssert(DynamicEventType::dimensions == 1); } *************** public: *** 534,541 **** CopyPatchEvent(const Domain_t &domlists, const IDList_t &fromlist, PatchID_t top, bool create) ! : lists_m(domlists), from_m(fromlist), to_m(top), create_m(create), ! ObserverEvent(DynamicEvents::copyPatchList) { } --- 534,541 ---- CopyPatchEvent(const Domain_t &domlists, const IDList_t &fromlist, PatchID_t top, bool create) ! : ObserverEvent(DynamicEvents::copyPatchList), ! lists_m(domlists), from_m(fromlist), to_m(top), create_m(create) { } Index: Layout/GlobalIDDataBase.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Layout/GlobalIDDataBase.h,v retrieving revision 1.13 diff -c -p -r1.13 GlobalIDDataBase.h *** Layout/GlobalIDDataBase.h 2000/07/12 19:17:12 1.13 --- Layout/GlobalIDDataBase.h 2001/03/28 01:59:35 *************** private: *** 193,199 **** struct Pack { Pack() ! : layoutID_m(0), globalID_m(0), context_m(0), parent_m(0) { } inline --- 193,199 ---- struct Pack { Pack() ! : layoutID_m(0), context_m(0), globalID_m(0), parent_m(0) { } inline Index: Layout/GridLayout.cpp =================================================================== RCS file: /home/pooma/Repository/r2/src/Layout/GridLayout.cpp,v retrieving revision 1.82 diff -c -p -r1.82 GridLayout.cpp *** Layout/GridLayout.cpp 2000/06/27 01:58:29 1.82 --- Layout/GridLayout.cpp 2001/03/28 01:59:35 *************** inline void GridLayoutData::initial *** 178,185 **** gpar.partition(innerdomain_m, all_m, cmap); ! List_t::iterator start = all_m.begin(); ! List_t::iterator end = all_m.end(); for ( ; start!=end ;++start ) { --- 178,185 ---- gpar.partition(innerdomain_m, all_m, cmap); ! typename List_t::iterator start = all_m.begin(); ! typename List_t::iterator end = all_m.end(); for ( ; start!=end ;++start ) { *************** void GridLayoutData::initialize(con *** 283,290 **** // Iterate through the complete list of nodes provided and assign to the // appropriate subcategories. ! List_t::iterator start = all_m.begin(); ! List_t::iterator end = all_m.end(); for ( ; start!=end ;++start ) { --- 283,290 ---- // Iterate through the complete list of nodes provided and assign to the // appropriate subcategories. ! typename List_t::iterator start = all_m.begin(); ! typename List_t::iterator end = all_m.end(); for ( ; start!=end ;++start ) { Index: Layout/SparseTileLayout.cpp =================================================================== RCS file: /home/pooma/Repository/r2/src/Layout/SparseTileLayout.cpp,v retrieving revision 1.25 diff -c -p -r1.25 SparseTileLayout.cpp *** Layout/SparseTileLayout.cpp 2000/10/04 04:14:26 1.25 --- Layout/SparseTileLayout.cpp 2001/03/28 01:59:36 *************** SparseTileLayoutData::~SparseTileLa *** 170,177 **** template void SparseTileLayoutData::syncPatch() { ! List_t::iterator start = all_m.begin(); ! List_t::iterator end = all_m.end(); for ( ; start != end ; ++start) if ( (*start)->context() == Pooma::context() ||(*start)->context() == -1 ) --- 170,177 ---- template void SparseTileLayoutData::syncPatch() { ! typename List_t::iterator start = all_m.begin(); ! typename List_t::iterator end = all_m.end(); for ( ; start != end ; ++start) if ( (*start)->context() == Pooma::context() ||(*start)->context() == -1 ) *************** void SparseTileLayoutData::calcMaps *** 202,209 **** map_m.initialize(domain_m); ! List_t::const_iterator start = all_m.begin(); ! List_t::const_iterator end = all_m.end(); int i=0; for ( ; start != end ; ++start, ++i ) --- 202,209 ---- map_m.initialize(domain_m); ! typename List_t::const_iterator start = all_m.begin(); ! typename List_t::const_iterator end = all_m.end(); int i=0; for ( ; start != end ; ++start, ++i ) *************** void SparseTileLayoutData::calcAllo *** 229,236 **** mapAloc_m.initialize(domain_m); ! List_t::const_iterator start = all_m.begin(); ! List_t::const_iterator end = all_m.end(); int i=0; --- 229,236 ---- mapAloc_m.initialize(domain_m); ! typename List_t::const_iterator start = all_m.begin(); ! typename List_t::const_iterator end = all_m.end(); int i=0; *************** void SparseTileLayoutData::calcGCFi *** 421,428 **** TouchList_t tlist; // first we do the internal overlap regions ! List_t::iterator start = all_m.begin(); ! List_t::iterator end = all_m.end(); for ( ; start!=end; ++start) { --- 421,428 ---- TouchList_t tlist; // first we do the internal overlap regions ! typename List_t::iterator start = all_m.begin(); ! typename List_t::iterator end = all_m.end(); for ( ; start!=end; ++start) { *************** void SparseTileLayoutData::calcGCFi *** 432,439 **** // now pack the tlist into the GCFillInfo object // The if test is to remove the self-touch entry ! TouchList_t::iterator GCLstart = tlist.begin(); ! TouchList_t::iterator GCLend = tlist.end(); for( ; GCLstart != GCLend ;++GCLstart) { --- 432,439 ---- // now pack the tlist into the GCFillInfo object // The if test is to remove the self-touch entry ! typename TouchList_t::iterator GCLstart = tlist.begin(); ! typename TouchList_t::iterator GCLend = tlist.end(); for( ; GCLstart != GCLend ;++GCLstart) { *************** void SparseTileLayoutData::calcGCFi *** 508,514 **** for ( ; gst!=gen ; ++gst ) { ! std::vector::iterator ts = temp2.begin(); for ( ; ts != temp2.end() ; ++ts ) { temp3 = DomainRemoveOverlap(*ts,gst->domain_m); --- 508,514 ---- for ( ; gst!=gen ; ++gst ) { ! typename std::vector::iterator ts = temp2.begin(); for ( ; ts != temp2.end() ; ++ts ) { temp3 = DomainRemoveOverlap(*ts,gst->domain_m); *************** void SparseTileLayoutData::calcGCFi *** 518,524 **** temp4.clear(); } ! std::vector::iterator ts = temp2.begin(); for( ; ts != temp2.end(); ++ts) temp.push_back(GCBorderFillInfo(*ts, bst->patchID() )); } --- 518,524 ---- temp4.clear(); } ! typename std::vector::iterator ts = temp2.begin(); for( ; ts != temp2.end(); ++ts) temp.push_back(GCBorderFillInfo(*ts, bst->patchID() )); } *************** int SparseTileLayoutData::touches(c *** 697,704 **** typedef Node OutNode_t; // Ack!!! OutDomain_t is a Range, but DomainMap::touches requires an Interval. ! DomainMap,pidx_t>::Touch_t dmti = map_m.touch(Interval(d)); ! DomainMap,pidx_t>::touch_iterator a; int count = 0; --- 697,705 ---- typedef Node OutNode_t; // Ack!!! OutDomain_t is a Range, but DomainMap::touches requires an Interval. ! typename DomainMap,pidx_t>::Touch_t dmti = ! map_m.touch(Interval(d)); ! typename DomainMap,pidx_t>::touch_iterator a; int count = 0; *************** int SparseTileLayoutData::touchesAl *** 752,759 **** typedef Node OutNode_t; ! DomainMap,pidx_t>::Touch_t dmti = map_m.touch(d); ! DomainMap,pidx_t>::touch_iterator a; int count = 0; --- 753,760 ---- typedef Node OutNode_t; ! typename DomainMap,pidx_t>::Touch_t dmti = map_m.touch(d); ! typename DomainMap,pidx_t>::touch_iterator a; int count = 0; *************** void SparseTileLayoutData::print(Ou *** 791,798 **** o<< " domain_m " << domain_m <globalID()<<" "<< (*start)->domain()<<" "<< --- 792,799 ---- o<< " domain_m " << domain_m <globalID()<<" "<< (*start)->domain()<<" "<< Index: Layout/UniformGridLayout.cpp =================================================================== RCS file: /home/pooma/Repository/r2/src/Layout/UniformGridLayout.cpp,v retrieving revision 1.34 diff -c -p -r1.34 UniformGridLayout.cpp *** Layout/UniformGridLayout.cpp 2000/08/15 17:30:31 1.34 --- Layout/UniformGridLayout.cpp 2001/03/28 01:59:36 *************** void UniformGridLayoutData::partiti *** 155,162 **** // fill local and remote lists ! List_t::const_iterator start = all_m.begin(); ! List_t::const_iterator end = all_m.end(); for ( ; start!=end ; ++start) { --- 155,162 ---- // fill local and remote lists ! typename List_t::const_iterator start = all_m.begin(); ! typename List_t::const_iterator end = all_m.end(); for ( ; start!=end ; ++start) { *************** void UniformGridLayoutData::initial *** 258,265 **** // Iterate through the complete list of nodes provided and assign to the // appropriate subcategories. ! List_t::iterator start = all_m.begin(); ! List_t::iterator end = all_m.end(); for ( ; start!=end ;++start ) { --- 258,265 ---- // Iterate through the complete list of nodes provided and assign to the // appropriate subcategories. ! typename List_t::iterator start = all_m.begin(); ! typename List_t::iterator end = all_m.end(); for ( ; start!=end ;++start ) { Index: Partition/BisectionMapper.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Partition/BisectionMapper.h,v retrieving revision 1.3 diff -c -p -r1.3 BisectionMapper.h *** Partition/BisectionMapper.h 2000/06/08 23:07:59 1.3 --- Partition/BisectionMapper.h 2001/03/28 01:59:36 *************** public: *** 86,94 **** while ( bvec.size() < ncontexts ) { int s = 0; ! std::list::iterator bstart = bvec.begin(); ! std::list::iterator bend = bvec.end(); ! std::list::iterator bpatch; // find the largest patch. for ( ; bstart != bend ; ++bstart) { --- 86,94 ---- while ( bvec.size() < ncontexts ) { int s = 0; ! typename std::list::iterator bstart = bvec.begin(); ! typename std::list::iterator bend = bvec.end(); ! typename std::list::iterator bpatch; // find the largest patch. for ( ; bstart != bend ; ++bstart) { *************** public: *** 133,140 **** for ( int i=1; i::iterator start = bvec.begin(); ! std::list::iterator end = bvec.end(); int pcontext = 0; for ( ; start != end ; ++start) { --- 133,140 ---- for ( int i=1; i::iterator start = bvec.begin(); ! typename std::list::iterator end = bvec.end(); int pcontext = 0; for ( ; start != end ; ++start) { Index: Partition/UniformMapper.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Partition/UniformMapper.h,v retrieving revision 1.3 diff -c -p -r1.3 UniformMapper.h *** Partition/UniformMapper.h 2000/06/07 23:36:46 1.3 --- Partition/UniformMapper.h 2001/03/28 01:59:36 *************** public: *** 86,91 **** --- 86,93 ---- void map(const List_t&) const; + virtual ~UniformMapper () {} + // member data private: Index: Pooma/Pooma.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Pooma/Pooma.h,v retrieving revision 1.30 diff -c -p -r1.30 Pooma.h *** Pooma/Pooma.h 2000/06/08 22:16:34 1.30 --- Pooma/Pooma.h 2001/03/28 01:59:36 *************** inline void poll() *** 528,534 **** #if POOMA_CHEETAH controller()->poll(); #endif ! #if POOMA_SMARTS_SCHEDULER_SERIALASYNC Smarts::SystemContext::runSomething(); #endif --- 528,534 ---- #if POOMA_CHEETAH controller()->poll(); #endif ! #ifdef POOMA_SMARTS_SCHEDULER_SERIALASYNC Smarts::SystemContext::runSomething(); #endif Index: Pooma/PoomaOperatorTags.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Pooma/PoomaOperatorTags.h,v retrieving revision 1.16 diff -c -p -r1.16 PoomaOperatorTags.h *** Pooma/PoomaOperatorTags.h 2000/08/08 17:32:59 1.16 --- Pooma/PoomaOperatorTags.h 2001/03/28 01:59:37 *************** struct FnMin *** 241,247 **** operator()(const T1 &a, const T2 &b) const { return ! #if POOMA_BRAIN_DAMAGED_MICROSOFT_LIB (ab?a:b) #else std::max(a, b) --- 258,264 ---- operator()(const T1 &a, const T2 &b) const { return ! #ifdef POOMA_BRAIN_DAMAGED_MICROSOFT_LIB (a>b?a:b) #else std::max(a, b) *************** struct FnMinAssign *** 371,377 **** operator()(const T1 &a, const T2 &b) const { ! #if POOMA_BRAIN_DAMAGED_MICROSOFT_LIB const_cast(a) = (a(a) = std::min(a, b) --- 371,377 ---- operator()(const T1 &a, const T2 &b) const { ! #ifdef POOMA_BRAIN_DAMAGED_MICROSOFT_LIB const_cast(a) = (a(a) = std::min(a, b) *************** struct FnMaxAssign *** 394,400 **** operator()(const T1 &a, const T2 &b) const { ! #if POOMA_BRAIN_DAMAGED_MICROSOFT_LIB const_cast(a) = (a>b?a:b) #else const_cast(a) = std::max(a, b) --- 394,400 ---- operator()(const T1 &a, const T2 &b) const { ! #ifdef POOMA_BRAIN_DAMAGED_MICROSOFT_LIB const_cast(a) = (a>b?a:b) #else const_cast(a) = std::max(a, b) Index: Threads/PoomaCSem.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Threads/PoomaCSem.h,v retrieving revision 1.8 diff -c -p -r1.8 PoomaCSem.h *** Threads/PoomaCSem.h 2000/06/08 22:16:42 1.8 --- Threads/PoomaCSem.h 2001/03/28 01:59:37 *************** private: *** 181,187 **** } ! #elif POOMA_SMARTS_SCHEDULER_SERIALASYNC #include "Threads/IterateSchedulers/SerialAsync.h" --- 181,187 ---- } ! #elif defined(POOMA_SMARTS_SCHEDULER_SERIALASYNC) #include "Threads/IterateSchedulers/SerialAsync.h" Index: Threads/Scheduler.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Threads/Scheduler.h,v retrieving revision 1.7 diff -c -p -r1.7 Scheduler.h *** Threads/Scheduler.h 2000/05/05 07:44:53 1.7 --- Threads/Scheduler.h 2001/03/28 01:59:37 *************** CTAssert(YOU_HAVE_NOT_SELECTED_A_SCHEDUL *** 89,95 **** #else ! # if POOMA_SMARTS_SCHEDULER_SERIALASYNC # include "Threads/IterateSchedulers/SerialAsync.h" --- 89,95 ---- #else ! # ifdef POOMA_SMARTS_SCHEDULER_SERIALASYNC # include "Threads/IterateSchedulers/SerialAsync.h" Index: Utilities/Observer.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Utilities/Observer.h,v retrieving revision 1.10 diff -c -p -r1.10 Observer.h *** Utilities/Observer.h 2000/03/07 13:18:25 1.10 --- Utilities/Observer.h 2001/03/28 01:59:37 *************** public: *** 182,188 **** // The destructor is not made virtual, since we should not ever need // to delete an object via its SingleObserver base class. ! ~SingleObserver() { } //============================================================ --- 182,188 ---- // The destructor is not made virtual, since we should not ever need // to delete an object via its SingleObserver base class. ! virtual ~SingleObserver() { } //============================================================ Index: Utilities/RefCountedBlockPtr.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Utilities/RefCountedBlockPtr.h,v retrieving revision 1.57 diff -c -p -r1.57 RefCountedBlockPtr.h *** Utilities/RefCountedBlockPtr.h 2001/03/21 00:56:09 1.57 --- Utilities/RefCountedBlockPtr.h 2001/03/28 01:59:37 *************** public: *** 128,134 **** explicit RefBlockController(size_t size) ! : dealloc_m(false), pBegin_m(0), pEnd_m(0), pEndOfStorage_m(0) { // Allocate memory, and set pointers to beginning and ending. This // also sets the dealloc_m flag to true. --- 128,134 ---- explicit RefBlockController(size_t size) ! : pBegin_m(0), pEnd_m(0), pEndOfStorage_m(0), dealloc_m(false) { // Allocate memory, and set pointers to beginning and ending. This // also sets the dealloc_m flag to true. *************** public: *** 534,540 **** typedef std::random_access_iterator_tag iterator_category; typedef T value_type; ! #if POOMA_NONSTANDARD_ITERATOR typedef ptrdiff_t distance_type; #else typedef ptrdiff_t difference_type; --- 534,540 ---- typedef std::random_access_iterator_tag iterator_category; typedef T value_type; ! #if defined (POOMA_NONSTANDARD_ITERATOR) && POOMA_NONSTANDARD_ITERATOR typedef ptrdiff_t distance_type; #else typedef ptrdiff_t difference_type; *************** public: *** 583,590 **** // Initialize a block of a given size, optionally with a model. inline explicit RefCountedBlockPtr(size_t size) ! : blockControllerPtr_m(new Controller(size)), ! offset_m(0) { } inline RefCountedBlockPtr(size_t size, const T & model) --- 583,590 ---- // Initialize a block of a given size, optionally with a model. inline explicit RefCountedBlockPtr(size_t size) ! : offset_m(0), ! blockControllerPtr_m(new Controller(size)) { } inline RefCountedBlockPtr(size_t size, const T & model) *************** public: *** 620,627 **** // Copy constructor inline RefCountedBlockPtr(const This_t & model) ! : blockControllerPtr_m(model.blockControllerPtr_m), ! offset_m(model.offset_m) { } // Copy constructor from a RefCountedBlockPtr of the opposite bounds --- 620,627 ---- // Copy constructor inline RefCountedBlockPtr(const This_t & model) ! : offset_m(model.offset_m), ! blockControllerPtr_m(model.blockControllerPtr_m) { } // Copy constructor from a RefCountedBlockPtr of the opposite bounds Index: Utilities/algorithms.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Utilities/algorithms.h,v retrieving revision 1.10 diff -c -p -r1.10 algorithms.h *** Utilities/algorithms.h 2000/07/14 17:46:37 1.10 --- Utilities/algorithms.h 2001/03/28 01:59:38 *************** template *** 138,144 **** inline It2 copy_special(It begin, It end, It2 dest, IsConcrete) { typedef std::iterator_traits DataTraits_t; ! #if POOMA_NONSTANDARD_ITERATOR typedef typename DataTraits_t::distance_type Diff_t; #else typedef typename DataTraits_t::difference_type Diff_t; --- 138,144 ---- inline It2 copy_special(It begin, It end, It2 dest, IsConcrete) { typedef std::iterator_traits DataTraits_t; ! #ifdef POOMA_NONSTANDARD_ITERATOR typedef typename DataTraits_t::distance_type Diff_t; #else typedef typename DataTraits_t::difference_type Diff_t; *************** inline It2 copy_special(It begin, It end *** 205,218 **** template inline ! #if POOMA_NONSTANDARD_ITERATOR typename std::iterator_traits::distance_type #else typename std::iterator_traits::difference_type #endif delete_backfill(DataIterator data_begin, DataIterator data_end, const KillIterator kill_begin, const KillIterator kill_end, ! #if POOMA_NONSTANDARD_ITERATOR typename std::iterator_traits::distance_type offset = 0) #else typename std::iterator_traits::difference_type offset = 0) --- 205,218 ---- template inline ! #ifdef POOMA_NONSTANDARD_ITERATOR typename std::iterator_traits::distance_type #else typename std::iterator_traits::difference_type #endif delete_backfill(DataIterator data_begin, DataIterator data_end, const KillIterator kill_begin, const KillIterator kill_end, ! #ifdef POOMA_NONSTANDARD_ITERATOR typename std::iterator_traits::distance_type offset = 0) #else typename std::iterator_traits::difference_type offset = 0) *************** delete_backfill(DataIterator data_begin, *** 224,230 **** // No data has to be moved if we're destroying values that are at // the end of the sequence. Thus we look for these first. ! #if POOMA_NONSTANDARD_ITERATOR std::reverse_iterator rk_pos(kill_end); std::reverse_iterator rk_end(kill_begin); #else --- 224,230 ---- // No data has to be moved if we're destroying values that are at // the end of the sequence. Thus we look for these first. ! #ifdef POOMA_NONSTANDARD_ITERATOR std::reverse_iterator rk_pos(kill_end); std::reverse_iterator rk_end(kill_begin); #else *************** delete_backfill(DataIterator data_begin, *** 233,239 **** #endif typedef std::iterator_traits DataTraits_t; ! #if POOMA_NONSTANDARD_ITERATOR typedef typename DataTraits_t::distance_type Diff_t; #else typedef typename DataTraits_t::difference_type Diff_t; --- 233,239 ---- #endif typedef std::iterator_traits DataTraits_t; ! #ifdef POOMA_NONSTANDARD_ITERATOR typedef typename DataTraits_t::distance_type Diff_t; #else typedef typename DataTraits_t::difference_type Diff_t; *************** delete_backfill(DataIterator data_begin, *** 295,308 **** template inline ! #if POOMA_NONSTANDARD_ITERATOR typename std::iterator_traits::distance_type #else typename std::iterator_traits::difference_type #endif delete_shiftup(DataIterator data_begin, DataIterator data_end, KillIterator kill_begin, KillIterator kill_end, ! #if POOMA_NONSTANDARD_ITERATOR typename std::iterator_traits::distance_type offset = 0) #else typename std::iterator_traits::difference_type offset = 0) --- 295,308 ---- template inline ! #ifdef POOMA_NONSTANDARD_ITERATOR typename std::iterator_traits::distance_type #else typename std::iterator_traits::difference_type #endif delete_shiftup(DataIterator data_begin, DataIterator data_end, KillIterator kill_begin, KillIterator kill_end, ! #ifdef POOMA_NONSTANDARD_ITERATOR typename std::iterator_traits::distance_type offset = 0) #else typename std::iterator_traits::difference_type offset = 0) *************** delete_shiftup(DataIterator data_begin, *** 313,319 **** typedef std::iterator_traits DataTraits_t; typedef typename DataTraits_t::value_type Value_t; ! #if POOMA_NONSTANDARD_ITERATOR typedef typename DataTraits_t::distance_type Diff_t; #else typedef typename DataTraits_t::difference_type Diff_t; --- 313,319 ---- typedef std::iterator_traits DataTraits_t; typedef typename DataTraits_t::value_type Value_t; ! #ifdef POOMA_NONSTANDARD_ITERATOR typedef typename DataTraits_t::distance_type Diff_t; #else typedef typename DataTraits_t::difference_type Diff_t; From swhaney at earthlink.net Wed Mar 28 14:30:17 2001 From: swhaney at earthlink.net (Scott Haney) Date: Wed, 28 Mar 2001 07:30:17 -0700 Subject: [pooma-dev] RFA: Field-Related Pooma Code Changes In-Reply-To: <20010327184835.A7346@codesourcery.com> Message-ID: on 3/27/01 7:48 PM, Jeffrey Oldham at oldham at codesourcery.com wrote: > The majority of these changes consist of: > o Reorder constructor's initializers to reflect class declaration order. > o Add an initializer for the base class. > o Add `typename's. > o Change preprocessor line from `if' to `ifdef'. > > Are these changes OK to commit? > Hi Jeffrey, The first three changes seem like a very good idea, but I want to go through the specifics. I will get you an answer this morning. As for the 4th, POOMA has adopted the policy of using affirmative feature selection macros like #if POOMA_CHEETAH // do stuff special for cheetah #endif I am presuming that the correct macros are not being defined or else we have not followed the convention everywhere. This means that the fix is not making it an ifdef. I'll look at the cases you describe. One more point that may not be obvious is that the directories BConds CoordinateSystems Field Geometry Meshes implement the old POOMA Field class, which will be removed from POOMA 2.4 in lieu of the Field class currently in NewField. This has a few implications: (1) we should de-emphasize work in these directories and on tutorials, examples, benchmarks, etc using the old field (2) we need to write our kernels using the new field. This is the implementation that Blanca is using (3) we need to get develop a plan for getting rid of the old field stuff and putting the new field in the right places The biggest complication to (3) is that particles depend on the old field. Julian, it would be nice if you could take a look at what's involved in transitioning particles and give us all an idea of the scope of this work. Scott From sasmith at cybermesa.com Wed Mar 28 14:47:14 2001 From: sasmith at cybermesa.com (Stephen A. Smith) Date: Wed, 28 Mar 2001 07:47:14 -0700 Subject: [pooma-dev] RFA: Field-Related Pooma Code Changes References: <20010327184835.A7346@codesourcery.com> Message-ID: <3AC1F972.777F6A68@cybermesa.com> Jeffrey Oldham wrote: > The majority of these changes consist of: > o Reorder constructor's initializers to reflect class declaration order. > o Add an initializer for the base class. > o Add `typename's. I reviewed the typename changes in src/Evaluator and they look ok. > > o Change preprocessor line from `if' to `ifdef'. > Changing the preprocessor line is NOT ok. The convention for most of the POOMA_ macros (POOMA_THREADS POOMA_PROFILE etc.) is to define them to be 0 or 1 (POOMA_NO or POOMA_YES). If there are situations where some of these are not defined, then there's a problem with the configuration program (or with the prefix file if you're using CodeWarrior). Several of the changes you listed, POOMA_SCHEDULER_SERIAL_ASYNC, POOMA_BRAIN_DAMAGED_MICROSOFT_LIB, POOMA_NONSTANDARD_ITERATOR are defined in some configurations, typically to be 0. There appear to be a large number of oversights on our part where they are not defined in some configurations. Could you hold off on the preprocessor changes. The set of configuration macros should probably be completely reviewed at some point. Thanks, Stephen Smith From oldham at codesourcery.com Wed Mar 28 16:19:09 2001 From: oldham at codesourcery.com (Jeffrey Oldham) Date: Wed, 28 Mar 2001 08:19:09 -0800 Subject: [pooma-dev] RFA: Field-Related Pooma Code Changes In-Reply-To: ; from swhaney@earthlink.net on Wed, Mar 28, 2001 at 07:30:17AM -0700 References: <20010327184835.A7346@codesourcery.com> Message-ID: <20010328081909.A7923@codesourcery.com> On Wed, Mar 28, 2001 at 07:30:17AM -0700, Scott Haney wrote: > > implement the old POOMA Field class, which will be removed from POOMA 2.4 in > lieu of the Field class currently in NewField. This has a few implications: So I should use #include "Pooma/NewFields.h" not #include "Pooma/Fields.h" ? Thanks, Jeffrey D. Oldham oldham at codesourcery.com From swhaney at earthlink.net Wed Mar 28 16:58:40 2001 From: swhaney at earthlink.net (Scott Haney) Date: Wed, 28 Mar 2001 09:58:40 -0700 Subject: [pooma-dev] RFA: Field-Related Pooma Code Changes In-Reply-To: <20010328081909.A7923@codesourcery.com> Message-ID: On Wednesday, March 28, 2001, at 09:19 AM, Jeffrey Oldham wrote: > On Wed, Mar 28, 2001 at 07:30:17AM -0700, Scott Haney wrote: >> >> implement the old POOMA Field class, which will be removed from POOMA >> 2.4 in >> lieu of the Field class currently in NewField. This has a few >> implications: > > So I should use > > #include "Pooma/NewFields.h" > > not > > #include "Pooma/Fields.h" > > ? > > Thanks, > Jeffrey D. Oldham > oldham at codesourcery.com > Correct. Scott From oldham at codesourcery.com Wed Mar 28 18:48:21 2001 From: oldham at codesourcery.com (Jeffrey Oldham) Date: Wed, 28 Mar 2001 10:48:21 -0800 Subject: RFA: Ensure All Preprocessor Symbols Are Defined Message-ID: <20010328104821.A18276@codesourcery.com> This morning, I learned that all preprocessors symbols should be defined by the configury code. I worked with Stephen Smith on these. OK to commit? 2001-03-28 Jeffrey D. Oldham * configure (setthreads): Always define POOMA_SMARTS_SCHEDULER_SERIALASYNC. (setcharacteristics): Define POOMA_NO_STD_MIN_MAX and POOMA_NONSTANDARD_ITERATOR. * src/Evaluator/ExpressionKernel.h (ExpressionKernel::ExpressionKernel): Remove old POOMA_SMARTS_1_0 code. * src/Pooma/PoomaOperatorTags.h (FnMin): s/POOMA_BRAIN_DAMAGED_MICROSOFT_LIB/POOMA_NO_STD_MIN_MAX/g (FnMax): Likewise. (FnMinAssign): Likewise. (FnMaxAssign): Likewise. * src/Pooma/PETE/PoomaOps.in (binaryOps): Likewise. (binaryAssignOps): Likewise. Tested on sequential Linux using gcc mainline by compiling Pooma library Reviewed by ???you??? Thanks, Jeffrey D. Oldham oldham at codesourcery.com -------------- next part -------------- Index: configure =================================================================== RCS file: /home/pooma/Repository/r2/configure,v retrieving revision 1.102 diff -c -p -r1.102 configure *** configure 2001/02/28 00:42:54 1.102 --- configure 2001/03/28 18:33:55 *************** sub setthreads *** 1411,1416 **** --- 1411,1417 ---- if ($scheduler eq "none") { add_string_define("POOMA_SCHEDULER_NAME", "\"stub scheduler\""); + add_yesno_define("POOMA_SMARTS_SCHEDULER_SERIALASYNC", 0); } else { *************** sub setcharacteristics *** 1743,1748 **** --- 1744,1757 ---- # if must include for POSIX file modes, say so add_yesno_define("POOMA_INC_SYS_STAT_H_FOR_FILE_MODES", $inc_sys_stat_h_file_modes); + + # if the C++ library does not have std::min, std::max, etc. + add_yesno_define("POOMA_NO_STD_MIN_MAX", + $no_std_min_max); + + # if the C++ library has a nonstandard iterator or iterator_traits + add_yesno_define("POOMA_NONSTANDARD_ITERATOR", + $no_std_iterator); } Index: src/Evaluator/ExpressionKernel.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Evaluator/ExpressionKernel.h,v retrieving revision 1.44 diff -c -p -r1.44 ExpressionKernel.h *** src/Evaluator/ExpressionKernel.h 2000/05/31 02:40:03 1.44 --- src/Evaluator/ExpressionKernel.h 2001/03/28 18:33:59 *************** private: *** 128,142 **** template ExpressionKernel:: ExpressionKernel(const LHS& lhs,const Op& op,const RHS& rhs) - #if POOMA_SMARTS_1_0 - : Pooma::Iterate_t(Pooma::scheduler(), - engineFunctor(lhs, DataObjectRequest()) + - engineFunctor(rhs, DataObjectRequest()), - -1 - ), - #else : Pooma::Iterate_t(Pooma::scheduler()), - #endif lhs_m(lhs), op_m(op), rhs_m(rhs) { hintAffinity(engineFunctor(lhs, DataObjectRequest())); --- 128,134 ---- Index: src/Pooma/PoomaOperatorTags.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Pooma/PoomaOperatorTags.h,v retrieving revision 1.16 diff -c -p -r1.16 PoomaOperatorTags.h *** src/Pooma/PoomaOperatorTags.h 2000/08/08 17:32:59 1.16 --- src/Pooma/PoomaOperatorTags.h 2001/03/28 18:33:59 *************** struct FnMin *** 241,247 **** operator()(const T1 &a, const T2 &b) const { return ! #if POOMA_BRAIN_DAMAGED_MICROSOFT_LIB (ab?a:b) #else std::max(a, b) --- 258,264 ---- operator()(const T1 &a, const T2 &b) const { return ! #if POOMA_NO_STD_MIN_MAX (a>b?a:b) #else std::max(a, b) *************** struct FnMinAssign *** 371,377 **** operator()(const T1 &a, const T2 &b) const { ! #if POOMA_BRAIN_DAMAGED_MICROSOFT_LIB const_cast(a) = (a(a) = std::min(a, b) --- 371,377 ---- operator()(const T1 &a, const T2 &b) const { ! #if POOMA_NO_STD_MIN_MAX const_cast(a) = (a(a) = std::min(a, b) *************** struct FnMaxAssign *** 394,400 **** operator()(const T1 &a, const T2 &b) const { ! #if POOMA_BRAIN_DAMAGED_MICROSOFT_LIB const_cast(a) = (a>b?a:b) #else const_cast(a) = std::max(a, b) --- 394,400 ---- operator()(const T1 &a, const T2 &b) const { ! #if POOMA_NO_STD_MIN_MAX const_cast(a) = (a>b?a:b) #else const_cast(a) = std::max(a, b) Index: src/Pooma/PETE/PoomaOps.in =================================================================== RCS file: /home/pooma/Repository/r2/src/Pooma/PETE/PoomaOps.in,v retrieving revision 1.7 diff -c -p -r1.7 PoomaOps.in *** src/Pooma/PETE/PoomaOps.in 2000/08/08 17:33:02 1.7 --- src/Pooma/PETE/PoomaOps.in 2001/03/28 18:33:59 *************** binaryOps *** 93,99 **** TAG = "FnMin" FUNCTION = "min" EXPR = "return ! #if POOMA_BRAIN_DAMAGED_MICROSOFT_LIB (a for POSIX file modes, say so add_yesno_define("POOMA_INC_SYS_STAT_H_FOR_FILE_MODES", $inc_sys_stat_h_file_modes); + + # if the C++ library does not have std::min, std::max, etc. + add_yesno_define("POOMA_NO_STD_MIN_MAX", + $no_std_min_max); + + # if the C++ library has a nonstandard iterator or iterator_traits + add_yesno_define("POOMA_NONSTANDARD_ITERATOR", + $no_std_iterator); } Index: src/Evaluator/ExpressionKernel.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Evaluator/ExpressionKernel.h,v retrieving revision 1.44 diff -c -p -r1.44 ExpressionKernel.h *** src/Evaluator/ExpressionKernel.h 2000/05/31 02:40:03 1.44 --- src/Evaluator/ExpressionKernel.h 2001/03/28 18:33:59 *************** private: *** 128,142 **** template ExpressionKernel:: ExpressionKernel(const LHS& lhs,const Op& op,const RHS& rhs) - #if POOMA_SMARTS_1_0 - : Pooma::Iterate_t(Pooma::scheduler(), - engineFunctor(lhs, DataObjectRequest()) + - engineFunctor(rhs, DataObjectRequest()), - -1 - ), - #else : Pooma::Iterate_t(Pooma::scheduler()), - #endif lhs_m(lhs), op_m(op), rhs_m(rhs) { hintAffinity(engineFunctor(lhs, DataObjectRequest())); --- 128,134 ---- Index: src/Pooma/PoomaOperatorTags.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Pooma/PoomaOperatorTags.h,v retrieving revision 1.16 diff -c -p -r1.16 PoomaOperatorTags.h *** src/Pooma/PoomaOperatorTags.h 2000/08/08 17:32:59 1.16 --- src/Pooma/PoomaOperatorTags.h 2001/03/28 18:33:59 *************** struct FnMin *** 241,247 **** operator()(const T1 &a, const T2 &b) const { return ! #if POOMA_BRAIN_DAMAGED_MICROSOFT_LIB (ab?a:b) #else std::max(a, b) --- 258,264 ---- operator()(const T1 &a, const T2 &b) const { return ! #if POOMA_NO_STD_MIN_MAX (a>b?a:b) #else std::max(a, b) *************** struct FnMinAssign *** 371,377 **** operator()(const T1 &a, const T2 &b) const { ! #if POOMA_BRAIN_DAMAGED_MICROSOFT_LIB const_cast(a) = (a(a) = std::min(a, b) --- 371,377 ---- operator()(const T1 &a, const T2 &b) const { ! #if POOMA_NO_STD_MIN_MAX const_cast(a) = (a(a) = std::min(a, b) *************** struct FnMaxAssign *** 394,400 **** operator()(const T1 &a, const T2 &b) const { ! #if POOMA_BRAIN_DAMAGED_MICROSOFT_LIB const_cast(a) = (a>b?a:b) #else const_cast(a) = std::max(a, b) --- 394,400 ---- operator()(const T1 &a, const T2 &b) const { ! #if POOMA_NO_STD_MIN_MAX const_cast(a) = (a>b?a:b) #else const_cast(a) = std::max(a, b) Index: src/Pooma/PETE/PoomaOps.in =================================================================== RCS file: /home/pooma/Repository/r2/src/Pooma/PETE/PoomaOps.in,v retrieving revision 1.7 diff -c -p -r1.7 PoomaOps.in *** src/Pooma/PETE/PoomaOps.in 2000/08/08 17:33:02 1.7 --- src/Pooma/PETE/PoomaOps.in 2001/03/28 18:33:59 *************** binaryOps *** 93,99 **** TAG = "FnMin" FUNCTION = "min" EXPR = "return ! #if POOMA_BRAIN_DAMAGED_MICROSOFT_LIB (a #include "Engine/RemoteEngine.h" 43a46,126 > // Example provided by John Hall > //----------------------------------------------------------------------------- > > template > struct EdgeQPressureInfo > { > void scalarCodeInfo(ScalarCodeInfo &info) const > { > info.arguments(5); > > info.write(0, true ); > info.write(1, false); > info.write(2, false); > info.write(3, false); > info.write(4, false); > > // Does this operation index neighboring > // cells? (Do we need to update the internal > // guard layers.) > > info.useGuards(0, false); > info.useGuards(1, false); > info.useGuards(2, false); > info.useGuards(3, false); > info.useGuards(4, false); > > info.dimensions(Dim); > > for (int i = 0; i < Dim; ++i) > { > info.lowerExtent(i) = 0; > info.upperExtent(i) = 0; > } > } > }; > > typedef double Real; > > template > struct ScalarEdgeQPressure > : public EdgeQPressureInfo > { > ScalarEdgeQPressure(const Real& inLinearQ ) > : EdgeQPressureInfo(), > linearQ(inLinearQ) > { > } > > template > void operator()(const F1& EdgeQPressure, const F2& EdgeGammaConstant, > const F3& EdgeSoundSpeed, const F4& EdgeVelocity, > const F5& EdgePsiLimiter, const > Loc &loc) const > { > if( EdgePsiLimiter(loc) < 0.2 ) { // epsilon > EdgeQPressure(loc) = 0.0; > return; > } > > Real edgeVelocityMagnitude = > sqrt(dot(EdgeVelocity(loc),EdgeVelocity(loc))); > > EdgeQPressure(loc) = edgeVelocityMagnitude * > EdgePsiLimiter(loc) * > (EdgeGammaConstant(loc) * > edgeVelocityMagnitude + > sqrt( linearQ * linearQ * > EdgeSoundSpeed(loc) * EdgeSoundSpeed(loc) + > EdgeGammaConstant(loc) * > EdgeGammaConstant(loc) * > edgeVelocityMagnitude * > edgeVelocityMagnitude)); > } > > private: > Real linearQ; > }; > > > > //----------------------------------------------------------------------------- 46a130,140 > // This example averages the values from an all-face field and puts the > // result in a cell-centered field. > // The example is interesting for 2 reasons: > // -useGuards for the input field is true, because we will need to > // index into the guard layers---you need the same face on two different > // processors, so one of the values comes from the guard layer. > // -on the other hand, we've written the code to operate on views of > // the all-face field, so the extents are actually 0. The view of the > // all-face field take the cell-based domain and include all the relevant > // faces. > 69c163 < info.upperExtent(i) = 1; --- > info.upperExtent(i) = 0; 109a204,266 > // Gradient example. (This example exists to test operations that use > // guard layers and have a left extent to make sure we compute on the > // correct region.) > //----------------------------------------------------------------------------- > > struct EdgeFromCenterDerivativeInfo > { > EdgeFromCenterDerivativeInfo(int dimensions) > : dimensions_m(dimensions) > { > } > > void scalarCodeInfo(ScalarCodeInfo &info) const > { > info.arguments(2); > > info.write(0, true ); > info.write(1, false); > info.useGuards(0, false); > info.useGuards(1, true); > > info.dimensions(dimensions_m); > > int i; > for (i = 0; i < dimensions_m; ++i) > { > info.lowerExtent(i) = 1; > info.upperExtent(i) = 0; > } > } > > int dimensions_m; > }; > > template > struct EdgeFromCenterDerivative > : public EdgeFromCenterDerivativeInfo > { > EdgeFromCenterDerivative() > : EdgeFromCenterDerivativeInfo(Dim), > off_m(0) > { > off_m[0] = 1; > } > > template > inline > void operator()(F1 &f1, const F2 &f2, const Loc &loc) const > { > if (f2(loc) > 4.0) > { > f1(loc) = f2(loc) - 2.0 * f2(loc - off_m); > } > else > { > f1(loc) = f2(loc) - 1.1 * f2(loc - off_m); > } > } > > Loc off_m; > }; > > //----------------------------------------------------------------------------- 112a270,271 > // set the problem dimension here: must be >= 2 > 114a274,280 > // switch the definitions here to test the distributed case. > > typedef ReplicatedTag LayoutTag_t; > typedef Brick BrickTag_t; > //typedef DistributedTag LayoutTag_t; > //typedef Remote BrickTag_t; > 144c310 < GuardLayers(1)); --- > GuardLayers(0)); 147,148c313,314 < GuardLayers(1), GuardLayers(1), < ReplicatedTag()); --- > GuardLayers(1), GuardLayers(0), > LayoutTag_t()); 152c318 < typedef MultiPatch MP2_t; --- > typedef MultiPatch MP2_t; 153a320 > typedef Field, Vector, MP2_t> FieldV_t; 158a326 > f.addUpdaters(AllConstantFaceBC(4.0, true)); 167a336,338 > tester.out() << "input field:" << std::endl > << f << std::endl; > 176,177d346 < tester.out() << "input field:" << std::endl < << f << std::endl; 180a350,447 > Field_t fgCheck(cell, layout2, origin, spacings); > > Interval cellDomain = f.physicalCellDomain(); > > fgCheck = 0.0; > for(d = 0; d < dim; ++d) > { > Loc off(0); > off[d] = 1; > fgCheck(cellDomain) += f[d](cellDomain) + f[d](cellDomain + off); > } > fgCheck /= (2.0 * dim); > > tester.out() << "input field:" << std::endl > << f << std::endl; > > tester.out() << "check:" << std::endl > << fgCheck << std::endl; > > tester.check("scalar code differs from explicit computation", > sum(fgCheck - fg) < 0.001); > > // Now try a problem relevant to Blanca: > > GridLayout layout3(physicalVertexDomain, blocks, > GuardLayers(1), GuardLayers(1), > LayoutTag_t()); > > Edge edge(dim - 1); > > Field_t EdgeQPressure(edge, layout3, origin, spacings); > Field_t EdgeGammaConstant(edge, layout3, origin, spacings); > Field_t EdgeSoundSpeed(edge, layout3, origin, spacings); > FieldV_t EdgeVelocity(edge, layout3, origin, spacings); > Field_t EdgePsiLimiter(edge, layout3, origin, spacings); > > DomainLayout layout4(physicalVertexDomain, GuardLayers(1)); > XField::Type_t xEdge(edge, layout4, origin, spacings); > setXField(xEdge); > > EdgeGammaConstant = 1.4; > EdgeSoundSpeed = 42.0 + xEdge.comp(1); > EdgeVelocity = 3.0 * xEdge; > EdgePsiLimiter = 1.0; > > typedef ScalarEdgeQPressure SEQP_t; > SEQP_t sEQP(3.4); > ScalarCode edgeQcompute(sEQP); > > edgeQcompute(EdgeQPressure, > EdgeGammaConstant, EdgeSoundSpeed, > EdgeVelocity, EdgePsiLimiter); > > tester.out() << "EdgeQPressure" << EdgeQPressure << std::endl; > tester.out() << "EdgeGamma" << EdgeGammaConstant << std::endl; > tester.out() << "EdgeSound" << EdgeSoundSpeed << std::endl; > tester.out() << "EdgeV" << EdgeVelocity << std::endl; > tester.out() << "EdgePsi" << EdgePsiLimiter << std::endl; > > // 2) scalar code with extents (lower extent in particular) > > Edge edgeX(1); > Field_t edgeValues(edgeX, layout3, origin, spacings); > Field_t cellValues(cell, layout3, origin, spacings); > > XField::Type_t xEdgeX(edgeX, layout4, origin, spacings); > setXField(xEdgeX); > > edgeValues.all() = 42.0; > cellValues.all() = 5.0; > cellValues = xEdgeX.comp(0); > > tester.out() << "starting cell values: " << std::endl > << cellValues << std::endl > << "all" << std::endl > << cellValues.all() << std::endl; > tester.out() << "starting edge values: " << std::endl > << edgeValues << std::endl > << "all" << std::endl > << edgeValues.all() << std::endl; > > ScalarCode > edgeFromCenter; > > edgeFromCenter(edgeValues, cellValues); > > tester.out() << "final edge values: " << std::endl > << edgeValues << std::endl > << "all" << std::endl > << edgeValues.all() << std::endl; > > double check2 = sum(edgeValues * edgeValues); > tester.out() << "check value: " << check2 << std::endl; > > tester.check("value from derivative computation", abs(check2 - 134.8) < 0.2); > > // final cases to consider: > // 1) replicated fields > 191a459,460 > > Index: NewField/tests/makefile =================================================================== RCS file: /home/pooma/Repository/r2/src/NewField/tests/makefile,v retrieving revision 1.7 diff -r1.7 makefile 53a54 > $(ODIR)/ScalarCode $(TSTOPTS) 1>ScalarCode.out 2>&1 57c58,59 < $(ODIR)/WhereTest $(ODIR)/VectorTest --- > $(ODIR)/WhereTest $(ODIR)/VectorTest \ > $(ODIR)/ScalarCode 118a121,128 > .PHONY: ScalarCode > > ScalarCode: $(ODIR)/ScalarCode > > $(ODIR)/ScalarCode: $(ODIR)/ScalarCode.o > $(LinkToSuite) > > 133,140d142 < $(LinkToSuite) < < < .PHONY: ScalarCode < < ScalarCode: $(ODIR)/ScalarCode < < $(ODIR)/ScalarCode: $(ODIR)/ScalarCode.o From oldham at codesourcery.com Wed Mar 28 23:26:34 2001 From: oldham at codesourcery.com (Jeffrey Oldham) Date: Wed, 28 Mar 2001 15:26:34 -0800 Subject: RFA: Add typenames (1 of 3) Message-ID: <20010328152634.A23230@codesourcery.com> The large patch I sent out yesterday was too complicated. Thus, I have split it into five pieces: 1) Add typenames. <-- this patch 2) Reorder constructor initializers. 3) Other changes. 4) Preprocessor changes. (withdrawn) 5) Changes to deprecated directories. (withdrawn) I withdraw the large patch. (I cut the large patch apart by hand so small typos may be present.) Scott Haney indicated he wants to review these changes. 2001-03-28 Jeffrey D. Oldham * Domain/DomainRemoveOverlap.h (DomainRemoveOverlap): Add `typename's. * Engine/RemoteEngine.h (Evaluator::evaluate): Likewise * Evaluator/Evaluator.h (Evaluate::evaluate): Likewise. * Evaluator/MultiArgEvaluator.h (MultiArgEvaluator::evaluate): Likewise. * Evaluator/Reduction.h (Reduction::evaluate): Likewise. * Field/Field.cpp (assign): Likewise. * Field/Field.h (Field::array): Reorder template and `inline'. (Field::arrayAll): Likewise. * Layout/GridLayout.cpp (GridLayoutData::initialize): Add `typename's. * Layout/SparseTileLayout.cpp (SparseTileLayoutData::~SparseTileLayoutData): Likewise. (SparseTileLayoutData::calcMaps): Likewise. (SparseTileLayoutData::calcAllocMaps): Likewise. (SparseTileLayoutData::calcGCFillList): Likewise. (SparseTileLayoutData::touches): Likewise. (SparseTileLayoutData::touchesAlloc): Likewise. (SparseTileLayoutData::print): Likewise. * Layout/UniformGridLayout.cpp (UniformGridLayoutData::partition): Likewise. (UniformGridLayoutData::initialize): Likewise. * Partition/BisectionMapper.h (BisectionMapper::map): Likewise. Tested on sequential Linux using gcc 3.1 Approved by ???Scott Haney??? Thanks, Jeffrey D. Oldham oldham at codesourcery.com -------------- next part -------------- Index: Domain/DomainRemoveOverlap.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Domain/DomainRemoveOverlap.h,v retrieving revision 1.6 diff -c -p -r1.6 DomainRemoveOverlap.h *** Domain/DomainRemoveOverlap.h 2000/03/07 13:16:35 1.6 --- Domain/DomainRemoveOverlap.h 2001/03/28 01:59:30 *************** DomainRemoveOverlap(const Interval *** 47,54 **** for (int i=0;i(r[i].min()))) --- 47,54 ---- for (int i=0;i(r[i].min()))) *************** DomainRemoveOverlap(const Interval *** 90,97 **** temp.clear(); } ! DomainList_t::iterator start = result.begin(); ! DomainList_t::iterator end = result.end(); for ( ; start!=end ; ++start) { if (!touches(*start,r ) ) --- 90,97 ---- temp.clear(); } ! typename DomainList_t::iterator start = result.begin(); ! typename DomainList_t::iterator end = result.end(); for ( ; start!=end ; ++start) { if (!touches(*start,r ) ) Index: Engine/RemoteEngine.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Engine/RemoteEngine.h,v retrieving revision 1.30 diff -c -p -r1.30 RemoteEngine.h *** Engine/RemoteEngine.h 2000/09/20 16:22:07 1.30 --- Engine/RemoteEngine.h 2001/03/28 01:59:33 *************** struct Evaluator(inter)); expressionApply(rhs, IntersectorTag(inter)); ! Inter_t::const_iterator i = inter.begin(); while (i != inter.end()) { Evaluator(). --- 1890,1896 ---- expressionApply(lhs, IntersectorTag(inter)); expressionApply(rhs, IntersectorTag(inter)); ! typename Inter_t::const_iterator i = inter.begin(); while (i != inter.end()) { Evaluator(). *************** struct Reduction present(inter.size()); std::vector computationalContext(inter.size()); ! Inter_t::const_iterator i = inter.begin(); int j, k, n = 0; for (j = 0; j < inter.size(); j++) { --- 2017,2023 ---- std::vector present(inter.size()); std::vector computationalContext(inter.size()); ! typename Inter_t::const_iterator i = inter.begin(); int j, k, n = 0; for (j = 0; j < inter.size(); j++) { Index: Evaluator/Evaluator.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Evaluator/Evaluator.h,v retrieving revision 1.56 diff -c -p -r1.56 Evaluator.h *** Evaluator/Evaluator.h 2000/09/20 16:22:10 1.56 --- Evaluator/Evaluator.h 2001/03/28 01:59:33 *************** struct Evaluator *** 201,207 **** expressionApply(lhs, IntersectorTag(inter)); expressionApply(rhs, IntersectorTag(inter)); ! Inter_t::const_iterator i = inter.begin(); while (i != inter.end()) { Evaluator().evaluate(lhs(*i), op, rhs(*i)); --- 201,207 ---- expressionApply(lhs, IntersectorTag(inter)); expressionApply(rhs, IntersectorTag(inter)); ! typename Inter_t::const_iterator i = inter.begin(); while (i != inter.end()) { Evaluator().evaluate(lhs(*i), op, rhs(*i)); Index: Evaluator/MultiArgEvaluator.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Evaluator/MultiArgEvaluator.h,v retrieving revision 1.5 diff -c -p -r1.5 MultiArgEvaluator.h *** Evaluator/MultiArgEvaluator.h 2001/03/04 06:46:48 1.5 --- Evaluator/MultiArgEvaluator.h 2001/03/28 01:59:33 *************** public: *** 248,254 **** applyMultiArg(multiArg, inter, info.writers()); ! Inter_t::const_iterator i = inter.begin(); while (i != inter.end()) { INode inode = info.extendDomain(*i); --- 248,254 ---- applyMultiArg(multiArg, inter, info.writers()); ! typename Inter_t::const_iterator i = inter.begin(); while (i != inter.end()) { INode inode = info.extendDomain(*i); *************** struct MultiArgEvaluator(). --- 349,355 ---- applyMultiArg(multiArg, inter, info.writers()); ! typename Inter_t::const_iterator i = inter.begin(); while (i != inter.end()) { MultiArgEvaluator(). Index: Evaluator/Reduction.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Evaluator/Reduction.h,v retrieving revision 1.9 diff -c -p -r1.9 Reduction.h *** Evaluator/Reduction.h 2000/09/20 16:22:10 1.9 --- Evaluator/Reduction.h 2001/03/28 01:59:33 *************** struct Reduction *** 222,228 **** Pooma::scheduler().beginGeneration(); ! Inter_t::const_iterator i = inter.begin(); int j = 0; while (j < n) { --- 222,228 ---- Pooma::scheduler().beginGeneration(); ! typename Inter_t::const_iterator i = inter.begin(); int j = 0; while (j < n) { Index: Field/Field.cpp =================================================================== RCS file: /home/pooma/Repository/r2/src/Field/Field.cpp,v retrieving revision 1.8 diff -c -p -r1.8 Field.cpp *** Field/Field.cpp 2000/07/20 15:39:27 1.8 --- Field/Field.cpp 2001/03/28 01:59:34 *************** assign(const Field & *** 114,120 **** // if the rhs is an expression. // This will allow subsequent functors to actually reach the leaves. ! CreateLeaf::Leaf_t rhsExpr = CreateLeaf::make(vrhs); // Optionally, check conformance. --- 114,120 ---- // if the rhs is an expression. // This will allow subsequent functors to actually reach the leaves. ! typename CreateLeaf::Leaf_t rhsExpr = CreateLeaf::make(vrhs); // Optionally, check conformance. *************** assign(const Field & *** 175,181 **** // if the rhs is an expression. // This will allow subsequent functors to actually reach the leaves. ! CreateLeaf::Leaf_t rhsExpr = CreateLeaf::make(vrhs); // Optionally, check conformance. --- 175,181 ---- // if the rhs is an expression. // This will allow subsequent functors to actually reach the leaves. ! typename CreateLeaf::Leaf_t rhsExpr = CreateLeaf::make(vrhs); // Optionally, check conformance. *************** assign(const Field & *** 240,246 **** // if the rhs is an expression. // This will allow subsequent functors to actually reach the leaves. ! CreateLeaf::Leaf_t rhsExpr = CreateLeaf::make(vrhs); // Optionally, check conformance. --- 240,246 ---- // if the rhs is an expression. // This will allow subsequent functors to actually reach the leaves. ! typename CreateLeaf::Leaf_t rhsExpr = CreateLeaf::make(vrhs); // Optionally, check conformance. *************** assign(const Array &l *** 309,315 **** // if the rhs is an expression. // This will allow subsequent functors to actually reach the leaves. ! CreateLeaf::Leaf_t rhsExpr = CreateLeaf::make(vrhs); // Optionally, check conformance. --- 309,315 ---- // if the rhs is an expression. // This will allow subsequent functors to actually reach the leaves. ! typename CreateLeaf::Leaf_t rhsExpr = CreateLeaf::make(vrhs); // Optionally, check conformance. *************** assign(const Array &l *** 366,372 **** // if the rhs is an expression. // This will allow subsequent functors to actually reach the leaves. ! CreateLeaf::Leaf_t rhsExpr = CreateLeaf::make(vrhs); // Optionally, check conformance. --- 366,372 ---- // if the rhs is an expression. // This will allow subsequent functors to actually reach the leaves. ! typename CreateLeaf::Leaf_t rhsExpr = CreateLeaf::make(vrhs); // Optionally, check conformance. Index: Field/Field.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Field/Field.h,v retrieving revision 1.68 diff -c -p -r1.68 Field.h *** Field/Field.h 2000/09/20 16:22:13 1.68 --- Field/Field.h 2001/03/28 01:59:34 *************** public: *** 1074,1089 **** //--------------------------------------------------------------------------- // View-creation operations yielding Arrays. ! typename ArrayView::Type_t ! inline array() const { typedef ArrayView Ret_t; return Ret_t::make(*this, physicalDomain()); }; typename ArrayView::Type_t ! inline arrayAll() const { typedef ArrayView Ret_t; return Ret_t::make(*this, totalDomain()); --- 1074,1091 ---- //--------------------------------------------------------------------------- // View-creation operations yielding Arrays. ! ! inline typename ArrayView::Type_t ! array() const { typedef ArrayView Ret_t; return Ret_t::make(*this, physicalDomain()); }; + inline typename ArrayView::Type_t ! arrayAll() const { typedef ArrayView Ret_t; return Ret_t::make(*this, totalDomain()); Index: Layout/GridLayout.cpp =================================================================== RCS file: /home/pooma/Repository/r2/src/Layout/GridLayout.cpp,v retrieving revision 1.82 diff -c -p -r1.82 GridLayout.cpp *** Layout/GridLayout.cpp 2000/06/27 01:58:29 1.82 --- Layout/GridLayout.cpp 2001/03/28 01:59:35 *************** inline void GridLayoutData::initial *** 178,185 **** gpar.partition(innerdomain_m, all_m, cmap); ! List_t::iterator start = all_m.begin(); ! List_t::iterator end = all_m.end(); for ( ; start!=end ;++start ) { --- 178,185 ---- gpar.partition(innerdomain_m, all_m, cmap); ! typename List_t::iterator start = all_m.begin(); ! typename List_t::iterator end = all_m.end(); for ( ; start!=end ;++start ) { *************** void GridLayoutData::initialize(con *** 283,290 **** // Iterate through the complete list of nodes provided and assign to the // appropriate subcategories. ! List_t::iterator start = all_m.begin(); ! List_t::iterator end = all_m.end(); for ( ; start!=end ;++start ) { --- 283,290 ---- // Iterate through the complete list of nodes provided and assign to the // appropriate subcategories. ! typename List_t::iterator start = all_m.begin(); ! typename List_t::iterator end = all_m.end(); for ( ; start!=end ;++start ) { Index: Layout/SparseTileLayout.cpp =================================================================== RCS file: /home/pooma/Repository/r2/src/Layout/SparseTileLayout.cpp,v retrieving revision 1.25 diff -c -p -r1.25 SparseTileLayout.cpp *** Layout/SparseTileLayout.cpp 2000/10/04 04:14:26 1.25 --- Layout/SparseTileLayout.cpp 2001/03/28 01:59:36 *************** SparseTileLayoutData::~SparseTileLa *** 170,177 **** template void SparseTileLayoutData::syncPatch() { ! List_t::iterator start = all_m.begin(); ! List_t::iterator end = all_m.end(); for ( ; start != end ; ++start) if ( (*start)->context() == Pooma::context() ||(*start)->context() == -1 ) --- 170,177 ---- template void SparseTileLayoutData::syncPatch() { ! typename List_t::iterator start = all_m.begin(); ! typename List_t::iterator end = all_m.end(); for ( ; start != end ; ++start) if ( (*start)->context() == Pooma::context() ||(*start)->context() == -1 ) *************** void SparseTileLayoutData::calcMaps *** 202,209 **** map_m.initialize(domain_m); ! List_t::const_iterator start = all_m.begin(); ! List_t::const_iterator end = all_m.end(); int i=0; for ( ; start != end ; ++start, ++i ) --- 202,209 ---- map_m.initialize(domain_m); ! typename List_t::const_iterator start = all_m.begin(); ! typename List_t::const_iterator end = all_m.end(); int i=0; for ( ; start != end ; ++start, ++i ) *************** void SparseTileLayoutData::calcAllo *** 229,236 **** mapAloc_m.initialize(domain_m); ! List_t::const_iterator start = all_m.begin(); ! List_t::const_iterator end = all_m.end(); int i=0; --- 229,236 ---- mapAloc_m.initialize(domain_m); ! typename List_t::const_iterator start = all_m.begin(); ! typename List_t::const_iterator end = all_m.end(); int i=0; *************** void SparseTileLayoutData::calcGCFi *** 421,428 **** TouchList_t tlist; // first we do the internal overlap regions ! List_t::iterator start = all_m.begin(); ! List_t::iterator end = all_m.end(); for ( ; start!=end; ++start) { --- 421,428 ---- TouchList_t tlist; // first we do the internal overlap regions ! typename List_t::iterator start = all_m.begin(); ! typename List_t::iterator end = all_m.end(); for ( ; start!=end; ++start) { *************** void SparseTileLayoutData::calcGCFi *** 432,439 **** // now pack the tlist into the GCFillInfo object // The if test is to remove the self-touch entry ! TouchList_t::iterator GCLstart = tlist.begin(); ! TouchList_t::iterator GCLend = tlist.end(); for( ; GCLstart != GCLend ;++GCLstart) { --- 432,439 ---- // now pack the tlist into the GCFillInfo object // The if test is to remove the self-touch entry ! typename TouchList_t::iterator GCLstart = tlist.begin(); ! typename TouchList_t::iterator GCLend = tlist.end(); for( ; GCLstart != GCLend ;++GCLstart) { *************** void SparseTileLayoutData::calcGCFi *** 508,514 **** for ( ; gst!=gen ; ++gst ) { ! std::vector::iterator ts = temp2.begin(); for ( ; ts != temp2.end() ; ++ts ) { temp3 = DomainRemoveOverlap(*ts,gst->domain_m); --- 508,514 ---- for ( ; gst!=gen ; ++gst ) { ! typename std::vector::iterator ts = temp2.begin(); for ( ; ts != temp2.end() ; ++ts ) { temp3 = DomainRemoveOverlap(*ts,gst->domain_m); *************** void SparseTileLayoutData::calcGCFi *** 518,524 **** temp4.clear(); } ! std::vector::iterator ts = temp2.begin(); for( ; ts != temp2.end(); ++ts) temp.push_back(GCBorderFillInfo(*ts, bst->patchID() )); } --- 518,524 ---- temp4.clear(); } ! typename std::vector::iterator ts = temp2.begin(); for( ; ts != temp2.end(); ++ts) temp.push_back(GCBorderFillInfo(*ts, bst->patchID() )); } *************** int SparseTileLayoutData::touches(c *** 697,704 **** typedef Node OutNode_t; // Ack!!! OutDomain_t is a Range, but DomainMap::touches requires an Interval. ! DomainMap,pidx_t>::Touch_t dmti = map_m.touch(Interval(d)); ! DomainMap,pidx_t>::touch_iterator a; int count = 0; --- 697,705 ---- typedef Node OutNode_t; // Ack!!! OutDomain_t is a Range, but DomainMap::touches requires an Interval. ! typename DomainMap,pidx_t>::Touch_t dmti = ! map_m.touch(Interval(d)); ! typename DomainMap,pidx_t>::touch_iterator a; int count = 0; *************** int SparseTileLayoutData::touchesAl *** 752,759 **** typedef Node OutNode_t; ! DomainMap,pidx_t>::Touch_t dmti = map_m.touch(d); ! DomainMap,pidx_t>::touch_iterator a; int count = 0; --- 753,760 ---- typedef Node OutNode_t; ! typename DomainMap,pidx_t>::Touch_t dmti = map_m.touch(d); ! typename DomainMap,pidx_t>::touch_iterator a; int count = 0; *************** void SparseTileLayoutData::print(Ou *** 791,798 **** o<< " domain_m " << domain_m <globalID()<<" "<< (*start)->domain()<<" "<< --- 792,799 ---- o<< " domain_m " << domain_m <globalID()<<" "<< (*start)->domain()<<" "<< Index: Layout/UniformGridLayout.cpp =================================================================== RCS file: /home/pooma/Repository/r2/src/Layout/UniformGridLayout.cpp,v retrieving revision 1.34 diff -c -p -r1.34 UniformGridLayout.cpp *** Layout/UniformGridLayout.cpp 2000/08/15 17:30:31 1.34 --- Layout/UniformGridLayout.cpp 2001/03/28 01:59:36 *************** void UniformGridLayoutData::partiti *** 155,162 **** // fill local and remote lists ! List_t::const_iterator start = all_m.begin(); ! List_t::const_iterator end = all_m.end(); for ( ; start!=end ; ++start) { --- 155,162 ---- // fill local and remote lists ! typename List_t::const_iterator start = all_m.begin(); ! typename List_t::const_iterator end = all_m.end(); for ( ; start!=end ; ++start) { *************** void UniformGridLayoutData::initial *** 258,265 **** // Iterate through the complete list of nodes provided and assign to the // appropriate subcategories. ! List_t::iterator start = all_m.begin(); ! List_t::iterator end = all_m.end(); for ( ; start!=end ;++start ) { --- 258,265 ---- // Iterate through the complete list of nodes provided and assign to the // appropriate subcategories. ! typename List_t::iterator start = all_m.begin(); ! typename List_t::iterator end = all_m.end(); for ( ; start!=end ;++start ) { Index: Partition/BisectionMapper.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Partition/BisectionMapper.h,v retrieving revision 1.3 diff -c -p -r1.3 BisectionMapper.h *** Partition/BisectionMapper.h 2000/06/08 23:07:59 1.3 --- Partition/BisectionMapper.h 2001/03/28 01:59:36 *************** public: *** 86,94 **** while ( bvec.size() < ncontexts ) { int s = 0; ! std::list::iterator bstart = bvec.begin(); ! std::list::iterator bend = bvec.end(); ! std::list::iterator bpatch; // find the largest patch. for ( ; bstart != bend ; ++bstart) { --- 86,94 ---- while ( bvec.size() < ncontexts ) { int s = 0; ! typename std::list::iterator bstart = bvec.begin(); ! typename std::list::iterator bend = bvec.end(); ! typename std::list::iterator bpatch; // find the largest patch. for ( ; bstart != bend ; ++bstart) { *************** public: *** 133,140 **** for ( int i=1; i::iterator start = bvec.begin(); ! std::list::iterator end = bvec.end(); int pcontext = 0; for ( ; start != end ; ++start) { --- 133,140 ---- for ( int i=1; i::iterator start = bvec.begin(); ! typename std::list::iterator end = bvec.end(); int pcontext = 0; for ( ; start != end ; ++start) { From oldham at codesourcery.com Wed Mar 28 23:39:05 2001 From: oldham at codesourcery.com (Jeffrey Oldham) Date: Wed, 28 Mar 2001 15:39:05 -0800 Subject: RFA: Reorder Initializers (2 of 3) Message-ID: <20010328153905.D23230@codesourcery.com> The large patch I sent out yesterday was too complicated. Thus, I have split it into five pieces: 1) Add typenames. 2) Reorder constructor initializers. <-- this patch 3) Other changes. 4) Preprocessor changes. (withdrawn) 5) Changes to deprecated directories. (withdrawn) I withdraw the large patch. (I cut the large patch apart by hand so small typos may be present.) Scott Haney indicated he wants to review these changes. 2001-03-27 Jeffrey D. Oldham * Array/PrintArray.h (PrintArray::PrintArray): Reorder constructor's initializers to reflect class declaration order. * Domain/Grid.h (Grid::Grid): Add a base class initializer. * Engine/IndexFunctionEngine.h (Engine): Reorder constructor's initializers to reflect class declaration order. * Engine/RemoteEngine.h (GatherContextsData::GatherContextsData): Add a base class initializer. * Layout/DynamicEvents.h (CreateEvent::CreateEvent): Likewise. (DestroyEvent::DestroyEvent): Likewise. (CopyEvent::CopyEvent): Likewise. (CopyPatchEvent::CopyPatchEvent): Likewise. * Layout/GlobalIDDataBase.h (Pack::Pack): Likewise. * Utilities/RefCountedBlockPtr.h (RefBlockController::RefBlockController): Reorder constructor's initializers to reflect class declaration order. (RefCountedBlockPtr): Change preprocessor line. (RefCountedBlockPtr::RefCountedBlockPtr): Reorder constructor's initializers to reflect class declaration order. Tested on sequential Linux using gcc 3.1 Approved by ???Scott Haney??? Thanks, Jeffrey D. Oldham oldham at codesourcery.com -------------- next part -------------- Index: Array/PrintArray.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Array/PrintArray.h,v retrieving revision 1.20 diff -c -p -r1.20 PrintArray.h *** Array/PrintArray.h 2000/07/20 15:36:24 1.20 --- Array/PrintArray.h 2001/03/28 01:59:29 *************** public: *** 202,208 **** bool scientific = false, int spacing = 1) : domainwidth_m(domainWidth), datawidth_m(dataWidth), dataprecision_m(dataPrecision), carreturn_m(carReturn), ! scientific_m(scientific), spacing_m(spacing) { PAssert(domainwidth_m > 0); PAssert(datawidth_m > 0); --- 202,208 ---- 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); Index: Domain/Grid.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Domain/Grid.h,v retrieving revision 1.10 diff -c -p -r1.10 Grid.h *** Domain/Grid.h 2000/06/27 01:58:27 1.10 --- Domain/Grid.h 2001/03/28 01:59:32 *************** public: *** 352,358 **** Grid() { } // copy constructor ! Grid(const Grid<1> &a) { NewDomain1 >::fill(*this, a); } --- 352,360 ---- Grid() { } // copy constructor ! Grid(const Grid<1> &a) ! : Base_t () ! { NewDomain1 >::fill(*this, a); } Index: Engine/IndexFunctionEngine.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Engine/IndexFunctionEngine.h,v retrieving revision 1.19 diff -c -p -r1.19 IndexFunctionEngine.h *** Engine/IndexFunctionEngine.h 2000/09/26 21:04:29 1.19 --- Engine/IndexFunctionEngine.h 2001/03/28 01:59:32 *************** public: *** 122,128 **** // Construct from a domain object and an optional Functor object. Engine(const Domain_t &domain, const Functor &f = Functor()) ! : domain_m(domain), funct_m(f) { for (int d = 0; d < Dim; ++d) firsts_m[d] = domain[d].first(); --- 122,128 ---- // Construct from a domain object and an optional Functor object. Engine(const Domain_t &domain, const Functor &f = Functor()) ! : funct_m(f), domain_m(domain) { for (int d = 0; d < Dim; ++d) firsts_m[d] = domain[d].first(); *************** public: *** 139,145 **** // Construct from another index-function-engine. Engine(const This_t &model) ! : domain_m(model.domain()), funct_m(model.functor()) { for (int d = 0; d < Dim; ++d) firsts_m[d] = model.firsts_m[d]; --- 139,145 ---- // Construct from another index-function-engine. Engine(const This_t &model) ! : funct_m(model.functor()), domain_m(model.domain()) { for (int d = 0; d < Dim; ++d) firsts_m[d] = model.firsts_m[d]; Index: Engine/RemoteEngine.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Engine/RemoteEngine.h,v retrieving revision 1.30 diff -c -p -r1.30 RemoteEngine.h *** Engine/RemoteEngine.h 2000/09/20 16:22:07 1.30 --- Engine/RemoteEngine.h 2001/03/28 01:59:33 *************** private: *** 1671,1677 **** inline GatherContextsData() {} inline GatherContextsData(const GatherContextsData &model) ! : contexts_m(model.contexts_m) {} inline ~GatherContextsData() {} //------------------------------------------------------------------------- --- 1671,1677 ---- inline GatherContextsData() {} inline GatherContextsData(const GatherContextsData &model) ! : RefCounted (), contexts_m(model.contexts_m) {} inline ~GatherContextsData() {} //------------------------------------------------------------------------- Index: Layout/DynamicEvents.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Layout/DynamicEvents.h,v retrieving revision 1.11 diff -c -p -r1.11 DynamicEvents.h *** Layout/DynamicEvents.h 2000/03/07 13:17:34 1.11 --- Layout/DynamicEvents.h 2001/03/28 01:59:35 *************** public: *** 249,256 **** // is < 0, the create should be done in the last local patch. CreateEvent(CreateSize_t num, PatchID_t p) ! : amount_m(num), patch_m(p), ! ObserverEvent(DynamicEvents::create) { } --- 249,256 ---- // is < 0, the create should be done in the last local patch. CreateEvent(CreateSize_t num, PatchID_t p) ! : ObserverEvent(DynamicEvents::create), ! amount_m(num), patch_m(p) { } *************** public: *** 330,337 **** template DestroyEvent(const D &d, PatchID_t p, int method) ! : domain_m(d), patch_m(p), method_m(method), ! ObserverEvent(DynamicEventType::destroyCode) { CTAssert(DynamicEventType::dimensions == 1); } --- 330,337 ---- template DestroyEvent(const D &d, PatchID_t p, int method) ! : ObserverEvent(DynamicEventType::destroyCode), ! domain_m(d), patch_m(p), method_m(method) { CTAssert(DynamicEventType::dimensions == 1); } *************** public: *** 421,436 **** // copy to. CopyEvent(const Dom &d, PatchID_t fromp, PatchID_t top) ! : domain_m(d), from_m(fromp), to_m(top), ! ObserverEvent(DynamicEventType::copyCode) { CTAssert(DynamicEventType::dimensions == 1); } template CopyEvent(const D &d, PatchID_t fromp, PatchID_t top) ! : domain_m(d), from_m(fromp), to_m(top), ! ObserverEvent(DynamicEventType::copyCode) { CTAssert(DynamicEventType::dimensions == 1); } --- 421,436 ---- // copy to. CopyEvent(const Dom &d, PatchID_t fromp, PatchID_t top) ! : ObserverEvent(DynamicEventType::copyCode), ! domain_m(d), from_m(fromp), to_m(top) { CTAssert(DynamicEventType::dimensions == 1); } template CopyEvent(const D &d, PatchID_t fromp, PatchID_t top) ! : ObserverEvent(DynamicEventType::copyCode), ! domain_m(d), from_m(fromp), to_m(top) { CTAssert(DynamicEventType::dimensions == 1); } *************** public: *** 534,541 **** CopyPatchEvent(const Domain_t &domlists, const IDList_t &fromlist, PatchID_t top, bool create) ! : lists_m(domlists), from_m(fromlist), to_m(top), create_m(create), ! ObserverEvent(DynamicEvents::copyPatchList) { } --- 534,541 ---- CopyPatchEvent(const Domain_t &domlists, const IDList_t &fromlist, PatchID_t top, bool create) ! : ObserverEvent(DynamicEvents::copyPatchList), ! lists_m(domlists), from_m(fromlist), to_m(top), create_m(create) { } Index: Layout/GlobalIDDataBase.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Layout/GlobalIDDataBase.h,v retrieving revision 1.13 diff -c -p -r1.13 GlobalIDDataBase.h *** Layout/GlobalIDDataBase.h 2000/07/12 19:17:12 1.13 --- Layout/GlobalIDDataBase.h 2001/03/28 01:59:35 *************** private: *** 193,199 **** struct Pack { Pack() ! : layoutID_m(0), globalID_m(0), context_m(0), parent_m(0) { } inline --- 193,199 ---- struct Pack { Pack() ! : layoutID_m(0), context_m(0), globalID_m(0), parent_m(0) { } inline Index: Utilities/RefCountedBlockPtr.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Utilities/RefCountedBlockPtr.h,v retrieving revision 1.57 diff -c -p -r1.57 RefCountedBlockPtr.h *** Utilities/RefCountedBlockPtr.h 2001/03/21 00:56:09 1.57 --- Utilities/RefCountedBlockPtr.h 2001/03/28 01:59:37 *************** public: *** 128,134 **** explicit RefBlockController(size_t size) ! : dealloc_m(false), pBegin_m(0), pEnd_m(0), pEndOfStorage_m(0) { // Allocate memory, and set pointers to beginning and ending. This // also sets the dealloc_m flag to true. --- 128,134 ---- explicit RefBlockController(size_t size) ! : pBegin_m(0), pEnd_m(0), pEndOfStorage_m(0), dealloc_m(false) { // Allocate memory, and set pointers to beginning and ending. This // also sets the dealloc_m flag to true. *************** public: *** 583,590 **** // Initialize a block of a given size, optionally with a model. inline explicit RefCountedBlockPtr(size_t size) ! : blockControllerPtr_m(new Controller(size)), ! offset_m(0) { } inline RefCountedBlockPtr(size_t size, const T & model) --- 583,590 ---- // Initialize a block of a given size, optionally with a model. inline explicit RefCountedBlockPtr(size_t size) ! : offset_m(0), ! blockControllerPtr_m(new Controller(size)) { } inline RefCountedBlockPtr(size_t size, const T & model) *************** public: *** 620,627 **** // Copy constructor inline RefCountedBlockPtr(const This_t & model) ! : blockControllerPtr_m(model.blockControllerPtr_m), ! offset_m(model.offset_m) { } // Copy constructor from a RefCountedBlockPtr of the opposite bounds --- 620,627 ---- // Copy constructor inline RefCountedBlockPtr(const This_t & model) ! : offset_m(model.offset_m), ! blockControllerPtr_m(model.blockControllerPtr_m) { } // Copy constructor from a RefCountedBlockPtr of the opposite bounds From oldham at codesourcery.com Wed Mar 28 23:41:49 2001 From: oldham at codesourcery.com (Jeffrey Oldham) Date: Wed, 28 Mar 2001 15:41:49 -0800 Subject: RFA: Other Changes (3 of 3) Message-ID: <20010328154149.E23230@codesourcery.com> The large patch I sent out yesterday was too complicated. Thus, I have split it into five pieces: 1) Add typenames. 2) Reorder constructor initializers. 3) Other changes. <-- this patch 4) Preprocessor changes. (withdrawn) 5) Changes to deprecated directories. (withdrawn) I withdraw the large patch. (I cut the large patch apart by hand so small typos may be present.) Allan Stokes suggested a different way to handle comparisons between different types. Allan, can you provide code? Allan Stokes declined to review the virtual destructors. 2001-03-27 Jeffrey D. Oldham * Domain/DomainTraits.Grid.h (DomainTraits::setDomain): Rewrite to ensure that comparisons occur between the same types. * Domain/DomainTraits.Interval.h (DomainTraits::setDomain): Likewise. * Domain/DomainTraits.Range.h (DomainTraits::setDomain): Likewise. * Partition/UniformMapper.h (UniformMapper::~UniformMapper): New empty function. * Utilities/Observer.h (SingleObserver::~SingleObserver): Make virtual. Tested on sequential Linux using gcc 3.1 Approved by ???you??? Thanks, Jeffrey D. Oldham oldham at codesourcery.com -------------- next part -------------- Index: Domain/DomainTraits.Grid.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Domain/DomainTraits.Grid.h,v retrieving revision 1.8 diff -c -p -r1.8 DomainTraits.Grid.h *** Domain/DomainTraits.Grid.h 2000/04/28 16:29:38 1.8 --- Domain/DomainTraits.Grid.h 2001/03/28 01:59:31 *************** struct DomainTraits< Grid<1> > *** 257,264 **** CTAssert(DomainTraits::dimensions == 1); CTAssert(DomainTraits::singleValued == 1); CTAssert(DomainTraits::singleValued == 1); ! Element_t strideval = (endval < begval ? -1 : 1); ! dom = Storage_t(begval, strideval, (endval - begval)/strideval + 1); } // a specialized version of setDomain which accepts begin & end values and --- 257,265 ---- CTAssert(DomainTraits::dimensions == 1); CTAssert(DomainTraits::singleValued == 1); CTAssert(DomainTraits::singleValued == 1); ! const T2 bgval = static_cast(begval); ! Element_t strideval = (endval < bgval ? -1 : 1); ! dom = Storage_t(begval, strideval, (endval - bgval)/strideval + 1); } // a specialized version of setDomain which accepts begin & end values and Index: Domain/DomainTraits.Interval.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Domain/DomainTraits.Interval.h,v retrieving revision 1.24 diff -c -p -r1.24 DomainTraits.Interval.h *** Domain/DomainTraits.Interval.h 2001/03/20 23:42:47 1.24 --- Domain/DomainTraits.Interval.h 2001/03/28 01:59:31 *************** struct DomainTraits< Interval<1> > *** 263,269 **** CTAssert(DomainTraits::singleValued == 1); dom[0] = begval; dom[1] = static_cast(endval - begval + 1); ! PAssert(begval <= endval || dom[1] == 0); } // change the loop variable for this object. For Interval, this is a no-op. --- 263,269 ---- CTAssert(DomainTraits::singleValued == 1); dom[0] = begval; dom[1] = static_cast(endval - begval + 1); ! PAssert(static_cast(begval) <= endval || dom[1] == 0); } // change the loop variable for this object. For Interval, this is a no-op. Index: Domain/DomainTraits.Range.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Domain/DomainTraits.Range.h,v retrieving revision 1.21 diff -c -p -r1.21 DomainTraits.Range.h *** Domain/DomainTraits.Range.h 2000/03/07 13:16:35 1.21 --- Domain/DomainTraits.Range.h 2001/03/28 01:59:31 *************** struct DomainTraits< Range<1> > *** 238,244 **** CTAssert(DomainTraits::dimensions == 1); CTAssert(DomainTraits::singleValued == 1); CTAssert(DomainTraits::singleValued == 1); ! Element_t strideval = (endval < begval ? -1 : 1); dom[0] = begval; dom[1] = (endval - begval)/strideval + 1; dom[2] = strideval; --- 238,244 ---- CTAssert(DomainTraits::dimensions == 1); CTAssert(DomainTraits::singleValued == 1); CTAssert(DomainTraits::singleValued == 1); ! Element_t strideval = (endval < static_cast(begval) ? -1 : 1); dom[0] = begval; dom[1] = (endval - begval)/strideval + 1; dom[2] = strideval; Index: Partition/UniformMapper.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Partition/UniformMapper.h,v retrieving revision 1.3 diff -c -p -r1.3 UniformMapper.h *** Partition/UniformMapper.h 2000/06/07 23:36:46 1.3 --- Partition/UniformMapper.h 2001/03/28 01:59:36 *************** public: *** 86,91 **** --- 86,93 ---- void map(const List_t&) const; + virtual ~UniformMapper () {} + // member data private: Index: Utilities/Observer.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Utilities/Observer.h,v retrieving revision 1.10 diff -c -p -r1.10 Observer.h *** Utilities/Observer.h 2000/03/07 13:18:25 1.10 --- Utilities/Observer.h 2001/03/28 01:59:37 *************** public: *** 182,188 **** // The destructor is not made virtual, since we should not ever need // to delete an object via its SingleObserver base class. ! ~SingleObserver() { } //============================================================ --- 182,188 ---- // The destructor is not made virtual, since we should not ever need // to delete an object via its SingleObserver base class. ! virtual ~SingleObserver() { } //============================================================ From sasmith at mail.cybermesa.com Wed Mar 28 23:37:18 2001 From: sasmith at mail.cybermesa.com (sasmith at mail.cybermesa.com) Date: Wed, 28 Mar 2001 23:37:18 GMT Subject: [pooma-dev] NewField issues Message-ID: <200103282342.QAA15054@mail.cybermesa.com> An embedded and charset-unspecified text was scrubbed... Name: not available URL: From JimC at proximation.com Wed Mar 28 23:45:05 2001 From: JimC at proximation.com (James Crotinger) Date: Wed, 28 Mar 2001 15:45:05 -0800 Subject: [pooma-dev] RFA: Reorder Initializers (2 of 3) Message-ID: Why are these changes needed? I thought ordering didn't matter. Also, you added some explicit calls to default constructors - again, why? (You may need to reply to jcrotinger at mac.com.) Jim --------------------------------------------------- James A. Crotinger Software Research Scientist Proximation, LLC -----Original Message----- From: Jeffrey Oldham [mailto:oldham at codesourcery.com] Sent: Wednesday, March 28, 2001 4:39 PM To: pooma-dev at pooma.codesourcery.com Subject: [pooma-dev] RFA: Reorder Initializers (2 of 3) << File: Mar27-reorder.patch >> The large patch I sent out yesterday was too complicated. Thus, I have split it into five pieces: 1) Add typenames. 2) Reorder constructor initializers. <-- this patch 3) Other changes. 4) Preprocessor changes. (withdrawn) 5) Changes to deprecated directories. (withdrawn) I withdraw the large patch. (I cut the large patch apart by hand so small typos may be present.) Scott Haney indicated he wants to review these changes. 2001-03-27 Jeffrey D. Oldham * Array/PrintArray.h (PrintArray::PrintArray): Reorder constructor's initializers to reflect class declaration order. * Domain/Grid.h (Grid::Grid): Add a base class initializer. * Engine/IndexFunctionEngine.h (Engine): Reorder constructor's initializers to reflect class declaration order. * Engine/RemoteEngine.h (GatherContextsData::GatherContextsData): Add a base class initializer. * Layout/DynamicEvents.h (CreateEvent::CreateEvent): Likewise. (DestroyEvent::DestroyEvent): Likewise. (CopyEvent::CopyEvent): Likewise. (CopyPatchEvent::CopyPatchEvent): Likewise. * Layout/GlobalIDDataBase.h (Pack::Pack): Likewise. * Utilities/RefCountedBlockPtr.h (RefBlockController::RefBlockController): Reorder constructor's initializers to reflect class declaration order. (RefCountedBlockPtr): Change preprocessor line. (RefCountedBlockPtr::RefCountedBlockPtr): Reorder constructor's initializers to reflect class declaration order. Tested on sequential Linux using gcc 3.1 Approved by ???Scott Haney??? Thanks, Jeffrey D. Oldham oldham at codesourcery.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From oldham at codesourcery.com Thu Mar 29 00:01:30 2001 From: oldham at codesourcery.com (Jeffrey Oldham) Date: Wed, 28 Mar 2001 16:01:30 -0800 Subject: RFA: src/NewField Changes Message-ID: <20010328160130.A21197@codesourcery.com> In the continuing pursuit to compile a "hello, world" Pooma program using g++, here are more changes. OK to commit? 2001-03-28 Jeffrey D. Oldham * PrintField.h (PrintField::PrintField): Reorder constructor initializers to reflect class member order. * Updater/UpdaterList.h (UpdaterListData::UpdaterListData): Likewise. Also add default initializer for base class. (UpdaterListData::~UpdaterListData): Change loop iterator type to correspond to std::vector. Tested on sequential Linux using gcc 3.1 by compiling Pooma library Approved by ???you??? Thanks, Jeffrey D. Oldham oldham at codesourcery.com -------------- next part -------------- Index: PrintField.h =================================================================== RCS file: /home/pooma/Repository/r2/src/NewField/PrintField.h,v retrieving revision 1.2 diff -c -p -r1.2 PrintField.h *** PrintField.h 2000/07/20 21:03:51 1.2 --- PrintField.h 2001/03/28 23:52:50 *************** public: *** 188,194 **** bool scientific = false, int spacing = 1) : domainwidth_m(domainWidth), datawidth_m(dataWidth), dataprecision_m(dataPrecision), carreturn_m(carReturn), ! scientific_m(scientific), spacing_m(spacing) { PAssert(domainwidth_m > 0); PAssert(datawidth_m > 0); --- 188,194 ---- 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); Index: Updater/UpdaterList.h =================================================================== RCS file: /home/pooma/Repository/r2/src/NewField/Updater/UpdaterList.h,v retrieving revision 1.7 diff -c -p -r1.7 UpdaterList.h *** Updater/UpdaterList.h 2001/02/21 20:11:38 1.7 --- Updater/UpdaterList.h 2001/03/28 23:52:50 *************** public: *** 66,73 **** // Copy constructor. UpdaterListData(const UpdaterListData &model) ! : data_m(model.data_m), ! updating_m(false) { } --- 66,72 ---- // Copy constructor. UpdaterListData(const UpdaterListData &model) ! : RefCounted (), updating_m(false), data_m(model.data_m) { } *************** public: *** 88,94 **** ~UpdaterListData() { ! for (int i = 0; i < data_m.size(); i++) delete data_m[i]; } --- 87,93 ---- ~UpdaterListData() { ! for (size_type i = 0; i < data_m.size(); i++) delete data_m[i]; } *************** private: *** 139,144 **** --- 138,144 ---- mutable bool updating_m; std::vector data_m; + typedef std::vector::size_type size_type; }; From swhaney at earthlink.net Thu Mar 29 00:08:10 2001 From: swhaney at earthlink.net (Scott Haney) Date: Wed, 28 Mar 2001 17:08:10 -0700 Subject: [pooma-dev] RFA: Add typenames (1 of 3) In-Reply-To: <20010328152634.A23230@codesourcery.com> Message-ID: On Wednesday, March 28, 2001, at 04:26 PM, Jeffrey Oldham wrote: > The large patch I sent out yesterday was too complicated. Thus, I > have split it into five pieces: > > 1) Add typenames. <-- this patch > 2) Reorder constructor initializers. > 3) Other changes. > 4) Preprocessor changes. (withdrawn) > 5) Changes to deprecated directories. (withdrawn) > > I withdraw the large patch. (I cut the large patch apart by hand so > small typos may be present.) > > Scott Haney indicated he wants to review these changes. These seem OK. Scott From swhaney at earthlink.net Thu Mar 29 00:18:59 2001 From: swhaney at earthlink.net (Scott Haney) Date: Wed, 28 Mar 2001 17:18:59 -0700 Subject: [pooma-dev] RFA: Reorder Initializers (2 of 3) In-Reply-To: <20010328153905.D23230@codesourcery.com> Message-ID: On Wednesday, March 28, 2001, at 04:39 PM, Jeffrey Oldham wrote: > The large patch I sent out yesterday was too complicated. Thus, I > have split it into five pieces: > > 1) Add typenames. > 2) Reorder constructor initializers. <-- this patch > 3) Other changes. > 4) Preprocessor changes. (withdrawn) > 5) Changes to deprecated directories. (withdrawn) > > I withdraw the large patch. (I cut the large patch apart by hand so > small typos may be present.) > > Scott Haney indicated he wants to review these changes. I don't have a problem with reordering the ctor initializers to match the ordering in the class. This strikes me as good style, but I am a little concerned if GCC requires this. I didn't think the standard did. Like Jim, I do have a problem with adding base default base class initializers. I thought the compiler was supposed to do this implicitly. Is this a stylistic change or a GCC-required change or is this required by the standard? Scott From oldham at codesourcery.com Thu Mar 29 00:31:18 2001 From: oldham at codesourcery.com (Jeffrey Oldham) Date: Wed, 28 Mar 2001 16:31:18 -0800 Subject: [pooma-dev] RFA: Reorder Initializers (2 of 3) In-Reply-To: ; from JimC@proximation.com on Wed, Mar 28, 2001 at 03:45:05PM -0800 References: Message-ID: <20010328163118.B21197@codesourcery.com> On Wed, Mar 28, 2001 at 03:45:05PM -0800, James Crotinger wrote: > Why are these changes needed? I thought ordering didn't matter. Also, you > added some explicit calls to default constructors - again, why? > > (You may need to reply to jcrotinger at mac.com.) Good question. Since g++ was producing warnings, I assumed that it was warning the C++ standard was violated, but C++ standard \S 12.6.2 explicitly permits any order of initializers although they are called in the order of class declaration, not initializer order. However, Stroustrup, \S 10.4.6, writes, "It is best to specify the initializers in the member declaration order." I guess this is why g++ wants to produce warning messages. I added base class initializers when g++ warned that a copy constructor did not initialize its base class. For example, /nfs/oz/home/oldham/pooma/r2/src/NewField/Updater/UpdaterList.h:70: warning: base class `class RefCounted' should be explicitly initialized in the copy constructor Thus, please accept: if you want g++ users to not have to deal with warning messages reject: otherwise. Thanks, Jeffrey D. Oldham oldham at codesourcery.com From swhaney at earthlink.net Thu Mar 29 00:31:51 2001 From: swhaney at earthlink.net (Scott Haney) Date: Wed, 28 Mar 2001 17:31:51 -0700 Subject: [pooma-dev] RFA: Other Changes (3 of 3) In-Reply-To: <20010328154149.E23230@codesourcery.com> Message-ID: On Wednesday, March 28, 2001, at 04:41 PM, Jeffrey Oldham wrote: > The large patch I sent out yesterday was too complicated. Thus, I > have split it into five pieces: > > 1) Add typenames. > 2) Reorder constructor initializers. > 3) Other changes. <-- this patch > 4) Preprocessor changes. (withdrawn) > 5) Changes to deprecated directories. (withdrawn) > > I withdraw the large patch. (I cut the large patch apart by hand so > small typos may be present.) > > > Allan Stokes suggested a different way to handle comparisons between > different types. Allan, can you provide code? > > Allan Stokes declined to review the virtual destructors. > > 2001-03-27 Jeffrey D. Oldham > > * Domain/DomainTraits.Grid.h (DomainTraits::setDomain): Rewrite to > ensure that comparisons occur between the same types. > * Domain/DomainTraits.Interval.h (DomainTraits::setDomain): Likewise. > * Domain/DomainTraits.Range.h (DomainTraits::setDomain): Likewise. > * Partition/UniformMapper.h (UniformMapper::~UniformMapper): New > empty function. > * Utilities/Observer.h (SingleObserver::~SingleObserver): Make > virtual. I don't understand why the casts should be required. Is this a compiler bug? While harmless (other than the virtual part), I don't understand why one needs to add an empty virtual destructor to UniformMapper. I can't see anyone inheriting from it. Why doesn't the compiler generate this? The change to SingleObserver seems OK. Scott From JimC at proximation.com Thu Mar 29 00:35:19 2001 From: JimC at proximation.com (James Crotinger) Date: Wed, 28 Mar 2001 16:35:19 -0800 Subject: [pooma-dev] RFA: Reorder Initializers (2 of 3) Message-ID: I don't have a problem with reordering the ctor initializers to match the ordering in the class. This strikes me as good style, but I am a little concerned if GCC requires this. I didn't think the standard did. I do have a problem with it. If I make a change in the ordering in the class I have to remember to reorder the initializers in all of the constructors. That can be a major pain in the ass. Like Jim, I do have a problem with adding base default base class initializers. I thought the compiler was supposed to do this implicitly. Is this a stylistic change or a GCC-required change or is this required by the standard? Scott -------------- next part -------------- An HTML attachment was scrubbed... URL: From swhaney at earthlink.net Thu Mar 29 00:35:33 2001 From: swhaney at earthlink.net (Scott Haney) Date: Wed, 28 Mar 2001 17:35:33 -0700 Subject: [pooma-dev] RFA: src/NewField Changes In-Reply-To: <20010328160130.A21197@codesourcery.com> Message-ID: On Wednesday, March 28, 2001, at 05:01 PM, Jeffrey Oldham wrote: > In the continuing pursuit to compile a "hello, world" Pooma program > using g++, here are more changes. > > OK to commit? > > 2001-03-28 Jeffrey D. Oldham > > * PrintField.h (PrintField::PrintField): Reorder constructor > initializers to reflect class member order. > * Updater/UpdaterList.h (UpdaterListData::UpdaterListData): > Likewise. Also add default initializer for base class. > (UpdaterListData::~UpdaterListData): Change loop iterator type to > correspond to std::vector. > > Tested on sequential Linux using gcc 3.1 by compiling Pooma library > Approved by ???you??? I don't mind reordering, but, as I mentioned before, I'd like to understand the default base class ctor stuff. I don't fully understand why the typedef is required. But, if it is required by the standard, could we put it in the function? Scott From swhaney at earthlink.net Thu Mar 29 00:41:37 2001 From: swhaney at earthlink.net (Scott Haney) Date: Wed, 28 Mar 2001 17:41:37 -0700 Subject: [pooma-dev] RFA: Reorder Initializers (2 of 3) In-Reply-To: <20010328163118.B21197@codesourcery.com> Message-ID: On Wednesday, March 28, 2001, at 05:31 PM, Jeffrey Oldham wrote: > Good question. Since g++ was producing warnings, I assumed that it > was warning the C++ standard was violated, but C++ standard \S 12.6.2 > explicitly permits any order of initializers although they are called > in the order of class declaration, not initializer order. However, > Stroustrup, \S 10.4.6, writes, "It is best to specify the initializers > in the member declaration order." I guess this is why g++ wants to > produce warning messages. Are there different warning levels in GCC? This seems like it falls in the "Chatty and more than a little annoying category." :-) This warning should not, it seems to me, be printed out by default. If there's no way to change this, we should make these changes. They're good style anyway. > > I added base class initializers when g++ warned that a copy > constructor did not initialize its base class. For example, > > /nfs/oz/home/oldham/pooma/r2/src/NewField/Updater/UpdaterList.h:70: > warning: base > class `class RefCounted' should be explicitly initialized in the > copy > constructor > > Thus, please > accept: if you want g++ users to not have to deal with warning messages > reject: otherwise. This strikes me as another annoying warning from GCC. Same comment as above. Scott -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 1400 bytes Desc: not available URL: From oldham at codesourcery.com Thu Mar 29 00:42:51 2001 From: oldham at codesourcery.com (Jeffrey Oldham) Date: Wed, 28 Mar 2001 16:42:51 -0800 Subject: Patch: Add typenames Message-ID: <20010328164251.C21197@codesourcery.com> Add "typename" in appropriate places. 2001-03-28 Jeffrey D. Oldham * Domain/DomainRemoveOverlap.h (DomainRemoveOverlap): Add `typename's. * Engine/RemoteEngine.h (Evaluator::evaluate): Likewise * Evaluator/Evaluator.h (Evaluate::evaluate): Likewise. * Evaluator/MultiArgEvaluator.h (MultiArgEvaluator::evaluate): Likewise. * Evaluator/Reduction.h (Reduction::evaluate): Likewise. * Field/Field.cpp (assign): Likewise. * Field/Field.h (Field::array): Reorder template and `inline'. (Field::arrayAll): Likewise. * Layout/GridLayout.cpp (GridLayoutData::initialize): Add `typename's. * Layout/SparseTileLayout.cpp (SparseTileLayoutData::~SparseTileLayoutData): Likewise. (SparseTileLayoutData::calcMaps): Likewise. (SparseTileLayoutData::calcAllocMaps): Likewise. (SparseTileLayoutData::calcGCFillList): Likewise. (SparseTileLayoutData::touches): Likewise. (SparseTileLayoutData::touchesAlloc): Likewise. (SparseTileLayoutData::print): Likewise. * Layout/UniformGridLayout.cpp (UniformGridLayoutData::partition): Likewise. (UniformGridLayoutData::initialize): Likewise. * Partition/BisectionMapper.h (BisectionMapper::map): Likewise. Tested on sequential Linux using gcc 3.1 Approved by Scott Haney Thanks, Jeffrey D. Oldham oldham at codesourcery.com -------------- next part -------------- Index: Domain/DomainRemoveOverlap.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Domain/DomainRemoveOverlap.h,v retrieving revision 1.6 diff -c -p -r1.6 DomainRemoveOverlap.h *** Domain/DomainRemoveOverlap.h 2000/03/07 13:16:35 1.6 --- Domain/DomainRemoveOverlap.h 2001/03/28 01:59:30 *************** DomainRemoveOverlap(const Interval *** 47,54 **** for (int i=0;i(r[i].min()))) --- 47,54 ---- for (int i=0;i(r[i].min()))) *************** DomainRemoveOverlap(const Interval *** 90,97 **** temp.clear(); } ! DomainList_t::iterator start = result.begin(); ! DomainList_t::iterator end = result.end(); for ( ; start!=end ; ++start) { if (!touches(*start,r ) ) --- 90,97 ---- temp.clear(); } ! typename DomainList_t::iterator start = result.begin(); ! typename DomainList_t::iterator end = result.end(); for ( ; start!=end ; ++start) { if (!touches(*start,r ) ) Index: Engine/RemoteEngine.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Engine/RemoteEngine.h,v retrieving revision 1.30 diff -c -p -r1.30 RemoteEngine.h *** Engine/RemoteEngine.h 2000/09/20 16:22:07 1.30 --- Engine/RemoteEngine.h 2001/03/28 01:59:33 *************** struct Evaluator(inter)); expressionApply(rhs, IntersectorTag(inter)); ! Inter_t::const_iterator i = inter.begin(); while (i != inter.end()) { Evaluator(). --- 1890,1896 ---- expressionApply(lhs, IntersectorTag(inter)); expressionApply(rhs, IntersectorTag(inter)); ! typename Inter_t::const_iterator i = inter.begin(); while (i != inter.end()) { Evaluator(). *************** struct Reduction present(inter.size()); std::vector computationalContext(inter.size()); ! Inter_t::const_iterator i = inter.begin(); int j, k, n = 0; for (j = 0; j < inter.size(); j++) { --- 2017,2023 ---- std::vector present(inter.size()); std::vector computationalContext(inter.size()); ! typename Inter_t::const_iterator i = inter.begin(); int j, k, n = 0; for (j = 0; j < inter.size(); j++) { Index: Evaluator/Evaluator.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Evaluator/Evaluator.h,v retrieving revision 1.56 diff -c -p -r1.56 Evaluator.h *** Evaluator/Evaluator.h 2000/09/20 16:22:10 1.56 --- Evaluator/Evaluator.h 2001/03/28 01:59:33 *************** struct Evaluator *** 201,207 **** expressionApply(lhs, IntersectorTag(inter)); expressionApply(rhs, IntersectorTag(inter)); ! Inter_t::const_iterator i = inter.begin(); while (i != inter.end()) { Evaluator().evaluate(lhs(*i), op, rhs(*i)); --- 201,207 ---- expressionApply(lhs, IntersectorTag(inter)); expressionApply(rhs, IntersectorTag(inter)); ! typename Inter_t::const_iterator i = inter.begin(); while (i != inter.end()) { Evaluator().evaluate(lhs(*i), op, rhs(*i)); Index: Evaluator/MultiArgEvaluator.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Evaluator/MultiArgEvaluator.h,v retrieving revision 1.5 diff -c -p -r1.5 MultiArgEvaluator.h *** Evaluator/MultiArgEvaluator.h 2001/03/04 06:46:48 1.5 --- Evaluator/MultiArgEvaluator.h 2001/03/28 01:59:33 *************** public: *** 248,254 **** applyMultiArg(multiArg, inter, info.writers()); ! Inter_t::const_iterator i = inter.begin(); while (i != inter.end()) { INode inode = info.extendDomain(*i); --- 248,254 ---- applyMultiArg(multiArg, inter, info.writers()); ! typename Inter_t::const_iterator i = inter.begin(); while (i != inter.end()) { INode inode = info.extendDomain(*i); *************** struct MultiArgEvaluator(). --- 349,355 ---- applyMultiArg(multiArg, inter, info.writers()); ! typename Inter_t::const_iterator i = inter.begin(); while (i != inter.end()) { MultiArgEvaluator(). Index: Evaluator/Reduction.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Evaluator/Reduction.h,v retrieving revision 1.9 diff -c -p -r1.9 Reduction.h *** Evaluator/Reduction.h 2000/09/20 16:22:10 1.9 --- Evaluator/Reduction.h 2001/03/28 01:59:33 *************** struct Reduction *** 222,228 **** Pooma::scheduler().beginGeneration(); ! Inter_t::const_iterator i = inter.begin(); int j = 0; while (j < n) { --- 222,228 ---- Pooma::scheduler().beginGeneration(); ! typename Inter_t::const_iterator i = inter.begin(); int j = 0; while (j < n) { Index: Field/Field.cpp =================================================================== RCS file: /home/pooma/Repository/r2/src/Field/Field.cpp,v retrieving revision 1.8 diff -c -p -r1.8 Field.cpp *** Field/Field.cpp 2000/07/20 15:39:27 1.8 --- Field/Field.cpp 2001/03/28 01:59:34 *************** assign(const Field & *** 114,120 **** // if the rhs is an expression. // This will allow subsequent functors to actually reach the leaves. ! CreateLeaf::Leaf_t rhsExpr = CreateLeaf::make(vrhs); // Optionally, check conformance. --- 114,120 ---- // if the rhs is an expression. // This will allow subsequent functors to actually reach the leaves. ! typename CreateLeaf::Leaf_t rhsExpr = CreateLeaf::make(vrhs); // Optionally, check conformance. *************** assign(const Field & *** 175,181 **** // if the rhs is an expression. // This will allow subsequent functors to actually reach the leaves. ! CreateLeaf::Leaf_t rhsExpr = CreateLeaf::make(vrhs); // Optionally, check conformance. --- 175,181 ---- // if the rhs is an expression. // This will allow subsequent functors to actually reach the leaves. ! typename CreateLeaf::Leaf_t rhsExpr = CreateLeaf::make(vrhs); // Optionally, check conformance. *************** assign(const Field & *** 240,246 **** // if the rhs is an expression. // This will allow subsequent functors to actually reach the leaves. ! CreateLeaf::Leaf_t rhsExpr = CreateLeaf::make(vrhs); // Optionally, check conformance. --- 240,246 ---- // if the rhs is an expression. // This will allow subsequent functors to actually reach the leaves. ! typename CreateLeaf::Leaf_t rhsExpr = CreateLeaf::make(vrhs); // Optionally, check conformance. *************** assign(const Array &l *** 309,315 **** // if the rhs is an expression. // This will allow subsequent functors to actually reach the leaves. ! CreateLeaf::Leaf_t rhsExpr = CreateLeaf::make(vrhs); // Optionally, check conformance. --- 309,315 ---- // if the rhs is an expression. // This will allow subsequent functors to actually reach the leaves. ! typename CreateLeaf::Leaf_t rhsExpr = CreateLeaf::make(vrhs); // Optionally, check conformance. *************** assign(const Array &l *** 366,372 **** // if the rhs is an expression. // This will allow subsequent functors to actually reach the leaves. ! CreateLeaf::Leaf_t rhsExpr = CreateLeaf::make(vrhs); // Optionally, check conformance. --- 366,372 ---- // if the rhs is an expression. // This will allow subsequent functors to actually reach the leaves. ! typename CreateLeaf::Leaf_t rhsExpr = CreateLeaf::make(vrhs); // Optionally, check conformance. Index: Field/Field.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Field/Field.h,v retrieving revision 1.68 diff -c -p -r1.68 Field.h *** Field/Field.h 2000/09/20 16:22:13 1.68 --- Field/Field.h 2001/03/28 01:59:34 *************** public: *** 1074,1089 **** //--------------------------------------------------------------------------- // View-creation operations yielding Arrays. ! typename ArrayView::Type_t ! inline array() const { typedef ArrayView Ret_t; return Ret_t::make(*this, physicalDomain()); }; typename ArrayView::Type_t ! inline arrayAll() const { typedef ArrayView Ret_t; return Ret_t::make(*this, totalDomain()); --- 1074,1091 ---- //--------------------------------------------------------------------------- // View-creation operations yielding Arrays. ! ! inline typename ArrayView::Type_t ! array() const { typedef ArrayView Ret_t; return Ret_t::make(*this, physicalDomain()); }; + inline typename ArrayView::Type_t ! arrayAll() const { typedef ArrayView Ret_t; return Ret_t::make(*this, totalDomain()); Index: Layout/GridLayout.cpp =================================================================== RCS file: /home/pooma/Repository/r2/src/Layout/GridLayout.cpp,v retrieving revision 1.82 diff -c -p -r1.82 GridLayout.cpp *** Layout/GridLayout.cpp 2000/06/27 01:58:29 1.82 --- Layout/GridLayout.cpp 2001/03/28 01:59:35 *************** inline void GridLayoutData::initial *** 178,185 **** gpar.partition(innerdomain_m, all_m, cmap); ! List_t::iterator start = all_m.begin(); ! List_t::iterator end = all_m.end(); for ( ; start!=end ;++start ) { --- 178,185 ---- gpar.partition(innerdomain_m, all_m, cmap); ! typename List_t::iterator start = all_m.begin(); ! typename List_t::iterator end = all_m.end(); for ( ; start!=end ;++start ) { *************** void GridLayoutData::initialize(con *** 283,290 **** // Iterate through the complete list of nodes provided and assign to the // appropriate subcategories. ! List_t::iterator start = all_m.begin(); ! List_t::iterator end = all_m.end(); for ( ; start!=end ;++start ) { --- 283,290 ---- // Iterate through the complete list of nodes provided and assign to the // appropriate subcategories. ! typename List_t::iterator start = all_m.begin(); ! typename List_t::iterator end = all_m.end(); for ( ; start!=end ;++start ) { Index: Layout/SparseTileLayout.cpp =================================================================== RCS file: /home/pooma/Repository/r2/src/Layout/SparseTileLayout.cpp,v retrieving revision 1.25 diff -c -p -r1.25 SparseTileLayout.cpp *** Layout/SparseTileLayout.cpp 2000/10/04 04:14:26 1.25 --- Layout/SparseTileLayout.cpp 2001/03/28 01:59:36 *************** SparseTileLayoutData::~SparseTileLa *** 170,177 **** template void SparseTileLayoutData::syncPatch() { ! List_t::iterator start = all_m.begin(); ! List_t::iterator end = all_m.end(); for ( ; start != end ; ++start) if ( (*start)->context() == Pooma::context() ||(*start)->context() == -1 ) --- 170,177 ---- template void SparseTileLayoutData::syncPatch() { ! typename List_t::iterator start = all_m.begin(); ! typename List_t::iterator end = all_m.end(); for ( ; start != end ; ++start) if ( (*start)->context() == Pooma::context() ||(*start)->context() == -1 ) *************** void SparseTileLayoutData::calcMaps *** 202,209 **** map_m.initialize(domain_m); ! List_t::const_iterator start = all_m.begin(); ! List_t::const_iterator end = all_m.end(); int i=0; for ( ; start != end ; ++start, ++i ) --- 202,209 ---- map_m.initialize(domain_m); ! typename List_t::const_iterator start = all_m.begin(); ! typename List_t::const_iterator end = all_m.end(); int i=0; for ( ; start != end ; ++start, ++i ) *************** void SparseTileLayoutData::calcAllo *** 229,236 **** mapAloc_m.initialize(domain_m); ! List_t::const_iterator start = all_m.begin(); ! List_t::const_iterator end = all_m.end(); int i=0; --- 229,236 ---- mapAloc_m.initialize(domain_m); ! typename List_t::const_iterator start = all_m.begin(); ! typename List_t::const_iterator end = all_m.end(); int i=0; *************** void SparseTileLayoutData::calcGCFi *** 421,428 **** TouchList_t tlist; // first we do the internal overlap regions ! List_t::iterator start = all_m.begin(); ! List_t::iterator end = all_m.end(); for ( ; start!=end; ++start) { --- 421,428 ---- TouchList_t tlist; // first we do the internal overlap regions ! typename List_t::iterator start = all_m.begin(); ! typename List_t::iterator end = all_m.end(); for ( ; start!=end; ++start) { *************** void SparseTileLayoutData::calcGCFi *** 432,439 **** // now pack the tlist into the GCFillInfo object // The if test is to remove the self-touch entry ! TouchList_t::iterator GCLstart = tlist.begin(); ! TouchList_t::iterator GCLend = tlist.end(); for( ; GCLstart != GCLend ;++GCLstart) { --- 432,439 ---- // now pack the tlist into the GCFillInfo object // The if test is to remove the self-touch entry ! typename TouchList_t::iterator GCLstart = tlist.begin(); ! typename TouchList_t::iterator GCLend = tlist.end(); for( ; GCLstart != GCLend ;++GCLstart) { *************** void SparseTileLayoutData::calcGCFi *** 508,514 **** for ( ; gst!=gen ; ++gst ) { ! std::vector::iterator ts = temp2.begin(); for ( ; ts != temp2.end() ; ++ts ) { temp3 = DomainRemoveOverlap(*ts,gst->domain_m); --- 508,514 ---- for ( ; gst!=gen ; ++gst ) { ! typename std::vector::iterator ts = temp2.begin(); for ( ; ts != temp2.end() ; ++ts ) { temp3 = DomainRemoveOverlap(*ts,gst->domain_m); *************** void SparseTileLayoutData::calcGCFi *** 518,524 **** temp4.clear(); } ! std::vector::iterator ts = temp2.begin(); for( ; ts != temp2.end(); ++ts) temp.push_back(GCBorderFillInfo(*ts, bst->patchID() )); } --- 518,524 ---- temp4.clear(); } ! typename std::vector::iterator ts = temp2.begin(); for( ; ts != temp2.end(); ++ts) temp.push_back(GCBorderFillInfo(*ts, bst->patchID() )); } *************** int SparseTileLayoutData::touches(c *** 697,704 **** typedef Node OutNode_t; // Ack!!! OutDomain_t is a Range, but DomainMap::touches requires an Interval. ! DomainMap,pidx_t>::Touch_t dmti = map_m.touch(Interval(d)); ! DomainMap,pidx_t>::touch_iterator a; int count = 0; --- 697,705 ---- typedef Node OutNode_t; // Ack!!! OutDomain_t is a Range, but DomainMap::touches requires an Interval. ! typename DomainMap,pidx_t>::Touch_t dmti = ! map_m.touch(Interval(d)); ! typename DomainMap,pidx_t>::touch_iterator a; int count = 0; *************** int SparseTileLayoutData::touchesAl *** 752,759 **** typedef Node OutNode_t; ! DomainMap,pidx_t>::Touch_t dmti = map_m.touch(d); ! DomainMap,pidx_t>::touch_iterator a; int count = 0; --- 753,760 ---- typedef Node OutNode_t; ! typename DomainMap,pidx_t>::Touch_t dmti = map_m.touch(d); ! typename DomainMap,pidx_t>::touch_iterator a; int count = 0; *************** void SparseTileLayoutData::print(Ou *** 791,798 **** o<< " domain_m " << domain_m <globalID()<<" "<< (*start)->domain()<<" "<< --- 792,799 ---- o<< " domain_m " << domain_m <globalID()<<" "<< (*start)->domain()<<" "<< Index: Layout/UniformGridLayout.cpp =================================================================== RCS file: /home/pooma/Repository/r2/src/Layout/UniformGridLayout.cpp,v retrieving revision 1.34 diff -c -p -r1.34 UniformGridLayout.cpp *** Layout/UniformGridLayout.cpp 2000/08/15 17:30:31 1.34 --- Layout/UniformGridLayout.cpp 2001/03/28 01:59:36 *************** void UniformGridLayoutData::partiti *** 155,162 **** // fill local and remote lists ! List_t::const_iterator start = all_m.begin(); ! List_t::const_iterator end = all_m.end(); for ( ; start!=end ; ++start) { --- 155,162 ---- // fill local and remote lists ! typename List_t::const_iterator start = all_m.begin(); ! typename List_t::const_iterator end = all_m.end(); for ( ; start!=end ; ++start) { *************** void UniformGridLayoutData::initial *** 258,265 **** // Iterate through the complete list of nodes provided and assign to the // appropriate subcategories. ! List_t::iterator start = all_m.begin(); ! List_t::iterator end = all_m.end(); for ( ; start!=end ;++start ) { --- 258,265 ---- // Iterate through the complete list of nodes provided and assign to the // appropriate subcategories. ! typename List_t::iterator start = all_m.begin(); ! typename List_t::iterator end = all_m.end(); for ( ; start!=end ;++start ) { Index: Partition/BisectionMapper.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Partition/BisectionMapper.h,v retrieving revision 1.3 diff -c -p -r1.3 BisectionMapper.h *** Partition/BisectionMapper.h 2000/06/08 23:07:59 1.3 --- Partition/BisectionMapper.h 2001/03/28 01:59:36 *************** public: *** 86,94 **** while ( bvec.size() < ncontexts ) { int s = 0; ! std::list::iterator bstart = bvec.begin(); ! std::list::iterator bend = bvec.end(); ! std::list::iterator bpatch; // find the largest patch. for ( ; bstart != bend ; ++bstart) { --- 86,94 ---- while ( bvec.size() < ncontexts ) { int s = 0; ! typename std::list::iterator bstart = bvec.begin(); ! typename std::list::iterator bend = bvec.end(); ! typename std::list::iterator bpatch; // find the largest patch. for ( ; bstart != bend ; ++bstart) { *************** public: *** 133,140 **** for ( int i=1; i::iterator start = bvec.begin(); ! std::list::iterator end = bvec.end(); int pcontext = 0; for ( ; start != end ; ++start) { --- 133,140 ---- for ( int i=1; i::iterator start = bvec.begin(); ! typename std::list::iterator end = bvec.end(); int pcontext = 0; for ( ; start != end ; ++start) { From swhaney at earthlink.net Thu Mar 29 00:44:44 2001 From: swhaney at earthlink.net (Scott Haney) Date: Wed, 28 Mar 2001 17:44:44 -0700 Subject: [pooma-dev] RFA: Reorder Initializers (2 of 3) In-Reply-To: Message-ID: On Wednesday, March 28, 2001, at 05:35 PM, James Crotinger wrote: > > > I don't have a problem with reordering the ctor initializers to match > the ordering in the class. This strikes me as good style, but I am a > little concerned if GCC requires this. I didn't think the standard did. > > I do have a problem with it. If I make a change in the ordering in the > class I have to remember to reorder the initializers in all of the > constructors. That can be a major pain in the ass. I said I didn't have a problem with Jeffrey fiddling with the order. I agree that having to fiddle with the order is a problem. Happily, we have some GCC developers with write permissions to the CVS repository.. :-) > > Like Jim, I do have a problem with adding base default base class > initializers. I thought the compiler was supposed to do this implicitly. > Is this a stylistic change or a GCC-required change or is this required > by the standard? > > Scott > -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 1112 bytes Desc: not available URL: From oldham at codesourcery.com Thu Mar 29 00:52:00 2001 From: oldham at codesourcery.com (Jeffrey Oldham) Date: Wed, 28 Mar 2001 16:52:00 -0800 Subject: [pooma-dev] RFA: Reorder Initializers (2 of 3) In-Reply-To: <20010328163118.B21197@codesourcery.com>; from oldham@codesourcery.com on Wed, Mar 28, 2001 at 04:31:18PM -0800 References: <20010328163118.B21197@codesourcery.com> Message-ID: <20010328165200.D21197@codesourcery.com> On Wed, Mar 28, 2001 at 04:31:18PM -0800, Jeffrey Oldham wrote: > On Wed, Mar 28, 2001 at 03:45:05PM -0800, James Crotinger wrote: > > Why are these changes needed? I thought ordering didn't matter. Also, you > > added some explicit calls to default constructors - again, why? > > I added base class initializers when g++ warned that a copy > constructor did not initialize its base class. For example, > > /nfs/oz/home/oldham/pooma/r2/src/NewField/Updater/UpdaterList.h:70: warning: base > class `class RefCounted' should be explicitly initialized in the copy > constructor I do not believe the C++ standard requires this. Mark Mitchell explained to me that g++ warns because g++ assumes copy constructors that do not deal with a base class accidentally omit dealing with the base class and the author should look into this. Neither he nor I know of a way to turn off these g++ warnings without turning off all warnings. > Please > accept: if you want g++ users to not have to deal with warning messages > reject: otherwise. Thanks, Jeffrey D. Oldham oldham at codesourcery.com From JimC at proximation.com Thu Mar 29 00:53:01 2001 From: JimC at proximation.com (James Crotinger) Date: Wed, 28 Mar 2001 16:53:01 -0800 Subject: [pooma-dev] RFA: Reorder Initializers (2 of 3) Message-ID: Thus, please accept: if you want g++ users to not have to deal with warning messages reject: otherwise. I think this should be submitted as a g++ bug. This is a stylistic thing, and as I said before, it is a pain since member order is an implementation detail that is subject to change, and IMHO I shouldn't have to go through all my constructors reordering initializer lists if I make such a change in the data structure. I don't understand the warning about the RefCounted copy constructor not being called. It has a copy constructor. Shouldn't it be implicitly called? Thanks, Jeffrey D. Oldham oldham at codesourcery.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From swhaney at earthlink.net Thu Mar 29 01:10:05 2001 From: swhaney at earthlink.net (Scott Haney) Date: Wed, 28 Mar 2001 18:10:05 -0700 Subject: [pooma-dev] RFA: Reorder Initializers (2 of 3) In-Reply-To: <20010328165200.D21197@codesourcery.com> Message-ID: On Wednesday, March 28, 2001, at 05:52 PM, Jeffrey Oldham wrote: > I do not believe the C++ standard requires this. Mark Mitchell > explained to me that g++ warns because g++ assumes copy constructors > that do not deal with a base class accidentally omit dealing with the > base class and the author should look into this. Neither he nor I > know of a way to turn off these g++ warnings without turning off all > warnings. > >> Please >> accept: if you want g++ users to not have to deal with warning messages >> reject: otherwise. I think these are bad warnings that are more properly emitted by a lint type program. It is next to impossible for folks working with compilers who aren't similarly enthusiastic in the warning department to guard against this. If we try to enforce this policy, it will put a strain on the people compiling with GCC to reorder and add stuff. Recognizing that warning-free compilation is a good thing, do we want to take on this burden? Scott From mark at codesourcery.com Thu Mar 29 01:52:56 2001 From: mark at codesourcery.com (Mark Mitchell) Date: Wed, 28 Mar 2001 17:52:56 -0800 Subject: [pooma-dev] RFA: Reorder Initializers (2 of 3) In-Reply-To: References: Message-ID: <20010328175256L.mitchell@codesourcery.com> >>>>> "James" == James Crotinger writes: James> I think this should be submitted as a g++ bug. This is a The real G++ bug is that you can't control warnings individually, I think. Putting initializers in an order other than the order they're declared in the class can be confusing to the reader -- people tend to (mistakenly) think that the written order is the order things will actually happen in. Most style guides (Meyers, Taligent, etc.) suggest that you should not write the initializers out of order, in order to avoid confusing future readers of the code. -- Mark Mitchell mark at codesourcery.com CodeSourcery, LLC http://www.codesourcery.com From mark at codesourcery.com Thu Mar 29 02:02:01 2001 From: mark at codesourcery.com (Mark Mitchell) Date: Wed, 28 Mar 2001 18:02:01 -0800 Subject: [pooma-dev] RFA: Reorder Initializers (2 of 3) In-Reply-To: <200103290118.RAA32468@gandalf.codesourcery.com> References: <20010328165200.D21197@codesourcery.com> <200103290118.RAA32468@gandalf.codesourcery.com> Message-ID: <20010328180201X.mitchell@codesourcery.com> >>>>> "Scott" == Scott Haney writes: Scott> It is next to impossible for folks working with compilers Scott> who aren't similarly enthusiastic in the warning department Scott> to guard against this. If we try to enforce this policy, Scott> it will put a strain on the people compiling with GCC to Scott> reorder and add stuff. Recognizing that warning-free Scott> compilation is a good thing, do we want to take on this Scott> burden? That's an intelligent question. There is definitely a cost here. However, we shouldn't regard G++ as particularly more malleable than other compilers. I'm all for fixing outright bugs, but this is a warning that a lot of G++ users like. Ideally, we'd have a way to turn on and off particular warnings, and then we could perhaps decide that for POOMA we didn't care about this one. I guess I'd be inclined to suggest that we try to get things in the "right" order, and that we let Jeffrey fix these things up as he finds them. Jeffrey, what level of warnings are you using? Are you using -W -Wall? That might be a little aggressive. -- Mark Mitchell mark at codesourcery.com CodeSourcery, LLC http://www.codesourcery.com From swhaney at earthlink.net Thu Mar 29 03:33:54 2001 From: swhaney at earthlink.net (Scott Haney) Date: Wed, 28 Mar 2001 20:33:54 -0700 Subject: [pooma-dev] RFA: Reorder Initializers (2 of 3) In-Reply-To: <20010328180201X.mitchell@codesourcery.com> Message-ID: on 3/28/01 7:02 PM, Mark Mitchell at mark at codesourcery.com wrote: >>>>>> "Scott" == Scott Haney writes: > > Scott> It is next to impossible for folks working with compilers > Scott> who aren't similarly enthusiastic in the warning department > Scott> to guard against this. If we try to enforce this policy, > Scott> it will put a strain on the people compiling with GCC to > Scott> reorder and add stuff. Recognizing that warning-free > Scott> compilation is a good thing, do we want to take on this > Scott> burden? > > That's an intelligent question. There is definitely a cost here. > > However, we shouldn't regard G++ as particularly more malleable than > other compilers. I'm all for fixing outright bugs, but this is a > warning that a lot of G++ users like. Ideally, we'd have a way to > turn on and off particular warnings, and then we could perhaps decide > that for POOMA we didn't care about this one. I would complain about these warnings to any compiler vendor. I think we thought this could be fixed by CodeSourcery since you guys work on the compiler and we couldn't understand why these warnings would have community support since they may save a very small group of people, but, for the rest, it causes them to put on "ignore warning" filters. The order of initializers warning has some stylistic merit, but the no explicit base class constructor warning is, in my opinion, way out of line with respect to C++ idioms. > > I guess I'd be inclined to suggest that we try to get things in the > "right" order, and that we let Jeffrey fix these things up as he finds > them. This sounds reasonable. > > Jeffrey, what level of warnings are you using? Are you using -W > -Wall? That might be a little aggressive. I agree. Our goal should be no warnings under "factory" conditions. Scott From oldham at codesourcery.com Thu Mar 29 17:06:59 2001 From: oldham at codesourcery.com (Jeffrey Oldham) Date: Thu, 29 Mar 2001 09:06:59 -0800 Subject: RFA: Reorder Initializers Message-ID: <20010329090659.A24887@codesourcery.com> Good news! I turned off g++'s -W warning flag and the warning about omitting initialization of the base class in a copy constructor disappeared. After removing these changes, I will commit the patch since Scott Haney approved the reorderings of the initializers. The consensus of the previous discussions is that Pooma will support warning-free compilation using factory compiler settings. For g++, this is apparently "-Wall". Thanks for all your help, Jeffrey D. Oldham oldham at codesourcery.com From oldham at codesourcery.com Thu Mar 29 17:11:36 2001 From: oldham at codesourcery.com (Jeffrey Oldham) Date: Thu, 29 Mar 2001 09:11:36 -0800 Subject: Patch: Reorder Initializers Message-ID: <20010329091136.B24887@codesourcery.com> These changes support warning-free compilation using "g++ -Wall". 2001-03-29 Jeffrey D. Oldham * Array/PrintArray.h (PrintArray::PrintArray): Reorder constructor's initializers to reflect class declaration order. * Engine/IndexFunctionEngine.h (Engine): Likewise. * Layout/DynamicEvents.h (CreateEvent::CreateEvent): Likewise. (DestroyEvent::DestroyEvent): Likewise. (CopyEvent::CopyEvent): Likewise. (CopyPatchEvent::CopyPatchEvent): Likewise. * Layout/GlobalIDDataBase.h (Pack::Pack): Likewise. * Utilities/RefCountedBlockPtr.h (RefBlockController::RefBlockController): Likewise. (RefCountedBlockPtr::RefCountedBlockPtr): Likewise. Tested on sequential Linux using gcc 3.1 Reviewed by Scott Haney Thanks, Jeffrey D. Oldham oldham at codesourcery.com -------------- next part -------------- Index: Array/PrintArray.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Array/PrintArray.h,v retrieving revision 1.20 diff -c -p -r1.20 PrintArray.h *** Array/PrintArray.h 2000/07/20 15:36:24 1.20 --- Array/PrintArray.h 2001/03/28 01:59:29 *************** public: *** 202,208 **** bool scientific = false, int spacing = 1) : domainwidth_m(domainWidth), datawidth_m(dataWidth), dataprecision_m(dataPrecision), carreturn_m(carReturn), ! scientific_m(scientific), spacing_m(spacing) { PAssert(domainwidth_m > 0); PAssert(datawidth_m > 0); --- 202,208 ---- 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); Index: Engine/IndexFunctionEngine.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Engine/IndexFunctionEngine.h,v retrieving revision 1.19 diff -c -p -r1.19 IndexFunctionEngine.h *** Engine/IndexFunctionEngine.h 2000/09/26 21:04:29 1.19 --- Engine/IndexFunctionEngine.h 2001/03/28 01:59:32 *************** public: *** 122,128 **** // Construct from a domain object and an optional Functor object. Engine(const Domain_t &domain, const Functor &f = Functor()) ! : domain_m(domain), funct_m(f) { for (int d = 0; d < Dim; ++d) firsts_m[d] = domain[d].first(); --- 122,128 ---- // Construct from a domain object and an optional Functor object. Engine(const Domain_t &domain, const Functor &f = Functor()) ! : funct_m(f), domain_m(domain) { for (int d = 0; d < Dim; ++d) firsts_m[d] = domain[d].first(); *************** public: *** 139,145 **** // Construct from another index-function-engine. Engine(const This_t &model) ! : domain_m(model.domain()), funct_m(model.functor()) { for (int d = 0; d < Dim; ++d) firsts_m[d] = model.firsts_m[d]; --- 139,145 ---- // Construct from another index-function-engine. Engine(const This_t &model) ! : funct_m(model.functor()), domain_m(model.domain()) { for (int d = 0; d < Dim; ++d) firsts_m[d] = model.firsts_m[d]; Index: Layout/DynamicEvents.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Layout/DynamicEvents.h,v retrieving revision 1.11 diff -c -p -r1.11 DynamicEvents.h *** Layout/DynamicEvents.h 2000/03/07 13:17:34 1.11 --- Layout/DynamicEvents.h 2001/03/28 01:59:35 *************** public: *** 249,256 **** // is < 0, the create should be done in the last local patch. CreateEvent(CreateSize_t num, PatchID_t p) ! : amount_m(num), patch_m(p), ! ObserverEvent(DynamicEvents::create) { } --- 249,256 ---- // is < 0, the create should be done in the last local patch. CreateEvent(CreateSize_t num, PatchID_t p) ! : ObserverEvent(DynamicEvents::create), ! amount_m(num), patch_m(p) { } *************** public: *** 330,337 **** template DestroyEvent(const D &d, PatchID_t p, int method) ! : domain_m(d), patch_m(p), method_m(method), ! ObserverEvent(DynamicEventType::destroyCode) { CTAssert(DynamicEventType::dimensions == 1); } --- 330,337 ---- template DestroyEvent(const D &d, PatchID_t p, int method) ! : ObserverEvent(DynamicEventType::destroyCode), ! domain_m(d), patch_m(p), method_m(method) { CTAssert(DynamicEventType::dimensions == 1); } *************** public: *** 421,436 **** // copy to. CopyEvent(const Dom &d, PatchID_t fromp, PatchID_t top) ! : domain_m(d), from_m(fromp), to_m(top), ! ObserverEvent(DynamicEventType::copyCode) { CTAssert(DynamicEventType::dimensions == 1); } template CopyEvent(const D &d, PatchID_t fromp, PatchID_t top) ! : domain_m(d), from_m(fromp), to_m(top), ! ObserverEvent(DynamicEventType::copyCode) { CTAssert(DynamicEventType::dimensions == 1); } --- 421,436 ---- // copy to. CopyEvent(const Dom &d, PatchID_t fromp, PatchID_t top) ! : ObserverEvent(DynamicEventType::copyCode), ! domain_m(d), from_m(fromp), to_m(top) { CTAssert(DynamicEventType::dimensions == 1); } template CopyEvent(const D &d, PatchID_t fromp, PatchID_t top) ! : ObserverEvent(DynamicEventType::copyCode), ! domain_m(d), from_m(fromp), to_m(top) { CTAssert(DynamicEventType::dimensions == 1); } *************** public: *** 534,541 **** CopyPatchEvent(const Domain_t &domlists, const IDList_t &fromlist, PatchID_t top, bool create) ! : lists_m(domlists), from_m(fromlist), to_m(top), create_m(create), ! ObserverEvent(DynamicEvents::copyPatchList) { } --- 534,541 ---- CopyPatchEvent(const Domain_t &domlists, const IDList_t &fromlist, PatchID_t top, bool create) ! : ObserverEvent(DynamicEvents::copyPatchList), ! lists_m(domlists), from_m(fromlist), to_m(top), create_m(create) { } Index: Layout/GlobalIDDataBase.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Layout/GlobalIDDataBase.h,v retrieving revision 1.13 diff -c -p -r1.13 GlobalIDDataBase.h *** Layout/GlobalIDDataBase.h 2000/07/12 19:17:12 1.13 --- Layout/GlobalIDDataBase.h 2001/03/28 01:59:35 *************** private: *** 193,199 **** struct Pack { Pack() ! : layoutID_m(0), globalID_m(0), context_m(0), parent_m(0) { } inline --- 193,199 ---- struct Pack { Pack() ! : layoutID_m(0), context_m(0), globalID_m(0), parent_m(0) { } inline Index: Utilities/RefCountedBlockPtr.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Utilities/RefCountedBlockPtr.h,v retrieving revision 1.57 diff -c -p -r1.57 RefCountedBlockPtr.h *** Utilities/RefCountedBlockPtr.h 2001/03/21 00:56:09 1.57 --- Utilities/RefCountedBlockPtr.h 2001/03/28 01:59:37 *************** public: *** 128,134 **** explicit RefBlockController(size_t size) ! : dealloc_m(false), pBegin_m(0), pEnd_m(0), pEndOfStorage_m(0) { // Allocate memory, and set pointers to beginning and ending. This // also sets the dealloc_m flag to true. --- 128,134 ---- explicit RefBlockController(size_t size) ! : pBegin_m(0), pEnd_m(0), pEndOfStorage_m(0), dealloc_m(false) { // Allocate memory, and set pointers to beginning and ending. This // also sets the dealloc_m flag to true. *************** public: *** 583,590 **** // Initialize a block of a given size, optionally with a model. inline explicit RefCountedBlockPtr(size_t size) ! : blockControllerPtr_m(new Controller(size)), ! offset_m(0) { } inline RefCountedBlockPtr(size_t size, const T & model) --- 583,590 ---- // Initialize a block of a given size, optionally with a model. inline explicit RefCountedBlockPtr(size_t size) ! : offset_m(0), ! blockControllerPtr_m(new Controller(size)) { } inline RefCountedBlockPtr(size_t size, const T & model) *************** public: *** 620,627 **** // Copy constructor inline RefCountedBlockPtr(const This_t & model) ! : blockControllerPtr_m(model.blockControllerPtr_m), ! offset_m(model.offset_m) { } // Copy constructor from a RefCountedBlockPtr of the opposite bounds --- 620,627 ---- // Copy constructor inline RefCountedBlockPtr(const This_t & model) ! : offset_m(model.offset_m), ! blockControllerPtr_m(model.blockControllerPtr_m) { } // Copy constructor from a RefCountedBlockPtr of the opposite bounds From oldham at codesourcery.com Thu Mar 29 17:35:02 2001 From: oldham at codesourcery.com (Jeffrey Oldham) Date: Thu, 29 Mar 2001 09:35:02 -0800 Subject: [pooma-dev] RFA: src/NewField Changes In-Reply-To: <200103290040.QAA22375@oz.codesourcery.com>; from swhaney@earthlink.net on Wed, Mar 28, 2001 at 05:35:33PM -0700 References: <20010328160130.A21197@codesourcery.com> <200103290040.QAA22375@oz.codesourcery.com> Message-ID: <20010329093502.A25226@codesourcery.com> I revised the NewField patch per Scott's comments. Is it OK to commit? On Wed, Mar 28, 2001 at 05:35:33PM -0700, Scott Haney wrote: > > On Wednesday, March 28, 2001, at 05:01 PM, Jeffrey Oldham wrote: > > > In the continuing pursuit to compile a "hello, world" Pooma program > > using g++, here are more changes. > > > > OK to commit? > > > > 2001-03-28 Jeffrey D. Oldham > > > > * PrintField.h (PrintField::PrintField): Reorder constructor > > initializers to reflect class member order. > > * Updater/UpdaterList.h (UpdaterListData::UpdaterListData): > > Likewise. Also add default initializer for base class. > > (UpdaterListData::~UpdaterListData): Change loop iterator type to > > correspond to std::vector. > > > I don't mind reordering, but, as I mentioned before, I'd like to > understand the default base class ctor stuff. I removed the default base class ctor stuff. > I don't fully understand why the typedef is required. But, if it is > required by the standard, could we put it in the function? The C++ standard \S 23.1 [Container requirements] requires x::size_type to be an unsigned integral type. I moved the typedef into the destructor. Tested on sequential Linux using gcc 3.1 by compiling Pooma library and a Pooma "hello, world" program Approved by ???you??? Thanks, Jeffrey D. Oldham oldham at codesourcery.com -------------- next part -------------- Index: PrintField.h =================================================================== RCS file: /home/pooma/Repository/r2/src/NewField/PrintField.h,v retrieving revision 1.2 diff -c -p -r1.2 PrintField.h *** PrintField.h 2000/07/20 21:03:51 1.2 --- PrintField.h 2001/03/29 17:20:42 *************** public: *** 188,194 **** bool scientific = false, int spacing = 1) : domainwidth_m(domainWidth), datawidth_m(dataWidth), dataprecision_m(dataPrecision), carreturn_m(carReturn), ! scientific_m(scientific), spacing_m(spacing) { PAssert(domainwidth_m > 0); PAssert(datawidth_m > 0); --- 188,194 ---- 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); Index: Updater/UpdaterList.h =================================================================== RCS file: /home/pooma/Repository/r2/src/NewField/Updater/UpdaterList.h,v retrieving revision 1.7 diff -c -p -r1.7 UpdaterList.h *** Updater/UpdaterList.h 2001/02/21 20:11:38 1.7 --- Updater/UpdaterList.h 2001/03/29 17:20:42 *************** public: *** 66,73 **** // Copy constructor. UpdaterListData(const UpdaterListData &model) ! : data_m(model.data_m), ! updating_m(false) { } --- 66,73 ---- // Copy constructor. UpdaterListData(const UpdaterListData &model) ! : updating_m(false), data_m(model.data_m) ! { } *************** public: *** 88,94 **** ~UpdaterListData() { ! for (int i = 0; i < data_m.size(); i++) delete data_m[i]; } --- 88,95 ---- ~UpdaterListData() { ! typedef std::vector::size_type size_type; ! for (size_type i = 0; i < data_m.size(); i++) delete data_m[i]; } From oldham at codesourcery.com Thu Mar 29 18:19:12 2001 From: oldham at codesourcery.com (Jeffrey Oldham) Date: Thu, 29 Mar 2001 10:19:12 -0800 Subject: Patch: src/NewField Changes Message-ID: <20010329101912.A27701@codesourcery.com> This patch to the r2/src/NewField Pooma directory prevents "g++ -Wall" warnings. 2001-03-29 Jeffrey D. Oldham * PrintField.h (PrintField::PrintField): Reorder constructor initializers to reflect class member order. * Updater/UpdaterList.h (UpdaterListData::UpdaterListData): Likewise. (UpdaterListData::~UpdaterListData): Change loop iterator type to correspond to std::vector's specification. Tested on sequential Linux using gcc 3.1 Reviewed by Scott Haney Thanks, Jeffrey D. Oldham oldham at codesourcery.com -------------- next part -------------- Index: PrintField.h =================================================================== RCS file: /home/pooma/Repository/r2/src/NewField/PrintField.h,v retrieving revision 1.2 diff -c -p -r1.2 PrintField.h *** PrintField.h 2000/07/20 21:03:51 1.2 --- PrintField.h 2001/03/29 17:20:42 *************** public: *** 188,194 **** bool scientific = false, int spacing = 1) : domainwidth_m(domainWidth), datawidth_m(dataWidth), dataprecision_m(dataPrecision), carreturn_m(carReturn), ! scientific_m(scientific), spacing_m(spacing) { PAssert(domainwidth_m > 0); PAssert(datawidth_m > 0); --- 188,194 ---- 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); Index: Updater/UpdaterList.h =================================================================== RCS file: /home/pooma/Repository/r2/src/NewField/Updater/UpdaterList.h,v retrieving revision 1.7 diff -c -p -r1.7 UpdaterList.h *** Updater/UpdaterList.h 2001/02/21 20:11:38 1.7 --- Updater/UpdaterList.h 2001/03/29 17:20:42 *************** public: *** 66,73 **** // Copy constructor. UpdaterListData(const UpdaterListData &model) ! : data_m(model.data_m), ! updating_m(false) { } --- 66,73 ---- // Copy constructor. UpdaterListData(const UpdaterListData &model) ! : updating_m(false), data_m(model.data_m) ! { } *************** public: *** 88,94 **** ~UpdaterListData() { ! for (int i = 0; i < data_m.size(); i++) delete data_m[i]; } --- 88,95 ---- ~UpdaterListData() { ! typedef std::vector::size_type size_type; ! for (size_type i = 0; i < data_m.size(); i++) delete data_m[i]; } From mark at codesourcery.com Thu Mar 29 18:25:03 2001 From: mark at codesourcery.com (Mark Mitchell) Date: Thu, 29 Mar 2001 10:25:03 -0800 Subject: [pooma-dev] RFA: Reorder Initializers (2 of 3) In-Reply-To: References: <20010328180201X.mitchell@codesourcery.com> Message-ID: <20010329102503Y.mitchell@codesourcery.com> >>>>> "Scott" == Scott Haney writes: Scott> I would complain about these warnings to any compiler Scott> vendor. I think we thought this could be fixed by Scott> CodeSourcery since you guys work on the compiler and we "could be fixed" => "is broken" I think that's the key issue; is it broken? I see that this warning is issued unconditionally, by semantics.c:finish_mem_initializers. Jeffrey, we could make that warning conditional on something. I don't think flag_pedantic is appropriate, but we could conditionalize it on extra_warnings. (That's what -W turns on.) I see that the copy constructor warning *is* under extra_warnings, so you are probably compiling with -W. -W is probably overkill; it will complain about things that are in the same stylistic category. For example, -W will complain about unused parameters, and about code like: struct s { int f, g; }; struct t { struct s h; int i; }; struct t x = { 1, 2, 3 }; even though this has well-defined semantics. Ideally, the various categories of warnings (ordinary warnings, -W warnings, -Wall warnings, etc.) would have some associated clear criteria about what belonged where. Right now, they don't. I think that the way to go is that some interested party (I'm not, particulary :-)) should bring this up by sending mail to `gcc at gcc.gnu.org' and seeing what the response is. -- Mark Mitchell mark at codesourcery.com CodeSourcery, LLC http://www.codesourcery.com From oldham at codesourcery.com Thu Mar 29 18:26:09 2001 From: oldham at codesourcery.com (Jeffrey Oldham) Date: Thu, 29 Mar 2001 10:26:09 -0800 Subject: [pooma-dev] RFA: src/NewField Changes In-Reply-To: <200103291748.JAA29438@oz.codesourcery.com>; from swhaney@earthlink.net on Thu, Mar 29, 2001 at 10:44:10AM -0700 References: <20010329093502.A25226@codesourcery.com> <200103291748.JAA29438@oz.codesourcery.com> Message-ID: <20010329102609.B27701@codesourcery.com> On Thu, Mar 29, 2001 at 10:44:10AM -0700, Scott Haney wrote: > On Thursday, March 29, 2001, at 10:35 AM, Jeffrey Oldham wrote: > > > > > I don't fully understand why the typedef is required. But, if it > > > is > > > required by the standard, could we put it in the function? > > > > > > > The C++ standard \S 23.1 [Container requirements] requires > > x::size_type to be an unsigned integral type. I moved the typedef > > into the destructor. > > > > Hi Jeffrey, > > I realize this. What I didn't understand is what the problems were when > i in that loop was an int. Did GCC emit a warning or an error. Anyway, > this isn't that big of a deal. Please feel free to commit. g++ -Wall emits warnings about comparisons between unsigned and signed values: /nfs/oz/home/oldham/pooma/r2/src/NewField/Updater/UpdaterList.h: In destructor `UpdaterListData::~UpdaterListData()': /nfs/oz/home/oldham/pooma/r2/src/NewField/Updater/UpdaterList.h:92: warning: comparison between signed and unsigned integer expressions The typedef avoided this warning. > What was the resolution on all of those static_casts? The warnings about comparisons between unsigned and signed ints were the reason for those static_cast's. I do not know the best solution. What do you suggest? /nfs/oz/home/oldham/pooma/r2/src/Domain/DomainTraits.Interval.h: In static member function `static void DomainTraits >::setDomain(int (&)[2], const T1&, const T2&) [with T1 = int, T2 = unsigned int]': /nfs/oz/home/oldham/pooma/r2/src/Domain/Interval.h:365: instantiated from here /nfs/oz/home/oldham/pooma/r2/src/Domain/DomainTraits.Interval.h:266: warning: comparison between signed and unsigned integer expressions Thanks, Jeffrey D. Oldham oldham at codesourcery.com From oldham at codesourcery.com Thu Mar 29 19:10:33 2001 From: oldham at codesourcery.com (Jeffrey Oldham) Date: Thu, 29 Mar 2001 11:10:33 -0800 Subject: Patch: Virtual Destructor Message-ID: <20010329111033.A1136@codesourcery.com> This concludes code submissions to permit gcc 3.1 to compile a Pooma "hello, world" program. With "-Wall -Wno-sign-compare", only one warning remains. Thanks to everyone's help. This is the only committed portion of the patch previously labelled "Other Changes (3 of 3)". 2001-03-29 Jeffrey D. Oldham * Observer.h (SingleObserver::~SingleObserver): Make virtual. Reviewed by Scott Haney Tested on sequential Linux using gcc 3.1 Thanks, Jeffrey D. Oldham oldham at codesourcery.com -------------- next part -------------- ? LINUXgcc ? Utilities.patch ? Utilities.ChangeLog ? differences ? Inform.h.patch ? Observer.h.patch ? Inform.h.ChangeLog ? tests/LINUXgcc Index: Observer.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Utilities/Observer.h,v retrieving revision 1.10 diff -c -p -r1.10 Observer.h *** Observer.h 2000/03/07 13:18:25 1.10 --- Observer.h 2001/03/29 19:06:00 *************** public: *** 180,188 **** // Destructors //============================================================ ! // The destructor is not made virtual, since we should not ever need ! // to delete an object via its SingleObserver base class. ! ~SingleObserver() { } //============================================================ --- 180,186 ---- // Destructors //============================================================ ! virtual ~SingleObserver() { } //============================================================ From oldham at codesourcery.com Thu Mar 29 19:11:57 2001 From: oldham at codesourcery.com (Jeffrey Oldham) Date: Thu, 29 Mar 2001 11:11:57 -0800 Subject: [pooma-dev] RFA: src/NewField Changes In-Reply-To: <20010329102609.B27701@codesourcery.com>; from oldham@codesourcery.com on Thu, Mar 29, 2001 at 10:26:09AM -0800 References: <20010329093502.A25226@codesourcery.com> <200103291748.JAA29438@oz.codesourcery.com> <20010329102609.B27701@codesourcery.com> Message-ID: <20010329111157.B1136@codesourcery.com> > > What was the resolution on all of those static_casts? > > The warnings about comparisons between unsigned and signed ints were > the reason for those static_cast's. I do not know the best solution. > What do you suggest? > > /nfs/oz/home/oldham/pooma/r2/src/Domain/DomainTraits.Interval.h: In static > member function `static void DomainTraits >::setDomain(int > (&)[2], const T1&, const T2&) [with T1 = int, T2 = unsigned int]': > /nfs/oz/home/oldham/pooma/r2/src/Domain/Interval.h:365: instantiated from here > /nfs/oz/home/oldham/pooma/r2/src/Domain/DomainTraits.Interval.h:266: warning: comparison > between signed and unsigned integer expressions Mark suggested adding the "-Wno-sign-compare" g++ warning flag to suppress these warnings so the static_cast's are unnecessary. Thanks, Jeffrey D. Oldham oldham at codesourcery.com From cummings at linkline.com Thu Mar 29 19:54:53 2001 From: cummings at linkline.com (Julian C. Cummings) Date: Thu, 29 Mar 2001 11:54:53 -0800 Subject: [pooma-dev] RFA: src/NewField Changes In-Reply-To: <20010329102609.B27701@codesourcery.com> Message-ID: Whew! I just slogged through the recent e-mail flurries! Jeffrey, could you please hold off on changes in the Domain subdirectory such as the one below, regarding comparisons of unlike types? I am in the midst of reworking that section to eliminate the use of enums in favor of static data members. This will resolve this issue completely once my work is complete. I hope to have new Domain sources to run by everyone within the next few days. Thanks! By the way, I figured out why the HP aCC compiler was complaining that "wildcard" was undefined in certain contexts. It has to do with the fact that enums are nested types and thus are not automatically "inherited" when deriving from a templated base class. Yuck! Again, this will all go away with my proposed changes. Just give me a day or two to complete this. Thanks, Julian C. -----Original Message----- From: Jeffrey Oldham [mailto:oldham at codesourcery.com] Sent: Thursday, March 29, 2001 10:26 AM To: Scott Haney Cc: pooma-dev at pooma.codesourcery.com Subject: Re: [pooma-dev] RFA: src/NewField Changes On Thu, Mar 29, 2001 at 10:44:10AM -0700, Scott Haney wrote: > On Thursday, March 29, 2001, at 10:35 AM, Jeffrey Oldham wrote: > > > > > I don't fully understand why the typedef is required. But, if it > > > is > > > required by the standard, could we put it in the function? > > > > > > > The C++ standard \S 23.1 [Container requirements] requires > > x::size_type to be an unsigned integral type. I moved the typedef > > into the destructor. > > > > Hi Jeffrey, > > I realize this. What I didn't understand is what the problems were when > i in that loop was an int. Did GCC emit a warning or an error. Anyway, > this isn't that big of a deal. Please feel free to commit. g++ -Wall emits warnings about comparisons between unsigned and signed values: /nfs/oz/home/oldham/pooma/r2/src/NewField/Updater/UpdaterList.h: In destructor `UpdaterListData::~UpdaterListData()': /nfs/oz/home/oldham/pooma/r2/src/NewField/Updater/UpdaterList.h:92: warning: comparison between signed and unsigned integer expressions The typedef avoided this warning. > What was the resolution on all of those static_casts? The warnings about comparisons between unsigned and signed ints were the reason for those static_cast's. I do not know the best solution. What do you suggest? /nfs/oz/home/oldham/pooma/r2/src/Domain/DomainTraits.Interval.h: In static member function `static void DomainTraits >::setDomain(int (&)[2], const T1&, const T2&) [with T1 = int, T2 = unsigned int]': /nfs/oz/home/oldham/pooma/r2/src/Domain/Interval.h:365: instantiated from here /nfs/oz/home/oldham/pooma/r2/src/Domain/DomainTraits.Interval.h:266: warning: comparison between signed and unsigned integer expressions Thanks, Jeffrey D. Oldham oldham at codesourcery.com From drnuke at lanl.gov Thu Mar 29 20:20:14 2001 From: drnuke at lanl.gov (Steve Nolen) Date: Thu, 29 Mar 2001 13:20:14 -0700 Subject: Particle Attrib Access Message-ID: Why are the particle attributes (DynamicArray's) only accessible through operator() and not operator[], too? SomeParticle.event(i) --- works SomeParticle.event[i] --- doesn't From JimC at proximation.com Thu Mar 29 21:04:27 2001 From: JimC at proximation.com (James Crotinger) Date: Thu, 29 Mar 2001 13:04:27 -0800 Subject: [pooma-dev] Particle Attrib Access Message-ID: Pooma 2 Array's do not use operator[] for element access. This is primarily because it doesn't work in multiple dimensions (to get C-like arrays using a[i][j] you have to have a[i] return a proxy that then causes evaluation to happen when the next subscript is seen - as you know, r1 did this. It was a pain.). We could have special cased 1D, but decided that it was better to be consistent across all dimensionalities. Jim --------------------------------------------------- James A. Crotinger Software Research Scientist Proximation, LLC -----Original Message----- From: Steve Nolen [mailto:drnuke at lanl.gov] Sent: Thursday, March 29, 2001 1:20 PM To: Pooma Subject: [pooma-dev] Particle Attrib Access Why are the particle attributes (DynamicArray's) only accessible through operator() and not operator[], too? SomeParticle.event(i) --- works SomeParticle.event[i] --- doesn't -------------- next part -------------- An HTML attachment was scrubbed... URL: From cummings at linkline.com Thu Mar 29 21:46:57 2001 From: cummings at linkline.com (Julian C. Cummings) Date: Thu, 29 Mar 2001 13:46:57 -0800 Subject: [pooma-dev] RFA: Field-Related Pooma Code Changes In-Reply-To: Message-ID: Hi Scott, Yes, I plan to write something up on that and pass it around for folks to comment on. I will do that by the end of next week, at the latest. -- Julian C. -----Original Message----- From: Scott Haney [mailto:swhaney at earthlink.net] Sent: Wednesday, March 28, 2001 6:30 AM To: pooma-dev at pooma.codesourcery.com Subject: Re: [pooma-dev] RFA: Field-Related Pooma Code Changes The biggest complication to (3) is that particles depend on the old field. Julian, it would be nice if you could take a look at what's involved in transitioning particles and give us all an idea of the scope of this work. Scott From cummings at linkline.com Thu Mar 29 21:46:58 2001 From: cummings at linkline.com (Julian C. Cummings) Date: Thu, 29 Mar 2001 13:46:58 -0800 Subject: [pooma-dev] RFA: Ensure All Preprocessor Symbols Defined: Configuration Files In-Reply-To: <20010328105528.B18276@codesourcery.com> Message-ID: Jeffrey, I'm not sure if anyone ever answered your question below about configuration files for CW Pro and Intel VTune. There is no equivalent of our Unix configure script for these environments, so we had to create configuration files manually. The files get included so that all the proper macros are defined. The downside is that someone needs to go edit one of these configuration files in order to change something, like disabling exceptions, for example. -- Julian C. -----Original Message----- From: Jeffrey Oldham [mailto:oldham at codesourcery.com] Sent: Wednesday, March 28, 2001 10:55 AM To: pooma-dev at pooma.codesourcery.com Subject: [pooma-dev] RFA: Ensure All Preprocessor Symbols Defined: Configuration Files This patch should only be accepted if you approve the previous patch ensuring preprocessor symbols are defined. This patch reflects the preprocessor name change of POOMA_BRAIN_DAMAGED_MICROSOFT_LIB to POOMA_NO_STD_MIN_MAX. Why are these configuration files present in the Pooma source tree? If they should be present, OK to commit patch? If they should not be present, OK to remove the configuration files? 2001-03-28 Jeffrey D. Oldham * src/arch/Intel/PoomaConfiguration.Async.h: s/POOMA_BRAIN_DAMAGED_MICROSOFT_LIB/POOMA_NO_STD_MIN_MAX/g * src/arch/Intel/PoomaConfiguration.h: Likewise. * src/arch/Metrowerks/Pooma.prefix.h: Likewise. Not tested. Approved by ???you??? Thanks, Jeffrey D. Oldham oldham at codesourcery.com From cummings at linkline.com Thu Mar 29 22:04:30 2001 From: cummings at linkline.com (Julian C. Cummings) Date: Thu, 29 Mar 2001 14:04:30 -0800 Subject: problem with VC++ IDE files Message-ID: Hi All, Now that I can access the repository (at last!), I see what Allan's problem is with the VC++ IDE files. Those workspace and project files are both ASCII text files. When I checked out those files from the repository, all of the line breaks disappeared. That is why VC++ will not read them. This is probably one of those Unix/DOS file format conversion problems. Mark, can you fix this? I'm not sure if the problem is with the repository copy of these files or with the way in which they are being checked out of the repository. In the previous repository at LANL, these files had the proper format. I still have a copy of those files if needed. I don't want to check those in and trigger a million e-mail messages though. Thanks, Julian C. From mark at codesourcery.com Thu Mar 29 22:20:23 2001 From: mark at codesourcery.com (Mark Mitchell) Date: Thu, 29 Mar 2001 14:20:23 -0800 Subject: Tomorrow is Friday Message-ID: <20010329142023A.mitchell@codesourcery.com> Please send weekly status reports some time tomorrow. Thank you! -- The pointy-haired boss. From oldham at codesourcery.com Thu Mar 29 22:50:27 2001 From: oldham at codesourcery.com (Jeffrey Oldham) Date: Thu, 29 Mar 2001 14:50:27 -0800 Subject: RFA: Cylindrical Printing, Reordering, Typo Message-ID: <20010329145027.B6884@codesourcery.com> These changes 1) permit printing a Cylindrical/Polar/RhoZ/Rho Mesh. I used the Cartesian print functions as a model. 2) reorder some constructor's initializers. 3) s/too/to/ in a comment. OK to commit? (Would you prefer patches of this size or larger patches with more items? 2001-03-29 Jeffrey D. Oldham * CoordinateSystems/Cylindrical.h (Cylindrical::print): New function to permit printing a Cylindrical Mesh. (operator<<): Likewise. (Polar::print): New function to permit printing a Polar Mesh. (operator<<): Likewise. (RhoZ::print): New function to permit printing a RhoZ Mesh. (operator<<): Likewise. (Rho::print): New function to permit printing a Rho Mesh. (operator<<): Likewise. * Engine/ConstantFunctionEngine.h (Engine::Engine): Reorder initializers per class member order. * Meshes/UniformRectilinearMesh.cpp (UniformRectilinearMeshData::UniformRectilinearMeshData): Likewise. * Pooma/Pooma.cmpl.cpp (initialize): Fix typo in comment. Tested on sequential Linux using gcc 3.1 Reviewed by ???you??? Thanks, Jeffrey D. Oldham oldham at codesourcery.com -------------- next part -------------- Index: CoordinateSystems/Cylindrical.h =================================================================== RCS file: /home/pooma/Repository/r2/src/CoordinateSystems/Cylindrical.h,v retrieving revision 1.13 diff -c -p -r1.13 Cylindrical.h *** CoordinateSystems/Cylindrical.h 2000/07/28 20:54:32 1.13 --- CoordinateSystems/Cylindrical.h 2001/03/29 22:36:25 *************** public: *** 178,183 **** --- 178,192 ---- (pt2(2) - pt1(2))*(pt2(2) - pt1(2))); } + // -------------------------------------------------------------------------- + // Print a Cylindrical on an output stream. + + template + void print(Ostream &ostr) const + { + ostr << "Cylindrical"; + } + private: // since we can't depend on math.h being included, and/or // if included, that it defines M_PI . . . *************** private: *** 186,191 **** --- 195,213 ---- }; //----------------------------------------------------------------------------- + // + // ostream inserter for Cylindrical. + // + //----------------------------------------------------------------------------- + + std::ostream &operator<<(std::ostream &ostr, + const Cylindrical &cs) + { + cs.print(ostr); + return ostr; + } + + //----------------------------------------------------------------------------- // Full Description: // // Polar : A 2D cylindrical subset (rho,phi) *************** public: *** 277,288 **** --- 299,331 ---- sin(pt1(1))*sin(pt2(1)))); } + // -------------------------------------------------------------------------- + // Print a Polar on an output stream. + + template + void print(Ostream &ostr) const + { + ostr << "Polar"; + } + private: // since we can't depend on math.h being included, and/or // having M_PI defined... static const double pi_m = 3.1415926535897932384626433832795029; }; + //----------------------------------------------------------------------------- + // + // ostream inserter for Polar. + // + //----------------------------------------------------------------------------- + + std::ostream &operator<<(std::ostream &ostr, + const Polar &cs) + { + cs.print(ostr); + return ostr; + } //----------------------------------------------------------------------------- // Full Description: *************** public: *** 371,379 **** --- 414,443 ---- (pt2(1) - pt1(1))*(pt2(1) - pt1(1))); } + // -------------------------------------------------------------------------- + // Print a RhoZ on an output stream. + + template + void print(Ostream &ostr) const + { + ostr << "RhoZ"; + } + private: }; + //----------------------------------------------------------------------------- + // + // ostream inserter for RhoZ. + // + //----------------------------------------------------------------------------- + + std::ostream &operator<<(std::ostream &ostr, + const RhoZ &cs) + { + cs.print(ostr); + return ostr; + } //----------------------------------------------------------------------------- // Full Description: *************** public: *** 439,447 **** --- 503,532 ---- return sqrt((pt2(0) - pt1(0))*(pt2(0) - pt1(0))); } + // -------------------------------------------------------------------------- + // Print a Rho on an output stream. + + template + void print(Ostream &ostr) const + { + ostr << "Rho"; + } + private: }; + //----------------------------------------------------------------------------- + // + // ostream inserter for Rho. + // + //----------------------------------------------------------------------------- + + std::ostream &operator<<(std::ostream &ostr, + const Rho &cs) + { + cs.print(ostr); + return ostr; + } //} // namespace pooma_cylindrical_coordinates Index: Engine/ConstantFunctionEngine.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Engine/ConstantFunctionEngine.h,v retrieving revision 1.16 diff -c -p -r1.16 ConstantFunctionEngine.h *** Engine/ConstantFunctionEngine.h 2000/07/20 15:39:26 1.16 --- Engine/ConstantFunctionEngine.h 2001/03/29 22:36:26 *************** public: *** 100,106 **** // Construct from a domain object. Engine(const Domain_t &domain, T val = T()) ! : domain_m(domain), val_m(val) { for (int d = 0; d < Dim; ++d) firsts_m[d] = domain[d].first(); --- 100,106 ---- // Construct from a domain object. Engine(const Domain_t &domain, T val = T()) ! : val_m(val), domain_m(domain) { for (int d = 0; d < Dim; ++d) firsts_m[d] = domain[d].first(); Index: Meshes/UniformRectilinearMesh.cpp =================================================================== RCS file: /home/pooma/Repository/r2/src/Meshes/UniformRectilinearMesh.cpp,v retrieving revision 1.14 diff -c -p -r1.14 UniformRectilinearMesh.cpp *** Meshes/UniformRectilinearMesh.cpp 2000/03/07 13:17:41 1.14 --- Meshes/UniformRectilinearMesh.cpp 2001/03/29 22:36:26 *************** UniformRectilinearMeshData(const Domain_ *** 81,92 **** totalDomain_m(guardLayers().addGuardLayersToDomain(physicalDomain())), totalCellDomain_m( guardLayers().addGuardLayersToDomain(physicalCellDomain())), cellVolumes_m(totalCellDomain()), - vertexDeltas_m(totalCellDomain()), vertexPositions_m(totalDomain()), ! cellSurfaceNormals_m(totalCellDomain()), ! origin_m(origin), ! spacings_m(spacings) { initializeFunctionArrays(); } --- 81,92 ---- totalDomain_m(guardLayers().addGuardLayersToDomain(physicalDomain())), totalCellDomain_m( guardLayers().addGuardLayersToDomain(physicalCellDomain())), + origin_m(origin), + spacings_m(spacings), cellVolumes_m(totalCellDomain()), vertexPositions_m(totalDomain()), ! vertexDeltas_m(totalCellDomain()), ! cellSurfaceNormals_m(totalCellDomain()) { initializeFunctionArrays(); } *************** UniformRectilinearMeshData(const This_t *** 103,115 **** guardLayers_m(model.guardLayers()), totalDomain_m(model.totalDomain()), totalCellDomain_m(model.totalCellDomain()), - cellVolumes_m(model.cellVolumes()), - vertexDeltas_m(model.vertexDeltas()), - vertexPositions_m(model.vertexPositions()), - cellSurfaceNormals_m(model.cellSurfaceNormals()), origin_m(model.origin()), spacings_m(model.spacings()), ! invspacings_m(model.invspacings()) { } //----------------------------------------------------------------------------- --- 103,115 ---- guardLayers_m(model.guardLayers()), totalDomain_m(model.totalDomain()), totalCellDomain_m(model.totalCellDomain()), origin_m(model.origin()), spacings_m(model.spacings()), ! invspacings_m(model.invspacings()), ! cellVolumes_m(model.cellVolumes()), ! vertexPositions_m(model.vertexPositions()), ! vertexDeltas_m(model.vertexDeltas()), ! cellSurfaceNormals_m(model.cellSurfaceNormals()) { } //----------------------------------------------------------------------------- Index: Pooma/Pooma.cmpl.cpp =================================================================== RCS file: /home/pooma/Repository/r2/src/Pooma/Pooma.cmpl.cpp,v retrieving revision 1.36 diff -c -p -r1.36 Pooma.cmpl.cpp *** Pooma/Pooma.cmpl.cpp 2000/06/08 22:16:34 1.36 --- Pooma/Pooma.cmpl.cpp 2001/03/29 22:36:27 *************** bool initialize(Options &opts, bool init *** 365,371 **** #endif ! // Enable logging too a file, if requested. logstream_s = 0; logMessages(opts.logfile().c_str()); --- 365,371 ---- #endif ! // Enable logging to a file, if requested. logstream_s = 0; logMessages(opts.logfile().c_str()); From oldham at codesourcery.com Thu Mar 29 23:18:43 2001 From: oldham at codesourcery.com (Jeffrey Oldham) Date: Thu, 29 Mar 2001 15:18:43 -0800 Subject: [pooma-dev] RFA: Cylindrical Printing, Reordering, Typo In-Reply-To: <20010329145027.B6884@codesourcery.com>; from oldham@codesourcery.com on Thu, Mar 29, 2001 at 02:50:27PM -0800 References: <20010329145027.B6884@codesourcery.com> Message-ID: <20010329151843.A7292@codesourcery.com> I withdraw this patch. Scott Haney said not to change the CoordinateSystems and Meshes directories. Sorry, Jeffrey D. Oldham oldham at codesourcery.com From drnuke at lanl.gov Thu Mar 29 23:38:21 2001 From: drnuke at lanl.gov (Steve Nolen) Date: Thu, 29 Mar 2001 16:38:21 -0700 Subject: how does one do a reduce Message-ID: i want to do a reduction operation over all the contexts looking for a single double. in r1 it was as simple as reduce( TotalVal, LocalVal, OpAddAssign() ); how does this work in r2? what is tulip? -steve From JimC at proximation.com Fri Mar 30 00:06:10 2001 From: JimC at proximation.com (James Crotinger) Date: Thu, 29 Mar 2001 16:06:10 -0800 Subject: [pooma-dev] how does one do a reduce Message-ID: To answer the simple question first, Tulip is the old name for Cheetah, which is the messaging layer that r2 sits on top of. Tulip was supposed to be renamed for the 2.3 release, but apparently that didn't happen. Now, for reductions. The implementation is in Tulip/ReduceOverContexts.h. This is used in DynamicLayout.cmpl.cpp, for example, to globally check the dirty flag, etc. Here is an example: typedef ReduceOverContexts GlobalSum_t; // Do a global reduction on the initialized and dirty flags int globalInitialized; GlobalSum_t(int(initialized())).broadcast(globalInitialized); Where initialized() returns the local value of the initialized field of the layout. We probably could wrap this basic functionality in a template function. Something like #include "Tulip/ReduceOverContexts.h" namespace Pooma { template reduce(T &globalVal, const T &localVal, ReductionOp) { typedef ReduceOverContexts Reducer_t; Reducer_t(localVal).broadcast(globalVal); } } I haven't tested this, and it's been almost a year since I messed with any of this code, but I think something like this would make reductions a bit easier. I'd also like one the just does a global AND or OR of local bools. Jim --------------------------------------------------- James A. Crotinger Software Research Scientist Proximation, LLC -----Original Message----- From: Steve Nolen [mailto:drnuke at lanl.gov] Sent: Thursday, March 29, 2001 4:38 PM To: Pooma Subject: [pooma-dev] how does one do a reduce i want to do a reduction operation over all the contexts looking for a single double. in r1 it was as simple as reduce( TotalVal, LocalVal, OpAddAssign() ); how does this work in r2? what is tulip? -steve -------------- next part -------------- An HTML attachment was scrubbed... URL: From mark at codesourcery.com Fri Mar 30 00:27:30 2001 From: mark at codesourcery.com (Mark Mitchell) Date: Thu, 29 Mar 2001 16:27:30 -0800 Subject: SMARTS Message-ID: <20010329162730N.mitchell@vaio.codesourcery.com> Craig -- We're trying to move the SMARTS repository to pooma.codesourcery.com, to sit next to the POOMA repository. However, I've discovered that there's at least one file in the SMARTS CVS repository that I'm not allowed to access. The file smarts/configure.in is owned by you, and doesn't have the world-readable bit set. Would you mind making that file world-readable? I'm not in the `smarts' group, which is perhaps the real problem. I'm going to send mail to Curt Canada about that as well. Thanks in advance, -- Mark Mitchell mark at codesourcery.com CodeSourcery, LLC http://www.codesourcery.com From wdn at lanl.gov Fri Mar 30 01:21:58 2001 From: wdn at lanl.gov (Dave Nystrom) Date: Thu, 29 Mar 2001 18:21:58 -0700 (MST) Subject: Problem compiling with Pooma 2 and Cheetah Message-ID: <15043.56669.274418.419257@mutley.lanl.gov> Hi Scott, Finally, I am sending you the build log for the compilation problem which we talked about on the phone. It has taken so long because my XEmacs froze up while trying to handle the nearly 1 million lines of error messages. So, I am sending you the build log as a gzipped attachment. Anyway, I am using the head version of Pooma 2 in the LANL repository, a head version of Cheetah from Craig Rasmussen a version of a shared memory library which I got from Craig and mpich-1.2.1. I am doing the compilation using KCC-4.0d with a patched version of kfront on my laptop which is running RedHat 6.2. So, good luck with the deciphering of this set of error messages. -- Dave Nystrom email: wdn at lanl.gov LANL X-3 phone: 505-667-7913 fax: 505-665-3046 -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: build.log.gz URL: From cummings at linkline.com Fri Mar 30 02:52:05 2001 From: cummings at linkline.com (Julian C. Cummings) Date: Thu, 29 Mar 2001 18:52:05 -0800 Subject: what does this mean? Message-ID: Hi All, Does anyone understand this error message from the HP aCC compiler? It is complaining about the templated constructors for the specialization Interval<1>. I can't see what it thinks is wrong with this piece of code. I'm wondering if this is a parsing error of some sort. If no one can make heads or tails of this, I will pass it on to the HP folks. Thanks, Julian C. Error 178: "/home/cummings/POOMA/pooma-2.3.0/src/Domain/Interval.h", line 351 # Nonstatic member "int DomainBase > >::domain_m[2]" is referenced in a nested class, local class or static member initializer. DomainTraits >::setDomain(domain_m, m, n); ^^^^^^^^ From mark at codesourcery.com Fri Mar 30 08:53:47 2001 From: mark at codesourcery.com (Mark Mitchell) Date: Fri, 30 Mar 2001 00:53:47 -0800 Subject: [pooma-dev] what does this mean? In-Reply-To: References: Message-ID: <20010330005347H.mitchell@codesourcery.com> >>>>> "Julian" == Julian C Cummings writes: Julian> Hi All, Julian> Does anyone understand this error message from the HP aCC Julian> compiler? The code looks OK to me. I'm not sure what the error message means either. Sorry, -- Mark Mitchell mark at codesourcery.com CodeSourcery, LLC http://www.codesourcery.com From allan at stokes.ca Fri Mar 30 11:00:52 2001 From: allan at stokes.ca (Allan Stokes) Date: Fri, 30 Mar 2001 03:00:52 -0800 Subject: performance concern with Mappers Message-ID: Hello all, I've been working my way through the Pooma code from the bottom up, starting with Domain (which I don't pretend to fully understand yet) and progressing recently through Layout and Partition. Tonight I noted a potential performance issue within the Mapper implementation. But first, I want to start with an architectural observation about contexts. As far as I can see within my narrow horizons, contexts are just integer values obtained via Pooma::context() which can be assigned into Nodes to determine how [some sub-Domain operation I haven't discovered yet] is eventually scheduled. What I found interesting is that there does not appear to be any kind of Context data structure which can be informed about what work units (nodes) have been assigned into each context. Without having this structure as a reference point, it's not clear to me how the system can collect information about the effectiveness of the different mapping heuristics. A second consequence of not having a Context data structure is that each mapping becomes an independent event. If a context is already under a larger than average work assignment there is no way to discover or avert this as additional slabs of data are sliced and diced. My observation about the Mapper implementation is that a built-in bias exists which causes low numbered contexts to receive more than their fair share of node assignments. I haven't read all this code yet. The two modules I've looked at tonight are UniformMapper.cmpl.cpp and DistributedMapper.h UniformMapper.cmpl.cpp(57) if (c < remainder) templist[index++]->context() = c; The effect of this line is to assign the extra "remainder" contexts to the low numbered contexts 0..remainder-1. DistributedMapper.h(65) // if there are more contexts than patches, assign one // patch per context for as many patches as there are ... // we should probably alert the user here! npc = 1; ncontexts = templist.size(); npc is the number of patches assigned per context. We see the same effect again that the uneven assignments are onto contexts 0..templist.size()-1. I suspect that higher dimensionality objects might compound this issue. Suppose we have a three dimensional array of size (101,101,101) and we partition each dimension into ten segments. If this works the way I think it does, this process would create 1000 nodes (guard cells ignored). Most of the nodes would be 10x10x10 in size. But there would also be one node 11x11x11 in size. This is a fairly substantial 30% extra work if the largest node were rate limiting. If the partitioning logic has the same bias (putting the larger nodes first in the mapper lists) these two effects could be compounding negatively. My suggestion is that we use stochastic mapping for determining which contexts take on the "round-off" nodes. This is a fairly standard procedure in Internet proxy caches (where load balancing _really_ matters ;-) and there are many good algorithms for doing this. If we are in a situation where more than one context must determine the same mappings in parallel we would need to take special care to ensure that the PRNG behaves consistently in each independent context. The bullet-proof approach is to embed a PRNG object inside the ContextMapper base class so that each Mapper only depends on receiving the same map requests in the same order. If there is a higher level of parallel determinism, a global PRNG would suffice. One of the properties in the algorithms I've inspected is that the Node list is partitioned among the available contexts in contiguous segments. (Does this matter?) To retain this property we need an algorithm which is sequential by context. Let M = floor(nodes/contexts) and R = nodes%contexts. Each context will be assigned either M or M+1 consecutive nodes from the node list. In the present implementation of UniformMapper, contexts 0..R-1 are assigned M+1 nodes and the rest of the contexts are assigned M nodes. The simple stochastic algorithm uses a helper structure P, which is a (deterministically) random permutation of a bit vector (values 0 and 1) of length equal to the number of contexts which sums to R. Context c is assigned M nodes if P[c] == 1; M+1 nodes if P[c] == 1. There are a variety of efficient methods to generate P. My second suggestion is that context-to-node bindings be made through some kind of function call which could, at some point in the future, also notify a global Context data structure about Node assignments accrued. In the meantime, one could at least toss a trace statement at such a control point to determine, for example, whether the Mapper issues I've identified are a practical concern. Allan From jcrotinger at mac.com Fri Mar 30 17:24:48 2001 From: jcrotinger at mac.com (James Crotinger) Date: Fri, 30 Mar 2001 10:24:48 -0700 Subject: [pooma-dev] performance concern with Mappers In-Reply-To: Message-ID: on 3/30/01 4:00 AM, Allan Stokes at allan at stokes.ca wrote: > What I found interesting is that there does not appear to be any kind of > Context data structure which can be informed about what work units (nodes) > have been assigned into each context. Without having this structure as a > reference point, it's not clear to me how the system can collect information > about the effectiveness of the different mapping heuristics. I'm not sure what you mean by "node" here. Do you mean "patch"? Or are you wanting to have run-time monitoring of the actual amount of work done. My own view of Pooma's mappers and partitioners is that the ones provided are relatively simple examples. None of our stuff knows about NUMA topology or about the topology of the equations being solved. My hope is that users can write these to support their hardware and application. I think there is a question as to whether or not we provide enough services for users to do this effectively. I don't know. Until someone proposes and tries to write something more complicated, it is a bit difficult to predict what will be needed. > A second consequence of not having a Context data structure is that each > mapping becomes an independent event. If a context is already under a > larger than average work assignment there is no way to discover or avert > this as additional slabs of data are sliced and diced. > > My observation about the Mapper implementation is that a built-in bias > exists which causes low numbered contexts to receive more than their fair > share of node assignments. For the simple examples that we've looked at, one tends to want all of the arrays to have the same partitioning and mapping. If this is the case, then there is no particular benefit to assigning the remainder patches to random contexts. If, however, one had two relatively independent calculations going on then there would be some advantage to having their remainder patches go to different contexts. Again, I only think of our mappers as simple examples so I guess I'm not too worried about this. I think that what we should do here is develop custom mappers and partitioners for these kernel programs. That'll give us a chance to see whether they make much difference and to see what functionality the underlying Pooma framework should be providing to support such mappers. > I suspect that higher dimensionality objects might compound this issue. > Suppose we have a three dimensional array of size (101,101,101) and we > partition each dimension into ten segments. If this works the way I think > it does, this process would create 1000 nodes (guard cells ignored). Most > of the nodes would be 10x10x10 in size. But there would also be one node > 11x11x11 in size. This is a fairly substantial 30% extra work if the > largest node were rate limiting. If the partitioning logic has the same > bias (putting the larger nodes first in the mapper lists) these two effects > could be compounding negatively. My only comment is that these are pretty small patches. If instead you're looking at (1001,1001,1001) then the extra work for the last patch is pretty small. I do see your point about the two effects compounding. That should be fixed in the simple partitioner/mappers. > One of the properties in the algorithms I've inspected is that the Node list > is partitioned among the available contexts in contiguous segments. (Does > this matter?) I think it does matter - if I remember correctly it simplifies the patch lookup. > My second suggestion is that context-to-node bindings be made through some > kind of function call which could, at some point in the future, also notify > a global Context data structure about Node assignments accrued. In the > meantime, one could at least toss a trace statement at such a control point > to determine, for example, whether the Mapper issues I've identified are a > practical concern. Are you simply proposing that instead of templist[i]->context() = c; we do something like Pooma::setcontext(templist[i]->context(),c) or do we need to pass more info than this to setcontext? I would think that analysis might also need to know the domain size, affinity, etc. Jim From cummings at cacr.caltech.edu Sat Mar 31 02:20:16 2001 From: cummings at cacr.caltech.edu (Julian Cummings) Date: Fri, 30 Mar 2001 18:20:16 -0800 Subject: goofy Domain constructors Message-ID: <3AC53EDF.B0D3979C@cacr.caltech.edu> I have finished sweeping through all the Domain classes and changing enums there to static data members of the proper type (either bool or int). Things still do not quite compile under the HP aCC compiler because of a few errors that may be compiler bugs of some sort. I have reported these to HP for analysis. Nevertheless, the code looks a fair bit cleaner as a result. Also, the HP compiler pointed out tons of places where we are using members from a templated base class. These members are not visible under the C++ lookup rules, so you have to qualify these with the "this" pointer (or with the base class name for static members). I don't know if gcc warns about this, but I went ahead and made these changes. The HP compiler also caught some typos and bugs in some templated code in other subdirectories. I will commit fixes separately. I ran the code through the gcc compiler on our HP machine to check that it was happy with my changes, and it was for the most part. One thing I noticed under gcc though is that we still get some of these warnings about comparing unlike types. My changes to Domain eliminated the need for all these static casts of enum types to ints. These remaining warnings are coming from some bizarre constructor definitions for Interval<1>, Range<1>, etc. These specializations all have a general templated constructor that takes a single T argument. This argument is assumed to be a Domain of some sort, and we attempt to construct this Domain object from that one. Then the code says we need to specialize the constructor for all (integral) scalar types. So we have constructors from signed and unsigned char, short, int and long. In all cases, we set up the Domain to range from 0 to a-1, where a is the scalar argument. There are several problems here. One is that it is dangerous to subtract 1 from an unsigned value. We should probably insert a check if a=0 and do the right thing. Also, the unlike type comparisons warnings are generated because "0" is assumed to be of type int in all cases. We could address this by casting the argument "a" to an int before using it (or in the case where a is a long, change "0" to "0L"). Finally, I find the constructor taking a char argument to be rather bizarre. Is there any use in allowing that argument type here? Jeffrey, have you already dealt with the warnings that arise from these Domain constructors? If so, how did you handle it? I wasn't sure what to do here. In any event, I am attaching a gzipped tar file of my modified version of the Domain sources, in case anyone wants to check them out or test them. Move the .h and .cpp files in src/Domain elsewhere, and then expand this tarfile into that directory. I don't have cvs diffs because a) the changes are extensive, and b) I don't have repository access set up from the machines at Caltech yet. BTW, Allan has pointed out that similar changes ought to be made in the Partition/Layout areas and other places where clumsy enum usage is rampant. Regards, Julian C. -- Dr. Julian C. Cummings E-mail: cummings at cacr.caltech.edu California Institute of Technology Phone: 626-395-2543 1200 E. California Blvd., Mail Code 158-79 Fax: 626-584-5917 Pasadena, CA 91125 -------------- next part -------------- A non-text attachment was scrubbed... Name: Dom_sources.tar.gz Type: application/x-gzip Size: 84462 bytes Desc: not available URL:

Input Output