[parsec-users] Blackscholes and icc
cbienia at CS.Princeton.EDU
Mon Dec 8 16:05:47 EST 2008
Thanks for letting us know. That's valuable feedback. It'll be fixed in the
next PARSEC release.
From: parsec-users-bounces at lists.cs.princeton.edu
[mailto:parsec-users-bounces at lists.cs.princeton.edu] On Behalf Of Hampton,
Sent: Monday, December 08, 2008 3:50 PM
To: parsec-users at lists.cs.princeton.edu
Subject: [parsec-users] Blackscholes and icc
The bs_thread() function in the blackscholes benchmark calls
BlkSchlsEqEuroNoDiv() and assigns the result to the "price" variable.
However, unless ERR_CHK is defined, the price variable is never used. This
doesn't cause a problem when compiling the benchmark with gcc; however, when
compiling with icc (I'm using version 11.0.069, and saw the same behavior
with version 10.1.017) and using optimization level -O2 or -O3, the compiler
recognizes that price is never used and removes the call to
BlkSchlsEqEuroNoDiv(), resulting in no computation being performed. I made
a temporary fix for my purposes by adding "assert(price>=0.0||price<0.0);"
after the assignment to price, but I figured that it would be good to
address the issue in the next release of Parsec. Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the parsec-users