|
From: Federico G. A. <fed...@gm...> - 2010-01-26 11:21:17
|
HI! I've a simple FORTRAN code that does some operation (no more than addition and multiplication) with complex number. I've compiled my code with the -g option and with the -o3. And some of the resulting values are different. So I started inserting some WRITE statements in the intermediate computation and some of the previous results that were different now are exactly the same!! I believe that this looks like a illegal value access problem, like reading uninitialized variables, reading over arrays boundary. I run the program under Valgrind with mem-check tool and it didn't find any errors. I run the program under Valgrind with pointer-check tool and it gives me a lot of "Invalid read" messages at lines where OPEN, READ, WRITE function are used. What can I do? thank you very much ! Federico |
|
From: tom f. <tf...@al...> - 2010-01-27 06:00:23
|
writes: > I've a simple FORTRAN code that does some operation (no more than > addition and multiplication) with complex number. > > I've compiled my code with the -g option and with the -o3. And some > of the resulting values are different. So I started inserting some > WRITE statements in the intermediate computation and some of the > previous results that were different now are exactly the same!! > > I believe that this looks like a illegal value access problem, like > reading uninitialized variables, reading over arrays boundary. This is almost definitely the standard intel extra-precision issue and not a real `bug' in your program. I'm sure "Intel 80-bit" on google will describe this in more detail. If you're using the GNU toolchain, compile with -ffloat-store and you should see identical results with and without the writes. Cheers, -tom |
|
From: Federico G. A. <fed...@gm...> - 2010-01-27 09:18:01
|
That's it. Thank you Tom! Il giorno 27 gennaio 2010 07.03, tom fogal <tf...@al...> ha scritto: > writes: > > I've a simple FORTRAN code that does some operation (no more than > > addition and multiplication) with complex number. > > > > I've compiled my code with the -g option and with the -o3. And some > > of the resulting values are different. So I started inserting some > > WRITE statements in the intermediate computation and some of the > > previous results that were different now are exactly the same!! > > > > I believe that this looks like a illegal value access problem, like > > reading uninitialized variables, reading over arrays boundary. > > This is almost definitely the standard intel extra-precision issue and > not a real `bug' in your program. I'm sure "Intel 80-bit" on google > will describe this in more detail. > > If you're using the GNU toolchain, compile with -ffloat-store and you > should see identical results with and without the writes. > > Cheers, > > -tom > |