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

COS results wiggle a little with same executable on different machines

Bryan_H_1
Beginner
503 Views

Greetings,

My company is reviewing upgrading from Intel Fortran Compiler XE 13.0 to Intel® Fortran Compiler 16.0 and noticed an anomaly that is blocking us.  This issue can be duplicated using the following program:

      PROGRAM COSINE_TEST
      
      REAL X
      
      X = 8.3141200E-2
      
      WRITE(*,*) COS(X)
      
      END 

Using version 13.0 to compile a binary, copying and running that binary on all test machines produces: 0.9965457.

Using version 16.0 to compile a binary, copying and running that binary on test machines produces different results : 0.9965457, and 0.9965458 on others. 

What external factors are impacting the binary to cause this unexpected behavior, and what can I do to ensure a stable testing environment?  Let me know what additional information can I provide to assist in reviewing this.

Thanks for your time,

Bryan

0 Kudos
1 Solution
Steven_L_Intel1
Employee
503 Views

The math library does auto-CPU dispatch and may execute a different code path on different processors. See the presentation I have attached for more.

443546

View solution in original post

0 Kudos
5 Replies
Steven_L_Intel1
Employee
504 Views

The math library does auto-CPU dispatch and may execute a different code path on different processors. See the presentation I have attached for more.

443546

0 Kudos
Bryan_H_1
Beginner
503 Views

Steve,

Thanks for the help!  In your document you mention:

"-fimf-arch-consistency=true – Math library gives same results across processors"

I would like to give this a test, but I do not know where/how to set this switch.  I could not find it in the "Property Pages | Configuration Properties | Fortran".  Also tried to manually add it to the "Property Pages | Configuration Properties | Fortran | Command Line | Additional Options:" as "-fimf-arch-consistency=true".  But the compiler reported:

 

"1>ifort: command line warning #10006: ignoring unknown option '/fimf-arch-consistency=true'"

Thanks again,

Bryan

0 Kudos
mecej4
Honored Contributor III
503 Views

On Windows, /Qfimf-arch-consistency:true

(corrected)

0 Kudos
Bryan_H_1
Beginner
503 Views

mecej4,

Your proposal did not work but it got me on the right track.  The mentioned 
"/Qfimf-arch-consistency=true" did not work.  However, "/Qimf-arch-consistency:true" did.

I am happy to say that in my small test set the results are now consistent!  

Thanks Steve and mecej4,

Bryan

 

0 Kudos
Steven_L_Intel1
Employee
503 Views

Right - colon on Windows, equal sign on Linux.

0 Kudos
Reply