[petsc-users] Extracting data from a Petsc matrix

Jed Brown jedbrown at mcs.anl.gov
Sat Jul 13 11:43:08 CDT 2013


"hsahasra at purdue.edu" <hsahasra at purdue.edu> writes:

> Hi,
>
> I am working on solving a system of linear equations with square
> matrix. I'm first factoring the matrix using LU decomposition.

I assume you're solving a dense problem because that is all MAGMA does.

> I want to do the LU decomposition step using MAGMA on GPUs. MAGMA
> library implements LAPACK functions on a CPU+GPU based system.
>
> So my question is, how do I extract the data from a Petsc Mat so that
> it can be sent to the dgetrf routine in MAGMA.

MatDenseGetArray

> Is there any need for duplicating the data for this step?

You're on your own for storage of factors.  Alternatively, you could add
library support so that you could use PCLU and
'-pc_factor_mat_solver_package magma' (or PCFactorSetMatSolverPackage).
Doing this is not a priority for us, but we can provide guidance if you
want to tackle it.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20130713/17574623/attachment.pgp>


More information about the petsc-users mailing list