Commit bc55c5ef by Celine Mercier

obi clean: fixed an openmp bug where the share size would be 0 blocking

the program
parent f3b0e10c
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
#include <stdbool.h> #include <stdbool.h>
#include <search.h> #include <search.h>
#include <sys/time.h> #include <sys/time.h>
#include <math.h>
#include "obi_clean.h" #include "obi_clean.h"
#include "obidms.h" #include "obidms.h"
...@@ -426,7 +427,7 @@ int obi_clean(const char* dms_name, ...@@ -426,7 +427,7 @@ int obi_clean(const char* dms_name,
byte_t ali_result; byte_t ali_result;
// Parallelize the loop on samples to avoid interdependency issues inside one sample // 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++) for (sample=0; sample < sample_count; sample++)
{ {
sample_count_array = complete_sample_count_array+(sample*seq_count); sample_count_array = complete_sample_count_array+(sample*seq_count);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment