Liebe Gitlab-Nutzer, lieber Gitlab-Nutzer,
es ist nun möglich sich mittels des ZIH-Logins/LDAP an unserem Dienst anzumelden. Die Konten der externen Nutzer:innen sind über den Reiter "Standard" erreichbar.
Die Administratoren


Dear Gitlab user,
it is now possible to log in to our service using the ZIH login/LDAP. The accounts of external users can be accessed via the "Standard" tab.
The administrators

Commit b115e944 authored by Thomas Witkowski's avatar Thomas Witkowski
Browse files

Small changes and code refactoring in parallel AMDiS.

parent a71cce06
......@@ -137,14 +137,18 @@ namespace AMDiS {
if (!reverseOrder) {
if (s1 != -1)
addAlongSide(el->getFirstChild(), subObj, s1, el->getChildType(elType), reverseOrder);
addAlongSide(el->getFirstChild(), subObj, s1,
el->getChildType(elType), reverseOrder);
if (s2 != -1)
addAlongSide(el->getSecondChild(), subObj, s2, el->getChildType(elType), reverseOrder);
addAlongSide(el->getSecondChild(), subObj, s2,
el->getChildType(elType), reverseOrder);
} else {
if (s2 != -1)
addAlongSide(el->getSecondChild(), subObj, s2, el->getChildType(elType), reverseOrder);
addAlongSide(el->getSecondChild(), subObj, s2,
el->getChildType(elType), reverseOrder);
if (s1 != -1)
addAlongSide(el->getFirstChild(), subObj, s1, el->getChildType(elType), reverseOrder);
addAlongSide(el->getFirstChild(), subObj, s1,
el->getChildType(elType), reverseOrder);
}
}
}
......
......@@ -66,10 +66,8 @@ namespace AMDiS {
reset();
}
/** \brief
* Sets all position counters, that are used to traverse the code, to the starting
* position. The code itself is not changed.
*/
/// Sets all position counters, that are used to traverse the code, to the
/// starting position. The code itself is not changed.
void reset();
/// Returns whether the code is empty or not.
......
......@@ -51,7 +51,6 @@ namespace AMDiS {
{
FUNCNAME("ArhReader::read()");
#ifdef HAVE_PARALLEL_DOMAIN_AMDIS
if (writeParallel) {
using boost::lexical_cast;
int sPos = filename.find(".arh");
......@@ -59,8 +58,12 @@ namespace AMDiS {
string name = filename.substr(0, sPos);
if (nProcs == -1) {
#ifdef HAVE_PARALLEL_DOMAIN_AMDIS
string procFilename = name + "-p" + lexical_cast<string>(MPI::COMM_WORLD.Get_rank()) + "-.arh";
readFile(procFilename, mesh, vecs);
#else
ERROR_EXIT("Reading parallel ARH files in sequential computations requires to specify the number of nodes on which the ARH file was created!\n");
#endif
} else {
for (int i = 0; i < nProcs; i++) {
string procFilename = name + "-p" + lexical_cast<string>(i) + "-.arh";
......@@ -70,10 +73,6 @@ namespace AMDiS {
} else {
readFile(filename, mesh, vecs);
}
#else
readFile(filename, mesh, vecs);
#endif
MSG("ARH file read from: %s\n", filename.c_str());
}
......
......@@ -18,7 +18,8 @@ namespace AMDiS {
void DofComm::removeEmpty()
{
for (DataIter dit = data.begin(); dit != data.end(); ++dit) {
DataIter dit = data.begin();
while (dit != data.end()) {
FeMapIter it = dit->second.begin();
while (it != dit->second.end()) {
if (it->second.size() == 0) {
......@@ -28,6 +29,11 @@ namespace AMDiS {
} else
++it;
}
if (dit->second.size() == 0)
data.erase(dit++);
else
++dit;
}
}
......
......@@ -777,6 +777,9 @@ namespace AMDiS {
double first = MPI::Wtime();
int skip = 0;
Parameters::get("parallel->debug->skip check mesh change", skip);
// === If mesh has not been changed on all ranks, return. ===
int recvAllValues = 0;
......@@ -788,7 +791,8 @@ namespace AMDiS {
// === At least one rank mesh has been changed, so the boundaries must be ===
// === adapted to the new mesh structure. ===
if (skip == 0)
do {
bool meshChanged = false;
......
......@@ -785,7 +785,7 @@ namespace AMDiS {
{
FUNCNAME("ParallelDebug::writeCoordsFile()");
const FiniteElemSpace *feSpace = pdb.feSpaces[0];
const FiniteElemSpace *feSpace = pdb.feSpaces[pdb.feSpaces.size() - 1];
stringstream filename;
filename << prefix << "-" << pdb.mpiRank << "." << postfix;
......
......@@ -431,6 +431,7 @@ namespace AMDiS {
("Should not happen!\n");
int rowIndex = rowIt->first;
MatSetValues(petscMatrix, 1, &rowIndex, rowIt->second.size(),
&(rowIt->second[0]), &(valsMap[rowIt->first][0]), ADD_VALUES);
}
......
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