[petsc-users] Extracting data from a Petsc matrix
Harshad Sahasrabudhe
hsahasra at purdue.edu
Tue Jul 16 14:18:08 CDT 2013
Hi Barry,
I'm confused, can you please explain what you meant by 'MAGMA has a
calling sequence like LAPACK'?
Thanks,
Harshad
On 07/16/2013 02:48 PM, Barry Smith wrote:
> Read all of http://www.mcs.anl.gov/petsc/developers/index.html
>
> Note that if Magma has a calling sequence like lapack you could possible steal chunks of code from the routines I pointed you to yesterday and modify them as needed so you don't need to reinvent the wheel.
>
>
> Barry
>
> On Jul 16, 2013, at 1:37 PM, Matthew Knepley <knepley at gmail.com> wrote:
>
>> On Tue, Jul 16, 2013 at 1:13 PM, Harshad Sahasrabudhe <hsahasra at purdue.edu> wrote:
>> 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?
>>
>> Read the UMFPACK implementation
>>
>> 2) How will I check-in the changes to Petsc?
>>
>> Using Git
>>
>> 3) What version of Petsc will the changes be reflected in if I started working on it right now?
>>
>> A branch of 'master'
>>
>> 4) How many hours does it generally take to get this done?
>>
>> How many licks does it take to get to the center of a Tootsie Roll Pop?
>>
>> 5) How is the peer review done?
>>
>> Through a pull request on BitBucket.
>>
>> Thanks,
>>
>> Matt
>>
>> 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.
>>
>>
>>
>>
>> --
>> What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.
>> -- Norbert Wiener
More information about the petsc-users
mailing list