[USRP-users] USRP B205 mini + uhd::usrp::multi_usrp_uhd + multithreading

Melnikov, Roman Roman.Melnikov at verint.com
Sun Jan 5 08:15:22 EST 2020


Hi Marcus,

Your suggestion indeed worked for me.  Commented out lines 341 to 343, v3.14.0 libusb1_base.cpp

Thank you !

Roma M.

-----Original Message-----
From: Marcus Müller [mailto:marcus.mueller at ettus.com]
Sent: Saturday, December 28, 2019 12:54 PM
To: Melnikov, Roman <Roman.Melnikov at verint.com>; usrp-users at lists.ettus.com
Subject: Re: [USRP-users] USRP B205 mini + uhd::usrp::multi_usrp_uhd + multithreading

Hi Roma,

I must admit that this kind of multi-core libusb handling wasn't one of the original design goals.
Essentially, it **could** work with little code modification to NOT reuse the same libusb context (on anything but Windows, at least), but the fact that we cache the libusb context certainly has a reason.

Anyways, you could do (roughly) the following:

Remove the caching in libusb1_base.cpp. That would result in *a lot* of libusb calls every time you create a multi_usrp, but honestly, it could work. Highly untested!

Best regards,
Marcus

On Sun, 2019-12-22 at 16:11 +0000, Melnikov, Roman via USRP-users
wrote:
> Hello everyone,
>
> I have 8 b205mini devices, and I use uhd::usrp::multi_usrp::make(…)
>
> I try to read from each device from different thread
>
> When I run the profiler what I see is that libusb has single thread
> that do polling !
>
> When I run 8 applications each in different process my performance is
> OK. Since I really have multiple contexts ( libusb polling ) receiving
> data.
>
> Here is peace of code I run for each USRP device:
>
> sprintf ( args,
>
> "type=b200,enable_user_regs,serial=%X,master_clock_rate=%d,recv_buff_
> size=%d,fpga=%s",
>               this->Id,
>               ( int ) MaxMasterClockRate,
>               ( int ) RECV_BUFFER_SIZE_BYTES,
>               fpga_path );
>
> _usrp = uhd::usrp::multi_usrp::make ( uhd::device_addr_t ( args ) );
>
> // configuration ….
>
> _stream = _usrp->get_rx_stream ( stream_args );
>
> I have 8 streamers objects each in its own thread, doing
>
> _stream->recv ( … ) call
>
> Will appreciate any help.
>
> Roma M.
>
>
>
>
> This electronic message may contain proprietary and confidential
> information of Verint Systems Inc., its affiliates and/or
> subsidiaries. The information is intended to be for the use of the
> individual(s) or entity(ies) named above. If you are not the intended
> recipient (or authorized to receive this e-mail for the intended
> recipient), you may not use, copy, disclose or distribute to anyone
> this message or any information contained in this message. If you have
> received this electronic message in error, please notify us by
> replying to this e-mail.
> _______________________________________________
> USRP-users mailing list
> USRP-users at lists.ettus.com
> http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com



This electronic message may contain proprietary and confidential information of Verint Systems Inc., its affiliates and/or subsidiaries. The information is intended to be for the use of the individual(s) or entity(ies) named above. If you are not the intended recipient (or authorized to receive this e-mail for the intended recipient), you may not use, copy, disclose or distribute to anyone this message or any information contained in this message. If you have received this electronic message in error, please notify us by replying to this e-mail.


More information about the USRP-users mailing list