Skip to content

Commit

Permalink
Improve error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinstratford committed Nov 24, 2024
1 parent 4da9164 commit e1e277b
Show file tree
Hide file tree
Showing 3 changed files with 1,142 additions and 600 deletions.
7 changes: 7 additions & 0 deletions mpi_s/mpi.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,17 @@ typedef intmax_t MPI_Offset;

enum return_codes {
MPI_SUCCESS = 0, /* Success */
MPI_ERR_ACCESS, /* Permission denied */
MPI_ERR_AMODE, /* Invalid mode argument */
MPI_ERR_ARG, /* Invalid argument of other kind */
MPI_ERR_BUFFER, /* Invalid buffer pointer argument */
MPI_ERR_COMM, /* Invalid communicator argument */
MPI_ERR_COUNT, /* Invalid count argument */
MPI_ERR_DATATYPE, /* Invalid datatype */
MPI_ERR_INFO, /* Invalid info argument */
MPI_ERR_ERRHANDLER, /* Invalid errhandler handle */
MPI_ERR_INTERN, /* Internal (implementation) error */
MPI_ERR_IO, /* Other i/o error */
MPI_ERR_FILE, /* Bad file handle */
MPI_ERR_NO_SUCH_FILE, /* File does not exist */
MPI_ERR_OP, /* Invalid operation argument */
Expand Down Expand Up @@ -263,6 +268,8 @@ int MPI_Cart_sub(MPI_Comm comm, int * remain_dims, MPI_Comm * new_comm);
/* Bindings for environmental inquiry */

int MPI_Errhandler_set(MPI_Comm comm, MPI_Errhandler errhandler);
int MPI_Error_string(int ierr, char * str, int * lenresult);
int MPI_Error_class(int ierrcode, int * ierrclass);

double MPI_Wtime(void);
double MPI_Wtick(void);
Expand Down
Loading

0 comments on commit e1e277b

Please sign in to comment.