- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Background:
We're just trying to upgrade our Intel Composer installation from 2011 to 2013, but we are finding that although most results are unchanged, a few change a bit, and some quite a lot.
I've read through the release notes, and what I understood would not explain these differences (we have no multi-threading or classes - polymorphic or otherwise).
Question:
Are there any difference between the Intel Fortran compiler v13.0 and its immediate predecessor v11.0 in the following areas:
- Are uninitialised variables treated differently?
- Are there any compiler flags (like floating point settings) whose defaults have changed?
- Has the implicit casting of numeric types changed?
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Mike S. wrote:
Are uninitialised variables treated differently?
By default, such variables are not "treated". Instead, the consequences of their being present "happen" and are quite unpredictable. If you suspect that variables are being used without initialization, you will have to track them down. There is limited support for automatically detecting them.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In C++ there're static analysis tools which are pretty good at identifying uninitialised variables (as do the compiler warnings). I'm experimenting with a few of the Fortran ones, but the quality is pretty poor in comparison. The only differences I could imagine is something like all REAL values being initialised by the compiler to being DBL_MAX instead of being left as random memory, but I agree it's a long shot!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can try compiling your code with various diagnostics (/warn:declarations, etc.) and turn on various run-time checks (/check:uninit, etc.) to investigate your code. You can also try static-analysis features in Intel Fortran if your license includes more than just the compiler, or look at free-ware utilities such as ftnchek at http://www.dsm.fordham.edu/ftnchek/.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There are two IFort options, /Qzero and /Qsave, which can be useful to strengthen a suspicion that a user program is affected by uninitialized variables.
It has been my experience that hunting down uninitialized variables, and other bugs in general, is far easier to do with Fortran code than with C code. C offers more ways to screw things up than Fortran does, and one has to weigh that property against the closer-to-the-machine features of the C language.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks, mecej4 and FortranFan - I've had another look at those Fortran options, and they should definitely give us a lead.

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