<div dir="ltr">On Wed, Aug 14, 2013 at 12:17 PM, Harshad Sahasrabudhe <span dir="ltr"><<a href="mailto:hsahasra@purdue.edu" target="_blank">hsahasra@purdue.edu</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Thanks Barry.<br>
<br>
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?<br></blockquote><div><br>
</div><div>That is a horrible way to organize a build. Just ignore what they are doing with flags and use the PETSc flags. Take</div><div>a look at Chaco.py for a simple install.</div><div><br></div><div>   Matt</div><div>
 </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Harshad<br>
<br>
----- Original Message -----<br>
From: "Barry Smith" <<a href="mailto:bsmith@mcs.anl.gov">bsmith@mcs.anl.gov</a>><br>
To: "Harshad Sahasrabudhe" <<a href="mailto:hsahasra@purdue.edu">hsahasra@purdue.edu</a>><br>
Cc: "Jed Brown" <<a href="mailto:jedbrown@mcs.anl.gov">jedbrown@mcs.anl.gov</a>>, <a href="mailto:petsc-users@mcs.anl.gov">petsc-users@mcs.anl.gov</a><br>
Sent: Monday, August 12, 2013 5:25:53 PM<br>
Subject: Re: [petsc-users] Extracting data from a Petsc matrix<br>
<br>
<br>
On Aug 12, 2013, at 4:05 PM, Harshad Sahasrabudhe <<a href="mailto:hsahasra@purdue.edu">hsahasra@purdue.edu</a>> wrote:<br>
<br>
> Hi Jed,<br>
><br>
> I am now working to add library support for LU decomposition using MAGMA. I need your help with the following:<br>
><br>
> 1) How do I add the options --download-magma, --with-magma, etc. to the configure script for building with MAGMA?<br>
<br>
   Add a new file in config/PETSc/packages  (copy one that is already there and modify for magma).<br>
><br>
> 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?<br>

<br>
    Add the new directory name to list of directories in the makefile in that directory and add in MatRegisterAll().<br>
<br>
   Barry<br>
<br>
><br>
> Thanks,<br>
> Harshad<br>
><br>
> ----- Original Message -----<br>
> From: "Jed Brown" <<a href="mailto:jedbrown@mcs.anl.gov">jedbrown@mcs.anl.gov</a>><br>
> To: <a href="mailto:hsahasra@purdue.edu">hsahasra@purdue.edu</a>, <a href="mailto:petsc-users@mcs.anl.gov">petsc-users@mcs.anl.gov</a><br>
> Sent: Saturday, July 13, 2013 12:43:08 PM<br>
> Subject: Re: [petsc-users] Extracting data from a Petsc matrix<br>
><br>
> "<a href="mailto:hsahasra@purdue.edu">hsahasra@purdue.edu</a>" <<a href="mailto:hsahasra@purdue.edu">hsahasra@purdue.edu</a>> writes:<br>
><br>
>> Hi,<br>
>><br>
>> I am working on solving a system of linear equations with square<br>
>> matrix. I'm first factoring the matrix using LU decomposition.<br>
><br>
> I assume you're solving a dense problem because that is all MAGMA does.<br>
><br>
>> I want to do the LU decomposition step using MAGMA on GPUs. MAGMA<br>
>> library implements LAPACK functions on a CPU+GPU based system.<br>
>><br>
>> So my question is, how do I extract the data from a Petsc Mat so that<br>
>> it can be sent to the dgetrf routine in MAGMA.<br>
><br>
> MatDenseGetArray<br>
><br>
>> Is there any need for duplicating the data for this step?<br>
><br>
> You're on your own for storage of factors.  Alternatively, you could add<br>
> library support so that you could use PCLU and<br>
> '-pc_factor_mat_solver_package magma' (or PCFactorSetMatSolverPackage).<br>
> Doing this is not a priority for us, but we can provide guidance if you<br>
> want to tackle it.<br>
<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>
-- Norbert Wiener
</div></div>