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
09de4943
Commit
09de4943
authored
5 years ago
by
James Willis
Browse files
Options
Downloads
Patches
Plain Diff
Renamed WITH_FOF_TIMING macro to WITHOUT_GROUP_PROPS.
parent
03964eb8
No related branches found
No related tags found
1 merge request
!930
Parco 2019 debug
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/fof.c
+15
-15
15 additions, 15 deletions
src/fof.c
with
15 additions
and
15 deletions
src/fof.c
+
15
−
15
View file @
09de4943
...
...
@@ -52,8 +52,8 @@
#define UNION_BY_SIZE_OVER_MPI (1)
#define FOF_COMPRESS_PATHS_MIN_LENGTH (2)
/* Are we timing the FOF? */
//#define WITH
_FOF_TIMING
/* Are we timing
calculating group properties in
the FOF? */
//#define WITH
OUT_GROUP_PROPS
/**
* @brief Properties of a group used for black hole seeding
...
...
@@ -437,7 +437,7 @@ __attribute__((always_inline)) INLINE static size_t fof_find_global(
#endif
/* WITH_MPI */
#ifndef WITH
_FOF_TIMING
#ifndef WITH
OUT_GROUP_PROPS
/**
* @brief Finds the local root ID of the group a particle exists in
* when group_index contains globally unique identifiers -
...
...
@@ -472,7 +472,7 @@ __attribute__((always_inline)) INLINE static size_t fof_find_local(
return
root
;
#endif
}
#endif
/* #ifndef WITH
_FOF_TIMING
*/
#endif
/* #ifndef WITH
OUT_GROUP_PROPS
*/
/**
* @brief Finds the local root ID of the group a particle exists in.
...
...
@@ -2541,7 +2541,7 @@ void fof_search_tree(struct fof_props *props,
const
size_t
nr_gparts
=
s
->
nr_gparts
;
const
size_t
min_group_size
=
props
->
min_group_size
;
#ifndef WITH
_FOF_TIMING
#ifndef WITH
OUT_GROUP_PROPS
const
size_t
group_id_offset
=
props
->
group_id_offset
;
const
size_t
group_id_default
=
props
->
group_id_default
;
#endif
...
...
@@ -2626,7 +2626,7 @@ void fof_search_tree(struct fof_props *props,
#endif
size_t
num_groups_local
=
0
;
#ifndef WITH
_FOF_TIMING
#ifndef WITH
OUT_GROUP_PROPS
size_t
num_parts_in_groups_local
=
0
;
size_t
max_group_size_local
=
0
;
#endif
...
...
@@ -2645,7 +2645,7 @@ void fof_search_tree(struct fof_props *props,
num_groups_local
++
;
#endif
#ifndef WITH
_FOF_TIMING
#ifndef WITH
OUT_GROUP_PROPS
/* Find the total number of particles in groups. */
if
(
group_size
[
i
]
>=
min_group_size
)
num_parts_in_groups_local
+=
group_size
[
i
];
...
...
@@ -2663,7 +2663,7 @@ void fof_search_tree(struct fof_props *props,
/* Sort the groups in descending order based upon size and re-label their IDs
* 0-num_groups. */
#ifndef WITH
_FOF_TIMING
#ifndef WITH
OUT_GROUP_PROPS
struct
group_length
*
high_group_sizes
=
NULL
;
int
group_count
=
0
;
...
...
@@ -2688,7 +2688,7 @@ void fof_search_tree(struct fof_props *props,
}
ticks
tic
=
getticks
();
#endif
/* #ifndef WITH
_FOF_TIMING
*/
#endif
/* #ifndef WITH
OUT_GROUP_PROPS
*/
/* Find global properties. */
#ifdef WITH_MPI
...
...
@@ -2700,23 +2700,23 @@ void fof_search_tree(struct fof_props *props,
clocks_from_ticks
(
getticks
()
-
tic_num_groups_calc
),
clocks_getunit
());
#ifndef WITH
_FOF_TIMING
#ifndef WITH
OUT_GROUP_PROPS
MPI_Reduce
(
&
num_parts_in_groups_local
,
&
num_parts_in_groups
,
1
,
MPI_INT
,
MPI_SUM
,
0
,
MPI_COMM_WORLD
);
MPI_Reduce
(
&
max_group_size_local
,
&
max_group_size
,
1
,
MPI_INT
,
MPI_MAX
,
0
,
MPI_COMM_WORLD
);
#endif
/* #ifndef WITH
_FOF_TIMING
*/
#endif
/* #ifndef WITH
OUT_GROUP_PROPS
*/
#else
num_groups
=
num_groups_local
;
#ifndef WITH
_FOF_TIMING
#ifndef WITH
OUT_GROUP_PROPS
num_parts_in_groups
=
num_parts_in_groups_local
;
max_group_size
=
max_group_size_local
;
#endif
/* #ifndef WITH
_FOF_TIMING
*/
#endif
/* #ifndef WITH
OUT_GROUP_PROPS
*/
#endif
/* WITH_MPI */
props
->
num_groups
=
num_groups
;
#ifndef WITH
_FOF_TIMING
#ifndef WITH
OUT_GROUP_PROPS
/* Find number of groups on lower numbered MPI ranks */
#ifdef WITH_MPI
...
...
@@ -2917,7 +2917,7 @@ void fof_search_tree(struct fof_props *props,
/* Free the left-overs */
swift_free
(
"fof_high_group_sizes"
,
high_group_sizes
);
#endif
/* #ifndef WITH
_FOF_TIMING
*/
#endif
/* #ifndef WITH
OUT_GROUP_PROPS
*/
swift_free
(
"fof_group_index"
,
props
->
group_index
);
swift_free
(
"fof_group_size"
,
props
->
group_size
);
swift_free
(
"fof_group_mass"
,
props
->
group_mass
);
...
...
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