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

Add `fmpi_mpi_world_barrier()`

parent c71271be
No related branches found
No related tags found
No related merge requests found
......@@ -199,6 +199,10 @@ _Bool fmpi_mpi_finalized(const struct fmpi_mpi_ctx * ctx);
* }
*/
void fmpi_mpi_abort(const struct fmpi_mpi_ctx * ctx);
/*------------------------------------------------------------------------------
fmpi_mpi_world_barrier()
------------------------------------------------------------------------------*/
int fmpi_mpi_world_barrier(const struct fmpi_mpi_ctx * ctx);
/*==============================================================================
GUARD
==============================================================================*/
......
......@@ -173,3 +173,15 @@ void fmpi_mpi_abort(const struct fmpi_mpi_ctx * const ctx)
fmpi_mpi_check_error(ctx, err_id, "MPI_Abort");
}
}
/*------------------------------------------------------------------------------
fmpi_mpi_world_barrier()
------------------------------------------------------------------------------*/
int fmpi_mpi_world_barrier(const struct fmpi_mpi_ctx * const ctx)
{
assert(ctx != NULL);
const int err_id = MPI_Barrier(MPI_COMM_WORLD);
if(fmpi_mpi_check_error(ctx, err_id, "MPI_Barrier") == true) {
return -1;
}
return err_id;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment