[Omp] shared variable

Gerhard Theurich theurich at nccs.gsfc.nasa.gov
Fri Oct 31 08:10:44 PST 2003


Baris,

What do you mean by "it got copied to all processors"? Do you mean that
the memory footprint of the process you started grows according to the
number of threads you are spawning in a parallel region? Could you give
a code snippet to clarify?

Gerhard


Baris M Kazar wrote:
> 
> hi,- i have a question about static allocation of shared variable.  i saw
> that when i declared a shared variable, then it got copied to all
> processors. am i supposed to use a directive or something else to avoid
> this? i need this because let's say when my memory footprint is 1GB on one
> processor, i donot want to have a memory footprint of 1GB * n (where n is
> the number of processors) for shared variables. this prevents me to go up
> for larger problems. i checked web and openmp.org and could not fins
> anything.
> 
> is there a way to ask this question to the ARB members directly first not
> to bog everybody in the list? i searched the web and openmp.org web site
> regarding this question but could not find anything.
> 
> thanks in advance,
> best regards,
> baris
>




More information about the Omp mailing list