Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider Setting Default OpenMP schedule(static) for Execution Policies #1747

Closed
rchen20 opened this issue Sep 30, 2024 · 3 comments
Closed
Assignees
Labels
API/usability openmp support reviewed Mark with this label when issue has been discussed by team

Comments

@rchen20
Copy link
Member

rchen20 commented Sep 30, 2024

Is your feature request related to a problem? Please describe.

On TOSS4 Intel systems, OpenMP sum reductions in the Launch tests fail with inaccurate answers:

325 - test-launch-basic-param-expt-ReduceSum-OpenMP.exe (Failed)
326 - test-launch-basic-param-expt-ReduceMin-OpenMP.exe (Failed)

Changing the OpenMP schedule to static or dynamic resolves the problem. For example, changing this line

to:

#pragma omp for schedule(static)

gives the correct answers in the tests. Note that setting the schedule to guided, runtime, or auto begets failures.

Describe the solution you'd like

Currently, the omp_for_exec policy either doesn't specify a schedule, or uses the auto schedule (in the forall case). We should consider setting this policy to automatically use schedule(static).

Additional context

We are also in contact with Greg Lee from LC about the failing tests. He has submitted issue 06375267 to Intel.

@rchen20
Copy link
Member Author

rchen20 commented Oct 8, 2024

Greg Lee suggested compiling with -fp-model-precise which also solves the problem.

@rchen20 rchen20 closed this as completed Oct 8, 2024
@rchen20 rchen20 reopened this Oct 8, 2024
@rhornung67
Copy link
Member

I don't think we should change our internal implementation to something that conflicts with the OpenMP standard. Rather, I think it is best to make the need to be explicit about this clear in our User Docs about execution policies. I will take a swing at this and put up a PR.

@rhornung67 rhornung67 self-assigned this Oct 8, 2024
@rhornung67 rhornung67 added API/usability openmp support reviewed Mark with this label when issue has been discussed by team labels Oct 15, 2024
@rchen20
Copy link
Member Author

rchen20 commented Oct 29, 2024

This is being handled here #1755.

@rchen20 rchen20 closed this as completed Oct 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API/usability openmp support reviewed Mark with this label when issue has been discussed by team
Projects
None yet
Development

No branches or pull requests

2 participants