clMAGMA problems with CUDA

Open discussion for MAGMA

clMAGMA problems with CUDA

Postby fletchjp » Mon May 07, 2012 11:12 am

I am attempting to compile clMAGMA to work with CUDA. I get compile error messages when compiling control/auxilliary.cpp like this:

Code: Select all
g++ -O3 -DADD_ -DGPUSHMEM=200 -I/usr/local/cuda/include -I../include -c auxiliary.cpp -o auxiliary.o
In file included from common_magma.h:42,
                 from auxiliary.cpp:9:
operators.h: In function \u2018magmaDoubleComplex operator-(const magmaDoubleComplex&)\u2019:
operators.h:27: error: \u2018const struct std::complex<double>\u2019 has no member named \u2018x\u2019
operators.h:27: error: \u2018const struct std::complex<double>\u2019 has no member named \u2018y\u2019
operators.h: In function \u2018magmaDoubleComplex operator+(magmaDoubleComplex, magmaDoubleComplex)\u2019:


Digging into this I have found the following in control/operators.h:

Code: Select all
// todo define these correctly for CUDA
#define __host__
#define __device__
#define __inline__ inline


It looks as though configuration and testing for CUDA is incomplete.

Would you please confirm this? Thank you.

John
fletchjp
 
Posts: 170
Joined: Mon Dec 27, 2010 7:29 pm

Re: clMAGMA problems with CUDA

Postby mgates3 » Tue May 15, 2012 2:18 pm

clMAGMA 0.1 is for OpenCL. The regular MAGMA release is for CUDA (i.e., MAGMA 1.1). The #defines you see in clMAGMA are essentially to make existing CUDA code compile with OpenCL.

-mark
mgates3
 
Posts: 401
Joined: Fri Jan 06, 2012 2:13 pm

Re: clMAGMA problems with CUDA

Postby fletchjp » Tue May 15, 2012 3:33 pm

Mark

I want to use this with the CUDA version of OpenCL. I think that is not yet complete.

John
fletchjp
 
Posts: 170
Joined: Mon Dec 27, 2010 7:29 pm

Re: clMAGMA problems with CUDA

Postby mgates3 » Tue May 15, 2012 6:58 pm

I don't understand what you mean by "the CUDA version of OpenCL". CUDA and OpenCL are two different languages to program GPUs. Do you mean the NVIDIA version of OpenCL? If so, then it would be using OpenCL, not CUDA, on an NVIDIA card. NVIDIA does not release BLAS for OpenCL. If you want to use CUBLAS, then you must use CUDA, not OpenCL. It may be possible to use AmdClBlas on non-AMD cards, but we haven't explored this.

In any case, the current clMAGMA release is targeted only at AMD cards using AmdClBlas.

-mark
mgates3
 
Posts: 401
Joined: Fri Jan 06, 2012 2:13 pm

Re: clMAGMA problems with CUDA

Postby fletchjp » Wed May 16, 2012 4:57 am

Sorry for not being clear. I have been using the OpenCL which comes from NVIDIA with CUDA. I use it with some software called epgpu ( see http://www.cs.uaf.edu/sw/EPGPU/ ) which enables easy building of kernels for OpenCL. I have combined it with the CUDA version of MAGMA.

My aim was to combine it instead with the MAGMA based on OpenCL, to see how it would go.

I see that clMAGMA doesn't yet have that possibility for NVIDIA hardware.

John
fletchjp
 
Posts: 170
Joined: Mon Dec 27, 2010 7:29 pm


Return to User discussion

Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest