Commit 52419cef authored by Backofen, Rainer's avatar Backofen, Rainer

Error message for missing file in deserialization

parent 5ce8ac8b
......@@ -82,7 +82,7 @@ namespace AMDiS {
// serialization file mentioned in the used init file.
MSG("Deserialization from file: %s\n", queueSerializationFilename.c_str());
std::ifstream in(queueSerializationFilename.c_str());
std::ifstream in(queueSerializationFilename.c_str() , ios::in);
deserialize(in);
in.close();
......@@ -388,7 +388,8 @@ namespace AMDiS {
void AdaptInstationary::deserialize(std::istream &in)
{
FUNCNAME("AdaptInstationary::deserialize()");
if(in.fail())
ERROR_EXIT("File not found for deserialization \n");
problemIteration->deserialize(in);
adaptInfo->deserialize(in);
if (problemTime)
......
......@@ -196,11 +196,11 @@ namespace AMDiS {
// If AMDiS is compiled for parallel computations, the deserialization is
// controlled by the parallel problem object.
#ifndef HAVE_PARALLEL_DOMAIN_AMDIS
MSG("Deserialization from file: %s\n", serializationFilename.c_str());
ifstream in(serializationFilename.c_str());
deserialize(in);
in.close();
MSG("Deserialization from file: %s\n", serializationFilename.c_str());
#endif
deserialized = true;
......@@ -1814,6 +1814,8 @@ namespace AMDiS {
void ProblemStatSeq::deserialize(istream &in)
{
FUNCNAME("ProblemStat::deserialize()");
if(in.fail())
ERROR_EXIT("File not found for deserialization \n");
for (unsigned int i = 0; i < meshes.size(); i++)
meshes[i]->deserialize(in);
......
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