<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Hi,<br>
      <br>
      Yes, MAGMA's API is not exactly the same. There are a few
      additional arguments in the functions related to number of GPU
      etc. So it cannot be directly linked instead of LAPACK.<br>
      <br>
      Hacking SLEPc/PETSc code seems to be the easier way to go. But I
      can't find the exact place where the LAPACK functions are called.<br>
      <br>
      Thanks,<br>
      Harshad<br>
      <br>
      On 06/20/2013 04:49 PM, Teranishi, Keita wrote:<br>
    </div>
    <blockquote cite="mid:CDE8B83C.2D9F8%25knteran@sandia.gov"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=ISO-8859-1">
      <div>
        <div>
          <div>Hi,</div>
          <div><br>
          </div>
          <div>As far as I know, Magma's API us not exactly the same as
            the original LAPACK.  You may need to hack either Magma's
            Fortran API or internal SLEPC/PETSc source.</div>
          <div><br>
          </div>
          <div>Thanks,</div>
          <div>
            <div>
              <div>---------------------------------------------</div>
              <div>Keita Teranishi</div>
            </div>
            <div>R&D Principal Staff Member </div>
            <div>Sandia National Laboratories</div>
            <div>Livermore, CA 94551</div>
          </div>
        </div>
      </div>
      <div><br>
      </div>
      <span id="OLK_SRC_BODY_SECTION">
        <div style="font-family:Calibri; font-size:11pt;
          text-align:left; color:black; BORDER-BOTTOM: medium none;
          BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT:
          0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid;
          BORDER-RIGHT: medium none; PADDING-TOP: 3pt">
          <span style="font-weight:bold">From: </span>Matthew Knepley
          <<a moz-do-not-send="true" href="mailto:knepley@gmail.com">knepley@gmail.com</a>><br>
          <span style="font-weight:bold">Date: </span>Thursday, June
          20, 2013 1:42 PM<br>
          <span style="font-weight:bold">To: </span>Harshad
          Sahasrabudhe <<a moz-do-not-send="true"
            href="mailto:hsahasra@purdue.edu">hsahasra@purdue.edu</a>><br>
          <span style="font-weight:bold">Cc: </span>"<a
            moz-do-not-send="true" href="mailto:petsc-users@mcs.anl.gov">petsc-users@mcs.anl.gov</a>"
          <<a moz-do-not-send="true"
            href="mailto:petsc-users@mcs.anl.gov">petsc-users@mcs.anl.gov</a>><br>
          <span style="font-weight:bold">Subject: </span>[EXTERNAL] Re:
          [petsc-users] Using MAGMA subroutines instead of LAPACK in
          SLEPc<br>
        </div>
        <div><br>
        </div>
        <div>
          <div>
            <div dir="ltr">On Thu, Jun 20, 2013 at 10:24 PM, Harshad
              Sahasrabudhe <span dir="ltr">
                <<a moz-do-not-send="true"
                  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">
                    Hi,<br>
                    <br>
                    I'm trying to run the SLEPc Eigensolver on a machine
                    with CPUs & GPUs. I found that a package called
                    MAGMA implements LAPACK functions on heterogeneous
                    systems (CPU + GPU). MAGMA has functions very
                    similar to LAPACK so that we can go and replace a
                    call to a LAPACK function with a call to a MAGMA
                    function.<br>
                    <br>
                    Now my question is, where can I apply such a hack
                    inside SLEPc/PETSc so that the Eigensolver in SLEPc
                    actually uses MAGMA functions instead of LAPACK
                    functions? I'm using the PETSc 3.3-p6 and SLEPc
                    3.3-p3 versions.<br>
                    <br>
                    Any help would be greatly appreciated!<br>
                  </blockquote>
                  <div><br>
                  </div>
                  <div style="">You need to do this in PETSc configure.
                    Use --with-f-blas-lapack-lib=[<MAGMA libs>].
                    We have never tried this, so I don't</div>
                  <div style="">know if they obey the entire interface.</div>
                  <div style=""><br>
                  </div>
                  <div style="">  Thanks</div>
                  <div> </div>
                  <blockquote class="gmail_quote" style="margin:0 0 0
                    .8ex;border-left:1px #ccc solid;padding-left:1ex">
                    Thanks and Regards,<br>
                    Harshad<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>
          </div>
        </div>
      </span>
    </blockquote>
    <br>
  </body>
</html>