[petsc-users] Extracting data from a Petsc matrix
Harshad Sahasrabudhe
hsahasra at purdue.edu
Wed Aug 14 12:17:39 CDT 2013
Thanks Barry.
How do we get the compiler names from the Python build system? For example, MAGMA make.inc varies depending on whether the compiler is gcc or icc. So is there any easy way to get this information?
Harshad
----- Original Message -----
From: "Barry Smith" <bsmith at mcs.anl.gov>
To: "Harshad Sahasrabudhe" <hsahasra at purdue.edu>
Cc: "Jed Brown" <jedbrown at mcs.anl.gov>, petsc-users at mcs.anl.gov
Sent: Monday, August 12, 2013 5:25:53 PM
Subject: Re: [petsc-users] Extracting data from a Petsc matrix
On Aug 12, 2013, at 4:05 PM, Harshad Sahasrabudhe <hsahasra at purdue.edu> wrote:
> Hi Jed,
>
> I am now working to add library support for LU decomposition using MAGMA. I need your help with the following:
>
> 1) How do I add the options --download-magma, --with-magma, etc. to the configure script for building with MAGMA?
Add a new file in config/PETSc/packages (copy one that is already there and modify for magma).
>
> 2) I have a fair idea how the PETSc code is structured and how to add source code to the impls/ directory. How does PETSc get to know that there is an additional implementation (in this case MAGMA) in this directory? Is there a config file of some sort?
Add the new directory name to list of directories in the makefile in that directory and add in MatRegisterAll().
Barry
>
> Thanks,
> Harshad
>
> ----- Original Message -----
> From: "Jed Brown" <jedbrown at mcs.anl.gov>
> To: hsahasra at purdue.edu, petsc-users at mcs.anl.gov
> Sent: Saturday, July 13, 2013 12:43:08 PM
> Subject: Re: [petsc-users] Extracting data from a Petsc matrix
>
> "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