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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,3f60acc31578c72b X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!130.59.10.21.MISMATCH!kanaga.switch.ch!news-zh.switch.ch!switch.ch!news.hispeed.ch!linux2.krischik.com!news From: Martin Krischik Newsgroups: comp.lang.ada Subject: Re: question about tasks, multithreading and multi-cpu machines Date: Tue, 14 Mar 2006 19:49:50 +0100 Organization: Cablecom Newsserver Message-ID: <1451046.YBljpzBlfF@linux1.krischik.com> References: NNTP-Posting-Host: 84-74-134-212.dclient.hispeed.ch Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Trace: news.hispeed.ch 1142364604 19208 84.74.134.212 (14 Mar 2006 19:30:04 GMT) X-Complaints-To: news@hispeed.ch NNTP-Posting-Date: Tue, 14 Mar 2006 19:30:04 +0000 (UTC) User-Agent: KNode/0.10.1 Xref: g2news1.google.com comp.lang.ada:3359 Date: 2006-03-14T19:49:50+01:00 List-Id: Norbert Caspari wrote: > If I run such a program on a multi-cpu machine, the process itself will > use only one cpu, even though I create several "tasks". That's not a (missing) language feature it's a GNAT bug. Or prephaps not a bug as such. See down below. > I tested this with gnat v3.15p under HPUX 11 on a multi-cpu server. When the GNAT compiler is compiled a specific thread can be activated. The default for GNAT is "--enable-thread=gnat". This tread model has the advantage that it is compatible with all gcc target operating systems. But it won't have all the features available. If you where a paying AdaCore customer you could just file an error report at AdaCore and you would probably get a new compiler with a better thread model activated pretty soon. But since you use 3.15p I guess you are not a paying customer and here come the bitter news: You have to to it yourself. That is: you need to get the gcc sources (i.e from http://gnuada.sf.net) and compile your own compiler. For unix systems I would suggest "--enable-theads=posix". If you are successful: how about uploading the finshed compiler to The GNU Ada Project? Martin -- mailto://krischik@users.sourceforge.net Ada programming at: http://ada.krischik.com