Skip to content

Commit bd246fb

Browse files
committed
init: enhance error message **psetinvalidn
Add the index to the error message in MPIR_Session_get_nth_pset_impl.
1 parent 9f55106 commit bd246fb

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/mpi/errhan/errnames.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
**finalized:MPI has already called MPI_Finalize
1111
**inittwice:Cannot call MPI_INIT or MPI_INIT_THREAD more than once
1212
**psetinvalidn:Invalid pset number
13+
**psetinvalidn %d:Invalid pset number - %d
1314
**psetinvalidname:Invalid pset name
1415
**session:Invalid MPI_Session handle
1516
**sessionnull: NULL MPI_Session

src/mpi/init/init_impl.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,8 @@ int MPIR_Session_get_nth_pset_impl(MPIR_Session * session_ptr, MPIR_Info * info_
195195
}
196196

197197
if (!MPIR_pset_list[i]) {
198-
MPIR_ERR_SETANDSTMT(mpi_errno, MPI_ERR_ARG, goto fn_fail, "**psetinvalidn");
198+
MPIR_ERR_SETANDSTMT1(mpi_errno, MPI_ERR_ARG, goto fn_fail, "**psetinvalidn",
199+
"**psetinvalidn %d", n);
199200
}
200201

201202
int len = strlen(MPIR_pset_list[i]);

0 commit comments

Comments
 (0)