1
0
mirror of https://github.com/paboyle/Grid.git synced 2025-06-17 07:17:06 +01:00

Hadrons: MPI-safe serial IO

This commit is contained in:
2018-01-23 17:26:50 +00:00
parent 6e3ce7423e
commit a1151fc734
15 changed files with 55 additions and 56 deletions

View File

@ -151,11 +151,10 @@ void TDiv<SImpl>::execute(void)
if (!par().output.empty())
{
Result r;
ResultWriter writer(RESULT_FILE_NAME(par().output));
r.type = par().type;
r.value = TensorRemove(sum(div));
write(writer, "div", r);
saveResult(par().output, "div", r);
}
}

View File

@ -120,7 +120,6 @@ void TTrMag<SImpl>::execute(void)
<< "..." << std::endl;
std::vector<Result> result;
ResultWriter writer(RESULT_FILE_NAME(par().output));
auto &phi = envGet(Field, par().field);
auto m2 = sum(phi), mn = m2;
@ -136,7 +135,7 @@ void TTrMag<SImpl>::execute(void)
r.value = TensorRemove(trace(mn)).real();
result.push_back(r);
}
write(writer, "trmag", result);
saveResult(par().output, "trmag", result);
}
END_MODULE_NAMESPACE

View File

@ -162,9 +162,7 @@ void TTrPhi<SImpl>::execute(void)
}
if (result.size() > 0)
{
ResultWriter writer(RESULT_FILE_NAME(par().output));
write(writer, "trphi", result);
saveResult(par().output, "trphi", result);
}
}

View File

@ -129,7 +129,6 @@ void TTwoPoint<SImpl>::execute(void)
LOG(Message) << " '" << o << "'" << std::endl;
}
ResultWriter writer(RESULT_FILE_NAME(par().output));
const unsigned int nd = env().getDim().size();
std::vector<Result> result;
@ -150,7 +149,7 @@ void TTwoPoint<SImpl>::execute(void)
r.data = makeTwoPoint(slicedOp[i], slicedOp[j]);
result.push_back(r);
}
write(writer, "twopt", result);
saveResult(par().output, "twopt", result);
}
// make 2-pt function //////////////////////////////////////////////////////////