Skip to content

Commit 20c772e

Browse files
committed
Cleanup language about MPI exceptions --> errors
MPI-4 is finally cleaning up its language: an MPI "exception" does not actually exist. The only thing that exists is an MPI "error" (and associated handlers). This commit replaces all relevant uses of the word "exception" with "error". Note that this is still applicable in versions of the MPI standard less than MPI-4.0 (indeed, nearly all the cases fixed in this commit are just changes to comments, anyway). One exception to this is the Java bindings, where there's an MPIException class. In hindsight, it probably should have been named MPIError, but changing it now would break anyone who is using the Java bindings. Signed-off-by: Jeff Squyres <jsquyres@cisco.com>
1 parent 1e11933 commit 20c772e

39 files changed

+411
-408
lines changed

ompi/communicator/comm_init.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ static void ompi_comm_destruct(ompi_communicator_t* comm)
419419
from one communicator to another and we end up destroying the
420420
new communication while propagating the error up the stack. We
421421
want to make it all the way up the stack to invoke the MPI
422-
exception, not cause a seg fault in pml_del_comm because it was
422+
error, not cause a seg fault in pml_del_comm because it was
423423
never pml_add_com'ed. */
424424

425425
if ( MPI_COMM_NULL != comm && OMPI_COMM_IS_PML_ADDED(comm) ) {

ompi/errhandler/errhandler.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ struct ompi_request_t;
381381
*
382382
* @returns err_code The same value as the parameter
383383
*
384-
* This function invokes the MPI exception function on the error
384+
* This function invokes the MPI error function on the error
385385
* handler. If the errhandler was created from fortran, the error
386386
* handler will be invoked with fortran linkage. Otherwise, it is
387387
* invoked with C linkage.
@@ -394,7 +394,7 @@ struct ompi_request_t;
394394

395395

396396
/**
397-
* Invoke an MPI exception on the first request found in the array
397+
* Invoke an MPI error on the first request found in the array
398398
* that has a non-MPI_SUCCESS value for MPI_ERROR in its status. It
399399
* is safe to invoke this function if none of the requests have an
400400
* outstanding error; MPI_SUCCESS will be returned.

ompi/errhandler/errhandler_invoke.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ int ompi_errhandler_request_invoke(int count,
141141
ompi_mpi_object_t mpi_object;
142142

143143
/* Find the *first* request that has an error -- that's the one
144-
that we'll invoke the exception on. In an error condition, the
144+
that we'll invoke the error on. In an error condition, the
145145
request will not have been reset back to MPI_REQUEST_NULL, so
146146
there's no need to cache values from before we call
147147
ompi_request_test(). */
@@ -162,18 +162,18 @@ int ompi_errhandler_request_invoke(int count,
162162

163163
/* Since errors on requests cause them to not be freed (until we
164164
can examine them here), go through and free all requests with
165-
errors. We only invoke the exception on the *first* request
165+
errors. We only invoke the error on the *first* request
166166
that had an error. */
167167
for (; i < count; ++i) {
168168
if (MPI_REQUEST_NULL != requests[i] &&
169169
MPI_SUCCESS != requests[i]->req_status.MPI_ERROR) {
170170
/* Ignore the error -- what are we going to do? We're
171-
already going to invoke an exception */
171+
already going to invoke an error */
172172
ompi_request_free(&(requests[i]));
173173
}
174174
}
175175

176-
/* Invoke the exception */
176+
/* Invoke the error */
177177
switch (type) {
178178
case OMPI_REQUEST_PML:
179179
case OMPI_REQUEST_COLL:

ompi/mca/io/base/io_base_find_available.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ static int init_query_2_0_0(const mca_base_component_t *ls,
5353
* and destroy the opened list.
5454
*
5555
* It is *not* an error if there are no io components available.
56-
* Appropriate run-time MPI exceptions will be invoked during
56+
* Appropriate run-time MPI errors will be invoked during
5757
* MPI_FILE_OPEN and MPI_FILE_DELETE.
5858
*/
5959
int mca_io_base_find_available(bool enable_progress_threads,

ompi/mpi/c/errhandler_free.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ int MPI_Errhandler_free(MPI_Errhandler *errhandler)
4444

4545
if (MPI_PARAM_CHECK) {
4646
OMPI_ERR_INIT_FINALIZE(FUNC_NAME);
47-
/* Raise an MPI exception if we got NULL or if we got an intrinsic
47+
/* Raise an MPI error if we got NULL or if we got an intrinsic
4848
*and* the reference count is 1 (meaning that this FREE would
4949
actually free the underlying intrinsic object). This is ugly
5050
but necessary -- see below. */

ompi/mpi/java/java/CartComm.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ protected CartComm(long[] commRequest)
9292
* Duplicates this communicator.
9393
* <p>Java binding of {@code MPI_COMM_DUP}.
9494
* @return copy of this communicator
95-
* @throws MPIException Signals that an MPI exception of some sort has occurred.
95+
* @throws MPIException Signals that an MPI error of some sort has occurred.
9696
*/
9797
@Override public CartComm dup() throws MPIException
9898
{
@@ -106,7 +106,7 @@ protected CartComm(long[] commRequest)
106106
* <p>The new communicator can't be used before the operation completes.
107107
* The request object must be obtained calling {@link #getRequest}.
108108
* @return copy of this communicator
109-
* @throws MPIException Signals that an MPI exception of some sort has occurred. Signals that an MPI exception of some sort has occurred.
109+
* @throws MPIException Signals that an MPI error of some sort has occurred. Signals that an MPI exception of some sort has occurred.
110110
*/
111111
@Override public CartComm iDup() throws MPIException
112112
{
@@ -119,7 +119,7 @@ protected CartComm(long[] commRequest)
119119
* <p>Java binding of {@code MPI_COMM_DUP_WITH_INFO}.
120120
* @param info info object to associate with the new communicator
121121
* @return copy of this communicator
122-
* @throws MPIException Signals that an MPI exception of some sort has occurred.
122+
* @throws MPIException Signals that an MPI error of some sort has occurred.
123123
*/
124124
@Override public CartComm dupWithInfo(Info info) throws MPIException
125125
{
@@ -134,7 +134,7 @@ protected CartComm(long[] commRequest)
134134
* <p>The number of dimensions can be obtained from the size of (eg)
135135
* {@code dims} field of the returned object.
136136
* @return object containing dimensions, periods and local coordinates
137-
* @throws MPIException Signals that an MPI exception of some sort has occurred.
137+
* @throws MPIException Signals that an MPI error of some sort has occurred.
138138
*/
139139
public CartParms getTopo() throws MPIException
140140
{
@@ -149,7 +149,7 @@ public CartParms getTopo() throws MPIException
149149
* <p>Java binding of the MPI operation {@code MPI_CART_RANK}.
150150
* @param coords Cartesian coordinates of a process
151151
* @return rank of the specified process
152-
* @throws MPIException Signals that an MPI exception of some sort has occurred.
152+
* @throws MPIException Signals that an MPI error of some sort has occurred.
153153
*/
154154
public int getRank(int[] coords) throws MPIException
155155
{
@@ -164,7 +164,7 @@ public int getRank(int[] coords) throws MPIException
164164
* <p>Java binding of the MPI operation {@code MPI_CART_COORDS}.
165165
* @param rank rank of a process
166166
* @return Cartesian coordinates of the specified process
167-
* @throws MPIException Signals that an MPI exception of some sort has occurred.
167+
* @throws MPIException Signals that an MPI error of some sort has occurred.
168168
*/
169169
public int[] getCoords(int rank) throws MPIException
170170
{
@@ -180,7 +180,7 @@ public int[] getCoords(int rank) throws MPIException
180180
* @param direction coordinate dimension of shift
181181
* @param disp displacement
182182
* @return object containing ranks of source and destination processes
183-
* @throws MPIException Signals that an MPI exception of some sort has occurred.
183+
* @throws MPIException Signals that an MPI error of some sort has occurred.
184184
*/
185185
public ShiftParms shift(int direction, int disp) throws MPIException
186186
{
@@ -197,7 +197,7 @@ private native ShiftParms shift(long comm, int direction, int disp)
197197
* @param remainDims by dimension, {@code true} if dimension is to be kept,
198198
* {@code false} otherwise
199199
* @return communicator containing subgrid including this process
200-
* @throws MPIException Signals that an MPI exception of some sort has occurred.
200+
* @throws MPIException Signals that an MPI error of some sort has occurred.
201201
*/
202202
public CartComm sub(boolean[] remainDims) throws MPIException
203203
{
@@ -215,7 +215,7 @@ public CartComm sub(boolean[] remainDims) throws MPIException
215215
* @param periods {@code true} if grid is periodic,
216216
* {@code false} if not, in each dimension
217217
* @return reordered rank of calling process
218-
* @throws MPIException Signals that an MPI exception of some sort has occurred.
218+
* @throws MPIException Signals that an MPI error of some sort has occurred.
219219
*/
220220
public int map(int[] dims, boolean[] periods) throws MPIException
221221
{
@@ -231,7 +231,7 @@ private native int map(long comm, int[] dims, boolean[] periods)
231231
* <p>Java binding of the MPI operation {@code MPI_DIMS_CREATE}.
232232
* @param nnodes number of nodes in a grid
233233
* @param dims array specifying the number of nodes in each dimension
234-
* @throws MPIException Signals that an MPI exception of some sort has occurred.
234+
* @throws MPIException Signals that an MPI error of some sort has occurred.
235235
*/
236236
public static void createDims(int nnodes, int[] dims) throws MPIException
237237
{

0 commit comments

Comments
 (0)