- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I found different results between Debug and Release version of the same program.
I have just read some posts in this topic.
I would like to set my compiler in order to have a NaN for not initialized scalar and array.
In this way, with /fpe:0, I should have an error, avoiding errors in release version.
What shall I set in the compiler?
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Matteo,
I am afraid that there is no simple solution. There are many causes for the single symptom that you stated: results changing when compiler options are changed. Not surprisingly, there is no single compiler option to help you to locate and fix the problems in your code.
See the Intel documentation for details regarding the various /check and /warn options.
If you can post the code and show us what kinds of differences you see, someone may be able to make suggestions for a solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Unfortunately the code is very large and a non disclosure agreement doesn't let me to share that.
In some thread I found Qinit:snan,arrays could initialize as NaN the variables, but my compiler doesn't recognize this command.
Which is the correct set?
- 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
/Qinit:snan,arrays is the solution?
Why doesn't it work in my compiler?
- 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
@IanH ha scritto:
What specifically does your compiler say?
Hi, that's the warning:
1>ifort: command line warning #10006: ignoring unknown option '/Qinit:arrays'
I set that in Project>Command Line
- 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
C:\test>ifort reproducer.f90 /Qinit:arrays /c
Intel(R) Visual Fortran Intel(R) 64 Compiler for applications running on Intel(R) 64, Version 19.1.1.216 Build 20200306
Copyright (C) 1985-2020 Intel Corporation. All rights reserved.
Works fine for me, what version are you using? Maybe post the full command line and output as above.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The /Qinit:arrays option works with Ifort Version 15.0.7.287 and later versions. It does not work with the next older version that I still have, which is 14.0.4.237.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank for your reply.
Unfortunately I use a 14.0.6 version and I understood it is too old for that setting.
Anyway I solved by an hard debug
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page