[Omp] Overhead of #pragma omp for static nowait

Greg Bronevetsky greg at bronevetsky.com
Mon Dec 11 11:30:29 PST 2006


Yes, this is exactly what I'm talking about. I'm confused about why the
OpenMP compiler cannot do this automatically. While the compiler wouldn't
be able to figure out how to force the two loops in your example to use
the same iteration space, it should be able to use your calculation for
each loop independently. I just want to allow users to use the standard
omp for pragmas without chopping up their iteration space by hand.

                             Greg Bronevetsky

On Mon, 11 Dec 2006, Dieter an Mey wrote:

> As a bypass you can calculate the individual loop boundaries yourself 
> and keep them in a threadprivate variable.
> It is ugly, but it works.
> 
> http://www.caspur.it/ewomp02/PAPERI/EWOMP02-08.pdf
> 
> regards
> Dieter
> 
> Greg Bronevetsky schrieb:
> > I have recently executed the EPCC microbenchmarks on several machines and
> > noticed that there is a consistent overhead of ~1us (~several thousand
> > cycles) for #pragma omp for static nowait and its variants on the
> > platforms I've tried. Given the simplicity of this scheduling policy, it
> > seems to me that it should be possible to convert the parallel loop into a
> > set of serial loops at compile-time. This would result in a loop that
> > requires no inter-thread communication and costs only a few tens of
> > cycles. 
> > 
> > What is the reason for this much-higher than expected overhead? Is it just
> > that the above compiler analysis is not typically performed or is there a
> > more fundamental reason. Here at LLNL, we have applications that would
> > like to use OpenMP to parallelize loops with ~50 iterations and ~.25us of
> > work per iteration. ~1us overheads for the #pragma omp for static nowait
> > make OpenMP too expensive for this task.
> > 
> >                              Greg Bronevetsky
> > 
> > _______________________________________________
> > Omp mailing list
> > Omp at openmp.org
> > http://openmp.org/mailman/listinfo/omp
> > 
> 
> -- 
> --------------------------------------------------------------------
> Dieter an Mey
> High Performance Computing               Hochleistungsrechnen
> RWTH Aachen University                   Rechen- und Kommunikations-
> Center for Computing and Communication   zentrum der RWTH Aachen
> phone: ++49-(0)241-80-24377              Seffenter Weg 23
> fax:   ++49-(0)241-80-22134              52074 Aachen, Germany
> email: anmey at rz.rwth-aachen.de
> --------------------------------------------------------------------
> 
> 



More information about the Omp mailing list