This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: different behaviours - same compiler - different platforms


On Apr 13 2011, afylot wrote:

I got a problem with a fortran 77 code running on two different computers with different architectures (intel pentium 4 and dual core opteron). The code was compiled with the same compiler gcc 4.1.2. I found two completely different results at runtime. I find that the problem is apparently solved by removing 10 double precision variables that were defined but not actually used. Can it be a memory issue? How can I prevent this from happening?

Almost always, this is due to an undetected error in your program (e.g. an array element reference out of bounds) that is causing data corruption. You are lucky if you get a nice SIGSEGV :-(

The solution is to fix your code.  Sorry, but that's reality, and has
been since the beginning of modern computing.

Just occasionally, it's a compiler bug, but even experts are more likely
to have an undetected error in their code.

Regards,
Nick Maclaren.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]