From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,7767a311e01e1cd X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!postnews.google.com!b28g2000cwb.googlegroups.com!not-for-mail From: "tkrauss" Newsgroups: comp.lang.ada Subject: Re: GNAT compiler switches and optimization Date: 22 Oct 2006 04:48:36 -0700 Organization: http://groups.google.com Message-ID: <1161517716.455743.223200@b28g2000cwb.googlegroups.com> References: <1161341264.471057.252750@h48g2000cwc.googlegroups.com> <9Qb_g.111857$aJ.65708@attbi_s21> <434o04-7g7.ln1@newserver.thecreems.com> <4539ce34$1_2@news.bluewin.ch> <453A532F.2070709@obry.net> <9kfq04-sgm.ln1@newserver.thecreems.com> NNTP-Posting-Host: 67.20.166.17 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: posting.google.com 1161517721 21192 127.0.0.1 (22 Oct 2006 11:48:41 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Sun, 22 Oct 2006 11:48:41 +0000 (UTC) User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.7) Gecko/20060909 Firefox/1.5.0.7,gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: b28g2000cwb.googlegroups.com; posting-host=67.20.166.17; posting-account=TFv1SA0AAADWffSu18YEEoqKIWj-qrLs Xref: g2news2.google.com comp.lang.ada:7129 Date: 2006-10-22T04:48:36-07:00 List-Id: > If I inline the inner Multiply, or put equivalent code in the task and > the outer Mutliply, the time is much more than for the sequential > version, presumably due to cache effects. > > Since it appears you have 2 physical processors ("Dual Xeon 2.8 Ghz"), I > would be interested in seeing what effect this concurrent version has on > that platform. I also wonder how easy such a version would be to create > in FORTRAN. It's funny that you mention tasking since that's what got me started on this in the first place. I was introduced to OpenMP as a simple method of parallelizing code in fortran. Unfortunately it seems to be "tricky" to really get things in parallel (what data is shared, multiple tasks doing the same thing with the same memory, access violations, etc.) I remembered that Ada had tasking built in so I started playing with that. Now, as you can probably tell from my code, I haven't touched Ada in a _very_ long time, but it was surprisingly easy set up a simple two-task test program. Anyway, using the latest code from Jeffrey Creem it looks like the execution time (on my machine) has been cut in half (9 seconds) . The threaded version runs in nearly the same time for smaller problems but dies with a stack overflow for larger. I see a comment in the Bugzilla recommending a similar construct type Real_Matrix is array (1 .. N, 1 .. N) of Float; That takes the memory from the stack rather than the heap though, no? I assume there is a compiler switch to increase the stack size so the code wouldn't die, but is that the "normal" way of allocating memory? I'm trying to not look like _too_ much of an Ada neophyte :)