Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
SWIFTsim
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
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
SWIFT
SWIFTsim
Commits
c4508535
Commit
c4508535
authored
6 years ago
by
James Willis
Browse files
Options
Downloads
Patches
Plain Diff
Fix MPI reduction.
parent
afb631f8
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!543
Fof
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/fof.c
+7
-3
7 additions, 3 deletions
src/fof.c
with
7 additions
and
3 deletions
src/fof.c
+
7
−
3
View file @
c4508535
...
@@ -2208,10 +2208,14 @@ void fof_dump_group_data(char *out_file, struct space *s, int num_groups,
...
@@ -2208,10 +2208,14 @@ void fof_dump_group_data(char *out_file, struct space *s, int num_groups,
int
total_bh_seed_count
=
0
;
int
total_bh_seed_count
=
0
;
#ifdef WITH_MPI
/* Sum the total number of black holes over each MPI rank. */
/* Sum the total number of black holes over each MPI rank. */
MPI_Allreduce
(
&
bh_seed_count
,
&
total_bh_seed_count
,
1
,
MPI_INT
,
MPI_Reduce
(
&
bh_seed_count
,
&
total_bh_seed_count
,
1
,
MPI_INT
,
MPI_SUM
,
MPI_COMM_WORLD
);
MPI_SUM
,
0
,
MPI_COMM_WORLD
);
#else
total_bh_seed_count
=
bh_seed_count
;
#endif
if
(
engine_rank
==
0
)
if
(
engine_rank
==
0
)
message
(
"Seeding %d black hole(s)."
,
total_bh_seed_count
);
message
(
"Seeding %d black hole(s)."
,
total_bh_seed_count
);
...
...
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