- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am using the IVF version:
Intel® Visual Fortran Compiler Integration for Microsoft Visual Studio* 2008, 11.1.3471.2008, Copyright (C) 2002-2010 Intel Corporation
I found that the reason is
Local variables forget to be initialized in my code
In release mode, these variables are forced to be 0 while in debug mode, these variable still keep the values in last call.
I am using the default compiling options from IVF and shows below.
Release mode: /nologo /module:"Release\\\\" /object:"Release\\\\" /libs:static /threads /c
Debug mode: /nologo /debug:full /Od /gen-interfaces /warn:declarations /warn:interfaces /module:"Debug\\\\" /object:"Debug\\\\" /traceback /check:bounds /libs:static /threads /dbglibs /c
I want to say this is abnormal for IVF. At least IVF should give me a warning message like "the variable is used before initialization" which is the usual check in language C or in old Compaq Visual Fortran.
I cannot even find this kind of warning check in compiling options. I only find an option for "Initalize local Saved Scalars to Zero" /Qzero. But I found this by taking me about half day to print variables and trace variables.
I guess this issue will bring lots of inconvinience and is a trap when people want to re-pick up their old fortran code.
So I strongly suggest IVF list this /Qzero to be an default compiling options for debug mode. Or IVF should add the warning check for variables used before initialization
IF IVF IS REALLY CARE ABOUT CUSTOMERS!!!
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I want to add it for this issue
In debug mode, after I add two options /Qsave and /Qzero, I got exact same results compare to those in release mode.
I also find similar post
http://redfort-software.intel.com/en-us/forums/showthread.php?t=100440
It is headache for me (but also for most customers) to play so many compiling options. I don't know the focus of IVF. The focus is to make user more simple and easy to use it OR focus on complicated Fortran standards. More and more customer will escape if IVF makes things more complicated. I strongly suggest to tune the default compiling options to satisfy previous CVF options. This is a backward compatiblity issue.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
We do have /check:uninit as a default, but it doesn't catch everything.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
That might be a way to avoid many if not most of the 'different results' issues.
To compare options i find that by opening 2 separate sessions, one in debug and one in release, I then can modify the release options to be the same as debug (except of course the debug options).
And then close debug first! and then when you save the release option session they options are the same as debug.
I frequently we see folks who raise the 'different results' issue between debug & release and i believe it is mainly due to 'different options' set because they mess around with the options in debug and then don't make the same changes to release.
Ok, fire away! ;-)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am not arging on any specific option like /Qsave or /Qzero to be added to default option.
As a user, I want to use it more simple and easy. Either IVF told me where is the error in my code if my code is wrong; or IVF give me correct results if it does not say any wrong on my code.
The worst thing is IVF did not say anything wrong and give the wrong results!
User must check the complicated compiling option to figure out the reason!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
However, there are many coding errors the compiler cannot reliably detect. It is not that the user must check the options, it's that the user should write correct code. Uninitialized variables, or assuming SAVE semantics where the language does not specify it, is a coding error. That some other compiler hid the error from you doesn't make it any less of a coding error.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have a similar problem. I compared each options in release mode and debug mode. And when I am using Debug Multithreaded (/libs:static /threads /dbglibs) as Runtime Library in Debug mode I get wrong answers. When I change this option to Multithreaded, then I get correct results. Do you have an idea why I have an issue like this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The similarity that you mention is likely to be rather vague, as in "all buggy programs are similar". Noting this kind of similarity is worth next to nothing as far as locating and rectifying the problem is concerned.
You could have code that causes array bounds to be exceeded, code containing mismatched subprogram arguments, and uninitialized variables. Finding and fixing such errors is time consuming, but there are some compiler options to help you with the task, some of which have been mentioned in this thread.

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