Skip to content

Commit fcd215d

Browse files
wzamazonbwbarrett
authored andcommitted
osc/rdma: Enforce required BTL remote completion
The RDMA OSC component requires remote completion for its synchronization algorithms to work properly. This is phase one of two to handle BTLs which do not provide remote completion. This patch requires "accelerated" BTLs to support remote completion. Accelerated BTLs are those which can communicate with all peers in the Window (so multiple BTLs per Window are not used), natively provide the required put/get/atomic operations, and which can register suitable memory for the window's communication. Signed-off-by: Wei Zhang <wzam@amazon.com> Signed-off-by: Brian Barrett <bbarrett@amazon.com>
1 parent cc2f5ef commit fcd215d

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

ompi/mca/osc/rdma/osc_rdma_component.c

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -957,15 +957,17 @@ static int ompi_osc_rdma_query_btls (ompi_communicator_t *comm, ompi_osc_rdma_mo
957957
}
958958

959959
if (btls_to_use) {
960-
/* rdma and atomics are only supported with BTLs at the moment */
960+
/* rdma and atomics are only supported with BTLs at the moment
961+
* If a btl does not support remote completion, it cannot be used as the primary btl.
962+
* It can still be selected as an alternate btl */
961963
OPAL_LIST_FOREACH(item, &mca_btl_base_modules_initialized, mca_btl_base_selected_module_t) {
962964
for (int i = 0 ; btls_to_use[i] ; ++i) {
963965
if (0 != strcmp (btls_to_use[i], item->btl_module->btl_component->btl_version.mca_component_name)) {
964966
continue;
965967
}
966968

967969
if ((item->btl_module->btl_flags & (MCA_BTL_FLAGS_RDMA)) == MCA_BTL_FLAGS_RDMA &&
968-
(item->btl_module->btl_flags & (MCA_BTL_FLAGS_ATOMIC_FOPS | MCA_BTL_FLAGS_ATOMIC_OPS))) {
970+
(item->btl_module->btl_flags & (MCA_BTL_FLAGS_ATOMIC_FOPS | MCA_BTL_FLAGS_ATOMIC_OPS | MCA_BTL_FLAGS_RDMA_REMOTE_COMPLETION))) {
969971
if (!selected_btl || item->btl_module->btl_latency < selected_btl->btl_latency) {
970972
selected_btl = item->btl_module;
971973
}
@@ -1034,10 +1036,14 @@ static int ompi_osc_rdma_query_btls (ompi_communicator_t *comm, ompi_osc_rdma_mo
10341036
btl_counts = tmp;
10351037

10361038
for (int i_btl = 0 ; i_btl < num_btls ; ++i_btl) {
1037-
/* for this implementation we need only compare-and-swap and fetch-and-add */
1038-
if ((endpoint->btl_rdma.bml_btls[i_btl].btl->btl_flags & (MCA_BTL_FLAGS_RDMA | MCA_BTL_FLAGS_ATOMIC_FOPS)) ==
1039-
(MCA_BTL_FLAGS_RDMA | MCA_BTL_FLAGS_ATOMIC_FOPS) && (endpoint->btl_rdma.bml_btls[i_btl].btl->btl_atomic_flags &
1040-
MCA_BTL_ATOMIC_SUPPORTS_ADD)) {
1039+
/* for this implementation we need only compare-and-swap and fetch-and-add
1040+
*
1041+
* If a btl does not support remote completion, it cannot be used as the primary btl.
1042+
* It can still be selected as an alternate btl */
1043+
if (((endpoint->btl_rdma.bml_btls[i_btl].btl->btl_flags & (MCA_BTL_FLAGS_RDMA | MCA_BTL_FLAGS_ATOMIC_FOPS)) ==
1044+
(MCA_BTL_FLAGS_RDMA | MCA_BTL_FLAGS_ATOMIC_FOPS)) &&
1045+
(endpoint->btl_rdma.bml_btls[i_btl].btl->btl_atomic_flags & MCA_BTL_ATOMIC_SUPPORTS_ADD) &&
1046+
(endpoint->btl_rdma.bml_btls[i_btl].btl->btl_flags & MCA_BTL_FLAGS_RDMA_REMOTE_COMPLETION)) {
10411047
for (int j = 0 ; j < max_btls ; ++j) {
10421048
if (endpoint->btl_rdma.bml_btls[i_btl].btl == possible_btls[j]) {
10431049
++btl_counts[j];

0 commit comments

Comments
 (0)