Skip to content
Snippets Groups Projects
Verified Commit f2f4e84d authored by raphael.bach's avatar raphael.bach
Browse files

Add `fmpi_mpi_abort()`

parent e6f39a0c
No related branches found
No related tags found
No related merge requests found
......@@ -184,6 +184,22 @@ int fmpi_mpi_world_rank(const struct fmpi_mpi_ctx * ctx);
* }
*/
_Bool fmpi_mpi_finalized(const struct fmpi_mpi_ctx * ctx);
/*------------------------------------------------------------------------------
fmpi_mpi_abort()
------------------------------------------------------------------------------*/
/**
* Terminates MPI execution environment.
*
* @param[in] ctx : A pointer to a fmpi_mpi_ctx.
*
* @warning
* - \b [UB] \p{ctx} must not be `NULL`.
*
* @example{
* TODO
* }
*/
void fmpi_mpi_abort(const struct fmpi_mpi_ctx * ctx);
/*==============================================================================
GUARD
==============================================================================*/
......
......@@ -162,3 +162,12 @@ _Bool fmpi_mpi_finalized(const struct fmpi_mpi_ctx * const ctx)
}
return finalized;
}
/*------------------------------------------------------------------------------
fmpi_mpi_abort()
------------------------------------------------------------------------------*/
void fmpi_mpi_abort(const struct fmpi_mpi_ctx * const ctx)
{
assert(ctx != NULL);
int err_id = MPI_Abort(MPI_COMM_WORLD, 1);
fmpi_mpi_check_error(ctx, err_id, "MPI_Abort");
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment