From bc55c5ef8c87f289d3bebe06cb67c3e09aebc2f1 Mon Sep 17 00:00:00 2001 From: Celine Mercier Date: Tue, 10 Sep 2019 15:37:33 +0200 Subject: [PATCH] obi clean: fixed an openmp bug where the share size would be 0 blocking the program --- src/obi_clean.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/obi_clean.c b/src/obi_clean.c index efc044f..0c367a3 100755 --- a/src/obi_clean.c +++ b/src/obi_clean.c @@ -18,6 +18,7 @@ #include #include #include +#include #include "obi_clean.h" #include "obidms.h" @@ -426,7 +427,7 @@ int obi_clean(const char* dms_name, byte_t ali_result; // Parallelize the loop on samples to avoid interdependency issues inside one sample - #pragma omp for schedule(dynamic, (sample_count/thread_count)) + #pragma omp for schedule(dynamic, sample_count/thread_count + (sample_count % thread_count != 0)) // Avoid 0 which blocks the program for (sample=0; sample < sample_count; sample++) { sample_count_array = complete_sample_count_array+(sample*seq_count);