Path: utzoo!mnetor!uunet!lll-winken!lll-lcc!lll-crg.llnl.gov!brooks From: brooks@lll-crg.llnl.gov (Eugene D. Brooks III) Newsgroups: comp.arch Subject: Re: Single tasking the wave of the future? Message-ID: <1406@lll-lcc.aRpA> Date: 29 Dec 87 20:06:37 GMT References: <18@amelia.nas.nasa.gov> <2341@encore.UUCP> <25@amelia.nas.nasa.gov> <1030@alliant.Alliant.COM> <3771@ames.arpa> Sender: usenet@lll-lcc.aRpA Reply-To: brooks@lll-crg.llnl.gov.UUCP (Eugene D. Brooks III) Organization: Lawrence Livermore National Laboratory Lines: 25 Keywords: parallel processing today In article <3771@ames.arpa> eugene@pioneer.UUCP (Eugene Miya N.) writes: >In article <1030@alliant.Alliant.COM> muller@alliant.UUCP (Jim Muller) writes: >>> >Debugging is a whole other soapbox, but my experience is that debugging >> Race conditions are typically a problem only when a compiler has been >> inappropriately "permitted" to optimize code that it normally would have >> refused. The obvious approach, of course, should be to debug in single- >> processor mode. Although the above comments are a little off the wall, the debugging of a parallel program is best done in two steps. First you run it in serial mode (parallel code but with one processor) and find and kill all of the bugs that show up. If your program dumps core here the use of a good serial debugger will be of great help. After doing this you run the code with more than one processor. Bad things that are hard to pin down can still happen, (gee Eugene, this program ran fine through 13 cycles and then dumped core out of the blue!) but at least you won't have the serial program bugs biting you when you are running the code in parallel. Of course there are some implicit assumptions: 1) The parallel programming model you use uses the same code regardless of the number of processors (the number of processors is a runtime parameter that may not even be known to the user of the code) 2) The code produces the same results (perhaps to machine roundoff accuracy to satisfy those who have real numerical parallel code experience) regardless of the number of processors you run it with.