Skip to content

[Flang][OpenMP] Important issues to be fixed prior to removing experimental status of OpenMP #110008

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

Open
62 of 75 tasks
kiranchandramohan opened this issue Sep 25, 2024 · 11 comments
Open
62 of 75 tasks
Assignees
Labels
flang:openmp metabug Issue to collect references to a group of similar or related issues.

Comments

@kiranchandramohan
Copy link
Contributor

kiranchandramohan commented Sep 25, 2024

TODOs for unsupported OpenMP 5.2 features

TODOs for unsupported OpenMP 4.5 features

TODOs for unsupported OpenMP 4.0 features

Must fix issues from the tracker

A subset of issues from https://github.com/llvm/llvm-project/issues?q=is%3Aopen+is%3Aissue+label%3Aflang%3Aopenmp

Must fix issues not in tracker

Minor bugs:

@kiranchandramohan kiranchandramohan self-assigned this Sep 25, 2024
@github-actions github-actions bot added the flang Flang issues not falling into any other category label Sep 25, 2024
@kiranchandramohan kiranchandramohan added flang:openmp metabug Issue to collect references to a group of similar or related issues. and removed flang Flang issues not falling into any other category labels Sep 25, 2024
@anchuraj
Copy link
Contributor

inscan modifier support is WIP

@kiranchandramohan
Copy link
Contributor Author

inscan modifier support is WIP

Feel free to update the tasklist if you or someone you know is working on it. The immediate requirement is to only add a TODO message after parsing and semantics.

@h-vetinari
Copy link
Contributor

TODOs for unsupported OpenMP 5.2 features

I find it strange that a standard version released after flang got merged into LLVM is somehow a deciding factor for whether the whole compiler is considered incomplete or experimental.

It sounds like massive scope creep, in the sense that, when flang was proposed for inclusion, no-one could have required an unreleased standard as the benchmark for what counts as a full-fledged fortran compiler.

@kiranchandramohan
Copy link
Contributor Author

TODOs for unsupported OpenMP 5.2 features

I find it strange that a standard version released after flang got merged into LLVM is somehow a deciding factor for whether the whole compiler is considered incomplete or experimental.

It sounds like massive scope creep, in the sense that, when flang was proposed for inclusion, no-one could have required an unreleased standard as the benchmark for what counts as a full-fledged fortran compiler.

We started with OpenMP 4.5 standard when it was the F18 project. Subsequently, we have added OpenMP 5.2 features to the implementation. What I would like to get to is to be able to make statements on what is supported and what is not supported. Since some OpenMP 5.2 features are added the only standard that we can aim to completely address is OpenMP 5.2.

Also, I am not saying we have to support all OpenMP 5.2 features. The requirement is only to issue messages and gracefully error that the feature is not supported as the rest of the compiler says for Fortran language features. Also, this is not a requirement for the whole of the compiler, it is only about the experimental nature of the OpenMP implementation.
Note: I will change the title of the ticket to reflect this.

@kiranchandramohan kiranchandramohan changed the title [Flang][OpenMP] Important issues to be fixed prior to flang-new to flang renaming [Flang][OpenMP] Important issues to be fixed prior to removing experimental status of OpenMP Oct 1, 2024
@Leporacanthicus
Copy link
Contributor

Additional tests and small OpenMP.cpp changes available to review here:
#111562

I will continue this work, but this seemed like a good place to stop for today, and may start reviewing this part.

@tblah
Copy link
Contributor

tblah commented Nov 12, 2024

Should we also include fixing (at least some) compiler crash tickets before removing the experimental warning?

@kiranchandramohan
Copy link
Contributor Author

kiranchandramohan commented Nov 12, 2024

Should we also include fixing (at least some) compiler crash tickets before removing the experimental warning?

If there are important issues please add it to the following entry. I have not yet managed to go through all the issues in the tracker and hence that section is empty. May be I will populate with a subset of entries from issues with label flang:openmp.

Must fix issues from the tracker

@tblah
Copy link
Contributor

tblah commented Nov 13, 2024

If there are important issues please add it to the following entry.

I have added some, striking an opinionated balance between adding the whole issue tracker and missing important issues. If others disagree with my prioritization of those issues or would like to add more please go ahead.

@kiranchandramohan
Copy link
Contributor Author

If there are important issues please add it to the following entry.

I have added some, striking an opinionated balance between adding the whole issue tracker and missing important issues. If others disagree with my prioritization of those issues or would like to add more please go ahead.

I have moved it to the Must fix issues from the tracker section.

@anchuraj
Copy link
Contributor

reduction modifier MLIR support under review: #114737

@agozillon
Copy link
Contributor

agozillon commented Mar 6, 2025

I would like to claim: "present argument for defaultmap" from the 5.2 list, I've started a bit of work towards supporting defaultmap and i'll finish it up in the nearish future once I can spare a bit more time towards it :-)

Edit: Added myself to the list for that item

Thirumalai-Shaktivel added a commit that referenced this issue Mar 7, 2025
…#127769)

Issue:
- Single construct used to throw a semantic error for copyprivate and
  nowait clause when used in the single directive.
- Also, the copyprivate with nowait restriction has been removed from
  OpenMP 6.0

Fix:
- Allow copyprivate and nowait on both single and end single directive
- Allow at most one nowait clause
- Throw a warning when the same list item is used in the copyprivate clause
  on the end single directive

From Reference guide (OpenMP 5.2, 2.10.2):
```
!$omp single [clause[ [,]clause] ... ]
loosely-structured-block
!$omp end single [end-clause[ [,]end-clause] ...]

clause:
  copyprivate (list)
  nowait
  [...]

end-clause:
  copyprivate (list)
  nowait
```

Towards: #110008
llvm-sync bot pushed a commit to arm/arm-toolchain that referenced this issue Mar 7, 2025
…ive clauses (#127769)

Issue:
- Single construct used to throw a semantic error for copyprivate and
  nowait clause when used in the single directive.
- Also, the copyprivate with nowait restriction has been removed from
  OpenMP 6.0

Fix:
- Allow copyprivate and nowait on both single and end single directive
- Allow at most one nowait clause
- Throw a warning when the same list item is used in the copyprivate clause
  on the end single directive

From Reference guide (OpenMP 5.2, 2.10.2):
```
!$omp single [clause[ [,]clause] ... ]
loosely-structured-block
!$omp end single [end-clause[ [,]end-clause] ...]

clause:
  copyprivate (list)
  nowait
  [...]

end-clause:
  copyprivate (list)
  nowait
```

Towards: llvm/llvm-project#110008
jph-13 pushed a commit to jph-13/llvm-project that referenced this issue Mar 21, 2025
…llvm#127769)

Issue:
- Single construct used to throw a semantic error for copyprivate and
  nowait clause when used in the single directive.
- Also, the copyprivate with nowait restriction has been removed from
  OpenMP 6.0

Fix:
- Allow copyprivate and nowait on both single and end single directive
- Allow at most one nowait clause
- Throw a warning when the same list item is used in the copyprivate clause
  on the end single directive

From Reference guide (OpenMP 5.2, 2.10.2):
```
!$omp single [clause[ [,]clause] ... ]
loosely-structured-block
!$omp end single [end-clause[ [,]end-clause] ...]

clause:
  copyprivate (list)
  nowait
  [...]

end-clause:
  copyprivate (list)
  nowait
```

Towards: llvm#110008
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flang:openmp metabug Issue to collect references to a group of similar or related issues.
Projects
None yet
Development

No branches or pull requests

6 participants