- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
When I compile my code using the /stand:f03 option (to warn whenever non-complying Fortran is encountered), I receive numerous messages (whenever I use the "IMAG" function) saying
"warning #7416: Fortran 2003 does not allow this intrinsic procedure. [IMAG]"
I don't seem to get this for any other intrinsic functions. What's going on? Has the Fortran 2003 standard really withdrawn the IMAG function (in favour of AIMAG and DIMAG??), or is this a bug in the checker, or something else entirely?
Thank you,
Stephen.
"warning #7416: Fortran 2003 does not allow this intrinsic procedure. [IMAG]"
I don't seem to get this for any other intrinsic functions. What's going on? Has the Fortran 2003 standard really withdrawn the IMAG function (in favour of AIMAG and DIMAG??), or is this a bug in the checker, or something else entirely?
Thank you,
Stephen.
Link Copied
9 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Soimething else. IMAG has never been in the Fortran standard. It is an extension and is marked as such in the documentation. Use AIMAG for a standard-conforming name.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - Steve Lionel (Intel)
IMAG has never been in the Fortran standard. It is an extension and is marked as such in the documentation. Use AIMAG for a standard-conforming name.
The g77 manual is still on line, and it describes DIMAG as "archaic." That term might be applied to g77 itself now. DIMAG was a common extension prior to availability of f77, but was no longer needed since 25 years ago. If /stand doesn't make a remark about it, that's a bug.
g77 had a command line switch to dictate either a standard interpretation of AIMAG or a typical pre-f77 non-standard interpretation. That's among the g77 "archaisms" which not even gfortran adopted. So, it's time to get used to the standard. No doubt, the committee hashed over the pros and cons of this 35 years ago.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - Steve Lionel (Intel)
Something else. IMAG has never been in the Fortran standard. It is an extension and is marked as such in the documentation. Use AIMAG for a standard-conforming name.
Thank you, that's very helpful.
As a follow-up question, where is the best place to get a clear description of the Fortran 2003 standard in its entirety? The J3 website just directs me to the ANSI website (where part I can be obtained for $30 and various corrigenda are available for free). A single document which clearly described the whole standard, comparable to the OpenMPstandard which is conveniently summarized in a single download, would certainly be useful.
Stephen.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Good standard textbooks include the current Adams et al. "Fortran 2003"
http://www.springer.com/computer/programming/book/978-1-84628-378-9
and the MR&C
http://www.oup.com/us/catalog/general/subject/ComputerScience/ProgrammingLanguageTheory/?view=usa&ci=9780198526933
for which there are a large number of errata posted on line.
Fortran 77 was the last standard which had any semblance of convenience such as the OpenMP still aspires to.
Unfortunately, OpenMP leaves room for questions, not only about level of implementation.
http://www.springer.com/computer/programming/book/978-1-84628-378-9
and the MR&C
http://www.oup.com/us/catalog/general/subject/ComputerScience/ProgrammingLanguageTheory/?view=usa&ci=9780198526933
for which there are a large number of errata posted on line.
Fortran 77 was the last standard which had any semblance of convenience such as the OpenMP still aspires to.
Unfortunately, OpenMP leaves room for questions, not only about level of implementation.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In the right column of this forum's main page is a link to a free copy of the F2003 standard.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - eos pengwern
Thank you, that's very helpful.
As a follow-up question, where is the best place to get a clear description of the Fortran 2003 standard in its entirety? The J3 website just directs me to the ANSI website (where part I can be obtained for $30 and various corrigenda are available for free). A single document which clearly described the whole standard, comparable to the OpenMPstandard which is conveniently summarized in a single download, would certainly be useful.
Stephen.
There's a link on the main page of this forum (click on the "Intel Visual Fortran Compiler for Windows" part of the breadcrumb trail, then look under "Useful information" on the right hand side) that takes you to a pdf of part 1 of the F2003 draft std. It is a draft, but I'd guess a very late one. Note that part 1 is the "entire" language standard - the other parts deal with iso_varying_string and conditional compilaton (not the !DEC$ style supported by Intel Fortran), which you probably don't care about.
A nice summary of the new features of F2003 (but this is not written in the style of a reference for those features) can be found at ftp://ftp.nag.co.uk/sc22wg5/N1601-N1650/N1648.pdf.
If you want something that is a summary/description/interpretation of the (entire) standard but not the standard itself (the OpenMP document that I think you are referring to is the OpenMP std, but it covers way less territory than a language std has to cover) then I think you are going to have to go to your nearest (online) bookstore or wait for Intel to complete support of F2003 (be mindful that they've still got a bit to do when you are reading any of this stuff) and update the compiler's documentation.
A convenient list of Fortran standard related resources that I got all the above links from is at http://gcc.gnu.org/wiki/GFortranStandards. But obviously not everything there is relevant to Intel Fortran :). (I think a draft of the F95 std is linked from there, which is relevant to Intel Fortran, but in that case the compiler's own documentation is much easier to work with).
Happy reading.
IanH
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - IanH
The Fortran "Language bible" for quite some time has been Metcalf and Reid's "Fortran XX explained", whose last edition is called "Fortran 95/2003 explained". I think it contains all 2003 features, but I'm not positive. It's a reference book, i.e. not as dense as the standard, but not a light reading either.
Not having read, but knowing the authors, "The fortran 2003 handbook" by Adams et al. is also a worthwhile investment.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you Gentlemen. Again, that's very helpful. I have a copy of Metcalf, Reid and Cohen already, which covers most things but isn't the same as having an 'official' document. I've downloaded Steve's link as well (the 2004 final draft of the standard). Using the two of these together should hopefully prevent the need to ask similar questions in the future.
Stephen.
Stephen.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The document linked to in the forum is the final standard - the differences between it and the "real" standard are cosmetic only and the "committee draft" is what the standards committee uses itself as a reference.

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