Skip to content

Fix potential parallelism issue in MapToContigs for single-end reads#387

Open
YYQ0713 wants to merge 1 commit intovoutcn:masterfrom
YYQ0713:yyq
Open

Fix potential parallelism issue in MapToContigs for single-end reads#387
YYQ0713 wants to merge 1 commit intovoutcn:masterfrom
YYQ0713:yyq

Conversation

@YYQ0713
Copy link
Copy Markdown

@YYQ0713 YYQ0713 commented Nov 17, 2025

In MapToContigs, the OpenMP directive for single-end reads lacks a for clause:

#pragma omp parallel reduction(+ : num_added, num_mapped)
for (size_t i = 0; i < lib.seq_count(); ++i) { ... }

This may cause the loop iterations to not be correctly distributed across threads. Adding for ensures proper parallel iteration:

#pragma omp parallel for reduction(+ : num_added, num_mapped)
for (size_t i = 0; i < lib.seq_count(); ++i) { ... }

This change aligns the behavior with the intended parallel processing. I’m not certain if the original omission had a specific reason, so this PR just suggests the adjustment for more consistent parallelism.

@YYQ0713
Copy link
Copy Markdown
Author

YYQ0713 commented Dec 21, 2025

#377 #385 I suspect this might be the cause of these problems.

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

Successfully merging this pull request may close these issues.

1 participant