MATLAB doesn’t support sparse matrices computing with high precision.
As a result, we have no other way but compare our performance with famous mathematical packages Maple and Mathematica, which do have support for sparse matrices with arbitrary precision elements.
Table below show timing comparisons of solving sparse linear systems of moderate size (min 1000x1000
) by Advanpix toolbox and Maple 17
using quadruple precision.
Matrix Name | Size | NNZ | Advanpix (sec) | Maple (sec) | Speed Gain (times) |
---|---|---|---|---|---|
nnc1374 | 1374 x 1374 | 8606 | 0.2009 | 20.858 | 103.8 |
orsreg_1 | 2205 x 2205 | 14133 | 1.4409 | 22.948 | 15.9 |
watt__1 | 1856 x 1856 | 11360 | 0.6724 | 649.308 | 965.7 |
watt__1 | 1856 x 1856 | 11360 | 0.6723 | 342.282 | 509.1 |
lns_3937 | 3937 x 3937 | 25407 | 1.3501 | 432.482 | 320.3 |
lnsp3937 | 3937 x 3937 | 25407 | 1.2554 | 433.324 | 345.2 |
sherman1 | 1000 x 1000 | 3750 | 0.0686 | 2.184 | 31.8 |
sherman2 | 1080 x 1080 | 23094 | 1.6683 | 231.724 | 138.9 |
sherman3 | 5005 x 5005 | 20033 | 2.0002 | 335.824 | 167.9 |
sherman4 | 1104 x 1104 | 3786 | 0.0583 | 1.778 | 30.5 |
sherman5 | 3312 x 3312 | 20793 | 0.8152 | 81.152 | 99.5 |
Our test environment:
Core i7-3960X Extreme Edition, 3900 MHz, 64GB, Windows 7 64-bit
.MATLAB R2013a, Multiprecision Computing Toolbox 3.5.5
.Maple 17 64-bit
.- Maple test script: sp_solver_test_maple.mw.
- Advanpix test script can be downloaded from the page: direct solvers for sparse matrices.
- Test matrices are taken from Matrix Market.
Note 1. Maple doesn’t have Sparse QR
nor LDLT
– so we tested only square asymmetric matrices (Sparse LU).
Note 2. At first we tried to solve all matrices from our test list. Unfortunately Maple 17
was unable to solve many of them (was running for hours without stop, consuming tons of memory): e20r0500, bcsstk13, bcsstk14, bcsstk15, bcsstk16, bcsstk17, bcsstk18, s1rmq4m1, s2rmq4m1, s3rmq4m1, s1rmt3m1, s2rmt3m1, s3rmt3m1, s3rmt3m3
, etc.
Note 3. As it turned out, comparison with Mathematica 9
is not that simple. Main reason is that it doesn’t allow choosing solver method when it deals with high precision matrices (parameter Method
of LinearSolve
works only for double
precision). Documentation is silent on the matter – and it is still unclear what methods it uses.
Some matrices Mathematica 9
solves very quickly, others make it choke for 1500
seconds or more. We decided to not publish the results in order to be fair.
{ 0 comments… add one now }