MathGroup Archive 2005

[Date Index] [Thread Index] [Author Index]

Search the Archive

NDSolve acceleration by forcing use of LAPACK functions

  • To: mathgroup at smc.vnet.net
  • Subject: [mg60481] NDSolve acceleration by forcing use of LAPACK functions
  • From: "James Irwin" <irwinj at gmail.com>
  • Date: Sat, 17 Sep 2005 02:32:15 -0400 (EDT)
  • Organization: http://groups.google.com
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,

I'm looking at two Mathematica notebooks.  The first is Michael Trott's
"Mathematics of Tsunamis"
(http://mathworld.wolfram.com/news/2005-01-14/tsunamis/)
http://mathworld.wolfram.com/news/2005-01-14/tsunamis/Tsunami.nb and
the second is the Mathematica 5.2 promoting
"Modeling, Simulating and Analyzing a Tsunami"
(http://library.wolfram.com/infocenter/Demos/5699/)  by
Robert Knapp et al (noted animations on Jeff Bryant's pages).

The Trott version has an NDSolve[] method options set up that invokes
LAPACK's dgetrf() function.  The Knapp version does not.  Why this is
important will now become more clear:

The LAPACK function dgetrf() performas an LU matrix factorisation which
is dominated by a matrix-matrix multiplication (i.e. Dot[] in
Mathematica, also called 'dgemm' in BLAS/LAPACK speak).  I work for
ClearSpeed in the UK and we have PCI-X co-processor cards that deliver
50GFLOPS of dgemm performance.  We wish to show the capability
improvement users will see running 'hard' computations.  Each of the
notebooks is easily scalable.  In fact, the Knapp example was designed
to demonstrate the impact of this scaling.  By increasing the
resolution of the computation, the wave propogation is smoother and
more faithful.  Until now, the cost of this more refined analysis has
been presented in minutes turning into hours of compute.

Using our card, I have measured a six-fold time-difference for the
LAPACK-function (given a large enough problem size) versus a 3.4GHz
Xeon.  Obviously, it would be more interesting to use the Knapp version
since it shows the wave propogation on a per-step basis and has a more
interesting sea-bottom.

I have thus far failed to comprehend the changes required to make the
method options in the Knapp version invoke the LAPACK functions.  I
would appreciate some helpful pointers.

Thanks in advance,




James Irwin
ClearSpeed Technology PLC


  • Prev by Date: Re: Complete solution to a modular System of equations
  • Next by Date: Re: Bug in Reduce?
  • Previous by thread: Re: calling a C executable from within Mathematica
  • Next by thread: Re: plots with variation of arbitrary constant