diff --git a/include/mpi.h b/include/mpi.h index 4d425c9424..390c66bbf1 100644 --- a/include/mpi.h +++ b/include/mpi.h @@ -147,7 +147,6 @@ typedef int (MPI_Grequest_cancel_function)(void *, int); #define MPI_DISTRIBUTE_CYCLIC 1 /* cyclic distribution */ #define MPI_DISTRIBUTE_NONE 2 /* not distributed */ #define MPI_DISTRIBUTE_DFLT_DARG (-1) /* default distribution arg */ -#define MPI_TAG_UB_VALUE (0x7fffffff) /* * Since these values are arbitrary to Open MPI, we might as well make diff --git a/ompi/attribute/attribute_predefined.c b/ompi/attribute/attribute_predefined.c index d794dce815..be7c61bb80 100644 --- a/ompi/attribute/attribute_predefined.c +++ b/ompi/attribute/attribute_predefined.c @@ -80,14 +80,15 @@ #include "attribute/attribute.h" -#include "errhandler/errclass.h" -#include "communicator/communicator.h" -#include "util/proc_info.h" -#include "util/sys_info.h" -#include "mca/ns/ns.h" -#include "mca/gpr/gpr.h" -#include "mca/errmgr/errmgr.h" -#include "mca/schema/schema.h" +#include "ompi/errhandler/errclass.h" +#include "ompi/communicator/communicator.h" +#include "orte/util/proc_info.h" +#include "opal/util/sys_info.h" +#include "ompi/mca/pml/pml.h" +#include "orte/mca/ns/ns.h" +#include "orte/mca/gpr/gpr.h" +#include "orte/mca/errmgr/errmgr.h" +#include "orte/mca/schema/schema.h" /* @@ -145,7 +146,7 @@ int ompi_attr_create_predefined(void) where triggers aren't set, there won't be COMM_SPAWN, so APPNUM probably isn't a big deal. */ - if (OMPI_SUCCESS != (ret = set_f(MPI_TAG_UB, MPI_TAG_UB_VALUE)) || + if (OMPI_SUCCESS != (ret = set_f(MPI_TAG_UB, MCA_PML_CALL(max_tag))) || OMPI_SUCCESS != (ret = set_f(MPI_HOST, MPI_PROC_NULL)) || OMPI_SUCCESS != (ret = set_f(MPI_IO, MPI_ANY_SOURCE)) || OMPI_SUCCESS != (ret = set_f(MPI_WTIME_IS_GLOBAL, 0)) || diff --git a/ompi/communicator/comm_cid.c b/ompi/communicator/comm_cid.c index c2af774339..36e52b6481 100644 --- a/ompi/communicator/comm_cid.c +++ b/ompi/communicator/comm_cid.c @@ -30,8 +30,6 @@ #include "mca/coll/base/base.h" #include "mca/rml/rml.h" -#define OMPI_MAX_COMM 32768 - #if defined(c_plusplus) || defined(__cplusplus) extern "C" { #endif @@ -166,7 +164,7 @@ int ompi_comm_nextcid ( ompi_communicator_t* newcomm, OPAL_THREAD_UNLOCK(&ompi_cid_lock); - for (i=start; i MPI_TAG_UB_VALUE) { + } else if (tag < 0 || tag > MCA_PML_CALL(max_tag)) { rc = MPI_ERR_TAG; } else if (ompi_comm_peer_invalid(comm, dest)) { rc = MPI_ERR_RANK; diff --git a/ompi/mpi/c/bsend_init.c b/ompi/mpi/c/bsend_init.c index 69c3482e1b..d646bf6a45 100644 --- a/ompi/mpi/c/bsend_init.c +++ b/ompi/mpi/c/bsend_init.c @@ -50,7 +50,7 @@ int MPI_Bsend_init(void *buf, int count, MPI_Datatype type, rc = MPI_ERR_COUNT; } else if (type == MPI_DATATYPE_NULL) { rc = MPI_ERR_TYPE; - } else if (tag < 0 || tag > MPI_TAG_UB_VALUE) { + } else if (tag < 0 || tag > MCA_PML_CALL(max_tag)) { rc = MPI_ERR_TAG; } else if (ompi_comm_peer_invalid(comm, dest)) { rc = MPI_ERR_RANK; diff --git a/ompi/mpi/c/ibsend.c b/ompi/mpi/c/ibsend.c index 6ce9bf46a3..bbf9d985f2 100644 --- a/ompi/mpi/c/ibsend.c +++ b/ompi/mpi/c/ibsend.c @@ -51,7 +51,7 @@ int MPI_Ibsend(void *buf, int count, MPI_Datatype type, int dest, rc = MPI_ERR_COUNT; } else if (type == MPI_DATATYPE_NULL) { rc = MPI_ERR_TYPE; - } else if (tag < 0 || tag > MPI_TAG_UB_VALUE) { + } else if (tag < 0 || tag > MCA_PML_CALL(max_tag)) { rc = MPI_ERR_TAG; } else if (ompi_comm_peer_invalid(comm, dest)) { rc = MPI_ERR_RANK; diff --git a/ompi/mpi/c/iprobe.c b/ompi/mpi/c/iprobe.c index 5e510e2772..5859371871 100644 --- a/ompi/mpi/c/iprobe.c +++ b/ompi/mpi/c/iprobe.c @@ -48,7 +48,7 @@ int MPI_Iprobe(int source, int tag, MPI_Comm comm, int *flag, MPI_Status *status if ( MPI_PARAM_CHECK ) { rc = MPI_SUCCESS; OMPI_ERR_INIT_FINALIZE(FUNC_NAME); - if (((tag < 0) && (tag != MPI_ANY_TAG)) || (tag > MPI_TAG_UB_VALUE)) { + if (((tag < 0) && (tag != MPI_ANY_TAG)) || (tag > MCA_PML_CALL(max_tag))) { rc = MPI_ERR_TAG; } else if (ompi_comm_invalid(comm)) { rc = MPI_ERR_COMM; diff --git a/ompi/mpi/c/irecv.c b/ompi/mpi/c/irecv.c index f0b003f451..b6de98cef8 100644 --- a/ompi/mpi/c/irecv.c +++ b/ompi/mpi/c/irecv.c @@ -50,7 +50,7 @@ int MPI_Irecv(void *buf, int count, MPI_Datatype type, int source, rc = MPI_ERR_COUNT; } else if (type == MPI_DATATYPE_NULL) { rc = MPI_ERR_TYPE; - } else if (((tag < 0) && (tag != MPI_ANY_TAG)) || (tag > MPI_TAG_UB_VALUE)) { + } else if (((tag < 0) && (tag != MPI_ANY_TAG)) || (tag > MCA_PML_CALL(max_tag))) { rc = MPI_ERR_TAG; } else if (source != MPI_ANY_SOURCE && source != MPI_PROC_NULL && diff --git a/ompi/mpi/c/irsend.c b/ompi/mpi/c/irsend.c index e54bdfa5fe..ac18724a70 100644 --- a/ompi/mpi/c/irsend.c +++ b/ompi/mpi/c/irsend.c @@ -50,7 +50,7 @@ int MPI_Irsend(void *buf, int count, MPI_Datatype type, int dest, rc = MPI_ERR_COUNT; } else if (type == MPI_DATATYPE_NULL) { rc = MPI_ERR_TYPE; - } else if (tag < 0 || tag > MPI_TAG_UB_VALUE) { + } else if (tag < 0 || tag > MCA_PML_CALL(max_tag)) { rc = MPI_ERR_TAG; } else if (ompi_comm_peer_invalid(comm, dest)) { rc = MPI_ERR_RANK; diff --git a/ompi/mpi/c/isend.c b/ompi/mpi/c/isend.c index 8e56baea46..114cccbb4b 100644 --- a/ompi/mpi/c/isend.c +++ b/ompi/mpi/c/isend.c @@ -50,7 +50,7 @@ int MPI_Isend(void *buf, int count, MPI_Datatype type, int dest, rc = MPI_ERR_COUNT; } else if (type == MPI_DATATYPE_NULL) { rc = MPI_ERR_TYPE; - } else if (tag < 0 || tag > MPI_TAG_UB_VALUE) { + } else if (tag < 0 || tag > MCA_PML_CALL(max_tag)) { rc = MPI_ERR_TAG; } else if (ompi_comm_peer_invalid(comm, dest)) { rc = MPI_ERR_RANK; diff --git a/ompi/mpi/c/issend.c b/ompi/mpi/c/issend.c index cc4b9360e0..d5daaa8963 100644 --- a/ompi/mpi/c/issend.c +++ b/ompi/mpi/c/issend.c @@ -51,7 +51,7 @@ int MPI_Issend(void *buf, int count, MPI_Datatype type, int dest, rc = MPI_ERR_COUNT; } else if (type == MPI_DATATYPE_NULL) { rc = MPI_ERR_TYPE; - } else if (tag < 0 || tag > MPI_TAG_UB_VALUE) { + } else if (tag < 0 || tag > MCA_PML_CALL(max_tag)) { rc = MPI_ERR_TAG; } else if (ompi_comm_peer_invalid(comm, dest)) { rc = MPI_ERR_RANK; diff --git a/ompi/mpi/c/probe.c b/ompi/mpi/c/probe.c index a81c54d6dc..8e69e86d78 100644 --- a/ompi/mpi/c/probe.c +++ b/ompi/mpi/c/probe.c @@ -47,7 +47,7 @@ int MPI_Probe(int source, int tag, MPI_Comm comm, MPI_Status *status) if ( MPI_PARAM_CHECK ) { rc = MPI_SUCCESS; OMPI_ERR_INIT_FINALIZE(FUNC_NAME); - if (((tag < 0) && (tag != MPI_ANY_TAG)) || (tag > MPI_TAG_UB_VALUE)) { + if (((tag < 0) && (tag != MPI_ANY_TAG)) || (tag > MCA_PML_CALL(max_tag))) { rc = MPI_ERR_TAG; } else if (ompi_comm_invalid(comm)) { rc = MPI_ERR_COMM; diff --git a/ompi/mpi/c/recv.c b/ompi/mpi/c/recv.c index 13f645e38b..7cbe4f6ea2 100644 --- a/ompi/mpi/c/recv.c +++ b/ompi/mpi/c/recv.c @@ -55,7 +55,7 @@ int MPI_Recv(void *buf, int count, MPI_Datatype type, int source, rc = MPI_ERR_COUNT; } else if (type == MPI_DATATYPE_NULL) { rc = MPI_ERR_TYPE; - } else if (((tag < 0) && (tag != MPI_ANY_TAG)) || (tag > MPI_TAG_UB_VALUE)) { + } else if (((tag < 0) && (tag != MPI_ANY_TAG)) || (tag > MCA_PML_CALL(max_tag))) { rc = MPI_ERR_TAG; } else if (source != MPI_ANY_SOURCE && ompi_comm_peer_invalid(comm, source)) { rc = MPI_ERR_RANK; diff --git a/ompi/mpi/c/recv_init.c b/ompi/mpi/c/recv_init.c index b523484ba7..82f6a18cc6 100644 --- a/ompi/mpi/c/recv_init.c +++ b/ompi/mpi/c/recv_init.c @@ -50,7 +50,7 @@ int MPI_Recv_init(void *buf, int count, MPI_Datatype type, int source, rc = MPI_ERR_COUNT; } else if (type == MPI_DATATYPE_NULL) { rc = MPI_ERR_TYPE; - } else if (((tag < 0) && (tag != MPI_ANY_TAG)) || (tag > MPI_TAG_UB_VALUE)) { + } else if (((tag < 0) && (tag != MPI_ANY_TAG)) || (tag > MCA_PML_CALL(max_tag))) { rc = MPI_ERR_TAG; } else if (source != MPI_ANY_SOURCE && source != MPI_PROC_NULL && diff --git a/ompi/mpi/c/rsend.c b/ompi/mpi/c/rsend.c index ba07b40436..40b807679e 100644 --- a/ompi/mpi/c/rsend.c +++ b/ompi/mpi/c/rsend.c @@ -48,7 +48,7 @@ int MPI_Rsend(void *buf, int count, MPI_Datatype type, int dest, int tag, MPI_Co rc = MPI_ERR_COUNT; } else if (type == MPI_DATATYPE_NULL) { rc = MPI_ERR_TYPE; - } else if (tag < 0 || tag > MPI_TAG_UB_VALUE) { + } else if (tag < 0 || tag > MCA_PML_CALL(max_tag)) { rc = MPI_ERR_TAG; } else if (ompi_comm_peer_invalid(comm, dest)) { rc = MPI_ERR_RANK; diff --git a/ompi/mpi/c/rsend_init.c b/ompi/mpi/c/rsend_init.c index e120e72fc3..7ba8112549 100644 --- a/ompi/mpi/c/rsend_init.c +++ b/ompi/mpi/c/rsend_init.c @@ -51,7 +51,7 @@ int MPI_Rsend_init(void *buf, int count, MPI_Datatype type, rc = MPI_ERR_COUNT; } else if (type == MPI_DATATYPE_NULL) { rc = MPI_ERR_TYPE; - } else if (tag < 0 || tag > MPI_TAG_UB_VALUE) { + } else if (tag < 0 || tag > MCA_PML_CALL(max_tag)) { rc = MPI_ERR_TAG; } else if (ompi_comm_peer_invalid(comm, dest)) { rc = MPI_ERR_RANK; diff --git a/ompi/mpi/c/send.c b/ompi/mpi/c/send.c index 4b61aee0ef..0377462221 100644 --- a/ompi/mpi/c/send.c +++ b/ompi/mpi/c/send.c @@ -48,7 +48,7 @@ int MPI_Send(void *buf, int count, MPI_Datatype type, int dest, return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM, FUNC_NAME); } else if (count < 0) { rc = MPI_ERR_COUNT; - } else if (tag < 0 || tag > MPI_TAG_UB_VALUE) { + } else if (tag < 0 || tag > MCA_PML_CALL(max_tag)) { rc = MPI_ERR_TAG; } else if (ompi_comm_peer_invalid(comm, dest)) { rc = MPI_ERR_RANK; diff --git a/ompi/mpi/c/send_init.c b/ompi/mpi/c/send_init.c index d9b6d1337c..d9abd3fa0e 100644 --- a/ompi/mpi/c/send_init.c +++ b/ompi/mpi/c/send_init.c @@ -51,7 +51,7 @@ int MPI_Send_init(void *buf, int count, MPI_Datatype type, rc = MPI_ERR_COUNT; } else if (type == MPI_DATATYPE_NULL) { rc = MPI_ERR_TYPE; - } else if (tag < 0 || tag > MPI_TAG_UB_VALUE) { + } else if (tag < 0 || tag > MCA_PML_CALL(max_tag)) { rc = MPI_ERR_TAG; } else if (ompi_comm_peer_invalid(comm, dest)) { rc = MPI_ERR_RANK; diff --git a/ompi/mpi/c/sendrecv.c b/ompi/mpi/c/sendrecv.c index e991b40ccc..82787384b7 100644 --- a/ompi/mpi/c/sendrecv.c +++ b/ompi/mpi/c/sendrecv.c @@ -51,7 +51,7 @@ int MPI_Sendrecv(void *sendbuf, int sendcount, MPI_Datatype sendtype, rc = MPI_ERR_TYPE; } else if (dest != MPI_PROC_NULL && ompi_comm_peer_invalid(comm, dest)) { rc = MPI_ERR_RANK; - } else if (sendtag < 0 || sendtag > MPI_TAG_UB_VALUE) { + } else if (sendtag < 0 || sendtag > MCA_PML_CALL(max_tag) ) { rc = MPI_ERR_TAG; } else if (recvcount < 0) { rc = MPI_ERR_COUNT; @@ -59,7 +59,7 @@ int MPI_Sendrecv(void *sendbuf, int sendcount, MPI_Datatype sendtype, rc = MPI_ERR_TYPE; } else if (source != MPI_PROC_NULL && source != MPI_ANY_SOURCE && ompi_comm_peer_invalid(comm, source)) { rc = MPI_ERR_RANK; - } else if (((recvtag < 0) && (recvtag != MPI_ANY_TAG)) || (recvtag > MPI_TAG_UB_VALUE)) { + } else if (((recvtag < 0) && (recvtag != MPI_ANY_TAG)) || (recvtag > MCA_PML_CALL(max_tag))) { rc = MPI_ERR_TAG; } OMPI_ERRHANDLER_CHECK(rc, comm, rc, FUNC_NAME); diff --git a/ompi/mpi/c/sendrecv_replace.c b/ompi/mpi/c/sendrecv_replace.c index ca69af42d9..211c45ac45 100644 --- a/ompi/mpi/c/sendrecv_replace.c +++ b/ompi/mpi/c/sendrecv_replace.c @@ -22,6 +22,7 @@ #include "datatype/datatype.h" #include "datatype/convertor.h" #include "errhandler/errhandler.h" +#include "ompi/mca/pml/pml.h" #if OMPI_HAVE_WEAK_SYMBOLS && OMPI_PROFILING_DEFINES #pragma weak MPI_Sendrecv_replace = PMPI_Sendrecv_replace @@ -51,11 +52,11 @@ int MPI_Sendrecv_replace(void * buf, int count, MPI_Datatype datatype, rc = MPI_ERR_TYPE; } else if (dest != MPI_PROC_NULL && ompi_comm_peer_invalid(comm, dest)) { rc = MPI_ERR_RANK; - } else if (sendtag < 0 || sendtag > MPI_TAG_UB_VALUE) { + } else if (sendtag < 0 || sendtag > MCA_PML_CALL(max_tag) ) { rc = MPI_ERR_TAG; } else if (source != MPI_PROC_NULL && source != MPI_ANY_SOURCE && ompi_comm_peer_invalid(comm, source)) { rc = MPI_ERR_RANK; - } else if (((recvtag < 0) && (recvtag != MPI_ANY_TAG)) || (recvtag > MPI_TAG_UB_VALUE)) { + } else if (((recvtag < 0) && (recvtag != MPI_ANY_TAG)) || (recvtag > MCA_PML_CALL(max_tag))) { rc = MPI_ERR_TAG; } OMPI_ERRHANDLER_CHECK(rc, comm, rc, FUNC_NAME); diff --git a/ompi/mpi/c/ssend.c b/ompi/mpi/c/ssend.c index 84160a7971..60c9ba1345 100644 --- a/ompi/mpi/c/ssend.c +++ b/ompi/mpi/c/ssend.c @@ -48,7 +48,7 @@ int MPI_Ssend(void *buf, int count, MPI_Datatype type, int dest, int tag, MPI_Co rc = MPI_ERR_COUNT; } else if (type == MPI_DATATYPE_NULL) { rc = MPI_ERR_TYPE; - } else if (tag < 0 || tag > MPI_TAG_UB_VALUE) { + } else if (tag < 0 || tag > MCA_PML_CALL(max_tag)) { rc = MPI_ERR_TAG; } else if (ompi_comm_peer_invalid(comm, dest)) { rc = MPI_ERR_RANK; diff --git a/ompi/mpi/c/ssend_init.c b/ompi/mpi/c/ssend_init.c index 9c2180c721..6991296826 100644 --- a/ompi/mpi/c/ssend_init.c +++ b/ompi/mpi/c/ssend_init.c @@ -51,7 +51,7 @@ int MPI_Ssend_init(void *buf, int count, MPI_Datatype type, rc = MPI_ERR_COUNT; } else if (type == MPI_DATATYPE_NULL) { rc = MPI_ERR_TYPE; - } else if (tag < 0 || tag > MPI_TAG_UB_VALUE) { + } else if (tag < 0 || tag > MCA_PML_CALL(max_tag)) { rc = MPI_ERR_TAG; } else if (ompi_comm_peer_invalid(comm, dest)) { rc = MPI_ERR_RANK;