[parsec-users] FW: Blackscholes issues

Christian Bienia cbienia at CS.Princeton.EDU
Mon Jun 30 15:46:48 EDT 2008


Nikolay sent this to parsec-users but it bounced for some reason.

 

We'll include the patch in the next version of PARSEC.

 

 

From: Nikolay Kurtov [mailto:nkurtov at gmail.com] 
Sent: Monday, June 30, 2008 12:06 PM
To: parsec-users-bounces at lists.cs.princeton.edu
Subject: Re: [parsec-users] Blackscholes issues

 

Hello Christian,

 

I've made a patch.

Check blackscholes.simd.c, it may contain similar errors.
 

From: Christian Bienia [mailto:cbienia at CS.Princeton.EDU] 
Sent: Monday, June 30, 2008 12:03 AM
To: 'PARSEC Users'
Subject: Re: [parsec-users] Blackscholes issues

 

Hello Nikolay,

 

Thank you very much for your bugreports. We will fix it in the next version.

 

Do you have a fixed version on your disk? If so I'd appreciate if you could
send me a patch.

 

- Chris

 

 

From: parsec-users-bounces at lists.cs.princeton.edu
[mailto:parsec-users-bounces at lists.cs.princeton.edu] On Behalf Of Kurtov,
Nikolay
Sent: Wednesday, June 18, 2008 6:24 AM
To: parsec-users at lists.cs.princeton.edu
Subject: [parsec-users] Blackscholes issues

 

Hello everyone,

 

Publishing such a benchmark as Blackscholes was a great job, unfortunately
blackscholes.c contains some issues.

I'd like to see them resolved.

 

1.	Not enough memory allocated for OptionType, there should be one more
byte for '\0'. 

(297)          data[loopnum].OptionType = new
char[strlen(temp->OptionType)];

 

2.	Wrong string comparison: 

(329)        otype[i]      = (data[i].OptionType == "P") ? 1 : 0;

 

3. optionData.txt contains about 1000 objects and value of numOptions is
overridden at the very beginning of the program:

      (54) int numOptions = 960;

(287) numOptions = atoi(argv[2]);

 

3.	Redundant calculations, at (198) xD2 is assigned a value that
doesn't depends on only on (196) and (197) 

(188)    xD1 = xRiskFreeRate + xPowerTerm;

(189)    xD2 = xRiskFreeRate - xPowerTerm;

(190)    xD1 = xD1 * xTime;

(191)    xD2 = xD2 * xTime;

        

(193)   xD1 = xD1 + xLogTerm;

(194)   xD2 = xD2 + xLogTerm;

 

(196)   xDen = xVolatility * xSqrtTime;

(197)   xD1 = xD1 / xDen;

 

(198)      xD2 = xD1 -  xDen;

 

4.	If fptype is float, calculation results for some Options can exceed
1e-5, but never exceeds 1e-4 

(246)            if( fabs(priceDelta) >= 1e-5 ){

 

5.	It always prints 8: 

(337)         printf("Size of data: %d\n", sizeof(data) + sizeof(otype));

 

6.	Some unreferenced variables declared on lines (78), (147), (224),
(286). 

 

 

Regards,

Nikolay Kurtov

 

 
--------------------------------------------------------------------
Closed Joint Stock Company Intel A/O
Registered legal address: Krylatsky Hills Business Park, 
17 Krylatskaya Str., Bldg 4, Moscow 121614, 
Russian Federation
 
This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
--------------------------------------------------------------------
Closed Joint Stock Company Intel A/O
Registered legal address: Krylatsky Hills Business Park, 
17 Krylatskaya Str., Bldg 4, Moscow 121614, 
Russian Federation
 
This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.





-- 
Regards,
Nikolay

mailto: nkurtov at gmail.com 




-- 
Regards,
Nikolay

mailto: nkurtov at gmail.com 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cs.princeton.edu/pipermail/parsec-users/attachments/20080630/74bc4bc0/attachment.htm>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: blackscholes_patch.txt
URL: <http://lists.cs.princeton.edu/pipermail/parsec-users/attachments/20080630/74bc4bc0/attachment.txt>


More information about the parsec-users mailing list