Skip to content

Commit

Permalink
Fix NodeColumns::gather/scatter with mpi_comm for broadcast of metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
wdeconinck committed Sep 22, 2023
1 parent 184134b commit 13ad416
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/atlas/functionspace/NodeColumns.cc
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,8 @@ const parallel::HaloExchange& NodeColumns::halo_exchange() const {
void NodeColumns::gather(const FieldSet& local_fieldset, FieldSet& global_fieldset) const {
ATLAS_ASSERT(local_fieldset.size() == global_fieldset.size());

mpi::Scope mpi_scope(mpi_comm());

for (idx_t f = 0; f < local_fieldset.size(); ++f) {
const Field& loc = local_fieldset[f];
Field& glb = global_fieldset[f];
Expand Down Expand Up @@ -507,6 +509,7 @@ const parallel::GatherScatter& NodeColumns::scatter() const {
void NodeColumns::scatter(const FieldSet& global_fieldset, FieldSet& local_fieldset) const {
ATLAS_ASSERT(local_fieldset.size() == global_fieldset.size());

mpi::Scope mpi_scope(mpi_comm());
for (idx_t f = 0; f < local_fieldset.size(); ++f) {
const Field& glb = global_fieldset[f];
Field& loc = local_fieldset[f];
Expand Down

0 comments on commit 13ad416

Please sign in to comment.