From 5dfd216a34b227c8aad1c00b893dfc5a5108576e Mon Sep 17 00:00:00 2001 From: paboyle Date: Mon, 4 Jun 2018 21:08:44 +0100 Subject: [PATCH] Better thread safety --- lib/algorithms/iterative/ImplicitlyRestartedLanczos.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/algorithms/iterative/ImplicitlyRestartedLanczos.h b/lib/algorithms/iterative/ImplicitlyRestartedLanczos.h index cee566e6..64f1e9a7 100644 --- a/lib/algorithms/iterative/ImplicitlyRestartedLanczos.h +++ b/lib/algorithms/iterative/ImplicitlyRestartedLanczos.h @@ -57,9 +57,8 @@ void basisRotate(std::vector &basis,Eigen::MatrixXd& Qt,int j0, int j1, i parallel_region { - Vector < vobj > B; // Thread private - PARALLEL_CRITICAL { B.resize(Nm); } + std::vector < vobj , commAllocator > B(Nm); // Thread private parallel_for_internal(int ss=0;ss < grid->oSites();ss++){ for(int j=j0; j