[med-svn] [Git][med-team/flexbar][master] 3 commits: Further patches by Liam Keegan

Andreas Tille (@tille) gitlab at salsa.debian.org
Fri Feb 10 10:40:20 GMT 2023



Andreas Tille pushed to branch master at Debian Med / flexbar


Commits:
705dc56b by Andreas Tille at 2023-02-10T11:28:08+01:00
Further patches by Liam Keegan

- - - - -
56325659 by Andreas Tille at 2023-02-10T11:36:12+01:00
routine-update: Standards-Version: 4.6.2

- - - - -
44a3340d by Andreas Tille at 2023-02-10T11:39:21+01:00
routine-update: Ready to upload to unstable

- - - - -


6 changed files:

- debian/changelog
- debian/control
- + debian/patches/19722f2743c96235ff57948eda82f963cf734131.patch
- + debian/patches/1c872fa10d474f090633fc95d409aa60607a3f96.patch
- + debian/patches/a9b0eb87a391aeaf760f8116dca777749c8b4f96.patch
- debian/patches/series


Changes:

=====================================
debian/changelog
=====================================
@@ -1,15 +1,19 @@
-flexbar (1:3.5.0-6) UNRELEASED; urgency=medium
+flexbar (1:3.5.0-6) unstable; urgency=medium
 
   [ Andreas Tille ]
   * Set upstream metadata fields: Archive.
-  * Attempt to port to onetbb
+  * Port to onetbb (thanks to Liam Keegan - see
+     https://github.com/seqan/flexbar/pull/41/)
     Closes: #1008220, #1011656
   * Fix watch file
 
   [ Étienne Mollier ]
   * onetbb.patch: port Paired* classes.
 
- -- Étienne Mollier <emollier at debian.org>  Fri, 27 Jan 2023 23:05:13 +0100
+  [ Andreas Tille ]
+  * Standards-Version: 4.6.2 (routine-update)
+
+ -- Andreas Tille <tille at debian.org>  Fri, 10 Feb 2023 11:37:36 +0100
 
 flexbar (1:3.5.0-4) unstable; urgency=medium
 


=====================================
debian/control
=====================================
@@ -10,7 +10,7 @@ Build-Depends: debhelper-compat (= 13),
                libseqan2-dev,
                zlib1g-dev,
                libbz2-dev
-Standards-Version: 4.6.0
+Standards-Version: 4.6.2
 Vcs-Browser: https://salsa.debian.org/med-team/flexbar
 Vcs-Git: https://salsa.debian.org/med-team/flexbar.git
 Homepage: https://github.com/seqan/flexbar


=====================================
debian/patches/19722f2743c96235ff57948eda82f963cf734131.patch
=====================================
@@ -0,0 +1,20 @@
+From 19722f2743c96235ff57948eda82f963cf734131 Mon Sep 17 00:00:00 2001
+From: Liam Keegan <liam at keegan.ch>
+Date: Fri, 10 Feb 2023 10:21:22 +0100
+Subject: [PATCH] revert accidental removal of pthread linking in
+ src/CMakeLists.txt
+
+---
+ src/CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -30,6 +30,7 @@ else()
+ endif()
+ 
+ add_executable( flexbar Flexbar.cpp )
++target_link_libraries( flexbar -lpthread )
+ 
+ find_package(TBB CONFIG REQUIRED)
+ target_link_libraries(flexbar TBB::tbb)


=====================================
debian/patches/1c872fa10d474f090633fc95d409aa60607a3f96.patch
=====================================
@@ -0,0 +1,60 @@
+From 1c872fa10d474f090633fc95d409aa60607a3f96 Mon Sep 17 00:00:00 2001
+From: Liam Keegan <liam at keegan.ch>
+Date: Fri, 10 Feb 2023 09:55:58 +0100
+Subject: [PATCH] Fix parallel_pipeline issues
+
+- pass a lambda with a reference to the filter instead of directly passing the filter to parallel_pipeline
+  - passed filters may be copied and/or deleted by tbb
+  - flexbar continues to use the filter objects after the pipeline is finished
+- call fc.stop() in PairedInput when there is no more input
+  - required control flow for first filter in parallel_pipeline that was previously missing
+---
+ src/Flexbar.h     | 9 ++++++---
+ src/PairedInput.h | 9 +++++++--
+ 2 files changed, 13 insertions(+), 5 deletions(-)
+
+diff --git a/src/Flexbar.h b/src/Flexbar.h
+index d1a8f31..46261cf 100644
+--- a/src/Flexbar.h
++++ b/src/Flexbar.h
+@@ -243,13 +243,16 @@ void startProcessing(Options &o){
+             oneapi::tbb::global_control::max_allowed_parallelism, o.nThreads);
+     oneapi::tbb::parallel_pipeline(o.nThreads,
+                                    oneapi::tbb::make_filter<void, TPairedReadBundle *>(
+-                                           oneapi::tbb::filter_mode::serial_in_order, inputFilter)
++                                           oneapi::tbb::filter_mode::serial_in_order,
++                                           [&inputFilter](auto &fc) { return inputFilter(fc); })
+                                    &
+                                    oneapi::tbb::make_filter<TPairedReadBundle *, TPairedReadBundle *>(
+-                                           oneapi::tbb::filter_mode::parallel, alignFilter)
++                                           oneapi::tbb::filter_mode::parallel,
++                                           [&alignFilter](TPairedReadBundle *tprb) { return alignFilter(tprb); })
+                                    &
+                                    oneapi::tbb::make_filter<TPairedReadBundle *, void>(
+-                                           oneapi::tbb::filter_mode::serial_in_order, outputFilter)
++                                           oneapi::tbb::filter_mode::serial_in_order,
++                                           [&outputFilter](TPairedReadBundle *tprb) { return outputFilter(tprb); })
+     );
+ 	if(o.logAlign == TAB) *out << "\n";
+ 	*out << "done.\n" << endl;
+diff --git a/src/PairedInput.h b/src/PairedInput.h
+index f7a6c9e..4fc4441 100644
+--- a/src/PairedInput.h
++++ b/src/PairedInput.h
+@@ -221,9 +221,14 @@ class PairedInput {
+ 				
+ 				prBundle = static_cast< TPairedReadBundle* >(loadPairedReadBundle());
+ 				
+-				if(prBundle == NULL) return prBundle;
++				if(prBundle == NULL){
++                    fc.stop();
++                    return prBundle;
++                }
+ 			}
+-		}
++		} else {
++            fc.stop();
++        }
+ 		
+ 		return prBundle;
+ 	}


