[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
Re: Clause 10, Expression Evaluation
On Aug 1, 2007, at 3:46 AM, Nick Maclaren wrote:
<snip>
... Are you certain
that the code generated by Sisal consistently imposed deterministic
floating point semantics? FWIW during most of Sisal's active period
it relied on C code compiled using gcc, gcc was largely a K&R
compiler, and K&R C had looser floating point semantics than Fortran
and C89.
One can argue whether C89 (or C99) is specified closely enough
to determine even whether a non-trivial program is legal, let alone
whether it will produce a deterministic result. Even if Sisal was
a gcc-only language, I have my suspicions that there would be a lot
of variation between versions of gcc.
However while the default semantics of C as interpreted by gcc
complicate ensuring deterministic floating point behavior I suspect
it was doable in that time period. For their purposes the strict
legality of the code was less important than the reproducibility of
the interpretation of the code by one compiler on a limited set of
systems. The mapping of the Sisal expressions to the C code would
probably not be idiomatic, e.g, intermediate expressions would have
to be assigned to temporary variables, and some forms of floating
point optimization would have to be disabled. Because of the relative
lack of interest in deterministic floating point by their expected
user base, I expect that the effort to ensure this would have low
priority. FWIW my memory or intuition may have gone bad, I expect the
impact of this on single processor performance on many applications
would be large, I think the test cases they quote include such
applications, and the single processor performance impact was not as
large as I expected.
--
William B. Clodius Space & Remote Sensing Sciences
Tech. Staff Member, ISR-2 Phone: (505) 665-9370
Mail Stop B244 FAX: (505) 665-4414
Email: wclodius@xxxxxxxx Group office: (505) 667-5776
LANL email review:
[ ] - Non-Technical Correspondence
[x] - Technical Correspondence
[ ] - DUSA:
[x] - ADC Review by: Clodius