Discussion:
[CUDPP][1108] problem in linking cudpp to my code
grimFandango
2015-08-10 03:16:29 UTC
Permalink
Hi all,

I've followed all the steps
in https://github.com/cudpp/cudpp/wiki/BuildingCUDPPwithCMake but when I
run the simpleCUDPP I get these errors :

/tmp/tmpxft_0000c323_00000000-17_test1.o: In function `runTest(int,
char**)':
tmpxft_0000c323_00000000-4_test1.cudafe1.cpp:(.text+0x1d9): undefined
reference to `cudppCreate'
tmpxft_0000c323_00000000-4_test1.cudafe1.cpp:(.text+0x24a): undefined
reference to `cudppPlan'
tmpxft_0000c323_00000000-4_test1.cudafe1.cpp:(.text+0x274): undefined
reference to `cudppScan'
tmpxft_0000c323_00000000-4_test1.cudafe1.cpp:(.text+0x2d0): undefined
reference to `computeSumScanGold'
tmpxft_0000c323_00000000-4_test1.cudafe1.cpp:(.text+0x322): undefined
reference to `cudppDestroyPlan'
tmpxft_0000c323_00000000-4_test1.cudafe1.cpp:(.text+0x337): undefined
reference to `cudppDestroy'

This is how I compile the code :

nvcc -O3 -arch=sm_35 simpleCUDPP.cu -o att1


Cheers,
--
You received this message because you are subscribed to the Google Groups "CUDPP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cudpp+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at http://groups.google.com/group/cudpp.
For more options, visit https://groups.google.com/d/optout.
John Owens
2015-08-10 03:20:21 UTC
Permalink
I think you need a -l (link library) command, something like
nvcc -O3 -arch=sm_35 simpleCUDPP.cu -lcudpp -L/path/to/cudpp/library -o att1
JDO
Hi all,
tmpxft_0000c323_00000000-4_test1.cudafe1.cpp:(.text+0x1d9): undefined reference to `cudppCreate'
tmpxft_0000c323_00000000-4_test1.cudafe1.cpp:(.text+0x24a): undefined reference to `cudppPlan'
tmpxft_0000c323_00000000-4_test1.cudafe1.cpp:(.text+0x274): undefined reference to `cudppScan'
tmpxft_0000c323_00000000-4_test1.cudafe1.cpp:(.text+0x2d0): undefined reference to `computeSumScanGold'
tmpxft_0000c323_00000000-4_test1.cudafe1.cpp:(.text+0x322): undefined reference to `cudppDestroyPlan'
tmpxft_0000c323_00000000-4_test1.cudafe1.cpp:(.text+0x337): undefined reference to `cudppDestroy'
nvcc -O3 -arch=sm_35 simpleCUDPP.cu -o att1
Cheers,
--
You received this message because you are subscribed to the Google Groups "CUDPP" group.
Visit this group at http://groups.google.com/group/cudpp.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "CUDPP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cudpp+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at http://groups.google.com/group/cudpp.
For more options, visit https://groups.google.com/d/optout.
grimFandango
2015-08-10 19:24:18 UTC
Permalink
So I did that but now I get
/usr/bin/ld: cannot find -lcudpp
Post by John Owens
I think you need a -l (link library) command, something like
nvcc -O3 -arch=sm_35 simpleCUDPP.cu -lcudpp -L/path/to/cudpp/library -o
att1
JDO
Hi all,
I've followed all the steps in
https://github.com/cudpp/cudpp/wiki/BuildingCUDPPwithCMake but when I run
/tmp/tmpxft_0000c323_00000000-17_test1.o: In function `runTest(int,
tmpxft_0000c323_00000000-4_test1.cudafe1.cpp:(.text+0x1d9): undefined
reference to `cudppCreate'
tmpxft_0000c323_00000000-4_test1.cudafe1.cpp:(.text+0x24a): undefined
reference to `cudppPlan'
tmpxft_0000c323_00000000-4_test1.cudafe1.cpp:(.text+0x274): undefined
reference to `cudppScan'
tmpxft_0000c323_00000000-4_test1.cudafe1.cpp:(.text+0x2d0): undefined
reference to `computeSumScanGold'
tmpxft_0000c323_00000000-4_test1.cudafe1.cpp:(.text+0x322): undefined
reference to `cudppDestroyPlan'
tmpxft_0000c323_00000000-4_test1.cudafe1.cpp:(.text+0x337): undefined
reference to `cudppDestroy'
nvcc -O3 -arch=sm_35 simpleCUDPP.cu -o att1
Cheers,
--
You received this message because you are subscribed to the Google
Groups "CUDPP" group.
To unsubscribe from this group and stop receiving emails from it, send
<javascript:>.
Visit this group at http://groups.google.com/group/cudpp.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "CUDPP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cudpp+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at http://groups.google.com/group/cudpp.
For more options, visit https://groups.google.com/d/optout.
John Owens
2015-08-10 20:18:24 UTC
Permalink
And that's what the -L is for: telling the compiler where the CUDPP library
is located. For me, that library is called libcudpp.a, and I would say
-L/home/jowens/Documents/working/cudpp-build/lib in my compiler call.

Here's the -L flag docs for gcc:

https://gcc.gnu.org/onlinedocs/gcc/Directory-Options.html

JDO
Post by grimFandango
So I did that but now I get
/usr/bin/ld: cannot find -lcudpp
Post by John Owens
I think you need a -l (link library) command, something like
nvcc -O3 -arch=sm_35 simpleCUDPP.cu -lcudpp -L/path/to/cudpp/library -o
att1
JDO
Hi all,
I've followed all the steps in
https://github.com/cudpp/cudpp/wiki/BuildingCUDPPwithCMake but when I
/tmp/tmpxft_0000c323_00000000-17_test1.o: In function `runTest(int,
tmpxft_0000c323_00000000-4_test1.cudafe1.cpp:(.text+0x1d9): undefined
reference to `cudppCreate'
tmpxft_0000c323_00000000-4_test1.cudafe1.cpp:(.text+0x24a): undefined
reference to `cudppPlan'
tmpxft_0000c323_00000000-4_test1.cudafe1.cpp:(.text+0x274): undefined
reference to `cudppScan'
tmpxft_0000c323_00000000-4_test1.cudafe1.cpp:(.text+0x2d0): undefined
reference to `computeSumScanGold'
tmpxft_0000c323_00000000-4_test1.cudafe1.cpp:(.text+0x322): undefined
reference to `cudppDestroyPlan'
tmpxft_0000c323_00000000-4_test1.cudafe1.cpp:(.text+0x337): undefined
reference to `cudppDestroy'
nvcc -O3 -arch=sm_35 simpleCUDPP.cu -o att1
Cheers,
--
You received this message because you are subscribed to the Google
Groups "CUDPP" group.
To unsubscribe from this group and stop receiving emails from it, send
Visit this group at http://groups.google.com/group/cudpp.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "CUDPP" group.
To unsubscribe from this group and stop receiving emails from it, send an
Visit this group at http://groups.google.com/group/cudpp.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "CUDPP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cudpp+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at http://groups.google.com/group/cudpp.
For more options, visit https://groups.google.com/d/optout.
grimFandango
2015-08-11 02:02:03 UTC
Permalink
Thank you, the problem was that I used ~ instead of /home/... Now I get
undefined reference to `computeSumScanGold'. Everything else seems to work
fine. Sorry for all the troubles.
Post by John Owens
And that's what the -L is for: telling the compiler where the CUDPP
library is located. For me, that library is called libcudpp.a, and I would
say -L/home/jowens/Documents/working/cudpp-build/lib in my compiler call.
https://gcc.gnu.org/onlinedocs/gcc/Directory-Options.html
JDO
Post by grimFandango
So I did that but now I get
/usr/bin/ld: cannot find -lcudpp
Post by John Owens
I think you need a -l (link library) command, something like
nvcc -O3 -arch=sm_35 simpleCUDPP.cu -lcudpp -L/path/to/cudpp/library
-o att1
JDO
Hi all,
I've followed all the steps in
https://github.com/cudpp/cudpp/wiki/BuildingCUDPPwithCMake but when I
/tmp/tmpxft_0000c323_00000000-17_test1.o: In function `runTest(int,
tmpxft_0000c323_00000000-4_test1.cudafe1.cpp:(.text+0x1d9): undefined
reference to `cudppCreate'
tmpxft_0000c323_00000000-4_test1.cudafe1.cpp:(.text+0x24a): undefined
reference to `cudppPlan'
tmpxft_0000c323_00000000-4_test1.cudafe1.cpp:(.text+0x274): undefined
reference to `cudppScan'
tmpxft_0000c323_00000000-4_test1.cudafe1.cpp:(.text+0x2d0): undefined
reference to `computeSumScanGold'
tmpxft_0000c323_00000000-4_test1.cudafe1.cpp:(.text+0x322): undefined
reference to `cudppDestroyPlan'
tmpxft_0000c323_00000000-4_test1.cudafe1.cpp:(.text+0x337): undefined
reference to `cudppDestroy'
nvcc -O3 -arch=sm_35 simpleCUDPP.cu -o att1
Cheers,
--
You received this message because you are subscribed to the Google
Groups "CUDPP" group.
To unsubscribe from this group and stop receiving emails from it, send
Visit this group at http://groups.google.com/group/cudpp.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "CUDPP" group.
To unsubscribe from this group and stop receiving emails from it, send an
.
Visit this group at http://groups.google.com/group/cudpp.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "CUDPP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cudpp+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at http://groups.google.com/group/cudpp.
For more options, visit https://groups.google.com/d/optout.
John Owens
2015-08-11 15:58:44 UTC
Permalink
I encourage you, and others on this list, to use cmake if possible rather
than rolling your own command lines; we've put a lot of effort into making
CUDPP work nicely with cmake, and it is a good tool for avoiding the kinds
of issues you're having.

JDO
Post by grimFandango
Thank you, the problem was that I used ~ instead of /home/... Now I get
undefined reference to `computeSumScanGold'. Everything else seems to work
fine. Sorry for all the troubles.
Post by John Owens
And that's what the -L is for: telling the compiler where the CUDPP
library is located. For me, that library is called libcudpp.a, and I would
say -L/home/jowens/Documents/working/cudpp-build/lib in my compiler call.
https://gcc.gnu.org/onlinedocs/gcc/Directory-Options.html
JDO
Post by grimFandango
So I did that but now I get
/usr/bin/ld: cannot find -lcudpp
Post by John Owens
I think you need a -l (link library) command, something like
nvcc -O3 -arch=sm_35 simpleCUDPP.cu -lcudpp -L/path/to/cudpp/library
-o att1
JDO
Hi all,
I've followed all the steps in
https://github.com/cudpp/cudpp/wiki/BuildingCUDPPwithCMake but when I
/tmp/tmpxft_0000c323_00000000-17_test1.o: In function `runTest(int,
tmpxft_0000c323_00000000-4_test1.cudafe1.cpp:(.text+0x1d9): undefined
reference to `cudppCreate'
tmpxft_0000c323_00000000-4_test1.cudafe1.cpp:(.text+0x24a): undefined
reference to `cudppPlan'
tmpxft_0000c323_00000000-4_test1.cudafe1.cpp:(.text+0x274): undefined
reference to `cudppScan'
tmpxft_0000c323_00000000-4_test1.cudafe1.cpp:(.text+0x2d0): undefined
reference to `computeSumScanGold'
tmpxft_0000c323_00000000-4_test1.cudafe1.cpp:(.text+0x322): undefined
reference to `cudppDestroyPlan'
tmpxft_0000c323_00000000-4_test1.cudafe1.cpp:(.text+0x337): undefined
reference to `cudppDestroy'
nvcc -O3 -arch=sm_35 simpleCUDPP.cu -o att1
Cheers,
--
You received this message because you are subscribed to the Google
Groups "CUDPP" group.
To unsubscribe from this group and stop receiving emails from it,
Visit this group at http://groups.google.com/group/cudpp.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google
Groups "CUDPP" group.
To unsubscribe from this group and stop receiving emails from it, send
Visit this group at http://groups.google.com/group/cudpp.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "CUDPP" group.
To unsubscribe from this group and stop receiving emails from it, send an
Visit this group at http://groups.google.com/group/cudpp.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "CUDPP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cudpp+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at http://groups.google.com/group/cudpp.
For more options, visit https://groups.google.com/d/optout.
Loading...