[petsc-users] Matrix Market matrices in PETSc binary format - repository

Jed Brown jedbrown at mcs.anl.gov
Mon Aug 27 23:18:10 CDT 2012


On Mon, Aug 27, 2012 at 10:49 PM, Pierre-Yves Aquilanti <sperif at gmail.com>wrote:

> The problem is that when in parallel, it is quite tricky to use a matrix
> in Matrix Market format as an input. And if I'm not mistaking, it is needed
> to convert the matrix from MM to PETSc binary format, which can take a lot
> time in some cases (I am converting dielFilterV3clx, it has been running
> for 162h and still not finished).


Right here, you don't preallocate:

https://github.com/Perif/MatrixMarketToPETSc/blob/master/libs.c#L29

Preallocate (e.g. by making two passes over the input file) and it will
take seconds to convert that file.

You can write a very simple converter using scipy.io.mmread() and
bin/pythonscripts/PetscBinaryIO.py.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20120827/4c4c5405/attachment.html>


More information about the petsc-users mailing list