From b512f742ff95fba89bbc9958972667c7643edba5 Mon Sep 17 00:00:00 2001 From: Xun Li Date: Fri, 30 Jun 2023 20:51:51 -0700 Subject: [PATCH] fix incorrect pthread_join in maxp (#7) --- clustering/azp.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/clustering/azp.cpp b/clustering/azp.cpp index 00da5c1..299d2f8 100644 --- a/clustering/azp.cpp +++ b/clustering/azp.cpp @@ -1186,7 +1186,7 @@ void MaxpRegion::PhaseConstructionThreaded() perror("Thread create failed."); } } - for (int j = 0; j < nCPUs; j++) { + for (int j = 0; j < tot_threads; j++) { pthread_join(threadPool[j], NULL); } delete[] args; @@ -1242,7 +1242,7 @@ void MaxpRegion::PhaseLocalImprovementThreaded() perror("Thread create failed."); } } - for (int j = 0; j < nCPUs; j++) { + for (int j = 0; j < tot_threads; j++) { pthread_join(threadPool[j], NULL); } delete[] args;