magma 'make test' fails

Open discussion for MAGMA library (Matrix Algebra on GPU and Multicore Architectures)
Post Reply
laurentiuduca
Posts: 5
Joined: Wed Dec 17, 2014 4:37 am

magma 'make test' fails

Post by laurentiuduca » Wed Dec 17, 2014 8:57 am

Hello,

My name is Laurentiu and I am new to MAGMA.
I have made a make.inc and tried to compile MAGMA with command 'make lib' and it seemed that it worked.
Here is my make.inc:
#------------------------------------------
GPU_TARGET = Fermi
CC = gcc
CXX = g++
NVCC = nvcc
FORT = gfortran
ARCH = ar
ARCHFLAGS = cr
RANLIB = ranlib

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

LIB = -lcublas -lcudart -lstdc++ -lm

# define library directories preferably in your environment, or here.
#OPENBLASDIR ?= /usr/local/openblas
CUDADIR = /opt/tools/libraries/cuda-6.0
#-include make.check-openblas
-include make.check-cuda

LIBDIR = -L$(CUDADIR)/lib64

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


Then I tried to do 'make test' and the following error appears:
...
g++ -O3 -DADD_ -Wall -fno-strict-aliasing -DMAGMA_SETAFFINITY -DHAVE_CUBLAS -DMIN_CUDA_ARCH=200 -DHAVE_CUBLAS -DMIN_CUDA_ARCH=200 -I/opt/tools/libraries/cuda-6.0/include -I../include -I../control -I../sparse-iter/include -c testing_zgemm.cpp -o testing_zgemm.o
gcc testing_zgemm.o -o testing_zgemm \
libtest.a lin/liblapacktest.a -L../lib -lmagma \
-L/opt/tools/libraries/cuda-6.0/lib64 \
-lcublas -lcudart -lstdc++ -lm
testing_zgemm.o: In function `main':
testing_zgemm.cpp:(.text+0xec): undefined reference to `dlamch_'
testing_zgemm.cpp:(.text+0x216): undefined reference to `zlange_'
testing_zgemm.cpp:(.text+0x24a): undefined reference to `zaxpy_'
testing_zgemm.cpp:(.text+0x268): undefined reference to `zlange_'
testing_zgemm.cpp:(.text+0x671): undefined reference to `zlarnv_'
testing_zgemm.cpp:(.text+0x691): undefined reference to `zlarnv_'
testing_zgemm.cpp:(.text+0x6b1): undefined reference to `zlarnv_'
testing_zgemm.cpp:(.text+0xb27): undefined reference to `zgemm_'
testing_zgemm.cpp:(.text+0xb9f): undefined reference to `zlange_'
testing_zgemm.cpp:(.text+0xbce): undefined reference to `zaxpy_'
testing_zgemm.cpp:(.text+0xbec): undefined reference to `zlange_'
testing_zgemm.cpp:(.text+0xc28): undefined reference to `zaxpy_'
testing_zgemm.cpp:(.text+0xc46): undefined reference to `zlange_'
collect2: ld returned 1 exit status
make[1]: *** [testing_zgemm] Error 1
make[1]: Leaving directory `/export/home/acs/prof/laurentiu.duca/magma-1.6.0-noopenmp/testing'
make: *** [test] Error 2

I have also tried a very simple test (find max from a vector) that worked and some more complicated (Ax=b solver) that failed.
I appreciate any help.

Thank you,
Laurentiu

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

Re: magma 'make test' fails

Post by mgates3 » Wed Dec 17, 2014 10:30 am

You need to include a (CPU) BLAS & LAPACK library, in addition to the GPU CUBLAS library.
This can be any of:
Intel MKL
AMD ACML + CBLAS + LAPACK
Openblas
ATLAS + LAPACK
MacOS Accelerate
or others. Many of those are free downloads and variously available for Linux, MacOS, and Windows. See the example make.inc files for what libraries are required.

-mark
Last edited by mgates3 on Wed Dec 17, 2014 10:30 am, edited 1 time in total.
Reason: Accelerate (veclib) doesn't need LAPACK

laurentiuduca
Posts: 5
Joined: Wed Dec 17, 2014 4:37 am

Re: magma 'make test' fails

Post by laurentiuduca » Thu Dec 18, 2014 11:15 am

Hello
I now use MKL 11.1 and CUDA 6.0 and still get error in ''make test".
Some tests were compiled succesfully, but I stil get an error:

g++ -O3 -DADD_ -Wall -fno-strict-aliasing -fopenmp -DMAGMA_WITH_MKL -DMAGMA_SETAFFINITY -DHAVE_CUBLAS -DMIN_CUDA_ARCH=200 -DHAVE_CUBLAS -DMIN_CUDA_ARCH=200 -I/opt/tools/libraries/cuda-6.0/include -I/opt/intel/composer_xe_2013_sp1.0.080/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 `/export/home/acs/prof/laurentiu.duca/magma-1.6.0-mkl/testing'


Any ideas?

Thank you,
Laurentiu

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

Re: magma 'make test' fails

Post by mgates3 » Thu Dec 18, 2014 11:19 am

Use CUDA 6.5.
Or ignore this particular tester, e.g., make -k.

-mark

Post Reply