Skip to content
Snippets Groups Projects
Commit 811f3e87 authored by Siqi Ling's avatar Siqi Ling
Browse files

fix a bug when arh3writer is used directly by usr in parallel

parent 4678a381
Branches
Tags
No related merge requests found
......@@ -231,7 +231,7 @@ namespace AMDiS
createSubDir > 0);
}
#endif
Arh3Writer::writeFile(solutionVecs, fn + ".arh");
Arh3Writer::writeFile(solutionVecs, fn + ".arh", false);
}
......
......@@ -219,7 +219,25 @@ namespace AMDiS { namespace io {
TEST_EXIT(nameset.size() == vecs.size())
("DOFVectors in vecs cannot have idential name. Please check.\n");
#ifdef HAVE_PARALLEL_DOMAIN_AMDIS
if (writeParallel) {
using boost::lexical_cast;
int sPos = filename.find(".arh");
TEST_EXIT(sPos >= 0)("Failed to find file postfix!\n");
string name = filename.substr(0, sPos);
std::vector<int> macroIdx;
Mesh* mesh_ = mesh ? mesh : vecs[0]->getFeSpace()->getMesh();
if (MPI::COMM_WORLD.Get_rank() == 0)
writeParallelFile(name + ".parh", mesh_, false);
filename = name + "-p" + lexical_cast<string>(MPI::COMM_WORLD.Get_rank()) + "-.arh";
}
#endif
bool multiMesh = meshset.size() > 1;
//if mesh exists, the meshes in vecs should be the same.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment