Skip to content

Commit

Permalink
ch4: MPI_Comm_connect to return MPI_ERR_PORT
Browse files Browse the repository at this point in the history
When MPI_Comm_connect timeout, by convention we return error class
MPI_ERR_PORT.
  • Loading branch information
hzhou committed Jan 30, 2022
1 parent 721d446 commit 933ae45
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/mpid/ch4/src/ch4_spawn.c
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,12 @@ int MPID_Comm_connect(const char *port_name, MPIR_Info * info, int root, MPIR_Co
bool is_sender = true;
mpi_errno = dynamic_intercomm_create(port_name, info, root, comm,
timeout, is_sender, newcomm_ptr);
if (mpi_errno == MPIX_ERR_TIMEOUT) {
/* when connect timeout, a likely reason is the server not ready.
* By convention, we return MPI_ERR_PORT.
*/
MPIR_ERR_SETANDSTMT(mpi_errno, MPI_ERR_PORT, goto fn_fail, "**fail");
}
MPIR_ERR_CHECK(mpi_errno);

fn_exit:
Expand Down

0 comments on commit 933ae45

Please sign in to comment.