Re: CMake and CUDA

I try to give more details.
In order to create blocks using the standard way(cmake/make/install)
with
Cuda,I’ve modified the CMakeList in /lib as shown before. My block is
created using gr_modtool and the language is c++.
The fact is that “make test” works well,while in GnuRadio interface give
me
the following error AttributeError: ‘module’ object has no attribute
‘helloFunc_ff’.
Everything worked well before the addition of CUDA code(so it’s not the
problem experienced by other users)

Thanks,
Marco

cmake_minimum_required(VERSION 2.8)
find_package(CUDA)

include(GrPlatform) #define LIB_SUFFIX

include_directories(${Boost_INCLUDE_DIR})
link_directories(${Boost_LIBRARY_DIRS})

list(APPEND helloBlock_sources
mod_ff_impl.cc helloCUDA.cu
)

set(helloBlock_sources “${helloBlock_sources}” PARENT_SCOPE)

cuda_add_library(gnuradio-helloBlock SHARED ${helloBlock_sources})
target_link_libraries(gnuradio-helloBlock ${Boost_LIBRARIES}
${GNURADIO_ALL_LIBRARIES}
${CUDA_LIBRARIES})
set_target_properties(gnuradio-helloBlock PROPERTIES DEFINE_SYMBOL
“gnuradio_helloBlock_EXPORTS”)

On Mon, Apr 20, 2015 at 1:42 PM, marco Ribero
[email protected]
wrote:

Thanks,
link_directories(${Boost_LIBRARY_DIRS})
${GNURADIO_ALL_LIBRARIES}
${CUDA_LIBRARIES})
set_target_properties(gnuradio-helloBlock PROPERTIES DEFINE_SYMBOL
“gnuradio_helloBlock_EXPORTS”)

Have you checked the library itself to see if the block exists there?
‘nm
-C lib.so | grep helloBlock’ should tell you if it was
properly built into your library.

Tom

Thank you very much for your reply.
I’ve launched your command over the library
build/lib/libgnuradio-hhh.so
(is the unique in this folder), generated using cmake/make/sudo…
Entries seems ok.

Output of nm -C | grep over the basic version(without CUDA):
http://pastebin.com/index/QJSvXLpz

Output of nm -C | grep over the version with CUDA(a simple memcpy,the
block
works perfectly with make test)
http://pastebin.com/index/9BXvv6X3

They seems equal(except addresses)

The name of the project is hhh(gr-hhh),and the block is mod(mod_ff),
sorry
for names…

This is the log given by gnuradio:
Traceback (most recent call last):
File “/home/marco/Scrivania/gnuradio/top_block.py”, line 203, in

tb = top_block()
File “/home/marco/Scrivania/gnuradio/top_block.py”, line 162, in
init
self.hhh_mod_ff_0 = hhh.mod_ff()
AttributeError: ‘module’ object has no attribute ‘mod_ff’
Reattached kernel driver

Thanks for your effort,
marco

Il giorno mar 21 apr 2015 alle ore 16:37 Tom R. [email protected]
ha
scritto:

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs