| Register | FAQ | Calendar | Search | Today's Posts | Mark Forums Read |
|
#21
| |||
| |||
| Gib Bogle <bogle@ihug.too.much.spam.co.nz> wrote: > The reason I did this > quick test is that I have a student who is solving a nonlinear system of > PDEs Why on earth do you then benchmark with a matrix-matrix multiplly? Operations on PDEs (which I assume are all sparse matrices) can not be more unlike a mmm. You should have benchmarked the sparse matrix vector product, and you would actually see that matlab was much slower since its sparse data format is really inefficient. Victor. -- Victor Eijkhout -- eijkhout at tacc utexas edu |
|
#22
| |||
| |||
| On Aug 12, 2:46*pm, s...@sig.for.address (Victor Eijkhout) wrote: > Gib Bogle <bo...@ihug.too.much.spam.co.nz> wrote: > > The reason I did this > > quick test is that I have a student who is solving a nonlinear system of > > PDEs > > Why on earth do you then benchmark with a matrix-matrix multiplly? > Operations on PDEs (which I assume are all sparse matrices) can not be > more unlike a mmm. You should have benchmarked the sparse matrix vector > product, and you would actually see that matlab was much slower since > its sparse data format is really inefficient. > > Victor. > -- > Victor Eijkhout -- eijkhout at tacc utexas edu Imagine my surprise in seeing your name on this newsgroup. But then knowing your profession, it makes sense. Chris Brown |
|
#23
| |||
| |||
| On 7 Aug, 14:35, none <n...@none.net> wrote: > On Thu, 07 Aug 2008 07:11:30 -0700, rusi_pathan wrote: > > On Aug 7, 3:43 am, Gib Bogle <bo...@ihug.too.much.spam.co.nz> wrote: > >> Fly Away wrote: > >> > Last time I played with Matlab (about a year ago), it already had an > >> > option to use multithreading (SMP). It was not enabled by default > >> > though. Could it be that in your case Matlab had this option enabled? > >> > That would explain such a dramatic difference. > >> > Also, I would recommend Goto BLAS or ATLAS as a free alternative to > >> > INTEL MKL. > > >> I checked, that timing is with no multithreading. *It goes faster when > >> more than one CPU is used, although 4 is slightly slower than 3 - a > >> common result on the quad core, I've observed. *Memory bus congestion > >> and/or cache contention is the cause, apparently. > > Are you using an Intel machine? Seems like Matlab (7.01 and above) > > also use the MKL underneath: > > >http://www.mathworks.com/support/sol....html?solution... > > > "In MATLAB 7.0.1 (R14SP1) on computers that use Intel processors, the > > default BLAS library is the Math Kernel Library (MKL) BLAS provided by > > Intel." > > > That may explain why matmul was slower? With Fortran it is always a > > good idea to use the vendor supplied/tuned blas/lapack (MKL for Intel, > > ACML for AMD, Sunperf for Sun and so on). The implementations of > > matmul may not always be highly optimized though there is little > > excuse for not doing it. > > > Moreover using blas in MKL is also very simple, specially with the > > Fortran 95 wrappers that come along with it. For example > > "C=matmul(A,B)" is easily replaced by "call gemm(A,B,C)" > > Sadly the MKL is sold separately, rather than bundled into Intel's > Fortran. There was a time when it was a free download, but that was many > years ago. We just have to accept that Intel wish to hobble their compiler > to sell us additional products.- Hide quoted text - > > - Show quoted text - Actually, MKL IS bundled with Intel's Fortran Compiler, and C++ Compiler, and Fortran/C++ Compiler Suite, and Cluster Toolkit. As well as available standalone, including free for non-commericial use. |
![]() |
| Thread Tools | |
| Display Modes | |
In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.