Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Novice
261 Views

Different results between Debug and Release results

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?

0 Kudos
10 Replies
Highlighted
Black Belt
233 Views

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.

0 Kudos
Highlighted
Novice
213 Views

Thank you for your reply.
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?
0 Kudos
Highlighted
Valued Contributor III
207 Views

0 Kudos
Highlighted
Novice
197 Views

Thank you.
/Qinit:snan,arrays is the solution?
Why doesn't it work in my compiler?
0 Kudos
Highlighted
Black Belt
191 Views

What specifically does your compiler say?

0 Kudos
Highlighted
Novice
168 Views

 


@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

0 Kudos
Highlighted
Black Belt
154 Views

What compiler version? If it isn't current, check its version specific documentation to make sure it is recent enough to support that option.
0 Kudos
Highlighted
Valued Contributor III
149 Views

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.

 

0 Kudos
Highlighted
Black Belt
142 Views

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.

Highlighted
Novice
110 Views

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

0 Kudos