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

Add `fmpi_world_size()`

parent 4f5c99b1
No related branches found
No related tags found
No related merge requests found
......@@ -134,6 +134,10 @@ int fmpi_run_task(const struct fmpi_ctx * ctx, struct fmpi_task * task);
fmpi_sync()
------------------------------------------------------------------------------*/
int fmpi_sync(const struct fmpi_ctx * ctx);
/*------------------------------------------------------------------------------
fmpi_world_size()
------------------------------------------------------------------------------*/
int fmpi_world_size(const struct fmpi_ctx * ctx);
/*==============================================================================
MACRO
==============================================================================*/
......
......@@ -137,3 +137,15 @@ int fmpi_sync(const struct fmpi_ctx * const ctx)
}
return err;
}
/*------------------------------------------------------------------------------
fmpi_world_size()
------------------------------------------------------------------------------*/
int fmpi_world_size(const struct fmpi_ctx * const ctx)
{
assert(ctx != NULL);
const int size = fmpi_mpi_world_size(ctx->mpi);
if(size < FMPI_SUCCESS) {
FMPI_RAISE_ERROR(ctx->err_handler, "FMPI", "fmpi_mpi_world_size() failed!");
}
return size;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment