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

Bugfix in petsc assembling.

parent 7290ce57
No related branches found
No related tags found
No related merge requests found
...@@ -409,9 +409,10 @@ namespace AMDiS { ...@@ -409,9 +409,10 @@ namespace AMDiS {
it != recvDofs.end(); ++it) { it != recvDofs.end(); ++it) {
int nSend = sendMatrixEntry[it->first].size(); int nSend = sendMatrixEntry[it->first].size();
if (nSend > 0) if (nSend > 0) {
request[requestCounter++] = request[requestCounter++] =
mpiComm.Isend(sendBuffers[i], nSend * 2, MPI_INT, it->first, 0); mpiComm.Isend(sendBuffers[i], nSend * 2, MPI_INT, it->first, 0);
}
i++; i++;
} }
...@@ -436,10 +437,10 @@ namespace AMDiS { ...@@ -436,10 +437,10 @@ namespace AMDiS {
} }
MPI::Request::Waitall(requestCounter, request); MPI::Request::Waitall(requestCounter, request);
for (int j = 0; j < static_cast<int>(sendBuffers.size()); j++) for (int j = 0; j < static_cast<int>(sendBuffers.size()); j++)
if (sendBuffers[j]) if (sendBuffers[j])
delete [] sendBuffers[j]; delete [] sendBuffers[j];
i = 0; i = 0;
for (RankToDofContainer::iterator it = sendDofs.begin(); for (RankToDofContainer::iterator it = sendDofs.begin();
...@@ -450,7 +451,7 @@ namespace AMDiS { ...@@ -450,7 +451,7 @@ namespace AMDiS {
int c = recvBuffers[i][j * 2 + 1]; int c = recvBuffers[i][j * 2 + 1];
r -= rstart * nComponents; r -= rstart * nComponents;
TEST_EXIT_DBG(r >= 0 && r < nRankRows)("Should not happen!\n"); TEST_EXIT_DBG(r >= 0 && r < nRankRows)("Should not happen!\n");
if (c < rstart * nComponents || if (c < rstart * nComponents ||
...@@ -460,6 +461,8 @@ namespace AMDiS { ...@@ -460,6 +461,8 @@ namespace AMDiS {
delete [] recvBuffers[i]; delete [] recvBuffers[i];
} }
i++;
} }
INFO(info, 8)("Fill petsc matrix 1 needed %.5f seconds\n", TIME_USED(first, clock())); INFO(info, 8)("Fill petsc matrix 1 needed %.5f seconds\n", TIME_USED(first, clock()));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment