[Users] [Einstein Toolkit] #319: more OpenMP WORKSHARE sections in GRHydro Reconstruct
Erik Schnetter
schnetter at cct.lsu.edu
Wed Mar 2 08:47:29 CST 2011
Roland
I did not know about this OpenMP restriction. In this case, it is best
to stick with the standard. Your patch looks fine.
-erik
On Wed, Mar 2, 2011 at 9:45 AM, Roland Haas
<roland.haas at physics.gatech.edu> wrote:
> 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.
>
>
> _______________________________________________
> Users mailing list
> Users at einsteintoolkit.org
> http://lists.einsteintoolkit.org/mailman/listinfo/users
>
>
--
Erik Schnetter <schnetter at cct.lsu.edu> http://www.cct.lsu.edu/~eschnett/
More information about the Users
mailing list