- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I am getting different output from my program depending on wether I compile (ifort 8.1.034) it with -g or -O0 (the only parameters used). Even more confusing, I get changes in the output when I put a write(*,*) 'TEST' in my program (line 281). This happens on my system (Pentium M, Suse Linux 9.3, kernel 2.6.11.4-21.10-default) as well as on an other system (Pentium 4, Suse Linux 9.0, kernel 2.4.21-215-default) but here with even other output values.
The program is quite big for being a test case but the two parts it consists of are working well. It is a simulation which takes 3 parameters for calculating the output and a genetic algorithm for finding the 3 parameters. The simulation gives the same results with -g and -O0 on both computers as well as the genetic algorithm (with a small test function to optimize).
The standard option -O2 can't be used because I get a segmentation fault (already with the simulation without genetic algorithm), a thing I still have to trace back. (ulimit -s unlimited is not the reason).
Thank you for your ideas!
(I attached the program with its input file perhaps somebody can reproduce this bevavior)
I am getting different output from my program depending on wether I compile (ifort 8.1.034) it with -g or -O0 (the only parameters used). Even more confusing, I get changes in the output when I put a write(*,*) 'TEST' in my program (line 281). This happens on my system (Pentium M, Suse Linux 9.3, kernel 2.6.11.4-21.10-default) as well as on an other system (Pentium 4, Suse Linux 9.0, kernel 2.4.21-215-default) but here with even other output values.
The program is quite big for being a test case but the two parts it consists of are working well. It is a simulation which takes 3 parameters for calculating the output and a genetic algorithm for finding the 3 parameters. The simulation gives the same results with -g and -O0 on both computers as well as the genetic algorithm (with a small test function to optimize).
The standard option -O2 can't be used because I get a segmentation fault (already with the simulation without genetic algorithm), a thing I still have to trace back. (ulimit -s unlimited is not the reason).
Thank you for your ideas!
(I attached the program with its input file perhaps somebody can reproduce this bevavior)
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I don't see your attachment, but anything that changes the memory layout can create this sort of problem for a program that is accessing uninitialized memory. It sounds very much as if you have a coding error in there somewhere - could be an out of bounds array reference or a mismatch in types across a call.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I changed the code in a way that it runs with the -O2 option. I had to
call a function directly which was given as a parameter to another
function before (delta_E called by brent). Surprising, I still have to
find the reason. I don't get array access errors with -C, but anyway I
still get different output for -O2, -O0 and -g compile options. I go on
trying to find the point where the versions differ and attach the files
to see if somebody can reproduce the behavior (wether it is a code or
system dependent behavior).

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page