discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] cmake warning with -DENABLE_PERFORMANCE_COUNTERS-


From: sumit kumar
Subject: Re: [Discuss-gnuradio] cmake warning with -DENABLE_PERFORMANCE_COUNTERS-On (gr-ieee80211)
Date: Wed, 12 Jul 2017 02:19:24 +0200

Ok, I fixed the apache issue and control port seems to be running on the example provided in share/gnuradio/examples/ctrlport
polyphase example

However when I drag and dropped ctrlport in wifi_transceiver.grc , I see the following

ControlPort Monitor running.
gr::log :INFO: controlport - Apache Thrift: -h john-Precision-5510 -p 39251
Omonitor::endpoints() = -h john-Precision-5510 -p 39251
running: ['gr-perf-monitorx', 'john-Precision-5510', '39251']
OConfiguration has not turned on all of the appropriate ControlPort features:
    [ControlPort] on = False
    [ControlPort] edges_list = False
    [PerfCounters] on = False
    [PerfCounters] export = False

Then I manually set all of them to True, as I did last time, but no luck.

Do I have to rebuild everything again ? The documentation says I can change the behavior at runtime :( 


On 11 July 2017 at 16:08, Marcus Müller <address@hidden> wrote:

So, the performance counters need to be enabled in your GNU Radio preferences; I don't think editing the configuration input template helps, unless you build & reinstall (don't do that). Instead, run `gnuradio-config-info --prefs` first and check whether PerfCounters are enabled.

To query these counters, you can

  • use the gr::block::pc_bla_foo() methods of every block, or
  • use ControlPort at run time, for example using the gr-ctrlport-monitor, which you can add to a flowgraph elegantly from GRC. This, however, requires both an enabled controlport in CMake as well as a working and found Thrift installation at CMake time – check whether the CMake output contain

-- Configuring gr-ctrlport support...
--   Dependency Boost_FOUND = 1
--   Dependency SWIG_FOUND = TRUE
--   Dependency SWIG_VERSION_CHECK = TRUE
--   Dependency ENABLE_GNURADIO_RUNTIME = ON
--   Enabling gr-ctrlport support.
--   Override with -DENABLE_GR_CTRLPORT=ON/OFF

AND, directly below

-- Checking for module 'thrift'
--  Found thrift, version XX.XX.XX

AND, below

-- Python checking for Thrift - found

AND, below

-- Found THRIFT: /usr/lib64/libthrift.so
-- Found and enabling Thrift backend to ControlPort


On 07/11/2017 03:11 PM, sumit kumar wrote:
Ok I understood. Now I have a following question. 

I did a grep in the build directory 

grep -r 'work_time_total' .

And I found that indeed its there as said on https://gnuradio.org/doc/doxygen/page_perf_counters.html
It  seems a lot of task is already been done ! :) 

Then I opened gnuradio-runtime.conf.in and did the following (as mentioned in the documentation)
 
[PerfCounters]
on = True
export = True
#clock = thread
clock = monotonic

Now I run my application , for example wifi_rx.py

Where do I see the timings ? 

I opened the ieee802_11_swig.py, and I see     def pc_work_time_total(self) is there for all the blocks, but how to use them :-/ 

Can you give a use case, for example : 

In line 1953 of ieee802_11_swig.py, we have 

class frame_equalizer_sptr(object):

and inside this calss we have the function :

def pc_work_time_total(self):
        """pc_work_time_total(frame_equalizer_sptr self) -> float"""
        return _ieee802_11_swig.frame_equalizer_sptr_pc_work_time_total(self)

Now what should I do to see total time consumed by frame_equalizer and where do I expect the output. 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 

./swig/ieee802_11_swigPYTHON_wrap.cxx: { (char *)"mac_sptr_pc_work_time_total", _wrap_mac_sptr_pc_work_time_total, METH_VARARGS, (char *)"mac_sptr_pc_work_time_total(mac_sptr self) -> float"},
./swig/ieee802_11_swigPYTHON_wrap.cxx: { (char *)"mapper_sptr_pc_work_time_total", _wrap_mapper_sptr_pc_work_time_total, METH_VARARGS, (char *)"mapper_sptr_pc_work_time_total(mapper_sptr self) -> float"},
./swig/ieee802_11_swigPYTHON_wrap.cxx: { (char *)"moving_average_cc_sptr_pc_work_time_total", _wrap_moving_average_cc_sptr_pc_work_time_total, METH_VARARGS, (char *)"moving_average_cc_sptr_pc_work_time_total(moving_average_cc_sptr self) -> float"},
./swig/ieee802_11_swigPYTHON_wrap.cxx: { (char *)"moving_average_ff_sptr_pc_work_time_total", _wrap_moving_average_ff_sptr_pc_work_time_total, METH_VARARGS, (char *)"moving_average_ff_sptr_pc_work_time_total(moving_average_ff_sptr self) -> float"},
./swig/ieee802_11_swigPYTHON_wrap.cxx: { (char *)"parse_mac_sptr_pc_work_time_total", _wrap_parse_mac_sptr_pc_work_time_total, METH_VARARGS, (char *)"parse_mac_sptr_pc_work_time_total(parse_mac_sptr self) -> float"},
./swig/ieee802_11_swigPYTHON_wrap.cxx: { (char *)"sync_long_sptr_pc_work_time_total", _wrap_sync_long_sptr_pc_work_time_total, METH_VARARGS, (char *)"sync_long_sptr_pc_work_time_total(sync_long_sptr self) -> float"},
./swig/ieee802_11_swigPYTHON_wrap.cxx: { (char *)"sync_short_sptr_pc_work_time_total", _wrap_sync_short_sptr_pc_work_time_total, METH_VARARGS, (char *)"sync_short_sptr_pc_work_time_total(sync_short_sptr self) -> float"},




On 11 July 2017 at 13:17, Marcus Müller <address@hidden> wrote:

Hi Sumit,

Does only GNU Radio need to be built with the  flag -DENABLE_PERFORMANCE_COUNTERS or the OOT projects too ?
exactly, only GNU Radio needs to be built with that flag – functionally, it's something that is done in the scheduler, not in the blocks the scheduler runs.

Best regards,

Marcus


On 07/11/2017 12:59 PM, sumit kumar wrote:
Hi, 

I have to do timing analysis of individual blocks of gr-ieee80211
I have built my gnuradio with the following 

~/rfnoc/src/gnuradio/build$ cmake -DCMAKE_INSTALL_PREFIX=/home/john/rfnoc -DCMAKE_BUILD_TYPE=RelWithDebInfo -DENABLE_PERFORMANCE_COUNTERS=On -Werror ../

build was successful. 

And again I built gr-ieee80211 with following 

~/rfnoc/src/gr-ieee-80211/build$ cmake -DCMAKE_INSTALL_PREFIX=/home/john/rfnoc -DCMAKE_BUILD_TYPE=RelWithDebInfo -DENABLE_PERFORMANCE_COUNTERS=On -Werror ../

However I get a warning that 
CMake Warning:
  Manually-specified variables were not used by the project:

    ENABLE_PERFORMANCE_COUNTERS

In order to do timing analysis of individual blocks of gr-ieee80211, I am following the documentation at

Does only GNU Radio need to be built with the  flag -DENABLE_PERFORMANCE_COUNTERS or the OOT projects too ? 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
address@hidden:~/rfnoc/src/gr-ieee-80211/build$ cmake -DCMAKE_INSTALL_PREFIX=/home/john/rfnoc -DCMAKE_BUILD_TYPE=RelWithDebInfo -DENABLE_PERFORMANCE_COUNTERS=On -Werror ../
-- Boost version: 1.58.0
-- Found the following Boost libraries:
--   filesystem
--   system
Checking for GNU Radio Module: RUNTIME
 * INCLUDES=/home/john/rfnoc/include
 * LIBS=/home/john/rfnoc/lib/libgnuradio-runtime.so;/home/john/rfnoc/lib/libgnuradio-pmt.so
GNURADIO_RUNTIME_FOUND = TRUE
Checking for GNU Radio Module: DIGITAL
 * INCLUDES=/home/john/rfnoc/include
 * LIBS=/home/john/rfnoc/lib/libgnuradio-digital.so;/home/john/rfnoc/lib/libgnuradio-runtime.so;/home/john/rfnoc/lib/libgnuradio-pmt.so
GNURADIO_DIGITAL_FOUND = TRUE
Checking for GNU Radio Module: FFT
 * INCLUDES=/home/john/rfnoc/include
 * LIBS=/home/john/rfnoc/lib/libgnuradio-fft.so;/home/john/rfnoc/lib/libgnuradio-runtime.so;/home/john/rfnoc/lib/libgnuradio-pmt.so
GNURADIO_FFT_FOUND = TRUE
Checking for GNU Radio Module: FILTER
 * INCLUDES=/home/john/rfnoc/include
 * LIBS=/home/john/rfnoc/lib/libgnuradio-filter.so;/home/john/rfnoc/lib/libgnuradio-fft.so;/home/john/rfnoc/lib/libgnuradio-runtime.so;/home/john/rfnoc/lib/libgnuradio-pmt.so
GNURADIO_FILTER_FOUND = TRUE
Checking for GNU Radio Module: PMT
 * INCLUDES=/home/john/rfnoc/include
 * LIBS=/home/john/rfnoc/lib/libgnuradio-runtime.so;/home/john/rfnoc/lib/libgnuradio-pmt.so
GNURADIO_PMT_FOUND = TRUE
-- Found LOG4CPP: /usr/lib/liblog4cpp.so
-- 
-- Checking for module SWIG
-- Found SWIG version 3.0.8.
-- Configuring done
-- Generating done
CMake Warning:
  Manually-specified variables were not used by the project:

    ENABLE_PERFORMANCE_COUNTERS


-- Build files have been written to: /home/john/rfnoc/src/gr-ieee-80211/build





_______________________________________________
Discuss-gnuradio mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
_______________________________________________ Discuss-gnuradio mailing list address@hidden https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
--
Sumit Kumar



--
Sumit Kumar



reply via email to

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