From 61a090e0d1bed687466b607bc7d349ff3b96aad0 Mon Sep 17 00:00:00 2001 From: Brian Barrett Date: Mon, 26 Mar 2012 19:27:03 +0000 Subject: [PATCH] Checking for NULL function pointers and direct-call semantics can't work together, so implement all functions in the MTL interface for all MTLs. The only places NULL was still being set was for add_comm/del_comm, and matched probe, both of which are straight forward to implement (or return ERROR_NOT_IMPLEMENTED, since the PML can't emulate matched probe). This commit was SVN r26194. --- ompi/mca/mtl/mtl.h | 9 ++---- ompi/mca/mtl/mx/mtl_mx.c | 30 ++++++++++++++++--- ompi/mca/mtl/mx/mtl_mx.h | 13 ++++++++ ompi/mca/mtl/mx/mtl_mx_probe.c | 13 ++++++++ ompi/mca/mtl/mx/mtl_mx_recv.c | 9 ++++++ ompi/mca/mtl/mxm/mtl_mxm.c | 4 +-- ompi/mca/mtl/mxm/mtl_mxm.h | 13 ++++++++ ompi/mca/mtl/mxm/mtl_mxm_probe.c | 12 ++++++++ ompi/mca/mtl/mxm/mtl_mxm_recv.c | 8 +++++ ompi/mca/mtl/portals/mtl_portals.c | 37 +++++++++++++++++++---- ompi/mca/mtl/portals/mtl_portals.h | 23 ++++++++++++-- ompi/mca/mtl/portals/mtl_portals_probe.c | 13 ++++++++ ompi/mca/mtl/portals/mtl_portals_recv.c | 9 ++++++ ompi/mca/mtl/psm/mtl_psm.c | 24 ++++++++++++--- ompi/mca/mtl/psm/mtl_psm.h | 19 ++++++++++++ ompi/mca/mtl/psm/mtl_psm_probe.c | 13 ++++++++ ompi/mca/mtl/psm/mtl_psm_recv.c | 9 ++++++ ompi/mca/pml/cm/pml_cm.c | 18 ++--------- ompi/mca/pml/cm/pml_cm_component.c | 4 +-- ompi/mca/pml/cm/pml_cm_probe.c | 4 --- ompi/mca/pml/cm/pml_cm_recv.c | 4 --- ompi/mca/pml/cm/pml_cm_send.c | 38 +++++++----------------- 22 files changed, 248 insertions(+), 78 deletions(-) diff --git a/ompi/mca/mtl/mtl.h b/ompi/mca/mtl/mtl.h index ac81c2be6a..a1ac9356aa 100644 --- a/ompi/mca/mtl/mtl.h +++ b/ompi/mca/mtl/mtl.h @@ -197,9 +197,7 @@ typedef int (*mca_mtl_base_module_del_procs_fn_t)( * \note Open MPI is built around non-blocking operations. This * function is provided for networks where progressing events outside * of point-to-point (for example, collectives, I/O, one-sided) can - * occur without a progress function regularily being triggered. If - * this is not the case for the given network, this function pointer - * should be set to NULL and non-blocking sends be used. + * occur without a progress function regularily being triggered. * * \note While MPI does not allow users to specify negative tags, they * are used internally in Open MPI to provide a unique channel for @@ -239,9 +237,8 @@ typedef int (*mca_mtl_base_module_send_fn_t)( * @param mode (IN) Mode for send operation (see pml.h) * @param blocking (IN) True if the call originated from a blocking * call, but the PML decided to use a - * non-blocking operation. This is either for - * internal performance decisions or because the - * blocking send function is NULL. This is an + * non-blocking operation, likely for + * internal performance decisions This is an * optimization flag and is not needed for * correctness. * @param mtl_request (IN) Pointer to mtl_request. The ompi_req field diff --git a/ompi/mca/mtl/mx/mtl_mx.c b/ompi/mca/mtl/mx/mtl_mx.c index 7b5e81d7ee..c3e92f33a0 100644 --- a/ompi/mca/mtl/mx/mtl_mx.c +++ b/ompi/mca/mtl/mx/mtl_mx.c @@ -41,6 +41,14 @@ ompi_mtl_mx_del_procs(struct mca_mtl_base_module_t *mtl, struct ompi_proc_t** procs, struct mca_mtl_base_endpoint_t **mtl_peer_data); +static int +ompi_mtl_mx_add_comm(struct mca_mtl_base_module_t *mtl, + struct ompi_communicator_t *comm); + +static int +ompi_mtl_mx_del_comm(struct mca_mtl_base_module_t *mtl, + struct ompi_communicator_t *comm); + mca_mtl_mx_module_t ompi_mtl_mx = { { 8191, /* max cid - 2^13 - 1 */ @@ -58,12 +66,12 @@ mca_mtl_mx_module_t ompi_mtl_mx = { ompi_mtl_mx_irecv, ompi_mtl_mx_iprobe, - NULL, /* imrecv */ - NULL, /* improbe */ + ompi_mtl_mx_imrecv, + ompi_mtl_mx_improbe, ompi_mtl_mx_cancel, - NULL, /* add_comm */ - NULL /* del_comm */ + ompi_mtl_mx_add_comm, + ompi_mtl_mx_del_comm } }; @@ -190,6 +198,20 @@ ompi_mtl_mx_del_procs(struct mca_mtl_base_module_t *mtl, } +int +ompi_mtl_mx_add_comm(struct mca_mtl_base_module_t *mtl, + struct ompi_communicator_t *comm) +{ + return OMPI_SUCCESS; +} + +int +ompi_mtl_mx_del_comm(struct mca_mtl_base_module_t *mtl, + struct ompi_communicator_t *comm) +{ + return OMPI_SUCCESS; +} + int ompi_mtl_mx_progress( void ) { mx_return_t mx_return; diff --git a/ompi/mca/mtl/mx/mtl_mx.h b/ompi/mca/mtl/mx/mtl_mx.h index 3a69464c25..08c8742bdb 100644 --- a/ompi/mca/mtl/mx/mtl_mx.h +++ b/ompi/mca/mtl/mx/mtl_mx.h @@ -58,6 +58,19 @@ extern int ompi_mtl_mx_iprobe(struct mca_mtl_base_module_t* mtl, int *flag, struct ompi_status_public_t *status); +extern int ompi_mtl_mx_imrecv(struct mca_mtl_base_module_t* mtl, + struct opal_convertor_t *convertor, + struct ompi_message_t **message, + struct mca_mtl_request_t *mtl_request); + +extern int ompi_mtl_mx_improbe(struct mca_mtl_base_module_t *mtl, + struct ompi_communicator_t *comm, + int src, + int tag, + int *matched, + struct ompi_message_t **message, + struct ompi_status_public_t *status); + extern int ompi_mtl_mx_cancel(struct mca_mtl_base_module_t* mtl, struct mca_mtl_request_t *mtl_request, int flag); diff --git a/ompi/mca/mtl/mx/mtl_mx_probe.c b/ompi/mca/mtl/mx/mtl_mx_probe.c index 93105d5ea4..5ee144998e 100644 --- a/ompi/mca/mtl/mx/mtl_mx_probe.c +++ b/ompi/mca/mtl/mx/mtl_mx_probe.c @@ -71,3 +71,16 @@ ompi_mtl_mx_iprobe(struct mca_mtl_base_module_t* mtl, return OMPI_SUCCESS; } + + +int +ompi_mtl_mx_improbe(struct mca_mtl_base_module_t *mtl, + struct ompi_communicator_t *comm, + int src, + int tag, + int *matched, + struct ompi_message_t **message, + struct ompi_status_public_t *status) +{ + return OMPI_ERR_NOT_IMPLEMENTED; +} diff --git a/ompi/mca/mtl/mx/mtl_mx_recv.c b/ompi/mca/mtl/mx/mtl_mx_recv.c index f031cc8da8..2ea44eef6a 100644 --- a/ompi/mca/mtl/mx/mtl_mx_recv.c +++ b/ompi/mca/mtl/mx/mtl_mx_recv.c @@ -78,3 +78,12 @@ ompi_mtl_mx_irecv(struct mca_mtl_base_module_t* mtl, return OMPI_SUCCESS; } + +int +ompi_mtl_mx_imrecv(struct mca_mtl_base_module_t* mtl, + struct opal_convertor_t *convertor, + struct ompi_message_t **message, + struct mca_mtl_request_t *mtl_request) +{ + return OMPI_ERR_NOT_IMPLEMENTED; +} diff --git a/ompi/mca/mtl/mxm/mtl_mxm.c b/ompi/mca/mtl/mxm/mtl_mxm.c index cecffc934b..502fd2190e 100644 --- a/ompi/mca/mtl/mxm/mtl_mxm.c +++ b/ompi/mca/mtl/mxm/mtl_mxm.c @@ -36,8 +36,8 @@ mca_mtl_mxm_module_t ompi_mtl_mxm = { ompi_mtl_mxm_isend, ompi_mtl_mxm_irecv, ompi_mtl_mxm_iprobe, - NULL, /* imrecv */ - NULL, /* improbe */ + ompi_mtl_mxm_imrecv, + ompi_mtl_mxm_improbe, ompi_mtl_mxm_cancel, ompi_mtl_mxm_add_comm, ompi_mtl_mxm_del_comm diff --git a/ompi/mca/mtl/mxm/mtl_mxm.h b/ompi/mca/mtl/mxm/mtl_mxm.h index 5431d386d8..7c4ea3508e 100644 --- a/ompi/mca/mtl/mxm/mtl_mxm.h +++ b/ompi/mca/mtl/mxm/mtl_mxm.h @@ -59,6 +59,19 @@ extern int ompi_mtl_mxm_iprobe(struct mca_mtl_base_module_t* mtl, extern int ompi_mtl_mxm_cancel(struct mca_mtl_base_module_t* mtl, struct mca_mtl_request_t *mtl_request, int flag); +extern int ompi_mtl_mxm_imrecv(struct mca_mtl_base_module_t* mtl, + struct opal_convertor_t *convertor, + struct ompi_message_t **message, + struct mca_mtl_request_t *mtl_request); + +extern int ompi_mtl_mxm_improbe(struct mca_mtl_base_module_t *mtl, + struct ompi_communicator_t *comm, + int src, + int tag, + int *matched, + struct ompi_message_t **message, + struct ompi_status_public_t *status); + extern int ompi_mtl_mxm_add_comm(struct mca_mtl_base_module_t *mtl, struct ompi_communicator_t *comm); diff --git a/ompi/mca/mtl/mxm/mtl_mxm_probe.c b/ompi/mca/mtl/mxm/mtl_mxm_probe.c index c0f4101106..4c9c1c7740 100644 --- a/ompi/mca/mtl/mxm/mtl_mxm_probe.c +++ b/ompi/mca/mtl/mxm/mtl_mxm_probe.c @@ -40,3 +40,15 @@ int ompi_mtl_mxm_iprobe(struct mca_mtl_base_module_t* mtl, return OMPI_ERROR; } } + + +int ompi_mtl_mxm_improbe(struct mca_mtl_base_module_t *mtl, + struct ompi_communicator_t *comm, + int src, + int tag, + int *matched, + struct ompi_message_t **message, + struct ompi_status_public_t *status) +{ + return OMPI_ERR_NOT_IMPLEMENTED; +} diff --git a/ompi/mca/mtl/mxm/mtl_mxm_recv.c b/ompi/mca/mtl/mxm/mtl_mxm_recv.c index 36504021ed..76ef1dba4b 100644 --- a/ompi/mca/mtl/mxm/mtl_mxm_recv.c +++ b/ompi/mca/mtl/mxm/mtl_mxm_recv.c @@ -84,3 +84,11 @@ int ompi_mtl_mxm_irecv(struct mca_mtl_base_module_t* mtl, return OMPI_SUCCESS; } + +int ompi_mtl_mxm_imrecv(struct mca_mtl_base_module_t* mtl, + struct opal_convertor_t *convertor, + struct ompi_message_t **message, + struct mca_mtl_request_t *mtl_request) +{ + return OMPI_ERR_NOT_IMPLEMENTED; +} diff --git a/ompi/mca/mtl/portals/mtl_portals.c b/ompi/mca/mtl/portals/mtl_portals.c index 5507ee3dba..2c1c33a52f 100644 --- a/ompi/mca/mtl/portals/mtl_portals.c +++ b/ompi/mca/mtl/portals/mtl_portals.c @@ -52,12 +52,11 @@ mca_mtl_portals_module_t ompi_mtl_portals = { ompi_mtl_portals_isend, ompi_mtl_portals_irecv, ompi_mtl_portals_iprobe, - NULL, /* imrecv */ - NULL, /* improbe */ - - NULL, /* cancel */ - NULL, /* add_comm */ - NULL /* del_comm */ + ompi_mtl_portals_imrecv, + ompi_mtl_portals_improbe, + ompi_mtl_portals_cancel, + ompi_mtl_portals_add_comm, + ompi_mtl_portals_del_comm } }; @@ -341,6 +340,32 @@ ompi_mtl_portals_finalize(struct mca_mtl_base_module_t *mtl) } +int +ompi_mtl_portals_cancel(struct mca_mtl_base_module_t* mtl, + mca_mtl_request_t *mtl_request, + int flag) +{ + return OMPI_SUCCESS; +} + + + +int +ompi_mtl_portals_add_comm(struct mca_mtl_base_module_t *mtl, + struct ompi_communicator_t *comm) +{ + return OMPI_SUCCESS; +} + + +int +ompi_mtl_portals_del_comm(struct mca_mtl_base_module_t *mtl, + struct ompi_communicator_t *comm) +{ + return OMPI_SUCCESS; +} + + int ompi_mtl_portals_progress(void) { diff --git a/ompi/mca/mtl/portals/mtl_portals.h b/ompi/mca/mtl/portals/mtl_portals.h index f6f7c913d5..3eb7931ebc 100644 --- a/ompi/mca/mtl/portals/mtl_portals.h +++ b/ompi/mca/mtl/portals/mtl_portals.h @@ -218,9 +218,28 @@ extern int ompi_mtl_portals_iprobe(struct mca_mtl_base_module_t* mtl, int *flag, struct ompi_status_public_t *status); +extern int ompi_mtl_portals_imrecv(struct mca_mtl_base_module_t* mtl, + struct opal_convertor_t *convertor, + struct ompi_message_t **message, + struct mca_mtl_request_t *mtl_request); + +extern int ompi_mtl_portals_improbe(struct mca_mtl_base_module_t *mtl, + struct ompi_communicator_t *comm, + int src, + int tag, + int *matched, + struct ompi_message_t **message, + struct ompi_status_public_t *status); + extern int ompi_mtl_portals_cancel(struct mca_mtl_base_module_t* mtl, - mca_mtl_request_t *mtl_request, - int flag); + mca_mtl_request_t *mtl_request, + int flag); + +extern int ompi_mtl_portals_add_comm(struct mca_mtl_base_module_t *mtl, + struct ompi_communicator_t *comm); + +extern int ompi_mtl_portals_del_comm(struct mca_mtl_base_module_t *mtl, + struct ompi_communicator_t *comm); extern int ompi_mtl_portals_progress(void); diff --git a/ompi/mca/mtl/portals/mtl_portals_probe.c b/ompi/mca/mtl/portals/mtl_portals_probe.c index b6eed6b428..961c72082f 100644 --- a/ompi/mca/mtl/portals/mtl_portals_probe.c +++ b/ompi/mca/mtl/portals/mtl_portals_probe.c @@ -56,3 +56,16 @@ ompi_mtl_portals_iprobe(struct mca_mtl_base_module_t* mtl, return OMPI_SUCCESS; } + + +int +ompi_mtl_portals_improbe(struct mca_mtl_base_module_t *mtl, + struct ompi_communicator_t *comm, + int src, + int tag, + int *matched, + struct ompi_message_t **message, + struct ompi_status_public_t *status) +{ + return OMPI_ERR_NOT_IMPLEMENTED; +} diff --git a/ompi/mca/mtl/portals/mtl_portals_recv.c b/ompi/mca/mtl/portals/mtl_portals_recv.c index 47ae115307..2c7ef222c1 100644 --- a/ompi/mca/mtl/portals/mtl_portals_recv.c +++ b/ompi/mca/mtl/portals/mtl_portals_recv.c @@ -562,3 +562,12 @@ restart_search: return ret; } + +int +ompi_mtl_portals_imrecv(struct mca_mtl_base_module_t* mtl, + struct opal_convertor_t *convertor, + struct ompi_message_t **message, + struct mca_mtl_request_t *mtl_request) +{ + return OMPI_ERR_NOT_IMPLEMENTED; +} diff --git a/ompi/mca/mtl/psm/mtl_psm.c b/ompi/mca/mtl/psm/mtl_psm.c index 8b8528f753..d056ccc000 100644 --- a/ompi/mca/mtl/psm/mtl_psm.c +++ b/ompi/mca/mtl/psm/mtl_psm.c @@ -47,12 +47,12 @@ mca_mtl_psm_module_t ompi_mtl_psm = { ompi_mtl_psm_irecv, ompi_mtl_psm_iprobe, - NULL, /* imrecv */ - NULL, /* improbe */ + ompi_mtl_psm_imrecv, + ompi_mtl_psm_improbe, ompi_mtl_psm_cancel, - NULL, - NULL + ompi_mtl_psm_add_comm, + ompi_mtl_psm_del_comm } }; @@ -364,6 +364,22 @@ ompi_mtl_psm_del_procs(struct mca_mtl_base_module_t *mtl, } +int +ompi_mtl_psm_add_comm(struct mca_mtl_base_module_t *mtl, + struct ompi_communicator_t *comm) +{ + return OMPI_SUCCESS; +} + + +int +ompi_mtl_psm_del_comm(struct mca_mtl_base_module_t *mtl, + struct ompi_communicator_t *comm) +{ + return OMPI_SUCCESS; +} + + int ompi_mtl_psm_progress( void ) { psm_error_t err; mca_mtl_psm_request_t* mtl_psm_request; diff --git a/ompi/mca/mtl/psm/mtl_psm.h b/ompi/mca/mtl/psm/mtl_psm.h index c6567ed5c4..440ef56c91 100644 --- a/ompi/mca/mtl/psm/mtl_psm.h +++ b/ompi/mca/mtl/psm/mtl_psm.h @@ -73,9 +73,28 @@ extern int ompi_mtl_psm_iprobe(struct mca_mtl_base_module_t* mtl, int *flag, struct ompi_status_public_t *status); +extern int ompi_mtl_psm_imrecv(struct mca_mtl_base_module_t* mtl, + struct opal_convertor_t *convertor, + struct ompi_message_t **message, + struct mca_mtl_request_t *mtl_request); + +extern int ompi_mtl_psm_improbe(struct mca_mtl_base_module_t *mtl, + struct ompi_communicator_t *comm, + int src, + int tag, + int *matched, + struct ompi_message_t **message, + struct ompi_status_public_t *status); + extern int ompi_mtl_psm_cancel(struct mca_mtl_base_module_t* mtl, struct mca_mtl_request_t *mtl_request, int flag); + +extern int ompi_mtl_psm_add_comm(struct mca_mtl_base_module_t *mtl, + struct ompi_communicator_t *comm); + +extern int ompi_mtl_psm_del_comm(struct mca_mtl_base_module_t *mtl, + struct ompi_communicator_t *comm); extern int ompi_mtl_psm_finalize(struct mca_mtl_base_module_t* mtl); diff --git a/ompi/mca/mtl/psm/mtl_psm_probe.c b/ompi/mca/mtl/psm/mtl_psm_probe.c index 4c10db7ad1..f1df2d2b23 100644 --- a/ompi/mca/mtl/psm/mtl_psm_probe.c +++ b/ompi/mca/mtl/psm/mtl_psm_probe.c @@ -68,3 +68,16 @@ int ompi_mtl_psm_iprobe(struct mca_mtl_base_module_t* mtl, else return OMPI_ERROR; } + + +int +ompi_mtl_mxm_improbe(struct mca_mtl_base_module_t *mtl, + struct ompi_communicator_t *comm, + int src, + int tag, + int *matched, + struct ompi_message_t **message, + struct ompi_status_public_t *status) +{ + return OMPI_ERR_NOT_IMPLEMENTED; +} diff --git a/ompi/mca/mtl/psm/mtl_psm_recv.c b/ompi/mca/mtl/psm/mtl_psm_recv.c index 1655144af5..72921a5586 100644 --- a/ompi/mca/mtl/psm/mtl_psm_recv.c +++ b/ompi/mca/mtl/psm/mtl_psm_recv.c @@ -80,3 +80,12 @@ ompi_mtl_psm_irecv(struct mca_mtl_base_module_t* mtl, return OMPI_SUCCESS; } + +int +ompi_mtl_mxm_imrecv(struct mca_mtl_base_module_t* mtl, + struct opal_convertor_t *convertor, + struct ompi_message_t **message, + struct mca_mtl_request_t *mtl_request) +{ + return OMPI_ERR_NOT_IMPLEMENTED; +} diff --git a/ompi/mca/pml/cm/pml_cm.c b/ompi/mca/pml/cm/pml_cm.c index 74267425c0..9d44cf022e 100644 --- a/ompi/mca/pml/cm/pml_cm.c +++ b/ompi/mca/pml/cm/pml_cm.c @@ -87,8 +87,6 @@ mca_pml_cm_enable(bool enable) int mca_pml_cm_add_comm(ompi_communicator_t* comm) { - int ret; - /* should never happen, but it was, so check */ if (comm->c_contextid > ompi_pml_cm.super.pml_max_contextid) { return OMPI_ERR_OUT_OF_RESOURCE; @@ -98,27 +96,15 @@ mca_pml_cm_add_comm(ompi_communicator_t* comm) comm->c_pml_comm = NULL; /* notify the MTL about the added communicator */ - if ((NULL != ompi_mtl->mtl_add_comm) && - (OMPI_SUCCESS != (ret = OMPI_MTL_CALL(add_comm(ompi_mtl, comm))))) { - return ret; - } - - return OMPI_SUCCESS; + return OMPI_MTL_CALL(add_comm(ompi_mtl, comm)); } int mca_pml_cm_del_comm(ompi_communicator_t* comm) { - int ret; - /* notify the MTL about the deleted communicator */ - if ((NULL != ompi_mtl->mtl_del_comm) && - (OMPI_SUCCESS != (ret = OMPI_MTL_CALL(del_comm(ompi_mtl, comm))))) { - return ret; - } - - return OMPI_SUCCESS; + return OMPI_MTL_CALL(del_comm(ompi_mtl, comm)); } diff --git a/ompi/mca/pml/cm/pml_cm_component.c b/ompi/mca/pml/cm/pml_cm_component.c index b968d19259..d8de218cdc 100644 --- a/ompi/mca/pml/cm/pml_cm_component.c +++ b/ompi/mca/pml/cm/pml_cm_component.c @@ -178,8 +178,8 @@ mca_pml_cm_component_init(int* priority, static int mca_pml_cm_component_fini(void) { - if (NULL != ompi_mtl && NULL != ompi_mtl->mtl_finalize) { - return ompi_mtl->mtl_finalize(ompi_mtl); + if (NULL != ompi_mtl) { + return OMPI_MTL_CALL(finalize(ompi_mtl)); } return OMPI_SUCCESS; diff --git a/ompi/mca/pml/cm/pml_cm_probe.c b/ompi/mca/pml/cm/pml_cm_probe.c index e9c123f6a7..0213e7e310 100644 --- a/ompi/mca/pml/cm/pml_cm_probe.c +++ b/ompi/mca/pml/cm/pml_cm_probe.c @@ -55,8 +55,6 @@ mca_pml_cm_improbe(int src, struct ompi_message_t **message, ompi_status_public_t* status) { - if (NULL == ompi_mtl->mtl_improbe) return OMPI_ERR_NOT_IMPLEMENTED; - return OMPI_MTL_CALL(improbe(ompi_mtl, comm, src, tag, matched, message, @@ -73,8 +71,6 @@ mca_pml_cm_mprobe(int src, { int ret, matched = 0; - if (NULL == ompi_mtl->mtl_improbe) return OMPI_ERR_NOT_IMPLEMENTED; - while (true) { ret = OMPI_MTL_CALL(improbe(ompi_mtl, comm, src, tag, diff --git a/ompi/mca/pml/cm/pml_cm_recv.c b/ompi/mca/pml/cm/pml_cm_recv.c index c3291a0eb7..1a24593e64 100644 --- a/ompi/mca/pml/cm/pml_cm_recv.c +++ b/ompi/mca/pml/cm/pml_cm_recv.c @@ -137,8 +137,6 @@ mca_pml_cm_imrecv(void *buf, ompi_communicator_t *comm = (*message)->comm; int peer = (*message)->peer; - if (NULL == ompi_mtl->mtl_imrecv) return OMPI_ERR_NOT_IMPLEMENTED; - MCA_PML_CM_THIN_RECV_REQUEST_ALLOC(recvreq, ret); if( OPAL_UNLIKELY(OMPI_SUCCESS != ret) ) return ret; @@ -171,8 +169,6 @@ mca_pml_cm_mrecv(void *buf, ompi_communicator_t *comm = (*message)->comm; int peer = (*message)->peer; - if (NULL == ompi_mtl->mtl_imrecv) return OMPI_ERR_NOT_IMPLEMENTED; - MCA_PML_CM_THIN_RECV_REQUEST_ALLOC(recvreq, ret); if( OPAL_UNLIKELY(OMPI_SUCCESS != ret) ) return ret; diff --git a/ompi/mca/pml/cm/pml_cm_send.c b/ompi/mca/pml/cm/pml_cm_send.c index 50de9b7416..03c0ce43a1 100644 --- a/ompi/mca/pml/cm/pml_cm_send.c +++ b/ompi/mca/pml/cm/pml_cm_send.c @@ -162,35 +162,17 @@ mca_pml_cm_send(void *buf, sendmode, buf, count); - if (NULL == ompi_mtl->mtl_send) { - MCA_PML_CM_THIN_SEND_REQUEST_START(sendreq, - comm, - tag, - dst, - sendmode, - false, - ret); - if (OPAL_UNLIKELY(OMPI_SUCCESS != ret)) { - MCA_PML_CM_THIN_SEND_REQUEST_RETURN(sendreq); - return ret; - } - - ompi_request_wait_completion(&sendreq->req_send.req_base.req_ompi); - - ompi_request_free( (ompi_request_t**)&sendreq ); - } else { - MCA_PML_CM_SEND_REQUEST_START_SETUP((&sendreq->req_send)); + MCA_PML_CM_SEND_REQUEST_START_SETUP((&sendreq->req_send)); - ret = OMPI_MTL_CALL(send(ompi_mtl, - comm, - dst, - tag, - &sendreq->req_send.req_base.req_convertor, - sendmode)); - /* Allow a quick path for the request return */ - sendreq->req_send.req_base.req_free_called = true; - MCA_PML_CM_THIN_SEND_REQUEST_PML_COMPLETE(sendreq); - } + ret = OMPI_MTL_CALL(send(ompi_mtl, + comm, + dst, + tag, + &sendreq->req_send.req_base.req_convertor, + sendmode)); + /* Allow a quick path for the request return */ + sendreq->req_send.req_base.req_free_called = true; + MCA_PML_CM_THIN_SEND_REQUEST_PML_COMPLETE(sendreq); } return ret;