Skip to content

Commit 18f679e

Browse files
Merge pull request #6401 from ggouaillardet/topic/osc_rdma_self
osc/rdma: correctly handle communications to self
2 parents 19cbd00 + fe05fcc commit 18f679e

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

ompi/mca/osc/rdma/osc_rdma_component.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
* Copyright (c) 2016-2017 IBM Corporation. All rights reserved.
2020
* Copyright (c) 2018 Cisco Systems, Inc. All rights reserved
2121
* Copyright (c) 2018 Amazon.com, Inc. or its affiliates. All Rights reserved.
22+
* Copyright (c) 2019 Research Organization for Information Science
23+
* and Technology (RIST). All rights reserved.
2224
* $COPYRIGHT$
2325
*
2426
* Additional copyrights may follow
@@ -722,7 +724,13 @@ static int allocate_state_shared (ompi_osc_rdma_module_t *module, void **base, s
722724

723725
ompi_osc_module_add_peer (module, peer);
724726

725-
if (MPI_WIN_FLAVOR_DYNAMIC == module->flavor || 0 == temp[i].size) {
727+
if (MPI_WIN_FLAVOR_DYNAMIC == module->flavor) {
728+
if (module->use_cpu_atomics && peer_rank == my_rank) {
729+
peer->flags |= OMPI_OSC_RDMA_PEER_LOCAL_BASE;
730+
}
731+
/* nothing more to do */
732+
continue;
733+
} else if (0 == temp[i].size) {
726734
/* nothing more to do */
727735
continue;
728736
}

0 commit comments

Comments
 (0)