Skip to content

Conversation

jakubjelinek
Copy link
Contributor

Make the testcases also OpenMP 4.5 compliant by adding map(tofrom: sum),
otherwise sum is firstprivate on target.

Make the testcases also OpenMP 4.5 compliant by adding map(tofrom: sum),
otherwise sum is firstprivate on target.
@milfeld
Copy link
Contributor

milfeld commented Jan 18, 2016

Hi Jakub,
This looks fine. Is there a TRAC ticket for this? If not, I'll create one and have somebody review it. Is there anything special that should be mentioned in the text? Hmm, interesting. In a combined construct, target teams distribute parallel loop, there is only one reduction needed-- that seems obvious, but do we need to mention that in the spec?
Kent

@jakubjelinek
Copy link
Contributor Author

There is no trac ticket for this, the changes came from a developer reporting issues in the testcases.
In a combined/composite construct that has teams and parallel combined, reduction on such combined constructs applies to both (first combine from each thread, then combine from each team).
But for separate constructs, if you just reduce from each thread, but not from the teams, you have data race (the var is then shared between the teams and each team writes it).

@milfeld
Copy link
Contributor

milfeld commented Nov 9, 2016

Hi Jakub,
Thanks for you input on this. We took care of this on the examples-internal repo, so I'm closing it on this repo (examples). Thanks again.
Kent

@milfeld milfeld closed this Nov 9, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants