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

Add `fmpi_world_barrier()`

parent 51553619
Branches
Tags
No related merge requests found
......@@ -121,6 +121,10 @@ _Bool fmpi_is_root(const struct fmpi_ctx * ctx);
* TODO
*/
int fmpi_world_rank(const struct fmpi_ctx * ctx);
/*------------------------------------------------------------------------------
fmpi_world_barrier()
------------------------------------------------------------------------------*/
int fmpi_world_barrier(const struct fmpi_ctx * ctx);
/*==============================================================================
MACRO
==============================================================================*/
......
......@@ -82,3 +82,15 @@ int fmpi_world_rank(const struct fmpi_ctx * const ctx)
}
return rank;
}
/*------------------------------------------------------------------------------
fmpi_world_barrier()
------------------------------------------------------------------------------*/
int fmpi_world_barrier(const struct fmpi_ctx * const ctx)
{
assert(ctx != NULL);
const int err_id = fmpi_mpi_world_barrier(ctx->mpi);
if(err_id == -1) {
FMPI_RAISE_ERROR(ctx->err_handler, "FMPI", "fmpi_mpi_world_barrier() failed!");
}
return err_id;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment