[petsc-users] CUDA with complex number

Randall Mackie rlmackie862 at gmail.com
Mon Jan 23 15:49:36 CST 2012


I looked into this last year and this was the response from the PETSc group and I don't know
if this has changed:


=============================>>

     Looks like it is not so trivial as I had made it out to be. Perhaps if you ask on petsc-dev at mcs.anl.gov there may be people who want this also and are willing to share the work?

  Barry

On May 23, 2011, at 6:06 PM, Victor Minden wrote:

> Barry,
> 
> Currently there should be two things going on--one is that some of the
> CUBLAS routines used for basic vector operations (which we've been moving
> away from) have 4 different forms depending on single/double and
> real/complex--currently those that we still use are hard-coded as real and
> #ifdeffed to be single/double, and I haven't looked in depth but I think
> those are the errors that Randy sent.
> 
> Those should be pretty quick to change, but they won't make complex work,
> because once you get past veccusp.cu there are a bunch more errors in the
> cusp matrix routines which work with complex if you use the relatively new
> (Oct?  Dec?) cusp complex type that they've added to the cusp library.  So,
> we need to make the GPU routines work with the standard complex type or we
> need to convert all the GPU code to use the cusp type.  I don't know how
> much work this is.
> 
> As it stands, I'm just starting my internship this week so I probably won't
> be able to look at this in-depth until the weekend, just FYI.
> 
> Cheers,
> 
> Victor
> ---


<<===============================================

On Jan 23, 2012, at 1:36 PM, recrusader wrote:

> Dear Paul,
> 
> Please find the changelog in the following link for CUSP 0.2.0
> http://code.google.com/p/cusp-library/source/browse/CHANGELOG
> 
> They has added cusp:complex class to support complex number-based operation.
> 
> does it not work for PETSc?
> 
> Thanks a lot,
> Yujie
> 
> 
> On Mon, Jan 23, 2012 at 3:28 PM, Paul Mullowney <paulm at txcorp.com> wrote:
> I would claim that Petsc does not support GPU capabilities for complex numbers right now.
> 
> 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.
> 
> 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.
> 
> -Paul
> 
> 
>     This is an installation issue, please send all installation issues to petsc-maint at mcs.anl.gov with the entire configure.log
> 
> 
> 
> 
>    You can try editing config/PETSc/packages/cuda.py and removing the two lines
> 
>     if self.scalartypes.scalartype == 'complex':
>       raise RuntimeError('Must use real numbers with CUDA')
> 
>    As it says we have never tested for complex so I do not know how far it is from working.
> 
>     Barry
> 
> On Jan 23, 2012, at 1:24 PM, recrusader wrote:
> 
> Dear PETSc Developers,
> 
> I am compiling PETSc-dev using GPU in complex number mode.
> However, when I configure PETSc-dev, I get the following errors
> "
> *******************************************************************************
>         UNABLE to CONFIGURE with GIVEN OPTIONS    (see configure.log
> for details):
> -------------------------------------------------------------------------------
> Cannot use cuda with complex numbers it is not coded for this capability
> *******************************************************************************
> "
> I have checked CUSP. The latest version can support complex number.
> What should I do for CUDA?
> Thank you very much.
> 
> Best,
> Yujie
> 
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20120123/2783a971/attachment-0001.htm>


More information about the petsc-users mailing list