I seem to have compiled and linked magma without any errors, but I cannot link the tests. I have tried different routes and end up with the same error for both routes. I have cuda 4.0 and no other installations of cuda (suggested to check in other threads). Using 64 bit linux ubuntu with latest nvidia drivers. cuda compiles and tests fine. Geforce GTX260Ti .
For my first attempt, I went with an atlas install; make.inc looks like this :
Code: Select all
GPU_TARGET = 1
CC = gcc
NVCC = nvcc
FORT = gfortran
ARCH = ar
ARCHFLAGS = cr
RANLIB = ranlib
OPTS = -O3 -DADD_
FOPTS = -O3 -DADD_ -x f95-cpp-input
NVOPTS = --compiler-options -fno-strict-aliasing -DUNIX -O3 -DADD_
LDOPTS = -fPIC -Xlinker -zmuldefs
#LIB = /home/tomov/LIB/lapack-lite-3.1.1/lapack_LINUX64.a \
# -lf77blas -latlas -lcblas -lf2c -lcublas -lm
LIB = -latlas -lcublas -lm
CUDADIR = /usr/local/cuda
LIBDIR = -L/home/mknap/Downloads/ATLAS/mybuild/lib \
-L$(CUDADIR)/lib64
#LIBDIR = -L/home/tomov/LIB/ATLAS/lib/Linux_UNKNOWNSSE2 \
# -L/home/tomov/LIB/CLAPACK-3.1.1/F2CLIBS/ \
# -L$(CUDADIR)/lib64
INC = -I$(CUDADIR)/include
LIBMAGMA = ../lib/libmagma.a
LIBMAGMABLAS = ../lib/libmagmablas.a
Code: Select all
testing_zgemm.o: In function `main':
testing_zgemm.cpp:(.text+0x4f1): undefined reference to `zlarnv_'
testing_zgemm.cpp:(.text+0x516): undefined reference to `zlarnv_'
testing_zgemm.cpp:(.text+0x53b): undefined reference to `zlarnv_'
testing_zgemm.cpp:(.text+0x939): undefined reference to `zaxpy_'
testing_zgemm.cpp:(.text+0x96b): undefined reference to `zlange_'
../lib/libmagma.a(auxiliary.o): In function `swp2pswp':
auxiliary.cpp:(.text+0x1093): undefined reference to `lsame_'
collect2: ld returned 1 exit status
Code: Select all
GPU_TARGET = 1
CC = gcc
NVCC = nvcc
FORT = gfortran
ARCH = ar
ARCHFLAGS = cr
RANLIB = ranlib
OPTS = -DADD_ -O3
FOPTS = -DADD_ -O3 -x f95-cpp-input
NVOPTS = --compiler-options -DUNIX -O3 -DADD_
LDOPTS = -fPIC -Xlinker -zmuldefs
#LIB = -lmkl_em64t -lguide -lpthread -lcublas -lm
LIB = -lrefblas -lcublas -lm
CUDADIR = /usr/local/cuda
#LIBDIR = -L/home/tomov/intel/mkl/10.0.1.014/lib/em64t \
# -L$(CUDADIR)/lib64
LIBDIR = -L/home/mknap/Downloads/plasma-installer_2.4.1/lasma/lib \
-L$(CUDADIR)/lib64
INC = -I../include -I$(CUDADIR)/include
LIBMAGMA = ../lib/libmagma.so
LIBMAGMABLAS = ../lib/libmagmablas.soCode: Select all
gcc -DADD_ -O3 -DGPUSHMEM=200 -fPIC -Xlinker -zmuldefs -DGPUSHMEM=200 testing_zgemm.o -o testing_zgemm lin/liblapacktest.a -L../lib \
-lcuda -lmagma -lmagmablas -lmagma -L/home/mknap/Downloads/plasma-installer_2.4.1/lasma/lib -L/usr/local/cuda/lib64 -lrefblas -lcublas -lm
testing_zgemm.o: In function `main':
testing_zgemm.cpp:(.text+0x4f1): undefined reference to `zlarnv_'
testing_zgemm.cpp:(.text+0x516): undefined reference to `zlarnv_'
testing_zgemm.cpp:(.text+0x53b): undefined reference to `zlarnv_'
testing_zgemm.cpp:(.text+0x96b): undefined reference to `zlange_'
collect2: ld returned 1 exit status
I look forward to more learning and using MAGMA.