1
0
mirror of https://github.com/paboyle/Grid.git synced 2025-06-13 04:37:05 +01:00

Hadrons: A2A vector write can fail and retry

This commit is contained in:
2018-11-26 19:47:03 +00:00
parent bccfd4cbb3
commit 10fc263675
2 changed files with 102 additions and 25 deletions

View File

@ -44,16 +44,24 @@ BEGIN_HADRONS_NAMESPACE
******************************************************************************/
BEGIN_MODULE_NAMESPACE(MSolver)
class A2AVectorsIoPar: Serializable
{
public:
GRID_SERIALIZABLE_CLASS_MEMBERS(A2AVectorsIoPar,
std::string, filestem,
bool, multiFile,
int, maxRetry);
};
class A2AVectorsPar: Serializable
{
public:
GRID_SERIALIZABLE_CLASS_MEMBERS(A2AVectorsPar,
std::string, noise,
std::string, action,
std::string, eigenPack,
std::string, solver,
std::string, output,
bool, multiFile);
std::string, noise,
std::string, action,
std::string, eigenPack,
std::string, solver,
A2AVectorsIoPar, output);
};
template <typename FImpl, typename Pack>
@ -240,13 +248,17 @@ void TA2AVectors<FImpl, Pack>::execute(void)
}
// I/O if necessary
if (!par().output.empty())
if (!par().output.filestem.empty())
{
startTimer("V I/O");
A2AVectorsIo::write(par().output + "_v", v, par().multiFile, vm().getTrajectory());
A2AVectorsIo::write(par().output.filestem + "_v", v,
par().output.multiFile, vm().getTrajectory(),
par().output.maxRetry);
stopTimer("V I/O");
startTimer("W I/O");
A2AVectorsIo::write(par().output + "_w", w, par().multiFile, vm().getTrajectory());
A2AVectorsIo::write(par().output.filestem + "_w", w,
par().output.multiFile, vm().getTrajectory(),
par().output.maxRetry);
stopTimer("W I/O");
}
}