[petsc-users] Extracting data from a Petsc matrix
Matthew Knepley
knepley at gmail.com
Wed Aug 14 14:18:30 CDT 2013
On Wed, Aug 14, 2013 at 2:14 PM, Harshad Sahasrabudhe
<hsahasra at purdue.edu>wrote:
> Oh I get what you are trying to say. Please correct me if I'm wrong. I
> don't need to use the make.inc prototypes defined in MAGMA, PETSc build
> system gets all the required options.
>
Yes. If it misses any, they can be added in the CFLAGS line in the
Install() function.
Matt
> ----- Original Message -----
> From: "Harshad Sahasrabudhe" <hsahasra at purdue.edu>
> To: "Matthew Knepley" <knepley at gmail.com>
> Cc: "Barry Smith" <bsmith at mcs.anl.gov>, petsc-users at mcs.anl.gov
> Sent: Wednesday, August 14, 2013 2:26:37 PM
> Subject: Re: [petsc-users] Extracting data from a Petsc matrix
>
> Sorry, I was talking about the Python build system in PETSc. I didn't mean
> the build system used by Python.
>
> And thanks, Chaco.py does clear my doubts.
>
> Harshad
>
> ----- Original Message -----
> From: "Matthew Knepley" <knepley at gmail.com>
> To: "Harshad Sahasrabudhe" <hsahasra at purdue.edu>
> Cc: "Barry Smith" <bsmith at mcs.anl.gov>, petsc-users at mcs.anl.gov
> Sent: Wednesday, August 14, 2013 2:11:07 PM
> Subject: Re: [petsc-users] Extracting data from a Petsc matrix
>
>
> On Wed, Aug 14, 2013 at 12:17 PM, Harshad Sahasrabudhe <
> hsahasra at purdue.edu > wrote:
>
>
>
>
> 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?
>
>
>
> That is a horrible way to organize a build. Just ignore what they are
> doing with flags and use the PETSc flags. Take
> a look at Chaco.py for a simple install.
>
>
> Matt
>
>
> 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.
>
>
>
>
>
> --
> 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
>
--
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20130814/8ed16b73/attachment.html>
More information about the petsc-users
mailing list