Hi all.
I'm sure that I'm missing something really simple here, but I'm at my wits end so perhaps someone can take the time to help me out.
I compile magma-1.2.1 using CUDA-4.2, where cuda is installed in /usr/local/cuda and I copy the magma libraries to /usr/local/magma/lib and the headers to /usr/local/magma/include.
When I run ldconfig -p | grep cuda, the linker tells me that it knows about all the libraries in /usr/local/cuda/lib
I then have some of my own code which I am trying to link against these libraries. The Makefile is as follows:
CC = nvcc
CFLAGS = -arch=sm_12
LIBDIR = -L/usr/local/magma/lib
INCDIR = -I/usr/local/magma/include -I/usr/local/cuda/include
LIBS = -lcublas -lmagma -lmagmablas -llapack -lblas
OBJECTS = Functions.o
cuPrintf.o : cuPrintf.cu
${CC} ${CFLAGS} -c $<
Functions.o : Functions.cu Functions.h cuPrintf.o
${CC} ${CFLAGS} -c ${INCDIR} $<
testdiagonalization : testdiagonalization.cu ${OBJECTS}
${CC} -o $@ ${CFLAGS} ${INCDIR} ${LIBDIR} ${LIBS} $@.cu ${OBJECTS}
When I run make testdiagonalization, I get a string of "undefined reference" errors, all to cublas functions. It seems to me as if the magma libraries cannot make contact with the cuda libraries. How can I fix this?
Many thanks.
