[petsc-users] Extracting data from a Petsc matrix

Harshad Sahasrabudhe hsahasra at purdue.edu
Tue Jul 16 13:13:08 CDT 2013


Hi Jed,

Thanks for your reply.

> 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.

I would definitely like to start working on adding library support. I 
think this is the most efficient way to go about it. Can you give me 
certain details such as:

1) How should I start going about it?
2) How will I check-in the changes to Petsc?
3) What version of Petsc will the changes be reflected in if I started 
working on it right now?
4) How many hours does it generally take to get this done?
5) How is the peer review done?

Thanks,
Harshad

On 07/13/2013 12:43 PM, Jed Brown wrote:
> "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.



More information about the petsc-users mailing list