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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
raphael.bach
fmpi
Commits
c78d69f5
Verified
Commit
c78d69f5
authored
3 years ago
by
raphael.bach
Browse files
Options
Downloads
Patches
Plain Diff
Add `fmpi_world_barrier()`
parent
51553619
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show 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 @
c78d69f5
...
...
@@ -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
==============================================================================*/
...
...
This diff is collapsed.
Click to expand it.
src/fmpi_core.c
+
12
−
0
View file @
c78d69f5
...
...
@@ -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
;
}
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