1
0
mirror of https://github.com/paboyle/Grid.git synced 2026-01-10 20:09:33 +00:00

Hadrons: better handling of automatic directory creation

This commit is contained in:
2018-05-07 19:43:40 +01:00
parent 2017e4e3b4
commit f362c00739
4 changed files with 19 additions and 22 deletions

View File

@@ -170,14 +170,8 @@ protected:
{
ScidacWriter binWriter(evec[0]._grid->IsBoss());
XmlWriter xmlWriter("", "eigenPackPar");
std::string d = dirname(filename);
int status = mkdir(d);
if (status)
{
HADRONS_ERROR(Io, "cannot create directory '" + d
+ "' (status " + std::to_string(status) + ")");
}
makeFileDir(filename, evec[0]._grid);
xmlWriter.pushXmlString(record.operatorXml);
xmlWriter.pushXmlString(record.solverXml);
binWriter.open(filename);
@@ -201,14 +195,8 @@ protected:
ScidacWriter binWriter(evec._grid->IsBoss());
XmlWriter xmlWriter("", "eigenPackPar");
VecRecord vecRecord;
std::string d = dirname(filename);
int status = mkdir(d);
if (status)
{
HADRONS_ERROR(Io, "cannot create directory '" + d
+ "' (status " + std::to_string(status) + ")");
}
makeFileDir(filename, evec._grid);
xmlWriter.pushXmlString(record.operatorXml);
xmlWriter.pushXmlString(record.solverXml);
binWriter.open(filename);