Skip to content

Commit 3a9fd32

Browse files
committed
Do not iface_check in non-blocking and never set MPI_ERROR in single
status functions Signed-off-by: Aurelien Bouteiller <[email protected]>
1 parent a9913a4 commit 3a9fd32

File tree

6 files changed

+30
-68
lines changed

6 files changed

+30
-68
lines changed

ompi/mpi/c/improbe.c

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
/*
22
* Copyright (c) 2011 Sandia National Laboratories. All rights reserved.
33
* Copyright (c) 2012 Cisco Systems, Inc. All rights reserved.
4-
* Copyright (c) 2012 Oak Ridge National Labs. All rights reserved.
54
* Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved.
65
* Copyright (c) 2015 Research Organization for Information Science
76
* and Technology (RIST). All rights reserved.
7+
* Copyright (c) 2020 The University of Tennessee and The University
8+
* of Tennessee Research Foundation. All rights
9+
* reserved.
810
* $COPYRIGHT$
911
*
1012
* Additional copyrights may follow
@@ -73,19 +75,9 @@ int MPI_Improbe(int source, int tag, MPI_Comm comm, int *flag,
7375

7476
#if OPAL_ENABLE_FT_MPI
7577
/*
76-
* Check here for issues with the peer, so we do not have to duplicate the
77-
* functionality in the PML.
78+
* The request will check checked for process failure errors during the
79+
* completion calls. So no need to check here.
7880
*/
79-
if( OPAL_UNLIKELY(!ompi_comm_iface_p2p_check_proc(comm, source, &rc)) ) {
80-
if (MPI_STATUS_IGNORE != status) {
81-
status->MPI_SOURCE = source;
82-
status->MPI_TAG = tag;
83-
status->MPI_ERROR = rc;
84-
}
85-
*flag = false;
86-
*message = &ompi_message_no_proc.message;
87-
OMPI_ERRHANDLER_RETURN(rc, comm, rc, FUNC_NAME);
88-
}
8981
#endif
9082

9183
OPAL_CR_ENTER_LIBRARY();

ompi/mpi/c/iprobe.c

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,13 @@
22
* Copyright (c) 2004-2007 The Trustees of Indiana University and Indiana
33
* University Research and Technology
44
* Corporation. All rights reserved.
5-
* Copyright (c) 2004-2018 The University of Tennessee and The University
5+
* Copyright (c) 2004-2020 The University of Tennessee and The University
66
* of Tennessee Research Foundation. All rights
77
* reserved.
88
* Copyright (c) 2004-2008 High Performance Computing Center Stuttgart,
99
* University of Stuttgart. All rights reserved.
1010
* Copyright (c) 2004-2005 The Regents of the University of California.
1111
* All rights reserved.
12-
* Copyright (c) 2010-2012 Oak Ridge National Labs. All rights reserved.
1312
* Copyright (c) 2015 Research Organization for Information Science
1413
* and Technology (RIST). All rights reserved.
1514
* $COPYRIGHT$
@@ -81,18 +80,9 @@ int MPI_Iprobe(int source, int tag, MPI_Comm comm, int *flag, MPI_Status *status
8180

8281
#if OPAL_ENABLE_FT_MPI
8382
/*
84-
* Check here for issues with the peer, so we do not have to duplicate the
85-
* functionality in the PML.
83+
* The request will check checked for process failure errors during the
84+
* completion calls. So no need to check here.
8685
*/
87-
if( OPAL_UNLIKELY(!ompi_comm_iface_p2p_check_proc(comm, source, &rc)) ) {
88-
if (MPI_STATUS_IGNORE != status) {
89-
status->MPI_SOURCE = source;
90-
status->MPI_TAG = tag;
91-
status->MPI_ERROR = rc;
92-
}
93-
*flag = false;
94-
OMPI_ERRHANDLER_RETURN(rc, comm, rc, FUNC_NAME);
95-
}
9686
#endif
9787

9888
OPAL_CR_ENTER_LIBRARY();

ompi/mpi/c/mprobe.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
* Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved.
66
* Copyright (c) 2015 Research Organization for Information Science
77
* and Technology (RIST). All rights reserved.
8+
* Copyright (c) 2020 The University of Tennessee and The University
9+
* of Tennessee Research Foundation. All rights
10+
* reserved.
811
* $COPYRIGHT$
912
*
1013
* Additional copyrights may follow
@@ -79,7 +82,6 @@ int MPI_Mprobe(int source, int tag, MPI_Comm comm,
7982
if (MPI_STATUS_IGNORE != status) {
8083
status->MPI_SOURCE = source;
8184
status->MPI_TAG = tag;
82-
status->MPI_ERROR = rc;
8385
}
8486
*message = &ompi_message_no_proc.message;
8587
OMPI_ERRHANDLER_RETURN(rc, comm, rc, FUNC_NAME);

ompi/mpi/c/probe.c

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Copyright (c) 2004-2007 The Trustees of Indiana University and Indiana
33
* University Research and Technology
44
* Corporation. All rights reserved.
5-
* Copyright (c) 2004-2018 The University of Tennessee and The University
5+
* Copyright (c) 2004-2020 The University of Tennessee and The University
66
* of Tennessee Research Foundation. All rights
77
* reserved.
88
* Copyright (c) 2004-2008 High Performance Computing Center Stuttgart,
@@ -65,6 +65,19 @@ int MPI_Probe(int source, int tag, MPI_Comm comm, MPI_Status *status)
6565
OMPI_ERRHANDLER_CHECK(rc, comm, rc, "MPI_Probe");
6666
}
6767

68+
if (MPI_PROC_NULL == source) {
69+
if (MPI_STATUS_IGNORE != status) {
70+
*status = ompi_request_empty.req_status;
71+
/*
72+
* Per MPI-1, the MPI_ERROR field is not defined for single-completion calls
73+
*/
74+
MEMCHECKER(
75+
opal_memchecker_base_mem_undefined(&status->MPI_ERROR, sizeof(int));
76+
);
77+
}
78+
return MPI_SUCCESS;
79+
}
80+
6881
#if OPAL_ENABLE_FT_MPI
6982
/*
7083
* Check here for issues with the peer, so we do not have to duplicate the
@@ -74,25 +87,11 @@ int MPI_Probe(int source, int tag, MPI_Comm comm, MPI_Status *status)
7487
if (MPI_STATUS_IGNORE != status) {
7588
status->MPI_SOURCE = source;
7689
status->MPI_TAG = tag;
77-
status->MPI_ERROR = rc;
7890
}
7991
OMPI_ERRHANDLER_RETURN(rc, comm, rc, FUNC_NAME);
8092
}
8193
#endif
8294

83-
if (MPI_PROC_NULL == source) {
84-
if (MPI_STATUS_IGNORE != status) {
85-
*status = ompi_request_empty.req_status;
86-
/*
87-
* Per MPI-1, the MPI_ERROR field is not defined for single-completion calls
88-
*/
89-
MEMCHECKER(
90-
opal_memchecker_base_mem_undefined(&status->MPI_ERROR, sizeof(int));
91-
);
92-
}
93-
return MPI_SUCCESS;
94-
}
95-
9695
OPAL_CR_ENTER_LIBRARY();
9796

