Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

`volk_32fc_x2_s32fc_multiply_conjugate_add_32fc' is deprecated on VOLK 3.1.0 #41

Closed
jj1bdx opened this issue Dec 12, 2023 · 8 comments
Closed
Assignees

Comments

@jj1bdx
Copy link
Owner

jj1bdx commented Dec 12, 2023

Maybe we need to fix this ASAP.

[ 87%] Building CXX object CMakeFiles/sfmbase.dir/sfmbase/RtlSdrSource.cpp.o
/home/kenji/src/airspy-fmradion/sfmbase/MultipathFilter.cpp: In member function 'void MultipathFilter::update_coeff(IQSample)':
/home/kenji/src/airspy-fmradion/sfmbase/MultipathFilter.cpp:136:3: warning: 'volk_32fc_x2_s32fc_multiply_conjugate_add_32fc' is deprecated [-Wdeprecated-declarations]
  136 |   volk_32fc_x2_s32fc_multiply_conjugate_add_32fc(
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/local/include/volk/volk_alloc.hh:18,
                 from /home/kenji/src/airspy-fmradion/include/SoftFM.h:30,
                 from /home/kenji/src/airspy-fmradion/include/MultipathFilter.h:23,
                 from /home/kenji/src/airspy-fmradion/sfmbase/MultipathFilter.cpp:31:
/usr/local/include/volk/volk.h:1895:61: note: declared here
 1895 | extern VOLK_API p_32fc_x2_s32fc_multiply_conjugate_add_32fc volk_32fc_x2_s32fc_multiply_conjugate_add_32fc __attribute__((deprecated));
      |                                                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@jj1bdx
Copy link
Owner Author

jj1bdx commented Dec 12, 2023

Suggested fix: gnuradio/volk#695

@argilo
Copy link
Contributor

argilo commented Dec 12, 2023

By the way, the deprecated kernels will probably remain available for a long time, but you should use the new ones when they are available so that your application will avoid Undefined Behaviour that causes crashes on some architectures.

@jj1bdx
Copy link
Owner Author

jj1bdx commented Dec 12, 2023

@argilo
I'm testing the new API with add2 of v3.1.0 and I've found it worked OK with macOS but not on Ubuntu so I'm investigating it now. I will write more when I can tell the details.

@jj1bdx
Copy link
Owner Author

jj1bdx commented Dec 12, 2023

(This is a copy of gnuradio/volk#695 (comment) )

@argilo After a few hours of trial, I have to conclude that:

volk_32fc_x2_s32fc_multiply_conjugate_add_32fc of VOLK v3.1.0 worked OK on macOS 14.2 (Homebrew) with airspy-fmradion MultipathFilter::update_coeff().
Either volk_32fc_x2_s32fc_multiply_conjugate_add_32fc or volk_32fc_x2_s32fc_multiply_conjugate_add2_32fc of VOLK v3.1.0 did not work (no compilation error, but the calculation failed), in generic kernel (no CPU optimization) on airspy-fmradion MultipathFilter::update_coeff() running on Ubuntu 22.04.3 x86_64 compiled with gcc version 11.4.0. I had to fall back to VOLK 3.0.0, which worked OK. Also, airspy-fmradion compiled with VOLK 2.5.1 of Ubuntu 22.04.3's apt repository worked OK.

@jj1bdx
Copy link
Owner Author

jj1bdx commented Dec 12, 2023

Added docs to use VOLK 3.0.0 or 2.5.2 for Ubuntu 22.04.3 for airspy-fmradion 20231212-1.
I still don't know why the code works OK on macOS and fails on Ubuntu.

@jj1bdx
Copy link
Owner Author

jj1bdx commented Dec 12, 2023

The bugfix issue will be followed-up on #42.

@jj1bdx jj1bdx self-assigned this Dec 12, 2023
@jj1bdx
Copy link
Owner Author

jj1bdx commented Dec 12, 2023

Further plan:

@jj1bdx
Copy link
Owner Author

jj1bdx commented Dec 13, 2023

#42 is fixed by #43.
Conditional compilation code is added as e52c30f in the dev branch.
Case closed.

@jj1bdx jj1bdx closed this as completed Dec 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants