Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Error casing nun values

craneboba
Beginner
574 Views

Compiler

Intel(R) Visual Fortran Compiler XE 13.0.0.089 [IA-32]...

Only turn on optimisation

When doing 

      logical*4 FUNCTION COMPUTE_REGRESSION2(NY)

      real*8     R8

      integer*8  NY

c

      R8=NY             ! При for some values of NY-  R8=NaN

Same code never gives nun, if 

added if after 

R8=NY            

      if (isnan(r8)) then

            call append(' r8=Nan');  call dos_line_wait();

      end if     

0 Kudos
2 Replies
Arjen_Markus
Honored Contributor I
556 Views

Can you provide a complete program that shows the problem, including the compiler options that are required for reproducing it? Now we need to guess at a few things, which makes it quite difficult.

0 Kudos
craneboba
Beginner
526 Views

Thanks for fast answer Arjen_Markus

Failed to isolate error. That is, I cannot write

a short piece of code, when executed, the assignment operator:

 

Var_Real_8 = Var_Integer_8

 

would return the value Var_Real_8 = NaN, under normal

value Var_Integer_8.

 

 

Compilation options

/nologo /debug:full /MP /Od /QaxSSE3 /QxSSE3 /Qparallel

/assume:buffered_io /I"O:\_WinABD\LB" /I"O:\_WinABD\inc" /arch:SSE3

/extend_source:132 /Qdiag-error-limit:60 /debug-parameters:all

/warn:declarations /warn:unused /warn:ignore_loc /warn:truncated_source

/warn:interfaces /assume:byterecl /Qtrapuv /Qzero /Qfp-speculation=fast

/module:"O:\Temp/" /object:"O:\Temp/" /Fd"O:\_WinABD\_Debug\vc90.pdb"

/traceback /check:bounds /check:uninit /libs:static /threads /dbglibs /c

 

There are /nologo /debug:full /MP /Od /QaxSSE3 /QxSSE3 /Qparallel

/assume:buffered_io /I"O:\_WinABD\LB" /I"O:\_WinABD\inc" /arch:SSE3

/extend_source:132 /Qdiag-error-limit:60 /debug-parameters:all

/warn:declarations /warn:unused /warn:ignore_loc /warn:truncated_source

/warn:interfaces /assume:byterecl /Qtrapuv /Qzero /Qfp-speculation=fast

/module:"O:\Temp/" /object:"O:\Temp/" /Fd"O:\_WinABD\_Debug\vc90.pdb"

/traceback /check:bounds /check:uninit /libs:static /threads /dbglibs /c

 

There are certain conditions, when we observed

The error appears not so often when1) The program must have numerous calls to the DATE_AND_TIME function2) The program must consist of several files3) Optimization for speed is enabled

So many  transformations Var_Real_8 = Var_Integer_8

 Give correct values , when suddenly some call gives nun

We are  calling DATE_AND_TIME inside a computation loop to timed

time of its work and print% of completion once a second.

If the cycle is short (hundreds of thousands of steps), then everything works correctly.

But if the loop is executed millions of times, then at some point

operator

 

  Calling DATE_AND_TIME must be not in the same block ( fortran file), were we   do transformation

Var_Real_8 = Var_Integer_8

We do some random time series generations, using standart functions for this.

We use  DATE_AND_TIME  for generating time coordinate.

In the result we get big time serises.

When we plot it later we see, that some points from hundreds 

has no value . We tested it on 26 different computes 

with windows 7 and windows 10 (64) and often observed it.

When /Qfp-speculation=fast

Bug does not exists. 

Best wishes.

Vladimir Zhuravlev , MVP 2006-2017,PHD

www.foxclub.ru domain owner 

0 Kudos
Reply