[flang-commits] [flang] [flang][Lower] Always generate namelist group locally (PR #109303)

via flang-commits flang-commits at lists.llvm.org
Fri Sep 20 01:46:39 PDT 2024


jeanPerier wrote:

Is this really legal OpenMP?

I found this restriction in [OpenMP standard](https://www.openmp.org/wp-content/uploads/OpenMP-API-Specification-5-2.pdf) section 5.3:

> Variables that appear in namelist statements, in variable format expressions, and in expressions for statement function definitions, must not be privatized

Maybe this does not really apply to REDUCE, but i it could then be an omission from OpenMP given the spirit of 5.3 restriction.

Regarding DO CONCURRENT, I have not found a very convincing point about what happens with variables in LOCAL_INIT, LOCAL, or REDUCE that appeared in a namelist. I think it would deserve a standard clarification, if namelist IO is possible inside it (which I do not think is forbidden).

I share Val's concern that namelist IO can be used with huge variable lists in old programs in parts that make little sense to parallelize, and that spending time creating the namelist object again and again at each namelist reference could be a significant hit.

https://github.com/llvm/llvm-project/pull/109303


More information about the flang-commits mailing list