Now, it came to my attention, that within the OpenMP standard (including the 4.0 draft) it is written:
"Fortran Restrictions:
The following restriction applies to all OpenMP directives:
• OpenMP directives may not appear in PURE or ELEMENTAL procedures."
Why is that so? Especially INTENT and pure are great tools to force the compiler to check for side-effect-free code in Fortran. Why is it not allowed to be combined? What is the technical reason behind it? I did not find a useful hint within the standard for that.
The currently implemented code with OpenMP directives compiles and runs bug free, without any complains and it is really running in parallel, as we can see it with tools and the process management tools. The results are also checked carefully.
If it is not working that way, how can we utilize the compiler to check for side-effect-free code and run it in parallel with OpenMP? The current application make extensive use of (changed) global state for runtime control which we need to identify.
It was tested mostly with Intel Fortran Compiler (ifort).
Regards
Rick
