QuantLibXL, Office 2007, dual core machines...

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

QuantLibXL, Office 2007, dual core machines...

Toyin Akin
Hi,

I've been reading up on some of QuantLibXL docs and came across a potential
issue with the way QuantLib is designed when run on Excel 2007 with
dual/quad core machines.

I found the following snippet on the web...

#######################################################
To a large number of customers, Excel’s calculation speed is extremely
important – perhaps the most important “feature” we ship.  When planning
Excel 12, we started a small investigation to look at different ways we
could make Excel calculate faster on computers that had multi-processor or
dual-core chips.  The investigation turned out to be promising, so we
continued the work, and the result is a very exciting feature that we refer
to as multi-threaded calculation, or MTC.  (Note – this is another working
name, not a final name.  Also note that our developers refer to this as MTR,
or multi-threaded recalculation, but since most customers use the word
calculation, I have decided to go that route for this post.)

In a nutshell, this feature enables Excel to spot formulas that can be
calculated concurrently, and then run those formulas on multiple processors
simultaneously.  The net effect is that a given spreadsheet finishes
calculating in less time, improving Excel’s overall calculation performance.
  Excel 12 can take advantage of as many processors (or cores, which to
Excel appear as processors) as there are on a machine - when Excel loads a
workbook, it asks the operating system how many processors are available,
and it creates a thread for each processor.  In general, the more
processors, the better the performance improvement.
#######################################################

This tells me that due to the way that evaluationDate() is handled in
QuantLib, it *MAY* be possible to mis-price deals because one thread may set
the value of the evaluation date while another then uses the changed value.
Within Excel 2003, this is not possible.

I haven't tested this, but maybe one has to be carefull how evalDate() is
used on spreadsheets (one centralised location and not scattered across
spreadsheets). This may restrict how some spreadsheets are designed.

Can someone look into this? Is this really an issue?

More info on this can be gleamed here...

http://blogs.msdn.com/officerocker/archive/2006/08/17/704242.aspx

or google for "excel 2007 multithreaded dual core"

Toy out...

_________________________________________________________________
Got a favourite clothes shop, bar or restaurant? Share your local knowledge  
http://www.backofmyhand.com



-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: QuantLibXL, Office 2007, dual core machines...

eric ehlers
Hi Toyin,

On 7/25/07, Toyin Akin <[hidden email]> wrote:
> Hi,
>
> I've been reading up on some of QuantLibXL docs and came across a potential
> issue with the way QuantLib is designed when run on Excel 2007 with
> dual/quad core machines.

When an XLL registers a function with Excel, the XLL may pass an
additional new parameter recognized by Excel 2007 to indicate that the
function is thread safe.  Excel 2007 invokes an XLL's functions in
parallel only if they have been registered as thread safe.

In other words, we can take our existing code as-is and run it under
Excel 2007 and it should behave exactly as it did under earlier
versions of Excel, with all calculations running in a single thread.

Of course longer term we would like to take advantage of
multithreading, and as you mention we would need to take account of
QuantLib's processing of the evaluation date.  One simple approach
would be to implement a startup routine which explicilty sets the
evaluation date in each thread to be used by the XLL.

Regards,
Eric

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: QuantLibXL, Office 2007, dual core machines...

Toyin Akin

Hey Eric,

That's pretty cool.

Thanks for the update. I've just obtained a couple of new dual core servers
to test stuff on...

Toy out.

>From: "eric ehlers" <[hidden email]>
>To: "Toyin Akin" <[hidden email]>
>CC: [hidden email],[hidden email]
>Subject: Re: [Quantlib-users] QuantLibXL, Office 2007, dual core
>machines...
>Date: Mon, 30 Jul 2007 11:10:53 +0200
>
>Hi Toyin,
>
>On 7/25/07, Toyin Akin <[hidden email]> wrote:
> > Hi,
> >
> > I've been reading up on some of QuantLibXL docs and came across a
>potential
> > issue with the way QuantLib is designed when run on Excel 2007 with
> > dual/quad core machines.
>
>When an XLL registers a function with Excel, the XLL may pass an
>additional new parameter recognized by Excel 2007 to indicate that the
>function is thread safe.  Excel 2007 invokes an XLL's functions in
>parallel only if they have been registered as thread safe.
>
>In other words, we can take our existing code as-is and run it under
>Excel 2007 and it should behave exactly as it did under earlier
>versions of Excel, with all calculations running in a single thread.
>
>Of course longer term we would like to take advantage of
>multithreading, and as you mention we would need to take account of
>QuantLib's processing of the evaluation date.  One simple approach
>would be to implement a startup routine which explicilty sets the
>evaluation date in each thread to be used by the XLL.
>
>Regards,
>Eric
>
>-------------------------------------------------------------------------
>This SF.net email is sponsored by: Splunk Inc.
>Still grepping through log files to find problems?  Stop.
>Now Search log events and configuration files using AJAX and a browser.
>Download your FREE copy of Splunk now >>  http://get.splunk.com/
>_______________________________________________
>QuantLib-users mailing list
>[hidden email]
>https://lists.sourceforge.net/lists/listinfo/quantlib-users

_________________________________________________________________
The next generation of Hotmail is here!  http://www.newhotmail.co.uk


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users