[R-sig-hpc] Trying to replicate an example

Hodgess, Erin HodgessE at uhd.edu
Wed Sep 19 02:04:53 CEST 2012


Hello all!

I'm trying to replicate an example in CUDA from this summer from Raymond.

I am still trying to get the files to compile.  There is one CUDA file and one C file.


nvcc -c -arch=sm_13 VecAdd_kernel.cu VecAdd_kernel.o
bccd at node000:~/CUDA$ R CMD SHLIB -o VecAdd_cuda.so VecAdd_cuda.c VecAdd_kernel.o
gcc -std=gnu99 -shared -o VecAdd_cuda.so VecAdd_cuda.o VecAdd_kernel.o -L/usr/lib/R/lib -lR
/usr/bin/ld: VecAdd_kernel.o: relocation R_X86_64_32 against `VecAdd(double*, double*, double*, int)' can not be used when making a shared object; recompile with -fPIC
VecAdd_kernel.o: could not read symbols: Bad value
collect2: ld returned 1 exit status
make: *** [VecAdd_cuda.so] Error 1

I have attached the files.

Any help would be much appreciated.

Thanks,
Sincerely,
Erin



Erin M. Hodgess, PhD
Associate Professor
Department of Computer and Mathematical Sciences
University of Houston - Downtown
mailto: hodgesse at uhd.edu

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://stat.ethz.ch/pipermail/r-sig-hpc/attachments/20120918/38da0b05/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: VecAdd_kernel.cu
Type: application/cu-seeme
Size: 1376 bytes
Desc: VecAdd_kernel.cu
URL: <https://stat.ethz.ch/pipermail/r-sig-hpc/attachments/20120918/38da0b05/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: VecAdd_cuda.c
Type: text/x-csrc
Size: 835 bytes
Desc: VecAdd_cuda.c
URL: <https://stat.ethz.ch/pipermail/r-sig-hpc/attachments/20120918/38da0b05/attachment-0001.bin>


More information about the R-sig-hpc mailing list