From 7d37584e672521799cb3282daa43da87d9c0b755 Mon Sep 17 00:00:00 2001 From: Rainer Keller Date: Mon, 24 Jan 2005 22:23:15 +0000 Subject: [PATCH] Allow MPI_ANY_TAG to probe for when MPI_PARAM_CHECKing. This commit was SVN r4123. --- src/mpi/c/iprobe.c | 2 +- src/mpi/c/probe.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mpi/c/iprobe.c b/src/mpi/c/iprobe.c index 916b79c70d..46b980479d 100644 --- a/src/mpi/c/iprobe.c +++ b/src/mpi/c/iprobe.c @@ -46,7 +46,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_TAG_UB_VALUE) { + if (((tag < 0) && (tag != MPI_ANY_TAG)) || (tag > MPI_TAG_UB_VALUE)) { rc = MPI_ERR_TAG; } else if (ompi_comm_invalid(comm)) { rc = MPI_ERR_COMM; diff --git a/src/mpi/c/probe.c b/src/mpi/c/probe.c index 54240954e6..0d27e1f90c 100644 --- a/src/mpi/c/probe.c +++ b/src/mpi/c/probe.c @@ -45,7 +45,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_TAG_UB_VALUE) { + if (((tag < 0) && (tag != MPI_ANY_TAG)) || (tag > MPI_TAG_UB_VALUE)) { rc = MPI_ERR_TAG; } else if (ompi_comm_invalid(comm)) { rc = MPI_ERR_COMM;