identical executables, different results, continued
From: Irrational Number (nospam_at_nospam.com)
Date: 01/31/04
- Next message: Willem: "Re: advantages of C"
- Previous message: Arthur J. O'Dwyer: "Re: Response to Karen and to Willem on recursive proofs"
- Next in thread: Arthur J. O'Dwyer: "Re: identical executables, different results, continued"
- Reply: Arthur J. O'Dwyer: "Re: identical executables, different results, continued"
- Reply: Jack Klein: "Re: identical executables, different results, continued"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 30 Jan 2004 15:41:23 -0800
Hello everyone,
A few weeks ago, I'd posted about identical executables
(ftp-d from one Linux RH 7.2 box to another Linux RH 7.2
box) running on two different machines. My test suite
contains 34 runs and 31 of them were identical, but 3
were different.
>From the responses in the group, I started searching for
variables that were typed incorrectly in Fortran (double
vs. real, implicitly-typed variables, etc.). Turns out,
that was not the problem.
The problem is actually in a memory allocation function,
whilst malloc-ing a linked list in C. (Our code contains
Fortran, C, and C++.) Also, the debuggable version (-g)
of the code does NOT have any result differences, only
optimized versions (-O1 and -O2). (We could go with the
-g version, but the analysts need to run thousands of
tests...)
So, now my question is: are there any esoteric problems
with optimizing a malloc call in C? The code LOOKS
correct to me...
newlist = (List_Type) malloc (sizeof(struct _List_Type));
with subsequent initializations. How should I go about
finding this insect?
Thanks,
Anita
- Next message: Willem: "Re: advantages of C"
- Previous message: Arthur J. O'Dwyer: "Re: Response to Karen and to Willem on recursive proofs"
- Next in thread: Arthur J. O'Dwyer: "Re: identical executables, different results, continued"
- Reply: Arthur J. O'Dwyer: "Re: identical executables, different results, continued"
- Reply: Jack Klein: "Re: identical executables, different results, continued"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|