Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
fmpi
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
raphael.bach
fmpi
Commits
a122bef1
Verified
Commit
a122bef1
authored
2 years ago
by
raphael.bach
Browse files
Options
Downloads
Patches
Plain Diff
Add `fmpi_world_size()`
parent
4f5c99b1
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/fmpi_core.h
+4
-0
4 additions, 0 deletions
include/fmpi_core.h
src/fmpi_core.c
+12
-0
12 additions, 0 deletions
src/fmpi_core.c
with
16 additions
and
0 deletions
include/fmpi_core.h
+
4
−
0
View file @
a122bef1
...
...
@@ -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
==============================================================================*/
...
...
This diff is collapsed.
Click to expand it.
src/fmpi_core.c
+
12
−
0
View file @
a122bef1
...
...
@@ -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
;
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment