[parsec-users] Blackscholes and icc
mark.hampton at intel.com
Mon Dec 8 15:50:29 EST 2008
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