Skip to content
GitLab
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
977dfd83
Commit
977dfd83
authored
Jun 27, 2017
by
Pedro Gonnet
Browse files
don't just activate the drift task, also set the do_drift and do_sub_drift flags correctly.
parent
59e1bb33
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/cell.c
View file @
977dfd83
...
...
@@ -1352,27 +1352,30 @@ void cell_activate_drift_part(struct cell *c, struct scheduler *s) {
}
/**
* @brief Activate the sorts
on
a
given cell, if needed
.
* @brief Activate the sorts
up
a
cell hierarchy
.
*/
void
cell_activate_sorts
(
struct
cell
*
c
,
int
sid
,
struct
scheduler
*
s
)
{
void
cell_activate_sorts_up
(
struct
cell
*
c
,
struct
scheduler
*
s
)
{
if
(
c
==
c
->
super
)
{
scheduler_activate
(
s
,
c
->
sorts
);
if
(
c
->
nodeID
==
engine_rank
)
scheduler_activate
(
s
,
c
->
drift_part
);
}
else
{
for
(
struct
cell
*
parent
=
c
->
parent
;
parent
!=
NULL
&&
!
parent
->
do_sub_sort
;
parent
=
parent
->
parent
)
{
parent
->
do_sub_sort
=
1
;
if
(
parent
==
c
->
super
)
{
scheduler_activate
(
s
,
parent
->
sorts
);
if
(
parent
->
nodeID
==
engine_rank
)
scheduler_activate
(
s
,
parent
->
drift_part
);
break
;
}
void
cell_activate_sorts_up
(
struct
cell
*
c
,
struct
scheduler
*
s
)
{
if
(
c
==
c
->
super
)
{
scheduler_activate
(
s
,
c
->
sorts
);
if
(
c
->
nodeID
==
engine_rank
)
cell_activate_drift_part
(
c
,
s
);
}
else
{
for
(
struct
cell
*
parent
=
c
->
parent
;
parent
!=
NULL
&&
!
parent
->
do_sub_sort
;
parent
=
parent
->
parent
)
{
parent
->
do_sub_sort
=
1
;
if
(
parent
==
c
->
super
)
{
scheduler_activate
(
s
,
parent
->
sorts
);
if
(
parent
->
nodeID
==
engine_rank
)
cell_activate_drift_part
(
parent
,
s
);
break
;
}
}
}
}
/**
* @brief Activate the sorts on a given cell, if needed.
*/
void
cell_activate_sorts
(
struct
cell
*
c
,
int
sid
,
struct
scheduler
*
s
)
{
/* Do we need to re-sort? */
if
(
c
->
dx_max_sort
>
space_maxreldx
*
c
->
dmin
)
{
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment