- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I teach portable programming, and I both use and recommend all diagnostic options, including ones like -stand=f03. Unfortunately, omp_lib.h is highly non-standard and (this is the point) that is not shielded from the user. With this program:
PROGRAM Main
IMPLICIT NONE
INCLUDE "omp_lib.h"
END PROGRAM Main
and command ifort -stand=f03, I get a stream of diagnostics that will confuse the kiddies. That's not good.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Tell the kids to USE OMP_LIB instead. It's better for them.
Yes, include files that declare non-standard routines may use extensions. Looking through omp_lib.h, I think that many of the directives could be replaced with C interoperability features, but use of include files here are still likely to be an issue if you turn on standards warnings.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Er, yes - stupid of me :-(
I copied the examples from one that I had written before the module was available in most compilers, and had completely forgotten about the module when I produced this report. I will do a systematic update and check my lectures. Thanks for that!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This sort of thing (older language features used in examples, header and include files, and described in documentation) is probably unavoidable. There was a thread in the MKL forum recently where an example code with Cray pointers was discussed, and some of the responders had never heard of Cray pointers. One person jokingly asked if the Cray pointer was a kind of Cajun dog.
Eventually, the examples and include files may get updated to use ISO C-Interoperability, but it will take time and effort.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I certainly wish that people would forget about Cray pointers :- a zillion incompatible specifications, all with nightmarish consequences for software engineering and optimisation!
In this case, the module is the right solution, and it is only because I am one of the earlier users of OpenMP that I had code with the Fortran header in - had - I don't any longer :-) I agree that improving the header is clearly significant effort and a low-priority task.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
And Nick, as you know, even Cray doesn't like the term!

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page