comp.lang.ada
 help / color / mirror / Atom feed
From: "Dale Pennington" <Dale.K.Pennington@boeing.com>
Subject: Re: Parallel execution on SGI with GNAT
Date: Tue, 30 Oct 2001 14:11:57 GMT
Date: 2001-10-30T14:11:57+00:00	[thread overview]
Message-ID: <GM0vFy.IyC@news.boeing.com> (raw)
In-Reply-To: 3BDDD7EC.EC896675@dfrc.nasa.gov

You probably want to add a call the pthread_setconcurrancy into your
program. GNAT runs on top of pthreads in IRIX 6.5, and SGIs pthreads
implementation does not do a good job of setting the number of kernel
vehicles for user level programs.


"Jay Fantini" <jay.fantini@dfrc.nasa.gov> wrote in message
news:3BDDD7EC.EC896675@dfrc.nasa.gov...
>


----------------------------------------------------------------------------
----


> Ada experts,
>
> Maybe you can help me: I am trying to get the following program to execute
> on a 6-CPU SGI ONYX-2 R12000 based system. The system is running IRIX 6.5
> and I am using GNAT Ada-95 version 3.11p for SGI. The program does compile
> and run but it only uses 1 CPU and I would like for it to execute on 3
CPUs.
> This program is a prototype for a much larger program.
>
> Do I need to set an environment variable or am I using the wrong Ada-95
> construct? Is there a PRAGMA I should use? Please post all answers to this
NG.
>
> TIA,
>
> -Jay
>
> -- ******************************************************************
>
> with text_io;
> with integer_text_io;
> with tems_floating_point_std;
> with floating_point_math_lib;
> with fp_display;
> with higher_functions;
>         with wexzal;
>
> use  tems_floating_point_std;
> use  floating_point_math_lib;
> use  higher_functions;
>         use  wexzal;
>
> procedure hog is
>
>         task type wzlsum(upper_limit: integer);
>         task body wzlsum is
>         x   :floating_point;
>         s   :floating_point;
>         begin
>         for i in 1..upper_limit loop
>           x:=floating_point(i);
>           s:=s+1.0/(x*wzl(x));
>           end loop;
>         text_io.put("Sum for n=");
>         integer_text_io.put(upper_limit);
>         text_io.put(" is S=");
>         fp_display.prt(s);
>         text_io.new_line;
>         end wzlsum;
>
>         cpu_hog_5    :wzlsum(5000000);  -- Do big calculation in parallel
>         cpu_hog_4    :wzlsum(4000000);
>         cpu_hog_3    :wzlsum(3000000);
>
> begin
>         text_io.put_line("Program HOG is done!");
> end hog;
>





      parent reply	other threads:[~2001-10-30 14:11 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-10-29 22:27 Parallel execution on SGI with GNAT Jay Fantini
2001-10-29 22:59 ` Marin David Condic
2001-10-30  5:08   ` brentcarnellis
2001-10-31  8:56     ` Peter Hermann
2001-10-30 11:30 ` Tarjei T. Jensen
2001-10-30 12:31 ` David C. Hoos
2001-10-30 14:11 ` Dale Pennington [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox