[Users] [Einstein Toolkit] #319: more OpenMP WORKSHARE sections in GRHydro Reconstruct

Roland Haas roland.haas at physics.gatech.edu
Wed Mar 2 08:45:14 CST 2011


Hello Erik, all,

>  For best OpenMP performance, there should probably be as few parallel
>  regions as possible. In general, a single parallel region per routine
>  would be best (unless the routine has a complex structure).
I agree and both gcc and icc accept if statements inside the workshare 
(at least it compiles). However:

>  I think that if statements inside a workshare construct are fine (I'm not
>  completely sure about this). In this case, code such as
The OpenMP specifications (section 2.5.4 of 
http://www.openmp.org/mp-documents/spec30.pdf or here 
https://computing.llnl.gov/tutorials/openMP/#WORKSHARE) list only array 
or scalar assignments and WHERE constructs within WORKSHARE sections, so 
I was not sure and chose the err on the side of caution (and overly long 
code admittedly). Should have put this into the original description 
(was in then I deleted it again :-) ).

>  Some of your patch reads as if the current code had workshare constructs
>  outside of a parallel region. This would be senseless and looks like a bug
>  to me.
Yes, some of the current code has OMP WOKSHARE outside of PARALLEL 
sections which seems to be harmless (at least the code ran for me and 
did not produce nonsense).

>  could be simplified to have only a single, enclosing workshare construct.
I can try and see if it works and if it does amend my patch with a 
single OMP WORKSHARE section around all of the initialization statements 
as well as a comment that we might be using undefined behaviour here.

Yours,
Roland

-- 
My email is as private as my paper mail. I therefore support encrypting
and signing email messages. Get my PGP key from http://keys.gnupg.net.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: OpenPGP digital signature
Url : http://lists.einsteintoolkit.org/pipermail/users/attachments/20110302/3446b338/attachment.bin 


More information about the Users mailing list