From 4c2d348385d858cd957d1d6187800b504382a8bd Mon Sep 17 00:00:00 2001 From: Thomas Witkowski <thomas.witkowski@gmx.de> Date: Fri, 25 Sep 2009 07:51:00 +0000 Subject: [PATCH] Fix some bugs which makes petsc assembling a little bit slow. --- AMDiS/libtool | 6 +++--- AMDiS/src/ParallelDomainBase.cc | 13 ++++++------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/AMDiS/libtool b/AMDiS/libtool index 4c12058b..e5172c05 100755 --- a/AMDiS/libtool +++ b/AMDiS/libtool @@ -44,7 +44,7 @@ available_tags=" CXX F77" # ### BEGIN LIBTOOL CONFIG -# Libtool was configured on host deimos101: +# Libtool was configured on host deimos104: # Shell to use when invoking shell scripts. SHELL="/bin/sh" @@ -6760,7 +6760,7 @@ build_old_libs=`case $build_libtool_libs in yes) $echo no;; *) $echo yes;; esac` # End: # ### BEGIN LIBTOOL TAG CONFIG: CXX -# Libtool was configured on host deimos101: +# Libtool was configured on host deimos104: # Shell to use when invoking shell scripts. SHELL="/bin/sh" @@ -7065,7 +7065,7 @@ include_expsyms="" # ### BEGIN LIBTOOL TAG CONFIG: F77 -# Libtool was configured on host deimos101: +# Libtool was configured on host deimos104: # Shell to use when invoking shell scripts. SHELL="/bin/sh" diff --git a/AMDiS/src/ParallelDomainBase.cc b/AMDiS/src/ParallelDomainBase.cc index 08839103..b0e857f9 100644 --- a/AMDiS/src/ParallelDomainBase.cc +++ b/AMDiS/src/ParallelDomainBase.cc @@ -150,11 +150,7 @@ namespace AMDiS { void ParallelDomainBase::exitParallelization(AdaptInfo *adaptInfo) - { - VecDestroy(petscRhsVec); - VecDestroy(petscSolVec); - VecDestroy(petscTmpVec); - } + {} void ParallelDomainBase::updateDofAdmins() @@ -396,6 +392,7 @@ namespace AMDiS { for (RankToDofContainer::iterator it = recvDofs.begin(); it != recvDofs.end(); ++it) { int nSend = sendMatrixEntry[it->first].size(); + request[requestCounter++] = mpiComm.Isend(&nSend, 1, MPI_INT, it->first, 0); if (nSend > 0) { @@ -467,7 +464,7 @@ namespace AMDiS { for (int j = 0; j < recvSize[i]; j++) { int r = recvBuffers[i][j * 2]; int c = recvBuffers[i][j * 2 + 1]; - + r -= rstart * nComponents; TEST_EXIT_DBG(r >= 0 && r < nRankRows)("Should not happen!\n"); @@ -475,13 +472,15 @@ namespace AMDiS { if (c < rstart * nComponents || c >= rstart * nComponents + nRankRows) o_nnz[r]++; + else + d_nnz[r]++; } delete [] recvBuffers[i]; } i++; - } + } MatCreateMPIAIJ(PETSC_COMM_WORLD, nRankRows, nRankRows, nOverallRows, nOverallRows, 0, d_nnz, 0, o_nnz, &petscMatrix); -- GitLab