commits
Threads by month
- ----- 2026 -----
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
November 2014
- 1 participants
- 74 discussions
[mpich] MPICH primary repository branch, master, updated. v3.1.3-184-ge99e882
by noreply@mpich.org 12 Nov '14
by noreply@mpich.org 12 Nov '14
12 Nov '14
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "MPICH primary repository".
The branch, master has been updated
via e99e8822e8adc0caa63e2fbb55d977dc3d7972b2 (commit)
via af8b2d04b0e7e96413b55341a3b39465efd83bb1 (commit)
via a91f178a7e7a1092a404208c10cc463c64ea3a34 (commit)
via 96deece29001bc8e7044b1f0b012ef5db02fbdcc (commit)
via 47f62b0c690cef80398b74b8c86ff6bc14d141e2 (commit)
via 3850e6bf639fbd67a121fe7446c5615739799bd9 (commit)
via 46f59276bcfce78af04215bfa8cf544d0cef079f (commit)
from 316ac29bcb48562f7308f886bd4eaa8f6e4bcbb7 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.mpich.org/mpich.git/commitdiff/e99e8822e8adc0caa63e2fbb55d977dc3…
commit e99e8822e8adc0caa63e2fbb55d977dc3d7972b2
Author: Huiwei Lu <huiweilu(a)mcs.anl.gov>
Date: Mon Nov 10 22:48:04 2014 -0600
Enable all ft tests
Fixes #1945
Signed-off-by: Wesley Bland <wbland(a)anl.gov>
diff --git a/test/mpi/ft/testlist b/test/mpi/ft/testlist
index a122445..604211a 100644
--- a/test/mpi/ft/testlist
+++ b/test/mpi/ft/testlist
@@ -3,9 +3,9 @@ abort 2 env=MPIR_CVAR_ENABLE_FT=1 mpiexecarg=-disable-auto-cleanup timeLimit=10
sendalive 4 env=MPIR_CVAR_ENABLE_FT=1 mpiexecarg=-disable-auto-cleanup timeLimit=10 strict=false resultTest=TestStatusNoErrors
isendalive 3 env=MPIR_CVAR_ENABLE_FT=1 mpiexecarg=-disable-auto-cleanup resultTest=TestStatusNoErrors strict=false
multi_isendalive 4 env=MPIR_CVAR_ENABLE_FT=1 mpiexecarg=-disable-auto-cleanup resultTest=TestStatusNoErrors strict=false
-senddead 2 env=MPIR_CVAR_ENABLE_FT=1 mpiexecarg=-disable-auto-cleanup resultTest=TestStatusNoErrors strict=false timeLimit=10 xfail=ticket1945
+senddead 2 env=MPIR_CVAR_ENABLE_FT=1 mpiexecarg=-disable-auto-cleanup resultTest=TestStatusNoErrors strict=false timeLimit=10
recvdead 2 env=MPIR_CVAR_ENABLE_FT=1 mpiexecarg=-disable-auto-cleanup resultTest=TestStatusNoErrors strict=false timeLimit=10
-isenddead 2 env=MPIR_CVAR_ENABLE_FT=1 mpiexecarg=-disable-auto-cleanup resultTest=TestStatusNoErrors strict=false timeLimit=10 xfail=ticket1945
+isenddead 2 env=MPIR_CVAR_ENABLE_FT=1 mpiexecarg=-disable-auto-cleanup resultTest=TestStatusNoErrors strict=false timeLimit=10
irecvdead 2 env=MPIR_CVAR_ENABLE_FT=1 mpiexecarg=-disable-auto-cleanup resultTest=TestStatusNoErrors strict=false timeLimit=10
barrier 4 env=MPIR_CVAR_ENABLE_FT=1 mpiexecarg=-disable-auto-cleanup resultTest=TestStatusNoErrors strict=false timeLimit=10
gather 4 env=MPIR_CVAR_ENABLE_FT=1 mpiexecarg=-disable-auto-cleanup resultTest=TestStatusNoErrors strict=false timeLimit=10
@@ -14,5 +14,5 @@ bcast 4 env=MPIR_CVAR_ENABLE_FT=1 mpiexecarg=-disable-auto-cleanup resultTest=Te
scatter 4 env=MPIR_CVAR_ENABLE_FT=1 mpiexecarg=-disable-auto-cleanup resultTest=TestStatusNoErrors strict=false timeLimit=10
anysource 3 env=MPIR_CVAR_ENABLE_FT=1 mpiexecarg=-disable-auto-cleanup resultTest=TestStatusNoErrors strict=false timeLimit=10
revoke_nofail 2 env=MPIR_CVAR_ENABLE_FT=1 strict=false timeLimit=10
-shrink 8 env=MPIR_CVAR_ENABLE_FT=1 mpiexecarg=-disable-auto-cleanup resultTest=TestStatusNoErrors strict=false timeLimit=10 xfail=ticket1945
-agree 4 env=MPIR_CVAR_ENABLE_FT=1 mpiexecarg=-disable-auto-cleanup resultTest=TestStatusNoErrors strict=false timeLimit=10 xfail=ticket1945
+shrink 8 env=MPIR_CVAR_ENABLE_FT=1 mpiexecarg=-disable-auto-cleanup resultTest=TestStatusNoErrors strict=false timeLimit=10
+agree 4 env=MPIR_CVAR_ENABLE_FT=1 mpiexecarg=-disable-auto-cleanup resultTest=TestStatusNoErrors strict=false timeLimit=10
http://git.mpich.org/mpich.git/commitdiff/af8b2d04b0e7e96413b55341a3b39465e…
commit af8b2d04b0e7e96413b55341a3b39465efd83bb1
Author: Huiwei Lu <huiweilu(a)mcs.anl.gov>
Date: Mon Nov 10 22:43:27 2014 -0600
Adds checking VC state in MPID_Recv
Similar to d086ac27, check the state of a VC to see if it is valid
before creating a group, request or communicator in MPID_Recv.
Signed-off-by: Wesley Bland <wbland(a)anl.gov>
diff --git a/src/mpid/ch3/src/mpid_recv.c b/src/mpid/ch3/src/mpid_recv.c
index 40781c8..874f019 100644
--- a/src/mpid/ch3/src/mpid_recv.c
+++ b/src/mpid/ch3/src/mpid_recv.c
@@ -75,6 +75,7 @@ int MPID_Recv(void * buf, int count, MPI_Datatype datatype, int rank, int tag,
if (MPIDI_Request_get_sync_send_flag(rreq))
{
MPIDI_Comm_get_vc_set_active(comm, rreq->dev.match.parts.rank, &vc);
+ MPIU_ERR_CHKANDJUMP1(vc->state == MPIDI_VC_STATE_MORIBUND, mpi_errno, MPIX_ERR_PROC_FAILED, "**comm_fail", "**comm_fail %d", rreq->dev.match.parts.rank);
mpi_errno = MPIDI_CH3_EagerSyncAck( vc, rreq );
if (mpi_errno) MPIU_ERR_POP(mpi_errno);
}
@@ -126,6 +127,7 @@ int MPID_Recv(void * buf, int count, MPI_Datatype datatype, int rank, int tag,
else if (MPIDI_Request_get_msg_type(rreq) == MPIDI_REQUEST_RNDV_MSG)
{
MPIDI_Comm_get_vc_set_active(comm, rreq->dev.match.parts.rank, &vc);
+ MPIU_ERR_CHKANDJUMP1(vc->state == MPIDI_VC_STATE_MORIBUND, mpi_errno, MPIX_ERR_PROC_FAILED, "**comm_fail", "**comm_fail %d", rreq->dev.match.parts.rank);
mpi_errno = vc->rndvRecv_fn( vc, rreq );
if (mpi_errno) MPIU_ERR_POP(mpi_errno);
if (HANDLE_GET_KIND(datatype) != HANDLE_KIND_BUILTIN)
http://git.mpich.org/mpich.git/commitdiff/a91f178a7e7a1092a404208c10cc463c6…
commit a91f178a7e7a1092a404208c10cc463c64ea3a34
Author: Huiwei Lu <huiweilu(a)mcs.anl.gov>
Date: Mon Nov 10 16:50:38 2014 -0600
Adds checking VC state in MPID_Send
MPID_Send should first check the state of a VC to see if it is valid
before creating a group, request or communicator.
In the case of fault tolerance, if VC has already been revoked or marked
as terminated (e.g., in test/mpi/ft/senddead). The send operation
evolved should exit without creating any memory objects of request,
group or communicator.
Signed-off-by: Wesley Bland <wbland(a)anl.gov>
diff --git a/src/mpid/ch3/src/mpid_send.c b/src/mpid/ch3/src/mpid_send.c
index 52dad34..bb9338d 100644
--- a/src/mpid/ch3/src/mpid_send.c
+++ b/src/mpid/ch3/src/mpid_send.c
@@ -72,6 +72,7 @@ int MPID_Send(const void * buf, int count, MPI_Datatype datatype, int rank,
}
MPIDI_Comm_get_vc_set_active(comm, rank, &vc);
+ MPIU_ERR_CHKANDJUMP1(vc->state == MPIDI_VC_STATE_MORIBUND, mpi_errno, MPIX_ERR_PROC_FAILED, "**comm_fail", "**comm_fail %d", rank);
#ifdef ENABLE_COMM_OVERRIDES
if (vc->comm_ops && vc->comm_ops->send)
http://git.mpich.org/mpich.git/commitdiff/96deece29001bc8e7044b1f0b012ef5db…
commit 96deece29001bc8e7044b1f0b012ef5db02fbdcc
Author: Wesley Bland <wbland(a)anl.gov>
Date: Mon Nov 10 22:09:00 2014 -0600
Mark collective FT tests as passing
The collective FT tests now pass with debug output turned off.
See #1945
Signed-off-by: Huiwei Lu <huiweilu(a)mcs.anl.gov>
diff --git a/test/mpi/ft/testlist b/test/mpi/ft/testlist
index 503dfaf..a122445 100644
--- a/test/mpi/ft/testlist
+++ b/test/mpi/ft/testlist
@@ -10,8 +10,8 @@ irecvdead 2 env=MPIR_CVAR_ENABLE_FT=1 mpiexecarg=-disable-auto-cleanup resultTes
barrier 4 env=MPIR_CVAR_ENABLE_FT=1 mpiexecarg=-disable-auto-cleanup resultTest=TestStatusNoErrors strict=false timeLimit=10
gather 4 env=MPIR_CVAR_ENABLE_FT=1 mpiexecarg=-disable-auto-cleanup resultTest=TestStatusNoErrors strict=false timeLimit=10
reduce 4 env=MPIR_CVAR_ENABLE_FT=1 mpiexecarg=-disable-auto-cleanup resultTest=TestStatusNoErrors strict=false timeLimit=10
-bcast 4 env=MPIR_CVAR_ENABLE_FT=1 mpiexecarg=-disable-auto-cleanup resultTest=TestStatusNoErrors strict=false timeLimit=10 xfail=ticket1945
-scatter 4 env=MPIR_CVAR_ENABLE_FT=1 mpiexecarg=-disable-auto-cleanup resultTest=TestStatusNoErrors strict=false timeLimit=10 xfail=ticket1945
+bcast 4 env=MPIR_CVAR_ENABLE_FT=1 mpiexecarg=-disable-auto-cleanup resultTest=TestStatusNoErrors strict=false timeLimit=10
+scatter 4 env=MPIR_CVAR_ENABLE_FT=1 mpiexecarg=-disable-auto-cleanup resultTest=TestStatusNoErrors strict=false timeLimit=10
anysource 3 env=MPIR_CVAR_ENABLE_FT=1 mpiexecarg=-disable-auto-cleanup resultTest=TestStatusNoErrors strict=false timeLimit=10
revoke_nofail 2 env=MPIR_CVAR_ENABLE_FT=1 strict=false timeLimit=10
shrink 8 env=MPIR_CVAR_ENABLE_FT=1 mpiexecarg=-disable-auto-cleanup resultTest=TestStatusNoErrors strict=false timeLimit=10 xfail=ticket1945
http://git.mpich.org/mpich.git/commitdiff/47f62b0c690cef80398b74b8c86ff6bc1…
commit 47f62b0c690cef80398b74b8c86ff6bc14d141e2
Author: Wesley Bland <wbland(a)anl.gov>
Date: Mon Nov 10 14:07:59 2014 -0600
Correctly handle errflag in MPI collectives
The MPI collectives get and set the errflag used by the collective
helper functions (MPIC_*). The possible values of the errflag changed,
so the collective functions need to appropriately set this value using
either MPIR_ERR_NONE (MPI_SUCCESS), MPIR_ERR_PROC_FAILED
(MPIX_ERR_PROC_FAILED), or MPIR_ERR_OTHER (MPI_ERR_OTHER).
This should allow collectives to correctly report process failures when
they occur now, fixing the FT tests that use collectives (see #1945).
Signed-off-by: Huiwei Lu <huiweilu(a)mcs.anl.gov>
diff --git a/maint/extracterrmsgs b/maint/extracterrmsgs
index 1735459..5fe997e 100755
--- a/maint/extracterrmsgs
+++ b/maint/extracterrmsgs
@@ -728,7 +728,9 @@ sub ProcessFile
!($args[$errClassLoc] =~ /^MPI_T_ERR_/) &&
!($args[$errClassLoc] =~ /^MPIDU_SOCK_ERR_/) &&
!($args[$errClassLoc] =~ /^MPIX_ERR_/) &&
- !($args[$errClassLoc] =~ /^errclass/) ) {
+ !($args[$errClassLoc] =~ /^errclass/) &&
+ !($args[$errClassLoc] =~ /^\*\(errflag_\)/) &&
+ !($args[$errClassLoc] =~ /^\*errflag/)) {
$bad_syntax_in_file{$filename} = 1;
print STDERR "Invalid argument $args[$errClassLoc] for the MPI Error class in $routineName in $filename\n";
next;
diff --git a/src/mpi/coll/allgather.c b/src/mpi/coll/allgather.c
index e9900a0..7d6799e 100644
--- a/src/mpi/coll/allgather.c
+++ b/src/mpi/coll/allgather.c
@@ -212,8 +212,8 @@ int MPIR_Allgather_intra (
MPIR_ALLGATHER_TAG, comm, &status, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
last_recv_cnt = 0;
} else
@@ -277,8 +277,8 @@ int MPIR_Allgather_intra (
sent now. */
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
}
@@ -296,8 +296,8 @@ int MPIR_Allgather_intra (
no. of processes whose data we don't have */
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
last_recv_cnt = 0;
} else
@@ -380,8 +380,8 @@ int MPIR_Allgather_intra (
MPIR_ALLGATHER_TAG, comm, &status, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
last_recv_cnt = 0;
} else
@@ -435,8 +435,8 @@ int MPIR_Allgather_intra (
comm, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
/* last_recv_cnt was set in the previous
@@ -457,8 +457,8 @@ int MPIR_Allgather_intra (
no. of processes whose data we don't have */
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
last_recv_cnt = 0;
} else
@@ -532,8 +532,8 @@ int MPIR_Allgather_intra (
MPI_STATUS_IGNORE, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
curr_cnt *= 2;
@@ -555,8 +555,8 @@ int MPIR_Allgather_intra (
MPI_STATUS_IGNORE, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
}
@@ -617,8 +617,8 @@ int MPIR_Allgather_intra (
MPI_STATUS_IGNORE, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
j = jnext;
@@ -632,8 +632,8 @@ int MPIR_Allgather_intra (
MPIDU_ERR_CHECK_MULTIPLE_THREADS_EXIT( comm_ptr );
if (mpi_errno_ret)
mpi_errno = mpi_errno_ret;
- else if (*errflag)
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**coll_fail");
+ else if (*errflag != MPIR_ERR_NONE)
+ MPIU_ERR_SET(mpi_errno, *errflag, "**coll_fail");
return mpi_errno;
@@ -702,8 +702,8 @@ int MPIR_Allgather_inter (
sendtype, 0, newcomm_ptr, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
}
@@ -718,8 +718,8 @@ int MPIR_Allgather_inter (
sendtype, root, comm_ptr, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
}
@@ -731,8 +731,8 @@ int MPIR_Allgather_inter (
recvtype, root, comm_ptr, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
}
@@ -745,8 +745,8 @@ int MPIR_Allgather_inter (
recvtype, root, comm_ptr, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
}
@@ -758,8 +758,8 @@ int MPIR_Allgather_inter (
sendtype, root, comm_ptr, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
}
@@ -769,8 +769,8 @@ int MPIR_Allgather_inter (
MPIU_CHKLMEM_FREEALL();
if (mpi_errno_ret)
mpi_errno = mpi_errno_ret;
- else if (*errflag)
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**coll_fail");
+ else if (*errflag != MPIR_ERR_NONE)
+ MPIU_ERR_SET(mpi_errno, *errflag, "**coll_fail");
return mpi_errno;
diff --git a/src/mpi/coll/allgatherv.c b/src/mpi/coll/allgatherv.c
index 2af46b0..8064713 100644
--- a/src/mpi/coll/allgatherv.c
+++ b/src/mpi/coll/allgatherv.c
@@ -217,8 +217,8 @@ int MPIR_Allgatherv_intra (
comm, &status, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
last_recv_cnt = 0;
} else
@@ -285,8 +285,8 @@ int MPIR_Allgatherv_intra (
MPIR_ALLGATHERV_TAG, comm, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
/* last_recv_cnt was set in the previous
@@ -309,8 +309,8 @@ int MPIR_Allgatherv_intra (
comm, &status, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
last_recv_cnt = 0;
} else
@@ -418,8 +418,8 @@ int MPIR_Allgatherv_intra (
MPIR_ALLGATHERV_TAG, comm, &status, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
last_recv_cnt = 0;
} else
@@ -478,8 +478,8 @@ int MPIR_Allgatherv_intra (
comm, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
/* last_recv_cnt was set in the previous
@@ -498,8 +498,8 @@ int MPIR_Allgatherv_intra (
comm, &status, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
last_recv_cnt = 0;
} else
@@ -580,8 +580,8 @@ int MPIR_Allgatherv_intra (
src, MPIR_ALLGATHERV_TAG, comm, &status, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
recv_cnt = 0;
} else
@@ -610,8 +610,8 @@ int MPIR_Allgatherv_intra (
MPI_STATUS_IGNORE, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
}
@@ -698,8 +698,8 @@ int MPIR_Allgatherv_intra (
mpi_errno = MPIC_Recv(rbuf, recvnow, recvtype, left, MPIR_ALLGATHERV_TAG, comm, &status, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
torecv -= recvnow;
@@ -708,8 +708,8 @@ int MPIR_Allgatherv_intra (
mpi_errno = MPIC_Send(sbuf, sendnow, recvtype, right, MPIR_ALLGATHERV_TAG, comm, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
tosend -= sendnow;
@@ -720,8 +720,8 @@ int MPIR_Allgatherv_intra (
comm, &status, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
tosend -= sendnow;
@@ -747,8 +747,8 @@ int MPIR_Allgatherv_intra (
MPIDU_ERR_CHECK_MULTIPLE_THREADS_EXIT( comm_ptr );
if (mpi_errno_ret)
mpi_errno = mpi_errno_ret;
- else if (*errflag)
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**coll_fail");
+ else if (*errflag != MPIR_ERR_NONE)
+ MPIU_ERR_SET(mpi_errno, *errflag, "**coll_fail");
return mpi_errno;
fn_fail:
@@ -799,8 +799,8 @@ int MPIR_Allgatherv_inter (
comm_ptr, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
/* gatherv to right group */
@@ -810,8 +810,8 @@ int MPIR_Allgatherv_inter (
comm_ptr, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
}
@@ -823,8 +823,8 @@ int MPIR_Allgatherv_inter (
comm_ptr, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
/* gatherv from left group */
@@ -834,8 +834,8 @@ int MPIR_Allgatherv_inter (
comm_ptr, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
}
@@ -860,8 +860,8 @@ int MPIR_Allgatherv_inter (
mpi_errno = MPIR_Bcast_intra(recvbuf, 1, newtype, 0, newcomm_ptr, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
@@ -870,7 +870,7 @@ int MPIR_Allgatherv_inter (
fn_exit:
if (mpi_errno_ret)
mpi_errno = mpi_errno_ret;
- else if (*errflag)
+ else if (*errflag != MPIR_ERR_NONE)
MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**coll_fail");
return mpi_errno;
diff --git a/src/mpi/coll/allred_group.c b/src/mpi/coll/allred_group.c
index 9f50e2e..6c66347 100644
--- a/src/mpi/coll/allred_group.c
+++ b/src/mpi/coll/allred_group.c
@@ -95,8 +95,8 @@ int MPIR_Allreduce_group_intra(void *sendbuf, void *recvbuf, int count,
tag, comm, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
@@ -113,8 +113,8 @@ int MPIR_Allreduce_group_intra(void *sendbuf, void *recvbuf, int count,
MPI_STATUS_IGNORE, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
@@ -162,8 +162,8 @@ int MPIR_Allreduce_group_intra(void *sendbuf, void *recvbuf, int count,
MPI_STATUS_IGNORE, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
} else {
@@ -246,8 +246,8 @@ int MPIR_Allreduce_group_intra(void *sendbuf, void *recvbuf, int count,
MPI_STATUS_IGNORE, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
@@ -312,8 +312,8 @@ int MPIR_Allreduce_group_intra(void *sendbuf, void *recvbuf, int count,
MPI_STATUS_IGNORE, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
@@ -343,8 +343,8 @@ int MPIR_Allreduce_group_intra(void *sendbuf, void *recvbuf, int count,
}
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
}
@@ -353,8 +353,8 @@ int MPIR_Allreduce_group_intra(void *sendbuf, void *recvbuf, int count,
MPIU_CHKLMEM_FREEALL();
if (mpi_errno_ret)
mpi_errno = mpi_errno_ret;
- else if (*errflag)
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**coll_fail");
+ else if (*errflag != MPIR_ERR_NONE)
+ MPIU_ERR_SET(mpi_errno, *errflag, "**coll_fail");
return (mpi_errno);
fn_fail:
diff --git a/src/mpi/coll/allreduce.c b/src/mpi/coll/allreduce.c
index cfcc99d..c7dc13f 100644
--- a/src/mpi/coll/allreduce.c
+++ b/src/mpi/coll/allreduce.c
@@ -228,16 +228,16 @@ int MPIR_Allreduce_intra (
mpi_errno = MPIR_Reduce_impl(recvbuf, NULL, count, datatype, op, 0, comm_ptr->node_comm, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
} else {
mpi_errno = MPIR_Reduce_impl(sendbuf, recvbuf, count, datatype, op, 0, comm_ptr->node_comm, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
}
@@ -255,8 +255,8 @@ int MPIR_Allreduce_intra (
errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
}
@@ -266,8 +266,8 @@ int MPIR_Allreduce_intra (
mpi_errno = MPIR_Bcast_impl(recvbuf, count, datatype, 0, comm_ptr->node_comm, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
}
@@ -290,16 +290,16 @@ int MPIR_Allreduce_intra (
op, 0, comm_ptr, errflag );
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
mpi_errno = MPIR_Bcast_impl( recvbuf, count, datatype, 0, comm_ptr, errflag );
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
}
@@ -352,8 +352,8 @@ int MPIR_Allreduce_intra (
MPIR_ALLREDUCE_TAG, comm, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
@@ -369,8 +369,8 @@ int MPIR_Allreduce_intra (
MPI_STATUS_IGNORE, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
@@ -415,8 +415,8 @@ int MPIR_Allreduce_intra (
MPI_STATUS_IGNORE, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
@@ -500,8 +500,8 @@ int MPIR_Allreduce_intra (
MPI_STATUS_IGNORE, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
@@ -565,8 +565,8 @@ int MPIR_Allreduce_intra (
MPI_STATUS_IGNORE, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
@@ -592,8 +592,8 @@ int MPIR_Allreduce_intra (
MPI_STATUS_IGNORE, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
}
@@ -668,8 +668,8 @@ int MPIR_Allreduce_inter (
op, 0, newcomm_ptr, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
@@ -680,8 +680,8 @@ int MPIR_Allreduce_inter (
comm, MPI_STATUS_IGNORE, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
}
@@ -691,8 +691,8 @@ int MPIR_Allreduce_inter (
0, newcomm_ptr, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
@@ -701,8 +701,8 @@ int MPIR_Allreduce_inter (
MPIU_CHKLMEM_FREEALL();
if (mpi_errno_ret)
mpi_errno = mpi_errno_ret;
- else if (*errflag)
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**coll_fail");
+ else if (*errflag != MPIR_ERR_NONE)
+ MPIU_ERR_SET(mpi_errno, *errflag, "**coll_fail");
return mpi_errno;
diff --git a/src/mpi/coll/alltoall.c b/src/mpi/coll/alltoall.c
index 1ca98c6..576931d 100644
--- a/src/mpi/coll/alltoall.c
+++ b/src/mpi/coll/alltoall.c
@@ -195,8 +195,8 @@ int MPIR_Alltoall_intra(
comm, &status, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
}
@@ -209,8 +209,8 @@ int MPIR_Alltoall_intra(
comm, &status, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
}
@@ -283,8 +283,8 @@ int MPIR_Alltoall_intra(
MPI_STATUS_IGNORE, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
@@ -374,8 +374,8 @@ int MPIR_Alltoall_intra(
comm, &status, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
last_recv_cnt = 0;
} else
@@ -428,8 +428,8 @@ int MPIR_Alltoall_intra(
comm, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
}
@@ -446,8 +446,8 @@ int MPIR_Alltoall_intra(
comm, &status, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
last_recv_cnt = 0;
} else
@@ -536,8 +536,8 @@ int MPIR_Alltoall_intra(
mpi_errno = starray[j].MPI_ERROR;
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
}
@@ -591,8 +591,8 @@ int MPIR_Alltoall_intra(
MPIR_ALLTOALL_TAG, comm, &status, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
}
@@ -604,8 +604,8 @@ int MPIR_Alltoall_intra(
MPIDU_ERR_CHECK_MULTIPLE_THREADS_EXIT( comm_ptr );
if (mpi_errno_ret)
mpi_errno = mpi_errno_ret;
- else if (*errflag)
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**coll_fail");
+ else if (*errflag != MPIR_ERR_NONE)
+ MPIU_ERR_SET(mpi_errno, *errflag, "**coll_fail");
return mpi_errno;
fn_fail:
@@ -691,8 +691,8 @@ int MPIR_Alltoall_inter(
MPIR_ALLTOALL_TAG, comm, &status, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
}
@@ -702,8 +702,8 @@ int MPIR_Alltoall_inter(
MPIDU_ERR_CHECK_MULTIPLE_THREADS_EXIT( comm_ptr );
if (mpi_errno_ret)
mpi_errno = mpi_errno_ret;
- else if (*errflag)
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**coll_fail");
+ else if (*errflag != MPIR_ERR_NONE)
+ MPIU_ERR_SET(mpi_errno, *errflag, "**coll_fail");
return mpi_errno;
fn_fail:
diff --git a/src/mpi/coll/alltoallv.c b/src/mpi/coll/alltoallv.c
index 607cb3a..7db2166 100644
--- a/src/mpi/coll/alltoallv.c
+++ b/src/mpi/coll/alltoallv.c
@@ -111,8 +111,8 @@ int MPIR_Alltoallv_intra(const void *sendbuf, const int *sendcounts, const int *
comm, &status, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
@@ -126,8 +126,8 @@ int MPIR_Alltoallv_intra(const void *sendbuf, const int *sendcounts, const int *
comm, &status, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
}
@@ -162,8 +162,8 @@ int MPIR_Alltoallv_intra(const void *sendbuf, const int *sendcounts, const int *
&reqarray[req_cnt]);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
req_cnt++;
@@ -184,8 +184,8 @@ int MPIR_Alltoallv_intra(const void *sendbuf, const int *sendcounts, const int *
&reqarray[req_cnt], errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
req_cnt++;
@@ -203,8 +203,8 @@ int MPIR_Alltoallv_intra(const void *sendbuf, const int *sendcounts, const int *
mpi_errno = starray[i].MPI_ERROR;
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
}
@@ -221,8 +221,8 @@ fn_exit:
if (mpi_errno_ret)
mpi_errno = mpi_errno_ret;
- else if (*errflag)
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**coll_fail");
+ else if (*errflag != MPIR_ERR_NONE)
+ MPIU_ERR_SET(mpi_errno, *errflag, "**coll_fail");
return mpi_errno;
@@ -309,8 +309,8 @@ int MPIR_Alltoallv_inter(const void *sendbuf, const int *sendcounts, const int *
comm, &status, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
}
@@ -320,8 +320,8 @@ int MPIR_Alltoallv_inter(const void *sendbuf, const int *sendcounts, const int *
MPIDU_ERR_CHECK_MULTIPLE_THREADS_EXIT( comm_ptr );
if (mpi_errno_ret)
mpi_errno = mpi_errno_ret;
- else if (*errflag)
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**coll_fail");
+ else if (*errflag != MPIR_ERR_NONE)
+ MPIU_ERR_SET(mpi_errno, *errflag, "**coll_fail");
return mpi_errno;
fn_fail:
goto fn_exit;
diff --git a/src/mpi/coll/alltoallw.c b/src/mpi/coll/alltoallw.c
index fa99a58..ecd8852 100644
--- a/src/mpi/coll/alltoallw.c
+++ b/src/mpi/coll/alltoallw.c
@@ -101,8 +101,8 @@ int MPIR_Alltoallw_intra(const void *sendbuf, const int sendcounts[], const int
comm, &status, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
}
@@ -115,8 +115,8 @@ int MPIR_Alltoallw_intra(const void *sendbuf, const int sendcounts[], const int
comm, &status, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
}
@@ -178,8 +178,8 @@ int MPIR_Alltoallw_intra(const void *sendbuf, const int sendcounts[], const int
mpi_errno = starray[i].MPI_ERROR;
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
}
@@ -209,8 +209,8 @@ int MPIR_Alltoallw_intra(const void *sendbuf, const int sendcounts[], const int
MPIR_ALLTOALLW_TAG, comm, &status, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
}
@@ -223,8 +223,8 @@ int MPIR_Alltoallw_intra(const void *sendbuf, const int sendcounts[], const int
MPIU_CHKLMEM_FREEALL();
if (mpi_errno_ret)
mpi_errno = mpi_errno_ret;
- else if (*errflag)
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**coll_fail");
+ else if (*errflag != MPIR_ERR_NONE)
+ MPIU_ERR_SET(mpi_errno, *errflag, "**coll_fail");
return mpi_errno;
fn_fail:
@@ -304,8 +304,8 @@ int MPIR_Alltoallw_inter(const void *sendbuf, const int sendcounts[], const int
MPIR_ALLTOALLW_TAG, comm, &status, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
}
@@ -315,8 +315,8 @@ int MPIR_Alltoallw_inter(const void *sendbuf, const int sendcounts[], const int
MPIDU_ERR_CHECK_MULTIPLE_THREADS_EXIT( comm_ptr );
if (mpi_errno_ret)
mpi_errno = mpi_errno_ret;
- else if (*errflag)
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**coll_fail");
+ else if (*errflag != MPIR_ERR_NONE)
+ MPIU_ERR_SET(mpi_errno, *errflag, "**coll_fail");
return mpi_errno;
fn_fail:
goto fn_exit;
diff --git a/src/mpi/coll/barrier.c b/src/mpi/coll/barrier.c
index 8d4957a..38a311f 100644
--- a/src/mpi/coll/barrier.c
+++ b/src/mpi/coll/barrier.c
@@ -81,8 +81,8 @@ static int barrier_smp_intra(MPID_Comm *comm_ptr, mpir_errflag_t *errflag)
mpi_errno = MPIR_Barrier_impl(comm_ptr->node_comm, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
}
@@ -92,8 +92,8 @@ static int barrier_smp_intra(MPID_Comm *comm_ptr, mpir_errflag_t *errflag)
mpi_errno = MPIR_Barrier_impl(comm_ptr->node_roots_comm, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
}
@@ -107,8 +107,8 @@ static int barrier_smp_intra(MPID_Comm *comm_ptr, mpir_errflag_t *errflag)
mpi_errno = MPIR_Bcast_impl(&i, 1, MPI_BYTE, 0, comm_ptr->node_comm, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
}
@@ -116,8 +116,8 @@ static int barrier_smp_intra(MPID_Comm *comm_ptr, mpir_errflag_t *errflag)
fn_exit:
if (mpi_errno_ret)
mpi_errno = mpi_errno_ret;
- else if (*errflag)
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**coll_fail");
+ else if (*errflag != MPIR_ERR_NONE)
+ MPIU_ERR_SET(mpi_errno, *errflag, "**coll_fail");
return mpi_errno;
fn_fail:
goto fn_exit;
@@ -147,8 +147,8 @@ int MPIR_Barrier_intra( MPID_Comm *comm_ptr, mpir_errflag_t *errflag )
mpi_errno = barrier_smp_intra(comm_ptr, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
goto fn_exit;
@@ -167,8 +167,8 @@ int MPIR_Barrier_intra( MPID_Comm *comm_ptr, mpir_errflag_t *errflag )
MPI_STATUS_IGNORE, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
mask <<= 1;
@@ -178,8 +178,8 @@ int MPIR_Barrier_intra( MPID_Comm *comm_ptr, mpir_errflag_t *errflag )
MPIDU_ERR_CHECK_MULTIPLE_THREADS_EXIT( comm_ptr );
if (mpi_errno_ret)
mpi_errno = mpi_errno_ret;
- else if (*errflag)
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**coll_fail");
+ else if (*errflag != MPIR_ERR_NONE)
+ MPIU_ERR_SET(mpi_errno, *errflag, "**coll_fail");
return mpi_errno;
fn_fail:
goto fn_exit;
@@ -212,8 +212,8 @@ int MPIR_Barrier_inter( MPID_Comm *comm_ptr, mpir_errflag_t *errflag )
mpi_errno = MPIR_Barrier_intra(newcomm_ptr, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
@@ -230,8 +230,8 @@ int MPIR_Barrier_inter( MPID_Comm *comm_ptr, mpir_errflag_t *errflag )
mpi_errno = MPIR_Bcast_inter(&i, 1, MPI_BYTE, root, comm_ptr, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
@@ -240,8 +240,8 @@ int MPIR_Barrier_inter( MPID_Comm *comm_ptr, mpir_errflag_t *errflag )
mpi_errno = MPIR_Bcast_inter(&i, 1, MPI_BYTE, root, comm_ptr, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
}
@@ -251,8 +251,8 @@ int MPIR_Barrier_inter( MPID_Comm *comm_ptr, mpir_errflag_t *errflag )
mpi_errno = MPIR_Bcast_inter(&i, 1, MPI_BYTE, root, comm_ptr, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
@@ -261,16 +261,16 @@ int MPIR_Barrier_inter( MPID_Comm *comm_ptr, mpir_errflag_t *errflag )
mpi_errno = MPIR_Bcast_inter(&i, 1, MPI_BYTE, root, comm_ptr, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
}
fn_exit:
if (mpi_errno_ret)
mpi_errno = mpi_errno_ret;
- else if (*errflag)
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**coll_fail");
+ else if (*errflag != MPIR_ERR_NONE)
+ MPIU_ERR_SET(mpi_errno, *errflag, "**coll_fail");
return mpi_errno;
fn_fail:
goto fn_exit;
@@ -316,7 +316,6 @@ int MPIR_Barrier(MPID_Comm *comm_ptr, mpir_errflag_t *errflag)
int MPIR_Barrier_impl(MPID_Comm *comm_ptr, mpir_errflag_t *errflag)
{
int mpi_errno = MPI_SUCCESS;
- int mpi_errno_ret = MPI_SUCCESS;
if (comm_ptr->coll_fns != NULL && comm_ptr->coll_fns->Barrier != NULL)
{
/* --BEGIN USEREXTENSION-- */
@@ -331,10 +330,8 @@ int MPIR_Barrier_impl(MPID_Comm *comm_ptr, mpir_errflag_t *errflag)
}
fn_exit:
- if (mpi_errno_ret)
- mpi_errno = mpi_errno_ret;
- else if (*errflag)
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**coll_fail");
+ if (*errflag != MPIR_ERR_NONE)
+ MPIU_ERR_SET(mpi_errno, *errflag, "**coll_fail");
return mpi_errno;
fn_fail:
goto fn_exit;
diff --git a/src/mpi/coll/barrier_group.c b/src/mpi/coll/barrier_group.c
index f110328..d55f097 100644
--- a/src/mpi/coll/barrier_group.c
+++ b/src/mpi/coll/barrier_group.c
@@ -24,8 +24,8 @@ int MPIR_Barrier_group( MPID_Comm *comm_ptr, MPID_Group *group_ptr, int tag, mpi
mpi_errno = MPIR_Allreduce_group(&src, &dst, 1, MPI_INT, MPI_BAND,
comm_ptr, group_ptr, tag, errflag);
- if (mpi_errno != MPI_SUCCESS)
- *errflag = TRUE;
+ if (mpi_errno != MPI_SUCCESS || *errflag != MPIR_ERR_NONE)
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
fn_exit:
return mpi_errno;
diff --git a/src/mpi/coll/bcast.c b/src/mpi/coll/bcast.c
index bbf6acc..e1abbda 100644
--- a/src/mpi/coll/bcast.c
+++ b/src/mpi/coll/bcast.c
@@ -237,8 +237,8 @@ static int MPIR_Bcast_binomial(
MPIR_BCAST_TAG,comm, &status, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
@@ -246,8 +246,8 @@ static int MPIR_Bcast_binomial(
MPIR_Get_count_impl(&status, MPI_BYTE, &recvd_size);
/* recvd_size may not be accurate for packed heterogeneous data */
if (is_homogeneous && recvd_size != nbytes) {
- *errflag = TRUE;
- MPIU_ERR_SET2(mpi_errno, MPI_ERR_OTHER,
+ if (*errflag == MPIR_ERR_NONE) *errflag = MPIR_ERR_OTHER;
+ MPIU_ERR_SET2(mpi_errno, MPI_ERR_OTHER,
"**collective_size_mismatch",
"**collective_size_mismatch %d %d", recvd_size, nbytes );
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
@@ -283,8 +283,8 @@ static int MPIR_Bcast_binomial(
MPIR_BCAST_TAG,comm, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
}
@@ -308,8 +308,8 @@ fn_exit:
/* --BEGIN ERROR HANDLING-- */
if (mpi_errno_ret)
mpi_errno = mpi_errno_ret;
- else if (*errflag)
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**coll_fail");
+ else if (*errflag != MPIR_ERR_NONE)
+ MPIU_ERR_SET(mpi_errno, *errflag, "**coll_fail");
/* --END ERROR HANDLING-- */
return mpi_errno;
fn_fail:
@@ -395,8 +395,8 @@ static int scatter_for_bcast(
MPIR_BCAST_TAG, comm, &status, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
curr_size = 0;
} else
@@ -431,8 +431,8 @@ static int scatter_for_bcast(
MPIR_BCAST_TAG, comm, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
@@ -446,8 +446,8 @@ fn_exit:
/* --BEGIN ERROR HANDLING-- */
if (mpi_errno_ret)
mpi_errno = mpi_errno_ret;
- else if (*errflag)
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**coll_fail");
+ else if (*errflag != MPIR_ERR_NONE)
+ MPIU_ERR_SET(mpi_errno, *errflag, "**coll_fail");
/* --END ERROR HANDLING-- */
return mpi_errno;
fn_fail:
@@ -569,8 +569,8 @@ static int MPIR_Bcast_scatter_doubling_allgather(
nbytes, tmp_buf, is_contig, is_homogeneous, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
@@ -615,8 +615,8 @@ static int MPIR_Bcast_scatter_doubling_allgather(
if (mpi_errno) {
/* --BEGIN ERROR HANDLING-- */
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
recv_size = 0;
/* --END ERROR HANDLING-- */
@@ -691,8 +691,8 @@ static int MPIR_Bcast_scatter_doubling_allgather(
sent now. */
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
}
@@ -713,8 +713,8 @@ static int MPIR_Bcast_scatter_doubling_allgather(
if (mpi_errno) {
/* --BEGIN ERROR HANDLING-- */
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
recv_size = 0;
/* --END ERROR HANDLING-- */
@@ -737,8 +737,8 @@ static int MPIR_Bcast_scatter_doubling_allgather(
/* check that we received as much as we expected */
/* recvd_size may not be accurate for packed heterogeneous data */
if (is_homogeneous && curr_size != nbytes) {
- *errflag = TRUE;
- MPIU_ERR_SET2(mpi_errno, MPI_ERR_OTHER,
+ if (*errflag == MPIR_ERR_NONE) *errflag = MPIR_ERR_OTHER;
+ MPIU_ERR_SET2(mpi_errno, MPI_ERR_OTHER,
"**collective_size_mismatch",
"**collective_size_mismatch %d %d", curr_size, nbytes );
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
@@ -760,8 +760,8 @@ fn_exit:
/* --BEGIN ERROR HANDLING-- */
if (mpi_errno_ret)
mpi_errno = mpi_errno_ret;
- else if (*errflag)
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**coll_fail");
+ else if (*errflag != MPIR_ERR_NONE)
+ MPIU_ERR_SET(mpi_errno, *errflag, "**coll_fail");
/* --END ERROR HANDLING-- */
return mpi_errno;
fn_fail:
@@ -876,8 +876,8 @@ static int MPIR_Bcast_scatter_ring_allgather(
nbytes, tmp_buf, is_contig, is_homogeneous, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
@@ -915,8 +915,8 @@ static int MPIR_Bcast_scatter_ring_allgather(
comm, &status, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
MPIR_Get_count_impl(&status, MPI_BYTE, &recvd_size);
@@ -928,8 +928,8 @@ static int MPIR_Bcast_scatter_ring_allgather(
/* check that we received as much as we expected */
/* recvd_size may not be accurate for packed heterogeneous data */
if (is_homogeneous && curr_size != nbytes) {
- *errflag = TRUE;
- MPIU_ERR_SET2(mpi_errno, MPI_ERR_OTHER,
+ if (*errflag == MPIR_ERR_NONE) *errflag = MPIR_ERR_OTHER;
+ MPIU_ERR_SET2(mpi_errno, MPI_ERR_OTHER,
"**collective_size_mismatch",
"**collective_size_mismatch %d %d", curr_size, nbytes );
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
@@ -951,8 +951,8 @@ fn_exit:
/* --BEGIN ERROR HANDLING-- */
if (mpi_errno_ret)
mpi_errno = mpi_errno_ret;
- else if (*errflag)
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**coll_fail");
+ else if (*errflag != MPIR_ERR_NONE)
+ MPIU_ERR_SET(mpi_errno, *errflag, "**coll_fail");
/* --END ERROR HANDLING-- */
return mpi_errno;
fn_fail:
@@ -980,8 +980,8 @@ fn_fail:
} \
if (mpi_errno_) { \
/* for communication errors, just record the error but continue */ \
- *(errflag_) = TRUE; \
- MPIU_ERR_SET(mpi_errno_, MPI_ERR_OTHER, "**fail"); \
+ *(errflag_) = MPIR_ERR_GET_CLASS(mpi_errno_); \
+ MPIU_ERR_SET(mpi_errno_, *(errflag_), "**fail"); \
MPIU_ERR_ADD(mpi_errno_ret_, mpi_errno_); \
} \
} while (0)
@@ -1051,8 +1051,8 @@ static int MPIR_SMP_Bcast(
MPIR_BCAST_TAG,comm_ptr->node_comm->handle, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
}
@@ -1061,16 +1061,16 @@ static int MPIR_SMP_Bcast(
MPIR_BCAST_TAG,comm_ptr->node_comm->handle, &status, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
/* check that we received as much as we expected */
MPIR_Get_count_impl(&status, MPI_BYTE, &recvd_size);
/* recvd_size may not be accurate for packed heterogeneous data */
if (is_homogeneous && recvd_size != nbytes) {
- *errflag = TRUE;
- MPIU_ERR_SET2(mpi_errno, MPI_ERR_OTHER,
+ if (*errflag == MPIR_ERR_NONE) *errflag = MPIR_ERR_OTHER;
+ MPIU_ERR_SET2(mpi_errno, MPI_ERR_OTHER,
"**collective_size_mismatch",
"**collective_size_mismatch %d %d",
recvd_size, nbytes );
@@ -1156,8 +1156,8 @@ static int MPIR_SMP_Bcast(
mpi_errno = MPIR_Bcast_scatter_ring_allgather(buffer, count, datatype, root, comm_ptr, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
}
@@ -1167,8 +1167,8 @@ fn_exit:
/* --BEGIN ERROR HANDLING-- */
if (mpi_errno_ret)
mpi_errno = mpi_errno_ret;
- else if (*errflag)
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**coll_fail");
+ else if (*errflag != MPIR_ERR_NONE)
+ MPIU_ERR_SET(mpi_errno, *errflag, "**coll_fail");
/* --END ERROR HANDLING-- */
return mpi_errno;
fn_fail:
@@ -1253,8 +1253,8 @@ int MPIR_Bcast_intra (
mpi_errno = MPIR_SMP_Bcast(buffer, count, datatype, root, comm_ptr, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
goto fn_exit;
@@ -1291,8 +1291,8 @@ int MPIR_Bcast_intra (
mpi_errno = MPIR_Bcast_binomial(buffer, count, datatype, root, comm_ptr, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
}
@@ -1303,8 +1303,8 @@ int MPIR_Bcast_intra (
mpi_errno = MPIR_Bcast_scatter_doubling_allgather(buffer, count, datatype, root, comm_ptr, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
}
@@ -1316,8 +1316,8 @@ int MPIR_Bcast_intra (
mpi_errno = MPIR_Bcast_scatter_ring_allgather(buffer, count, datatype, root, comm_ptr, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
}
@@ -1332,8 +1332,8 @@ fn_exit:
/* --BEGIN ERROR HANDLING-- */
if (mpi_errno_ret)
mpi_errno = mpi_errno_ret;
- else if (*errflag)
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**coll_fail");
+ else if (*errflag != MPIR_ERR_NONE)
+ MPIU_ERR_SET(mpi_errno, *errflag, "**coll_fail");
/* --END ERROR HANDLING-- */
return mpi_errno;
fn_fail:
@@ -1383,8 +1383,8 @@ int MPIR_Bcast_inter (
MPIR_BCAST_TAG, comm, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
MPIDU_ERR_CHECK_MULTIPLE_THREADS_EXIT( comm_ptr );
@@ -1401,8 +1401,8 @@ int MPIR_Bcast_inter (
MPIR_BCAST_TAG, comm, &status, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
}
@@ -1418,8 +1418,8 @@ int MPIR_Bcast_inter (
mpi_errno = MPIR_Bcast_intra(buffer, count, datatype, 0, newcomm_ptr, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
}
@@ -1429,7 +1429,7 @@ fn_fail:
/* --BEGIN ERROR HANDLING-- */
if (mpi_errno_ret)
mpi_errno = mpi_errno_ret;
- else if (*errflag)
+ else if (*errflag != MPIR_ERR_NONE)
MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**coll_fail");
/* --END ERROR HANDLING-- */
return mpi_errno;
diff --git a/src/mpi/coll/exscan.c b/src/mpi/coll/exscan.c
index 86b8f14..f14444a 100644
--- a/src/mpi/coll/exscan.c
+++ b/src/mpi/coll/exscan.c
@@ -161,8 +161,8 @@ int MPIR_Exscan (
&status, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
@@ -224,7 +224,7 @@ fn_exit:
MPIU_CHKLMEM_FREEALL();
if (mpi_errno_ret)
mpi_errno = mpi_errno_ret;
- else if (*errflag)
+ else if (*errflag != MPIR_ERR_NONE)
MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**coll_fail");
return mpi_errno;
fn_fail:
diff --git a/src/mpi/coll/gather.c b/src/mpi/coll/gather.c
index 81bb78f..fa8a983 100644
--- a/src/mpi/coll/gather.c
+++ b/src/mpi/coll/gather.c
@@ -226,8 +226,8 @@ int MPIR_Gather_intra(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
&status, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
}
@@ -236,8 +236,8 @@ int MPIR_Gather_intra(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
src, MPIR_GATHER_TAG, comm, &status, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
copy_offset = rank + mask;
@@ -259,8 +259,8 @@ int MPIR_Gather_intra(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
MPIR_GATHER_TAG, comm, &status, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
@@ -287,8 +287,8 @@ int MPIR_Gather_intra(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
&status, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
curr_cnt += (recvblks * nbytes);
@@ -307,8 +307,8 @@ int MPIR_Gather_intra(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
MPIR_GATHER_TAG, comm, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
}
@@ -317,8 +317,8 @@ int MPIR_Gather_intra(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
MPIR_GATHER_TAG, comm, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
}
@@ -340,8 +340,8 @@ int MPIR_Gather_intra(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
MPIR_GATHER_TAG, comm, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
MPIR_Type_free_impl(&tmp_type);
@@ -413,8 +413,8 @@ int MPIR_Gather_intra(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
&status, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
recv_size = 0;
} else
@@ -432,8 +432,8 @@ int MPIR_Gather_intra(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
MPIR_GATHER_TAG, comm, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
break;
@@ -476,8 +476,8 @@ int MPIR_Gather_intra(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
MPIDU_ERR_CHECK_MULTIPLE_THREADS_EXIT( comm_ptr );
if (mpi_errno_ret)
mpi_errno = mpi_errno_ret;
- else if (*errflag)
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**coll_fail");
+ else if (*errflag != MPIR_ERR_NONE)
+ MPIU_ERR_SET(mpi_errno, *errflag, "**coll_fail");
return mpi_errno;
fn_fail:
goto fn_exit;
@@ -549,8 +549,8 @@ int MPIR_Gather_inter(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
&status, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
}
@@ -588,8 +588,8 @@ int MPIR_Gather_inter(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
newcomm_ptr, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
@@ -600,8 +600,8 @@ int MPIR_Gather_inter(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
MPIR_GATHER_TAG, comm, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
}
@@ -623,8 +623,8 @@ int MPIR_Gather_inter(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
MPIR_GATHER_TAG, comm, &status, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
}
@@ -635,8 +635,8 @@ int MPIR_Gather_inter(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
MPIR_GATHER_TAG,comm, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
}
@@ -647,8 +647,8 @@ int MPIR_Gather_inter(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
MPIDU_ERR_CHECK_MULTIPLE_THREADS_EXIT( comm_ptr );
if (mpi_errno_ret)
mpi_errno = mpi_errno_ret;
- else if (*errflag)
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**coll_fail");
+ else if (*errflag != MPIR_ERR_NONE)
+ MPIU_ERR_SET(mpi_errno, *errflag, "**coll_fail");
return mpi_errno;
fn_fail:
goto fn_exit;
diff --git a/src/mpi/coll/gatherv.c b/src/mpi/coll/gatherv.c
index cc7a54a..d1b6f94 100644
--- a/src/mpi/coll/gatherv.c
+++ b/src/mpi/coll/gatherv.c
@@ -149,8 +149,8 @@ int MPIR_Gatherv (
mpi_errno = starray[i].MPI_ERROR;
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
}
@@ -177,8 +177,8 @@ int MPIR_Gatherv (
MPIR_GATHERV_TAG, comm, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
}
@@ -187,8 +187,8 @@ int MPIR_Gatherv (
MPIR_GATHERV_TAG, comm, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
}
@@ -202,8 +202,8 @@ fn_exit:
MPIU_CHKLMEM_FREEALL();
if (mpi_errno_ret)
mpi_errno = mpi_errno_ret;
- else if (*errflag)
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**coll_fail");
+ else if (*errflag != MPIR_ERR_NONE)
+ MPIU_ERR_SET(mpi_errno, *errflag, "**coll_fail");
return mpi_errno;
fn_fail:
goto fn_exit;
diff --git a/src/mpi/coll/helper_fns.c b/src/mpi/coll/helper_fns.c
index 243d2a0..588092f 100644
--- a/src/mpi/coll/helper_fns.c
+++ b/src/mpi/coll/helper_fns.c
@@ -272,7 +272,7 @@ int MPIC_Send(const void *buf, int count, MPI_Datatype datatype, int dest, int t
break;
case MPIR_ERR_PROC_FAILED:
MPIR_TAG_SET_PROC_FAILURE_BIT(tag);
- case MPIR_ERR_OTHER:
+ default:
MPIR_TAG_SET_ERROR_BIT(tag);
}
@@ -391,8 +391,14 @@ int MPIC_Ssend(const void *buf, int count, MPI_Datatype datatype, int dest, int
context_id = (comm_ptr->comm_kind == MPID_INTRACOMM) ?
MPID_CONTEXT_INTRA_COLL : MPID_CONTEXT_INTER_COLL;
- if (*errflag)
- MPIR_TAG_SET_ERROR_BIT(tag);
+ switch(*errflag) {
+ case MPIR_ERR_NONE:
+ break;
+ case MPIR_ERR_PROC_FAILED:
+ MPIR_TAG_SET_PROC_FAILURE_BIT(tag);
+ default:
+ MPIR_TAG_SET_ERROR_BIT(tag);
+ }
mpi_errno = MPID_Ssend(buf, count, datatype, dest, tag, comm_ptr,
context_id, &request_ptr);
@@ -448,7 +454,7 @@ int MPIC_Sendrecv(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
break;
case MPIR_ERR_PROC_FAILED:
MPIR_TAG_SET_PROC_FAILURE_BIT(sendtag);
- case MPIR_ERR_OTHER:
+ default:
MPIR_TAG_SET_ERROR_BIT(sendtag);
}
@@ -537,7 +543,7 @@ int MPIC_Sendrecv_replace(void *buf, int count, MPI_Datatype datatype,
break;
case MPIR_ERR_PROC_FAILED:
MPIR_TAG_SET_PROC_FAILURE_BIT(sendtag);
- case MPIR_ERR_OTHER:
+ default:
MPIR_TAG_SET_ERROR_BIT(sendtag);
}
@@ -650,7 +656,7 @@ int MPIC_Isend(const void *buf, int count, MPI_Datatype datatype, int dest, int
break;
case MPIR_ERR_PROC_FAILED:
MPIR_TAG_SET_PROC_FAILURE_BIT(tag);
- case MPIR_ERR_OTHER:
+ default:
MPIR_TAG_SET_ERROR_BIT(tag);
}
diff --git a/src/mpi/coll/iscatter.c b/src/mpi/coll/iscatter.c
index 0f7beed..3d842bc 100644
--- a/src/mpi/coll/iscatter.c
+++ b/src/mpi/coll/iscatter.c
@@ -367,8 +367,8 @@ int MPIR_Iscatter_intra(const void *sendbuf, int sendcount, MPI_Datatype sendtyp
MPIR_SCATTER_TAG, comm, &status, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
curr_cnt = 0;
} else
@@ -398,8 +398,8 @@ int MPIR_Iscatter_intra(const void *sendbuf, int sendcount, MPI_Datatype sendtyp
MPIR_SCATTER_TAG, comm, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
curr_cnt -= send_subtree_cnt;
diff --git a/src/mpi/coll/red_scat.c b/src/mpi/coll/red_scat.c
index afc3255..fa7105b 100644
--- a/src/mpi/coll/red_scat.c
+++ b/src/mpi/coll/red_scat.c
@@ -139,8 +139,8 @@ static int MPIR_Reduce_scatter_noncomm(const void *sendbuf, void *recvbuf, const
comm, MPI_STATUS_IGNORE, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
/* always perform the reduction at recv_offset, the data at send_offset
@@ -180,8 +180,8 @@ fn_exit:
MPIU_CHKLMEM_FREEALL();
if (mpi_errno_ret)
mpi_errno = mpi_errno_ret;
- else if (*errflag)
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**coll_fail");
+ else if (*errflag != MPIR_ERR_NONE)
+ MPIU_ERR_SET(mpi_errno, *errflag, "**coll_fail");
return mpi_errno;
fn_fail:
goto fn_exit;
@@ -348,8 +348,8 @@ int MPIR_Reduce_scatter_intra(const void *sendbuf, void *recvbuf, const int recv
MPIR_REDUCE_SCATTER_TAG, comm, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
@@ -365,8 +365,8 @@ int MPIR_Reduce_scatter_intra(const void *sendbuf, void *recvbuf, const int recv
MPI_STATUS_IGNORE, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
@@ -461,8 +461,8 @@ int MPIR_Reduce_scatter_intra(const void *sendbuf, void *recvbuf, const int recv
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
@@ -505,8 +505,8 @@ int MPIR_Reduce_scatter_intra(const void *sendbuf, void *recvbuf, const int recv
MPIR_REDUCE_SCATTER_TAG, comm, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
}
@@ -519,8 +519,8 @@ int MPIR_Reduce_scatter_intra(const void *sendbuf, void *recvbuf, const int recv
MPI_STATUS_IGNORE, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
}
@@ -569,8 +569,8 @@ int MPIR_Reduce_scatter_intra(const void *sendbuf, void *recvbuf, const int recv
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
@@ -646,8 +646,8 @@ int MPIR_Reduce_scatter_intra(const void *sendbuf, void *recvbuf, const int recv
mpi_errno = MPIR_Reduce_scatter_noncomm(sendbuf, recvbuf, recvcounts, datatype, op, comm_ptr, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
}
@@ -745,8 +745,8 @@ int MPIR_Reduce_scatter_intra(const void *sendbuf, void *recvbuf, const int recv
received = 1;
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
}
@@ -792,8 +792,8 @@ int MPIR_Reduce_scatter_intra(const void *sendbuf, void *recvbuf, const int recv
comm, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
}
@@ -808,8 +808,8 @@ int MPIR_Reduce_scatter_intra(const void *sendbuf, void *recvbuf, const int recv
received = 1;
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
}
@@ -881,8 +881,8 @@ fn_exit:
if (mpi_errno_ret)
mpi_errno = mpi_errno_ret;
- else if (*errflag)
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**coll_fail");
+ else if (*errflag != MPIR_ERR_NONE)
+ MPIU_ERR_SET(mpi_errno, *errflag, "**coll_fail");
return mpi_errno;
fn_fail:
goto fn_exit;
@@ -949,8 +949,8 @@ int MPIR_Reduce_scatter_inter(const void *sendbuf, void *recvbuf, const int recv
root, comm_ptr, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
@@ -960,8 +960,8 @@ int MPIR_Reduce_scatter_inter(const void *sendbuf, void *recvbuf, const int recv
root, comm_ptr, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
}
@@ -972,8 +972,8 @@ int MPIR_Reduce_scatter_inter(const void *sendbuf, void *recvbuf, const int recv
root, comm_ptr, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
@@ -983,8 +983,8 @@ int MPIR_Reduce_scatter_inter(const void *sendbuf, void *recvbuf, const int recv
root, comm_ptr, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
}
@@ -1001,8 +1001,8 @@ int MPIR_Reduce_scatter_inter(const void *sendbuf, void *recvbuf, const int recv
recvcounts[rank], datatype, 0, newcomm_ptr, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
@@ -1010,8 +1010,8 @@ int MPIR_Reduce_scatter_inter(const void *sendbuf, void *recvbuf, const int recv
MPIU_CHKLMEM_FREEALL();
if (mpi_errno_ret)
mpi_errno = mpi_errno_ret;
- else if (*errflag)
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**coll_fail");
+ else if (*errflag != MPIR_ERR_NONE)
+ MPIU_ERR_SET(mpi_errno, *errflag, "**coll_fail");
return mpi_errno;
fn_fail:
goto fn_exit;
diff --git a/src/mpi/coll/red_scat_block.c b/src/mpi/coll/red_scat_block.c
index a19709f..fdab92e 100644
--- a/src/mpi/coll/red_scat_block.c
+++ b/src/mpi/coll/red_scat_block.c
@@ -131,8 +131,8 @@ static int MPIR_Reduce_scatter_block_noncomm (
comm, MPI_STATUS_IGNORE, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
/* always perform the reduction at recv_offset, the data at send_offset
@@ -173,8 +173,8 @@ fn_exit:
/* --BEGIN ERROR HANDLING-- */
if (mpi_errno_ret)
mpi_errno = mpi_errno_ret;
- else if (*errflag)
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**coll_fail");
+ else if (*errflag != MPIR_ERR_NONE)
+ MPIU_ERR_SET(mpi_errno, *errflag, "**coll_fail");
/* --END ERROR HANDLING-- */
return mpi_errno;
fn_fail:
@@ -347,8 +347,8 @@ int MPIR_Reduce_scatter_block_intra (
MPIR_REDUCE_SCATTER_BLOCK_TAG, comm, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
@@ -364,8 +364,8 @@ int MPIR_Reduce_scatter_block_intra (
MPI_STATUS_IGNORE, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
@@ -460,8 +460,8 @@ int MPIR_Reduce_scatter_block_intra (
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
@@ -507,8 +507,8 @@ int MPIR_Reduce_scatter_block_intra (
}
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
}
@@ -555,8 +555,8 @@ int MPIR_Reduce_scatter_block_intra (
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
@@ -621,8 +621,8 @@ int MPIR_Reduce_scatter_block_intra (
mpi_errno = MPIR_Reduce_scatter_block_noncomm(sendbuf, recvbuf, recvcount, datatype, op, comm_ptr, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
}
@@ -720,8 +720,8 @@ int MPIR_Reduce_scatter_block_intra (
received = 1;
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
}
@@ -767,8 +767,8 @@ int MPIR_Reduce_scatter_block_intra (
comm, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
}
@@ -783,8 +783,8 @@ int MPIR_Reduce_scatter_block_intra (
received = 1;
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
}
@@ -853,8 +853,8 @@ fn_exit:
/* --BEGIN ERROR HANDLING-- */
if (mpi_errno_ret)
mpi_errno = mpi_errno_ret;
- else if (*errflag)
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**coll_fail");
+ else if (*errflag != MPIR_ERR_NONE)
+ MPIU_ERR_SET(mpi_errno, *errflag, "**coll_fail");
/* --END ERROR HANDLING-- */
return mpi_errno;
fn_fail:
@@ -916,8 +916,8 @@ int MPIR_Reduce_scatter_block_inter (
root, comm_ptr, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
@@ -927,8 +927,8 @@ int MPIR_Reduce_scatter_block_inter (
root, comm_ptr, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
}
@@ -939,8 +939,8 @@ int MPIR_Reduce_scatter_block_inter (
root, comm_ptr, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
@@ -950,8 +950,8 @@ int MPIR_Reduce_scatter_block_inter (
root, comm_ptr, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
}
@@ -966,8 +966,8 @@ int MPIR_Reduce_scatter_block_inter (
recvcount, datatype, 0, newcomm_ptr, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
@@ -976,8 +976,8 @@ int MPIR_Reduce_scatter_block_inter (
/* --BEGIN ERROR HANDLING-- */
if (mpi_errno_ret)
mpi_errno = mpi_errno_ret;
- else if (*errflag)
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**coll_fail");
+ else if (*errflag != MPIR_ERR_NONE)
+ MPIU_ERR_SET(mpi_errno, *errflag, "**coll_fail");
/* --END ERROR HANDLING-- */
return mpi_errno;
fn_fail:
diff --git a/src/mpi/coll/reduce.c b/src/mpi/coll/reduce.c
index 2e56814..b5cdaa9 100644
--- a/src/mpi/coll/reduce.c
+++ b/src/mpi/coll/reduce.c
@@ -184,8 +184,8 @@ static int MPIR_Reduce_binomial (
MPIR_REDUCE_TAG, comm, &status, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
@@ -213,8 +213,8 @@ static int MPIR_Reduce_binomial (
source, MPIR_REDUCE_TAG, comm, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
break;
@@ -236,8 +236,8 @@ static int MPIR_Reduce_binomial (
}
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
}
@@ -246,8 +246,8 @@ fn_exit:
MPIU_CHKLMEM_FREEALL();
if (mpi_errno_ret)
mpi_errno = mpi_errno_ret;
- else if (*errflag)
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**coll_fail");
+ else if (*errflag != MPIR_ERR_NONE)
+ MPIU_ERR_SET(mpi_errno, *errflag, "**coll_fail");
return mpi_errno;
fn_fail:
goto fn_exit;
@@ -376,8 +376,8 @@ static int MPIR_Reduce_redscat_gather (
MPIR_REDUCE_TAG, comm, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
@@ -393,8 +393,8 @@ static int MPIR_Reduce_redscat_gather (
MPI_STATUS_IGNORE, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
@@ -468,8 +468,8 @@ static int MPIR_Reduce_redscat_gather (
MPI_STATUS_IGNORE, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
@@ -517,8 +517,8 @@ static int MPIR_Reduce_redscat_gather (
MPI_STATUS_IGNORE, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
newrank = 0;
@@ -530,8 +530,8 @@ static int MPIR_Reduce_redscat_gather (
root, MPIR_REDUCE_TAG, comm, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
newrank = -1;
@@ -604,8 +604,8 @@ static int MPIR_Reduce_redscat_gather (
comm, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
break;
@@ -621,8 +621,8 @@ static int MPIR_Reduce_redscat_gather (
MPI_STATUS_IGNORE, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
}
@@ -647,8 +647,8 @@ fn_exit:
MPIU_CHKLMEM_FREEALL();
if (mpi_errno_ret)
mpi_errno = mpi_errno_ret;
- else if (*errflag)
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**coll_fail");
+ else if (*errflag != MPIR_ERR_NONE)
+ MPIU_ERR_SET(mpi_errno, *errflag, "**coll_fail");
return mpi_errno;
fn_fail:
goto fn_exit;
@@ -774,8 +774,8 @@ int MPIR_Reduce_intra (
op, 0, comm_ptr->node_comm, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
}
@@ -791,8 +791,8 @@ int MPIR_Reduce_intra (
comm_ptr->node_roots_comm, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
}
@@ -806,8 +806,8 @@ int MPIR_Reduce_intra (
comm_ptr->node_roots_comm, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
@@ -822,8 +822,8 @@ int MPIR_Reduce_intra (
comm_ptr->node_roots_comm, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
@@ -842,8 +842,8 @@ int MPIR_Reduce_intra (
comm_ptr->node_comm, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
}
@@ -867,8 +867,8 @@ int MPIR_Reduce_intra (
mpi_errno = MPIR_Reduce_redscat_gather(sendbuf, recvbuf, count, datatype, op, root, comm_ptr, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
}
@@ -877,8 +877,8 @@ int MPIR_Reduce_intra (
mpi_errno = MPIR_Reduce_binomial(sendbuf, recvbuf, count, datatype, op, root, comm_ptr, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
}
@@ -892,8 +892,8 @@ int MPIR_Reduce_intra (
if (mpi_errno_ret)
mpi_errno = mpi_errno_ret;
- else if (*errflag)
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**coll_fail");
+ else if (*errflag != MPIR_ERR_NONE)
+ MPIU_ERR_SET(mpi_errno, *errflag, "**coll_fail");
return mpi_errno;
fn_fail:
goto fn_exit;
@@ -947,8 +947,8 @@ int MPIR_Reduce_inter (
MPIR_REDUCE_TAG, comm, &status, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
}
@@ -985,8 +985,8 @@ int MPIR_Reduce_inter (
op, 0, newcomm_ptr, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
@@ -996,8 +996,8 @@ int MPIR_Reduce_inter (
MPIR_REDUCE_TAG, comm, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
}
@@ -1008,8 +1008,8 @@ int MPIR_Reduce_inter (
MPIU_CHKLMEM_FREEALL();
if (mpi_errno_ret)
mpi_errno = mpi_errno_ret;
- else if (*errflag)
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**coll_fail");
+ else if (*errflag != MPIR_ERR_NONE)
+ MPIU_ERR_SET(mpi_errno, *errflag, "**coll_fail");
return mpi_errno;
fn_fail:
diff --git a/src/mpi/coll/scan.c b/src/mpi/coll/scan.c
index 6aa9372..05df09b 100644
--- a/src/mpi/coll/scan.c
+++ b/src/mpi/coll/scan.c
@@ -161,8 +161,8 @@ static int MPIR_Scan_generic (
&status, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
@@ -206,8 +206,8 @@ static int MPIR_Scan_generic (
if (mpi_errno_ret)
mpi_errno = mpi_errno_ret;
- else if (*errflag)
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**coll_fail");
+ else if (*errflag != MPIR_ERR_NONE)
+ MPIU_ERR_SET(mpi_errno, *errflag, "**coll_fail");
return mpi_errno;
fn_fail:
goto fn_exit;
@@ -285,8 +285,8 @@ int MPIR_Scan(
op, comm_ptr->node_comm, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
}
@@ -308,8 +308,8 @@ int MPIR_Scan(
comm_ptr->node_comm->handle, &status, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
}
@@ -321,8 +321,8 @@ int MPIR_Scan(
0, MPIR_SCAN_TAG, comm_ptr->node_comm->handle, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
}
@@ -341,8 +341,8 @@ int MPIR_Scan(
op, comm_ptr->node_roots_comm, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
@@ -354,8 +354,8 @@ int MPIR_Scan(
MPIR_SCAN_TAG, comm_ptr->node_roots_comm->handle, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
}
@@ -368,8 +368,8 @@ int MPIR_Scan(
noneed = 0;
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
}
@@ -385,8 +385,8 @@ int MPIR_Scan(
mpi_errno = MPIR_Bcast_impl(&noneed, 1, MPI_INT, 0, comm_ptr->node_comm, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
}
@@ -397,8 +397,8 @@ int MPIR_Scan(
comm_ptr->node_comm, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
}
@@ -412,8 +412,8 @@ int MPIR_Scan(
MPIU_CHKLMEM_FREEALL();
if (mpi_errno_ret)
mpi_errno = mpi_errno_ret;
- else if (*errflag)
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**coll_fail");
+ else if (*errflag != MPIR_ERR_NONE)
+ MPIU_ERR_SET(mpi_errno, *errflag, "**coll_fail");
return mpi_errno;
fn_fail:
diff --git a/src/mpi/coll/scatter.c b/src/mpi/coll/scatter.c
index 65edd74..94d9587 100644
--- a/src/mpi/coll/scatter.c
+++ b/src/mpi/coll/scatter.c
@@ -188,8 +188,8 @@ int MPIR_Scatter_intra(const void *sendbuf, int sendcount, MPI_Datatype sendtype
&status, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
}
@@ -198,8 +198,8 @@ int MPIR_Scatter_intra(const void *sendbuf, int sendcount, MPI_Datatype sendtype
MPIR_SCATTER_TAG, comm, &status, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
curr_cnt = 0;
} else
@@ -245,8 +245,8 @@ int MPIR_Scatter_intra(const void *sendbuf, int sendcount, MPI_Datatype sendtype
}
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
curr_cnt -= send_subtree_cnt;
@@ -352,8 +352,8 @@ int MPIR_Scatter_intra(const void *sendbuf, int sendcount, MPI_Datatype sendtype
MPIR_SCATTER_TAG, comm, &status, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
curr_cnt = 0;
} else
@@ -383,8 +383,8 @@ int MPIR_Scatter_intra(const void *sendbuf, int sendcount, MPI_Datatype sendtype
MPIR_SCATTER_TAG, comm, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
curr_cnt -= send_subtree_cnt;
@@ -408,8 +408,8 @@ int MPIR_Scatter_intra(const void *sendbuf, int sendcount, MPI_Datatype sendtype
MPIDU_ERR_CHECK_MULTIPLE_THREADS_EXIT( comm_ptr );
if (mpi_errno_ret)
mpi_errno = mpi_errno_ret;
- else if (*errflag)
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**coll_fail");
+ else if (*errflag != MPIR_ERR_NONE)
+ MPIU_ERR_SET(mpi_errno, *errflag, "**coll_fail");
return mpi_errno;
fn_fail:
goto fn_exit;
@@ -472,8 +472,8 @@ int MPIR_Scatter_inter(const void *sendbuf, int sendcount, MPI_Datatype sendtype
sendtype, 0, MPIR_SCATTER_TAG, comm, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
goto fn_exit;
@@ -502,8 +502,8 @@ int MPIR_Scatter_inter(const void *sendbuf, int sendcount, MPI_Datatype sendtype
MPIR_SCATTER_TAG, comm, &status, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
}
@@ -520,8 +520,8 @@ int MPIR_Scatter_inter(const void *sendbuf, int sendcount, MPI_Datatype sendtype
newcomm_ptr, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
}
@@ -536,8 +536,8 @@ int MPIR_Scatter_inter(const void *sendbuf, int sendcount, MPI_Datatype sendtype
MPIR_SCATTER_TAG, comm, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
}
@@ -547,8 +547,8 @@ int MPIR_Scatter_inter(const void *sendbuf, int sendcount, MPI_Datatype sendtype
MPIR_SCATTER_TAG,comm,&status, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
}
@@ -560,8 +560,8 @@ int MPIR_Scatter_inter(const void *sendbuf, int sendcount, MPI_Datatype sendtype
MPIDU_ERR_CHECK_MULTIPLE_THREADS_EXIT( comm_ptr );
if (mpi_errno_ret)
mpi_errno = mpi_errno_ret;
- else if (*errflag)
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**coll_fail");
+ else if (*errflag != MPIR_ERR_NONE)
+ MPIU_ERR_SET(mpi_errno, *errflag, "**coll_fail");
return mpi_errno;
fn_fail:
goto fn_exit;
diff --git a/src/mpi/coll/scatterv.c b/src/mpi/coll/scatterv.c
index f283679..4aaacc3 100644
--- a/src/mpi/coll/scatterv.c
+++ b/src/mpi/coll/scatterv.c
@@ -121,8 +121,8 @@ int MPIR_Scatterv(const void *sendbuf, const int *sendcounts, const int *displs,
mpi_errno = starray[i].MPI_ERROR;
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
}
@@ -137,8 +137,8 @@ int MPIR_Scatterv(const void *sendbuf, const int *sendcounts, const int *displs,
MPIR_SCATTERV_TAG,comm,MPI_STATUS_IGNORE, errflag);
if (mpi_errno) {
/* for communication errors, just record the error but continue */
- *errflag = TRUE;
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
+ *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
+ MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
}
}
@@ -151,8 +151,8 @@ fn_exit:
MPIU_CHKLMEM_FREEALL();
if (mpi_errno_ret)
mpi_errno = mpi_errno_ret;
- else if (*errflag)
- MPIU_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**coll_fail");
+ else if (*errflag != MPIR_ERR_NONE)
+ MPIU_ERR_SET(mpi_errno, *errflag, "**coll_fail");
return mpi_errno;
fn_fail:
goto fn_exit;
http://git.mpich.org/mpich.git/commitdiff/3850e6bf639fbd67a121fe7446c561573…
commit 3850e6bf639fbd67a121fe7446c5615739799bd9
Author: Wesley Bland <wbland(a)anl.gov>
Date: Mon Nov 10 12:39:06 2014 -0600
Change errflag to be an enum
The errflag value being used in the MPIC helper functions only
propagated whether or not an error occurred. It did not contain any
information about what kind of error occurred, which made returning the
correct error code after a process failure impossible.
This patch converts the binary value to an enum with three options:
MPIR_ERR_NONE
MPIR_ERR_PROC_FAILED
MPIR_ERR_OTHER
The original use of TRUE and false maps to MPIR_ERR_NONE and
MPIR_ERR_OTHER.
MPIR_ERR_PROC_FAILED indicates that the error occurred
because of a process failure. It uses the new bit set aside from the tag
space to track such information between processes.
This change required modifying lots of function signatures and type
declarations to use the new enum type, but these are actually not very
intrusive changes and shouldn't be a problem going forward.
Signed-off-by: Huiwei Lu <huiweilu(a)mcs.anl.gov>
diff --git a/src/include/mpiimpl.h b/src/include/mpiimpl.h
index 5dd363f..09f5b52 100644
--- a/src/include/mpiimpl.h
+++ b/src/include/mpiimpl.h
@@ -720,6 +720,14 @@ extern MPID_Errhandler MPID_Errhandler_direct[];
} while (0)
/* ------------------------------------------------------------------------- */
+/* Define a typedef for the errflag value used by many internal functions.
+ * If an error needs to be returned, these values can be used to signal such.
+ * More details can be found further down in the code with the bitmasking logic */
+typedef enum {MPIR_ERR_NONE = MPI_SUCCESS,
+ MPIR_ERR_PROC_FAILED = MPIX_ERR_PROC_FAILED,
+ MPIR_ERR_OTHER = MPI_ERR_OTHER}
+mpir_errflag_t;
+
/* ------------------------------------------------------------------------- */
/* Keyvals and attributes */
/*TKyOverview.tex
@@ -1967,37 +1975,37 @@ extern MPIU_Object_alloc_t MPID_Op_mem;
typedef struct MPID_Collops {
int ref_count; /* Supports lazy copies */
/* Contains pointers to the functions for the MPI collectives */
- int (*Barrier) (MPID_Comm *, int *);
- int (*Bcast) (void*, int, MPI_Datatype, int, MPID_Comm *, int *);
+ int (*Barrier) (MPID_Comm *, mpir_errflag_t *);
+ int (*Bcast) (void*, int, MPI_Datatype, int, MPID_Comm *, mpir_errflag_t *);
int (*Gather) (const void*, int, MPI_Datatype, void*, int, MPI_Datatype,
- int, MPID_Comm *, int *);
+ int, MPID_Comm *, mpir_errflag_t *);
int (*Gatherv) (const void*, int, MPI_Datatype, void*, const int *, const int *,
- MPI_Datatype, int, MPID_Comm *, int *);
+ MPI_Datatype, int, MPID_Comm *, mpir_errflag_t *);
int (*Scatter) (const void*, int, MPI_Datatype, void*, int, MPI_Datatype,
- int, MPID_Comm *, int *);
+ int, MPID_Comm *, mpir_errflag_t *);
int (*Scatterv) (const void*, const int *, const int *, MPI_Datatype,
- void*, int, MPI_Datatype, int, MPID_Comm *, int *);
+ void*, int, MPI_Datatype, int, MPID_Comm *, mpir_errflag_t *);
int (*Allgather) (const void*, int, MPI_Datatype, void*, int,
- MPI_Datatype, MPID_Comm *, int *);
+ MPI_Datatype, MPID_Comm *, mpir_errflag_t *);
int (*Allgatherv) (const void*, int, MPI_Datatype, void*, const int *,
- const int *, MPI_Datatype, MPID_Comm *, int *);
+ const int *, MPI_Datatype, MPID_Comm *, mpir_errflag_t *);
int (*Alltoall) (const void*, int, MPI_Datatype, void*, int, MPI_Datatype,
- MPID_Comm *, int *);
+ MPID_Comm *, mpir_errflag_t *);
int (*Alltoallv) (const void*, const int *, const int *, MPI_Datatype,
void*, const int *, const int *, MPI_Datatype, MPID_Comm *,
- int *);
+ mpir_errflag_t *);
int (*Alltoallw) (const void*, const int *, const int *, const MPI_Datatype *, void*,
- const int *, const int *, const MPI_Datatype *, MPID_Comm *, int *);
+ const int *, const int *, const MPI_Datatype *, MPID_Comm *, mpir_errflag_t *);
int (*Reduce) (const void*, void*, int, MPI_Datatype, MPI_Op, int,
- MPID_Comm *, int *);
+ MPID_Comm *, mpir_errflag_t *);
int (*Allreduce) (const void*, void*, int, MPI_Datatype, MPI_Op,
- MPID_Comm *, int *);
+ MPID_Comm *, mpir_errflag_t *);
int (*Reduce_scatter) (const void*, void*, const int *, MPI_Datatype, MPI_Op,
- MPID_Comm *, int *);
- int (*Scan) (const void*, void*, int, MPI_Datatype, MPI_Op, MPID_Comm *, int * );
- int (*Exscan) (const void*, void*, int, MPI_Datatype, MPI_Op, MPID_Comm *, int * );
+ MPID_Comm *, mpir_errflag_t *);
+ int (*Scan) (const void*, void*, int, MPI_Datatype, MPI_Op, MPID_Comm *, mpir_errflag_t * );
+ int (*Exscan) (const void*, void*, int, MPI_Datatype, MPI_Op, MPID_Comm *, mpir_errflag_t * );
int (*Reduce_scatter_block) (const void*, void*, int, MPI_Datatype, MPI_Op,
- MPID_Comm *, int *);
+ MPID_Comm *, mpir_errflag_t *);
/* MPI-3 nonblocking collectives */
int (*Ibarrier_sched)(MPID_Comm *comm_ptr, MPID_Sched_t s);
@@ -2856,7 +2864,7 @@ int MPID_Comm_revoke(MPID_Comm *comm, int is_remote);
Return Value:
'MPI_SUCCESS' or a valid MPI error code.
@*/
-int MPID_Comm_agree(MPID_Comm *comm, uint32_t *bitarray, int *flag, int new_fail);
+int MPID_Comm_agree(MPID_Comm *comm, uint32_t *bitarray, int *flag, mpir_errflag_t new_fail);
/*@
MPID_Send - MPID entry point for MPI_Send
@@ -3933,24 +3941,24 @@ int MPIC_Probe(int source, int tag, MPI_Comm comm, MPI_Status *status);
/* FT versions of te MPIC_ functions */
int MPIC_Send(const void *buf, int count, MPI_Datatype datatype, int dest, int tag,
- MPI_Comm comm, int *errflag);
+ MPI_Comm comm, mpir_errflag_t *errflag);
int MPIC_Recv(void *buf, int count, MPI_Datatype datatype, int source, int tag,
- MPI_Comm comm, MPI_Status *status, int *errflag);
+ MPI_Comm comm, MPI_Status *status, mpir_errflag_t *errflag);
int MPIC_Ssend(const void *buf, int count, MPI_Datatype datatype, int dest, int tag,
- MPI_Comm comm, int *errflag);
+ MPI_Comm comm, mpir_errflag_t *errflag);
int MPIC_Sendrecv(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
int dest, int sendtag, void *recvbuf, int recvcount,
MPI_Datatype recvtype, int source, int recvtag,
- MPI_Comm comm, MPI_Status *status, int *errflag);
+ MPI_Comm comm, MPI_Status *status, mpir_errflag_t *errflag);
int MPIC_Sendrecv_replace(void *buf, int count, MPI_Datatype datatype,
int dest, int sendtag,
int source, int recvtag,
- MPI_Comm comm, MPI_Status *status, int *errflag);
+ MPI_Comm comm, MPI_Status *status, mpir_errflag_t *errflag);
int MPIC_Isend(const void *buf, int count, MPI_Datatype datatype, int dest, int tag,
- MPI_Comm comm, MPI_Request *request, int *errflag);
+ MPI_Comm comm, MPI_Request *request, mpir_errflag_t *errflag);
int MPIC_Irecv(void *buf, int count, MPI_Datatype datatype, int source,
int tag, MPI_Comm comm, MPI_Request *request);
-int MPIC_Waitall(int numreq, MPI_Request requests[], MPI_Status statuses[], int *errflag);
+int MPIC_Waitall(int numreq, MPI_Request requests[], MPI_Status statuses[], mpir_errflag_t *errflag);
void MPIR_MAXF ( void *, void *, int *, MPI_Datatype * ) ;
@@ -4005,166 +4013,166 @@ int MPIR_Compare_equal(const void *a, const void *b, MPI_Datatype type);
int MPIR_Allgather_impl(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
void *recvbuf, int recvcount, MPI_Datatype recvtype,
- MPID_Comm *comm_ptr, int *errflag );
+ MPID_Comm *comm_ptr, mpir_errflag_t *errflag );
int MPIR_Allgather(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
void *recvbuf, int recvcount, MPI_Datatype recvtype,
- MPID_Comm *comm_ptr, int *errflag );
+ MPID_Comm *comm_ptr, mpir_errflag_t *errflag );
int MPIR_Allgather_intra(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
void *recvbuf, int recvcount, MPI_Datatype recvtype,
- MPID_Comm *comm_ptr, int *errflag );
+ MPID_Comm *comm_ptr, mpir_errflag_t *errflag );
int MPIR_Allgather_inter(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
void *recvbuf, int recvcount, MPI_Datatype recvtype,
- MPID_Comm *comm_ptr, int *errflag );
+ MPID_Comm *comm_ptr, mpir_errflag_t *errflag );
int MPIR_Allgatherv_impl(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
void *recvbuf, const int *recvcounts, const int *displs,
- MPI_Datatype recvtype, MPID_Comm *comm_ptr, int *errflag );
+ MPI_Datatype recvtype, MPID_Comm *comm_ptr, mpir_errflag_t *errflag );
int MPIR_Allgatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
void *recvbuf, const int *recvcounts, const int *displs,
- MPI_Datatype recvtype, MPID_Comm *comm_ptr, int *errflag );
+ MPI_Datatype recvtype, MPID_Comm *comm_ptr, mpir_errflag_t *errflag );
int MPIR_Allgatherv_intra(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
void *recvbuf, const int *recvcounts, const int *displs,
- MPI_Datatype recvtype, MPID_Comm *comm_pt, int *errflag );
+ MPI_Datatype recvtype, MPID_Comm *comm_pt, mpir_errflag_t *errflag );
int MPIR_Allgatherv_inter(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
void *recvbuf, const int *recvcounts, const int *displs,
- MPI_Datatype recvtype, MPID_Comm *comm_ptr, int *errflag );
+ MPI_Datatype recvtype, MPID_Comm *comm_ptr, mpir_errflag_t *errflag );
int MPIR_Allreduce_impl(const void *sendbuf, void *recvbuf, int count,
- MPI_Datatype datatype, MPI_Op op, MPID_Comm *comm_ptr, int *errflag);
+ MPI_Datatype datatype, MPI_Op op, MPID_Comm *comm_ptr, mpir_errflag_t *errflag);
int MPIR_Allreduce(const void *sendbuf, void *recvbuf, int count,
- MPI_Datatype datatype, MPI_Op op, MPID_Comm *comm_ptr, int *errflag);
+ MPI_Datatype datatype, MPI_Op op, MPID_Comm *comm_ptr, mpir_errflag_t *errflag);
int MPIR_Allreduce_intra(const void *sendbuf, void *recvbuf, int count,
- MPI_Datatype datatype, MPI_Op op, MPID_Comm *comm_ptr, int *errflag);
+ MPI_Datatype datatype, MPI_Op op, MPID_Comm *comm_ptr, mpir_errflag_t *errflag);
int MPIR_Allreduce_inter(const void *sendbuf, void *recvbuf, int count,
- MPI_Datatype datatype, MPI_Op op, MPID_Comm *comm_ptr, int *errflag);
+ MPI_Datatype datatype, MPI_Op op, MPID_Comm *comm_ptr, mpir_errflag_t *errflag);
int MPIR_Alltoall_impl(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
void *recvbuf, int recvcount, MPI_Datatype recvtype,
- MPID_Comm *comm_ptr, int *errflag);
+ MPID_Comm *comm_ptr, mpir_errflag_t *errflag);
int MPIR_Alltoall(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
void *recvbuf, int recvcount, MPI_Datatype recvtype,
- MPID_Comm *comm_ptr, int *errflag);
+ MPID_Comm *comm_ptr, mpir_errflag_t *errflag);
int MPIR_Alltoall_intra(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
void *recvbuf, int recvcount, MPI_Datatype recvtype,
- MPID_Comm *comm_ptr, int *errflag);
+ MPID_Comm *comm_ptr, mpir_errflag_t *errflag);
int MPIR_Alltoall_inter(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
void *recvbuf, int recvcount, MPI_Datatype recvtype,
- MPID_Comm *comm_ptr, int *errflag);
+ MPID_Comm *comm_ptr, mpir_errflag_t *errflag);
int MPIR_Alltoallv_impl(const void *sendbuf, const int *sendcnts, const int *sdispls,
MPI_Datatype sendtype, void *recvbuf, const int *recvcnts,
const int *rdispls, MPI_Datatype recvtype, MPID_Comm *comm_ptr,
- int *errflag);
+ mpir_errflag_t *errflag);
int MPIR_Alltoallv(const void *sendbuf, const int *sendcnts, const int *sdispls,
MPI_Datatype sendtype, void *recvbuf, const int *recvcnts,
- const int *rdispls, MPI_Datatype recvtype, MPID_Comm *comm_ptr, int *errflag);
+ const int *rdispls, MPI_Datatype recvtype, MPID_Comm *comm_ptr, mpir_errflag_t *errflag);
int MPIR_Alltoallv_intra(const void *sendbuf, const int *sendcnts, const int *sdispls,
MPI_Datatype sendtype, void *recvbuf, const int *recvcnts,
const int *rdispls, MPI_Datatype recvtype, MPID_Comm *comm_ptr,
- int *errflag);
+ mpir_errflag_t *errflag);
int MPIR_Alltoallv_inter(const void *sendbuf, const int *sendcnts, const int *sdispls,
MPI_Datatype sendtype, void *recvbuf, const int *recvcnts,
const int *rdispls, MPI_Datatype recvtype,
- MPID_Comm *comm_ptr, int *errflag);
+ MPID_Comm *comm_ptr, mpir_errflag_t *errflag);
int MPIR_Alltoallw_impl(const void *sendbuf, const int *sendcnts, const int *sdispls,
const MPI_Datatype *sendtypes, void *recvbuf, const int *recvcnts,
const int *rdispls, const MPI_Datatype *recvtypes, MPID_Comm *comm_ptr,
- int *errflag);
+ mpir_errflag_t *errflag);
int MPIR_Alltoallw(const void *sendbuf, const int *sendcnts, const int *sdispls,
const MPI_Datatype *sendtypes, void *recvbuf, const int *recvcnts,
const int *rdispls, const MPI_Datatype *recvtypes, MPID_Comm *comm_ptr,
- int *errflag);
+ mpir_errflag_t *errflag);
int MPIR_Alltoallw_intra(const void *sendbuf, const int *sendcnts, const int *sdispls,
const MPI_Datatype *sendtypes, void *recvbuf, const int *recvcnts,
const int *rdispls, const MPI_Datatype *recvtypes, MPID_Comm *comm_ptr,
- int *errflag);
+ mpir_errflag_t *errflag);
int MPIR_Alltoallw_inter(const void *sendbuf, const int *sendcnts, const int *sdispls,
const MPI_Datatype *sendtypes, void *recvbuf,
const int *recvcnts, const int *rdispls, const MPI_Datatype *recvtypes,
- MPID_Comm *comm_ptr, int *errflag);
+ MPID_Comm *comm_ptr, mpir_errflag_t *errflag);
int MPIR_Bcast_inter(void *buffer, int count, MPI_Datatype datatype,
- int root, MPID_Comm *comm_ptr, int *errflag);
+ int root, MPID_Comm *comm_ptr, mpir_errflag_t *errflag);
int MPIR_Bcast_intra (void *buffer, int count, MPI_Datatype datatype, int
- root, MPID_Comm *comm_ptr, int *errflag);
+ root, MPID_Comm *comm_ptr, mpir_errflag_t *errflag);
int MPIR_Bcast (void *buffer, int count, MPI_Datatype datatype, int
- root, MPID_Comm *comm_ptr, int *errflag);
+ root, MPID_Comm *comm_ptr, mpir_errflag_t *errflag);
int MPIR_Bcast_impl (void *buffer, int count, MPI_Datatype datatype, int
- root, MPID_Comm *comm_ptr, int *errflag);
+ root, MPID_Comm *comm_ptr, mpir_errflag_t *errflag);
int MPIR_Exscan(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype,
- MPI_Op op, MPID_Comm *comm_ptr, int *errflag );
+ MPI_Op op, MPID_Comm *comm_ptr, mpir_errflag_t *errflag );
int MPIR_Exscan_impl(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype,
- MPI_Op op, MPID_Comm *comm_ptr, int *errflag );
+ MPI_Op op, MPID_Comm *comm_ptr, mpir_errflag_t *errflag );
int MPIR_Gather_impl (const void *sendbuf, int sendcnt, MPI_Datatype sendtype,
void *recvbuf, int recvcnt, MPI_Datatype recvtype,
- int root, MPID_Comm *comm_ptr, int *errflag);
+ int root, MPID_Comm *comm_ptr, mpir_errflag_t *errflag);
int MPIR_Gather (const void *sendbuf, int sendcnt, MPI_Datatype sendtype,
void *recvbuf, int recvcnt, MPI_Datatype recvtype,
- int root, MPID_Comm *comm_ptr, int *errflag);
+ int root, MPID_Comm *comm_ptr, mpir_errflag_t *errflag);
int MPIR_Gather_intra (const void *sendbuf, int sendcnt, MPI_Datatype sendtype,
void *recvbuf, int recvcnt, MPI_Datatype recvtype,
- int root, MPID_Comm *comm_ptr, int *errflag);
+ int root, MPID_Comm *comm_ptr, mpir_errflag_t *errflag);
int MPIR_Gather_inter (const void *sendbuf, int sendcnt, MPI_Datatype sendtype,
void *recvbuf, int recvcnt, MPI_Datatype recvtype,
- int root, MPID_Comm *comm_ptr, int *errflag );
+ int root, MPID_Comm *comm_ptr, mpir_errflag_t *errflag );
int MPIR_Gatherv (const void *sendbuf, int sendcnt, MPI_Datatype sendtype,
void *recvbuf, const int *recvcnts, const int *displs,
- MPI_Datatype recvtype, int root, MPID_Comm *comm_ptr, int *errflag);
+ MPI_Datatype recvtype, int root, MPID_Comm *comm_ptr, mpir_errflag_t *errflag);
int MPIR_Gatherv_impl (const void *sendbuf, int sendcnt, MPI_Datatype sendtype,
void *recvbuf, const int *recvcnts, const int *displs,
- MPI_Datatype recvtype, int root, MPID_Comm *comm_ptr, int *errflag);
+ MPI_Datatype recvtype, int root, MPID_Comm *comm_ptr, mpir_errflag_t *errflag);
int MPIR_Reduce_scatter_impl(const void *sendbuf, void *recvbuf, const int *recvcnts,
- MPI_Datatype datatype, MPI_Op op, MPID_Comm *comm_ptr, int *errflag);
+ MPI_Datatype datatype, MPI_Op op, MPID_Comm *comm_ptr, mpir_errflag_t *errflag);
int MPIR_Reduce_scatter(const void *sendbuf, void *recvbuf, const int *recvcnts,
- MPI_Datatype datatype, MPI_Op op, MPID_Comm *comm_ptr, int *errflag);
+ MPI_Datatype datatype, MPI_Op op, MPID_Comm *comm_ptr, mpir_errflag_t *errflag);
int MPIR_Reduce_scatter_intra(const void *sendbuf, void *recvbuf, const int *recvcnts,
- MPI_Datatype datatype, MPI_Op op, MPID_Comm *comm_ptr, int *errflag);
+ MPI_Datatype datatype, MPI_Op op, MPID_Comm *comm_ptr, mpir_errflag_t *errflag);
int MPIR_Reduce_scatter_inter(const void *sendbuf, void *recvbuf, const int *recvcnts,
MPI_Datatype datatype, MPI_Op op,
- MPID_Comm *comm_ptr, int *errflag);
+ MPID_Comm *comm_ptr, mpir_errflag_t *errflag);
int MPIR_Reduce_scatter_block_impl(const void *sendbuf, void *recvbuf, int recvcount,
MPI_Datatype datatype, MPI_Op op, MPID_Comm
- *comm_ptr, int *errflag );
+ *comm_ptr, mpir_errflag_t *errflag );
int MPIR_Reduce_scatter_block(const void *sendbuf, void *recvbuf, int recvcount,
MPI_Datatype datatype, MPI_Op op, MPID_Comm
- *comm_ptr, int *errflag );
+ *comm_ptr, mpir_errflag_t *errflag );
int MPIR_Reduce_scatter_block_intra(const void *sendbuf, void *recvbuf, int recvcount,
MPI_Datatype datatype, MPI_Op op, MPID_Comm
- *comm_ptr, int *errflag );
+ *comm_ptr, mpir_errflag_t *errflag );
int MPIR_Reduce_scatter_block_inter(const void *sendbuf, void *recvbuf, int recvcount,
MPI_Datatype datatype, MPI_Op op, MPID_Comm
- *comm_ptr, int *errflag);
+ *comm_ptr, mpir_errflag_t *errflag);
int MPIR_Reduce_impl(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype,
- MPI_Op op, int root, MPID_Comm *comm_ptr, int *errflag );
+ MPI_Op op, int root, MPID_Comm *comm_ptr, mpir_errflag_t *errflag );
int MPIR_Reduce(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype,
- MPI_Op op, int root, MPID_Comm *comm_ptr, int *errflag );
+ MPI_Op op, int root, MPID_Comm *comm_ptr, mpir_errflag_t *errflag );
int MPIR_Reduce_intra(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype,
- MPI_Op op, int root, MPID_Comm *comm_ptr, int *errflag );
+ MPI_Op op, int root, MPID_Comm *comm_ptr, mpir_errflag_t *errflag );
int MPIR_Reduce_inter (const void *sendbuf, void *recvbuf, int count, MPI_Datatype
- datatype, MPI_Op op, int root, MPID_Comm *comm_ptr, int *errflag);
+ datatype, MPI_Op op, int root, MPID_Comm *comm_ptr, mpir_errflag_t *errflag);
int MPIR_Scan_impl(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype,
- MPI_Op op, MPID_Comm *comm_ptr, int *errflag);
+ MPI_Op op, MPID_Comm *comm_ptr, mpir_errflag_t *errflag);
int MPIR_Scan(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype,
- MPI_Op op, MPID_Comm *comm_ptr, int *errflag);
+ MPI_Op op, MPID_Comm *comm_ptr, mpir_errflag_t *errflag);
int MPIR_Scatter_impl(const void *sendbuf, int sendcnt, MPI_Datatype sendtype,
void *recvbuf, int recvcnt, MPI_Datatype recvtype,
- int root, MPID_Comm *comm_ptr, int *errflag );
+ int root, MPID_Comm *comm_ptr, mpir_errflag_t *errflag );
int MPIR_Scatter(const void *sendbuf, int sendcnt, MPI_Datatype sendtype,
void *recvbuf, int recvcnt, MPI_Datatype recvtype,
- int root, MPID_Comm *comm_ptr, int *errflag );
+ int root, MPID_Comm *comm_ptr, mpir_errflag_t *errflag );
int MPIR_Scatter_intra(const void *sendbuf, int sendcnt, MPI_Datatype sendtype,
void *recvbuf, int recvcnt, MPI_Datatype recvtype,
- int root, MPID_Comm *comm_ptr, int *errflag );
+ int root, MPID_Comm *comm_ptr, mpir_errflag_t *errflag );
int MPIR_Scatter_inter(const void *sendbuf, int sendcnt, MPI_Datatype sendtype,
void *recvbuf, int recvcnt, MPI_Datatype recvtype,
- int root, MPID_Comm *comm_ptr, int *errflag );
+ int root, MPID_Comm *comm_ptr, mpir_errflag_t *errflag );
int MPIR_Scatterv_impl (const void *sendbuf, const int *sendcnts, const int *displs,
MPI_Datatype sendtype, void *recvbuf, int recvcnt,
MPI_Datatype recvtype, int root, MPID_Comm
- *comm_ptr, int *errflag);
+ *comm_ptr, mpir_errflag_t *errflag);
int MPIR_Scatterv (const void *sendbuf, const int *sendcnts, const int *displs,
MPI_Datatype sendtype, void *recvbuf, int recvcnt,
MPI_Datatype recvtype, int root, MPID_Comm
- *comm_ptr, int *errflag);
-int MPIR_Barrier_impl( MPID_Comm *comm_ptr, int *errflag);
-int MPIR_Barrier( MPID_Comm *comm_ptr, int *errflag);
-int MPIR_Barrier_intra( MPID_Comm *comm_ptr, int *errflag);
-int MPIR_Barrier_inter( MPID_Comm *comm_ptr, int *errflag);
+ *comm_ptr, mpir_errflag_t *errflag);
+int MPIR_Barrier_impl( MPID_Comm *comm_ptr, mpir_errflag_t *errflag);
+int MPIR_Barrier( MPID_Comm *comm_ptr, mpir_errflag_t *errflag);
+int MPIR_Barrier_intra( MPID_Comm *comm_ptr, mpir_errflag_t *errflag);
+int MPIR_Barrier_inter( MPID_Comm *comm_ptr, mpir_errflag_t *errflag);
int MPIR_Reduce_local_impl(const void *inbuf, void *inoutbuf, int count, MPI_Datatype datatype, MPI_Op op);
@@ -4205,13 +4213,13 @@ int MPIR_Comm_agree(MPID_Comm *comm_ptr, int *flag);
int MPIR_Allreduce_group(void *sendbuf, void *recvbuf, int count,
MPI_Datatype datatype, MPI_Op op, MPID_Comm *comm_ptr,
- MPID_Group *group_ptr, int tag, int *errflag);
+ MPID_Group *group_ptr, int tag, mpir_errflag_t *errflag);
int MPIR_Allreduce_group_intra(void *sendbuf, void *recvbuf, int count,
MPI_Datatype datatype, MPI_Op op, MPID_Comm *comm_ptr,
- MPID_Group *group_ptr, int tag, int *errflag);
+ MPID_Group *group_ptr, int tag, mpir_errflag_t *errflag);
-int MPIR_Barrier_group(MPID_Comm *comm_ptr, MPID_Group *group_ptr, int tag, int *errflag);
+int MPIR_Barrier_group(MPID_Comm *comm_ptr, MPID_Group *group_ptr, int tag, mpir_errflag_t *errflag);
/* topology impl functions */
diff --git a/src/mpi/coll/allgather.c b/src/mpi/coll/allgather.c
index 31df564..e9900a0 100644
--- a/src/mpi/coll/allgather.c
+++ b/src/mpi/coll/allgather.c
@@ -117,7 +117,7 @@ int MPIR_Allgather_intra (
int recvcount,
MPI_Datatype recvtype,
MPID_Comm *comm_ptr,
- int *errflag )
+ mpir_errflag_t *errflag )
{
int comm_size, rank;
int mpi_errno = MPI_SUCCESS;
@@ -657,7 +657,7 @@ int MPIR_Allgather_inter (
int recvcount,
MPI_Datatype recvtype,
MPID_Comm *comm_ptr,
- int *errflag)
+ mpir_errflag_t *errflag)
{
/* Intercommunicator Allgather.
Each group does a gather to local root with the local
@@ -789,7 +789,7 @@ int MPIR_Allgather_inter (
#define FCNAME MPIU_QUOTE(FUNCNAME)
int MPIR_Allgather(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
void *recvbuf, int recvcount, MPI_Datatype recvtype,
- MPID_Comm *comm_ptr, int *errflag)
+ MPID_Comm *comm_ptr, mpir_errflag_t *errflag)
{
int mpi_errno = MPI_SUCCESS;
@@ -823,7 +823,7 @@ fn_fail:
#define FCNAME MPIU_QUOTE(FUNCNAME)
int MPIR_Allgather_impl(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
void *recvbuf, int recvcount, MPI_Datatype recvtype,
- MPID_Comm *comm_ptr, int *errflag)
+ MPID_Comm *comm_ptr, mpir_errflag_t *errflag)
{
int mpi_errno = MPI_SUCCESS;
@@ -904,7 +904,7 @@ int MPI_Allgather(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
{
int mpi_errno = MPI_SUCCESS;
MPID_Comm *comm_ptr = NULL;
- int errflag = FALSE;
+ mpir_errflag_t errflag = MPIR_ERR_NONE;
MPID_MPI_STATE_DECL(MPID_STATE_MPI_ALLGATHER);
MPIR_ERRTEST_INITIALIZED_ORDIE();
diff --git a/src/mpi/coll/allgatherv.c b/src/mpi/coll/allgatherv.c
index 674ba31..2af46b0 100644
--- a/src/mpi/coll/allgatherv.c
+++ b/src/mpi/coll/allgatherv.c
@@ -98,7 +98,7 @@ int MPIR_Allgatherv_intra (
const int *displs,
MPI_Datatype recvtype,
MPID_Comm *comm_ptr,
- int *errflag )
+ mpir_errflag_t *errflag )
{
MPI_Comm comm;
int comm_size, rank, j, i, left, right;
@@ -771,7 +771,7 @@ int MPIR_Allgatherv_inter (
const int *displs,
MPI_Datatype recvtype,
MPID_Comm *comm_ptr,
- int *errflag )
+ mpir_errflag_t *errflag )
{
/* Intercommunicator Allgatherv.
This is done differently from the intercommunicator allgather
@@ -894,7 +894,7 @@ int MPIR_Allgatherv_inter (
#define FCNAME MPIU_QUOTE(FUNCNAME)
int MPIR_Allgatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
void *recvbuf, const int *recvcounts, const int *displs, MPI_Datatype recvtype,
- MPID_Comm *comm_ptr, int *errflag)
+ MPID_Comm *comm_ptr, mpir_errflag_t *errflag)
{
int mpi_errno = MPI_SUCCESS;
@@ -930,7 +930,7 @@ int MPIR_Allgatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
#define FCNAME MPIU_QUOTE(FUNCNAME)
int MPIR_Allgatherv_impl(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
void *recvbuf, const int *recvcounts, const int *displs,
- MPI_Datatype recvtype, MPID_Comm *comm_ptr, int *errflag)
+ MPI_Datatype recvtype, MPID_Comm *comm_ptr, mpir_errflag_t *errflag)
{
int mpi_errno = MPI_SUCCESS;
@@ -1015,7 +1015,7 @@ int MPI_Allgatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
{
int mpi_errno = MPI_SUCCESS;
MPID_Comm *comm_ptr = NULL;
- int errflag = FALSE;
+ mpir_errflag_t errflag = MPIR_ERR_NONE;
MPID_MPI_STATE_DECL(MPID_STATE_MPI_ALLGATHERV);
MPIR_ERRTEST_INITIALIZED_ORDIE();
diff --git a/src/mpi/coll/allred_group.c b/src/mpi/coll/allred_group.c
index 5db6b6a..9f50e2e 100644
--- a/src/mpi/coll/allred_group.c
+++ b/src/mpi/coll/allred_group.c
@@ -9,7 +9,7 @@
int MPIR_Allreduce_group_intra(void *sendbuf, void *recvbuf, int count,
MPI_Datatype datatype, MPI_Op op, MPID_Comm *comm_ptr,
- MPID_Group *group_ptr, int tag, int *errflag);
+ MPID_Group *group_ptr, int tag, mpir_errflag_t *errflag);
/* Local utility macro: takes an two args and sets lvalue cr_ equal to the rank
* in comm_ptr corresponding to rvalue gr_ */
@@ -27,7 +27,7 @@ int MPIR_Allreduce_group_intra(void *sendbuf, void *recvbuf, int count,
#define FCNAME MPIU_QUOTE(FUNCNAME)
int MPIR_Allreduce_group_intra(void *sendbuf, void *recvbuf, int count,
MPI_Datatype datatype, MPI_Op op, MPID_Comm *comm_ptr,
- MPID_Group *group_ptr, int tag, int *errflag)
+ MPID_Group *group_ptr, int tag, mpir_errflag_t *errflag)
{
MPI_Aint type_size;
int mpi_errno = MPI_SUCCESS;
@@ -367,7 +367,7 @@ int MPIR_Allreduce_group_intra(void *sendbuf, void *recvbuf, int count,
#define FCNAME MPIU_QUOTE(FUNCNAME)
int MPIR_Allreduce_group(void *sendbuf, void *recvbuf, int count,
MPI_Datatype datatype, MPI_Op op, MPID_Comm *comm_ptr,
- MPID_Group *group_ptr, int tag, int *errflag)
+ MPID_Group *group_ptr, int tag, mpir_errflag_t *errflag)
{
int mpi_errno = MPI_SUCCESS;
diff --git a/src/mpi/coll/allreduce.c b/src/mpi/coll/allreduce.c
index 2d6dee5..cfcc99d 100644
--- a/src/mpi/coll/allreduce.c
+++ b/src/mpi/coll/allreduce.c
@@ -149,7 +149,7 @@ MPIR_Op_check_dtype_fn *MPIR_Op_check_dtype_table[] = {
#undef FCNAME
#define FCNAME MPIU_QUOTE(FUNCNAME)
static inline int allreduce_intra_or_coll_fn(void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op,
- MPID_Comm *comm_ptr, int *errflag)
+ MPID_Comm *comm_ptr, mpir_errflag_t *errflag)
{
int mpi_errno = MPI_SUCCESS;
@@ -183,7 +183,7 @@ int MPIR_Allreduce_intra (
MPI_Datatype datatype,
MPI_Op op,
MPID_Comm *comm_ptr,
- int *errflag )
+ mpir_errflag_t *errflag )
{
#ifdef MPID_HAS_HETERO
int is_homogeneous;
@@ -626,7 +626,7 @@ int MPIR_Allreduce_inter (
MPI_Datatype datatype,
MPI_Op op,
MPID_Comm *comm_ptr,
- int *errflag )
+ mpir_errflag_t *errflag )
{
/* Intercommunicator Allreduce.
We first do intracommunicator reduces to rank 0 on left and right
@@ -719,7 +719,7 @@ int MPIR_Allreduce_inter (
#undef FCNAME
#define FCNAME MPIU_QUOTE(FUNCNAME)
int MPIR_Allreduce(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype,
- MPI_Op op, MPID_Comm *comm_ptr, int *errflag)
+ MPI_Op op, MPID_Comm *comm_ptr, mpir_errflag_t *errflag)
{
int mpi_errno = MPI_SUCCESS;
@@ -750,7 +750,7 @@ fn_fail:
#undef FCNAME
#define FCNAME MPIU_QUOTE(FUNCNAME)
int MPIR_Allreduce_impl(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPID_Comm *comm_ptr,
- int *errflag)
+ mpir_errflag_t *errflag)
{
int mpi_errno = MPI_SUCCESS;
@@ -821,7 +821,7 @@ int MPI_Allreduce(const void *sendbuf, void *recvbuf, int count,
static const char FCNAME[] = "MPI_Allreduce";
int mpi_errno = MPI_SUCCESS;
MPID_Comm *comm_ptr = NULL;
- int errflag = FALSE;
+ mpir_errflag_t errflag = MPIR_ERR_NONE;
MPID_MPI_STATE_DECL(MPID_STATE_MPI_ALLREDUCE);
MPIR_ERRTEST_INITIALIZED_ORDIE();
diff --git a/src/mpi/coll/alltoall.c b/src/mpi/coll/alltoall.c
index 0cae194..1ca98c6 100644
--- a/src/mpi/coll/alltoall.c
+++ b/src/mpi/coll/alltoall.c
@@ -135,7 +135,7 @@ int MPIR_Alltoall_intra(
int recvcount,
MPI_Datatype recvtype,
MPID_Comm *comm_ptr,
- int *errflag )
+ mpir_errflag_t *errflag )
{
int comm_size, i, j, pof2;
MPI_Aint sendtype_extent, recvtype_extent;
@@ -629,7 +629,7 @@ int MPIR_Alltoall_inter(
int recvcount,
MPI_Datatype recvtype,
MPID_Comm *comm_ptr,
- int *errflag )
+ mpir_errflag_t *errflag )
{
/* Intercommunicator alltoall. We use a pairwise exchange algorithm
similar to the one used in intracommunicator alltoall for long
@@ -717,7 +717,7 @@ int MPIR_Alltoall_inter(
#define FCNAME MPIU_QUOTE(FUNCNAME)
int MPIR_Alltoall(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
void *recvbuf, int recvcount, MPI_Datatype recvtype,
- MPID_Comm *comm_ptr, int *errflag)
+ MPID_Comm *comm_ptr, mpir_errflag_t *errflag)
{
int mpi_errno = MPI_SUCCESS;
@@ -747,7 +747,7 @@ int MPIR_Alltoall(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
#define FCNAME MPIU_QUOTE(FUNCNAME)
int MPIR_Alltoall_impl(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
void *recvbuf, int recvcount, MPI_Datatype recvtype,
- MPID_Comm *comm_ptr, int *errflag)
+ MPID_Comm *comm_ptr, mpir_errflag_t *errflag)
{
int mpi_errno = MPI_SUCCESS;
if (comm_ptr->coll_fns != NULL && comm_ptr->coll_fns->Alltoall != NULL) {
@@ -807,7 +807,7 @@ int MPI_Alltoall(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
{
int mpi_errno = MPI_SUCCESS;
MPID_Comm *comm_ptr = NULL;
- int errflag = FALSE;
+ mpir_errflag_t errflag = MPIR_ERR_NONE;
MPID_MPI_STATE_DECL(MPID_STATE_MPI_ALLTOALL);
MPIR_ERRTEST_INITIALIZED_ORDIE();
diff --git a/src/mpi/coll/alltoallv.c b/src/mpi/coll/alltoallv.c
index 713b944..607cb3a 100644
--- a/src/mpi/coll/alltoallv.c
+++ b/src/mpi/coll/alltoallv.c
@@ -63,7 +63,7 @@ int MPI_Alltoallv(const void *sendbuf, const int *sendcounts, const int *sdispls
int MPIR_Alltoallv_intra(const void *sendbuf, const int *sendcounts, const int *sdispls,
MPI_Datatype sendtype, void *recvbuf, const int *recvcounts,
const int *rdispls, MPI_Datatype recvtype, MPID_Comm *comm_ptr,
- int *errflag)
+ mpir_errflag_t *errflag)
{
int comm_size, i, j;
MPI_Aint send_extent, recv_extent;
@@ -240,7 +240,7 @@ fn_fail:
int MPIR_Alltoallv_inter(const void *sendbuf, const int *sendcounts, const int *sdispls,
MPI_Datatype sendtype, void *recvbuf, const int *recvcounts,
const int *rdispls, MPI_Datatype recvtype, MPID_Comm *comm_ptr,
- int *errflag)
+ mpir_errflag_t *errflag)
{
/* Intercommunicator alltoallv. We use a pairwise exchange algorithm
similar to the one used in intracommunicator alltoallv. Since the
@@ -334,7 +334,7 @@ int MPIR_Alltoallv_inter(const void *sendbuf, const int *sendcounts, const int *
#define FCNAME MPIU_QUOTE(FUNCNAME)
int MPIR_Alltoallv(const void *sendbuf, const int *sendcounts, const int *sdispls,
MPI_Datatype sendtype, void *recvbuf, const int *recvcounts, const int *rdispls,
- MPI_Datatype recvtype, MPID_Comm *comm_ptr, int *errflag)
+ MPI_Datatype recvtype, MPID_Comm *comm_ptr, mpir_errflag_t *errflag)
{
int mpi_errno = MPI_SUCCESS;
@@ -365,7 +365,7 @@ int MPIR_Alltoallv(const void *sendbuf, const int *sendcounts, const int *sdispl
int MPIR_Alltoallv_impl(const void *sendbuf, const int *sendcounts, const int *sdispls,
MPI_Datatype sendtype, void *recvbuf, const int *recvcounts,
const int *rdispls, MPI_Datatype recvtype,
- MPID_Comm *comm_ptr, int *errflag)
+ MPID_Comm *comm_ptr, mpir_errflag_t *errflag)
{
int mpi_errno = MPI_SUCCESS;
@@ -440,7 +440,7 @@ int MPI_Alltoallv(const void *sendbuf, const int *sendcounts,
{
int mpi_errno = MPI_SUCCESS;
MPID_Comm *comm_ptr = NULL;
- int errflag = FALSE;
+ mpir_errflag_t errflag = MPIR_ERR_NONE;
MPID_MPI_STATE_DECL(MPID_STATE_MPI_ALLTOALLV);
MPIR_ERRTEST_INITIALIZED_ORDIE();
diff --git a/src/mpi/coll/alltoallw.c b/src/mpi/coll/alltoallw.c
index 31e7a1e..fa99a58 100644
--- a/src/mpi/coll/alltoallw.c
+++ b/src/mpi/coll/alltoallw.c
@@ -57,7 +57,7 @@ int MPI_Alltoallw(const void *sendbuf, const int sendcounts[], const int sdispls
int MPIR_Alltoallw_intra(const void *sendbuf, const int sendcounts[], const int sdispls[],
const MPI_Datatype sendtypes[], void *recvbuf, const int recvcounts[],
const int rdispls[], const MPI_Datatype recvtypes[], MPID_Comm *comm_ptr,
- int *errflag)
+ mpir_errflag_t *errflag)
{
int comm_size, i, j;
int mpi_errno = MPI_SUCCESS;
@@ -240,7 +240,7 @@ int MPIR_Alltoallw_intra(const void *sendbuf, const int sendcounts[], const int
int MPIR_Alltoallw_inter(const void *sendbuf, const int sendcounts[], const int sdispls[],
const MPI_Datatype sendtypes[], void *recvbuf, const int recvcounts[],
const int rdispls[], const MPI_Datatype recvtypes[], MPID_Comm *comm_ptr,
- int *errflag)
+ mpir_errflag_t *errflag)
{
/* Intercommunicator alltoallw. We use a pairwise exchange algorithm
similar to the one used in intracommunicator alltoallw. Since the
@@ -329,7 +329,7 @@ int MPIR_Alltoallw_inter(const void *sendbuf, const int sendcounts[], const int
int MPIR_Alltoallw(const void *sendbuf, const int sendcounts[], const int sdispls[],
const MPI_Datatype sendtypes[], void *recvbuf, const int recvcounts[],
const int rdispls[], const MPI_Datatype recvtypes[],
- MPID_Comm *comm_ptr, int *errflag)
+ MPID_Comm *comm_ptr, mpir_errflag_t *errflag)
{
int mpi_errno = MPI_SUCCESS;
@@ -360,7 +360,7 @@ int MPIR_Alltoallw(const void *sendbuf, const int sendcounts[], const int sdispl
int MPIR_Alltoallw_impl(const void *sendbuf, const int sendcounts[], const int sdispls[],
const MPI_Datatype sendtypes[], void *recvbuf, const int recvcounts[],
const int rdispls[], const MPI_Datatype recvtypes[],
- MPID_Comm *comm_ptr, int *errflag)
+ MPID_Comm *comm_ptr, mpir_errflag_t *errflag)
{
int mpi_errno = MPI_SUCCESS;
@@ -435,7 +435,7 @@ int MPI_Alltoallw(const void *sendbuf, const int sendcounts[],
{
int mpi_errno = MPI_SUCCESS;
MPID_Comm *comm_ptr = NULL;
- int errflag = FALSE;
+ mpir_errflag_t errflag = MPIR_ERR_NONE;
MPID_MPI_STATE_DECL(MPID_STATE_MPI_ALLTOALLW);
MPIR_ERRTEST_INITIALIZED_ORDIE();
diff --git a/src/mpi/coll/barrier.c b/src/mpi/coll/barrier.c
index 96813d8..8d4957a 100644
--- a/src/mpi/coll/barrier.c
+++ b/src/mpi/coll/barrier.c
@@ -67,7 +67,7 @@ int MPI_Barrier(MPI_Comm comm) __attribute__((weak,alias("PMPI_Barrier")));
#define FUNCNAME barrier_smp_intra
#undef FCNAME
#define FCNAME MPIU_QUOTE(FUNCNAME)
-static int barrier_smp_intra(MPID_Comm *comm_ptr, int *errflag)
+static int barrier_smp_intra(MPID_Comm *comm_ptr, mpir_errflag_t *errflag)
{
int mpi_errno=MPI_SUCCESS;
int mpi_errno_ret = MPI_SUCCESS;
@@ -128,7 +128,7 @@ static int barrier_smp_intra(MPID_Comm *comm_ptr, int *errflag)
#define FUNCNAME MPIR_Barrier_intra
#undef FCNAME
#define FCNAME MPIU_QUOTE(FUNCNAME)
-int MPIR_Barrier_intra( MPID_Comm *comm_ptr, int *errflag )
+int MPIR_Barrier_intra( MPID_Comm *comm_ptr, mpir_errflag_t *errflag )
{
int size, rank, src, dst, mask, mpi_errno=MPI_SUCCESS;
int mpi_errno_ret = MPI_SUCCESS;
@@ -191,7 +191,7 @@ int MPIR_Barrier_intra( MPID_Comm *comm_ptr, int *errflag )
#define FUNCNAME MPIR_Barrier_inter
#undef FCNAME
#define FCNAME MPIU_QUOTE(FUNCNAME)
-int MPIR_Barrier_inter( MPID_Comm *comm_ptr, int *errflag )
+int MPIR_Barrier_inter( MPID_Comm *comm_ptr, mpir_errflag_t *errflag )
{
int rank, mpi_errno = MPI_SUCCESS, root;
int mpi_errno_ret = MPI_SUCCESS;
@@ -284,7 +284,7 @@ t-to-point messages.
#define FUNCNAME MPIR_Barrier
#undef FCNAME
#define FCNAME MPIU_QUOTE(FUNCNAME)
-int MPIR_Barrier(MPID_Comm *comm_ptr, int *errflag)
+int MPIR_Barrier(MPID_Comm *comm_ptr, mpir_errflag_t *errflag)
{
int mpi_errno = MPI_SUCCESS;
@@ -313,7 +313,7 @@ int MPIR_Barrier(MPID_Comm *comm_ptr, int *errflag)
#define FUNCNAME MPIR_Barrier_impl
#undef FCNAME
#define FCNAME MPIU_QUOTE(FUNCNAME)
-int MPIR_Barrier_impl(MPID_Comm *comm_ptr, int *errflag)
+int MPIR_Barrier_impl(MPID_Comm *comm_ptr, mpir_errflag_t *errflag)
{
int mpi_errno = MPI_SUCCESS;
int mpi_errno_ret = MPI_SUCCESS;
@@ -375,7 +375,7 @@ int MPI_Barrier( MPI_Comm comm )
{
int mpi_errno = MPI_SUCCESS;
MPID_Comm *comm_ptr = NULL;
- int errflag = FALSE;
+ mpir_errflag_t errflag = MPIR_ERR_NONE;
MPID_MPI_STATE_DECL(MPID_STATE_MPI_BARRIER);
MPIR_ERRTEST_INITIALIZED_ORDIE();
diff --git a/src/mpi/coll/barrier_group.c b/src/mpi/coll/barrier_group.c
index e13fd07..f110328 100644
--- a/src/mpi/coll/barrier_group.c
+++ b/src/mpi/coll/barrier_group.c
@@ -13,7 +13,7 @@
This is an intracommunicator barrier only!
*/
-int MPIR_Barrier_group( MPID_Comm *comm_ptr, MPID_Group *group_ptr, int tag, int *errflag )
+int MPIR_Barrier_group( MPID_Comm *comm_ptr, MPID_Group *group_ptr, int tag, mpir_errflag_t *errflag )
{
int src = 0;
int dst, mpi_errno = MPI_SUCCESS;
diff --git a/src/mpi/coll/bcast.c b/src/mpi/coll/bcast.c
index 7e42727..bbf6acc 100644
--- a/src/mpi/coll/bcast.c
+++ b/src/mpi/coll/bcast.c
@@ -127,7 +127,7 @@ static int MPIR_Bcast_binomial(
MPI_Datatype datatype,
int root,
MPID_Comm *comm_ptr,
- int *errflag)
+ mpir_errflag_t *errflag)
{
int rank, comm_size, src, dst;
int relative_rank, mask;
@@ -340,7 +340,7 @@ static int scatter_for_bcast(
void *tmp_buf,
int is_contig,
int is_homogeneous,
- int *errflag)
+ mpir_errflag_t *errflag)
{
MPI_Status status;
int rank, comm_size, src, dst;
@@ -484,7 +484,7 @@ static int MPIR_Bcast_scatter_doubling_allgather(
MPI_Datatype datatype,
int root,
MPID_Comm *comm_ptr,
- int *errflag)
+ mpir_errflag_t *errflag)
{
MPI_Status status;
int rank, comm_size, dst;
@@ -794,7 +794,7 @@ static int MPIR_Bcast_scatter_ring_allgather(
MPI_Datatype datatype,
int root,
MPID_Comm *comm_ptr,
- int *errflag)
+ mpir_errflag_t *errflag)
{
int rank, comm_size;
int mpi_errno = MPI_SUCCESS;
@@ -1002,7 +1002,7 @@ static int MPIR_SMP_Bcast(
MPI_Datatype datatype,
int root,
MPID_Comm *comm_ptr,
- int *errflag)
+ mpir_errflag_t *errflag)
{
int mpi_errno = MPI_SUCCESS;
int mpi_errno_ret = MPI_SUCCESS;
@@ -1229,7 +1229,7 @@ int MPIR_Bcast_intra (
MPI_Datatype datatype,
int root,
MPID_Comm *comm_ptr,
- int *errflag )
+ mpir_errflag_t *errflag )
{
int mpi_errno = MPI_SUCCESS;
int mpi_errno_ret = MPI_SUCCESS;
@@ -1353,7 +1353,7 @@ int MPIR_Bcast_inter (
MPI_Datatype datatype,
int root,
MPID_Comm *comm_ptr,
- int *errflag)
+ mpir_errflag_t *errflag)
{
/* Intercommunicator broadcast.
Root sends to rank 0 in remote group. Remote group does local
@@ -1444,7 +1444,7 @@ fn_fail:
#define FUNCNAME MPIR_Bcast_impl
#undef FCNAME
#define FCNAME MPIU_QUOTE(FUNCNAME)
-int MPIR_Bcast_impl(void *buffer, int count, MPI_Datatype datatype, int root, MPID_Comm *comm_ptr, int *errflag)
+int MPIR_Bcast_impl(void *buffer, int count, MPI_Datatype datatype, int root, MPID_Comm *comm_ptr, mpir_errflag_t *errflag)
{
int mpi_errno = MPI_SUCCESS;
@@ -1476,7 +1476,7 @@ int MPIR_Bcast_impl(void *buffer, int count, MPI_Datatype datatype, int root, MP
#define FUNCNAME MPIR_Bcast
#undef FCNAME
#define FCNAME MPIU_QUOTE(FUNCNAME)
-inline int MPIR_Bcast(void *buffer, int count, MPI_Datatype datatype, int root, MPID_Comm *comm_ptr, int *errflag)
+inline int MPIR_Bcast(void *buffer, int count, MPI_Datatype datatype, int root, MPID_Comm *comm_ptr, mpir_errflag_t *errflag)
{
int mpi_errno = MPI_SUCCESS;
@@ -1535,7 +1535,7 @@ int MPI_Bcast( void *buffer, int count, MPI_Datatype datatype, int root,
{
int mpi_errno = MPI_SUCCESS;
MPID_Comm *comm_ptr = NULL;
- int errflag = FALSE;
+ mpir_errflag_t errflag = MPIR_ERR_NONE;
MPID_MPI_STATE_DECL(MPID_STATE_MPI_BCAST);
MPIR_ERRTEST_INITIALIZED_ORDIE();
diff --git a/src/mpi/coll/exscan.c b/src/mpi/coll/exscan.c
index a83a543..86b8f14 100644
--- a/src/mpi/coll/exscan.c
+++ b/src/mpi/coll/exscan.c
@@ -91,7 +91,7 @@ int MPIR_Exscan (
MPI_Datatype datatype,
MPI_Op op,
MPID_Comm *comm_ptr,
- int *errflag )
+ mpir_errflag_t *errflag )
{
MPI_Status status;
int rank, comm_size;
@@ -240,7 +240,7 @@ fn_fail:
#define FUNCNAME MPIR_Exscan_impl
#undef FCNAME
#define FCNAME MPIU_QUOTE(FUNCNAME)
-int MPIR_Exscan_impl(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPID_Comm *comm_ptr, int *errflag)
+int MPIR_Exscan_impl(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPID_Comm *comm_ptr, mpir_errflag_t *errflag)
{
int mpi_errno = MPI_SUCCESS;
@@ -307,7 +307,7 @@ int MPI_Exscan(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datat
{
int mpi_errno = MPI_SUCCESS;
MPID_Comm *comm_ptr = NULL;
- int errflag = FALSE;
+ mpir_errflag_t errflag = MPIR_ERR_NONE;
MPID_MPI_STATE_DECL(MPID_STATE_MPI_EXSCAN);
MPIR_ERRTEST_INITIALIZED_ORDIE();
diff --git a/src/mpi/coll/gather.c b/src/mpi/coll/gather.c
index cb87ef2..81bb78f 100644
--- a/src/mpi/coll/gather.c
+++ b/src/mpi/coll/gather.c
@@ -87,7 +87,7 @@ int MPI_Gather(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *
#define FCNAME MPIU_QUOTE(FUNCNAME)
int MPIR_Gather_intra(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf,
int recvcount, MPI_Datatype recvtype, int root, MPID_Comm *comm_ptr,
- int *errflag)
+ mpir_errflag_t *errflag)
{
int comm_size, rank;
int mpi_errno = MPI_SUCCESS;
@@ -492,7 +492,7 @@ int MPIR_Gather_intra(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
#define FCNAME MPIU_QUOTE(FUNCNAME)
int MPIR_Gather_inter(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf,
int recvcount, MPI_Datatype recvtype, int root, MPID_Comm *comm_ptr,
- int *errflag)
+ mpir_errflag_t *errflag)
{
/* Intercommunicator gather.
For short messages, remote group does a local intracommunicator
@@ -664,7 +664,7 @@ int MPIR_Gather_inter(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
#define FCNAME MPIU_QUOTE(FUNCNAME)
int MPIR_Gather(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
void *recvbuf, int recvcount, MPI_Datatype recvtype,
- int root, MPID_Comm *comm_ptr, int *errflag)
+ int root, MPID_Comm *comm_ptr, mpir_errflag_t *errflag)
{
int mpi_errno = MPI_SUCCESS;
@@ -698,7 +698,7 @@ int MPIR_Gather(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
#define FCNAME MPIU_QUOTE(FUNCNAME)
int MPIR_Gather_impl(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
void *recvbuf, int recvcount, MPI_Datatype recvtype,
- int root, MPID_Comm *comm_ptr, int *errflag)
+ int root, MPID_Comm *comm_ptr, mpir_errflag_t *errflag)
{
int mpi_errno = MPI_SUCCESS;
@@ -764,7 +764,7 @@ int MPI_Gather(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
{
int mpi_errno = MPI_SUCCESS;
MPID_Comm *comm_ptr = NULL;
- int errflag = FALSE;
+ mpir_errflag_t errflag = MPIR_ERR_NONE;
MPID_MPI_STATE_DECL(MPID_STATE_MPI_GATHER);
MPIR_ERRTEST_INITIALIZED_ORDIE();
diff --git a/src/mpi/coll/gatherv.c b/src/mpi/coll/gatherv.c
index 48a265c..cc7a54a 100644
--- a/src/mpi/coll/gatherv.c
+++ b/src/mpi/coll/gatherv.c
@@ -83,7 +83,7 @@ int MPIR_Gatherv (
MPI_Datatype recvtype,
int root,
MPID_Comm *comm_ptr,
- int *errflag )
+ mpir_errflag_t *errflag )
{
int comm_size, rank;
int mpi_errno = MPI_SUCCESS;
@@ -219,7 +219,7 @@ fn_fail:
#define FCNAME MPIU_QUOTE(FUNCNAME)
int MPIR_Gatherv_impl(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
void *recvbuf, const int *recvcounts, const int *displs, MPI_Datatype recvtype,
- int root, MPID_Comm *comm_ptr, int *errflag)
+ int root, MPID_Comm *comm_ptr, mpir_errflag_t *errflag)
{
int mpi_errno = MPI_SUCCESS;
@@ -289,7 +289,7 @@ int MPI_Gatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
{
int mpi_errno = MPI_SUCCESS;
MPID_Comm *comm_ptr = NULL;
- int errflag = FALSE;
+ mpir_errflag_t errflag = MPIR_ERR_NONE;
MPID_MPI_STATE_DECL(MPID_STATE_MPI_GATHERV);
MPIR_ERRTEST_INITIALIZED_ORDIE();
diff --git a/src/mpi/coll/helper_fns.c b/src/mpi/coll/helper_fns.c
index 7c5a2aa..243d2a0 100644
--- a/src/mpi/coll/helper_fns.c
+++ b/src/mpi/coll/helper_fns.c
@@ -252,7 +252,7 @@ int MPIC_Wait(MPID_Request * request_ptr)
#undef FCNAME
#define FCNAME MPIU_QUOTE(FUNCNAME)
int MPIC_Send(const void *buf, int count, MPI_Datatype datatype, int dest, int tag,
- MPI_Comm comm, int *errflag)
+ MPI_Comm comm, mpir_errflag_t *errflag)
{
int mpi_errno = MPI_SUCCESS;
int context_id;
@@ -262,13 +262,19 @@ int MPIC_Send(const void *buf, int count, MPI_Datatype datatype, int dest, int t
MPIDI_FUNC_ENTER(MPID_STATE_MPIC_SEND);
- MPIU_DBG_MSG_S(PT2PT, TYPICAL, "IN: errflag = %s", *errflag?"TRUE":"FALSE");
+ MPIU_DBG_MSG_D(PT2PT, TYPICAL, "IN: errflag = %d", *errflag);
MPIU_ERR_CHKANDJUMP1((count < 0), mpi_errno, MPI_ERR_COUNT,
"**countneg", "**countneg %d", count);
- if (*errflag)
- MPIR_TAG_SET_ERROR_BIT(tag);
+ switch(*errflag) {
+ case MPIR_ERR_NONE:
+ break;
+ case MPIR_ERR_PROC_FAILED:
+ MPIR_TAG_SET_PROC_FAILURE_BIT(tag);
+ case MPIR_ERR_OTHER:
+ MPIR_TAG_SET_ERROR_BIT(tag);
+ }
MPID_Comm_get_ptr(comm, comm_ptr);
context_id = (comm_ptr->comm_kind == MPID_INTRACOMM) ?
@@ -298,7 +304,7 @@ int MPIC_Send(const void *buf, int count, MPI_Datatype datatype, int dest, int t
#undef FCNAME
#define FCNAME MPIU_QUOTE(FUNCNAME)
int MPIC_Recv(void *buf, int count, MPI_Datatype datatype, int source, int tag,
- MPI_Comm comm, MPI_Status *status, int *errflag)
+ MPI_Comm comm, MPI_Status *status, mpir_errflag_t *errflag)
{
int mpi_errno = MPI_SUCCESS;
int context_id;
@@ -309,7 +315,7 @@ int MPIC_Recv(void *buf, int count, MPI_Datatype datatype, int source, int tag,
MPIDI_FUNC_ENTER(MPID_STATE_MPIC_RECV);
- MPIU_DBG_MSG_S(PT2PT, TYPICAL, "IN: errflag = %s", *errflag?"TRUE":"FALSE");
+ MPIU_DBG_MSG_D(PT2PT, TYPICAL, "IN: errflag = %d", *errflag);
MPIU_ERR_CHKANDJUMP1((count < 0), mpi_errno, MPI_ERR_COUNT,
"**countneg", "**countneg %d", count);
@@ -338,15 +344,20 @@ int MPIC_Recv(void *buf, int count, MPI_Datatype datatype, int source, int tag,
if (MPIX_ERR_REVOKED == MPIR_ERR_GET_CLASS(status->MPI_ERROR) ||
MPIX_ERR_PROC_FAILED == MPIR_ERR_GET_CLASS(status->MPI_ERROR) ||
MPIR_TAG_CHECK_ERROR_BIT(status->MPI_TAG)) {
- *errflag = TRUE;
- MPIR_TAG_CLEAR_ERROR_BITS(status->MPI_TAG);
+ if (MPIR_TAG_CHECK_PROC_FAILURE_BIT(status->MPI_TAG)) {
+ *errflag = MPIR_ERR_PROC_FAILED;
+ MPIR_TAG_CLEAR_ERROR_BITS(status->MPI_TAG);
+ } else if (MPIR_TAG_CHECK_ERROR_BIT(status->MPI_TAG)) {
+ *errflag = MPIR_ERR_OTHER;
+ MPIR_TAG_CLEAR_ERROR_BITS(status->MPI_TAG);
+ }
} else if (MPI_SUCCESS == MPIR_ERR_GET_CLASS(status->MPI_ERROR)) {
MPIU_Assert(status->MPI_TAG == tag);
}
}
fn_exit:
- MPIU_DBG_MSG_S(PT2PT, TYPICAL, "OUT: errflag = %s", *errflag?"TRUE":"FALSE");
+ MPIU_DBG_MSG_D(PT2PT, TYPICAL, "OUT: errflag = %d", *errflag);
MPIDI_FUNC_EXIT(MPID_STATE_MPIC_RECV);
return mpi_errno;
fn_fail:
@@ -361,7 +372,7 @@ int MPIC_Recv(void *buf, int count, MPI_Datatype datatype, int source, int tag,
#undef FCNAME
#define FCNAME MPIU_QUOTE(FUNCNAME)
int MPIC_Ssend(const void *buf, int count, MPI_Datatype datatype, int dest, int tag,
- MPI_Comm comm, int *errflag)
+ MPI_Comm comm, mpir_errflag_t *errflag)
{
int mpi_errno = MPI_SUCCESS;
int context_id;
@@ -371,7 +382,7 @@ int MPIC_Ssend(const void *buf, int count, MPI_Datatype datatype, int dest, int
MPIDI_FUNC_ENTER(MPID_STATE_MPIC_SSEND);
- MPIU_DBG_MSG_S(PT2PT, TYPICAL, "IN: errflag = %s", *errflag?"TRUE":"FALSE");
+ MPIU_DBG_MSG_D(PT2PT, TYPICAL, "IN: errflag = %d", *errflag);
MPIU_ERR_CHKANDJUMP1((count < 0), mpi_errno, MPI_ERR_COUNT,
"**countneg", "**countneg %d", count);
@@ -409,7 +420,7 @@ int MPIC_Ssend(const void *buf, int count, MPI_Datatype datatype, int dest, int
int MPIC_Sendrecv(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
int dest, int sendtag, void *recvbuf, int recvcount,
MPI_Datatype recvtype, int source, int recvtag,
- MPI_Comm comm, MPI_Status *status, int *errflag)
+ MPI_Comm comm, MPI_Status *status, mpir_errflag_t *errflag)
{
int mpi_errno = MPI_SUCCESS;
int context_id;
@@ -432,7 +443,14 @@ int MPIC_Sendrecv(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
MPID_CONTEXT_INTRA_COLL : MPID_CONTEXT_INTER_COLL;
if (status == MPI_STATUS_IGNORE) status = &mystatus;
- if (*errflag) MPIR_TAG_SET_ERROR_BIT(sendtag);
+ switch(*errflag) {
+ case MPIR_ERR_NONE:
+ break;
+ case MPIR_ERR_PROC_FAILED:
+ MPIR_TAG_SET_PROC_FAILURE_BIT(sendtag);
+ case MPIR_ERR_OTHER:
+ MPIR_TAG_SET_ERROR_BIT(sendtag);
+ }
mpi_errno = MPID_Irecv(recvbuf, recvcount, recvtype, source, recvtag,
comm_ptr, context_id, &recv_req_ptr);
@@ -456,15 +474,21 @@ int MPIC_Sendrecv(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
if (MPIX_ERR_REVOKED == MPIR_ERR_GET_CLASS(status->MPI_ERROR) ||
MPIX_ERR_PROC_FAILED == MPIR_ERR_GET_CLASS(status->MPI_ERROR) ||
MPIR_TAG_CHECK_ERROR_BIT(status->MPI_TAG)) {
- *errflag = TRUE;
- MPIR_TAG_CLEAR_ERROR_BITS(status->MPI_TAG);
+ if (MPIR_TAG_CHECK_PROC_FAILURE_BIT(status->MPI_TAG)) {
+ *errflag = MPIR_ERR_PROC_FAILED;
+ MPIR_TAG_CLEAR_ERROR_BITS(status->MPI_TAG);
+ } else if (MPIR_TAG_CHECK_ERROR_BIT(status->MPI_TAG)) {
+ *errflag = MPIR_ERR_OTHER;
+ MPIR_TAG_CLEAR_ERROR_BITS(status->MPI_TAG);
+ }
} else if (MPI_SUCCESS == MPIR_ERR_GET_CLASS(status->MPI_ERROR)) {
MPIU_Assert(status->MPI_TAG == recvtag);
}
}
+
fn_exit:
- MPIU_DBG_MSG_S(PT2PT, TYPICAL, "OUT: errflag = %s", *errflag?"TRUE":"FALSE");
+ MPIU_DBG_MSG_D(PT2PT, TYPICAL, "OUT: errflag = %d", *errflag);
MPIDI_FUNC_EXIT(MPID_STATE_MPIC_SENDRECV);
return mpi_errno;
@@ -482,7 +506,7 @@ int MPIC_Sendrecv(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
int MPIC_Sendrecv_replace(void *buf, int count, MPI_Datatype datatype,
int dest, int sendtag,
int source, int recvtag,
- MPI_Comm comm, MPI_Status *status, int *errflag)
+ MPI_Comm comm, MPI_Status *status, mpir_errflag_t *errflag)
{
int mpi_errno = MPI_SUCCESS;
MPI_Status mystatus;
@@ -502,13 +526,20 @@ int MPIC_Sendrecv_replace(void *buf, int count, MPI_Datatype datatype,
MPIDI_FUNC_ENTER(MPID_STATE_MPIC_SENDRECV_REPLACE);
- MPIU_DBG_MSG_S(PT2PT, TYPICAL, "IN: errflag = %s", *errflag?"TRUE":"FALSE");
+ MPIU_DBG_MSG_D(PT2PT, TYPICAL, "IN: errflag = %d", *errflag);
MPIU_ERR_CHKANDJUMP1((count < 0), mpi_errno, MPI_ERR_COUNT,
"**countneg", "**countneg %d", count);
if (status == MPI_STATUS_IGNORE) status = &mystatus;
- if (*errflag) MPIR_TAG_SET_ERROR_BIT(sendtag);
+ switch(*errflag) {
+ case MPIR_ERR_NONE:
+ break;
+ case MPIR_ERR_PROC_FAILED:
+ MPIR_TAG_SET_PROC_FAILURE_BIT(sendtag);
+ case MPIR_ERR_OTHER:
+ MPIR_TAG_SET_ERROR_BIT(sendtag);
+ }
MPID_Comm_get_ptr(comm, comm_ptr);
context_id_offset = (comm_ptr->comm_kind == MPID_INTRACOMM) ?
@@ -572,16 +603,22 @@ int MPIC_Sendrecv_replace(void *buf, int count, MPI_Datatype datatype,
if (MPIX_ERR_REVOKED == MPIR_ERR_GET_CLASS(status->MPI_ERROR) ||
MPIX_ERR_PROC_FAILED == MPIR_ERR_GET_CLASS(status->MPI_ERROR) ||
MPIR_TAG_CHECK_ERROR_BIT(status->MPI_TAG)) {
- *errflag = TRUE;
- MPIR_TAG_CLEAR_ERROR_BITS(status->MPI_TAG);
+ if (MPIR_TAG_CHECK_PROC_FAILURE_BIT(status->MPI_TAG)) {
+ *errflag = MPIR_ERR_PROC_FAILED;
+ MPIR_TAG_CLEAR_ERROR_BITS(status->MPI_TAG);
+ } else if (MPIR_TAG_CHECK_ERROR_BIT(status->MPI_TAG)) {
+ *errflag = MPIR_ERR_OTHER;
+ MPIR_TAG_CLEAR_ERROR_BITS(status->MPI_TAG);
+ }
} else if (MPI_SUCCESS == MPIR_ERR_GET_CLASS(status->MPI_ERROR)) {
MPIU_Assert(status->MPI_TAG == recvtag);
}
}
+
fn_exit:
MPIU_CHKLMEM_FREEALL();
- MPIU_DBG_MSG_S(PT2PT, TYPICAL, "OUT: errflag = %s", *errflag?"TRUE":"FALSE");
+ MPIU_DBG_MSG_D(PT2PT, TYPICAL, "OUT: errflag = %d", *errflag);
MPIDI_FUNC_EXIT(MPID_STATE_MPIC_SENDRECV_REPLACE);
return mpi_errno;
fn_fail:
@@ -593,7 +630,7 @@ int MPIC_Sendrecv_replace(void *buf, int count, MPI_Datatype datatype,
#undef FCNAME
#define FCNAME MPIU_QUOTE(FUNCNAME)
int MPIC_Isend(const void *buf, int count, MPI_Datatype datatype, int dest, int tag,
- MPI_Comm comm, MPI_Request *request, int *errflag)
+ MPI_Comm comm, MPI_Request *request, mpir_errflag_t *errflag)
{
int mpi_errno = MPI_SUCCESS;
int context_id;
@@ -603,13 +640,19 @@ int MPIC_Isend(const void *buf, int count, MPI_Datatype datatype, int dest, int
MPIDI_FUNC_ENTER(MPID_STATE_MPIC_ISEND);
- MPIU_DBG_MSG_S(PT2PT, TYPICAL, "IN: errflag = %s", *errflag?"TRUE":"FALSE");
+ MPIU_DBG_MSG_D(PT2PT, TYPICAL, "IN: errflag = %d", *errflag);
MPIU_ERR_CHKANDJUMP1((count < 0), mpi_errno, MPI_ERR_COUNT,
"**countneg", "**countneg %d", count);
- if (*errflag)
- MPIR_TAG_SET_ERROR_BIT(tag);
+ switch(*errflag) {
+ case MPIR_ERR_NONE:
+ break;
+ case MPIR_ERR_PROC_FAILED:
+ MPIR_TAG_SET_PROC_FAILURE_BIT(tag);
+ case MPIR_ERR_OTHER:
+ MPIR_TAG_SET_ERROR_BIT(tag);
+ }
MPID_Comm_get_ptr(comm, comm_ptr);
context_id = (comm_ptr->comm_kind == MPID_INTRACOMM) ?
@@ -668,7 +711,7 @@ int MPIC_Irecv(void *buf, int count, MPI_Datatype datatype, int source,
#define FUNCNAME MPIC_Waitall
#undef FCNAME
#define FCNAME MPIU_QUOTE(FUNCNAME)
-int MPIC_Waitall(int numreq, MPI_Request requests[], MPI_Status statuses[], int *errflag)
+int MPIC_Waitall(int numreq, MPI_Request requests[], MPI_Status statuses[], mpir_errflag_t *errflag)
{
int mpi_errno = MPI_SUCCESS;
int i;
@@ -692,15 +735,19 @@ int MPIC_Waitall(int numreq, MPI_Request requests[], MPI_Status statuses[], int
if (*errflag) goto fn_exit;
for (i = 0; i < numreq; ++i) {
- if (MPIR_TAG_CHECK_ERROR_BIT(statuses[i].MPI_TAG)) {
- *errflag = TRUE;
+ if (MPIR_TAG_CHECK_PROC_FAILURE_BIT(statuses[i].MPI_TAG)) {
+ *errflag = MPIR_ERR_PROC_FAILED;
+ MPIR_TAG_CLEAR_ERROR_BITS(statuses[i].MPI_TAG);
+ break;
+ } else if (MPIR_TAG_CHECK_ERROR_BIT(statuses[i].MPI_TAG)) {
+ *errflag = MPIR_ERR_OTHER;
MPIR_TAG_CLEAR_ERROR_BITS(statuses[i].MPI_TAG);
break;
}
}
fn_exit:
- MPIU_DBG_MSG_S(PT2PT, TYPICAL, "OUT: errflag = %s", *errflag?"TRUE":"FALSE");
+ MPIU_DBG_MSG_D(PT2PT, TYPICAL, "OUT: errflag = %d", *errflag);
MPIDI_FUNC_EXIT(MPID_STATE_MPIC_WAITALL);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/coll/red_scat.c b/src/mpi/coll/red_scat.c
index 46949f6..afc3255 100644
--- a/src/mpi/coll/red_scat.c
+++ b/src/mpi/coll/red_scat.c
@@ -57,7 +57,7 @@ int MPI_Reduce_scatter(const void *sendbuf, void *recvbuf, const int recvcounts[
#define FCNAME MPIU_QUOTE(FUNCNAME)
static int MPIR_Reduce_scatter_noncomm(const void *sendbuf, void *recvbuf, const int recvcounts[],
MPI_Datatype datatype, MPI_Op op, MPID_Comm *comm_ptr,
- int *errflag)
+ mpir_errflag_t *errflag)
{
int mpi_errno = MPI_SUCCESS;
int mpi_errno_ret = MPI_SUCCESS;
@@ -241,7 +241,7 @@ fn_fail:
/* not declared static because a machine-specific function may call this one in some cases */
int MPIR_Reduce_scatter_intra(const void *sendbuf, void *recvbuf, const int recvcounts[],
- MPI_Datatype datatype, MPI_Op op, MPID_Comm *comm_ptr, int *errflag)
+ MPI_Datatype datatype, MPI_Op op, MPID_Comm *comm_ptr, mpir_errflag_t *errflag)
{
int rank, comm_size, i;
MPI_Aint extent, true_extent, true_lb;
@@ -897,7 +897,7 @@ fn_fail:
/* not declared static because a machine-specific function may call this one in some cases */
int MPIR_Reduce_scatter_inter(const void *sendbuf, void *recvbuf, const int recvcounts[],
MPI_Datatype datatype, MPI_Op op, MPID_Comm *comm_ptr,
- int *errflag)
+ mpir_errflag_t *errflag)
{
/* Intercommunicator Reduce_scatter.
We first do an intercommunicator reduce to rank 0 on left group,
@@ -1027,7 +1027,7 @@ int MPIR_Reduce_scatter_inter(const void *sendbuf, void *recvbuf, const int recv
#undef FCNAME
#define FCNAME MPIU_QUOTE(FUNCNAME)
int MPIR_Reduce_scatter(const void *sendbuf, void *recvbuf, const int recvcounts[],
- MPI_Datatype datatype, MPI_Op op, MPID_Comm *comm_ptr, int *errflag)
+ MPI_Datatype datatype, MPI_Op op, MPID_Comm *comm_ptr, mpir_errflag_t *errflag)
{
int mpi_errno = MPI_SUCCESS;
@@ -1058,7 +1058,7 @@ int MPIR_Reduce_scatter(const void *sendbuf, void *recvbuf, const int recvcounts
#undef FCNAME
#define FCNAME MPIU_QUOTE(FUNCNAME)
int MPIR_Reduce_scatter_impl(const void *sendbuf, void *recvbuf, const int recvcounts[],
- MPI_Datatype datatype, MPI_Op op, MPID_Comm *comm_ptr, int *errflag)
+ MPI_Datatype datatype, MPI_Op op, MPID_Comm *comm_ptr, mpir_errflag_t *errflag)
{
int mpi_errno = MPI_SUCCESS;
@@ -1123,7 +1123,7 @@ int MPI_Reduce_scatter(const void *sendbuf, void *recvbuf, const int recvcounts[
{
int mpi_errno = MPI_SUCCESS;
MPID_Comm *comm_ptr = NULL;
- int errflag = FALSE;
+ mpir_errflag_t errflag = MPIR_ERR_NONE;
MPID_MPI_STATE_DECL(MPID_STATE_MPI_REDUCE_SCATTER);
MPIR_ERRTEST_INITIALIZED_ORDIE();
diff --git a/src/mpi/coll/red_scat_block.c b/src/mpi/coll/red_scat_block.c
index 45b6b30..a19709f 100644
--- a/src/mpi/coll/red_scat_block.c
+++ b/src/mpi/coll/red_scat_block.c
@@ -53,7 +53,7 @@ static int MPIR_Reduce_scatter_block_noncomm (
MPI_Datatype datatype,
MPI_Op op,
MPID_Comm *comm_ptr,
- int *errflag )
+ mpir_errflag_t *errflag )
{
int mpi_errno = MPI_SUCCESS;
int mpi_errno_ret = MPI_SUCCESS;
@@ -241,7 +241,7 @@ int MPIR_Reduce_scatter_block_intra (
MPI_Datatype datatype,
MPI_Op op,
MPID_Comm *comm_ptr,
- int *errflag )
+ mpir_errflag_t *errflag )
{
int rank, comm_size, i;
MPI_Aint extent, true_extent, true_lb;
@@ -874,7 +874,7 @@ int MPIR_Reduce_scatter_block_inter (
int recvcount,
MPI_Datatype datatype,
MPI_Op op,
- MPID_Comm *comm_ptr, int *errflag )
+ MPID_Comm *comm_ptr, mpir_errflag_t *errflag )
{
/* Intercommunicator Reduce_scatter_block.
We first do an intercommunicator reduce to rank 0 on left group,
@@ -995,7 +995,7 @@ int MPIR_Reduce_scatter_block_inter (
#define FCNAME MPIU_QUOTE(FUNCNAME)
int MPIR_Reduce_scatter_block(const void *sendbuf, void *recvbuf,
int recvcount, MPI_Datatype datatype,
- MPI_Op op, MPID_Comm *comm_ptr, int *errflag)
+ MPI_Op op, MPID_Comm *comm_ptr, mpir_errflag_t *errflag)
{
int mpi_errno = MPI_SUCCESS;
@@ -1026,7 +1026,7 @@ int MPIR_Reduce_scatter_block(const void *sendbuf, void *recvbuf,
#define FCNAME MPIU_QUOTE(FUNCNAME)
int MPIR_Reduce_scatter_block_impl(const void *sendbuf, void *recvbuf,
int recvcount, MPI_Datatype datatype,
- MPI_Op op, MPID_Comm *comm_ptr, int *errflag)
+ MPI_Op op, MPID_Comm *comm_ptr, mpir_errflag_t *errflag)
{
int mpi_errno = MPI_SUCCESS;
@@ -1095,7 +1095,7 @@ int MPI_Reduce_scatter_block(const void *sendbuf, void *recvbuf,
{
int mpi_errno = MPI_SUCCESS;
MPID_Comm *comm_ptr = NULL;
- int errflag = FALSE;
+ mpir_errflag_t errflag = MPIR_ERR_NONE;
MPID_MPI_STATE_DECL(MPID_STATE_MPI_REDUCE_SCATTER_BLOCK);
MPIR_ERRTEST_INITIALIZED_ORDIE();
diff --git a/src/mpi/coll/reduce.c b/src/mpi/coll/reduce.c
index ff482f2..2e56814 100644
--- a/src/mpi/coll/reduce.c
+++ b/src/mpi/coll/reduce.c
@@ -84,7 +84,7 @@ static int MPIR_Reduce_binomial (
MPI_Op op,
int root,
MPID_Comm *comm_ptr,
- int *errflag )
+ mpir_errflag_t *errflag )
{
int mpi_errno = MPI_SUCCESS;
int mpi_errno_ret = MPI_SUCCESS;
@@ -292,7 +292,7 @@ static int MPIR_Reduce_redscat_gather (
MPI_Op op,
int root,
MPID_Comm *comm_ptr,
- int *errflag )
+ mpir_errflag_t *errflag )
{
int mpi_errno = MPI_SUCCESS;
int mpi_errno_ret = MPI_SUCCESS;
@@ -723,7 +723,7 @@ int MPIR_Reduce_intra (
MPI_Op op,
int root,
MPID_Comm *comm_ptr,
- int *errflag )
+ mpir_errflag_t *errflag )
{
int mpi_errno = MPI_SUCCESS;
int mpi_errno_ret = MPI_SUCCESS;
@@ -914,7 +914,7 @@ int MPIR_Reduce_inter (
MPI_Op op,
int root,
MPID_Comm *comm_ptr,
- int *errflag )
+ mpir_errflag_t *errflag )
{
/* Intercommunicator reduce.
Remote group does a local intracommunicator
@@ -1026,7 +1026,7 @@ int MPIR_Reduce_inter (
#undef FCNAME
#define FCNAME MPIU_QUOTE(FUNCNAME)
int MPIR_Reduce(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype,
- MPI_Op op, int root, MPID_Comm *comm_ptr, int *errflag)
+ MPI_Op op, int root, MPID_Comm *comm_ptr, mpir_errflag_t *errflag)
{
int mpi_errno = MPI_SUCCESS;
@@ -1057,7 +1057,7 @@ int MPIR_Reduce(const void *sendbuf, void *recvbuf, int count, MPI_Datatype data
#undef FCNAME
#define FCNAME MPIU_QUOTE(FUNCNAME)
int MPIR_Reduce_impl(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype,
- MPI_Op op, int root, MPID_Comm *comm_ptr, int *errflag)
+ MPI_Op op, int root, MPID_Comm *comm_ptr, mpir_errflag_t *errflag)
{
int mpi_errno = MPI_SUCCESS;
@@ -1132,7 +1132,7 @@ int MPI_Reduce(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datat
{
int mpi_errno = MPI_SUCCESS;
MPID_Comm *comm_ptr = NULL;
- int errflag = FALSE;
+ mpir_errflag_t errflag = MPIR_ERR_NONE;
MPID_MPI_STATE_DECL(MPID_STATE_MPI_REDUCE);
MPIR_ERRTEST_INITIALIZED_ORDIE();
diff --git a/src/mpi/coll/scan.c b/src/mpi/coll/scan.c
index c9965e2..6aa9372 100644
--- a/src/mpi/coll/scan.c
+++ b/src/mpi/coll/scan.c
@@ -76,7 +76,7 @@ static int MPIR_Scan_generic (
MPI_Datatype datatype,
MPI_Op op,
MPID_Comm *comm_ptr,
- int *errflag )
+ mpir_errflag_t *errflag )
{
MPI_Status status;
int rank, comm_size;
@@ -230,7 +230,7 @@ int MPIR_Scan(
MPI_Datatype datatype,
MPI_Op op,
MPID_Comm *comm_ptr,
- int *errflag )
+ mpir_errflag_t *errflag )
{
int mpi_errno = MPI_SUCCESS;
int mpi_errno_ret = MPI_SUCCESS;
@@ -429,7 +429,7 @@ int MPIR_Scan(
#undef FCNAME
#define FCNAME MPIU_QUOTE(FUNCNAME)
int MPIR_Scan_impl(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype,
- MPI_Op op, MPID_Comm *comm_ptr, int *errflag)
+ MPI_Op op, MPID_Comm *comm_ptr, mpir_errflag_t *errflag)
{
int mpi_errno = MPI_SUCCESS;
@@ -492,7 +492,7 @@ int MPI_Scan(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatyp
{
int mpi_errno = MPI_SUCCESS;
MPID_Comm *comm_ptr = NULL;
- int errflag = FALSE;
+ mpir_errflag_t errflag = MPIR_ERR_NONE;
MPID_MPI_STATE_DECL(MPID_STATE_MPI_SCAN);
MPIR_ERRTEST_INITIALIZED_ORDIE();
diff --git a/src/mpi/coll/scatter.c b/src/mpi/coll/scatter.c
index 852861f..65edd74 100644
--- a/src/mpi/coll/scatter.c
+++ b/src/mpi/coll/scatter.c
@@ -74,7 +74,7 @@ int MPI_Scatter(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void
#define FCNAME MPIU_QUOTE(FUNCNAME)
int MPIR_Scatter_intra(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
void *recvbuf, int recvcount, MPI_Datatype recvtype, int root,
- MPID_Comm *comm_ptr, int *errflag)
+ MPID_Comm *comm_ptr, mpir_errflag_t *errflag)
{
MPI_Status status;
MPI_Aint extent=0;
@@ -424,7 +424,7 @@ int MPIR_Scatter_intra(const void *sendbuf, int sendcount, MPI_Datatype sendtype
#define FCNAME MPIU_QUOTE(FUNCNAME)
int MPIR_Scatter_inter(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf,
int recvcount, MPI_Datatype recvtype, int root, MPID_Comm *comm_ptr,
- int *errflag)
+ mpir_errflag_t *errflag)
{
/* Intercommunicator scatter.
For short messages, root sends to rank 0 in remote group. rank 0
@@ -577,7 +577,7 @@ int MPIR_Scatter_inter(const void *sendbuf, int sendcount, MPI_Datatype sendtype
#define FCNAME MPIU_QUOTE(FUNCNAME)
int MPIR_Scatter(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
void *recvbuf, int recvcount, MPI_Datatype recvtype,
- int root, MPID_Comm *comm_ptr, int *errflag)
+ int root, MPID_Comm *comm_ptr, mpir_errflag_t *errflag)
{
int mpi_errno = MPI_SUCCESS;
@@ -612,7 +612,7 @@ int MPIR_Scatter(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
#define FCNAME MPIU_QUOTE(FUNCNAME)
int MPIR_Scatter_impl(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
void *recvbuf, int recvcount, MPI_Datatype recvtype,
- int root, MPID_Comm *comm_ptr, int *errflag)
+ int root, MPID_Comm *comm_ptr, mpir_errflag_t *errflag)
{
int mpi_errno = MPI_SUCCESS;
@@ -677,7 +677,7 @@ int MPI_Scatter(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
{
int mpi_errno = MPI_SUCCESS;
MPID_Comm *comm_ptr = NULL;
- int errflag = FALSE;
+ mpir_errflag_t errflag = MPIR_ERR_NONE;
MPID_MPI_STATE_DECL(MPID_STATE_MPI_SCATTER);
MPIR_ERRTEST_INITIALIZED_ORDIE();
diff --git a/src/mpi/coll/scatterv.c b/src/mpi/coll/scatterv.c
index 485fde8..f283679 100644
--- a/src/mpi/coll/scatterv.c
+++ b/src/mpi/coll/scatterv.c
@@ -55,7 +55,7 @@ int MPI_Scatterv(const void *sendbuf, const int *sendcounts, const int *displs,
#define FCNAME MPIU_QUOTE(FUNCNAME)
int MPIR_Scatterv(const void *sendbuf, const int *sendcounts, const int *displs,
MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype,
- int root, MPID_Comm *comm_ptr, int *errflag)
+ int root, MPID_Comm *comm_ptr, mpir_errflag_t *errflag)
{
int rank, comm_size, mpi_errno = MPI_SUCCESS;
int mpi_errno_ret = MPI_SUCCESS;
@@ -168,7 +168,7 @@ fn_fail:
#define FCNAME MPIU_QUOTE(FUNCNAME)
int MPIR_Scatterv_impl(const void *sendbuf, const int *sendcounts, const int *displs,
MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype,
- int root, MPID_Comm *comm_ptr, int *errflag)
+ int root, MPID_Comm *comm_ptr, mpir_errflag_t *errflag)
{
int mpi_errno = MPI_SUCCESS;
@@ -236,7 +236,7 @@ int MPI_Scatterv(const void *sendbuf, const int *sendcounts, const int *displs,
{
int mpi_errno = MPI_SUCCESS;
MPID_Comm *comm_ptr = NULL;
- int errflag = FALSE;
+ mpir_errflag_t errflag = MPIR_ERR_NONE;
MPID_MPI_STATE_DECL(MPID_STATE_MPI_SCATTERV);
MPIR_ERRTEST_INITIALIZED_ORDIE();
diff --git a/src/mpi/comm/comm_agree.c b/src/mpi/comm/comm_agree.c
index 49a71d7..9c5f669 100644
--- a/src/mpi/comm/comm_agree.c
+++ b/src/mpi/comm/comm_agree.c
@@ -34,7 +34,7 @@ int MPIR_Comm_agree(MPID_Comm *comm_ptr, int *flag)
int mpi_errno = MPI_SUCCESS, mpi_errno_tmp = MPI_SUCCESS;
MPID_Group *comm_grp, *failed_grp, *new_group_ptr, *global_failed;
int result, success = 1;
- int errflag = 0;
+ mpir_errflag_t errflag = MPIR_ERR_NONE;
int values[2];
MPID_MPI_STATE_DECL(MPID_STATE_MPIR_COMM_AGREE);
diff --git a/src/mpi/comm/comm_create.c b/src/mpi/comm/comm_create.c
index 3825f6f..abcddde 100644
--- a/src/mpi/comm/comm_create.c
+++ b/src/mpi/comm/comm_create.c
@@ -320,7 +320,7 @@ PMPI_LOCAL int MPIR_Comm_create_inter(MPID_Comm *comm_ptr, MPID_Group *group_ptr
int rinfo[2];
MPID_VCR *mapping_vcr = NULL;
MPID_VCR *remote_mapping_vcr = NULL;
- int errflag = FALSE;
+ mpir_errflag_t errflag = MPIR_ERR_NONE;
MPIU_CHKLMEM_DECL(1);
MPID_MPI_STATE_DECL(MPID_STATE_MPIR_COMM_CREATE_INTER);
diff --git a/src/mpi/comm/comm_shrink.c b/src/mpi/comm/comm_shrink.c
index 844d617..6bdd987 100644
--- a/src/mpi/comm/comm_shrink.c
+++ b/src/mpi/comm/comm_shrink.c
@@ -50,7 +50,7 @@ int MPIR_Comm_shrink(MPID_Comm *comm_ptr, MPID_Comm **newcomm_ptr)
int mpi_errno = MPI_SUCCESS;
MPID_Group *global_failed, *comm_grp, *new_group_ptr;
int attempts = 0;
- int errflag = 0, tmp_errflag = 0;
+ mpir_errflag_t errflag = MPIR_ERR_NONE, tmp_errflag = MPIR_ERR_NONE;
MPID_MPI_STATE_DECL(MPID_STATE_MPIR_COMM_SHRINK);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPIR_COMM_SHRINK);
diff --git a/src/mpi/comm/comm_split.c b/src/mpi/comm/comm_split.c
index 6a60d28..31db2da 100644
--- a/src/mpi/comm/comm_split.c
+++ b/src/mpi/comm/comm_split.c
@@ -137,7 +137,7 @@ int MPIR_Comm_split_impl(MPID_Comm *comm_ptr, int color, int key, MPID_Comm **ne
first_entry = 0, first_remote_entry = 0, *last_ptr;
int in_newcomm; /* TRUE iff *newcomm should be populated */
MPIR_Context_id_t new_context_id, remote_context_id;
- int errflag = FALSE;
+ mpir_errflag_t errflag = MPIR_ERR_NONE;
MPIU_CHKLMEM_DECL(4);
rank = comm_ptr->rank;
diff --git a/src/mpi/comm/commutil.c b/src/mpi/comm/commutil.c
index 60db478..171b9d2 100644
--- a/src/mpi/comm/commutil.c
+++ b/src/mpi/comm/commutil.c
@@ -878,7 +878,7 @@ int MPIR_Get_contextid_sparse_group(MPID_Comm *comm_ptr, MPID_Group *group_ptr,
{
int mpi_errno = MPI_SUCCESS;
uint32_t local_mask[MPIR_MAX_CONTEXT_MASK];
- int errflag = FALSE;
+ mpir_errflag_t errflag = MPIR_ERR_NONE;
MPID_MPI_STATE_DECL(MPID_STATE_MPIR_GET_CONTEXTID);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPIR_GET_CONTEXTID);
@@ -985,7 +985,7 @@ int MPIR_Get_contextid_sparse_group(MPID_Comm *comm_ptr, MPID_Group *group_ptr,
uint32_t local_mask[MPIR_MAX_CONTEXT_MASK+1];
int own_mask = 0;
int own_eager_mask = 0;
- int errflag = FALSE;
+ mpir_errflag_t errflag = MPIR_ERR_NONE;
int first_iter = 1;
MPID_MPI_STATE_DECL(MPID_STATE_MPIR_GET_CONTEXTID);
@@ -1611,7 +1611,7 @@ int MPIR_Get_intercomm_contextid( MPID_Comm *comm_ptr, MPIR_Context_id_t *contex
context instead?. Or can we use the tag
provided in the intercomm routine? (not on a dup,
but in that case it can use the collective context) */
- int errflag = FALSE;
+ mpir_errflag_t errflag = MPIR_ERR_NONE;
MPID_MPI_STATE_DECL(MPID_STATE_MPIR_GET_INTERCOMM_CONTEXTID);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPIR_GET_INTERCOMM_CONTEXTID);
diff --git a/src/mpi/comm/intercomm_create.c b/src/mpi/comm/intercomm_create.c
index b0a9c6e..41d1a34 100644
--- a/src/mpi/comm/intercomm_create.c
+++ b/src/mpi/comm/intercomm_create.c
@@ -191,7 +191,7 @@ int MPIR_Intercomm_create_impl(MPID_Comm *local_comm_ptr, int local_leader,
int is_low_group = 0;
int cts_tag;
int i;
- int errflag = FALSE;
+ mpir_errflag_t errflag = MPIR_ERR_NONE;
MPIU_CHKLMEM_DECL(4);
MPID_MPI_STATE_DECL(MPID_STATE_MPIR_INTERCOMM_CREATE_IMPL);
diff --git a/src/mpi/comm/intercomm_merge.c b/src/mpi/comm/intercomm_merge.c
index e12d991..db320de 100644
--- a/src/mpi/comm/intercomm_merge.c
+++ b/src/mpi/comm/intercomm_merge.c
@@ -91,7 +91,7 @@ int MPIR_Intercomm_merge_impl(MPID_Comm *comm_ptr, int high, MPID_Comm **new_int
int mpi_errno = MPI_SUCCESS;
int local_high, remote_high, new_size;
MPIR_Context_id_t new_context_id;
- int errflag = FALSE;
+ mpir_errflag_t errflag = MPIR_ERR_NONE;
MPID_MPI_STATE_DECL(MPID_STATE_MPIR_INTERCOMM_MERGE_IMPL);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPIR_INTERCOMM_MERGE_IMPL);
@@ -326,7 +326,7 @@ int MPI_Intercomm_merge(MPI_Comm intercomm, int high, MPI_Comm *newintracomm)
MPID_BEGIN_ERROR_CHECKS;
{
int acthigh;
- int errflag = FALSE;
+ mpir_errflag_t errflag = MPIR_ERR_NONE;
/* Check for consistent valus of high in each local group.
The Intel test suite checks for this; it is also an easy
error to make */
diff --git a/src/mpi/topo/dist_gr_create.c b/src/mpi/topo/dist_gr_create.c
index e8ec351..5913b01 100644
--- a/src/mpi/topo/dist_gr_create.c
+++ b/src/mpi/topo/dist_gr_create.c
@@ -92,7 +92,7 @@ int MPI_Dist_graph_create(MPI_Comm comm_old, int n, const int sources[],
int *rout_idx;
int *rs;
int in_out_peers[2] = {-1, -1};
- int errflag = FALSE;
+ mpir_errflag_t errflag = MPIR_ERR_NONE;
MPIU_CHKLMEM_DECL(9);
MPIU_CHKPMEM_DECL(1);
MPID_MPI_STATE_DECL(MPID_STATE_MPI_DIST_GRAPH_CREATE);
diff --git a/src/mpid/ch3/channels/nemesis/src/ch3_rma_shm.c b/src/mpid/ch3/channels/nemesis/src/ch3_rma_shm.c
index bff1b52..fa4d906 100644
--- a/src/mpid/ch3/channels/nemesis/src/ch3_rma_shm.c
+++ b/src/mpid/ch3/channels/nemesis/src/ch3_rma_shm.c
@@ -63,7 +63,7 @@ fn_fail:
int MPIDI_CH3_SHM_Win_free(MPID_Win **win_ptr)
{
int mpi_errno = MPI_SUCCESS;
- int errflag = FALSE;
+ mpir_errflag_t errflag = MPIR_ERR_NONE;
MPIDI_STATE_DECL(MPID_STATE_MPIDI_CH3_SHM_WIN_FREE);
MPIDI_RMA_FUNC_ENTER(MPID_STATE_MPIDI_CH3_SHM_WIN_FREE);
diff --git a/src/mpid/ch3/channels/nemesis/src/ch3_win_fns.c b/src/mpid/ch3/channels/nemesis/src/ch3_win_fns.c
index c786dcb..f8f5f27 100644
--- a/src/mpid/ch3/channels/nemesis/src/ch3_win_fns.c
+++ b/src/mpid/ch3/channels/nemesis/src/ch3_win_fns.c
@@ -60,7 +60,7 @@ static int MPIDI_CH3I_SHM_Wins_match(MPID_Win ** win_ptr, MPID_Win ** matched_wi
MPID_Comm *node_comm_ptr = NULL, *shm_node_comm_ptr = NULL;
int *node_ranks = NULL, *node_ranks_in_shm_node = NULL;
MPID_Group *node_group_ptr = NULL, *shm_node_group_ptr = NULL;
- int errflag = FALSE;
+ mpir_errflag_t errflag = MPIR_ERR_NONE;
MPI_Aint *base_shm_offs;
MPIDI_SHM_Win_t *elem = shm_wins_list;
@@ -266,7 +266,7 @@ static int MPIDI_CH3I_Win_allocate_shm(MPI_Aint size, int disp_unit, MPID_Info *
MPI_Aint *node_sizes;
void **node_shm_base_addrs;
MPI_Aint *tmp_buf;
- int errflag = FALSE;
+ mpir_errflag_t errflag = MPIR_ERR_NONE;
int noncontig = FALSE;
MPIU_CHKPMEM_DECL(6);
MPIU_CHKLMEM_DECL(3);
diff --git a/src/mpid/ch3/channels/nemesis/src/ch3i_comm.c b/src/mpid/ch3/channels/nemesis/src/ch3i_comm.c
index ebddf1d..01f43c2 100644
--- a/src/mpid/ch3/channels/nemesis/src/ch3i_comm.c
+++ b/src/mpid/ch3/channels/nemesis/src/ch3i_comm.c
@@ -11,7 +11,7 @@
#define NULL_CONTEXT_ID -1
-static int barrier (MPID_Comm *comm_ptr, int *errflag);
+static int barrier (MPID_Comm *comm_ptr, mpir_errflag_t *errflag);
static int alloc_barrier_vars (MPID_Comm *comm, MPID_nem_barrier_vars_t **vars);
UT_array *coll_fns_array = NULL;
@@ -161,7 +161,7 @@ static int alloc_barrier_vars (MPID_Comm *comm, MPID_nem_barrier_vars_t **vars)
#define FUNCNAME barrier
#undef FCNAME
#define FCNAME MPIDI_QUOTE(FUNCNAME)
-static int barrier(MPID_Comm *comm_ptr, int *errflag)
+static int barrier(MPID_Comm *comm_ptr, mpir_errflag_t *errflag)
{
int mpi_errno = MPI_SUCCESS;
MPID_nem_barrier_vars_t *barrier_vars;
diff --git a/src/mpid/ch3/src/ch3u_comm_spawn_multiple.c b/src/mpid/ch3/src/ch3u_comm_spawn_multiple.c
index 458ae96..743ce74 100644
--- a/src/mpid/ch3/src/ch3u_comm_spawn_multiple.c
+++ b/src/mpid/ch3/src/ch3u_comm_spawn_multiple.c
@@ -256,7 +256,7 @@ int MPIDI_Comm_spawn_multiple(int count, char **commands,
}
if (errcodes != MPI_ERRCODES_IGNORE) {
- int errflag = FALSE;
+ mpir_errflag_t errflag = MPIR_ERR_NONE;
mpi_errno = MPIR_Bcast_impl(&should_accept, 1, MPI_INT, root, comm_ptr, &errflag);
if (mpi_errno) MPIU_ERR_POP(mpi_errno);
diff --git a/src/mpid/ch3/src/ch3u_port.c b/src/mpid/ch3/src/ch3u_port.c
index 6bad491..cb6a1dc 100644
--- a/src/mpid/ch3/src/ch3u_port.c
+++ b/src/mpid/ch3/src/ch3u_port.c
@@ -349,7 +349,7 @@ int MPIDI_Comm_connect(const char *port_name, MPID_Info *info, int root,
pg_node *pg_list = NULL;
MPIDI_PG_t **remote_pg = NULL;
MPIR_Context_id_t recvcontext_id = MPIR_INVALID_CONTEXT_ID;
- int errflag = FALSE;
+ mpir_errflag_t errflag = MPIR_ERR_NONE;
MPIU_CHKLMEM_DECL(3);
MPIDI_STATE_DECL(MPID_STATE_MPIDI_COMM_CONNECT);
@@ -695,7 +695,7 @@ static int ReceivePGAndDistribute( MPID_Comm *tmp_comm, MPID_Comm *comm_ptr,
int rank = comm_ptr->rank;
int mpi_errno = 0;
int recvtag = *recvtag_p;
- int errflag = FALSE;
+ mpir_errflag_t errflag = MPIR_ERR_NONE;
MPIDI_STATE_DECL(MPID_STATE_RECEIVEPGANDDISTRIBUTE);
MPIDI_FUNC_ENTER(MPID_STATE_RECEIVEPGANDDISTRIBUTE);
@@ -771,7 +771,7 @@ int MPID_PG_BCast( MPID_Comm *peercomm_p, MPID_Comm *comm_p, int root )
pg_translation *local_translation = 0;
pg_node *pg_list, *pg_next, *pg_head = 0;
int rank, i, peer_comm_size;
- int errflag = FALSE;
+ mpir_errflag_t errflag = MPIR_ERR_NONE;
MPIU_CHKLMEM_DECL(1);
peer_comm_size = comm_p->local_size;
@@ -875,7 +875,7 @@ static int SendPGtoPeerAndFree( MPID_Comm *tmp_comm, int *sendtag_p,
int mpi_errno = 0;
int sendtag = *sendtag_p, i;
pg_node *pg_iter;
- int errflag = FALSE;
+ mpir_errflag_t errflag = MPIR_ERR_NONE;
MPIDI_STATE_DECL(MPID_STATE_SENDPGTOPEERANDFREE);
MPIDI_FUNC_ENTER(MPID_STATE_SENDPGTOPEERANDFREE);
@@ -944,7 +944,7 @@ int MPIDI_Comm_accept(const char *port_name, MPID_Info *info, int root,
pg_translation *local_translation = NULL, *remote_translation = NULL;
pg_node *pg_list = NULL;
MPIDI_PG_t **remote_pg = NULL;
- int errflag = FALSE;
+ mpir_errflag_t errflag = MPIR_ERR_NONE;
MPIU_CHKLMEM_DECL(3);
MPIDI_STATE_DECL(MPID_STATE_MPIDI_COMM_ACCEPT);
@@ -1154,7 +1154,7 @@ static int SetupNewIntercomm( MPID_Comm *comm_ptr, int remote_comm_size,
MPID_Comm *intercomm )
{
int mpi_errno = MPI_SUCCESS, i;
- int errflag = FALSE;
+ mpir_errflag_t errflag = MPIR_ERR_NONE;
/* FIXME: How much of this could/should be common with the
upper level (src/mpi/comm/ *.c) code? For best robustness,
this should use the same routine (not copy/paste code) as
diff --git a/src/mpid/ch3/src/ch3u_recvq.c b/src/mpid/ch3/src/ch3u_recvq.c
index 312c2a9..48ba649 100644
--- a/src/mpid/ch3/src/ch3u_recvq.c
+++ b/src/mpid/ch3/src/ch3u_recvq.c
@@ -766,7 +766,7 @@ MPID_Request * MPIDI_CH3U_Recvq_FDP_or_AEU(MPIDI_Message_match * match,
MPID_Request * rreq;
MPID_Request * prev_rreq;
int channel_matched;
- int error_bit_masked = 0;
+ int error_bit_masked = 0, proc_failure_bit_masked = 0;
MPIDI_STATE_DECL(MPID_STATE_MPIDI_CH3U_RECVQ_FDP_OR_AEU);
MPIDI_FUNC_ENTER(MPID_STATE_MPIDI_CH3U_RECVQ_FDP_OR_AEU);
@@ -777,8 +777,9 @@ MPID_Request * MPIDI_CH3U_Recvq_FDP_or_AEU(MPIDI_Message_match * match,
* have to mask it every time. It will get reset at the end of the loop or
* before the request is added to the unexpected queue if was set here. */
if (MPIR_TAG_CHECK_ERROR_BIT(match->parts.tag)) {
- MPIR_TAG_CLEAR_ERROR_BITS(match->parts.tag);
error_bit_masked = 1;
+ if (MPIR_TAG_CHECK_PROC_FAILURE_BIT(match->parts.tag)) proc_failure_bit_masked = 1;
+ MPIR_TAG_CLEAR_ERROR_BITS(match->parts.tag);
}
top_loop:
@@ -843,9 +844,9 @@ MPID_Request * MPIDI_CH3U_Recvq_FDP_or_AEU(MPIDI_Message_match * match,
found=FALSE;goto lock_exit );
MPIU_Assert(mpi_errno == 0);
rreq->dev.recv_pending_count = 1;
- /* Reset the error bit if we unset it earlier. */
- if (error_bit_masked)
- MPIR_TAG_SET_ERROR_BIT(match->parts.tag);
+ /* Reset the error bits if we unset it earlier. */
+ if (error_bit_masked) MPIR_TAG_SET_ERROR_BIT(match->parts.tag);
+ if (proc_failure_bit_masked) MPIR_TAG_SET_PROC_FAILURE_BIT(match->parts.tag);
rreq->dev.match = *match;
rreq->dev.next = NULL;
if (recvq_unexpected_tail != NULL) {
@@ -862,9 +863,9 @@ MPID_Request * MPIDI_CH3U_Recvq_FDP_or_AEU(MPIDI_Message_match * match,
lock_exit:
- /* Reset the error bit if we unset it earlier. */
- if (error_bit_masked)
- MPIR_TAG_SET_ERROR_BIT(match->parts.tag);
+ /* Reset the error bits if we unset it earlier. */
+ if (error_bit_masked) MPIR_TAG_SET_ERROR_BIT(match->parts.tag);
+ if (proc_failure_bit_masked) MPIR_TAG_SET_PROC_FAILURE_BIT(match->parts.tag);
*foundp = found;
diff --git a/src/mpid/ch3/src/ch3u_rma_sync.c b/src/mpid/ch3/src/ch3u_rma_sync.c
index aea2190..c1a2c01 100644
--- a/src/mpid/ch3/src/ch3u_rma_sync.c
+++ b/src/mpid/ch3/src/ch3u_rma_sync.c
@@ -290,7 +290,7 @@ int MPIDI_Win_fence(int assert, MPID_Win * win_ptr)
int i, made_progress = 0;
int local_completed = 0, remote_completed = 0;
MPIDI_RMA_Target_t *curr_target = NULL;
- int errflag = FALSE;
+ mpir_errflag_t errflag = MPIR_ERR_NONE;
int mpi_errno = MPI_SUCCESS;
MPIDI_STATE_DECL(MPID_STATE_MPIDI_WIN_FENCE);
diff --git a/src/mpid/ch3/src/ch3u_win_fns.c b/src/mpid/ch3/src/ch3u_win_fns.c
index 7beaafe..534516e 100644
--- a/src/mpid/ch3/src/ch3u_win_fns.c
+++ b/src/mpid/ch3/src/ch3u_win_fns.c
@@ -41,7 +41,7 @@ int MPIDI_CH3U_Win_create_gather( void *base, MPI_Aint size, int disp_unit,
{
int mpi_errno=MPI_SUCCESS, i, k, comm_size, rank;
MPI_Aint *tmp_buf;
- int errflag = FALSE;
+ mpir_errflag_t errflag = MPIR_ERR_NONE;
MPIU_CHKPMEM_DECL(5);
MPIU_CHKLMEM_DECL(1);
MPIDI_STATE_DECL(MPID_STATE_MPIDI_CH3U_WIN_CREATE_GATHER);
diff --git a/src/mpid/ch3/src/mpid_comm_agree.c b/src/mpid/ch3/src/mpid_comm_agree.c
index 3bd5849..5e77d52 100644
--- a/src/mpid/ch3/src/mpid_comm_agree.c
+++ b/src/mpid/ch3/src/mpid_comm_agree.c
@@ -56,12 +56,12 @@ static void get_children(int rank, int size, uint32_t *bitarray, int *children,
#define FUNCNAME MPID_Comm_agree
#undef FCNAME
#define FCNAME MPIU_QUOTE(FUNCNAME)
-int MPID_Comm_agree(MPID_Comm *comm_ptr, uint32_t *bitarray, int *flag, int new_fail)
+int MPID_Comm_agree(MPID_Comm *comm_ptr, uint32_t *bitarray, int *flag, mpir_errflag_t new_fail)
{
int mpi_errno = MPI_SUCCESS;
int *children, nchildren = 0, parent;
int i;
- int errflag = new_fail;
+ mpir_errflag_t errflag = new_fail;
int tmp_flag;
MPIDI_STATE_DECL(MPID_STATE_MPID_COMM_AGREE);
diff --git a/src/mpid/ch3/src/mpid_comm_get_all_failed_procs.c b/src/mpid/ch3/src/mpid_comm_get_all_failed_procs.c
index 98e8230..4cacc76 100644
--- a/src/mpid/ch3/src/mpid_comm_get_all_failed_procs.c
+++ b/src/mpid/ch3/src/mpid_comm_get_all_failed_procs.c
@@ -84,7 +84,7 @@ static MPID_Group *bitarray_to_group(MPID_Comm *comm_ptr, uint32_t *bitarray)
int MPID_Comm_get_all_failed_procs(MPID_Comm *comm_ptr, MPID_Group **failed_group, int tag)
{
int mpi_errno = MPI_SUCCESS;
- int errflag = 0;
+ mpir_errflag_t errflag = MPIR_ERR_NONE;
int i, j, bitarray_size;
uint32_t *bitarray, *remote_bitarray;
MPID_Group *local_fail;
diff --git a/src/mpid/ch3/src/mpid_vc.c b/src/mpid/ch3/src/mpid_vc.c
index c5d9a48..b340534 100644
--- a/src/mpid/ch3/src/mpid_vc.c
+++ b/src/mpid/ch3/src/mpid_vc.c
@@ -595,7 +595,7 @@ int MPID_PG_ForwardPGInfo( MPID_Comm *peer_ptr, MPID_Comm *comm_ptr,
int i, allfound = 1, pgid, pgidWorld;
MPIDI_PG_t *pg = 0;
MPIDI_PG_iterator iter;
- int errflag = FALSE;
+ mpir_errflag_t errflag = MPIR_ERR_NONE;
/* Get the pgid for CommWorld (always attached to the first process
group) */
diff --git a/src/mpid/ch3/src/mpidi_rma.c b/src/mpid/ch3/src/mpidi_rma.c
index f585656..616f5ed 100644
--- a/src/mpid/ch3/src/mpidi_rma.c
+++ b/src/mpid/ch3/src/mpidi_rma.c
@@ -145,7 +145,7 @@ int MPIDI_Win_free(MPID_Win ** win_ptr)
int mpi_errno = MPI_SUCCESS;
int in_use;
MPID_Comm *comm_ptr;
- int errflag = FALSE;
+ mpir_errflag_t errflag = MPIR_ERR_NONE;
MPIDI_RMA_Win_list_t *win_elem;
MPIDI_STATE_DECL(MPID_STATE_MPIDI_WIN_FREE);
diff --git a/src/mpid/pamid/src/dyntask/mpid_comm_disconnect.c b/src/mpid/pamid/src/dyntask/mpid_comm_disconnect.c
index 669158a..57a519a 100644
--- a/src/mpid/pamid/src/dyntask/mpid_comm_disconnect.c
+++ b/src/mpid/pamid/src/dyntask/mpid_comm_disconnect.c
@@ -201,7 +201,7 @@ int MPID_Comm_disconnect(MPID_Comm *comm_ptr)
int rc, i,j, k, ref_count,mpi_errno=0, probe_flag=0;
pami_task_t *local_list;
MPI_Status status;
- int errflag = FALSE;
+ mpir_errflag_t errflag = MPIR_ERR_NONE;
MPIDI_PG_t *pg;
int total_leaders=0, gsize;
pami_task_t *leader_tids;
diff --git a/src/mpid/pamid/src/dyntask/mpid_comm_spawn_multiple.c b/src/mpid/pamid/src/dyntask/mpid_comm_spawn_multiple.c
index 2b4bd86..81d6298 100644
--- a/src/mpid/pamid/src/dyntask/mpid_comm_spawn_multiple.c
+++ b/src/mpid/pamid/src/dyntask/mpid_comm_spawn_multiple.c
@@ -298,7 +298,7 @@ int MPIDI_Comm_spawn_multiple(int count, char **commands,
}
if (errcodes != MPI_ERRCODES_IGNORE) {
- int errflag = FALSE;
+ mpir_errflag_t errflag = MPIR_ERR_NONE;
mpi_errno = MPIR_Bcast_impl(&should_accept, 1, MPI_INT, root, comm_ptr, &errflag);
if (mpi_errno) TRACE_ERR("MPIR_Bcast_impl returned with mpi_errno=%d\n", mpi_errno);
diff --git a/src/mpid/pamid/src/dyntask/mpidi_pg.c b/src/mpid/pamid/src/dyntask/mpidi_pg.c
index 7d59b3a..f022d9a 100644
--- a/src/mpid/pamid/src/dyntask/mpidi_pg.c
+++ b/src/mpid/pamid/src/dyntask/mpidi_pg.c
@@ -1011,7 +1011,7 @@ int MPID_PG_ForwardPGInfo( MPID_Comm *peer_ptr, MPID_Comm *comm_ptr,
int i, allfound = 1, pgid, pgidWorld;
MPIDI_PG_t *pg = 0;
MPIDI_PG_iterator iter;
- int errflag = FALSE;
+ mpir_errflag_t errflag = MPIR_ERR_NONE;
if(mpidi_dynamic_tasking) {
/* Get the pgid for CommWorld (always attached to the first process
diff --git a/src/mpid/pamid/src/dyntask/mpidi_port.c b/src/mpid/pamid/src/dyntask/mpidi_port.c
index 2488ed6..092d2dd 100644
--- a/src/mpid/pamid/src/dyntask/mpidi_port.c
+++ b/src/mpid/pamid/src/dyntask/mpidi_port.c
@@ -510,7 +510,7 @@ int MPIDI_Comm_connect(const char *port_name, MPID_Info *info, int root,
pg_node *pg_list = NULL;
MPIDI_PG_t **remote_pg = NULL;
MPIR_Context_id_t recvcontext_id = MPIR_INVALID_CONTEXT_ID;
- int errflag = FALSE;
+ mpir_errflag_t errflag = MPIR_ERR_NONE;
long long comm_cntr, lcomm_cntr;
/* Get the context ID here because we need to send it to the remote side */
@@ -815,7 +815,7 @@ static int MPIDI_ReceivePGAndDistribute( struct MPID_Comm *tmp_comm, struct MPID
int rank = comm_ptr->rank;
int mpi_errno = 0;
int recvtag = *recvtag_p;
- int errflag = FALSE;
+ mpir_errflag_t errflag = MPIR_ERR_NONE;
TRACE_ERR("MPIDI_ReceivePGAndDistribute - n_remote_pgs=%d\n", n_remote_pgs);
for (i=0; i<n_remote_pgs; i++) {
@@ -1088,7 +1088,7 @@ static int MPIDI_SendPGtoPeerAndFree( struct MPID_Comm *tmp_comm, int *sendtag_p
int mpi_errno = 0;
int sendtag = *sendtag_p, i;
pg_node *pg_iter;
- int errflag = FALSE;
+ mpir_errflag_t errflag = MPIR_ERR_NONE;
while (pg_list != NULL) {
pg_iter = pg_list;
@@ -1149,7 +1149,7 @@ int MPIDI_Comm_accept(const char *port_name, MPID_Info *info, int root,
pg_translation *local_translation = NULL, *remote_translation = NULL;
pg_node *pg_list = NULL;
MPIDI_PG_t **remote_pg = NULL;
- int errflag = FALSE;
+ mpir_errflag_t errflag = MPIR_ERR_NONE;
char send_char[16], recv_char[16], remote_taskids[16];
long long comm_cntr, lcomm_cntr;
int leader_taskid;
@@ -1384,7 +1384,7 @@ static int MPIDI_SetupNewIntercomm( struct MPID_Comm *comm_ptr, int remote_comm_
struct MPID_Comm *intercomm )
{
int mpi_errno = MPI_SUCCESS, i, j, index=0;
- int errflag = FALSE;
+ mpir_errflag_t errflag = MPIR_ERR_NONE;
int total_rem_world_cnts, p=0;
char *world_tasks, *cp1;
conn_info *tmp_node;
@@ -1683,7 +1683,7 @@ int MPID_PG_BCast( MPID_Comm *peercomm_p, MPID_Comm *comm_p, int root )
pg_translation *local_translation = 0;
pg_node *pg_list, *pg_next, *pg_head = 0;
int rank, i, peer_comm_size;
- int errflag = FALSE;
+ mpir_errflag_t errflag = MPIR_ERR_NONE;
MPIU_CHKLMEM_DECL(1);
peer_comm_size = comm_p->local_size;
diff --git a/src/mpid/pamid/src/onesided/mpid_win_allocate_shared.c b/src/mpid/pamid/src/onesided/mpid_win_allocate_shared.c
index d521a26..ecce9ce 100644
--- a/src/mpid/pamid/src/onesided/mpid_win_allocate_shared.c
+++ b/src/mpid/pamid/src/onesided/mpid_win_allocate_shared.c
@@ -159,7 +159,7 @@ MPID_getSharedSegment_mmap(MPID_Win * win)
{
int rank, rc, fd;
int mpi_errno = MPI_SUCCESS;
- int errflag = FALSE;
+ mpir_errflag_t errflag = MPIR_ERR_NONE;
int first = 0;
snprintf (win->mpid.shm->shm_key, 63, "/mpich.comm-%d.win_shared", win->comm_ptr->context_id);
@@ -205,7 +205,7 @@ int
MPID_getSharedSegment_sysv(MPID_Win * win)
{
int mpi_errno = MPI_SUCCESS;
- int errflag = FALSE;
+ mpir_errflag_t errflag = MPIR_ERR_NONE;
uint32_t shm_key;
int rank;
char *cp;
@@ -308,7 +308,7 @@ MPID_getSharedSegment(MPI_Aint size,
{
int mpi_errno = MPI_SUCCESS;
int i, comm_size, rank;
- int errflag = FALSE;
+ mpir_errflag_t errflag = MPIR_ERR_NONE;
MPI_Aint pageSize,pageSize2, len,new_size;
MPID_Win *win;
int padSize;
diff --git a/src/mpid/pamid/src/onesided/mpid_win_free.c b/src/mpid/pamid/src/onesided/mpid_win_free.c
index 9c57553..ecd1df3 100644
--- a/src/mpid/pamid/src/onesided/mpid_win_free.c
+++ b/src/mpid/pamid/src/onesided/mpid_win_free.c
@@ -83,7 +83,7 @@ MPID_Win_free(MPID_Win **win_ptr)
MPID_Win *win = *win_ptr;
size_t rank = win->comm_ptr->rank;
- int errflag = FALSE;
+ mpir_errflag_t errflag = MPIR_ERR_NONE;
if(win->mpid.sync.origin_epoch_type != win->mpid.sync.target_epoch_type ||
(win->mpid.sync.origin_epoch_type != MPID_EPOTYPE_NONE &&
http://git.mpich.org/mpich.git/commitdiff/46f59276bcfce78af04215bfa8cf544d0…
commit 46f59276bcfce78af04215bfa8cf544d0cef079f
Author: Wesley Bland <wbland(a)anl.gov>
Date: Mon Nov 10 10:17:25 2014 -0600
Take a bit in the tag space for proc failure
We need to take another bit from the tag space to specify the difference
between a generic failure and a process failure. This patch modifies the
macros to handle this situation.
Signed-off-by: Huiwei Lu <huiweilu(a)mcs.anl.gov>
diff --git a/src/include/mpiimpl.h b/src/include/mpiimpl.h
index 97e785f..5dd363f 100644
--- a/src/include/mpiimpl.h
+++ b/src/include/mpiimpl.h
@@ -3898,18 +3898,29 @@ int MPID_VCR_Get_lpid(MPID_VCR vcr, int * lpid_ptr);
* be necessary to do so (for instance in the receive queue */
#define MPIR_TAG_ERROR_BIT (1 << 30)
+/* This bitmask is used to differentiate between a process failure
+ * (MPIX_ERR_PROC_FAILED) and any other kind of failure (MPI_ERR_OTHER). */
+#define MPIR_TAG_PROC_FAILURE_BIT (1 << 29)
+
/* This macro checks the value of the error bit in the MPI tag and returns 1
* if the tag is set and 0 if it is not. */
-#define MPIR_TAG_CHECK_ERROR_BIT(tag) ((MPIR_TAG_ERROR_BIT & tag) == MPIR_TAG_ERROR_BIT ? 1 : 0)
+#define MPIR_TAG_CHECK_ERROR_BIT(tag) ((MPIR_TAG_ERROR_BIT & (tag)) == MPIR_TAG_ERROR_BIT ? 1 : 0)
+
+/* This macro checks the value of the process failure bit in the MPI tag and
+ * returns 1 if the tag is set and 0 if it is not. */
+#define MPIR_TAG_CHECK_PROC_FAILURE_BIT(tag) ((MPIR_TAG_PROC_FAILURE_BIT & (tag)) == MPIR_TAG_PROC_FAILURE_BIT ? 1 : 0)
/* This macro sets the value of the error bit in the MPI tag to 1 */
-#define MPIR_TAG_SET_ERROR_BIT(tag) (tag |= MPIR_TAG_ERROR_BIT)
+#define MPIR_TAG_SET_ERROR_BIT(tag) ((tag) |= MPIR_TAG_ERROR_BIT)
+
+/* This macro sets the value of the process failure bit in the MPI tag to 1 */
+#define MPIR_TAG_SET_PROC_FAILURE_BIT(tag) ((tag) |= (MPIR_TAG_ERROR_BIT | MPIR_TAG_PROC_FAILURE_BIT))
-/* This macro clears the value of the error bit in the MPI tag */
-#define MPIR_TAG_CLEAR_ERROR_BIT(tag) (tag &= ~MPIR_TAG_ERROR_BIT)
+/* This macro clears the value of the error bits in the MPI tag */
+#define MPIR_TAG_CLEAR_ERROR_BITS(tag) ((tag) &= ~(MPIR_TAG_ERROR_BIT ^ MPIR_TAG_PROC_FAILURE_BIT))
-/* This macro masks the value of the error bit in the MPI tag */
-#define MPIR_TAG_MASK_ERROR_BIT(tag) (tag & ~MPIR_TAG_ERROR_BIT)
+/* This macro masks the value of the error bits in the MPI tag */
+#define MPIR_TAG_MASK_ERROR_BITS(tag) ((tag) & ~(MPIR_TAG_ERROR_BIT ^ MPIR_TAG_PROC_FAILURE_BIT))
/* These functions are used in the implementation of collective and
other internal operations. They are wrappers around MPID send/recv
diff --git a/src/mpi/coll/helper_fns.c b/src/mpi/coll/helper_fns.c
index 32f0284..7c5a2aa 100644
--- a/src/mpi/coll/helper_fns.c
+++ b/src/mpi/coll/helper_fns.c
@@ -339,7 +339,7 @@ int MPIC_Recv(void *buf, int count, MPI_Datatype datatype, int source, int tag,
MPIX_ERR_PROC_FAILED == MPIR_ERR_GET_CLASS(status->MPI_ERROR) ||
MPIR_TAG_CHECK_ERROR_BIT(status->MPI_TAG)) {
*errflag = TRUE;
- MPIR_TAG_CLEAR_ERROR_BIT(status->MPI_TAG);
+ MPIR_TAG_CLEAR_ERROR_BITS(status->MPI_TAG);
} else if (MPI_SUCCESS == MPIR_ERR_GET_CLASS(status->MPI_ERROR)) {
MPIU_Assert(status->MPI_TAG == tag);
}
@@ -457,7 +457,7 @@ int MPIC_Sendrecv(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
MPIX_ERR_PROC_FAILED == MPIR_ERR_GET_CLASS(status->MPI_ERROR) ||
MPIR_TAG_CHECK_ERROR_BIT(status->MPI_TAG)) {
*errflag = TRUE;
- MPIR_TAG_CLEAR_ERROR_BIT(status->MPI_TAG);
+ MPIR_TAG_CLEAR_ERROR_BITS(status->MPI_TAG);
} else if (MPI_SUCCESS == MPIR_ERR_GET_CLASS(status->MPI_ERROR)) {
MPIU_Assert(status->MPI_TAG == recvtag);
}
@@ -573,7 +573,7 @@ int MPIC_Sendrecv_replace(void *buf, int count, MPI_Datatype datatype,
MPIX_ERR_PROC_FAILED == MPIR_ERR_GET_CLASS(status->MPI_ERROR) ||
MPIR_TAG_CHECK_ERROR_BIT(status->MPI_TAG)) {
*errflag = TRUE;
- MPIR_TAG_CLEAR_ERROR_BIT(status->MPI_TAG);
+ MPIR_TAG_CLEAR_ERROR_BITS(status->MPI_TAG);
} else if (MPI_SUCCESS == MPIR_ERR_GET_CLASS(status->MPI_ERROR)) {
MPIU_Assert(status->MPI_TAG == recvtag);
}
@@ -694,7 +694,7 @@ int MPIC_Waitall(int numreq, MPI_Request requests[], MPI_Status statuses[], int
for (i = 0; i < numreq; ++i) {
if (MPIR_TAG_CHECK_ERROR_BIT(statuses[i].MPI_TAG)) {
*errflag = TRUE;
- MPIR_TAG_CLEAR_ERROR_BIT(statuses[i].MPI_TAG);
+ MPIR_TAG_CLEAR_ERROR_BITS(statuses[i].MPI_TAG);
break;
}
}
diff --git a/src/mpi/init/initthread.c b/src/mpi/init/initthread.c
index a7d65ba..aaf20c8 100644
--- a/src/mpi/init/initthread.c
+++ b/src/mpi/init/initthread.c
@@ -501,7 +501,7 @@ int MPIR_Init_thread(int * argc, char ***argv, int required, int * provided)
MPIU_Assert(((unsigned)MPIR_Process.attrs.tag_ub & ((unsigned)MPIR_Process.attrs.tag_ub + 1)) == 0);
/* Set aside tag space for tagged collectives and failure notification */
- MPIR_Process.attrs.tag_ub >>= 2;
+ MPIR_Process.attrs.tag_ub >>= 3;
/* The bit for error checking is set in a macro in mpiimpl.h for
* performance reasons. */
MPIR_Process.tagged_coll_mask = MPIR_Process.attrs.tag_ub + 1;
diff --git a/src/mpid/ch3/src/ch3u_recvq.c b/src/mpid/ch3/src/ch3u_recvq.c
index bf59978..312c2a9 100644
--- a/src/mpid/ch3/src/ch3u_recvq.c
+++ b/src/mpid/ch3/src/ch3u_recvq.c
@@ -232,7 +232,7 @@ int MPIDI_CH3U_Recvq_FU(int source, int tag, int context_id, MPI_Status *s)
/* Mask the error bit that might be set on incoming messages. It is
* assumed that the local receive operation won't have the error bit set
* (or it is masked away at some other level). */
- MPIR_TAG_CLEAR_ERROR_BIT(mask.parts.tag);
+ MPIR_TAG_CLEAR_ERROR_BITS(mask.parts.tag);
if (tag != MPI_ANY_TAG && source != MPI_ANY_SOURCE) {
MPIR_T_PVAR_TIMER_START(RECVQ, time_matching_unexpectedq);
while (rreq != NULL) {
@@ -315,7 +315,7 @@ MPID_Request * MPIDI_CH3U_Recvq_FDU(MPI_Request sreq_id,
/* Mask the error bit that might be set on incoming messages. It is
* assumed that the local receive operation won't have the error bit set
* (or it is masked away at some other level). */
- MPIR_TAG_CLEAR_ERROR_BIT(mask.parts.tag);
+ MPIR_TAG_CLEAR_ERROR_BITS(mask.parts.tag);
/* Note that since this routine is used only in the case of send_cancel,
there can be only one match if at all. */
@@ -399,7 +399,7 @@ MPID_Request * MPIDI_CH3U_Recvq_FDU_matchonly(int source, int tag, int context_i
/* Mask the error bit that might be set on incoming messages. It is
* assumed that the local receive operation won't have the error bit set
* (or it is masked away at some other level). */
- MPIR_TAG_CLEAR_ERROR_BIT(mask.parts.tag);
+ MPIR_TAG_CLEAR_ERROR_BITS(mask.parts.tag);
if (tag != MPI_ANY_TAG && source != MPI_ANY_SOURCE) {
do {
@@ -521,7 +521,7 @@ MPID_Request * MPIDI_CH3U_Recvq_FDU_or_AEP(int source, int tag,
/* Mask the error bit that might be set on incoming messages. It is
* assumed that the local receive operation won't have the error bit set
* (or it is masked away at some other level). */
- MPIR_TAG_CLEAR_ERROR_BIT(mask.parts.tag);
+ MPIR_TAG_CLEAR_ERROR_BITS(mask.parts.tag);
if (tag != MPI_ANY_TAG && source != MPI_ANY_SOURCE) {
do {
@@ -777,7 +777,7 @@ MPID_Request * MPIDI_CH3U_Recvq_FDP_or_AEU(MPIDI_Message_match * match,
* have to mask it every time. It will get reset at the end of the loop or
* before the request is added to the unexpected queue if was set here. */
if (MPIR_TAG_CHECK_ERROR_BIT(match->parts.tag)) {
- MPIR_TAG_CLEAR_ERROR_BIT(match->parts.tag);
+ MPIR_TAG_CLEAR_ERROR_BITS(match->parts.tag);
error_bit_masked = 1;
}
@@ -823,14 +823,14 @@ MPID_Request * MPIDI_CH3U_Recvq_FDP_or_AEU(MPIDI_Message_match * match,
MPIDI_CH3I_Comm_find(match->parts.context_id, &comm_ptr);
- if (comm_ptr && comm_ptr->revoked && MPIR_TAG_MASK_ERROR_BIT(match->parts.tag) != MPIR_AGREE_TAG &&
- comm_ptr->revoked && MPIR_TAG_MASK_ERROR_BIT(match->parts.tag) != MPIR_SHRINK_TAG) {
+ if (comm_ptr && comm_ptr->revoked && MPIR_TAG_MASK_ERROR_BITS(match->parts.tag) != MPIR_AGREE_TAG &&
+ comm_ptr->revoked && MPIR_TAG_MASK_ERROR_BITS(match->parts.tag) != MPIR_SHRINK_TAG) {
*foundp = FALSE;
MPIDI_Request_create_null_rreq( rreq, mpi_errno, found=FALSE;goto lock_exit );
MPIU_Assert(mpi_errno == MPI_SUCCESS);
MPIU_DBG_MSG_FMT(CH3_OTHER, VERBOSE,
- (MPIU_DBG_FDEST, "RECEIVED MESSAGE FOR REVOKED COMM (tag=%d,src=%d,cid=%d)\n", MPIR_TAG_MASK_ERROR_BIT(match->parts.tag), match->parts.rank, comm_ptr->context_id));
+ (MPIU_DBG_FDEST, "RECEIVED MESSAGE FOR REVOKED COMM (tag=%d,src=%d,cid=%d)\n", MPIR_TAG_MASK_ERROR_BITS(match->parts.tag), match->parts.rank, comm_ptr->context_id));
return rreq;
}
}
@@ -945,7 +945,7 @@ int MPIDI_CH3U_Clean_recvq(MPID_Comm *comm_ptr)
/* Clear the error bit in the tag since we don't care about whether or
* not we're trying to report an error anymore. */
- MPIR_TAG_CLEAR_ERROR_BIT(mask.parts.tag);
+ MPIR_TAG_CLEAR_ERROR_BITS(mask.parts.tag);
while (NULL != rreq) {
/* We'll have to do this matching twice. Once for the pt2pt context id
@@ -963,8 +963,8 @@ int MPIDI_CH3U_Clean_recvq(MPID_Comm *comm_ptr)
match.parts.context_id = comm_ptr->recvcontext_id + MPID_CONTEXT_INTRA_COLL;
if (MATCH_WITH_LEFT_RIGHT_MASK(rreq->dev.match, match, mask)) {
- if (MPIR_TAG_MASK_ERROR_BIT(rreq->dev.match.parts.tag) != MPIR_AGREE_TAG &&
- MPIR_TAG_MASK_ERROR_BIT(rreq->dev.match.parts.tag) != MPIR_SHRINK_TAG) {
+ if (MPIR_TAG_MASK_ERROR_BITS(rreq->dev.match.parts.tag) != MPIR_AGREE_TAG &&
+ MPIR_TAG_MASK_ERROR_BITS(rreq->dev.match.parts.tag) != MPIR_SHRINK_TAG) {
MPIU_DBG_MSG_FMT(CH3_OTHER,VERBOSE,(MPIU_DBG_FDEST,
"cleaning up unexpected collective pkt rank=%d tag=%d contextid=%d",
rreq->dev.match.parts.rank, rreq->dev.match.parts.tag, rreq->dev.match.parts.context_id));
@@ -979,8 +979,8 @@ int MPIDI_CH3U_Clean_recvq(MPID_Comm *comm_ptr)
match.parts.context_id = comm_ptr->recvcontext_id + MPID_CONTEXT_INTRANODE_OFFSET + offset;
if (MATCH_WITH_LEFT_RIGHT_MASK(rreq->dev.match, match, mask)) {
- if (MPIR_TAG_MASK_ERROR_BIT(rreq->dev.match.parts.tag) != MPIR_AGREE_TAG &&
- MPIR_TAG_MASK_ERROR_BIT(rreq->dev.match.parts.tag) != MPIR_SHRINK_TAG) {
+ if (MPIR_TAG_MASK_ERROR_BITS(rreq->dev.match.parts.tag) != MPIR_AGREE_TAG &&
+ MPIR_TAG_MASK_ERROR_BITS(rreq->dev.match.parts.tag) != MPIR_SHRINK_TAG) {
MPIU_DBG_MSG_FMT(CH3_OTHER,VERBOSE,(MPIU_DBG_FDEST,
"cleaning up unexpected pt2pt pkt rank=%d tag=%d contextid=%d",
rreq->dev.match.parts.rank, rreq->dev.match.parts.tag, rreq->dev.match.parts.context_id));
@@ -993,8 +993,8 @@ int MPIDI_CH3U_Clean_recvq(MPID_Comm *comm_ptr)
match.parts.context_id = comm_ptr->recvcontext_id + MPID_CONTEXT_INTRANODE_OFFSET + offset;
if (MATCH_WITH_LEFT_RIGHT_MASK(rreq->dev.match, match, mask)) {
- if (MPIR_TAG_MASK_ERROR_BIT(rreq->dev.match.parts.tag) != MPIR_AGREE_TAG &&
- MPIR_TAG_MASK_ERROR_BIT(rreq->dev.match.parts.tag) != MPIR_SHRINK_TAG) {
+ if (MPIR_TAG_MASK_ERROR_BITS(rreq->dev.match.parts.tag) != MPIR_AGREE_TAG &&
+ MPIR_TAG_MASK_ERROR_BITS(rreq->dev.match.parts.tag) != MPIR_SHRINK_TAG) {
MPIU_DBG_MSG_FMT(CH3_OTHER,VERBOSE,(MPIU_DBG_FDEST,
"cleaning up unexpected collective pkt rank=%d tag=%d contextid=%d",
rreq->dev.match.parts.rank, rreq->dev.match.parts.tag, rreq->dev.match.parts.context_id));
@@ -1007,8 +1007,8 @@ int MPIDI_CH3U_Clean_recvq(MPID_Comm *comm_ptr)
match.parts.context_id = comm_ptr->recvcontext_id + MPID_CONTEXT_INTERNODE_OFFSET + offset;
if (MATCH_WITH_LEFT_RIGHT_MASK(rreq->dev.match, match, mask)) {
- if (MPIR_TAG_MASK_ERROR_BIT(rreq->dev.match.parts.tag) != MPIR_AGREE_TAG &&
- MPIR_TAG_MASK_ERROR_BIT(rreq->dev.match.parts.tag) != MPIR_SHRINK_TAG) {
+ if (MPIR_TAG_MASK_ERROR_BITS(rreq->dev.match.parts.tag) != MPIR_AGREE_TAG &&
+ MPIR_TAG_MASK_ERROR_BITS(rreq->dev.match.parts.tag) != MPIR_SHRINK_TAG) {
MPIU_DBG_MSG_FMT(CH3_OTHER,VERBOSE,(MPIU_DBG_FDEST,
"cleaning up unexpected pt2pt pkt rank=%d tag=%d contextid=%d",
rreq->dev.match.parts.rank, rreq->dev.match.parts.tag, rreq->dev.match.parts.context_id));
@@ -1021,8 +1021,8 @@ int MPIDI_CH3U_Clean_recvq(MPID_Comm *comm_ptr)
match.parts.context_id = comm_ptr->recvcontext_id + MPID_CONTEXT_INTERNODE_OFFSET + offset;
if (MATCH_WITH_LEFT_RIGHT_MASK(rreq->dev.match, match, mask)) {
- if (MPIR_TAG_MASK_ERROR_BIT(rreq->dev.match.parts.tag) != MPIR_AGREE_TAG &&
- MPIR_TAG_MASK_ERROR_BIT(rreq->dev.match.parts.tag) != MPIR_SHRINK_TAG) {
+ if (MPIR_TAG_MASK_ERROR_BITS(rreq->dev.match.parts.tag) != MPIR_AGREE_TAG &&
+ MPIR_TAG_MASK_ERROR_BITS(rreq->dev.match.parts.tag) != MPIR_SHRINK_TAG) {
MPIU_DBG_MSG_FMT(CH3_OTHER,VERBOSE,(MPIU_DBG_FDEST,
"cleaning up unexpected collective pkt rank=%d tag=%d contextid=%d",
rreq->dev.match.parts.rank, rreq->dev.match.parts.tag, rreq->dev.match.parts.context_id));
@@ -1055,8 +1055,8 @@ int MPIDI_CH3U_Clean_recvq(MPID_Comm *comm_ptr)
match.parts.context_id = comm_ptr->recvcontext_id + MPID_CONTEXT_INTRA_COLL;
if (MATCH_WITH_LEFT_RIGHT_MASK(rreq->dev.match, match, mask)) {
- if (MPIR_TAG_MASK_ERROR_BIT(rreq->dev.match.parts.tag) != MPIR_AGREE_TAG &&
- MPIR_TAG_MASK_ERROR_BIT(rreq->dev.match.parts.tag) != MPIR_SHRINK_TAG) {
+ if (MPIR_TAG_MASK_ERROR_BITS(rreq->dev.match.parts.tag) != MPIR_AGREE_TAG &&
+ MPIR_TAG_MASK_ERROR_BITS(rreq->dev.match.parts.tag) != MPIR_SHRINK_TAG) {
MPIU_DBG_MSG_FMT(CH3_OTHER,VERBOSE,(MPIU_DBG_FDEST,
"cleaning up posted collective pkt rank=%d tag=%d contextid=%d",
rreq->dev.match.parts.rank, rreq->dev.match.parts.tag, rreq->dev.match.parts.context_id));
@@ -1071,8 +1071,8 @@ int MPIDI_CH3U_Clean_recvq(MPID_Comm *comm_ptr)
match.parts.context_id = comm_ptr->recvcontext_id + MPID_CONTEXT_INTRANODE_OFFSET + offset;
if (MATCH_WITH_LEFT_RIGHT_MASK(rreq->dev.match, match, mask)) {
- if (MPIR_TAG_MASK_ERROR_BIT(rreq->dev.match.parts.tag) != MPIR_AGREE_TAG &&
- MPIR_TAG_MASK_ERROR_BIT(rreq->dev.match.parts.tag) != MPIR_SHRINK_TAG) {
+ if (MPIR_TAG_MASK_ERROR_BITS(rreq->dev.match.parts.tag) != MPIR_AGREE_TAG &&
+ MPIR_TAG_MASK_ERROR_BITS(rreq->dev.match.parts.tag) != MPIR_SHRINK_TAG) {
MPIU_DBG_MSG_FMT(CH3_OTHER,VERBOSE,(MPIU_DBG_FDEST,
"cleaning up posted pt2pt pkt rank=%d tag=%d contextid=%d",
rreq->dev.match.parts.rank, rreq->dev.match.parts.tag, rreq->dev.match.parts.context_id));
@@ -1085,8 +1085,8 @@ int MPIDI_CH3U_Clean_recvq(MPID_Comm *comm_ptr)
match.parts.context_id = comm_ptr->recvcontext_id + MPID_CONTEXT_INTRANODE_OFFSET + offset;
if (MATCH_WITH_LEFT_RIGHT_MASK(rreq->dev.match, match, mask)) {
- if (MPIR_TAG_MASK_ERROR_BIT(rreq->dev.match.parts.tag) != MPIR_AGREE_TAG &&
- MPIR_TAG_MASK_ERROR_BIT(rreq->dev.match.parts.tag) != MPIR_SHRINK_TAG) {
+ if (MPIR_TAG_MASK_ERROR_BITS(rreq->dev.match.parts.tag) != MPIR_AGREE_TAG &&
+ MPIR_TAG_MASK_ERROR_BITS(rreq->dev.match.parts.tag) != MPIR_SHRINK_TAG) {
MPIU_DBG_MSG_FMT(CH3_OTHER,VERBOSE,(MPIU_DBG_FDEST,
"cleaning up posted collective pkt rank=%d tag=%d contextid=%d",
rreq->dev.match.parts.rank, rreq->dev.match.parts.tag, rreq->dev.match.parts.context_id));
@@ -1099,8 +1099,8 @@ int MPIDI_CH3U_Clean_recvq(MPID_Comm *comm_ptr)
match.parts.context_id = comm_ptr->recvcontext_id + MPID_CONTEXT_INTERNODE_OFFSET + offset;
if (MATCH_WITH_LEFT_RIGHT_MASK(rreq->dev.match, match, mask)) {
- if (MPIR_TAG_MASK_ERROR_BIT(rreq->dev.match.parts.tag) != MPIR_AGREE_TAG &&
- MPIR_TAG_MASK_ERROR_BIT(rreq->dev.match.parts.tag) != MPIR_SHRINK_TAG) {
+ if (MPIR_TAG_MASK_ERROR_BITS(rreq->dev.match.parts.tag) != MPIR_AGREE_TAG &&
+ MPIR_TAG_MASK_ERROR_BITS(rreq->dev.match.parts.tag) != MPIR_SHRINK_TAG) {
MPIU_DBG_MSG_FMT(CH3_OTHER,VERBOSE,(MPIU_DBG_FDEST,
"cleaning up posted pt2pt pkt rank=%d tag=%d contextid=%d",
rreq->dev.match.parts.rank, rreq->dev.match.parts.tag, rreq->dev.match.parts.context_id));
@@ -1113,8 +1113,8 @@ int MPIDI_CH3U_Clean_recvq(MPID_Comm *comm_ptr)
match.parts.context_id = comm_ptr->recvcontext_id + MPID_CONTEXT_INTERNODE_OFFSET + offset;
if (MATCH_WITH_LEFT_RIGHT_MASK(rreq->dev.match, match, mask)) {
- if (MPIR_TAG_MASK_ERROR_BIT(rreq->dev.match.parts.tag) != MPIR_AGREE_TAG &&
- MPIR_TAG_MASK_ERROR_BIT(rreq->dev.match.parts.tag) != MPIR_SHRINK_TAG) {
+ if (MPIR_TAG_MASK_ERROR_BITS(rreq->dev.match.parts.tag) != MPIR_AGREE_TAG &&
+ MPIR_TAG_MASK_ERROR_BITS(rreq->dev.match.parts.tag) != MPIR_SHRINK_TAG) {
MPIU_DBG_MSG_FMT(CH3_OTHER,VERBOSE,(MPIU_DBG_FDEST,
"cleaning up posted collective pkt rank=%d tag=%d contextid=%d",
rreq->dev.match.parts.rank, rreq->dev.match.parts.tag, rreq->dev.match.parts.context_id));
diff --git a/src/mpid/ch3/src/mpid_iprobe.c b/src/mpid/ch3/src/mpid_iprobe.c
index fa32028..9252a57 100644
--- a/src/mpid/ch3/src/mpid_iprobe.c
+++ b/src/mpid/ch3/src/mpid_iprobe.c
@@ -34,8 +34,8 @@ int MPID_Iprobe(int source, int tag, MPID_Comm *comm, int context_offset,
/* Check to make sure the communicator hasn't already been revoked */
if (comm->revoked &&
- MPIR_AGREE_TAG != MPIR_TAG_MASK_ERROR_BIT(tag & ~MPIR_Process.tagged_coll_mask) &&
- MPIR_SHRINK_TAG != MPIR_TAG_MASK_ERROR_BIT(tag & ~MPIR_Process.tagged_coll_mask)) {
+ MPIR_AGREE_TAG != MPIR_TAG_MASK_ERROR_BITS(tag & ~MPIR_Process.tagged_coll_mask) &&
+ MPIR_SHRINK_TAG != MPIR_TAG_MASK_ERROR_BITS(tag & ~MPIR_Process.tagged_coll_mask)) {
MPIU_ERR_SETANDJUMP(mpi_errno,MPIX_ERR_REVOKED,"**revoked");
}
diff --git a/src/mpid/ch3/src/mpid_irecv.c b/src/mpid/ch3/src/mpid_irecv.c
index c0401e9..5f22202 100644
--- a/src/mpid/ch3/src/mpid_irecv.c
+++ b/src/mpid/ch3/src/mpid_irecv.c
@@ -33,8 +33,8 @@ int MPID_Irecv(void * buf, int count, MPI_Datatype datatype, int rank, int tag,
/* Check to make sure the communicator hasn't already been revoked */
if (comm->revoked &&
- MPIR_AGREE_TAG != MPIR_TAG_MASK_ERROR_BIT(tag & ~MPIR_Process.tagged_coll_mask) &&
- MPIR_SHRINK_TAG != MPIR_TAG_MASK_ERROR_BIT(tag & ~MPIR_Process.tagged_coll_mask)) {
+ MPIR_AGREE_TAG != MPIR_TAG_MASK_ERROR_BITS(tag & ~MPIR_Process.tagged_coll_mask) &&
+ MPIR_SHRINK_TAG != MPIR_TAG_MASK_ERROR_BITS(tag & ~MPIR_Process.tagged_coll_mask)) {
MPIU_DBG_MSG(CH3_OTHER,VERBOSE,"Comm has been revoked. Returning from MPID_IRECV.");
MPIU_ERR_SETANDJUMP(mpi_errno,MPIX_ERR_REVOKED,"**revoked");
}
diff --git a/src/mpid/ch3/src/mpid_irsend.c b/src/mpid/ch3/src/mpid_irsend.c
index 0bae646..6bedef9 100644
--- a/src/mpid/ch3/src/mpid_irsend.c
+++ b/src/mpid/ch3/src/mpid_irsend.c
@@ -40,8 +40,8 @@ int MPID_Irsend(const void * buf, int count, MPI_Datatype datatype, int rank, in
/* Check to make sure the communicator hasn't already been revoked */
if (comm->revoked &&
- MPIR_AGREE_TAG != MPIR_TAG_MASK_ERROR_BIT(tag & ~MPIR_Process.tagged_coll_mask) &&
- MPIR_SHRINK_TAG != MPIR_TAG_MASK_ERROR_BIT(tag & ~MPIR_Process.tagged_coll_mask)) {
+ MPIR_AGREE_TAG != MPIR_TAG_MASK_ERROR_BITS(tag & ~MPIR_Process.tagged_coll_mask) &&
+ MPIR_SHRINK_TAG != MPIR_TAG_MASK_ERROR_BITS(tag & ~MPIR_Process.tagged_coll_mask)) {
MPIU_ERR_SETANDJUMP(mpi_errno,MPIX_ERR_REVOKED,"**revoked");
}
diff --git a/src/mpid/ch3/src/mpid_isend.c b/src/mpid/ch3/src/mpid_isend.c
index 168608d..11f60b8 100644
--- a/src/mpid/ch3/src/mpid_isend.c
+++ b/src/mpid/ch3/src/mpid_isend.c
@@ -52,8 +52,8 @@ int MPID_Isend(const void * buf, int count, MPI_Datatype datatype, int rank,
/* Check to make sure the communicator hasn't already been revoked */
if (comm->revoked &&
- MPIR_AGREE_TAG != MPIR_TAG_MASK_ERROR_BIT(tag & ~MPIR_Process.tagged_coll_mask) &&
- MPIR_SHRINK_TAG != MPIR_TAG_MASK_ERROR_BIT(tag & ~MPIR_Process.tagged_coll_mask)) {
+ MPIR_AGREE_TAG != MPIR_TAG_MASK_ERROR_BITS(tag & ~MPIR_Process.tagged_coll_mask) &&
+ MPIR_SHRINK_TAG != MPIR_TAG_MASK_ERROR_BITS(tag & ~MPIR_Process.tagged_coll_mask)) {
MPIU_DBG_MSG(CH3_OTHER,VERBOSE,"Communicator revoked. MPID_ISEND returning");
MPIU_ERR_SETANDJUMP(mpi_errno,MPIX_ERR_REVOKED,"**revoked");
}
diff --git a/src/mpid/ch3/src/mpid_issend.c b/src/mpid/ch3/src/mpid_issend.c
index 91e484a..d1def5a 100644
--- a/src/mpid/ch3/src/mpid_issend.c
+++ b/src/mpid/ch3/src/mpid_issend.c
@@ -39,8 +39,8 @@ int MPID_Issend(const void * buf, int count, MPI_Datatype datatype, int rank, in
/* Check to make sure the communicator hasn't already been revoked */
if (comm->revoked &&
- MPIR_AGREE_TAG != MPIR_TAG_MASK_ERROR_BIT(tag & ~MPIR_Process.tagged_coll_mask) &&
- MPIR_SHRINK_TAG != MPIR_TAG_MASK_ERROR_BIT(tag & ~MPIR_Process.tagged_coll_mask)) {
+ MPIR_AGREE_TAG != MPIR_TAG_MASK_ERROR_BITS(tag & ~MPIR_Process.tagged_coll_mask) &&
+ MPIR_SHRINK_TAG != MPIR_TAG_MASK_ERROR_BITS(tag & ~MPIR_Process.tagged_coll_mask)) {
MPIU_ERR_SETANDJUMP(mpi_errno,MPIX_ERR_REVOKED,"**revoked");
}
diff --git a/src/mpid/ch3/src/mpid_probe.c b/src/mpid/ch3/src/mpid_probe.c
index 9a238e7..e48aae0 100644
--- a/src/mpid/ch3/src/mpid_probe.c
+++ b/src/mpid/ch3/src/mpid_probe.c
@@ -28,8 +28,8 @@ int MPID_Probe(int source, int tag, MPID_Comm * comm, int context_offset,
/* Check to make sure the communicator hasn't already been revoked */
if (comm->revoked &&
- MPIR_AGREE_TAG != MPIR_TAG_MASK_ERROR_BIT(tag & ~MPIR_Process.tagged_coll_mask) &&
- MPIR_SHRINK_TAG != MPIR_TAG_MASK_ERROR_BIT(tag & ~MPIR_Process.tagged_coll_mask)) {
+ MPIR_AGREE_TAG != MPIR_TAG_MASK_ERROR_BITS(tag & ~MPIR_Process.tagged_coll_mask) &&
+ MPIR_SHRINK_TAG != MPIR_TAG_MASK_ERROR_BITS(tag & ~MPIR_Process.tagged_coll_mask)) {
MPIU_ERR_SETANDJUMP(mpi_errno,MPIX_ERR_REVOKED,"**revoked");
}
diff --git a/src/mpid/ch3/src/mpid_recv.c b/src/mpid/ch3/src/mpid_recv.c
index a042864..40781c8 100644
--- a/src/mpid/ch3/src/mpid_recv.c
+++ b/src/mpid/ch3/src/mpid_recv.c
@@ -41,8 +41,8 @@ int MPID_Recv(void * buf, int count, MPI_Datatype datatype, int rank, int tag,
/* Check to make sure the communicator hasn't already been revoked */
if (comm->revoked &&
- MPIR_AGREE_TAG != MPIR_TAG_MASK_ERROR_BIT(tag & ~MPIR_Process.tagged_coll_mask) &&
- MPIR_SHRINK_TAG != MPIR_TAG_MASK_ERROR_BIT(tag & ~MPIR_Process.tagged_coll_mask)) {
+ MPIR_AGREE_TAG != MPIR_TAG_MASK_ERROR_BITS(tag & ~MPIR_Process.tagged_coll_mask) &&
+ MPIR_SHRINK_TAG != MPIR_TAG_MASK_ERROR_BITS(tag & ~MPIR_Process.tagged_coll_mask)) {
MPIU_ERR_SETANDJUMP(mpi_errno,MPIX_ERR_REVOKED,"**revoked");
}
diff --git a/src/mpid/ch3/src/mpid_rsend.c b/src/mpid/ch3/src/mpid_rsend.c
index 92990e6..0defcfb 100644
--- a/src/mpid/ch3/src/mpid_rsend.c
+++ b/src/mpid/ch3/src/mpid_rsend.c
@@ -42,8 +42,8 @@ int MPID_Rsend(const void * buf, int count, MPI_Datatype datatype, int rank, int
/* Check to make sure the communicator hasn't already been revoked */
if (comm->revoked &&
- MPIR_AGREE_TAG != MPIR_TAG_MASK_ERROR_BIT(tag & ~MPIR_Process.tagged_coll_mask) &&
- MPIR_SHRINK_TAG != MPIR_TAG_MASK_ERROR_BIT(tag & ~MPIR_Process.tagged_coll_mask)) {
+ MPIR_AGREE_TAG != MPIR_TAG_MASK_ERROR_BITS(tag & ~MPIR_Process.tagged_coll_mask) &&
+ MPIR_SHRINK_TAG != MPIR_TAG_MASK_ERROR_BITS(tag & ~MPIR_Process.tagged_coll_mask)) {
MPIU_ERR_SETANDJUMP(mpi_errno,MPIX_ERR_REVOKED,"**revoked");
}
diff --git a/src/mpid/ch3/src/mpid_send.c b/src/mpid/ch3/src/mpid_send.c
index b008b68..52dad34 100644
--- a/src/mpid/ch3/src/mpid_send.c
+++ b/src/mpid/ch3/src/mpid_send.c
@@ -40,8 +40,8 @@ int MPID_Send(const void * buf, int count, MPI_Datatype datatype, int rank,
/* Check to make sure the communicator hasn't already been revoked */
if (comm->revoked &&
- MPIR_AGREE_TAG != MPIR_TAG_MASK_ERROR_BIT(tag & ~MPIR_Process.tagged_coll_mask) &&
- MPIR_SHRINK_TAG != MPIR_TAG_MASK_ERROR_BIT(tag & ~MPIR_Process.tagged_coll_mask)) {
+ MPIR_AGREE_TAG != MPIR_TAG_MASK_ERROR_BITS(tag & ~MPIR_Process.tagged_coll_mask) &&
+ MPIR_SHRINK_TAG != MPIR_TAG_MASK_ERROR_BITS(tag & ~MPIR_Process.tagged_coll_mask)) {
MPIU_ERR_SETANDJUMP(mpi_errno,MPIX_ERR_REVOKED,"**revoked");
}
diff --git a/src/mpid/ch3/src/mpid_ssend.c b/src/mpid/ch3/src/mpid_ssend.c
index 07c2087..7ee8883 100644
--- a/src/mpid/ch3/src/mpid_ssend.c
+++ b/src/mpid/ch3/src/mpid_ssend.c
@@ -39,8 +39,8 @@ int MPID_Ssend(const void * buf, int count, MPI_Datatype datatype, int rank, int
/* Check to make sure the communicator hasn't already been revoked */
if (comm->revoked &&
- MPIR_AGREE_TAG != MPIR_TAG_MASK_ERROR_BIT(tag & ~MPIR_Process.tagged_coll_mask) &&
- MPIR_SHRINK_TAG != MPIR_TAG_MASK_ERROR_BIT(tag & ~MPIR_Process.tagged_coll_mask)) {
+ MPIR_AGREE_TAG != MPIR_TAG_MASK_ERROR_BITS(tag & ~MPIR_Process.tagged_coll_mask) &&
+ MPIR_SHRINK_TAG != MPIR_TAG_MASK_ERROR_BITS(tag & ~MPIR_Process.tagged_coll_mask)) {
MPIU_ERR_SETANDJUMP(mpi_errno,MPIX_ERR_REVOKED,"**revoked");
}
-----------------------------------------------------------------------
Summary of changes:
maint/extracterrmsgs | 4 +-
src/include/mpiimpl.h | 207 +++++++++++---------
src/mpi/coll/allgather.c | 74 ++++----
src/mpi/coll/allgatherv.c | 80 ++++----
src/mpi/coll/allred_group.c | 34 ++--
src/mpi/coll/allreduce.c | 76 ++++----
src/mpi/coll/alltoall.c | 54 +++---
src/mpi/coll/alltoallv.c | 42 ++--
src/mpi/coll/alltoallw.c | 38 ++--
src/mpi/coll/barrier.c | 71 ++++----
src/mpi/coll/barrier_group.c | 6 +-
src/mpi/coll/bcast.c | 146 +++++++-------
src/mpi/coll/exscan.c | 12 +-
src/mpi/coll/gather.c | 74 ++++----
src/mpi/coll/gatherv.c | 22 +-
src/mpi/coll/helper_fns.c | 119 ++++++++---
src/mpi/coll/iscatter.c | 8 +-
src/mpi/coll/red_scat.c | 88 ++++----
src/mpi/coll/red_scat_block.c | 84 ++++----
src/mpi/coll/reduce.c | 110 +++++-----
src/mpi/coll/scan.c | 52 +++---
src/mpi/coll/scatter.c | 58 +++---
src/mpi/coll/scatterv.c | 18 +-
src/mpi/comm/comm_agree.c | 2 +-
src/mpi/comm/comm_create.c | 2 +-
src/mpi/comm/comm_shrink.c | 2 +-
src/mpi/comm/comm_split.c | 2 +-
src/mpi/comm/commutil.c | 6 +-
src/mpi/comm/intercomm_create.c | 2 +-
src/mpi/comm/intercomm_merge.c | 4 +-
src/mpi/init/initthread.c | 2 +-
src/mpi/topo/dist_gr_create.c | 2 +-
src/mpid/ch3/channels/nemesis/src/ch3_rma_shm.c | 2 +-
src/mpid/ch3/channels/nemesis/src/ch3_win_fns.c | 4 +-
src/mpid/ch3/channels/nemesis/src/ch3i_comm.c | 4 +-
src/mpid/ch3/src/ch3u_comm_spawn_multiple.c | 2 +-
src/mpid/ch3/src/ch3u_port.c | 12 +-
src/mpid/ch3/src/ch3u_recvq.c | 73 ++++----
src/mpid/ch3/src/ch3u_rma_sync.c | 2 +-
src/mpid/ch3/src/ch3u_win_fns.c | 2 +-
src/mpid/ch3/src/mpid_comm_agree.c | 4 +-
src/mpid/ch3/src/mpid_comm_get_all_failed_procs.c | 2 +-
src/mpid/ch3/src/mpid_iprobe.c | 4 +-
src/mpid/ch3/src/mpid_irecv.c | 4 +-
src/mpid/ch3/src/mpid_irsend.c | 4 +-
src/mpid/ch3/src/mpid_isend.c | 4 +-
src/mpid/ch3/src/mpid_issend.c | 4 +-
src/mpid/ch3/src/mpid_probe.c | 4 +-
src/mpid/ch3/src/mpid_recv.c | 6 +-
src/mpid/ch3/src/mpid_rsend.c | 4 +-
src/mpid/ch3/src/mpid_send.c | 5 +-
src/mpid/ch3/src/mpid_ssend.c | 4 +-
src/mpid/ch3/src/mpid_vc.c | 2 +-
src/mpid/ch3/src/mpidi_rma.c | 2 +-
src/mpid/pamid/src/dyntask/mpid_comm_disconnect.c | 2 +-
.../pamid/src/dyntask/mpid_comm_spawn_multiple.c | 2 +-
src/mpid/pamid/src/dyntask/mpidi_pg.c | 2 +-
src/mpid/pamid/src/dyntask/mpidi_port.c | 12 +-
.../pamid/src/onesided/mpid_win_allocate_shared.c | 6 +-
src/mpid/pamid/src/onesided/mpid_win_free.c | 2 +-
test/mpi/ft/testlist | 12 +-
61 files changed, 884 insertions(+), 809 deletions(-)
hooks/post-receive
--
MPICH primary repository
1
0
[mpich] MPICH primary repository branch, master, updated. v3.1.3-177-g316ac29
by noreply@mpich.org 12 Nov '14
by noreply@mpich.org 12 Nov '14
12 Nov '14
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "MPICH primary repository".
The branch, master has been updated
via 316ac29bcb48562f7308f886bd4eaa8f6e4bcbb7 (commit)
via 9d7d493ba888625c5eb8456ae3f788f938b690a3 (commit)
from b56f4f1da1e455220b90030772eeab7f0e72d5c9 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.mpich.org/mpich.git/commitdiff/316ac29bcb48562f7308f886bd4eaa8f6…
commit 316ac29bcb48562f7308f886bd4eaa8f6e4bcbb7
Author: Antonio Pena Monferrer <apenya(a)mcs.anl.gov>
Date: Sat Nov 8 12:27:17 2014 -0600
Added large message cases to getfence1/putfence1
These are meant to hit the >1GB message size and hence test the large
message case in Portals4.
Signed-off-by: Wesley Bland <wbland(a)anl.gov>
diff --git a/test/mpi/rma/getfence1.c b/test/mpi/rma/getfence1.c
index 869b143..80034df 100644
--- a/test/mpi/rma/getfence1.c
+++ b/test/mpi/rma/getfence1.c
@@ -6,20 +6,89 @@
*/
#include "mpi.h"
#include <stdio.h>
+#include <string.h>
+#include <limits.h>
#include "mpitest.h"
+#define LARGE_CNT_CONTIG 550000000
+#define LARGE_CNT_NONCONTIG 150000000
+
/*
static char MTEST_Descrip[] = "Get with Fence";
*/
-int main( int argc, char *argv[] )
+static inline int test(MPI_Comm comm, int rank, int source, int dest,
+ MTestDatatype *sendtype, MTestDatatype *recvtype)
{
int errs = 0, err;
+ int disp_unit;
+ MPI_Aint extent;
+ MPI_Win win;
+
+ MTestPrintfMsg( 1,
+ "Getting count = %ld of sendtype %s - count = %ld receive type %s\n",
+ sendtype->count, MTestGetDatatypeName( sendtype ), recvtype->count,
+ MTestGetDatatypeName( recvtype ) );
+ /* Make sure that everyone has a recv buffer */
+ recvtype->InitBuf( recvtype );
+ sendtype->InitBuf( sendtype );
+ /* By default, print information about errors */
+ recvtype->printErrors = 1;
+ sendtype->printErrors = 1;
+
+ MPI_Type_extent( sendtype->datatype, &extent );
+ disp_unit = extent < INT_MAX ? extent : 1;
+ MPI_Win_create( sendtype->buf, sendtype->count * extent,
+ disp_unit, MPI_INFO_NULL, comm, &win );
+ MPI_Win_fence( 0, win );
+ if (rank == source) {
+ /* The source does not need to do anything besides the
+ fence */
+ MPI_Win_fence( 0, win );
+ }
+ else if (rank == dest) {
+ /* To improve reporting of problems about operations, we
+ change the error handler to errors return */
+ MPI_Win_set_errhandler( win, MPI_ERRORS_RETURN );
+
+ /* This should have the same effect, in terms of
+ transfering data, as a send/recv pair */
+ err = MPI_Get( recvtype->buf, recvtype->count,
+ recvtype->datatype, source, 0,
+ sendtype->count, sendtype->datatype, win );
+ if (err) {
+ errs++;
+ if (errs < 10) {
+ MTestPrintError( err );
+ }
+ }
+ err = MPI_Win_fence( 0, win );
+ if (err) {
+ errs++;
+ if (errs < 10) {
+ MTestPrintError( err );
+ }
+ }
+ err = MTestCheckRecv( 0, recvtype );
+ if (err) {
+ errs += err;
+ }
+ }
+ else {
+ MPI_Win_fence( 0, win );
+ }
+ MPI_Win_free( &win );
+
+ return errs;
+}
+
+
+int main( int argc, char *argv[] )
+{
+ int errs = 0;
int rank, size, source, dest;
int minsize = 2, count;
MPI_Comm comm;
- MPI_Win win;
- MPI_Aint extent;
MTestDatatype sendtype, recvtype;
MTest_Init( &argc, &argv );
@@ -38,61 +107,34 @@ int main( int argc, char *argv[] )
MTEST_DATATYPE_FOR_EACH_COUNT(count) {
while (MTestGetDatatypes( &sendtype, &recvtype, count )) {
- /* Make sure that everyone has a recv buffer */
- recvtype.InitBuf( &recvtype );
- sendtype.InitBuf( &sendtype );
- /* By default, print information about errors */
- recvtype.printErrors = 1;
- sendtype.printErrors = 1;
-
- MPI_Type_extent( sendtype.datatype, &extent );
- MPI_Win_create( sendtype.buf, sendtype.count * extent,
- (int)extent, MPI_INFO_NULL, comm, &win );
- MPI_Win_fence( 0, win );
- if (rank == source) {
- /* The source does not need to do anything besides the
- fence */
- MPI_Win_fence( 0, win );
- }
- else if (rank == dest) {
- /* To improve reporting of problems about operations, we
- change the error handler to errors return */
- MPI_Win_set_errhandler( win, MPI_ERRORS_RETURN );
-
- /* This should have the same effect, in terms of
- transfering data, as a send/recv pair */
- err = MPI_Get( recvtype.buf, recvtype.count,
- recvtype.datatype, source, 0,
- sendtype.count, sendtype.datatype, win );
- if (err) {
- errs++;
- if (errs < 10) {
- MTestPrintError( err );
- }
- }
- err = MPI_Win_fence( 0, win );
- if (err) {
- errs++;
- if (errs < 10) {
- MTestPrintError( err );
- }
- }
- err = MTestCheckRecv( 0, &recvtype );
- if (err) {
- errs += err;
- }
- }
- else {
- MPI_Win_fence( 0, win );
- }
- MPI_Win_free( &win );
- MTestFreeDatatype( &recvtype );
- MTestFreeDatatype( &sendtype );
+ errs += test(comm, rank, source, dest, &sendtype, &recvtype);
+ MTestFreeDatatype(&sendtype);
+ MTestFreeDatatype(&recvtype);
}
}
MTestFreeComm(&comm);
}
+ /* Part #2: simple large size test - contiguous and noncontiguous */
+ if (sizeof(void *) > 4) { /* Only if > 32-bit architecture */
+ MPI_Comm_rank( MPI_COMM_WORLD, &rank );
+ MPI_Comm_size( MPI_COMM_WORLD, &size );
+ source = 0;
+ dest = size - 1;
+
+ MTestGetDatatypes(&sendtype, &recvtype, LARGE_CNT_CONTIG);
+ errs += test(MPI_COMM_WORLD, rank, source, dest, &sendtype, &recvtype);
+
+ do {
+ MTestFreeDatatype(&sendtype);
+ MTestFreeDatatype(&recvtype);
+ MTestGetDatatypes(&sendtype, &recvtype, LARGE_CNT_NONCONTIG);
+ } while (strstr(MTestGetDatatypeName(&sendtype), "vector") == NULL);
+ errs += test(MPI_COMM_WORLD, rank, source, dest, &sendtype, &recvtype);
+ MTestFreeDatatype(&sendtype);
+ MTestFreeDatatype(&recvtype);
+ }
+
MTest_Finalize( errs );
MPI_Finalize();
return 0;
diff --git a/test/mpi/rma/putfence1.c b/test/mpi/rma/putfence1.c
index 5c6bee4..de13720 100644
--- a/test/mpi/rma/putfence1.c
+++ b/test/mpi/rma/putfence1.c
@@ -6,24 +6,94 @@
*/
#include "mpi.h"
#include <stdio.h>
+#include <string.h>
#include "mpitest.h"
+/* These counts allow reasonable sizes for the large tests */
+#define LARGE_CNT_CONTIG 550000000
+#define LARGE_CNT_NONCONTIG 150000000
+
/*
static char MTEST_Descrip[] = "Put with Fence";
*/
-int main( int argc, char *argv[] )
+static inline int test(MPI_Comm comm, int rank, int source, int dest,
+ MTestDatatype *sendtype, MTestDatatype *recvtype)
{
int errs = 0, err;
+ MPI_Aint extent;
+ MPI_Win win;
+
+ MTestPrintfMsg( 1,
+ "Putting count = %ld of sendtype %s - count = %ld receive type %s\n",
+ sendtype->count, MTestGetDatatypeName( sendtype ), recvtype->count,
+ MTestGetDatatypeName( recvtype ) );
+
+ /* Make sure that everyone has a recv buffer */
+ recvtype->InitBuf( recvtype );
+ MPI_Type_extent( recvtype->datatype, &extent );
+ MPI_Win_create( recvtype->buf, recvtype->count * extent,
+ extent, MPI_INFO_NULL, comm, &win );
+ MPI_Win_fence( 0, win );
+ if (rank == source) {
+ /* To improve reporting of problems about operations, we
+ change the error handler to errors return */
+ MPI_Win_set_errhandler( win, MPI_ERRORS_RETURN );
+
+ sendtype->InitBuf( sendtype );
+
+ err = MPI_Put( sendtype->buf, sendtype->count,
+ sendtype->datatype, dest, 0,
+ recvtype->count, recvtype->datatype, win );
+ if (err) {
+ errs++;
+ if (errs < 10) {
+ MTestPrintError( err );
+ }
+ }
+ err = MPI_Win_fence( 0, win );
+ if (err) {
+ errs++;
+ if (errs < 10) {
+ MTestPrintError( err );
+ }
+ }
+ }
+ else if (rank == dest) {
+ MPI_Win_fence( 0, win );
+ /* This should have the same effect, in terms of
+ transfering data, as a send/recv pair */
+ err = MTestCheckRecv( 0, recvtype );
+ if (err) {
+ if (errs < 10) {
+ printf( "Data in target buffer did not match for destination datatype %s (put with source datatype %s)\n",
+ MTestGetDatatypeName( recvtype ),
+ MTestGetDatatypeName( sendtype ) );
+ /* Redo the test, with the errors printed */
+ recvtype->printErrors = 1;
+ (void)MTestCheckRecv( 0, recvtype );
+ }
+ errs += err;
+ }
+ }
+ else {
+ MPI_Win_fence( 0, win );
+ }
+ MPI_Win_free( &win );
+
+ return errs;
+}
+
+
+int main( int argc, char *argv[] )
+{
+ int errs = 0;
int rank, size, source, dest;
int minsize = 2, count;
MPI_Comm comm;
- MPI_Win win;
- MPI_Aint extent;
MTestDatatype sendtype, recvtype;
MTest_Init( &argc, &argv );
-
/* The following illustrates the use of the routines to
run through a selection of communicators and datatypes.
Use subsets of these for tests that do not involve combinations
@@ -38,71 +108,34 @@ int main( int argc, char *argv[] )
MTEST_DATATYPE_FOR_EACH_COUNT(count) {
while (MTestGetDatatypes( &sendtype, &recvtype, count )) {
-
- MTestPrintfMsg( 1,
- "Putting count = %d of sendtype %s receive type %s\n",
- count, MTestGetDatatypeName( &sendtype ),
- MTestGetDatatypeName( &recvtype ) );
-
- /* Make sure that everyone has a recv buffer */
- recvtype.InitBuf( &recvtype );
-
- MPI_Type_extent( recvtype.datatype, &extent );
- MPI_Win_create( recvtype.buf, recvtype.count * extent,
- extent, MPI_INFO_NULL, comm, &win );
- MPI_Win_fence( 0, win );
- if (rank == source) {
- /* To improve reporting of problems about operations, we
- change the error handler to errors return */
- MPI_Win_set_errhandler( win, MPI_ERRORS_RETURN );
-
- sendtype.InitBuf( &sendtype );
-
- err = MPI_Put( sendtype.buf, sendtype.count,
- sendtype.datatype, dest, 0,
- recvtype.count, recvtype.datatype, win );
- if (err) {
- errs++;
- if (errs < 10) {
- MTestPrintError( err );
- }
- }
- err = MPI_Win_fence( 0, win );
- if (err) {
- errs++;
- if (errs < 10) {
- MTestPrintError( err );
- }
- }
- }
- else if (rank == dest) {
- MPI_Win_fence( 0, win );
- /* This should have the same effect, in terms of
- transfering data, as a send/recv pair */
- err = MTestCheckRecv( 0, &recvtype );
- if (err) {
- if (errs < 10) {
- printf( "Data in target buffer did not match for destination datatype %s (put with source datatype %s)\n",
- MTestGetDatatypeName( &recvtype ),
- MTestGetDatatypeName( &sendtype ) );
- /* Redo the test, with the errors printed */
- recvtype.printErrors = 1;
- (void)MTestCheckRecv( 0, &recvtype );
- }
- errs += err;
- }
- }
- else {
- MPI_Win_fence( 0, win );
- }
- MPI_Win_free( &win );
- MTestFreeDatatype( &sendtype );
- MTestFreeDatatype( &recvtype );
+ errs += test(comm, rank, source, dest, &sendtype, &recvtype);
+ MTestFreeDatatype(&sendtype);
+ MTestFreeDatatype(&recvtype);
}
}
MTestFreeComm(&comm);
}
+ /* Part #2: simple large size test - contiguous and noncontiguous */
+ if (sizeof(void *) > 4) { /* Only if > 32-bit architecture */
+ MPI_Comm_rank( MPI_COMM_WORLD, &rank );
+ MPI_Comm_size( MPI_COMM_WORLD, &size );
+ source = 0;
+ dest = size - 1;
+
+ MTestGetDatatypes(&sendtype, &recvtype, LARGE_CNT_CONTIG);
+ errs += test(MPI_COMM_WORLD, rank, source, dest, &sendtype, &recvtype);
+
+ do {
+ MTestFreeDatatype(&sendtype);
+ MTestFreeDatatype(&recvtype);
+ MTestGetDatatypes(&sendtype, &recvtype, LARGE_CNT_NONCONTIG);
+ } while (strstr(MTestGetDatatypeName(&sendtype), "vector") == NULL);
+ errs += test(MPI_COMM_WORLD, rank, source, dest, &sendtype, &recvtype);
+ MTestFreeDatatype(&sendtype);
+ MTestFreeDatatype(&recvtype);
+ }
+
MTest_Finalize( errs );
MPI_Finalize();
return 0;
diff --git a/test/mpi/rma/testlist.in b/test/mpi/rma/testlist.in
index 9a6a7d5..f9bc0f2 100644
--- a/test/mpi/rma/testlist.in
+++ b/test/mpi/rma/testlist.in
@@ -2,7 +2,7 @@ winname 2
allocmem 2
putfence1 4
putfidx 4
-getfence1 4
+getfence1 4 timeLimit=400
accfence1 4
adlb_mimic1 3
accfence2 4
http://git.mpich.org/mpich.git/commitdiff/9d7d493ba888625c5eb8456ae3f788f93…
commit 9d7d493ba888625c5eb8456ae3f788f938b690a3
Author: Antonio Pena Monferrer <apenya(a)mcs.anl.gov>
Date: Sat Nov 8 12:26:03 2014 -0600
Added support for large-count datatype tests
Signed-off-by: Wesley Bland <wbland(a)anl.gov>
diff --git a/test/mpi/include/mpitest.h b/test/mpi/include/mpitest.h
index 0b46ef7..f20eb76 100644
--- a/test/mpi/include/mpitest.h
+++ b/test/mpi/include/mpitest.h
@@ -38,7 +38,7 @@ void MTestGetDbgInfo(int *dbgflag, int *verbose);
typedef struct _MTestDatatype {
MPI_Datatype datatype;
void *buf; /* buffer to use in communication */
- int count; /* count to use for this datatype */
+ MPI_Aint count; /* count to use for this datatype */
int isBasic; /* true if the type is predefined */
int printErrors; /* true if errors should be printed
(used by the CheckBuf routines) */
@@ -72,7 +72,7 @@ void MTestInitFullDatatypes();
void MTestInitMinDatatypes();
int MTestCheckRecv( MPI_Status *, MTestDatatype * );
-int MTestGetDatatypes( MTestDatatype *, MTestDatatype *, int );
+int MTestGetDatatypes( MTestDatatype *, MTestDatatype *, MPI_Aint );
void MTestResetDatatypes( void );
void MTestFreeDatatype( MTestDatatype * );
const char *MTestGetDatatypeName( MTestDatatype * );
diff --git a/test/mpi/util/mtest_datatype.c b/test/mpi/util/mtest_datatype.c
index 39a5f1e..39e3ceb 100644
--- a/test/mpi/util/mtest_datatype.c
+++ b/test/mpi/util/mtest_datatype.c
@@ -82,7 +82,7 @@ static void *MTestTypeContigInit(MTestDatatype * mtype)
if (mtype->count > 0) {
unsigned char *p;
- int i, totsize;
+ MPI_Aint i, totsize;
merr = MPI_Type_extent(mtype->datatype, &size);
if (merr)
MTestPrintError(merr);
@@ -116,8 +116,8 @@ static int MTestTypeContigCheckbuf(MTestDatatype * mtype)
{
unsigned char *p;
unsigned char expected;
- int i, totsize, err = 0, merr;
- MPI_Aint size;
+ int err = 0, merr;
+ MPI_Aint i, totsize, size;
p = (unsigned char *) mtype->buf;
if (p) {
@@ -130,7 +130,7 @@ static int MTestTypeContigCheckbuf(MTestDatatype * mtype)
if (p[i] != expected) {
err++;
if (mtype->printErrors && err < 10) {
- printf("Data expected = %x but got p[%d] = %x\n", expected, i, p[i]);
+ printf("Data expected = %x but got p[%ld] = %x\n", expected, i, p[i]);
fflush(stdout);
}
}
@@ -154,7 +154,8 @@ static void *MTestTypeVectorInit(MTestDatatype * mtype)
if (mtype->count > 0) {
unsigned char *p;
- int i, j, k, nc;
+ int j, k, nc;
+ MPI_Aint i;
merr = MPI_Type_extent(mtype->datatype, &size);
if (merr)
@@ -257,7 +258,8 @@ static void *MTestTypeIndexedInit(MTestDatatype * mtype)
if (mtype->count > 0) {
unsigned char *p;
- int i, j, k, b, nc;
+ int j, k, b, nc;
+ MPI_Aint i;
/* Allocate buffer */
merr = MPI_Type_extent(mtype->datatype, &size);
@@ -371,7 +373,8 @@ static void *MTestTypeIndexedBlockInit(MTestDatatype * mtype)
if (mtype->count > 0) {
unsigned char *p;
- int i, k, j, nc;
+ int k, j, nc;
+ MPI_Aint i;
/* Allocate the send/recv buffer */
merr = MPI_Type_extent(mtype->datatype, &size);
@@ -477,7 +480,8 @@ static void *MTestTypeSubarrayInit(MTestDatatype * mtype)
if (mtype->count > 0) {
unsigned char *p;
- int i, k, j, b, nc;
+ int k, j, b, nc;
+ MPI_Aint i;
/* Allocate the send/recv buffer */
merr = MPI_Type_extent(mtype->datatype, &size);
@@ -1240,7 +1244,7 @@ void *MTestTypeInitRecv(MTestDatatype * mtype)
if (mtype->count > 0) {
signed char *p;
- int i, totsize;
+ MPI_Aint i, totsize;
merr = MPI_Type_extent(mtype->datatype, &size);
if (merr)
MTestPrintError(merr);
diff --git a/test/mpi/util/mtest_datatype_gen.c b/test/mpi/util/mtest_datatype_gen.c
index 2cd1d2c..66279af 100644
--- a/test/mpi/util/mtest_datatype_gen.c
+++ b/test/mpi/util/mtest_datatype_gen.c
@@ -178,12 +178,12 @@ void MTestInitMinDatatypes()
/* Routine to define various sets of blocklen/count/stride for derived datatypes. */
/* ------------------------------------------------------------------------------ */
-static inline int MTestDdtStructDefine(int ddt_index, int tot_count, int *count,
- int *blen, int *stride, int *align_tot_count)
+static inline int MTestDdtStructDefine(int ddt_index, MPI_Aint tot_count, MPI_Aint *count,
+ MPI_Aint *blen, MPI_Aint *stride, MPI_Aint *align_tot_count)
{
int merr = 0;
int ddt_c_st;
- int _short = 0, _align_tot_count = 0, _count = 0, _blen = 0, _stride = 0;
+ MPI_Aint _short = 0, _align_tot_count = 0, _count = 0, _blen = 0, _stride = 0;
ddt_c_st = ddt_index % MTEST_DDT_NUM_SUBTESTS;
/* Get short value according to user specified tot_count.
@@ -244,7 +244,7 @@ static inline int MTestDdtStructDefine(int ddt_index, int tot_count, int *count,
/* ------------------------------------------------------------------------ */
static inline int MTestGetBasicDatatypes(MTestDatatype * sendtype,
- MTestDatatype * recvtype, int tot_count)
+ MTestDatatype * recvtype, MPI_Aint tot_count)
{
int merr = 0;
int bdt_index = datatype_index - MTEST_BDT_START_IDX;
@@ -303,11 +303,12 @@ static inline int MTestGetBasicDatatypes(MTestDatatype * sendtype,
/* ------------------------------------------------------------------------ */
static inline int MTestGetSendDerivedDatatypes(MTestDatatype * sendtype,
- MTestDatatype * recvtype, int tot_count)
+ MTestDatatype * recvtype, MPI_Aint tot_count)
{
int merr = 0;
int ddt_datatype_index, ddt_c_dt;
- int blen, stride, count, align_tot_count, tsize = 1;
+ MPI_Count tsize = 1;
+ MPI_Aint blen, stride, count, align_tot_count;;
MPI_Datatype old_type = MPI_DOUBLE;
/* Check index */
@@ -336,7 +337,7 @@ static inline int MTestGetSendDerivedDatatypes(MTestDatatype * sendtype,
return merr;
sendtype->count = 1;
- merr = MPI_Type_size(sendtype->datatype, &tsize);
+ merr = MPI_Type_size_x(sendtype->datatype, &tsize);
if (merr)
MTestPrintError(merr);
@@ -351,11 +352,12 @@ static inline int MTestGetSendDerivedDatatypes(MTestDatatype * sendtype,
}
static inline int MTestGetRecvDerivedDatatypes(MTestDatatype * sendtype,
- MTestDatatype * recvtype, int tot_count)
+ MTestDatatype * recvtype, MPI_Aint tot_count)
{
int merr = 0;
int ddt_datatype_index, ddt_c_dt;
- int blen, stride, count, align_tot_count, tsize;
+ MPI_Count tsize;
+ MPI_Aint blen, stride, count, align_tot_count;
MPI_Datatype old_type = MPI_DOUBLE;
/* Check index */
@@ -383,7 +385,7 @@ static inline int MTestGetRecvDerivedDatatypes(MTestDatatype * sendtype,
return merr;
recvtype->count = 1;
- merr = MPI_Type_size(recvtype->datatype, &tsize);
+ merr = MPI_Type_size_x(recvtype->datatype, &tsize);
if (merr)
MTestPrintError(merr);
@@ -400,7 +402,7 @@ static inline int MTestGetRecvDerivedDatatypes(MTestDatatype * sendtype,
/* ------------------------------------------------------------------------ */
/* Exposed routine to external tests */
/* ------------------------------------------------------------------------ */
-int MTestGetDatatypes(MTestDatatype * sendtype, MTestDatatype * recvtype, int tot_count)
+int MTestGetDatatypes(MTestDatatype * sendtype, MTestDatatype * recvtype, MPI_Aint tot_count)
{
int merr = 0;
@@ -448,11 +450,11 @@ int MTestGetDatatypes(MTestDatatype * sendtype, MTestDatatype * recvtype, int to
datatype_index++;
if (verbose >= 2 && datatype_index > 0) {
- int ssize, rsize;
+ MPI_Count ssize, rsize;
const char *sendtype_nm = MTestGetDatatypeName(sendtype);
const char *recvtype_nm = MTestGetDatatypeName(recvtype);
- MPI_Type_size(sendtype->datatype, &ssize);
- MPI_Type_size(recvtype->datatype, &rsize);
+ MPI_Type_size_x(sendtype->datatype, &ssize);
+ MPI_Type_size_x(recvtype->datatype, &rsize);
MTestPrintfMsg(2, "Get datatypes: send = %s(size %d count %d basesize %d), "
"recv = %s(size %d count %d basesize %d), tot_count=%d\n",
-----------------------------------------------------------------------
Summary of changes:
test/mpi/include/mpitest.h | 4 +-
test/mpi/rma/getfence1.c | 148 +++++++++++++++++++++------------
test/mpi/rma/putfence1.c | 161 ++++++++++++++++++++++--------------
test/mpi/rma/testlist.in | 2 +-
test/mpi/util/mtest_datatype.c | 22 +++--
test/mpi/util/mtest_datatype_gen.c | 30 ++++---
6 files changed, 224 insertions(+), 143 deletions(-)
hooks/post-receive
--
MPICH primary repository
1
0
[mpich] MPICH primary repository branch, master, updated. v3.1.3-175-gb56f4f1
by noreply@mpich.org 12 Nov '14
by noreply@mpich.org 12 Nov '14
12 Nov '14
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "MPICH primary repository".
The branch, master has been updated
via b56f4f1da1e455220b90030772eeab7f0e72d5c9 (commit)
from b0f5772ffa58838d894871191105859deb831fd0 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.mpich.org/mpich.git/commitdiff/b56f4f1da1e455220b90030772eeab7f0…
commit b56f4f1da1e455220b90030772eeab7f0e72d5c9
Author: Ken Raffenetti <raffenet(a)mcs.anl.gov>
Date: Mon Nov 10 15:50:56 2014 -0600
portals4: implement cancel send
All MPI_Sends in the Portals4 netmod will cause some or all of the data to be
sent eagerly to the receiver. Canceling a send means having to find the data in
the unexpected message queue and removing it in order to preserve matching.
Because the message queues exist at the netmod level, it needs its own cancel
protocol.
The protocol is modeled on a similar case in CH3, but with its own method
for searching the unexpected queue. Custom netmod packet handlers are used to
receive and process the control messages.
Known Issue:
Because we are using different PTs for the send and cancel message, it is
possible the cancel request could arrive before the message being canceled.
Signed-off-by: Antonio Pena Monferrer <apenya(a)mcs.anl.gov>
diff --git a/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_impl.h b/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_impl.h
index f5c204d..f94fa9a 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_impl.h
+++ b/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_impl.h
@@ -200,6 +200,36 @@ int MPID_nem_ptl_lmt_handle_cookie(MPIDI_VC_t *vc, MPID_Request *req, MPID_IOV s
int MPID_nem_ptl_lmt_done_send(MPIDI_VC_t *vc, MPID_Request *req);
int MPID_nem_ptl_lmt_done_recv(MPIDI_VC_t *vc, MPID_Request *req);
+/* packet handlers */
+
+int MPID_nem_ptl_pkt_cancel_send_req_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
+ MPIDI_msg_sz_t *buflen, MPID_Request **rreqp);
+int MPID_nem_ptl_pkt_cancel_send_resp_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
+ MPIDI_msg_sz_t *buflen, MPID_Request **rreqp);
+
+/* local packet types */
+
+typedef enum MPIDI_nem_ptl_pkt_type {
+ MPIDI_NEM_PTL_PKT_CANCEL_SEND_REQ,
+ MPIDI_NEM_PTL_PKT_CANCEL_SEND_RESP,
+ MPIDI_NEM_TCP_PKT_INVALID = -1 /* force signed, to avoid warnings */
+} MPIDI_nem_ptl_pkt_type_t;
+
+typedef struct MPIDI_nem_ptl_pkt_cancel_send_req
+{
+ MPIDI_CH3_Pkt_type_t type;
+ unsigned subtype;
+ MPIDI_Message_match match;
+ MPI_Request sender_req_id;
+} MPIDI_nem_ptl_pkt_cancel_send_req_t;
+
+typedef struct MPIDI_nem_ptl_pkt_cancel_send_resp
+{
+ MPIDI_CH3_Pkt_type_t type;
+ unsigned subtype;
+ MPI_Request sender_req_id;
+ int ack;
+} MPIDI_nem_ptl_pkt_cancel_send_resp_t;
/* debugging */
const char *MPID_nem_ptl_strerror(int ret);
diff --git a/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_init.c b/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_init.c
index 2803cae..96ada05 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_init.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_init.c
@@ -76,6 +76,7 @@ static MPIDI_Comm_ops_t comm_ops = {
MPID_nem_ptl_improbe /* improbe */
};
+static MPIDI_CH3_PktHandler_Fcn *MPID_nem_ptl_pkt_handlers[2]; /* for CANCEL_SEND_REQ and CANCEL_SEND_RESP */
#undef FUNCNAME
#define FUNCNAME get_target_info
@@ -412,6 +413,13 @@ static int vc_init(MPIDI_VC_t *vc)
vc_ch->iStartContigMsg = MPID_nem_ptl_iStartContigMsg;
vc_ch->iSendContig = MPID_nem_ptl_iSendContig;
+ vc_ch->num_pkt_handlers = 2;
+ vc_ch->pkt_handler = MPID_nem_ptl_pkt_handlers;
+ MPID_nem_ptl_pkt_handlers[MPIDI_NEM_PTL_PKT_CANCEL_SEND_REQ] =
+ MPID_nem_ptl_pkt_cancel_send_req_handler;
+ MPID_nem_ptl_pkt_handlers[MPIDI_NEM_PTL_PKT_CANCEL_SEND_RESP] =
+ MPID_nem_ptl_pkt_cancel_send_resp_handler;
+
vc_ch->lmt_initiate_lmt = MPID_nem_ptl_lmt_initiate_lmt;
vc_ch->lmt_start_recv = MPID_nem_ptl_lmt_start_recv;
vc_ch->lmt_start_send = MPID_nem_ptl_lmt_start_send;
diff --git a/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_probe.c b/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_probe.c
index 9a583e5..3de3b1f 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_probe.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_probe.c
@@ -292,3 +292,116 @@ int MPID_nem_ptl_anysource_improbe(int tag, MPID_Comm * comm, int context_offset
goto fn_exit;
}
+#undef FUNCNAME
+#define FUNCNAME MPID_nem_ptl_pkt_cancel_send_req_handler
+#undef FCNAME
+#define FCNAME MPIU_QUOTE(FUNCNAME)
+int MPID_nem_ptl_pkt_cancel_send_req_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
+ MPIDI_msg_sz_t *buflen, MPID_Request **rreqp)
+{
+ int ret, mpi_errno = MPI_SUCCESS;
+ MPIDI_nem_ptl_pkt_cancel_send_req_t *req_pkt = (MPIDI_nem_ptl_pkt_cancel_send_req_t *)pkt;
+ MPID_PKT_DECL_CAST(upkt, MPIDI_nem_ptl_pkt_cancel_send_resp_t, resp_pkt);
+ MPID_Request *search_req, *resp_req;
+ ptl_me_t me;
+ MPID_nem_ptl_vc_area *const vc_ptl = VC_PTL(vc);
+
+ MPIU_DBG_MSG_FMT(CH3_OTHER,VERBOSE,(MPIU_DBG_FDEST,
+ "received cancel send req pkt, sreq=0x%08x, rank=%d, tag=%d, context=%d",
+ req_pkt->sender_req_id, req_pkt->match.parts.rank,
+ req_pkt->match.parts.tag, req_pkt->match.parts.context_id));
+
+ /* create a dummy request and search for the message */
+ /* create a request */
+ search_req = MPID_Request_create();
+ MPID_nem_ptl_init_req(search_req);
+ MPIU_ERR_CHKANDJUMP1(!search_req, mpi_errno, MPI_ERR_OTHER, "**nomem", "**nomem %s", "MPID_Request_create");
+ MPIU_Object_set_ref(search_req, 2); /* 1 ref for progress engine and 1 ref for us */
+ search_req->kind = MPID_REQUEST_MPROBE;
+
+ /* create a dummy ME to use for searching the list */
+ me.start = NULL;
+ me.length = 0;
+ me.ct_handle = PTL_CT_NONE;
+ me.uid = PTL_UID_ANY;
+ me.options = ( PTL_ME_OP_PUT | PTL_ME_USE_ONCE );
+ me.min_free = 0;
+ me.match_bits = NPTL_MATCH(req_pkt->match.parts.tag, req_pkt->match.parts.context_id, req_pkt->match.parts.rank);
+
+ me.match_id = vc_ptl->id;
+ me.ignore_bits = NPTL_MATCH_IGNORE;
+
+ /* FIXME: this should use a custom handler that throws the data away inline */
+ REQ_PTL(search_req)->event_handler = handle_mprobe;
+
+ /* submit a search request */
+ ret = PtlMESearch(MPIDI_nem_ptl_ni, MPIDI_nem_ptl_pt, &me, PTL_SEARCH_DELETE, search_req);
+ MPIU_ERR_CHKANDJUMP1(ret, mpi_errno, MPI_ERR_OTHER, "**ptlmesearch", "**ptlmesearch %s", MPID_nem_ptl_strerror(ret));
+ DBG_MSG_MESearch("REG", vc ? vc->pg_rank : 0, me, search_req);
+
+ /* wait for search request to complete */
+ do {
+ mpi_errno = MPID_nem_ptl_poll(FALSE);
+ if (mpi_errno) MPIU_ERR_POP(mpi_errno);
+ } while (!MPID_Request_is_complete(search_req));
+
+ /* send response */
+ resp_pkt->type = MPIDI_NEM_PKT_NETMOD;
+ resp_pkt->subtype = MPIDI_NEM_PTL_PKT_CANCEL_SEND_RESP;
+ resp_pkt->ack = REQ_PTL(search_req)->found;
+ resp_pkt->sender_req_id = req_pkt->sender_req_id;
+
+ MPID_nem_ptl_iStartContigMsg(vc, resp_pkt, sizeof(*resp_pkt), NULL,
+ 0, &resp_req);
+
+ /* if the message was found, free the temporary buffer used to copy the data */
+ if (REQ_PTL(search_req)->found)
+ MPIU_Free(search_req->dev.tmpbuf);
+
+ MPID_Request_release(search_req);
+ if (resp_req != NULL)
+ MPID_Request_release(resp_req);
+
+ fn_exit:
+ return mpi_errno;
+ fn_fail:
+ goto fn_exit;
+}
+
+#undef FUNCNAME
+#define FUNCNAME MPID_nem_ptl_pkt_cancel_send_resp_handler
+#undef FCNAME
+#define FCNAME MPIU_QUOTE(FUNCNAME)
+int MPID_nem_ptl_pkt_cancel_send_resp_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
+ MPIDI_msg_sz_t *buflen, MPID_Request **rreqp)
+{
+ int mpi_errno = MPI_SUCCESS;
+ MPID_Request *sreq;
+ MPIDI_nem_ptl_pkt_cancel_send_resp_t *resp_pkt = (MPIDI_nem_ptl_pkt_cancel_send_resp_t *)pkt;
+ int i, ret;
+
+ MPID_Request_get_ptr(resp_pkt->sender_req_id, sreq);
+
+ if (resp_pkt->ack) {
+ MPIR_STATUS_SET_CANCEL_BIT(sreq->status, TRUE);
+
+ /* remove any remaining get MEs */
+ for (i = 0; i < REQ_PTL(sreq)->num_gets; i++) {
+ ret = PtlMEUnlink(REQ_PTL(sreq)->get_me_p[i]);
+ MPIU_ERR_CHKANDJUMP1(ret, mpi_errno, MPI_ERR_OTHER, "**ptlmeunlink", "**ptlmeunlink %s", MPID_nem_ptl_strerror(ret));
+ }
+ MPIU_DBG_MSG(CH3_OTHER,TYPICAL,"message cancelled");
+ } else {
+ MPIR_STATUS_SET_CANCEL_BIT(sreq->status, FALSE);
+ MPIU_DBG_MSG(CH3_OTHER,TYPICAL,"unable to cancel message");
+ }
+
+ MPIDI_CH3U_Request_complete(sreq);
+
+ *rreqp = NULL;
+
+ fn_exit:
+ return mpi_errno;
+ fn_fail:
+ goto fn_exit;
+}
diff --git a/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_recv.c b/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_recv.c
index 0ef1335..0440972 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_recv.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_recv.c
@@ -87,7 +87,7 @@ static int handler_recv_dequeue_complete(const ptl_event_t *e)
MPIDI_STATE_DECL(MPID_STATE_HANDLER_RECV_DEQUEUE_COMPLETE);
MPIDI_FUNC_ENTER(MPID_STATE_HANDLER_RECV_DEQUEUE_COMPLETE);
-
+
MPIU_Assert(e->type == PTL_EVENT_PUT || e->type == PTL_EVENT_PUT_OVERFLOW);
dequeue_req(e);
diff --git a/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_send.c b/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_send.c
index e6bbc66..a6f7d4b 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_send.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_send.c
@@ -248,15 +248,17 @@ static int send_msg(ptl_hdr_data_t ssend_flag, struct MPIDI_VC *vc, const void *
MPID_nem_ptl_request_create_sreq(sreq, mpi_errno, comm);
sreq->dev.match.parts.rank = dest;
+ sreq->dev.match.parts.tag = tag;
+ sreq->dev.match.parts.context_id = comm->context_id + context_offset;
if (!vc_ptl->id_initialized) {
mpi_errno = MPID_nem_ptl_init_id(vc);
if (mpi_errno) MPIU_ERR_POP(mpi_errno);
}
-
+
MPIDI_Datatype_get_info(count, datatype, dt_contig, data_sz, dt_ptr, dt_true_lb);
MPIU_DBG_MSG_FMT(CH3_CHANNEL, VERBOSE, (MPIU_DBG_FDEST, "count=%d datatype=%#x contig=%d data_sz=%lu", count, datatype, dt_contig, data_sz));
-
+
if (data_sz <= PTL_LARGE_THRESHOLD) {
/* Small message. Send all data eagerly */
if (dt_contig) {
@@ -492,12 +494,37 @@ int MPID_nem_ptl_issend(struct MPIDI_VC *vc, const void *buf, int count, MPI_Dat
int MPID_nem_ptl_cancel_send(struct MPIDI_VC *vc, struct MPID_Request *sreq)
{
int mpi_errno = MPI_SUCCESS;
+ MPID_PKT_DECL_CAST(upkt, MPIDI_nem_ptl_pkt_cancel_send_req_t, csr_pkt);
+ MPID_Request *csr_sreq;
+ int was_incomplete;
+
MPIDI_STATE_DECL(MPID_STATE_MPID_NEM_PTL_CANCEL_SEND);
MPIDI_FUNC_ENTER(MPID_STATE_MPID_NEM_PTL_CANCEL_SEND);
- /* portals4 has no way of cancelling a send */
- MPIU_ERR_SETFATAL(mpi_errno, MPI_ERR_OTHER, "**notimpl");
+ /* The completion counter and reference count are incremented to keep
+ the request around long enough to receive a
+ response regardless of what the user does (free the request before
+ waiting, etc.). */
+ MPIDI_CH3U_Request_increment_cc(sreq, &was_incomplete);
+ if (!was_incomplete) {
+ /* The reference count is incremented only if the request was
+ complete before the increment. */
+ MPIR_Request_add_ref(sreq);
+ }
+
+ csr_pkt->type = MPIDI_NEM_PKT_NETMOD;
+ csr_pkt->subtype = MPIDI_NEM_PTL_PKT_CANCEL_SEND_REQ;
+ csr_pkt->match.parts.rank = sreq->dev.match.parts.rank;
+ csr_pkt->match.parts.tag = sreq->dev.match.parts.tag;
+ csr_pkt->match.parts.context_id = sreq->dev.match.parts.context_id;
+ csr_pkt->sender_req_id = sreq->handle;
+
+ MPID_nem_ptl_iStartContigMsg(vc, csr_pkt, sizeof(*csr_pkt), NULL,
+ 0, &csr_sreq);
+
+ if (csr_sreq != NULL)
+ MPID_Request_release(csr_sreq);
fn_exit:
MPIDI_FUNC_EXIT(MPID_STATE_MPID_NEM_PTL_CANCEL_SEND);
-----------------------------------------------------------------------
Summary of changes:
.../channels/nemesis/netmod/portals4/ptl_impl.h | 30 +++++
.../channels/nemesis/netmod/portals4/ptl_init.c | 8 ++
.../channels/nemesis/netmod/portals4/ptl_probe.c | 113 ++++++++++++++++++++
.../channels/nemesis/netmod/portals4/ptl_recv.c | 2 +-
.../channels/nemesis/netmod/portals4/ptl_send.c | 35 ++++++-
5 files changed, 183 insertions(+), 5 deletions(-)
hooks/post-receive
--
MPICH primary repository
1
0
[mpich] MPICH primary repository branch, master, updated. v3.1.3-174-gb0f5772
by noreply@mpich.org 11 Nov '14
by noreply@mpich.org 11 Nov '14
11 Nov '14
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "MPICH primary repository".
The branch, master has been updated
via b0f5772ffa58838d894871191105859deb831fd0 (commit)
from eedd51e04717c49e36d378027e12075ad405789f (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.mpich.org/mpich.git/commitdiff/b0f5772ffa58838d894871191105859de…
commit b0f5772ffa58838d894871191105859deb831fd0
Author: Min Si <msi(a)il.is.s.u-tokyo.ac.jp>
Date: Mon Nov 10 15:25:12 2014 -0600
Revert RMA ADI change for req-based RMA operations.
We should never change the ADI which is exposed to MPI layer for CH3
internal implementation. However, commit 3e005f0 changed the ADI of
put/get/accumulate/get_accumulate for reusing the routine of normal RMA
operations in request-based operations.
This patch defines new CH3 internal functions of
put/get/accumulate/get_accumulate to be reused by both normal and
request-based operations and reverts the ADI change in commit 3e005f0.
Signed-off-by: Xin Zhao <xinzhao3(a)illinois.edu>
Signed-off-by: Junchao Zhang <jczhang(a)mcs.anl.gov>
diff --git a/src/include/mpiimpl.h b/src/include/mpiimpl.h
index 003bc07..97e785f 100644
--- a/src/include/mpiimpl.h
+++ b/src/include/mpiimpl.h
@@ -1616,11 +1616,11 @@ typedef struct MPID_RMA_Ops {
int (*Win_free)(struct MPID_Win **);
int (*Put) (const void *, int, MPI_Datatype, int, MPI_Aint, int,
- MPI_Datatype, struct MPID_Win *, MPID_Request *);
+ MPI_Datatype, struct MPID_Win *);
int (*Get) (void *, int, MPI_Datatype, int, MPI_Aint, int, MPI_Datatype,
- struct MPID_Win *, MPID_Request *);
+ struct MPID_Win *);
int (*Accumulate) (const void *, int, MPI_Datatype, int, MPI_Aint, int,
- MPI_Datatype, MPI_Op, struct MPID_Win *, MPID_Request *);
+ MPI_Datatype, MPI_Op, struct MPID_Win *);
int (*Win_fence)(int, struct MPID_Win *);
int (*Win_post)(MPID_Group *, int, struct MPID_Win *);
@@ -1651,7 +1651,7 @@ typedef struct MPID_RMA_Ops {
int (*Get_accumulate)(const void *, int , MPI_Datatype, void *, int,
MPI_Datatype, int, MPI_Aint, int, MPI_Datatype, MPI_Op,
- struct MPID_Win *, MPID_Request *);
+ struct MPID_Win *);
int (*Fetch_and_op)(const void *, void *, MPI_Datatype, int, MPI_Aint, MPI_Op,
struct MPID_Win *);
int (*Compare_and_swap)(const void *, const void *, void *, MPI_Datatype, int,
diff --git a/src/mpi/rma/accumulate.c b/src/mpi/rma/accumulate.c
index f79e945..93ff2f9 100644
--- a/src/mpi/rma/accumulate.c
+++ b/src/mpi/rma/accumulate.c
@@ -148,7 +148,7 @@ int MPI_Accumulate(const void *origin_addr, int origin_count, MPI_Datatype
mpi_errno = MPIU_RMA_CALL(win_ptr,Accumulate(origin_addr, origin_count,
origin_datatype,
target_rank, target_disp, target_count,
- target_datatype, op, win_ptr, NULL));
+ target_datatype, op, win_ptr));
if (mpi_errno != MPI_SUCCESS) goto fn_fail;
/* ... end of body of routine ... */
diff --git a/src/mpi/rma/get.c b/src/mpi/rma/get.c
index 51c7226..e8ba531 100644
--- a/src/mpi/rma/get.c
+++ b/src/mpi/rma/get.c
@@ -142,7 +142,7 @@ int MPI_Get(void *origin_addr, int origin_count, MPI_Datatype
mpi_errno = MPIU_RMA_CALL(win_ptr,
Get(origin_addr, origin_count, origin_datatype,
target_rank, target_disp, target_count,
- target_datatype, win_ptr, NULL));
+ target_datatype, win_ptr));
if (mpi_errno != MPI_SUCCESS) goto fn_fail;
/* ... end of body of routine ... */
diff --git a/src/mpi/rma/get_accumulate.c b/src/mpi/rma/get_accumulate.c
index 2898d8d..8f58b20 100644
--- a/src/mpi/rma/get_accumulate.c
+++ b/src/mpi/rma/get_accumulate.c
@@ -198,7 +198,7 @@ int MPI_Get_accumulate(const void *origin_addr, int origin_count,
result_addr, result_count,
result_datatype,
target_rank, target_disp, target_count,
- target_datatype, op, win_ptr, NULL));
+ target_datatype, op, win_ptr));
if (mpi_errno != MPI_SUCCESS) goto fn_fail;
/* ... end of body of routine ... */
diff --git a/src/mpi/rma/put.c b/src/mpi/rma/put.c
index a8cbb2f..1d4dc75 100644
--- a/src/mpi/rma/put.c
+++ b/src/mpi/rma/put.c
@@ -142,7 +142,7 @@ int MPI_Put(const void *origin_addr, int origin_count, MPI_Datatype
mpi_errno = MPIU_RMA_CALL(win_ptr,
Put(origin_addr, origin_count, origin_datatype,
target_rank, target_disp, target_count,
- target_datatype, win_ptr, NULL));
+ target_datatype, win_ptr));
if (mpi_errno != MPI_SUCCESS) goto fn_fail;
/* ... end of body of routine ... */
diff --git a/src/mpid/ch3/include/mpidimpl.h b/src/mpid/ch3/include/mpidimpl.h
index c1b229a..b5f47ed 100644
--- a/src/mpid/ch3/include/mpidimpl.h
+++ b/src/mpid/ch3/include/mpidimpl.h
@@ -1154,11 +1154,11 @@ int MPIDI_Win_create(void *, MPI_Aint, int, MPID_Info *, MPID_Comm *,
int MPIDI_Win_free(MPID_Win **);
int MPIDI_Put(const void *, int, MPI_Datatype, int, MPI_Aint, int,
- MPI_Datatype, MPID_Win *, MPID_Request * ureq);
+ MPI_Datatype, MPID_Win *);
int MPIDI_Get(void *, int, MPI_Datatype, int, MPI_Aint, int,
- MPI_Datatype, MPID_Win *, MPID_Request * ureq);
+ MPI_Datatype, MPID_Win *);
int MPIDI_Accumulate(const void *, int, MPI_Datatype, int, MPI_Aint, int,
- MPI_Datatype, MPI_Op, MPID_Win *, MPID_Request * ureq);
+ MPI_Datatype, MPI_Op, MPID_Win *);
int MPIDI_Win_fence(int, MPID_Win *);
int MPIDI_Win_post(MPID_Group *group_ptr, int assert, MPID_Win *win_ptr);
@@ -1187,8 +1187,7 @@ int MPIDI_Win_get_info(MPID_Win *win, MPID_Info **info_used);
int MPIDI_Get_accumulate(const void *origin_addr, int origin_count,
MPI_Datatype origin_datatype, void *result_addr, int result_count,
MPI_Datatype result_datatype, int target_rank, MPI_Aint target_disp,
- int target_count, MPI_Datatype target_datatype, MPI_Op op, MPID_Win *win,
- MPID_Request * ureq);
+ int target_count, MPI_Datatype target_datatype, MPI_Op op, MPID_Win *win);
int MPIDI_Fetch_and_op(const void *origin_addr, void *result_addr,
MPI_Datatype datatype, int target_rank, MPI_Aint target_disp,
MPI_Op op, MPID_Win *win);
@@ -1235,6 +1234,27 @@ int MPIDI_CH3I_Try_acquire_win_lock(MPID_Win * win_ptr, int requested_lock);
int MPIDI_CH3I_Progress_finalize(void);
+
+/* Internal RMA operation routines.
+ * Called by normal RMA operations and request-based RMA operations . */
+int MPIDI_CH3I_Put(const void *origin_addr, int origin_count, MPI_Datatype
+ origin_datatype, int target_rank, MPI_Aint target_disp,
+ int target_count, MPI_Datatype target_datatype, MPID_Win * win_ptr,
+ MPID_Request * ureq);
+int MPIDI_CH3I_Get(void *origin_addr, int origin_count, MPI_Datatype
+ origin_datatype, int target_rank, MPI_Aint target_disp,
+ int target_count, MPI_Datatype target_datatype, MPID_Win * win_ptr,
+ MPID_Request * ureq);
+int MPIDI_CH3I_Accumulate(const void *origin_addr, int origin_count, MPI_Datatype
+ origin_datatype, int target_rank, MPI_Aint target_disp,
+ int target_count, MPI_Datatype target_datatype, MPI_Op op,
+ MPID_Win * win_ptr, MPID_Request * ureq);
+int MPIDI_CH3I_Get_accumulate(const void *origin_addr, int origin_count,
+ MPI_Datatype origin_datatype, void *result_addr, int result_count,
+ MPI_Datatype result_datatype, int target_rank, MPI_Aint target_disp,
+ int target_count, MPI_Datatype target_datatype, MPI_Op op,
+ MPID_Win * win_ptr, MPID_Request * ureq);
+
/*@
MPIDI_CH3_Progress_signal_completion - Inform the progress engine that a
pending request has completed.
diff --git a/src/mpid/ch3/src/ch3u_rma_ops.c b/src/mpid/ch3/src/ch3u_rma_ops.c
index b15d668..4a6db9f 100644
--- a/src/mpid/ch3/src/ch3u_rma_ops.c
+++ b/src/mpid/ch3/src/ch3u_rma_ops.c
@@ -36,13 +36,13 @@ cvars:
*/
#undef FUNCNAME
-#define FUNCNAME MPIDI_Put
+#define FUNCNAME MPIDI_CH3I_Put
#undef FCNAME
#define FCNAME MPIDI_QUOTE(FUNCNAME)
-int MPIDI_Put(const void *origin_addr, int origin_count, MPI_Datatype
- origin_datatype, int target_rank, MPI_Aint target_disp,
- int target_count, MPI_Datatype target_datatype, MPID_Win * win_ptr,
- MPID_Request * ureq)
+int MPIDI_CH3I_Put(const void *origin_addr, int origin_count, MPI_Datatype
+ origin_datatype, int target_rank, MPI_Aint target_disp,
+ int target_count, MPI_Datatype target_datatype, MPID_Win * win_ptr,
+ MPID_Request * ureq)
{
int mpi_errno = MPI_SUCCESS;
int dt_contig ATTRIBUTE((unused)), rank;
@@ -51,9 +51,9 @@ int MPIDI_Put(const void *origin_addr, int origin_count, MPI_Datatype
MPIDI_msg_sz_t data_sz;
MPIDI_VC_t *orig_vc = NULL, *target_vc = NULL;
int made_progress = 0;
- MPIDI_STATE_DECL(MPID_STATE_MPIDI_PUT);
+ MPIDI_STATE_DECL(MPID_STATE_MPIDI_CH3I_PUT);
- MPIDI_RMA_FUNC_ENTER(MPID_STATE_MPIDI_PUT);
+ MPIDI_RMA_FUNC_ENTER(MPID_STATE_MPIDI_CH3I_PUT);
MPIU_ERR_CHKANDJUMP(win_ptr->states.access_state == MPIDI_RMA_NONE,
mpi_errno, MPI_ERR_RMA_SYNC, "**rmasync");
@@ -210,7 +210,7 @@ int MPIDI_Put(const void *origin_addr, int origin_count, MPI_Datatype
}
fn_exit:
- MPIDI_RMA_FUNC_EXIT(MPID_STATE_MPIDI_PUT);
+ MPIDI_RMA_FUNC_EXIT(MPID_STATE_MPIDI_CH3I_PUT);
return mpi_errno;
/* --BEGIN ERROR HANDLING-- */
@@ -219,16 +219,14 @@ int MPIDI_Put(const void *origin_addr, int origin_count, MPI_Datatype
/* --END ERROR HANDLING-- */
}
-
-
#undef FUNCNAME
-#define FUNCNAME MPIDI_Get
+#define FUNCNAME MPIDI_CH3I_Get
#undef FCNAME
#define FCNAME MPIDI_QUOTE(FUNCNAME)
-int MPIDI_Get(void *origin_addr, int origin_count, MPI_Datatype
- origin_datatype, int target_rank, MPI_Aint target_disp,
- int target_count, MPI_Datatype target_datatype, MPID_Win * win_ptr,
- MPID_Request * ureq)
+int MPIDI_CH3I_Get(void *origin_addr, int origin_count, MPI_Datatype
+ origin_datatype, int target_rank, MPI_Aint target_disp,
+ int target_count, MPI_Datatype target_datatype, MPID_Win * win_ptr,
+ MPID_Request * ureq)
{
int mpi_errno = MPI_SUCCESS;
MPIDI_msg_sz_t data_sz;
@@ -237,9 +235,9 @@ int MPIDI_Get(void *origin_addr, int origin_count, MPI_Datatype
MPID_Datatype *dtp;
MPIDI_VC_t *orig_vc = NULL, *target_vc = NULL;
int made_progress = 0;
- MPIDI_STATE_DECL(MPID_STATE_MPIDI_GET);
+ MPIDI_STATE_DECL(MPID_STATE_MPIDI_CH3I_GET);
- MPIDI_RMA_FUNC_ENTER(MPID_STATE_MPIDI_GET);
+ MPIDI_RMA_FUNC_ENTER(MPID_STATE_MPIDI_CH3I_GET);
MPIU_ERR_CHKANDJUMP(win_ptr->states.access_state == MPIDI_RMA_NONE,
mpi_errno, MPI_ERR_RMA_SYNC, "**rmasync");
@@ -372,7 +370,7 @@ int MPIDI_Get(void *origin_addr, int origin_count, MPI_Datatype
}
fn_exit:
- MPIDI_RMA_FUNC_EXIT(MPID_STATE_MPIDI_GET);
+ MPIDI_RMA_FUNC_EXIT(MPID_STATE_MPIDI_CH3I_GET);
return mpi_errno;
/* --BEGIN ERROR HANDLING-- */
@@ -382,15 +380,14 @@ int MPIDI_Get(void *origin_addr, int origin_count, MPI_Datatype
}
-
#undef FUNCNAME
-#define FUNCNAME MPIDI_Accumulate
+#define FUNCNAME MPIDI_CH3I_Accumulate
#undef FCNAME
#define FCNAME MPIDI_QUOTE(FUNCNAME)
-int MPIDI_Accumulate(const void *origin_addr, int origin_count, MPI_Datatype
- origin_datatype, int target_rank, MPI_Aint target_disp,
- int target_count, MPI_Datatype target_datatype, MPI_Op op,
- MPID_Win * win_ptr, MPID_Request * ureq)
+int MPIDI_CH3I_Accumulate(const void *origin_addr, int origin_count, MPI_Datatype
+ origin_datatype, int target_rank, MPI_Aint target_disp,
+ int target_count, MPI_Datatype target_datatype, MPI_Op op,
+ MPID_Win * win_ptr, MPID_Request * ureq)
{
int mpi_errno = MPI_SUCCESS;
MPIDI_msg_sz_t data_sz;
@@ -399,9 +396,9 @@ int MPIDI_Accumulate(const void *origin_addr, int origin_count, MPI_Datatype
MPID_Datatype *dtp;
MPIDI_VC_t *orig_vc = NULL, *target_vc = NULL;
int made_progress = 0;
- MPIDI_STATE_DECL(MPID_STATE_MPIDI_ACCUMULATE);
+ MPIDI_STATE_DECL(MPID_STATE_MPIDI_CH3I_ACCUMULATE);
- MPIDI_RMA_FUNC_ENTER(MPID_STATE_MPIDI_ACCUMULATE);
+ MPIDI_RMA_FUNC_ENTER(MPID_STATE_MPIDI_CH3I_ACCUMULATE);
MPIU_ERR_CHKANDJUMP(win_ptr->states.access_state == MPIDI_RMA_NONE,
mpi_errno, MPI_ERR_RMA_SYNC, "**rmasync");
@@ -560,7 +557,7 @@ int MPIDI_Accumulate(const void *origin_addr, int origin_count, MPI_Datatype
}
fn_exit:
- MPIDI_RMA_FUNC_EXIT(MPID_STATE_MPIDI_ACCUMULATE);
+ MPIDI_RMA_FUNC_EXIT(MPID_STATE_MPIDI_CH3I_ACCUMULATE);
return mpi_errno;
/* --BEGIN ERROR HANDLING-- */
@@ -571,14 +568,14 @@ int MPIDI_Accumulate(const void *origin_addr, int origin_count, MPI_Datatype
#undef FUNCNAME
-#define FUNCNAME MPIDI_Get_accumulate
+#define FUNCNAME MPIDI_CH3I_Get_accumulate
#undef FCNAME
#define FCNAME MPIDI_QUOTE(FUNCNAME)
-int MPIDI_Get_accumulate(const void *origin_addr, int origin_count,
- MPI_Datatype origin_datatype, void *result_addr, int result_count,
- MPI_Datatype result_datatype, int target_rank, MPI_Aint target_disp,
- int target_count, MPI_Datatype target_datatype, MPI_Op op,
- MPID_Win * win_ptr, MPID_Request * ureq)
+int MPIDI_CH3I_Get_accumulate(const void *origin_addr, int origin_count,
+ MPI_Datatype origin_datatype, void *result_addr, int result_count,
+ MPI_Datatype result_datatype, int target_rank, MPI_Aint target_disp,
+ int target_count, MPI_Datatype target_datatype, MPI_Op op,
+ MPID_Win * win_ptr, MPID_Request * ureq)
{
int mpi_errno = MPI_SUCCESS;
MPIDI_msg_sz_t data_sz;
@@ -588,9 +585,9 @@ int MPIDI_Get_accumulate(const void *origin_addr, int origin_count,
MPID_Datatype *dtp;
MPIDI_VC_t *orig_vc = NULL, *target_vc = NULL;
int made_progress = 0;
- MPIDI_STATE_DECL(MPID_STATE_MPIDI_GET_ACCUMULATE);
+ MPIDI_STATE_DECL(MPID_STATE_MPIDI_CH3I_GET_ACCUMULATE);
- MPIDI_RMA_FUNC_ENTER(MPID_STATE_MPIDI_GET_ACCUMULATE);
+ MPIDI_RMA_FUNC_ENTER(MPID_STATE_MPIDI_CH3I_GET_ACCUMULATE);
MPIU_ERR_CHKANDJUMP(win_ptr->states.access_state == MPIDI_RMA_NONE,
mpi_errno, MPI_ERR_RMA_SYNC, "**rmasync");
@@ -791,6 +788,118 @@ int MPIDI_Get_accumulate(const void *origin_addr, int origin_count,
}
fn_exit:
+ MPIDI_RMA_FUNC_EXIT(MPID_STATE_MPIDI_CH3I_GET_ACCUMULATE);
+ return mpi_errno;
+
+ /* --BEGIN ERROR HANDLING-- */
+ fn_fail:
+ goto fn_exit;
+ /* --END ERROR HANDLING-- */
+}
+
+
+#undef FUNCNAME
+#define FUNCNAME MPIDI_Put
+#undef FCNAME
+#define FCNAME MPIDI_QUOTE(FUNCNAME)
+int MPIDI_Put(const void *origin_addr, int origin_count, MPI_Datatype
+ origin_datatype, int target_rank, MPI_Aint target_disp,
+ int target_count, MPI_Datatype target_datatype, MPID_Win * win_ptr)
+{
+ int mpi_errno = MPI_SUCCESS;
+
+ MPIDI_STATE_DECL(MPID_STATE_MPIDI_PUT);
+ MPIDI_RMA_FUNC_ENTER(MPID_STATE_MPIDI_PUT);
+
+ mpi_errno = MPIDI_CH3I_Put(origin_addr, origin_count, origin_datatype,
+ target_rank, target_disp, target_count, target_datatype,
+ win_ptr, NULL);
+
+ fn_exit:
+ MPIDI_RMA_FUNC_EXIT(MPID_STATE_MPIDI_PUT);
+ return mpi_errno;
+
+ /* --BEGIN ERROR HANDLING-- */
+ fn_fail:
+ goto fn_exit;
+ /* --END ERROR HANDLING-- */
+}
+
+#undef FUNCNAME
+#define FUNCNAME MPIDI_Get
+#undef FCNAME
+#define FCNAME MPIDI_QUOTE(FUNCNAME)
+int MPIDI_Get(void *origin_addr, int origin_count, MPI_Datatype
+ origin_datatype, int target_rank, MPI_Aint target_disp,
+ int target_count, MPI_Datatype target_datatype, MPID_Win * win_ptr)
+{
+ int mpi_errno = MPI_SUCCESS;
+
+ MPIDI_STATE_DECL(MPID_STATE_MPIDI_GET);
+ MPIDI_RMA_FUNC_ENTER(MPID_STATE_MPIDI_GET);
+
+ mpi_errno = MPIDI_CH3I_Get(origin_addr, origin_count, origin_datatype,
+ target_rank, target_disp, target_count, target_datatype,
+ win_ptr, NULL);
+
+ fn_exit:
+ MPIDI_RMA_FUNC_EXIT(MPID_STATE_MPIDI_GET);
+ return mpi_errno;
+
+ /* --BEGIN ERROR HANDLING-- */
+ fn_fail:
+ goto fn_exit;
+ /* --END ERROR HANDLING-- */
+}
+
+#undef FUNCNAME
+#define FUNCNAME MPIDI_Accumulate
+#undef FCNAME
+#define FCNAME MPIDI_QUOTE(FUNCNAME)
+int MPIDI_Accumulate(const void *origin_addr, int origin_count, MPI_Datatype
+ origin_datatype, int target_rank, MPI_Aint target_disp,
+ int target_count, MPI_Datatype target_datatype, MPI_Op op, MPID_Win * win_ptr)
+{
+ int mpi_errno = MPI_SUCCESS;
+
+ MPIDI_STATE_DECL(MPID_STATE_MPIDI_ACCUMULATE);
+ MPIDI_RMA_FUNC_ENTER(MPID_STATE_MPIDI_ACCUMULATE);
+
+ mpi_errno = MPIDI_CH3I_Accumulate(origin_addr, origin_count, origin_datatype,
+ target_rank, target_disp, target_count, target_datatype,
+ op, win_ptr, NULL);
+
+ fn_exit:
+ MPIDI_RMA_FUNC_EXIT(MPID_STATE_MPIDI_ACCUMULATE);
+ return mpi_errno;
+
+ /* --BEGIN ERROR HANDLING-- */
+ fn_fail:
+ goto fn_exit;
+ /* --END ERROR HANDLING-- */
+}
+
+#undef FUNCNAME
+#define FUNCNAME MPIDI_Get_accumulate
+#undef FCNAME
+#define FCNAME MPIDI_QUOTE(FUNCNAME)
+int MPIDI_Get_accumulate(const void *origin_addr, int origin_count,
+ MPI_Datatype origin_datatype, void *result_addr, int result_count,
+ MPI_Datatype result_datatype, int target_rank, MPI_Aint target_disp,
+ int target_count, MPI_Datatype target_datatype, MPI_Op op,
+ MPID_Win * win_ptr)
+{
+ int mpi_errno = MPI_SUCCESS;
+
+ MPIDI_STATE_DECL(MPID_STATE_MPIDI_GET_ACCUMULATE);
+ MPIDI_RMA_FUNC_ENTER(MPID_STATE_MPIDI_GET_ACCUMULATE);
+
+ mpi_errno = MPIDI_CH3I_Get_accumulate(origin_addr, origin_count, origin_datatype,
+ result_addr, result_count, result_datatype,
+ target_rank, target_disp, target_count,
+ target_datatype, op, win_ptr, NULL);
+
+ fn_exit:
MPIDI_RMA_FUNC_EXIT(MPID_STATE_MPIDI_GET_ACCUMULATE);
return mpi_errno;
diff --git a/src/mpid/ch3/src/ch3u_rma_reqops.c b/src/mpid/ch3/src/ch3u_rma_reqops.c
index 803cc62..68a7d9c 100644
--- a/src/mpid/ch3/src/ch3u_rma_reqops.c
+++ b/src/mpid/ch3/src/ch3u_rma_reqops.c
@@ -47,9 +47,9 @@ int MPIDI_Rput(const void *origin_addr, int origin_count,
/* This request is referenced by user and ch3 by default. */
MPIU_Object_set_ref(ureq, 2);
- mpi_errno = win_ptr->RMAFns.Put(origin_addr, origin_count,
- origin_datatype, target_rank,
- target_disp, target_count, target_datatype, win_ptr, ureq);
+ mpi_errno = MPIDI_CH3I_Put(origin_addr, origin_count,
+ origin_datatype, target_rank,
+ target_disp, target_count, target_datatype, win_ptr, ureq);
if (mpi_errno != MPI_SUCCESS) {
MPIU_ERR_POP(mpi_errno);
@@ -109,9 +109,9 @@ int MPIDI_Rget(void *origin_addr, int origin_count,
/* This request is referenced by user and ch3 by default. */
MPIU_Object_set_ref(ureq, 2);
- mpi_errno = win_ptr->RMAFns.Get(origin_addr, origin_count,
- origin_datatype, target_rank,
- target_disp, target_count, target_datatype, win_ptr, ureq);
+ mpi_errno = MPIDI_CH3I_Get(origin_addr, origin_count,
+ origin_datatype, target_rank,
+ target_disp, target_count, target_datatype, win_ptr, ureq);
if (mpi_errno != MPI_SUCCESS) {
MPIU_ERR_POP(mpi_errno);
@@ -171,10 +171,10 @@ int MPIDI_Raccumulate(const void *origin_addr, int origin_count,
/* This request is referenced by user and ch3 by default. */
MPIU_Object_set_ref(ureq, 2);
- mpi_errno = win_ptr->RMAFns.Accumulate(origin_addr, origin_count,
- origin_datatype, target_rank,
- target_disp, target_count,
- target_datatype, op, win_ptr, ureq);
+ mpi_errno = MPIDI_CH3I_Accumulate(origin_addr, origin_count,
+ origin_datatype, target_rank,
+ target_disp, target_count,
+ target_datatype, op, win_ptr, ureq);
if (mpi_errno != MPI_SUCCESS) {
MPIU_ERR_POP(mpi_errno);
}
@@ -236,12 +236,11 @@ int MPIDI_Rget_accumulate(const void *origin_addr, int origin_count,
/* This request is referenced by user and ch3 by default. */
MPIU_Object_set_ref(ureq, 2);
- mpi_errno = win_ptr->RMAFns.Get_accumulate(origin_addr, origin_count,
- origin_datatype, result_addr,
- result_count, result_datatype,
- target_rank, target_disp,
- target_count, target_datatype,
- op, win_ptr, ureq);
+ mpi_errno = MPIDI_CH3I_Get_accumulate(origin_addr, origin_count,
+ origin_datatype, result_addr,
+ result_count, result_datatype,
+ target_rank, target_disp,
+ target_count, target_datatype, op, win_ptr, ureq);
if (mpi_errno != MPI_SUCCESS) {
MPIU_ERR_POP(mpi_errno);
}
-----------------------------------------------------------------------
Summary of changes:
src/include/mpiimpl.h | 8 +-
src/mpi/rma/accumulate.c | 2 +-
src/mpi/rma/get.c | 2 +-
src/mpi/rma/get_accumulate.c | 2 +-
src/mpi/rma/put.c | 2 +-
src/mpid/ch3/include/mpidimpl.h | 30 +++++-
src/mpid/ch3/src/ch3u_rma_ops.c | 179 +++++++++++++++++++++++++++++-------
src/mpid/ch3/src/ch3u_rma_reqops.c | 31 +++---
8 files changed, 192 insertions(+), 64 deletions(-)
hooks/post-receive
--
MPICH primary repository
1
0
[mpich] MPICH primary repository branch, master, updated. v3.1.3-173-geedd51e
by noreply@mpich.org 11 Nov '14
by noreply@mpich.org 11 Nov '14
11 Nov '14
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "MPICH primary repository".
The branch, master has been updated
via eedd51e04717c49e36d378027e12075ad405789f (commit)
via 91070686c3b0b6d98c3c21c2e503d9d0b0eb6282 (commit)
via c235c756c1215c6453bf8f95c0818a3c355684bc (commit)
via f695c96d9a54aaeb599aedad2001da89d5732ce6 (commit)
via 5fd735b8e84c4a7d6eddbe6bb244fd37be789dfc (commit)
via 57b64dad19eda61811775d59720e61c611c591ad (commit)
via 4ab9c23523108401125b2132903c0a41773b5ab3 (commit)
from 28e79b31121c2f2ec4a46422e78ec4bcaf67b18b (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.mpich.org/mpich.git/commitdiff/eedd51e04717c49e36d378027e12075ad…
commit eedd51e04717c49e36d378027e12075ad405789f
Author: Xin Zhao <xinzhao3(a)illinois.edu>
Date: Tue Nov 11 09:45:00 2014 -0600
Delete unused variable.
Signed-off-by: Rob Latham <robl(a)mcs.anl.gov>
diff --git a/src/mpid/ch3/src/ch3u_rma_sync.c b/src/mpid/ch3/src/ch3u_rma_sync.c
index ffaf2d9..aea2190 100644
--- a/src/mpid/ch3/src/ch3u_rma_sync.c
+++ b/src/mpid/ch3/src/ch3u_rma_sync.c
@@ -578,7 +578,7 @@ int MPIDI_Win_start(MPID_Group * group_ptr, int assert, MPID_Win * win_ptr)
win_ptr->start_grp_size = group_ptr->size;
if ((assert & MPI_MODE_NOCHECK) == 0) {
- int i, intra_cnt, inter_cnt;
+ int i, intra_cnt;
MPI_Request *intra_start_req = NULL;
MPI_Status *intra_start_status = NULL;
MPID_Comm *comm_ptr = win_ptr->comm_ptr;
@@ -626,7 +626,6 @@ int MPIDI_Win_start(MPID_Group * group_ptr, int assert, MPID_Win * win_ptr)
}
else {
win_ptr->start_req[i] = req_ptr->handle;
- inter_cnt++;
}
}
else {
http://git.mpich.org/mpich.git/commitdiff/91070686c3b0b6d98c3c21c2e503d9d0b…
commit 91070686c3b0b6d98c3c21c2e503d9d0b0eb6282
Author: Xin Zhao <xinzhao3(a)illinois.edu>
Date: Mon Nov 10 17:30:19 2014 -0600
Delete no longer needed file.
We already moved all functions from src/mpid/ch3/src/ch3u_rma_acc_ops.c
to src/mpid/ch3/src/ch3u_rma_ops.c and deleted the previous one from
Makefile.mk, here we just delete this file.
Signed-off-by: Rob Latham <robl(a)mcs.anl.gov>
diff --git a/src/mpid/ch3/src/ch3u_rma_acc_ops.c b/src/mpid/ch3/src/ch3u_rma_acc_ops.c
deleted file mode 100644
index 5d72483..0000000
--- a/src/mpid/ch3/src/ch3u_rma_acc_ops.c
+++ /dev/null
@@ -1,306 +0,0 @@
-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
-/*
- * (C) 2001 by Argonne National Laboratory.
- * See COPYRIGHT in top-level directory.
- */
-
-#include "mpidrma.h"
-
-#undef FUNCNAME
-#define FUNCNAME MPIDI_Get_accumulate
-#undef FCNAME
-#define FCNAME MPIDI_QUOTE(FUNCNAME)
-int MPIDI_Get_accumulate(const void *origin_addr, int origin_count,
- MPI_Datatype origin_datatype, void *result_addr, int result_count,
- MPI_Datatype result_datatype, int target_rank, MPI_Aint target_disp,
- int target_count, MPI_Datatype target_datatype, MPI_Op op,
- MPID_Win * win_ptr)
-{
- int mpi_errno = MPI_SUCCESS;
- MPIDI_msg_sz_t data_sz;
- int rank;
- int dt_contig ATTRIBUTE((unused));
- MPI_Aint dt_true_lb ATTRIBUTE((unused));
- MPID_Datatype *dtp;
- MPIDI_VC_t *orig_vc = NULL, *target_vc = NULL;
- MPIDI_STATE_DECL(MPID_STATE_MPIDI_GET_ACCUMULATE);
-
- MPIDI_RMA_FUNC_ENTER(MPID_STATE_MPIDI_GET_ACCUMULATE);
-
- if (target_rank == MPI_PROC_NULL) {
- goto fn_exit;
- }
-
- if (win_ptr->epoch_state == MPIDI_EPOCH_NONE && win_ptr->fence_issued) {
- win_ptr->epoch_state = MPIDI_EPOCH_FENCE;
- }
-
- MPIU_ERR_CHKANDJUMP(win_ptr->epoch_state == MPIDI_EPOCH_NONE,
- mpi_errno, MPI_ERR_RMA_SYNC, "**rmasync");
-
- MPIDI_Datatype_get_info(target_count, target_datatype, dt_contig, data_sz, dtp, dt_true_lb);
-
- if (data_sz == 0) {
- goto fn_exit;
- }
-
- rank = win_ptr->comm_ptr->rank;
-
- if (win_ptr->shm_allocated == TRUE && target_rank != rank &&
- win_ptr->create_flavor != MPI_WIN_FLAVOR_SHARED) {
- /* check if target is local and shared memory is allocated on window,
- * if so, we directly perform this operation on shared memory region. */
-
- /* FIXME: Here we decide whether to perform SHM operations by checking if origin and target are on
- * the same node. However, in ch3:sock, even if origin and target are on the same node, they do
- * not within the same SHM region. Here we filter out ch3:sock by checking shm_allocated flag first,
- * which is only set to TRUE when SHM region is allocated in nemesis.
- * In future we need to figure out a way to check if origin and target are in the same "SHM comm".
- */
- MPIDI_Comm_get_vc(win_ptr->comm_ptr, rank, &orig_vc);
- MPIDI_Comm_get_vc(win_ptr->comm_ptr, target_rank, &target_vc);
- }
-
- /* Do =! rank first (most likely branch?) */
- if (target_rank == rank || win_ptr->create_flavor == MPI_WIN_FLAVOR_SHARED ||
- (win_ptr->shm_allocated == TRUE && orig_vc->node_id == target_vc->node_id)) {
- mpi_errno = MPIDI_CH3I_Shm_get_acc_op(origin_addr, origin_count, origin_datatype,
- result_addr, result_count, result_datatype,
- target_rank, target_disp, target_count,
- target_datatype, op, win_ptr);
- if (mpi_errno)
- MPIU_ERR_POP(mpi_errno);
- }
- else {
- MPIDI_RMA_Ops_list_t *ops_list = MPIDI_CH3I_RMA_Get_ops_list(win_ptr, target_rank);
- MPIDI_RMA_Op_t *new_ptr = NULL;
-
- /* Append the operation to the window's RMA ops queue */
- mpi_errno = MPIDI_CH3I_RMA_Ops_alloc_tail(ops_list, &new_ptr);
- if (mpi_errno) {
- MPIU_ERR_POP(mpi_errno);
- }
-
- /* TODO: Can we use the MPIDI_RMA_ACC_CONTIG optimization? */
-
- new_ptr->type = MPIDI_RMA_GET_ACCUMULATE;
- /* Cast away const'ness for origin_address as MPIDI_RMA_Op_t
- * contain both PUT and GET like ops */
- new_ptr->origin_addr = (void *) origin_addr;
- new_ptr->origin_count = origin_count;
- new_ptr->origin_datatype = origin_datatype;
- new_ptr->result_addr = result_addr;
- new_ptr->result_count = result_count;
- new_ptr->result_datatype = result_datatype;
- new_ptr->target_rank = target_rank;
- new_ptr->target_disp = target_disp;
- new_ptr->target_count = target_count;
- new_ptr->target_datatype = target_datatype;
- new_ptr->op = op;
-
- /* if source or target datatypes are derived, increment their
- * reference counts */
- if (op != MPI_NO_OP && !MPIR_DATATYPE_IS_PREDEFINED(origin_datatype)) {
- MPID_Datatype_get_ptr(origin_datatype, dtp);
- MPID_Datatype_add_ref(dtp);
- }
- if (!MPIR_DATATYPE_IS_PREDEFINED(result_datatype)) {
- MPID_Datatype_get_ptr(result_datatype, dtp);
- MPID_Datatype_add_ref(dtp);
- }
- if (!MPIR_DATATYPE_IS_PREDEFINED(target_datatype)) {
- MPID_Datatype_get_ptr(target_datatype, dtp);
- MPID_Datatype_add_ref(dtp);
- }
- }
-
- fn_exit:
- MPIDI_RMA_FUNC_EXIT(MPID_STATE_MPIDI_GET_ACCUMULATE);
- return mpi_errno;
-
- /* --BEGIN ERROR HANDLING-- */
- fn_fail:
- goto fn_exit;
- /* --END ERROR HANDLING-- */
-}
-
-
-#undef FUNCNAME
-#define FUNCNAME MPIDI_Compare_and_swap
-#undef FCNAME
-#define FCNAME MPIDI_QUOTE(FUNCNAME)
-int MPIDI_Compare_and_swap(const void *origin_addr, const void *compare_addr,
- void *result_addr, MPI_Datatype datatype, int target_rank,
- MPI_Aint target_disp, MPID_Win * win_ptr)
-{
- int mpi_errno = MPI_SUCCESS;
- int rank;
- MPIDI_VC_t *orig_vc = NULL, *target_vc = NULL;
-
- MPIDI_STATE_DECL(MPID_STATE_MPIDI_COMPARE_AND_SWAP);
- MPIDI_RMA_FUNC_ENTER(MPID_STATE_MPIDI_COMPARE_AND_SWAP);
-
- if (target_rank == MPI_PROC_NULL) {
- goto fn_exit;
- }
-
- if (win_ptr->epoch_state == MPIDI_EPOCH_NONE && win_ptr->fence_issued) {
- win_ptr->epoch_state = MPIDI_EPOCH_FENCE;
- }
-
- MPIU_ERR_CHKANDJUMP(win_ptr->epoch_state == MPIDI_EPOCH_NONE,
- mpi_errno, MPI_ERR_RMA_SYNC, "**rmasync");
-
- rank = win_ptr->comm_ptr->rank;
-
- if (win_ptr->shm_allocated == TRUE && target_rank != rank &&
- win_ptr->create_flavor != MPI_WIN_FLAVOR_SHARED) {
- /* check if target is local and shared memory is allocated on window,
- * if so, we directly perform this operation on shared memory region. */
-
- /* FIXME: Here we decide whether to perform SHM operations by checking if origin and target are on
- * the same node. However, in ch3:sock, even if origin and target are on the same node, they do
- * not within the same SHM region. Here we filter out ch3:sock by checking shm_allocated flag first,
- * which is only set to TRUE when SHM region is allocated in nemesis.
- * In future we need to figure out a way to check if origin and target are in the same "SHM comm".
- */
- MPIDI_Comm_get_vc(win_ptr->comm_ptr, rank, &orig_vc);
- MPIDI_Comm_get_vc(win_ptr->comm_ptr, target_rank, &target_vc);
- }
-
- /* The datatype must be predefined, and one of: C integer, Fortran integer,
- * Logical, Multi-language types, or Byte. This is checked above the ADI,
- * so there's no need to check it again here. */
-
- /* FIXME: For shared memory windows, we should provide an implementation
- * that uses a processor atomic operation. */
- if (target_rank == rank || win_ptr->create_flavor == MPI_WIN_FLAVOR_SHARED ||
- (win_ptr->shm_allocated == TRUE && orig_vc->node_id == target_vc->node_id)) {
- mpi_errno = MPIDI_CH3I_Shm_cas_op(origin_addr, compare_addr, result_addr,
- datatype, target_rank, target_disp, win_ptr);
- if (mpi_errno)
- MPIU_ERR_POP(mpi_errno);
- }
- else {
- MPIDI_RMA_Ops_list_t *ops_list = MPIDI_CH3I_RMA_Get_ops_list(win_ptr, target_rank);
- MPIDI_RMA_Op_t *new_ptr = NULL;
-
- /* Append this operation to the RMA ops queue */
- mpi_errno = MPIDI_CH3I_RMA_Ops_alloc_tail(ops_list, &new_ptr);
- if (mpi_errno) {
- MPIU_ERR_POP(mpi_errno);
- }
-
- new_ptr->type = MPIDI_RMA_COMPARE_AND_SWAP;
- new_ptr->origin_addr = (void *) origin_addr;
- new_ptr->origin_count = 1;
- new_ptr->origin_datatype = datatype;
- new_ptr->target_rank = target_rank;
- new_ptr->target_disp = target_disp;
- new_ptr->target_count = 1;
- new_ptr->target_datatype = datatype;
- new_ptr->result_addr = result_addr;
- new_ptr->result_count = 1;
- new_ptr->result_datatype = datatype;
- new_ptr->compare_addr = (void *) compare_addr;
- new_ptr->compare_count = 1;
- new_ptr->compare_datatype = datatype;
- }
-
- fn_exit:
- MPIDI_RMA_FUNC_EXIT(MPID_STATE_MPIDI_COMPARE_AND_SWAP);
- return mpi_errno;
- /* --BEGIN ERROR HANDLING-- */
- fn_fail:
- goto fn_exit;
- /* --END ERROR HANDLING-- */
-}
-
-
-#undef FUNCNAME
-#define FUNCNAME MPIDI_Fetch_and_op
-#undef FCNAME
-#define FCNAME MPIDI_QUOTE(FUNCNAME)
-int MPIDI_Fetch_and_op(const void *origin_addr, void *result_addr,
- MPI_Datatype datatype, int target_rank,
- MPI_Aint target_disp, MPI_Op op, MPID_Win * win_ptr)
-{
- int mpi_errno = MPI_SUCCESS;
- int rank;
- MPIDI_VC_t *orig_vc = NULL, *target_vc = NULL;
-
- MPIDI_STATE_DECL(MPID_STATE_MPIDI_FETCH_AND_OP);
- MPIDI_RMA_FUNC_ENTER(MPID_STATE_MPIDI_FETCH_AND_OP);
-
- if (target_rank == MPI_PROC_NULL) {
- goto fn_exit;
- }
-
- if (win_ptr->epoch_state == MPIDI_EPOCH_NONE && win_ptr->fence_issued) {
- win_ptr->epoch_state = MPIDI_EPOCH_FENCE;
- }
-
- MPIU_ERR_CHKANDJUMP(win_ptr->epoch_state == MPIDI_EPOCH_NONE,
- mpi_errno, MPI_ERR_RMA_SYNC, "**rmasync");
-
- rank = win_ptr->comm_ptr->rank;
-
- if (win_ptr->shm_allocated == TRUE && target_rank != rank &&
- win_ptr->create_flavor != MPI_WIN_FLAVOR_SHARED) {
- /* check if target is local and shared memory is allocated on window,
- * if so, we directly perform this operation on shared memory region. */
-
- /* FIXME: Here we decide whether to perform SHM operations by checking if origin and target are on
- * the same node. However, in ch3:sock, even if origin and target are on the same node, they do
- * not within the same SHM region. Here we filter out ch3:sock by checking shm_allocated flag first,
- * which is only set to TRUE when SHM region is allocated in nemesis.
- * In future we need to figure out a way to check if origin and target are in the same "SHM comm".
- */
- MPIDI_Comm_get_vc(win_ptr->comm_ptr, rank, &orig_vc);
- MPIDI_Comm_get_vc(win_ptr->comm_ptr, target_rank, &target_vc);
- }
-
- /* The datatype and op must be predefined. This is checked above the ADI,
- * so there's no need to check it again here. */
-
- /* FIXME: For shared memory windows, we should provide an implementation
- * that uses a processor atomic operation. */
- if (target_rank == rank || win_ptr->create_flavor == MPI_WIN_FLAVOR_SHARED ||
- (win_ptr->shm_allocated == TRUE && orig_vc->node_id == target_vc->node_id)) {
- mpi_errno = MPIDI_CH3I_Shm_fop_op(origin_addr, result_addr, datatype,
- target_rank, target_disp, op, win_ptr);
- if (mpi_errno)
- MPIU_ERR_POP(mpi_errno);
- }
- else {
- MPIDI_RMA_Ops_list_t *ops_list = MPIDI_CH3I_RMA_Get_ops_list(win_ptr, target_rank);
- MPIDI_RMA_Op_t *new_ptr = NULL;
-
- /* Append this operation to the RMA ops queue */
- mpi_errno = MPIDI_CH3I_RMA_Ops_alloc_tail(ops_list, &new_ptr);
- if (mpi_errno) {
- MPIU_ERR_POP(mpi_errno);
- }
-
- new_ptr->type = MPIDI_RMA_FETCH_AND_OP;
- new_ptr->origin_addr = (void *) origin_addr;
- new_ptr->origin_count = 1;
- new_ptr->origin_datatype = datatype;
- new_ptr->target_rank = target_rank;
- new_ptr->target_disp = target_disp;
- new_ptr->target_count = 1;
- new_ptr->target_datatype = datatype;
- new_ptr->result_addr = result_addr;
- new_ptr->result_count = 1;
- new_ptr->result_datatype = datatype;
- new_ptr->op = op;
- }
-
- fn_exit:
- MPIDI_RMA_FUNC_EXIT(MPID_STATE_MPIDI_FETCH_AND_OP);
- return mpi_errno;
- /* --BEGIN ERROR HANDLING-- */
- fn_fail:
- goto fn_exit;
- /* --END ERROR HANDLING-- */
-}
http://git.mpich.org/mpich.git/commitdiff/c235c756c1215c6453bf8f95c0818a3c3…
commit c235c756c1215c6453bf8f95c0818a3c355684bc
Author: Xin Zhao <xinzhao3(a)illinois.edu>
Date: Mon Nov 10 17:42:13 2014 -0600
Delete no longer used epoch states.
We already use window states to specify the current
state in RMA epoch, therfore the epoch states are
no longer used. Here we delete those states.
Signed-off-by: Rob Latham <robl(a)mcs.anl.gov>
diff --git a/src/mpid/ch3/include/mpidpre.h b/src/mpid/ch3/include/mpidpre.h
index 517a5ff..7efc641 100644
--- a/src/mpid/ch3/include/mpidpre.h
+++ b/src/mpid/ch3/include/mpidpre.h
@@ -282,19 +282,6 @@ enum MPIDI_Win_info_arg_vals_accumulate_ops {
MPIDI_ACC_OPS_SAME_OP_NO_OP
};
-/* We start with an arbitrarily chosen number (27), to help with
- * debugging when an epoch state is not initialized or wrongly
- * initialized. */
-enum MPIDI_Win_epoch_states {
- MPIDI_EPOCH_NONE = 27,
- MPIDI_EPOCH_FENCE,
- MPIDI_EPOCH_POST,
- MPIDI_EPOCH_START,
- MPIDI_EPOCH_PSCW, /* Both post and start have been called. */
- MPIDI_EPOCH_LOCK,
- MPIDI_EPOCH_LOCK_ALL
-};
-
struct MPIDI_Win_info_args {
int no_locks; /* valid flavor = all */
int accumulate_ordering;
http://git.mpich.org/mpich.git/commitdiff/f695c96d9a54aaeb599aedad2001da89d…
commit f695c96d9a54aaeb599aedad2001da89d5732ce6
Author: Xin Zhao <xinzhao3(a)illinois.edu>
Date: Mon Nov 10 17:42:06 2014 -0600
Bug-fixing: set window state to MPIDI_RMA_NONE when UNLOCK finishes.
Signed-off-by: Rob Latham <robl(a)mcs.anl.gov>
diff --git a/src/mpid/ch3/src/ch3u_rma_sync.c b/src/mpid/ch3/src/ch3u_rma_sync.c
index 75a5e66..ffaf2d9 100644
--- a/src/mpid/ch3/src/ch3u_rma_sync.c
+++ b/src/mpid/ch3/src/ch3u_rma_sync.c
@@ -1597,7 +1597,7 @@ int MPIDI_Win_unlock_all(MPID_Win * win_ptr)
win_ptr->posted_ops_cnt = 0;
MPIU_Assert(win_ptr->active_req_cnt == 0);
- win_ptr->states.access_state = MPIDI_EPOCH_NONE;
+ win_ptr->states.access_state = MPIDI_RMA_NONE;
num_passive_win--;
MPIU_Assert(num_passive_win >= 0);
http://git.mpich.org/mpich.git/commitdiff/5fd735b8e84c4a7d6eddbe6bb244fd37b…
commit 5fd735b8e84c4a7d6eddbe6bb244fd37be789dfc
Author: Xin Zhao <xinzhao3(a)illinois.edu>
Date: Mon Nov 10 16:59:48 2014 -0600
Delete redundant enum values for lock types.
For lock type, we only need one internal value
to specify cases when currently there is no passive
lock issued from origin side or there is no passive
lock imposed on target side. If there are passive
locks, we directly use MPI_LOCK_SHARED and
MPI_LOCK_EXCLUSIVE to indicate the lock type. This
patch deletes redundant enum for lock types and just
defines MPID_LOCK_NONE.
Signed-off-by: Rob Latham <robl(a)mcs.anl.gov>
diff --git a/src/mpid/ch3/include/mpid_rma_oplist.h b/src/mpid/ch3/include/mpid_rma_oplist.h
index 3dd9176..85b672a 100644
--- a/src/mpid/ch3/include/mpid_rma_oplist.h
+++ b/src/mpid/ch3/include/mpid_rma_oplist.h
@@ -113,7 +113,7 @@ static inline MPIDI_RMA_Target_t *MPIDI_CH3I_Win_target_alloc(MPID_Win * win_ptr
e->target_rank = -1;
e->access_state = MPIDI_RMA_NONE;
- e->lock_type = MPIDI_RMA_LOCK_TYPE_NONE;
+ e->lock_type = MPID_LOCK_NONE;
e->lock_mode = 0;
e->outstanding_lock = 0;
e->disable_flush_local = 0;
diff --git a/src/mpid/ch3/include/mpid_rma_types.h b/src/mpid/ch3/include/mpid_rma_types.h
index 9a81c0e..bdcc9a0 100644
--- a/src/mpid/ch3/include/mpid_rma_types.h
+++ b/src/mpid/ch3/include/mpid_rma_types.h
@@ -16,22 +16,7 @@ enum MPIDI_RMA_Datatype {
MPIDI_RMA_DATATYPE_DERIVED = 51
};
-/* We start with an arbitrarily chosen number (60), to help with
- * debugging when a lock state is not initialized or wrongly
- * initialized. */
-enum MPID_Lock_state {
- MPID_LOCK_NONE = 60,
- MPID_LOCK_SHARED_ALL
-};
-
-/* We start with an arbitrarily chosen number (23), to help with
- * debugging when a lock type is not initialized or wrongly
- * initialized. */
-enum MPIDI_RMA_Lock_type {
- MPIDI_RMA_LOCK_TYPE_NONE = 23,
- MPIDI_RMA_LOCK_TYPE_SHARED,
- MPIDI_RMA_LOCK_TYPE_EXCLUSIVE
-};
+#define MPID_LOCK_NONE 60
/*
* RMA Declarations. We should move these into something separate from
@@ -98,7 +83,7 @@ typedef struct MPIDI_RMA_Target {
struct MPIDI_RMA_Target *next;
int target_rank;
enum MPIDI_RMA_states access_state;
- enum MPIDI_RMA_Lock_type lock_type; /* SHARED, EXCLUSIVE */
+ int lock_type; /* NONE, SHARED, EXCLUSIVE */
int lock_mode; /* e.g., MODE_NO_CHECK */
int outstanding_lock;
int disable_flush_local;
http://git.mpich.org/mpich.git/commitdiff/57b64dad19eda61811775d59720e61c61…
commit 57b64dad19eda61811775d59720e61c611c591ad
Author: Xin Zhao <xinzhao3(a)illinois.edu>
Date: Mon Nov 10 16:36:52 2014 -0600
Set the initial value of enum in RMA code to different values.
It is helpful for us to find variables that are not initialized
or wrongly initialized.
Signed-off-by: Rob Latham <robl(a)mcs.anl.gov>
diff --git a/src/mpid/ch3/include/mpid_rma_types.h b/src/mpid/ch3/include/mpid_rma_types.h
index 1687436..9a81c0e 100644
--- a/src/mpid/ch3/include/mpid_rma_types.h
+++ b/src/mpid/ch3/include/mpid_rma_types.h
@@ -16,14 +16,17 @@ enum MPIDI_RMA_Datatype {
MPIDI_RMA_DATATYPE_DERIVED = 51
};
-/* We start with an arbitrarily chosen number (42), to help with
- * debugging when a packet type is not initialized or wrongly
+/* We start with an arbitrarily chosen number (60), to help with
+ * debugging when a lock state is not initialized or wrongly
* initialized. */
enum MPID_Lock_state {
- MPID_LOCK_NONE = 42,
+ MPID_LOCK_NONE = 60,
MPID_LOCK_SHARED_ALL
};
+/* We start with an arbitrarily chosen number (23), to help with
+ * debugging when a lock type is not initialized or wrongly
+ * initialized. */
enum MPIDI_RMA_Lock_type {
MPIDI_RMA_LOCK_TYPE_NONE = 23,
MPIDI_RMA_LOCK_TYPE_SHARED,
diff --git a/src/mpid/ch3/include/mpidpre.h b/src/mpid/ch3/include/mpidpre.h
index 4ae4f9b..517a5ff 100644
--- a/src/mpid/ch3/include/mpidpre.h
+++ b/src/mpid/ch3/include/mpidpre.h
@@ -224,22 +224,22 @@ typedef struct MPIDI_VC * MPID_VCR;
* is a superset of FLUSH_LOCAL, and UNLOCK is a superset
* of FLUSH.
*/
-/* We start with an arbitrarily chosen number (42), to help with
- * debugging when a packet type is not initialized or wrongly
+/* We start with an arbitrarily chosen number (58), to help with
+ * debugging when a sync type is not initialized or wrongly
* initialized. */
enum MPIDI_RMA_sync_types {
- MPIDI_RMA_SYNC_NONE = 42,
+ MPIDI_RMA_SYNC_NONE = 58,
MPIDI_RMA_SYNC_FLUSH_LOCAL,
MPIDI_RMA_SYNC_FLUSH,
MPIDI_RMA_SYNC_UNLOCK
};
-/* We start with an arbitrarily chosen number (42), to help with
- * debugging when a packet type is not initialized or wrongly
+/* We start with an arbitrarily chosen number (63), to help with
+ * debugging when a window state is not initialized or wrongly
* initialized. */
enum MPIDI_RMA_states {
/* window-wide states */
- MPIDI_RMA_NONE = 42,
+ MPIDI_RMA_NONE = 63,
MPIDI_RMA_FENCE_ISSUED, /* access / exposure */
MPIDI_RMA_FENCE_GRANTED, /* access / exposure */
MPIDI_RMA_PSCW_ISSUED, /* access */
@@ -256,11 +256,11 @@ enum MPIDI_RMA_states {
MPIDI_RMA_LOCK_GRANTED, /* access */
};
-/* We start with an arbitrarily chosen number (42), to help with
- * debugging when a packet type is not initialized or wrongly
+/* We start with an arbitrarily chosen number (19), to help with
+ * debugging when a lock state is not initialized or wrongly
* initialized. */
enum MPIDI_CH3_Lock_states {
- MPIDI_CH3_WIN_LOCK_NONE = 42,
+ MPIDI_CH3_WIN_LOCK_NONE = 19,
MPIDI_CH3_WIN_LOCK_CALLED,
MPIDI_CH3_WIN_LOCK_REQUESTED,
MPIDI_CH3_WIN_LOCK_GRANTED,
@@ -274,16 +274,19 @@ enum MPIDI_Win_info_arv_vals_accumulate_ordering {
MPIDI_ACC_ORDER_WAW = 8
};
+/* We start with an arbitrarily chosen number (11), to help with
+ * debugging when an window info is not initialized or wrongly
+ * initialized. */
enum MPIDI_Win_info_arg_vals_accumulate_ops {
- MPIDI_ACC_OPS_SAME_OP,
+ MPIDI_ACC_OPS_SAME_OP = 11,
MPIDI_ACC_OPS_SAME_OP_NO_OP
};
-/* We start with an arbitrarily chosen number (42), to help with
- * debugging when a packet type is not initialized or wrongly
+/* We start with an arbitrarily chosen number (27), to help with
+ * debugging when an epoch state is not initialized or wrongly
* initialized. */
enum MPIDI_Win_epoch_states {
- MPIDI_EPOCH_NONE = 42,
+ MPIDI_EPOCH_NONE = 27,
MPIDI_EPOCH_FENCE,
MPIDI_EPOCH_POST,
MPIDI_EPOCH_START,
http://git.mpich.org/mpich.git/commitdiff/4ab9c23523108401125b2132903c0a417…
commit 4ab9c23523108401125b2132903c0a41773b5ab3
Author: Xin Zhao <xinzhao3(a)illinois.edu>
Date: Mon Nov 10 12:22:45 2014 -0600
Bug-fix: initialize sync_flag to MPIDI_RMA_SYNC_NONE.
MPIDI_RMA_NONE is the initial value of window state
and should not be used with sync flag. The initial
value of sync flag should be set to MPIDI_RMA_SYNC_NONE.
Signed-off-by: Rob Latham <robl(a)mcs.anl.gov>
diff --git a/src/mpid/ch3/include/mpid_rma_oplist.h b/src/mpid/ch3/include/mpid_rma_oplist.h
index 7d5b58c..3dd9176 100644
--- a/src/mpid/ch3/include/mpid_rma_oplist.h
+++ b/src/mpid/ch3/include/mpid_rma_oplist.h
@@ -119,7 +119,7 @@ static inline MPIDI_RMA_Target_t *MPIDI_CH3I_Win_target_alloc(MPID_Win * win_ptr
e->disable_flush_local = 0;
e->win_complete_flag = 0;
- e->sync.sync_flag = MPIDI_RMA_NONE;
+ e->sync.sync_flag = MPIDI_RMA_SYNC_NONE;
e->sync.outstanding_acks = 0;
e->sync.have_remote_incomplete_ops = 1; /* When I create a new target, there must be
incomplete ops until a FLUSH/UNLOCK packet
-----------------------------------------------------------------------
Summary of changes:
src/mpid/ch3/include/mpid_rma_oplist.h | 4 +-
src/mpid/ch3/include/mpid_rma_types.h | 16 +--
src/mpid/ch3/include/mpidpre.h | 36 ++---
src/mpid/ch3/src/ch3u_rma_acc_ops.c | 306 --------------------------------
src/mpid/ch3/src/ch3u_rma_sync.c | 5 +-
5 files changed, 19 insertions(+), 348 deletions(-)
delete mode 100644 src/mpid/ch3/src/ch3u_rma_acc_ops.c
hooks/post-receive
--
MPICH primary repository
1
0
[mpich] MPICH primary repository branch, master, updated. v3.1.3-166-g28e79b3
by noreply@mpich.org 11 Nov '14
by noreply@mpich.org 11 Nov '14
11 Nov '14
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "MPICH primary repository".
The branch, master has been updated
via 28e79b31121c2f2ec4a46422e78ec4bcaf67b18b (commit)
from cbc53593a83ade0654fe09ca82a13410d86b3a21 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.mpich.org/mpich.git/commitdiff/28e79b31121c2f2ec4a46422e78ec4bca…
commit 28e79b31121c2f2ec4a46422e78ec4bcaf67b18b
Author: Norio Yamaguchi <norio.yamaguchi(a)riken.jp>
Date: Tue Oct 7 09:38:12 2014 +0900
Fix malloc functions in netmod-IB
Instead of overriding malloc functions, set some hook functions only
when using netmod-IB.
diff --git a/src/mpid/ch3/channels/nemesis/netmod/ib/ib_malloc.c b/src/mpid/ch3/channels/nemesis/netmod/ib/ib_malloc.c
index 5cf81a4..569b4a7 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/ib/ib_malloc.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/ib/ib_malloc.c
@@ -1,11 +1,14 @@
#define _GNU_SOURCE 1
#include <stdio.h>
+#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#include <sys/mman.h>
#include <unistd.h>
#include <sys/syscall.h>
#include <pthread.h>
+#include <malloc.h>
+#include "mpid_nem_impl.h"
//#define __DEBUG__
@@ -22,10 +25,9 @@
#endif
static void _local_malloc_initialize_hook(void);
-void *malloc(size_t size);
-void free(void *addr);
-void *realloc(void *addr, size_t size);
-void *calloc(size_t nmemb, size_t size);
+void *ib_malloc_hook(size_t size, const void *caller);
+void ib_free_hook(void *addr, const void *caller);
+void *ib_realloc_hook(void *addr, size_t size, const void *caller);
void (*__malloc_initialize_hook) (void) = _local_malloc_initialize_hook;
@@ -47,6 +49,38 @@ static int __tunnel_munmap = 0;
#define do_segfault (*(unsigned int*)0 = 0) // segmentation fault
+static int use_ib_malloc = 0;
+
+static void ib_check_env(void)
+{
+ char *target = NULL, *tmp_str = NULL;
+
+ /* The order of comparison is the same as MPIR_T_cvar_init in mpich_cvars.c */
+ tmp_str = getenv("MPICH_NEMESIS_NETMOD");
+ if (tmp_str) {
+ target = tmp_str;
+ }
+ tmp_str = getenv("MPIR_PARAM_NEMESIS_NETMOD");
+ if (tmp_str) {
+ target = tmp_str;
+ }
+ tmp_str = getenv("MPIR_CVAR_NEMESIS_NETMOD");
+ if (tmp_str) {
+ target = tmp_str;
+ }
+
+ /* If environment variable is set, then compare with it.
+ * If environment variables are not set, then compare with the first element of netmod-list.
+ */
+ if ((target && !strncmp(target, "ib", MPID_NEM_MAX_NETMOD_STRING_LEN)) ||
+ (!target && !strncmp(MPID_nem_netmod_strings[0], "ib", MPID_NEM_MAX_NETMOD_STRING_LEN))) {
+ use_ib_malloc = 1;
+ __malloc_hook = ib_malloc_hook;
+ __free_hook = ib_free_hook;
+ __realloc_hook = ib_realloc_hook;
+ }
+}
+
struct free_list {
struct free_list *next;
struct free_list *prev;
@@ -206,6 +240,13 @@ static void _local_malloc_initialize_hook(void)
pthread_mutex_init(&mutex, NULL);
pthread_mutex_lock(&mutex);
+
+ ib_check_env();
+ if (!use_ib_malloc) {
+ pthread_mutex_unlock(&mutex);
+ return;
+ }
+
__initialized_malloc = 1;
for (i = 0; i < ARRAY_SIZE; i++) {
@@ -260,7 +301,7 @@ static void _local_malloc_initialize_hook(void)
pthread_mutex_unlock(&mutex);
}
-void *malloc(size_t size)
+void *ib_malloc_hook(size_t size, const void *caller)
{
int i;
int pow;
@@ -425,7 +466,7 @@ static inline void free_core(void *addr)
pthread_mutex_unlock(&mutex);
}
-void free(void *addr)
+void ib_free_hook(void *addr, const void *caller)
{
if (addr) {
free_core(addr);
@@ -433,13 +474,13 @@ void free(void *addr)
}
}
-void *realloc(void *addr, size_t size)
+void *ib_realloc_hook(void *addr, size_t size, const void *caller)
{
void *tmp;
dprintf("realloc(%p, %lu)\n", addr, size);
- tmp = malloc(size);
+ tmp = ib_malloc_hook(size, NULL);
if (addr != NULL) {
int old_pow, new_pow, power;
@@ -472,27 +513,9 @@ void *realloc(void *addr, size_t size)
return tmp;
}
-void *calloc(size_t nmemb, size_t size)
-{
- size_t total_sz;
- char *ptr;
-
- if (!nmemb || !size)
- return NULL;
-
- total_sz = nmemb * size;
- ptr = malloc(total_sz);
- if (ptr == NULL)
- return NULL;
-
- memset(ptr, 0, total_sz);
-
- return ptr;
-}
-
int munmap(void *addr, size_t length)
{
- if (__tunnel_munmap) {
+ if (!use_ib_malloc || __tunnel_munmap) {
dprintf("munmap(%p, 0x%lx)\n", addr, length);
return syscall(__NR_munmap, addr, length);
-----------------------------------------------------------------------
Summary of changes:
.../ch3/channels/nemesis/netmod/ib/ib_malloc.c | 77 +++++++++++++-------
1 files changed, 50 insertions(+), 27 deletions(-)
hooks/post-receive
--
MPICH primary repository
1
0
[mpich] MPICH primary repository branch, master, updated. v3.1.3-165-gcbc5359
by noreply@mpich.org 11 Nov '14
by noreply@mpich.org 11 Nov '14
11 Nov '14
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "MPICH primary repository".
The branch, master has been updated
via cbc53593a83ade0654fe09ca82a13410d86b3a21 (commit)
via 8790bf369140c557316bbdbc821f3c3c0e37120c (commit)
from 47cb41d1a3b338899c2ea5223d47ad211da2f209 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.mpich.org/mpich.git/commitdiff/cbc53593a83ade0654fe09ca82a13410d…
commit cbc53593a83ade0654fe09ca82a13410d86b3a21
Author: Norio Yamaguchi <norio.yamaguchi(a)riken.jp>
Date: Tue Nov 11 18:07:04 2014 +0900
Fix the implementation of RMA in netmod-IB
Corresponding to the implementations of RMA in the upper layer.
diff --git a/src/mpid/ch3/channels/nemesis/netmod/ib/ib_poll.c b/src/mpid/ch3/channels/nemesis/netmod/ib/ib_poll.c
index 938adf3..c5e8779 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/ib/ib_poll.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/ib/ib_poll.c
@@ -462,6 +462,7 @@ int MPID_nem_ib_drain_scq(int dont_call_progress)
req->dev.recv_data_sz = type_size * req->dev.user_count;
int complete = 0;
+ int (*reqFn) (MPIDI_VC_t *, MPID_Request *, int *);
mpi_errno =
MPIDI_CH3U_Receive_data_found(req, REQ_FIELD(req, lmt_pack_buf), &data_len,
&complete);
@@ -472,7 +473,12 @@ int MPID_nem_ib_drain_scq(int dont_call_progress)
MPIU_Free(REQ_FIELD(req, lmt_pack_buf));
MPID_nem_ib_lmt_send_PKT_LMT_DONE(req->ch.vc, req);
- MPIDI_CH3U_Request_complete(req);
+ reqFn = req->dev.OnFinal;
+ if (reqFn) {
+ reqFn(req->ch.vc, req, &complete);
+ } else {
+ MPIDI_CH3U_Request_complete(req);
+ }
}
/* decrement the number of entries in IB command queue */
@@ -498,7 +504,7 @@ int MPID_nem_ib_drain_scq(int dont_call_progress)
MPIU_Free(REQ_FIELD(req, lmt_pack_buf));
complete = 0;
- mpi_errno = MPIDI_CH3_ReqHandler_PutAccumRespComplete(req->ch.vc, req, &complete); // call MPIDI_CH3U_Request_complete()
+ mpi_errno = MPIDI_CH3_ReqHandler_PutRecvComplete(req->ch.vc, req, &complete); // call MPIDI_CH3U_Request_complete()
if (mpi_errno)
MPIU_ERR_POP(mpi_errno);
MPIU_Assert(complete == TRUE);
@@ -530,7 +536,7 @@ int MPID_nem_ib_drain_scq(int dont_call_progress)
/* All dtype data has been received, call req handler */
mpi_errno =
- MPIDI_CH3_ReqHandler_PutRespDerivedDTComplete(req->ch.vc, req, &complete);
+ MPIDI_CH3_ReqHandler_PutDerivedDTRecvComplete(req->ch.vc, req, &complete);
MPIU_ERR_CHKANDJUMP1(mpi_errno, mpi_errno, MPI_ERR_OTHER, "**ch3|postrecv",
"**ch3|postrecv %s", "MPIDI_CH3_PKT_PUT");
/* return 'complete == FALSE' */
@@ -571,7 +577,7 @@ int MPID_nem_ib_drain_scq(int dont_call_progress)
MPIU_Free(REQ_FIELD(req, lmt_pack_buf));
complete = 0;
- mpi_errno = MPIDI_CH3_ReqHandler_PutAccumRespComplete(req->ch.vc, req, &complete); // call MPIDI_CH3U_Request_complete()
+ mpi_errno = MPIDI_CH3_ReqHandler_AccumRecvComplete(req->ch.vc, req, &complete); // call MPIDI_CH3U_Request_complete()
if (mpi_errno)
MPIU_ERR_POP(mpi_errno);
MPIU_Assert(complete == TRUE);
@@ -603,7 +609,7 @@ int MPID_nem_ib_drain_scq(int dont_call_progress)
/* All dtype data has been received, call req handler */
mpi_errno =
- MPIDI_CH3_ReqHandler_AccumRespDerivedDTComplete(req->ch.vc, req, &complete);
+ MPIDI_CH3_ReqHandler_AccumDerivedDTRecvComplete(req->ch.vc, req, &complete);
MPIU_ERR_CHKANDJUMP1(mpi_errno, mpi_errno, MPI_ERR_OTHER, "**ch3|postrecv",
"**ch3|postrecv %s", "MPIDI_CH3_ACCUMULATE");
/* return 'complete == FALSE' */
@@ -1819,7 +1825,6 @@ int MPID_nem_ib_PktHandler_Put(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt,
MPIU_Assert(put_pkt->target_win_handle != MPI_WIN_NULL);
MPID_Win_get_ptr(put_pkt->target_win_handle, win_ptr);
- mpi_errno = MPIDI_CH3_Start_rma_op_target(win_ptr, put_pkt->flags);
req = MPID_Request_create();
MPIU_Object_set_ref(req, 1); /* decrement only in drain_scq ? */
@@ -1831,6 +1836,7 @@ int MPID_nem_ib_PktHandler_Put(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt,
req->dev.target_win_handle = put_pkt->target_win_handle;
req->dev.source_win_handle = put_pkt->source_win_handle;
req->dev.flags = put_pkt->flags;
+ req->dev.OnFinal = MPIDI_CH3_ReqHandler_PutRecvComplete;
if (MPIR_DATATYPE_IS_PREDEFINED(put_pkt->datatype)) {
MPIDI_Request_set_type(req, MPIDI_REQUEST_TYPE_PUT_RESP);
@@ -1838,6 +1844,12 @@ int MPID_nem_ib_PktHandler_Put(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt,
MPID_Datatype_get_size_macro(put_pkt->datatype, type_size);
req->dev.recv_data_sz = type_size * put_pkt->count;
+ if (put_pkt->immed_len > 0) {
+ /* See if we can receive some data from packet header. */
+ MPIU_Memcpy(req->dev.user_buf, put_pkt->data, put_pkt->immed_len);
+ req->dev.user_buf = (void*)((char*)req->dev.user_buf + put_pkt->immed_len);
+ req->dev.recv_data_sz -= put_pkt->immed_len;
+ }
}
else {
/* derived datatype */
@@ -1945,7 +1957,6 @@ int MPID_nem_ib_PktHandler_Accumulate(MPIDI_VC_t * vc,
MPIU_Assert(accum_pkt->target_win_handle != MPI_WIN_NULL);
MPID_Win_get_ptr(accum_pkt->target_win_handle, win_ptr);
- mpi_errno = MPIDI_CH3_Start_rma_op_target(win_ptr, accum_pkt->flags);
req = MPID_Request_create();
MPIU_Object_set_ref(req, 1);
@@ -1960,12 +1971,8 @@ int MPID_nem_ib_PktHandler_Accumulate(MPIDI_VC_t * vc,
req->dev.source_win_handle = accum_pkt->source_win_handle;
req->dev.flags = accum_pkt->flags;
- if (accum_pkt->type == MPIDI_CH3_PKT_GET_ACCUM) {
- req->dev.resp_request_handle = accum_pkt->request_handle;
- }
- else {
- req->dev.resp_request_handle = MPI_REQUEST_NULL;
- }
+ req->dev.resp_request_handle = MPI_REQUEST_NULL;
+ req->dev.OnFinal = MPIDI_CH3_ReqHandler_AccumRecvComplete;
if (MPIR_DATATYPE_IS_PREDEFINED(accum_pkt->datatype)) {
MPIDI_Request_set_type(req, MPIDI_REQUEST_TYPE_ACCUM_RESP);
@@ -1978,13 +1985,22 @@ int MPID_nem_ib_PktHandler_Accumulate(MPIDI_VC_t * vc,
MPIU_Assert(true_lb == 0);
req->dev.user_buf = MPIU_Malloc(accum_pkt->count * (MPIR_MAX(extent, true_extent)));
+ req->dev.final_user_buf = req->dev.user_buf;
MPID_Datatype_get_size_macro(accum_pkt->datatype, type_size);
req->dev.recv_data_sz = type_size * accum_pkt->count;
+
+ if (accum_pkt->immed_len > 0) {
+ /* See if we can receive some data from packet header. */
+ MPIU_Memcpy(req->dev.user_buf, accum_pkt->data, accum_pkt->immed_len);
+ req->dev.user_buf = (void*)((char*)req->dev.user_buf + accum_pkt->immed_len);
+ req->dev.recv_data_sz -= accum_pkt->immed_len;
+ }
+
}
else {
MPIDI_Request_set_type(req, MPIDI_REQUEST_TYPE_ACCUM_RESP_DERIVED_DT);
- req->dev.OnDataAvail = MPIDI_CH3_ReqHandler_AccumRespDerivedDTComplete;
+ req->dev.OnDataAvail = MPIDI_CH3_ReqHandler_AccumDerivedDTRecvComplete;
req->dev.datatype = MPI_DATATYPE_NULL;
req->dev.dtype_info = (MPIDI_RMA_dtype_info *) MPIU_Malloc(sizeof(MPIDI_RMA_dtype_info));
@@ -2137,6 +2153,25 @@ int MPID_nem_ib_PktHandler_GetResp(MPIDI_VC_t * vc,
MPID_Request_get_ptr(get_resp_pkt->request_handle, req);
+ MPID_Win *win_ptr;
+ int target_rank = get_resp_pkt->target_rank;
+
+ MPID_Win_get_ptr(get_resp_pkt->source_win_handle, win_ptr);
+
+ /* decrement ack_counter on target */
+ if (get_resp_pkt->flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_GRANTED) {
+ mpi_errno = set_lock_sync_counter(win_ptr, target_rank);
+ if (mpi_errno) MPIU_ERR_POP(mpi_errno);
+ }
+ if (get_resp_pkt->flags & MPIDI_CH3_PKT_FLAG_RMA_FLUSH_ACK) {
+ mpi_errno = MPIDI_CH3I_RMA_Handle_flush_ack(win_ptr, target_rank);
+ if (mpi_errno) MPIU_ERR_POP(mpi_errno);
+ }
+ if (get_resp_pkt->flags & MPIDI_CH3_PKT_FLAG_RMA_UNLOCK_ACK) {
+ mpi_errno = MPIDI_CH3I_RMA_Handle_flush_ack(win_ptr, target_rank);
+ if (mpi_errno) MPIU_ERR_POP(mpi_errno);
+ }
+
void *write_to_buf;
req->ch.lmt_data_sz = s_cookie_buf->len;
diff --git a/src/mpid/ch3/channels/nemesis/netmod/ib/ib_send.c b/src/mpid/ch3/channels/nemesis/netmod/ib/ib_send.c
index 152f33c..45c2006 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/ib/ib_send.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/ib/ib_send.c
@@ -302,9 +302,6 @@ static int MPID_nem_ib_iSendContig_core(MPIDI_VC_t * vc, MPID_Request * sreq, vo
if (((MPIDI_CH3_Pkt_t *) hdr)->type == MPIDI_CH3_PKT_GET) {
//printf("isendcontig_core,MPIDI_CH3_PKT_GET,ref_count=%d\n", sreq->ref_count);
}
- if (hdr && ((MPIDI_CH3_Pkt_t *) hdr)->type == MPIDI_CH3_PKT_ACCUM_IMMED) {
- dprintf("isendcontig_core,MPIDI_CH3_PKT_ACCUM_IMMED,ref_count=%d\n", sreq->ref_count);
- }
if (hdr && ((MPIDI_CH3_Pkt_t *) hdr)->type == MPIDI_CH3_PKT_ACCUMULATE) {
dprintf("isendcontig_core,MPIDI_CH3_PKT_ACCUMULATE,ref_count=%d\n", sreq->ref_count);
}
http://git.mpich.org/mpich.git/commitdiff/8790bf369140c557316bbdbc821f3c3c0…
commit 8790bf369140c557316bbdbc821f3c3c0e37120c
Author: Norio Yamaguchi <norio.yamaguchi(a)riken.jp>
Date: Tue Nov 11 15:17:05 2014 +0900
Fix compile error
diff --git a/src/mpid/ch3/channels/nemesis/netmod/ib/ib_poll.c b/src/mpid/ch3/channels/nemesis/netmod/ib/ib_poll.c
index e6cc5b4..938adf3 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/ib/ib_poll.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/ib/ib_poll.c
@@ -33,7 +33,7 @@ static int entered_drain_scq = 0;
mpi_errno = MPID_nem_ib_poll_eager(&MPID_nem_ib_ringbuf[n]); /*FIXME: perform send_progress for all sendqs */ \
MPIU_ERR_CHKANDJUMP(mpi_errno, mpi_errno, MPI_ERR_OTHER, "**MPID_nem_ib_poll_eager"); \
} \
- } while (0)
+ } while (0); \
}
#if 0
int n; \
-----------------------------------------------------------------------
Summary of changes:
src/mpid/ch3/channels/nemesis/netmod/ib/ib_poll.c | 65 ++++++++++++++++-----
src/mpid/ch3/channels/nemesis/netmod/ib/ib_send.c | 3 -
2 files changed, 50 insertions(+), 18 deletions(-)
hooks/post-receive
--
MPICH primary repository
1
0
[mpich] MPICH primary repository branch, master, updated. v3.1.3-163-g47cb41d
by noreply@mpich.org 10 Nov '14
by noreply@mpich.org 10 Nov '14
10 Nov '14
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "MPICH primary repository".
The branch, master has been updated
via 47cb41d1a3b338899c2ea5223d47ad211da2f209 (commit)
from 5da4e169ba4907771253b9ba986ece290d542f33 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.mpich.org/mpich.git/commitdiff/47cb41d1a3b338899c2ea5223d47ad211…
commit 47cb41d1a3b338899c2ea5223d47ad211da2f209
Author: Xin Zhao <xinzhao3(a)illinois.edu>
Date: Mon Nov 10 15:36:03 2014 -0600
Bug-fix: add CVAR category CH3 back.
We mistakenly deleted CVAR category 'CH3' when deleting
unnecessary CVARs in RMA, here we add it back.
Signed-off-by: Junchao Zhang <jczhang(a)mcs.anl.gov>
diff --git a/src/mpid/ch3/src/mpidi_rma.c b/src/mpid/ch3/src/mpidi_rma.c
index 6f056e2..f585656 100644
--- a/src/mpid/ch3/src/mpidi_rma.c
+++ b/src/mpid/ch3/src/mpidi_rma.c
@@ -10,6 +10,10 @@
/*
=== BEGIN_MPI_T_CVAR_INFO_BLOCK ===
+categories:
+ - name : CH3
+ description : cvars that control behavior of ch3
+
cvars:
- name : MPIR_CVAR_CH3_RMA_OP_WIN_POOL_SIZE
category : CH3
-----------------------------------------------------------------------
Summary of changes:
src/mpid/ch3/src/mpidi_rma.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
hooks/post-receive
--
MPICH primary repository
1
0
[mpich] MPICH primary repository branch, master, updated. v3.1.3-162-g5da4e16
by noreply@mpich.org 10 Nov '14
by noreply@mpich.org 10 Nov '14
10 Nov '14
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "MPICH primary repository".
The branch, master has been updated
via 5da4e169ba4907771253b9ba986ece290d542f33 (commit)
from e3e7d765e0c1629945faec4336bf2789e9ab07a8 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.mpich.org/mpich.git/commitdiff/5da4e169ba4907771253b9ba986ece290…
commit 5da4e169ba4907771253b9ba986ece290d542f33
Author: Junchao Zhang <jczhang(a)mcs.anl.gov>
Date: Mon Nov 10 14:35:35 2014 -0600
Fix: Explicitly add the OPA header file to mpiimpl.h
Without it, the code is broken in Intel's MPI build
Signed-off-by: Antonio J. Pena <apenya(a)mcs.anl.gov>
diff --git a/src/include/mpiimpl.h b/src/include/mpiimpl.h
index a6c0ad0..003bc07 100644
--- a/src/include/mpiimpl.h
+++ b/src/include/mpiimpl.h
@@ -36,6 +36,8 @@
do not want mpi.h to depend on any other files or configure flags */
#include "mpichconf.h"
+#include "opa_primitives.h"
+
/* if we are defining this, we must define it before including mpl.h */
#if defined(MPICH_DEBUG_MEMINIT)
#define MPL_VG_ENABLED 1
-----------------------------------------------------------------------
Summary of changes:
src/include/mpiimpl.h | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
hooks/post-receive
--
MPICH primary repository
1
0
[mpich] MPICH primary repository branch, master, updated. v3.1.3-161-ge3e7d76
by noreply@mpich.org 10 Nov '14
by noreply@mpich.org 10 Nov '14
10 Nov '14
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "MPICH primary repository".
The branch, master has been updated
via e3e7d765e0c1629945faec4336bf2789e9ab07a8 (commit)
from 457e3795e5b70187cda06a2807486b36fc851988 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.mpich.org/mpich.git/commitdiff/e3e7d765e0c1629945faec4336bf2789e…
commit e3e7d765e0c1629945faec4336bf2789e9ab07a8
Author: Wesley Bland <wbland(a)anl.gov>
Date: Mon Nov 10 09:49:53 2014 -0600
Remove unused variable
No reviewer
diff --git a/src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt.c b/src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt.c
index 5df9a57..e7cdb6e 100644
--- a/src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt.c
+++ b/src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt.c
@@ -49,8 +49,6 @@ static int pkt_CTS_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, MPIDI_msg_sz_t
static int pkt_DONE_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, MPIDI_msg_sz_t *buflen, MPID_Request **rreqp);
static int pkt_COOKIE_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, MPIDI_msg_sz_t *buflen, MPID_Request **rreqp);
-static int warning_printed = 0;
-
#undef FUNCNAME
#define FUNCNAME MPID_nem_lmt_pkthandler_init
#undef FCNAME
-----------------------------------------------------------------------
Summary of changes:
src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt.c | 2 --
1 files changed, 0 insertions(+), 2 deletions(-)
hooks/post-receive
--
MPICH primary repository
1
0