Commit 4da55e85 authored by mattijs's avatar mattijs
Browse files

BUG: master-only-reading : did not transfer headerClassName

parent ad5305ae
......@@ -561,10 +561,6 @@ int main(int argc, char *argv[])
mkDir(args.path());
}
// Switch timeStamp checking to one which does not do any
// parallel sync for same reason
regIOobject::fileModificationChecking = regIOobject::timeStamp;
# include "createTime.H"
......
......@@ -66,6 +66,11 @@ void Foam::IOdictionary::readFile(const bool masterOnly)
: Pstream::treeCommunication()
);
// Master reads headerclassname from file. Make sure this gets
// transfered as well as contents.
word masterClassName = headerClassName();
Pstream::scatter(comms, masterClassName);
// Get my communication order
const Pstream::commsStruct& myComm = comms[Pstream::myProcNo()];
......@@ -89,6 +94,7 @@ void Foam::IOdictionary::readFile(const bool masterOnly)
IOstream::ASCII
);
IOdictionary::readData(fromAbove);
const_cast<word&>(headerClassName()) = masterClassName;
}
// Send to my downstairs neighbours
......
......@@ -201,6 +201,11 @@ bool Foam::regIOobject::read()
: Pstream::treeCommunication()
);
// Master reads headerclassname from file. Make sure this gets
// transfered as well as contents.
word masterClassName = headerClassName();
Pstream::scatter(comms, masterClassName);
// Get my communication order
const Pstream::commsStruct& myComm = comms[Pstream::myProcNo()];
......@@ -226,6 +231,7 @@ bool Foam::regIOobject::read()
IOstream::ASCII
);
ok = readData(fromAbove);
const_cast<word&>(headerClassName()) = masterClassName;
}
// Send to my downstairs neighbours
......
......@@ -84,7 +84,11 @@ Foam::solution::solution
dictName,
obr.time().system(),
obr,
IOobject::MUST_READ_IF_MODIFIED,
(
obr.readOpt() == IOobject::MUST_READ
? IOobject::MUST_READ_IF_MODIFIED
: obr.readOpt()
),
IOobject::NO_WRITE
)
),
......@@ -94,7 +98,14 @@ Foam::solution::solution
defaultRelaxationFactor_(0),
solvers_(ITstream("solvers", tokenList())())
{
read(solutionDict());
if
(
readOpt() == IOobject::MUST_READ
|| readOpt() == IOobject::MUST_READ_IF_MODIFIED
)
{
read(solutionDict());
}
}
......
......@@ -256,7 +256,11 @@ Foam::fvSchemes::fvSchemes(const objectRegistry& obr)
"fvSchemes",
obr.time().system(),
obr,
IOobject::MUST_READ_IF_MODIFIED,
(
obr.readOpt() == IOobject::MUST_READ
? IOobject::MUST_READ_IF_MODIFIED
: obr.readOpt()
),
IOobject::NO_WRITE
)
),
......@@ -364,7 +368,14 @@ Foam::fvSchemes::fvSchemes(const objectRegistry& obr)
// persistent settings across reads is incorrect
clear();
read(schemesDict());
if
(
readOpt() == IOobject::MUST_READ
|| readOpt() == IOobject::MUST_READ_IF_MODIFIED
)
{
read(schemesDict());
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment