Matrix powers is a basis spanning the Krylov subspace. {x, Ax, A^2x, ..., A^kx}
For more information on ctree see ctree on github
- ctree (http://github.com/ucb-sejits/ctree>)
- numpy and scipy (http://www.scipy.org/)
- PaToH (http://bmi.osu.edu/~umit/software.html#patoh)
- Intel MKL (https://software.intel.com/en-us/non-commercial-software-development)
matrix = scipy.io.mmio.mmread("mymatrix.mtx").tocsr()
k = 2
sym = False
akxobj = akx.tune(matrix, k, sym)
m = 4
vecs = numpy.ones((m, matrix.shape[0]))
akxobj.powers(vecs)
f = open("Vecs", "w") print >>f, "Krylov vectors:" print >>f, "".join("x_%d\t" % n for n in xrange(m + 1)) for element in vecs.transpose(): print >>f, "".join("%.3g\t" % n for n in element)
Benchmark
=============
The performance of the specializer was benckmarked using conjugate gradient as an example
The following were run on a 4 core, 8 thread Intel processor running Ubuntu 12.04
A symmetric, positive definite matrix with 259,789 rows/columns and 4,242,673 entries was used in the benckmark (http://www.cise.ufl.edu/research/sparse/matrices/Um/offshore.html)
| Tool | Calculation Time (s)|
|:-----------:|--------------------:|
| Specializer | 13.68 |
| Scipy | 14.35 |