This is an automated email from the git hooks/post-receive script. logari81 pushed a commit to branch mpi-fixes in repository getfem.
The following commit(s) were added to refs/heads/mpi-fixes by this push: new cb06b64 MPI fixes form model residual assembly cb06b64 is described below commit cb06b642bac2466c534a37418354f87648e54677 Author: Konstantinos Poulios <logar...@gmail.com> AuthorDate: Sun May 23 14:38:53 2021 +0200 MPI fixes form model residual assembly --- src/getfem_models.cc | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/getfem_models.cc b/src/getfem_models.cc index fbbd361..40ff2e8 100644 --- a/src/getfem_models.cc +++ b/src/getfem_models.cc @@ -2845,7 +2845,9 @@ namespace getfem { } if (version & BUILD_RHS) { - approx_external_load_ = MPI_SUM_SCALAR(approx_external_load_); + // some contributions are added only in the master process + // send the correct result to all other processes + MPI_BCAST0_SCALAR(approx_external_load_); } #if GETFEM_PARA_LEVEL > 1 @@ -3281,10 +3283,14 @@ namespace getfem { gmm::clear(vecl[0]); if (expr.size()) { + const mesh_im &mim = *mims[0]; + mesh_region rg(region); + mim.linked_mesh().intersect_with_mpi_region(rg); + // reenables disabled variables ga_workspace workspace(md, ga_workspace::inherit::ALL); GMM_TRACE2(name << ": generic source term assembly"); - workspace.add_expression(expr, *(mims[0]), region, 1, secondary_domain); + workspace.add_expression(expr, mim, rg, 1, secondary_domain); workspace.assembly(1); const auto &V=workspace.assembled_vector(); for (size_type i = 0; i < vl_test1.size(); ++i) {