Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SWIFT
SWIFTsim
Commits
2e9eaaf9
Commit
2e9eaaf9
authored
Feb 25, 2020
by
Matthieu Schaller
Browse files
Time the reordering of particles in space_rebuild()
parent
ae84635d
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/space.c
View file @
2e9eaaf9
...
...
@@ -1321,6 +1321,8 @@ void space_rebuild(struct space *s, int repartitioned, int verbose) {
"counter."
);
#endif
const
ticks
tic2
=
getticks
();
/* Move non-local parts and inhibited parts to the end of the list. */
if
((
with_dithering
||
!
repartitioned
)
&&
(
s
->
e
->
nr_nodes
>
1
||
count_inhibited_parts
>
0
))
{
...
...
@@ -1520,6 +1522,10 @@ void space_rebuild(struct space *s, int repartitioned, int verbose) {
}
}
if
(
verbose
)
message
(
"Moving non-local particles took %.3f %s."
,
clocks_from_ticks
(
getticks
()
-
tic2
),
clocks_getunit
());
#ifdef SWIFT_DEBUG_CHECKS
/* Check that all gparts are in the correct place. */
size_t
check_count_inhibited_gpart
=
0
;
...
...
@@ -1900,7 +1906,7 @@ void space_rebuild(struct space *s, int repartitioned, int verbose) {
#endif
/* Hook the cells up to the parts. Make list of local and non-empty cells */
ticks
tic
2
=
getticks
();
const
ticks
tic
3
=
getticks
();
struct
part
*
finger
=
s
->
parts
;
struct
xpart
*
xfinger
=
s
->
xparts
;
struct
gpart
*
gfinger
=
s
->
gparts
;
...
...
@@ -1966,7 +1972,7 @@ void space_rebuild(struct space *s, int repartitioned, int verbose) {
message
(
"Have %d local top-level cells (total=%d)"
,
s
->
nr_local_cells
,
s
->
nr_cells
);
message
(
"hooking up cells took %.3f %s."
,
clocks_from_ticks
(
getticks
()
-
tic
2
),
clocks_getunit
());
clocks_from_ticks
(
getticks
()
-
tic
3
),
clocks_getunit
());
}
/* Re-order the extra particles such that they are at the end of their cell's
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment