Hi Magma team,
I'm trying to compile Magma to get the two library libmagma.so and libmagmablas.so under ubuntu 11.10.
I have write the make.inc as following :
GPU_TARGET = 0
CC = gcc
NVCC = /usr/local/cuda/bin/nvcc
FORT = gfortran
ARCH = gcc
ARCHFLAGS = -shared -o
RANLIB = strip
OPTS = -DADD_ -O3 -fPIC
FOPTS = -DADD_ -O3 -fPIC -x f95-cpp-input
NVOPTS = -DADD_ --shared --compiler-options '-fPIC' -DUNIX -O3
LDOPTS = -fPIC -Xlinker -zmuldefs
LIB = -lcuda -lblas -lpthread -lcublas -lcudart -llapack -lm
CUDADIR = /usr/local/cuda
LIBDIR = -L/usr/local/cuda/lib64 -L/usr/lib64 -L/usr/lib/libblas/
INC = -I$(CUDADIR)/include
LIBMAGMA = $(MAGMA_DIR)/lib/libmagma.so
LIBMAGMABLAS = $(MAGMA_DIR)/lib/libmagmablas.so
But the compilation fails in src directory.
zheevdx_gpu.o: In function `Mylapackf77_zstedc':
zheevdx_gpu.cpp:(.text+0x0): multiple definition of `Mylapackf77_zstedc'
zheevd_gpu.o:zheevd_gpu.cpp:(.text+0x0): first defined here
zheevx_gpu.o: In function `Mylapackf77_zstein':
zheevx_gpu.cpp:(.text+0x0): multiple definition of `Mylapackf77_zstein'
zheevr_gpu.o:zheevr_gpu.cpp:(.text+0x10): first defined here
...
I remove in the makefile all files which make these errors and I can compile the src dir.
Next, the compilation stops in the testing directory for some "undefined reference to .." in testing_zgemm.cpp but I have my two libs.so
My problem here is that these two libs are empty so I removes the RANLIB = strip to get something in.
When I try to link these libs in my project i get errors as :
libmagmablas.so: undefined symbol: magma_stream
libmagma.so: undefined symbol: magmablas_zgetmatrix_transpose
nm libmagma.so | grep -i magmablas_zgetmatrix_transpose
U magmablas_zgetmatrix_transpose
U magmablas_zgetmatrix_transpose2
nm libmagmablas.so | grep magma_stream
U magma_stream
I have succeeded to compile in static library (.a) and run some testing so I think that i have made a mistake in the make.inc
Thanks for your help,
Ced