9897
rc = MCA_PML_CALL(probe(source, tag, comm, status));

ompi/mpi/c/recv.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Copyright (c) 2004-2007 The Trustees of Indiana University and Indiana
33
* University Research and Technology
44
* Corporation. All rights reserved.
5-
* Copyright (c) 2004-2018 The University of Tennessee and The University
5+
* Copyright (c) 2004-2020 The University of Tennessee and The University
66
* of Tennessee Research Foundation. All rights
77
* reserved.
88
* Copyright (c) 2004-2008 High Performance Computing Center Stuttgart,
@@ -82,7 +82,6 @@ int MPI_Recv(void *buf, int count, MPI_Datatype type, int source,
8282
if (MPI_STATUS_IGNORE != status) {
8383
status->MPI_SOURCE = source;
8484
status->MPI_TAG = tag;
85-
status->MPI_ERROR = rc;
8685
}
8786
OMPI_ERRHANDLER_RETURN(rc, comm, rc, FUNC_NAME);
8887
}

ompi/mpi/c/sendrecv_replace.c

Lines changed: 4 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,13 @@
22
* Copyright (c) 2004-2007 The Trustees of Indiana University and Indiana
33
* University Research and Technology
44
* Corporation. All rights reserved.
5-
* Copyright (c) 2004-2018 The University of Tennessee and The University
5+
* Copyright (c) 2004-2020 The University of Tennessee and The University
66
* of Tennessee Research Foundation. All rights
77
* reserved.
88
* Copyright (c) 2004-2008 High Performance Computing Center Stuttgart,
99
* University of Stuttgart. All rights reserved.
1010
* Copyright (c) 2004-2005 The Regents of the University of California.
1111
* All rights reserved.
12-
* Copyright (c) 2010-2012 Oak Ridge National Labs. All rights reserved.
1312
* Copyright (c) 2010-2012 Oracle and/or its affiliates. All rights reserved.
1413
* Copyright (c) 2015 Research Organization for Information Science
1514
* and Technology (RIST). All rights reserved.
@@ -79,29 +78,10 @@ int MPI_Sendrecv_replace(void * buf, int count, MPI_Datatype datatype,
7978

8079
#if OPAL_ENABLE_FT_MPI
8180
/*
82-
* An early check, so as to return early if we are communicating with
83-
* a failed process. This is not absolutely necessary since we will
84-
* check for this, and other, error conditions during the completion
85-
* call in the PML.
81+
* The final call to Sendrecv will check for process failures inside
82+
* So no need to check here.
8683
*/
87-
if( OPAL_UNLIKELY(!ompi_comm_iface_p2p_check_proc(comm, dest, &rc)) ) {
88-
if( MPI_STATUS_IGNORE != status ) {
89-
status->MPI_SOURCE = dest;
90-
status->MPI_TAG = recvtag;
91-
status->MPI_ERROR = rc;
92-
}
93-
OMPI_ERRHANDLER_RETURN(rc, comm, rc, FUNC_NAME);
94-
}
95-
96-
if( OPAL_UNLIKELY(!ompi_comm_iface_p2p_check_proc(comm, source, &rc)) ) {
97-
if( MPI_STATUS_IGNORE != status ) {
98-
status->MPI_SOURCE = source;
99-
status->MPI_TAG = recvtag;
100-
status->MPI_ERROR = rc;
101-
}
102-
OMPI_ERRHANDLER_RETURN(rc, comm, rc, FUNC_NAME);
103-
}
104-
#endif
84+
#endif /* OPAL_ENABLE_FT_MPI */
10585

10686
OPAL_CR_ENTER_LIBRARY();
10787

0 commit comments

Comments
 (0)