Problem with building tesing

Open discussion for MAGMA

Problem with building tesing

Postby Linuxboy » Wed Nov 30, 2011 6:33 am

Hi! I've got the error when trying to build testing
linuxboy@CudaDesktop:~/magma_1.1.0/testing$ make
gcc -O3 -DADD_ -DGPUSHMEM=130 -I/usr/local/cuda/include -I../include -I../quark/include -c testing_zpotrf.cpp -o testing_zpotrf.o
gcc -O3 -DADD_ -DGPUSHMEM=130 -fPIC -Xlinker -zmuldefs -DGPUSHMEM=130 testing_zpotrf.o -o testing_zpotrf lin/liblapacktest.a -L../lib \
-lcuda -lmagma -lmagmablas -lmagma -L/usr/lib/atlas-base -L/usr/lib/lapack -L/usr/local/cuda/lib64 /usr/lib/lapack/liblapack.a -lf77blas -latlas -lcblas -lf2c -lcublas -lm
testing_zpotrf.o: In function `main':
testing_zpotrf.cpp:(.text+0x54b): undefined reference to `magma_zpotrf'
collect2: выполнение ld завершилось с кодом возврата 1
make: *** [testing_zpotrf] Ошибка 1
rm testing_zpotrf.o

my make.inc

GPU_TARGET = 0

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 = /usr/lib/lapack/liblapack.a \
-lf77blas -latlas -lcblas -lf2c -lcublas -lm

CUDADIR = /usr/local/cuda-3.0

LIBDIR = -L/use/lib/atlas-base \

-L$(CUDADIR)/lib64
INC = -I$(CUDADIR)/include

LIBMAGMA = ../lib/libmagma.a
LIBMAGMABLAS = ../lib/libmagmablas.a

What I do wrong?
Linuxboy
 
Posts: 14
Joined: Tue Nov 29, 2011 9:24 pm

Re: Problem with building tesing

Postby Stan Tomov » Wed Nov 30, 2011 11:36 am

It looks like your make.inc is correct. If you have a Fermi GPU you may have to change "GPU_TARGET = 0" to "GPU_TARGET = 1".

Routine magma_zpotrf is part of libmagma.a. Did the compilation in "src" go through without problems? You can go to the src directory and type "make" to just verify that everything is fine. If everything is fine the routine would be added to the library. On my system if I check whether I have it, I get

[tomov@cumin trunk]$ nm lib/libmagma.a | grep magma_zpotrf | grep T
0000000000000028 r _ZZ12magma_zpotrfE12__FUNCTION__
00000000000004aa T magma_zpotrf
0000000000000020 r _ZZ16magma_zpotrf_gpuE12__FUNCTION__
00000000000003da T magma_zpotrf_gpu
0000000000000020 r _ZZ16magma_zpotrf_oocE12__FUNCTION__
00000000000004aa T magma_zpotrf_ooc
0000000000000020 r _ZZ17magma_zpotrf_mgpuE12__FUNCTION__
00000000000004aa T magma_zpotrf_mgpu
0000000000000020 r _ZZ17magma_zpotrf2_oocE12__FUNCTION__
000000000000036c T magma_zpotrf2_ooc
0000000000000020 r _ZZ18magma_zpotrf2_mgpuE12__FUNCTION__
00000000000009e8 T magma_zpotrf2_mgpu
Stan Tomov
 
Posts: 251
Joined: Fri Aug 21, 2009 10:39 pm

Re: Problem with building tesing

Postby Linuxboy » Wed Nov 30, 2011 11:57 am

Hi Stan!
I decide to build magma from the beginning

make.inc

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 = /usr/lib/lapack/liblapack.a \
-lf77blas -latlas -lcblas -lf2c -lcublas -lm

CUDADIR = /usr/local/cuda

LIBDIR = -L/usr/lib/atlas-base \
-L/usr/lib/lapack \
-L$(CUDADIR)/lib64
INC = -I$(CUDADIR)/include

LIBMAGMA = ../lib/libmagma.a
LIBMAGMABLAS = ../lib/libmagmablas.a

Now I got this

../lib/libmagma.a(zlatrd.o): In function `magma_zlatrd':
zlatrd.cpp:(.text+0x443): undefined reference to `zdotc'
zlatrd.cpp:(.text+0xe54): undefined reference to `zdotc'
collect2: выполнение ld завершилось с кодом возврата 1
make[1]: *** [testing_zhetrd] Ошибка 1
rm testing_zgelqf_gpu.o testing_zgetri_gpu.o testing_zgebrd.o testing_zpotrf.o testing_zgetrf_gpu.o testing_zhetrd.o testing_zposv.o testing_zgeqrf.o testing_zsymv.o testing_zgemv.o testing_zgeqrs3_gpu.o testing_zpotri.o testing_zgeqlf.o testing_zgesv.o testing_zgeqrf_mgpu.o testing_zgemm.o testing_zgeqrs_gpu.o testing_zhemv.o testing_zgetrf.o testing_zposv_gpu.o testing_zpotrf_mgpu.o testing_zungqr_gpu.o testing_zgeqrf_gpu.o testing_zgelqf.o testing_zpotri_gpu.o testing_zgetrf_mgpu.o testing_zgehrd.o testing_zpotrf_gpu.o testing_zgesv_gpu.o
make[1]: Выход из каталога `/home/linuxboy/magma_1.1.0/testing'
make: *** [test] Ошибка 2
linuxboy@CudaDesktop:~/magma_1.1.0$
Linuxboy
 
Posts: 14
Joined: Tue Nov 29, 2011 9:24 pm

Re: Problem with building tesing

Postby Linuxboy » Wed Nov 30, 2011 12:41 pm

Stan! All is ok for me - I don't need z_routines.
Linuxboy
 
Posts: 14
Joined: Tue Nov 29, 2011 9:24 pm


Return to User discussion

Who is online

Users browsing this forum: Bing [Bot] and 2 guests