[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] CMake and CUDA

From: marco Ribero
Subject: Re: [Discuss-gnuradio] CMake and CUDA
Date: Thu, 23 Apr 2015 21:40:46 +0000

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):

Output of nm -C | grep over the version with CUDA(a simple memcpy,the block works perfectly with make test)

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 <module>
    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,

Il giorno mar 21 apr 2015 alle ore 16:37 Tom Rondeau <address@hidden> ha scritto:
On Mon, Apr 20, 2015 at 1:42 PM, marco Ribero <address@hidden> wrote:
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)


cmake_minimum_required(VERSION 2.8)

include(GrPlatform) #define LIB_SUFFIX


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}
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<project name>.so | grep helloBlock' should tell you if it was properly built into your library.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]