flexbar icon indicating copy to clipboard operation
flexbar copied to clipboard

Migrate from tbb to onetbb

Open lkeegan opened this issue 2 years ago • 3 comments

  • add FlexbarAtomic
    • a simple wrapper around std::atomic which adds a copy constructor
    • to replace tbb::atomic member variables in classes with default copy constructors
  • replace removed tbb::atomic
    • with FlexbarAtomic if copy constructor was assumed
    • with std::atomic otherwise
  • filters (PairedAlign, PairedInput, PairedOutput)
    • no longer inherit from tbb::filter
    • take and return pointers to actual type instead of void*
    • operator() is now const
  • pipeline
    • use parallel_pipeline and make_filter
  • use global_control to set max threads
  • use oneapi::tbb namespace
  • add find_package for TBB to CMakeLists.txt

lkeegan avatar Feb 09 '23 15:02 lkeegan

I've tested this patch with the Debian package and confirm flexbar builds that way. Unfortunately the test seems to end in some endless loop:

 cd test ; \
 export PATH="/build/flexbar-3.5.0/obj-x86_64-linux-gnu:$PATH" ; \
 echo $PATH ; \
 export HOME=/tmp ; \
 which flexbar ; \
 ./flexbar_test.sh
 /build/flexbar-3.5.0/obj-x86_64-linux-gnu:/usr/sbin:/usr/bin:/sbin:/bin
 /build/flexbar-3.5.0/obj-x86_64-linux-gnu/flexbar

 Testing fasta:

Hopefully someone will be able to fire up gdb and find a fix. Kind regards, Andreas.

tillea avatar Feb 10 '23 06:02 tillea

@tillea thanks for testing - I didn't notice the tests folder! 1c872fa10 should fix the endless loop and another issue that came up with the pipeline changes, and now the tests pass for me

lkeegan avatar Feb 10 '23 09:02 lkeegan

This works for me now and I'll upload the Debian package with these patches. Thanks a lot, Andreas.

tillea avatar Feb 10 '23 10:02 tillea