gomp-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gomp-discuss] Start of an OpenMP Implementation Spec


From: Ross Towle
Subject: Re: [Gomp-discuss] Start of an OpenMP Implementation Spec
Date: Sat, 25 Sep 2004 20:06:03 -0700

On Sun, 12 Sep 2004 20:52:01 +0000, Jacob Weismann Poulsen <address@hidden> 
wrote:
>
> 1) Just to confirm my understanding: You say that the _OMP_MasterFunction
> is supposed to create or wake up existing slave threads. If I
> understand this correct you plan to maintain a pool of threads who
> may either spin or do some real work as requested by a par_region.
> The size of this list may grow and shrink during execution and
> the _OMP_MasterFunction will when called have to ensure that the list
> have the desired size (by lookup in some data structure that we maintain
> within the library) embarking on the real stuff. Once they finish
> doing the real stuff the _OMP_MasterFunction will tell all non-master
> threads to spin again.
> An _OMP_init() will (among other things) setup this list/pool whose
> size is determined by environment variables or by counting processors
> on the system. An _OMP_resize() will allow the _OMP_MasterFunction to
> resize this pool.
> 

Yes.  However, I would recommend that the threads sleep instead of spinning
while waiting to do real stuff.  The amount of threads is controlled by 
OMP_NUM_THREADS, set_num_threads, and system defaults.  Note that
OMP_NUM_THREADS is just a suggestion to the runtime system.  The run 
time support does not have to supply that number of threads.  For example,
the number of threads might be limited by the number of processors so if
OMP_NUM_THREADS is set to a higher value then the OMP runtime system 
does not use more than #processor number of threads.  The choice could even
be less.  The OMP specification allows for this.

Cheers - Ross




reply via email to

[Prev in Thread] Current Thread [Next in Thread]