|
From: | DOHERTY, Greg |
Subject: | linking question [SEC=UNCLASSIFIED] |
Date: | Wed, 18 Jan 2017 03:06:38 +0000 |
I am trying to produce a version of the matlab routine GPSR_BB that octave can call, eventually, on a Jetson board with an nvidia gpu. At the moment I am testing on an x86_64 server. I have a working version of GPSR_BB.oct produced with mkoctfile from a C++ version of GPSR_BB that I translated, which runs well. I have edited the C++ version to include the openACC directives required to use the gpu. I also want to be able to call Sgemv from cublas. I have a linking problem that you can see below. Any suggestions on how to fix it would be very welcome. Greg Doherty $ cat Makefile CXX1=pgc++ CXX1FLAGS=-fast -ta=tesla:lineinfo -Minfo=all,ccff -fPIC -shared -acc -Mcuda LDFLAGS= ${CXX1FLAGS} MKOCT=/data1/packages/octave/4.0.3/bin/mkoctfile libgdz.a: gdz.o ${CXX1} ${CXX1FLAGS} gdz.o -lcublas_static -o libgdz.a gdz.o: ${CXX1} ${LDFLAGS} -c gdz.cc > compiler.out 2>&1 GPSR_BB.oct: GPSR_BB.cc libgdz.a $(MKOCT) -g -L/home/gdz/DAVID/BLAS -lgdz -Mcuda -fPIC GPSR_BB.cc clean: rm -Rf GPSR_BB.oct pgprof* core *.o *.so *.a $ make clean rm -Rf GPSR_BB.oct pgprof* core *.o *.so *.a $ make GPSR_BB.oct > ld.out 2>&1 $ cat ld.out pgc++ -fast -ta=tesla:lineinfo -Minfo=all,ccff -fPIC -shared -acc -Mcuda -c gdz.cc > compiler.out 2>&1 pgc++ -fast -ta=tesla:lineinfo -Minfo=all,ccff -fPIC -shared -acc -Mcuda gdz.o -lcublas_static -o libgdz.a /usr/bin/ld: /tmp/pgcudaregxXgfvNbp-fw.o: relocation R_X86_64_PC32 against undefined symbol `__pgi_cuda_register_fat_binary' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: final link failed: Bad value pgacclnk: child process exit status 1: /usr/bin/ld make: *** [libgdz.a] Error 2 $ |
[Prev in Thread] | Current Thread | [Next in Thread] |