=====================================
debian/patches/a9b0eb87a391aeaf760f8116dca777749c8b4f96.patch
=====================================
@@ -0,0 +1,65 @@
+From a9b0eb87a391aeaf760f8116dca777749c8b4f96 Mon Sep 17 00:00:00 2001
+From: Liam Keegan <liam at keegan.ch>
+Date: Fri, 10 Feb 2023 10:52:35 +0100
+Subject: [PATCH] use `std::atomic` instead of `FlexbarAtomic` in filters as
+ they are no longer require copy constructors
+
+---
+ src/FlexbarTypes.h | 2 +-
+ src/PairedAlign.h  | 2 +-
+ src/PairedInput.h  | 2 +-
+ src/PairedOutput.h | 2 +-
+ 4 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/src/FlexbarTypes.h b/src/FlexbarTypes.h
+index f1bce0f..3cf241e 100644
+--- a/src/FlexbarTypes.h
++++ b/src/FlexbarTypes.h
+@@ -139,7 +139,7 @@ namespace flexbar{
+ 		FString id;
+ 		FSeqStr seq;
+ 		bool rcAdapter;
+-		
++
+         FlexbarAtomic<unsigned long> rmOverlap, rmFull;
+ 		
+ 		TBar() :
+diff --git a/src/PairedAlign.h b/src/PairedAlign.h
+index 59c4473..d3b50ae 100644
+--- a/src/PairedAlign.h
++++ b/src/PairedAlign.h
+@@ -31,7 +31,7 @@ class PairedAlign {
+ 	const flexbar::TrimEnd        m_aTrimEnd, m_arcTrimEnd, m_bTrimEnd;
+ 	const flexbar::PairOverlap    m_poMode;
+ 	
+-    mutable FlexbarAtomic<unsigned long> m_unassigned;
++    mutable std::atomic<unsigned long> m_unassigned;
+ 	oneapi::tbb::concurrent_vector<flexbar::TBar> *m_adapters, *m_adapters2;
+ 	oneapi::tbb::concurrent_vector<flexbar::TBar> *m_barcodes, *m_barcodes2;
+ 	
+diff --git a/src/PairedInput.h b/src/PairedInput.h
+index 4fc4441..230474b 100644
+--- a/src/PairedInput.h
++++ b/src/PairedInput.h
+@@ -15,7 +15,7 @@ class PairedInput {
+ 	const bool m_isPaired, m_useBarRead, m_useNumberTag, m_interleaved;
+ 	const unsigned int m_bundleSize;
+ 	
+-    mutable FlexbarAtomic<unsigned long> m_uncalled, m_uncalledPairs, m_tagCounter, m_nBundles;
++    mutable std::atomic<unsigned long> m_uncalled, m_uncalledPairs, m_tagCounter, m_nBundles;
+ 	SeqInput<TSeqStr, TString> *m_f1, *m_f2, *m_b;
+ 	
+ public:
+diff --git a/src/PairedOutput.h b/src/PairedOutput.h
+index c0d3626..fae5d3f 100644
+--- a/src/PairedOutput.h
++++ b/src/PairedOutput.h
+@@ -18,7 +18,7 @@ class PairedOutput {
+ 	const bool m_isPaired, m_writeUnassigned, m_writeSingleReads, m_writeSingleReadsP;
+ 	const bool m_twoBarcodes, m_qtrimPostRm;
+ 	
+-    mutable FlexbarAtomic<unsigned long> m_nSingleReads, m_nLowPhred;
++    mutable std::atomic<unsigned long> m_nSingleReads, m_nLowPhred;
+ 
+ 	const std::string m_target;
+ 	


=====================================
debian/patches/series
=====================================
@@ -1,3 +1,6 @@
 no_march_native.patch
 # onetbb.patch
 195a1ab2c2715b07df5acff58dc2a0396d9cd52d.patch
+1c872fa10d474f090633fc95d409aa60607a3f96.patch
+19722f2743c96235ff57948eda82f963cf734131.patch
+a9b0eb87a391aeaf760f8116dca777749c8b4f96.patch



View it on GitLab: https://salsa.debian.org/med-team/flexbar/-/compare/25357847b4ac44308b1cfc134bafca93104dd5a2...44a3340db8e08c6674c8d514371baa5207c44986

-- 
View it on GitLab: https://salsa.debian.org/med-team/flexbar/-/compare/25357847b4ac44308b1cfc134bafca93104dd5a2...44a3340db8e08c6674c8d514371baa5207c44986
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20230210/2fa96034/attachment-0001.htm>


More information about the debian-med-commit mailing list