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

forrtl: warning (402)

sxy
Beginner
415 Views

Hi,

We are trying to compile and run a large simulation system on our linux cluster system.

Linux ---

Linux yossarian.physics.usyd.edu.au 2.6.9-78.0.8.ELsmp #1 SMP Wed Nov 5 07:14:58 EST 2008 x86_64 x86_64 x86_64 GNU/Linux

Intel Fortran Compilers 10.1 64bit ---

Compiling option 1 (double precision for real variables):

-c -02 -r8 -w -g -traceback -check all -heap-arrays -fp-stack-check

Compiling option 2 (single precision for real variables):

-c -02 -w -g -traceback -check all -heap-arrays -fp-stack-check

When we run the system, we came across such warning,

forrtl: warning (402): fort: (1): In call to SC_MAXVAL_BLK, an array temporary was created for argument #2

with compiling option 1, the returned value of function SC_MAXVAL_BLK is 2.552025490808403E-006

with compiling option 2, the returned value of function SC_MAXVAL_BLK is 8.5516567E-06

we are wondering why there is such significant difference between the two figures?

Thanks!

Sue

0 Kudos
3 Replies
TimP
Honored Contributor III
415 Views
The difference appears to be on the order of SPACING(11.) so it may well be an expected difference between single and double precision evaluation. Whether it is a significant difference depends on factors which we can't judge from this distance.
If single precision accuracy is important, you may want to set -fp-model precise -assume protect_parens, or, for somewhat better performance, -assume protect_parens -prec-div -prec-sqrt.
The array temporary warning has to do with performance, not accuracy.
0 Kudos
sxy
Beginner
415 Views
Quoting - tim18
The difference appears to be on the order of SPACING(11.) so it may well be an expected difference between single and double precision evaluation. Whether it is a significant difference depends on factors which we can't judge from this distance.
If single precision accuracy is important, you may want to set -fp-model precise -assume protect_parens, or, for somewhat better performance, -assume protect_parens -prec-div -prec-sqrt.
The array temporary warning has to do with performance, not accuracy.

Hi,

we ran the same case but with different precisions (double and single) for real variables.
we expect that at least the first digit of the returned values should be same.

Sue
0 Kudos
TimP
Honored Contributor III
415 Views
Quoting - sxy
we expect that at least the first digit of the returned values should be same.
Not if that result is based on the difference between 2 similar default real values.
0 Kudos
Reply