[Users] OpenMP is making it slower?

Frank Loeffler knarf at cct.lsu.edu
Tue May 17 23:05:13 CDT 2011


On Tue, May 17, 2011 at 03:02:00PM -0700, Scott Hawley wrote:
> Do these all be need to be declared as private?  

If the temporary variables are declared only inside the loop they are
automatically thread-local. Oh wait, that is Fortran. Well - in that
case you should either declare all private, or (maybe easier) put the
include files into separate functions, declare the temporary variables
only there and call the functions from within the loop, in which case
they also don't have to be specified for openmp (as long as they are not

> i certainly don't want the various processors overwriting each others'
> work, which might be what they're doing. -- maybe they're even
> generating NaNs which would slow things down a bit!

You should see that in the results though. It might make sense to first
make sure that the results with different numbers of threads are the
same (depending on the problem you might actually get bit-by-bit
identical results), and work on optimization later. I agree that your
slow-down actually points towards some bug.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
Url : http://lists.einsteintoolkit.org/pipermail/users/attachments/20110517/571b4ec7/attachment.bin 

More information about the Users mailing list