Skip to content
Snippets Groups Projects
Commit 6fd4d852 authored by Thomas Witkowski's avatar Thomas Witkowski
Browse files

Save juropa data before shutdown.

parent 9fb0bb12
Branches
Tags
No related merge requests found
...@@ -601,7 +601,7 @@ namespace AMDiS { ...@@ -601,7 +601,7 @@ namespace AMDiS {
for (vector<ElementObjectData>::iterator it = objData->begin(); for (vector<ElementObjectData>::iterator it = objData->begin();
it != objData->end(); ++it) { it != objData->end(); ++it) {
int elRank = (*macroElementRankMap)[it->elIndex]; int elRank = (*macroElementRankMap)[it->elIndex];
if (allRanks || levelData->getLevelRanks(level).count(elRank)) // if (allRanks || levelData->getLevelRanks(level).count(elRank))
owner = std::max(owner, elRank); owner = std::max(owner, elRank);
} }
......
...@@ -35,8 +35,8 @@ namespace AMDiS { ...@@ -35,8 +35,8 @@ namespace AMDiS {
Mesh *mesh = elObjDb.getMesh(); Mesh *mesh = elObjDb.getMesh();
TEST_EXIT_DBG(mesh)("Should not happen!\n"); TEST_EXIT_DBG(mesh)("Should not happen!\n");
int mpiRank = levelData.getMpiComm(0); MPI::Intracomm mpiComm = MPI::COMM_WORLD; //levelData.getMpiComm(level);
MPI::Intracomm mpiComm = levelData.getMpiComm(level); int mpiRank = mpiComm.Get_rank();
std::set<int> levelRanks = levelData.getLevelRanks(level); std::set<int> levelRanks = levelData.getLevelRanks(level);
// === Create interior boundary data structure. === // === Create interior boundary data structure. ===
...@@ -47,10 +47,14 @@ namespace AMDiS { ...@@ -47,10 +47,14 @@ namespace AMDiS {
while (elObjDb.iterate(geoIndex)) { while (elObjDb.iterate(geoIndex)) {
map<int, ElementObjectData>& objData = elObjDb.getIterateData(); map<int, ElementObjectData>& objData = elObjDb.getIterateData();
MSG("TEST BOUNDARY: %d, %d %d\n", mpiRank, objData.count(mpiRank), objData.size());
// Test, if this is a boundary object of this rank. // Test, if this is a boundary object of this rank.
if (!(objData.count(mpiRank) && objData.size() > 1)) if (!(objData.count(mpiRank) && objData.size() > 1))
continue; continue;
MSG("CREATE BOUNDARY!\n");
#if 0 #if 0
// Test, if the boundary object defines an interior boundary within the // Test, if the boundary object defines an interior boundary within the
// ranks of the MPI group. If not, go to next element. // ranks of the MPI group. If not, go to next element.
......
...@@ -1545,6 +1545,8 @@ namespace AMDiS { ...@@ -1545,6 +1545,8 @@ namespace AMDiS {
if (!createBoundaryDofFlag.isSet(BOUNDARY_SUBOBJ_SORTED)) if (!createBoundaryDofFlag.isSet(BOUNDARY_SUBOBJ_SORTED))
return; return;
MSG("START CREATE!\n");
int nLevels = levelData.getLevelNumber(); int nLevels = levelData.getLevelNumber();
boundaryDofInfo.resize(nLevels); boundaryDofInfo.resize(nLevels);
...@@ -1553,6 +1555,8 @@ namespace AMDiS { ...@@ -1553,6 +1555,8 @@ namespace AMDiS {
for (int level = 0; level < nLevels; level++) { for (int level = 0; level < nLevels; level++) {
MSG("ONE RUN!\n");
// === Clear data. === // === Clear data. ===
for (int geo = FACE; geo >= VERTEX; geo--) for (int geo = FACE; geo >= VERTEX; geo--)
boundaryDofInfo[level][feSpace].geoDofs[static_cast<GeoIndex>(geo)].clear(); boundaryDofInfo[level][feSpace].geoDofs[static_cast<GeoIndex>(geo)].clear();
......
...@@ -726,6 +726,8 @@ namespace AMDiS { ...@@ -726,6 +726,8 @@ namespace AMDiS {
if (tmp <= 0 && force == false) if (tmp <= 0 && force == false)
return; return;
MSG("Interior boundary info:\n");
for (InteriorBoundary::iterator it(pdb.intBoundary.own, level); for (InteriorBoundary::iterator it(pdb.intBoundary.own, level);
!it.end(); ++it) { !it.end(); ++it) {
MSG("Rank owned boundary with rank %d: \n", it.getRank()); MSG("Rank owned boundary with rank %d: \n", it.getRank());
......
...@@ -26,6 +26,11 @@ namespace AMDiS { ...@@ -26,6 +26,11 @@ namespace AMDiS {
nonRankDofs.clear(); nonRankDofs.clear();
nonRankDofs.resize(nLevel); nonRankDofs.resize(nLevel);
nRankDofs.clear();
nLocalDofs.clear();
nOverallDofs.clear();
rStartDofs.clear();
nRankDofs.resize(nLevel, 0); nRankDofs.resize(nLevel, 0);
nLocalDofs.resize(nLevel, 0); nLocalDofs.resize(nLevel, 0);
nOverallDofs.resize(nLevel, 0); nOverallDofs.resize(nLevel, 0);
......
...@@ -353,6 +353,8 @@ namespace AMDiS { ...@@ -353,6 +353,8 @@ namespace AMDiS {
DofContainerSet& vertices = DofContainerSet& vertices =
meshDistributor->getBoundaryDofInfo(feSpace, meshLevel).geoDofs[VERTEX]; meshDistributor->getBoundaryDofInfo(feSpace, meshLevel).geoDofs[VERTEX];
MSG("SIZE IF VERTEX: %d\n", vertices.size());
DofIndexSet primals; DofIndexSet primals;
for (DofContainerSet::iterator it = vertices.begin(); for (DofContainerSet::iterator it = vertices.begin();
it != vertices.end(); ++it) it != vertices.end(); ++it)
......
...@@ -35,6 +35,8 @@ BOOST_AUTO_TEST_CASE(amdis_mpi_feti) ...@@ -35,6 +35,8 @@ BOOST_AUTO_TEST_CASE(amdis_mpi_feti)
feti.initialize(feSpaces); feti.initialize(feSpaces);
feti.createFetiData(); feti.createFetiData();
ParallelDebug::printBoundaryInfo(*meshDist, 0, true);
BOOST_REQUIRE(feti.getNumberOfPrimals() == 21); BOOST_REQUIRE(feti.getNumberOfPrimals() == 21);
BOOST_REQUIRE(feti.getNumberOfDuals() == 48); BOOST_REQUIRE(feti.getNumberOfDuals() == 48);
...@@ -52,12 +54,19 @@ BOOST_AUTO_TEST_CASE(amdis_mpi_feti) ...@@ -52,12 +54,19 @@ BOOST_AUTO_TEST_CASE(amdis_mpi_feti)
testData.push_back(dofMap[feSpace].nOverallDofs[0]); testData.push_back(dofMap[feSpace].nOverallDofs[0]);
BOOST_REQUIRE(data.size() - 1 == testData.size()); BOOST_REQUIRE(data.size() - 1 == testData.size());
BOOST_REQUIRE(equal(data.begin() + 1, data.end(), testData.begin())); for (int i = 0; i < 5; i++) {
MSG("TEST FOR %d: %f %f\n", i, data[i + 1], testData[i]);
if (data[i + 1] != testData[i]) {
MSG("Wrong data in column %d: %f %f\n", i, data[i + 1], testData[i]);
BOOST_ERROR("");
}
}
ellipt.getRefinementManager()->globalRefine(mesh, 6); ellipt.getRefinementManager()->globalRefine(mesh, 6);
meshDist->checkMeshChange(); meshDist->checkMeshChange();
feti.createFetiData(); feti.createFetiData();
ParallelDebug::printBoundaryInfo(*meshDist, 0, true);
sheet.read("data/data0002b"); sheet.read("data/data0002b");
...@@ -70,7 +79,15 @@ BOOST_AUTO_TEST_CASE(amdis_mpi_feti) ...@@ -70,7 +79,15 @@ BOOST_AUTO_TEST_CASE(amdis_mpi_feti)
testData.push_back(dofMap[feSpace].nOverallDofs[0]); testData.push_back(dofMap[feSpace].nOverallDofs[0]);
BOOST_REQUIRE(data.size() - 1 == testData.size()); BOOST_REQUIRE(data.size() - 1 == testData.size());
BOOST_REQUIRE(equal(data.begin() + 1, data.end(), testData.begin())); for (int i = 0; i < 5; i++) {
MSG("TEST FOR %d: %f %f\n", i, data[i + 1], testData[i]);
if (data[i + 1] != testData[i]) {
MSG("Wrong data in column %d: %f %f\n", i, data[i + 1], testData[i]);
BOOST_ERROR("");
}
}
// BOOST_REQUIRE(equal(data.begin() + 1, data.end(), testData.begin()));
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment