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

strange behaviour in Centrino?

aghisi
Beginner
531 Views
Hello all,

this is my first post, I hope it is the right place.

I tried the same FORTRAN Console Application Project both in a Centrino laptop (Intel Pentium M 1.86 GHz) and in a Pentium-D Dual Core 3.4 GHz workstation and I got two different results. I don't know where is my error, I just pasted the whole directory and changed only the position of INCLUDE files.

The code is a FORTRAN MPI code run in a MPICH environment (so with the laptop it is just an emulation of a parallel execution). The error occurs during a calculation in a nested cycle when the program executes
c(i,j)=c(i,j)+a(i,k)*b(k,j)
with the variables (REAL*8) before the execution of this instruction being
a(i,k)=4.987220479999542E-020
b(k,j)=0.
c(i,j)=0 
So c(i,j) should be zero, but with the laptop I get NaN.
Instead, with the Dual Core I get 0.0, correctly.
In the laptop I have also the old CVF 6.5, which cannot be used for parallel programming, but I maintain for compatibility with other programs.
The instruction is executed only by process zero, there should be no interference from the parallelization, striclty speaking.

Forgive me for the length of the message, I thank you in advance for any help

Best regards
Aldo Ghisi

0 Kudos
2 Replies
Steven_L_Intel1
Employee
531 Views
Are you sure those are the values prior to the expression? Did you print them out? In hex to see what the bit pattern was? I can't imagine how that expression with those values gets a NaN. Try recompiling with /fpe:0 (Fortran..Floating Point. Floating Point Exception..0) and see if you get run-time errors.

My first guess would be that uninitialized variables are being referenced.
0 Kudos
aghisi
Beginner
531 Views
Hello Steve and forumers,

thanks to your advice, I can share with you some results from more tries.
Centrino is OK, the error occurred also with Pentium D, after a while (I mean after re-executing several times the code and no, exactly I don't know why it doesn't appeared from the beginning).

Steve's suggestion (compile with /fpe:0) showed some previously not evidenced conflictes with I/O routines, when writing to files occurred. I deleted every writing to files and now the code is working fine.
Anyway the behaviour I described in the first post was really strange.

Thank you Steve again and regards
Aldo Ghisi

p.s. I believe that the thread title "strange behaviour in Centrino?" is misleading, but I don't know if it is possible to change it.

0 Kudos
Reply