error: invalid conversion from ‘const magmaDoubleComplex**’

Open discussion for MAGMA library (Matrix Algebra on GPU and Multicore Architectures)
Post Reply
psims01
Posts: 9
Joined: Fri Nov 28, 2014 12:31 pm

error: invalid conversion from ‘const magmaDoubleComplex**’

Post by psims01 » Fri Nov 28, 2014 12:52 pm

I am trying to compile MAGMA with GCC and linking to MKL. I've gotten to the stage where I'm in /magma-1.6.0/testing and several of the test programs have compiled when I get the following error compiling testing_ztrsm_batched.cpp:

Code: Select all

gcc -fPIC -fopenmp  testing_zlacpy_batched.o -o testing_zlacpy_batched \
        libtest.a lin/liblapacktest.a -L../lib -lmagma \
        -L/usr/local/intel/composer_xe_2011_sp1.6.233/mkl/lib/intel64 -L/local/cuda/lib64 \
        -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -lpthread -lcublas -lcudart -lstdc++ -lm -L/export/data/ps550/CULA_RUN/lib64/ -liomp5 -lgfortran
g++ -fPIC -O3 -DADD_ -Wall -fno-strict-aliasing -fopenmp -DMAGMA_WITH_MKL -DMAGMA_SETAFFINITY -DHAVE_CUBLAS -DMIN_CUDA_ARCH=300 -DHAVE_CUBLAS -DMIN_CUDA_ARCH=300 -I/local/cuda/include -I/usr/local/intel/composer_xe_2011_sp1.6.233/mkl/include -I../include -I../control -I../sparse-iter/include -c testing_ztrsm_batched.cpp -o testing_ztrsm_batched.o
testing_ztrsm_batched.cpp: In function ‘int main(int, char**)’:
testing_ztrsm_batched.cpp:211: error: invalid conversion from ‘const magmaDoubleComplex**’ to ‘cuDoubleComplex**’
testing_ztrsm_batched.cpp:211: error:   initializing argument 9 of ‘cublasStatus_t cublasZtrsmBatched(cublasContext*, cublasSideMode_t, cublasFillMode_t, cublasOperation_t, cublasDiagType_t, int, int, cuDoubleComplex*, cuDoubleComplex**, int, cuDoubleComplex**, int, int)’
make[1]: *** [testing_ztrsm_batched.o] Error 1
make[1]: Leaving directory `/data/ps550/EoR/Applications/magma-1.6.0/testing'
make: *** [test] Error 2
I'm not sure how to get this to compile?

For reference, my make.inc file looks like:

Code: Select all

#//////////////////////////////////////////////////////////////////////////////
#   -- MAGMA (version 1.6.0) --
#      Univ. of Tennessee, Knoxville
#      Univ. of California, Berkeley
#      Univ. of Colorado, Denver
#      @date November 2014
#//////////////////////////////////////////////////////////////////////////////

# GPU_TARGET contains one or more of Tesla, Fermi, or Kepler,
# to specify for which GPUs you want to compile MAGMA:
#     Tesla  - NVIDIA compute capability 1.x cards
#     Fermi  - NVIDIA compute capability 2.x cards
#     Kepler - NVIDIA compute capability 3.x cards
# The default is all, "Tesla Fermi Kepler".
# See http://developer.nvidia.com/cuda-gpus
#
GPU_TARGET ?= Kepler

CC        = gcc
CXX       = g++
NVCC      = nvcc
FORT      = gfortran

ARCH      = ar
ARCHFLAGS = cr
RANLIB    = ranlib

CFLAGS    = -fPIC -O3 -DADD_ -Wall -fno-strict-aliasing -fopenmp -DMAGMA_WITH_MKL -DMAGMA_SETAFFINITY
FFLAGS    = -fPIC -O3 -DADD_ -Wall  
F90FLAGS  = -fPIC -O3 -DADD_ -Wall -x f95-cpp-input
NVCCFLAGS =       -O3 -DADD_ -Xcompiler "-fno-strict-aliasing -fPIC"
LDFLAGS   = -fPIC -fopenmp

# see MKL Link Advisor at http://software.intel.com/sites/products/mkl/
# gcc with MKL 10.3, sequential version
#LIB       = -lmkl_gf_lp64 -lmkl_sequential -lmkl_core -lcublas -lcudart -lstdc++ -lm -lgfortran

# gcc with MKL 10.3, GNU threads
#LIB       = -lmkl_gf_lp64 -lmkl_gnu_thread -lmkl_core -lpthread -lcublas -lcudart -lstdc++ -lm -lgfortran

# gcc with MKL 10.3, Intel threads
LIB       = -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -lpthread -lcublas -lcudart -lstdc++ -lm -L/export/data/ps550/CULA_RUN/lib64/ -liomp5 -lgfortran

# define library directories preferably in your environment, or here.
# for MKL run, e.g.: source /opt/intel/composerxe/mkl/bin/mklvars.sh intel64
#MKLROOT ?= /opt/intel/composerxe/mkl
#CUDADIR ?= /usr/local/cuda
MKLROOT ?= /usr/local/intel/composer_xe_2011_sp1.6.233/mkl
CUDADIR ?= /local/cuda


-include make.check-mkl
-include make.check-cuda



LIBDIR    = -L$(MKLROOT)/lib/intel64 \
            -L$(CUDADIR)/lib64

INC       = -I$(CUDADIR)/include -I$(MKLROOT)/include

mgates3
Posts: 918
Joined: Fri Jan 06, 2012 2:13 pm

Re: error: invalid conversion from ‘const magmaDoubleComplex

Post by mgates3 » Fri Nov 28, 2014 7:44 pm

What version of CUDA do you have? I think they changed their prototype in the latest version.

Otherwise, you can just ignore that tester and compile the rest. E.g., make -k.

-mark

psims01
Posts: 9
Joined: Fri Nov 28, 2014 12:31 pm

Re: error: invalid conversion from ‘const magmaDoubleComplex

Post by psims01 » Tue Dec 02, 2014 9:09 am

I've tried compiling with CUDA 5.0 and with 6.0 and am having the same issue with each. Skipping the tests with errors using make -k works well for my purposes though since I'm not planning to use those specific tests. Thanks!

Peter

mgates3
Posts: 918
Joined: Fri Jan 06, 2012 2:13 pm

Re: error: invalid conversion from ‘const magmaDoubleComplex

Post by mgates3 » Tue Dec 02, 2014 9:44 am

Yes, I think the fix came in the latest release, CUDA 6.5. We may just disable that bit of code for CUDA <= 6.0.
-mark

haidar
Posts: 22
Joined: Fri Sep 19, 2014 3:43 pm

Re: error: invalid conversion from ‘const magmaDoubleComplex

Post by haidar » Fri Dec 05, 2014 11:18 am

Yes the CUDA 6.5 have changed its interface of trsm and gemm, they use const now while it is wasn't before.
The best is to use the newest cuda 6.5.xx
else, if you don't need the trsm batched disable its compilation otherwise remove the const from the cublas call.

Post Reply