<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#ffffff" text="#000000">
    Yujie,<br>
    <br>
    I'm developing GPU code for PETSc that will, at some point, support
    complex numbers. However, I cannot give you a time frame as to when
    that will be complete as I have several other tasks that are higher
    priority right now.<br>
    <br>
    -Paul<br>
    <blockquote
cite="mid:CAA==Fcs7RECxLMLfkTi30hEvTzvKHypZ07rsWLW=GMvH+OGoPg@mail.gmail.com"
      type="cite">Dear Barry,<br>
      <br>
      For complex number-based implementation, will the functions in
      Vec, Mat, KSP, and PC having been realized for real number work at
      least at the running level?<br>
      Do I need to do more coding for them?<br>
      <br>
      To my knowledge, Victor Minden finished most of the coding work
      for GPU implementation in PETSc with your and Matt's help.<br>
      However, it seems there is not people to further realize and
      optimize other GPU functions in PETSc.<br>
      Do you think GPU-based computation is not important or has low
      efficiency compared to current CPU-based implementation in PETSc?<br>
      <br>
      <br>
      Thank you very much,<br>
      Yujie<br>
      &nbsp;<br>
      <br>
      <div class="gmail_quote">On Mon, Jan 23, 2012 at 3:46 PM, Barry
        Smith <span dir="ltr">&lt;<a moz-do-not-send="true"
            href="mailto:bsmith@mcs.anl.gov">bsmith@mcs.anl.gov</a>&gt;</span>
        wrote:<br>
        <blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
          0.8ex; border-left: 1px solid rgb(204, 204, 204);
          padding-left: 1ex;"><br>
          &nbsp; Yujie,<br>
          <br>
          &nbsp; &nbsp;As I said we have never tried it. You are welcome to try it
          following the directions I gave. You must realize that we do
          not have an army of people to support GPUs so you are largely
          on your on in terms of getting things done and need to use
          your initiative in trying things yourself and working through
          the problems that may arise.<br>
          <span class="HOEnZb"><font color="#888888"><br>
              &nbsp; Barry<br>
            </font></span>
          <div class="HOEnZb">
            <div class="h5"><br>
              On Jan 23, 2012, at 3:36 PM, recrusader wrote:<br>
              <br>
              &gt; Dear Paul,<br>
              &gt;<br>
              &gt; Please find the changelog in the following link for
              CUSP 0.2.0<br>
              &gt; <a moz-do-not-send="true"
                href="http://code.google.com/p/cusp-library/source/browse/CHANGELOG"
                target="_blank">http://code.google.com/p/cusp-library/source/browse/CHANGELOG</a><br>
              &gt;<br>
              &gt; They has added cusp:complex class to support complex
              number-based operation.<br>
              &gt;<br>
              &gt; does it not work for PETSc?<br>
              &gt;<br>
              &gt; Thanks a lot,<br>
              &gt; Yujie<br>
              &gt;<br>
              &gt;<br>
              &gt; On Mon, Jan 23, 2012 at 3:28 PM, Paul Mullowney &lt;<a
                moz-do-not-send="true" href="mailto:paulm@txcorp.com">paulm@txcorp.com</a>&gt;
              wrote:<br>
              &gt; I would claim that Petsc does not support GPU
              capabilities for complex numbers right now.<br>
              &gt;<br>
              &gt; The CUSP library is templated over the scalar type
              (i.e. float or double), however I don't think it supports
              complex numbers. Although, I could be wrong on this.<br>
              &gt;<br>
              &gt; It could be somewhat straightforward to move from
              CUSP to CUSPARSE (yes, these are different Nvidia
              libraries). I believe CUSPARSE supports SpMV for complex
              types. It also supports triangular solve for complex
              types.<br>
              &gt;<br>
              &gt; -Paul<br>
              &gt;<br>
              &gt;<br>
              &gt; &nbsp; &nbsp; This is an installation issue, please send all
              installation issues to <a moz-do-not-send="true"
                href="mailto:petsc-maint@mcs.anl.gov">petsc-maint@mcs.anl.gov</a>
              with the entire configure.log<br>
              &gt;<br>
              &gt;<br>
              &gt;<br>
              &gt;<br>
              &gt; &nbsp; &nbsp;You can try editing config/PETSc/packages/cuda.py
              and removing the two lines<br>
              &gt;<br>
              &gt; &nbsp; &nbsp; if self.scalartypes.scalartype == 'complex':<br>
              &gt; &nbsp; &nbsp; &nbsp; raise RuntimeError('Must use real numbers with
              CUDA')<br>
              &gt;<br>
              &gt; &nbsp; &nbsp;As it says we have never tested for complex so I
              do not know how far it is from working.<br>
              &gt;<br>
              &gt; &nbsp; &nbsp; Barry<br>
              &gt;<br>
              &gt; On Jan 23, 2012, at 1:24 PM, recrusader wrote:<br>
              &gt;<br>
              &gt; Dear PETSc Developers,<br>
              &gt;<br>
              &gt; I am compiling PETSc-dev using GPU in complex number
              mode.<br>
              &gt; However, when I configure PETSc-dev, I get the
              following errors<br>
              &gt; "<br>
              &gt;
*******************************************************************************<br>
              &gt; &nbsp; &nbsp; &nbsp; &nbsp; UNABLE to CONFIGURE with GIVEN OPTIONS &nbsp;
              &nbsp;(see configure.log<br>
              &gt; for details):<br>
              &gt;
-------------------------------------------------------------------------------<br>
              &gt; Cannot use cuda with complex numbers it is not coded
              for this capability<br>
              &gt;
*******************************************************************************<br>
              &gt; "<br>
              &gt; I have checked CUSP. The latest version can support
              complex number.<br>
              &gt; What should I do for CUDA?<br>
              &gt; Thank you very much.<br>
              &gt;<br>
              &gt; Best,<br>
              &gt; Yujie<br>
              &gt;<br>
              &gt;<br>
              <br>
            </div>
          </div>
        </blockquote>
      </div>
      <br>
    </blockquote>
    <br>
  </body>
</html>