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
7dd3298d
Commit
7dd3298d
authored
8 years ago
by
Matthieu Schaller
Browse files
Options
Downloads
Patches
Plain Diff
Re-instate the clearing of the sorted flag when receiving particles.
parent
81265160
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!343
Subset sorting
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/runner.c
+16
-8
16 additions, 8 deletions
src/runner.c
with
16 additions
and
8 deletions
src/runner.c
+
16
−
8
View file @
7dd3298d
...
@@ -1504,9 +1504,11 @@ void runner_do_end_force(struct runner *r, struct cell *c, int timer) {
...
@@ -1504,9 +1504,11 @@ void runner_do_end_force(struct runner *r, struct cell *c, int timer) {
*
*
* @param r The runner thread.
* @param r The runner thread.
* @param c The cell.
* @param c The cell.
* @param clear_sorts Should we clear the sort flag and hence trigger a sort ?
* @param timer Are we timing this ?
* @param timer Are we timing this ?
*/
*/
void
runner_do_recv_part
(
struct
runner
*
r
,
struct
cell
*
c
,
int
timer
)
{
void
runner_do_recv_part
(
struct
runner
*
r
,
struct
cell
*
c
,
int
clear_sorts
,
int
timer
)
{
#ifdef WITH_MPI
#ifdef WITH_MPI
...
@@ -1523,9 +1525,13 @@ void runner_do_recv_part(struct runner *r, struct cell *c, int timer) {
...
@@ -1523,9 +1525,13 @@ void runner_do_recv_part(struct runner *r, struct cell *c, int timer) {
float
h_max
=
0
.
f
;
float
h_max
=
0
.
f
;
#ifdef SWIFT_DEBUG_CHECKS
#ifdef SWIFT_DEBUG_CHECKS
if
(
c
->
nodeID
==
engine_rank
)
error
(
"Updating a local cell!"
);
if
(
c
->
nodeID
==
engine_rank
)
error
(
"Updating a local cell!"
);
#endif
#endif
/* Clear this cell's sorted mask. */
if
(
clear_sorts
)
c
->
sorted
=
0
;
/* If this cell is a leaf, collect the particle data. */
/* If this cell is a leaf, collect the particle data. */
if
(
!
c
->
split
)
{
if
(
!
c
->
split
)
{
...
@@ -1551,7 +1557,7 @@ void runner_do_recv_part(struct runner *r, struct cell *c, int timer) {
...
@@ -1551,7 +1557,7 @@ void runner_do_recv_part(struct runner *r, struct cell *c, int timer) {
else
{
else
{
for
(
int
k
=
0
;
k
<
8
;
k
++
)
{
for
(
int
k
=
0
;
k
<
8
;
k
++
)
{
if
(
c
->
progeny
[
k
]
!=
NULL
)
{
if
(
c
->
progeny
[
k
]
!=
NULL
)
{
runner_do_recv_part
(
r
,
c
->
progeny
[
k
],
0
);
runner_do_recv_part
(
r
,
c
->
progeny
[
k
],
clear_sorts
,
0
);
ti_end_min
=
min
(
ti_end_min
,
c
->
progeny
[
k
]
->
ti_end_min
);
ti_end_min
=
min
(
ti_end_min
,
c
->
progeny
[
k
]
->
ti_end_min
);
ti_end_max
=
max
(
ti_end_max
,
c
->
progeny
[
k
]
->
ti_end_max
);
ti_end_max
=
max
(
ti_end_max
,
c
->
progeny
[
k
]
->
ti_end_max
);
h_max
=
max
(
h_max
,
c
->
progeny
[
k
]
->
h_max
);
h_max
=
max
(
h_max
,
c
->
progeny
[
k
]
->
h_max
);
...
@@ -1603,7 +1609,8 @@ void runner_do_recv_gpart(struct runner *r, struct cell *c, int timer) {
...
@@ -1603,7 +1609,8 @@ void runner_do_recv_gpart(struct runner *r, struct cell *c, int timer) {
timebin_t
time_bin_max
=
0
;
timebin_t
time_bin_max
=
0
;
#ifdef SWIFT_DEBUG_CHECKS
#ifdef SWIFT_DEBUG_CHECKS
if
(
c
->
nodeID
==
engine_rank
)
error
(
"Updating a local cell!"
);
if
(
c
->
nodeID
==
engine_rank
)
error
(
"Updating a local cell!"
);
#endif
#endif
/* If this cell is a leaf, collect the particle data. */
/* If this cell is a leaf, collect the particle data. */
...
@@ -1680,7 +1687,8 @@ void runner_do_recv_spart(struct runner *r, struct cell *c, int timer) {
...
@@ -1680,7 +1687,8 @@ void runner_do_recv_spart(struct runner *r, struct cell *c, int timer) {
timebin_t
time_bin_max
=
0
;
timebin_t
time_bin_max
=
0
;
#ifdef SWIFT_DEBUG_CHECKS
#ifdef SWIFT_DEBUG_CHECKS
if
(
c
->
nodeID
==
engine_rank
)
error
(
"Updating a local cell!"
);
if
(
c
->
nodeID
==
engine_rank
)
error
(
"Updating a local cell!"
);
#endif
#endif
/* If this cell is a leaf, collect the particle data. */
/* If this cell is a leaf, collect the particle data. */
...
@@ -1949,11 +1957,11 @@ void *runner_main(void *data) {
...
@@ -1949,11 +1957,11 @@ void *runner_main(void *data) {
cell_unpack_ti_ends
(
ci
,
t
->
buff
);
cell_unpack_ti_ends
(
ci
,
t
->
buff
);
free
(
t
->
buff
);
free
(
t
->
buff
);
}
else
if
(
t
->
subtype
==
task_subtype_xv
)
{
}
else
if
(
t
->
subtype
==
task_subtype_xv
)
{
runner_do_recv_part
(
r
,
ci
,
1
);
runner_do_recv_part
(
r
,
ci
,
1
,
1
);
}
else
if
(
t
->
subtype
==
task_subtype_rho
)
{
}
else
if
(
t
->
subtype
==
task_subtype_rho
)
{
runner_do_recv_part
(
r
,
ci
,
1
);
runner_do_recv_part
(
r
,
ci
,
0
,
1
);
}
else
if
(
t
->
subtype
==
task_subtype_gradient
)
{
}
else
if
(
t
->
subtype
==
task_subtype_gradient
)
{
runner_do_recv_part
(
r
,
ci
,
1
);
runner_do_recv_part
(
r
,
ci
,
0
,
1
);
}
else
if
(
t
->
subtype
==
task_subtype_gpart
)
{
}
else
if
(
t
->
subtype
==
task_subtype_gpart
)
{
runner_do_recv_gpart
(
r
,
ci
,
1
);
runner_do_recv_gpart
(
r
,
ci
,
1
);
}
else
if
(
t
->
subtype
==
task_subtype_spart
)
{
}
else
if
(
t
->
subtype
==
task_subtype_spart
)
{
...
...
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