Page 1 of 1

build problems

PostPosted: Fri Nov 18, 2011 10:20 am
by miahw
Hello, I am trying to build Magma using icc and ifort, but keep getting this error:

nvcc --compiler-options -fno-strict-aliasing -DUNIX -O3 -DADD_ -arch sm_20 -DGPUSHMEM=200 -I/gpfs/grace/cuda-4.0.17/include -I../include -I../\
quark/include -I../control -c zauxiliary.cu -o zauxiliary.cu_o
../control/common_magma.h(107): error: identifier "cublasStatus_t" is undefined
../control/common_magma.h(108): error: identifier "cublasStatus_t" is undefined

cublasStatus_t is defined in cublas_api.h but common_magma.h does not include it. Is this correct? This sounds a bit trivial but I might be missing something :-)

Thanks in advance for your help,
Wadud.

Re: build problems

PostPosted: Tue Nov 22, 2011 1:23 pm
by Stan Tomov
Hello,
We include cublas.h where cublasStatus_t is defined as
Code: Select all
#define cublasStatus cublasStatus_t

We didn't see this problem on our systems. We will investigate it more and do the proper includes. Thanks for reporting it.
Stan

Re: build problems

PostPosted: Thu Nov 24, 2011 5:37 pm
by fletchjp
Stan

I think this is a question of the version of CUDA and CUDABLAS. I am using CUDA 3.2 and that shows the problem, cured by adding the definition of cubasStatus_t. I have not yet checked in version 4.0

I had already reported the problem in an earlier post.

I have not seen anything in your installation files about what version of CUDA you are recommending.

John

Re: build problems

PostPosted: Thu Nov 24, 2011 7:12 pm
by Stan Tomov
John,
Yes, it looks like this is a problem with the CUDA version. We always use the newest available (so this is 4.0 right now). I guess we would have to keep all versions on a system for testing and cover cases like this.
Stan

Re: build problems

PostPosted: Fri Nov 25, 2011 6:36 am
by fletchjp
Stan

Thank you. I can look to moving to CUDA 4.0 provided I can sort out installation for the version of Ubuntu I currently use (10.4).

It should be possible to detect the CUDA version and put in a define for cublasStatus_t where needed.

Cheers

John

Re: build problems

PostPosted: Fri Nov 25, 2011 1:13 pm
by Stan Tomov
John,
Thanks. I put it on our to do list for the next release.
Stan

Re: build problems

PostPosted: Tue Dec 20, 2011 7:26 pm
by fletchjp
Stan

I had this problem earlier when I was using CUDA 3.2. I have now moved to CUDA 4.0 and am surprised to find that I am getting the opposite problem that a lot of files use cudablasStatus which they say is underfined. I change this to use cudablasStatus_t and the error goes away. The files involved are:

{c,d,s,z}gehrd.cpp {c,d,s,z}gehrd2.cpp {c,z}hetrd.cpp {d,s}sytrd.cpp (all in src directory) and transpose.h in control directory.

I hope this helps.

John

Re: build problems

PostPosted: Tue Sep 04, 2012 9:45 am
by luiceur
Hi all,

If I am not mistaken, it should be:

Code: Select all
#define  cublasStatus_t  cublasStatus


And I had to add it with version 4.0, but not with 4.2

Re: build problems

PostPosted: Tue Sep 04, 2012 11:17 am
by mgates3
According to the CUBLAS_Library.pdf documentation, the correct type is cublasStatus_t.
The cublas.h header includes cublas_api.h, which typedefs cublasStatus_t. The cublas.h also has
#define cublasStatus cublasStatus_t
to replace old occurrences of cublasStatus with the correct cublasStatus_t type. This appears to be true for CUDA 4.0, 4.1, 4.2, and 5.0.

-mark