From a2a1417f57577d69c7d17c5fba40c2aa90510406 Mon Sep 17 00:00:00 2001 From: Bo Li Date: Sat, 2 Apr 2011 01:47:49 -0500 Subject: [PATCH] fix a bug in partition reads for parallel --- EM.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EM.cpp b/EM.cpp index 318b7eb..aa7ebdb 100644 --- a/EM.cpp +++ b/EM.cpp @@ -128,7 +128,7 @@ void init(ReadReader **&readers, HitContainer **&hitvs, doubl if (!readers[i]->locate(curnr)) { fprintf(stderr, "Read indices files do not match!\n"); exit(-1); } //assert(readers[i]->locate(curnr)); - while (nrLeft > ntLeft && hitvs[i]->getNHits() < nhT) { + while (nrLeft > ntLeft && (i == nThreads - 1 || hitvs[i]->getNHits() < nhT)) { if (!hitvs[i]->read(fin)) { fprintf(stderr, "Cannot read alignments from .dat file!\n"); exit(-1); } //assert(hitvs[i]->read(fin)); --nrLeft; -- 2.39.2