1
0
mirror of https://github.com/paboyle/Grid.git synced 2025-04-05 03:35:55 +01:00

Better thread safety

This commit is contained in:
paboyle 2018-06-04 21:08:44 +01:00
parent c2e8d0aa88
commit 5dfd216a34

View File

@ -57,9 +57,8 @@ void basisRotate(std::vector<Field> &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<vobj> > B(Nm); // Thread private
parallel_for_internal(int ss=0;ss < grid->oSites();ss++){
for(int j=j0; j<j1; ++j) B[j]=0.;