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
6acc97f1
Commit
6acc97f1
authored
7 years ago
by
Matthieu Schaller
Browse files
Options
Downloads
Patches
Plain Diff
Use engine->nodeID and not engine_rank in cell_unskip_tasks()
parent
418e773c
No related branches found
No related tags found
1 merge request
!442
Support for OSX
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/cell.c
+11
-10
11 additions, 10 deletions
src/cell.c
with
11 additions
and
10 deletions
src/cell.c
+
11
−
10
View file @
6acc97f1
...
@@ -1863,6 +1863,7 @@ void cell_activate_subcell_external_grav_tasks(struct cell *ci,
...
@@ -1863,6 +1863,7 @@ void cell_activate_subcell_external_grav_tasks(struct cell *ci,
int
cell_unskip_tasks
(
struct
cell
*
c
,
struct
scheduler
*
s
)
{
int
cell_unskip_tasks
(
struct
cell
*
c
,
struct
scheduler
*
s
)
{
struct
engine
*
e
=
s
->
space
->
e
;
struct
engine
*
e
=
s
->
space
->
e
;
const
int
nodeID
=
e
->
nodeID
;
int
rebuild
=
0
;
int
rebuild
=
0
;
/* Un-skip the density tasks involved with this cell. */
/* Un-skip the density tasks involved with this cell. */
...
@@ -1874,13 +1875,13 @@ int cell_unskip_tasks(struct cell *c, struct scheduler *s) {
...
@@ -1874,13 +1875,13 @@ int cell_unskip_tasks(struct cell *c, struct scheduler *s) {
const
int
cj_active
=
(
cj
!=
NULL
)
?
cell_is_active
(
cj
,
e
)
:
0
;
const
int
cj_active
=
(
cj
!=
NULL
)
?
cell_is_active
(
cj
,
e
)
:
0
;
/* Only activate tasks that involve a local active cell. */
/* Only activate tasks that involve a local active cell. */
if
((
ci_active
&&
ci
->
nodeID
==
engine_rank
)
||
if
((
ci_active
&&
ci
->
nodeID
==
nodeID
)
||
(
cj_active
&&
cj
->
nodeID
==
engine_rank
))
{
(
cj_active
&&
cj
->
nodeID
==
nodeID
))
{
scheduler_activate
(
s
,
t
);
scheduler_activate
(
s
,
t
);
/* Activate hydro drift */
/* Activate hydro drift */
if
(
t
->
type
==
task_type_self
)
{
if
(
t
->
type
==
task_type_self
)
{
if
(
ci
->
nodeID
==
engine_rank
)
cell_activate_drift_part
(
ci
,
s
);
if
(
ci
->
nodeID
==
nodeID
)
cell_activate_drift_part
(
ci
,
s
);
}
}
/* Set the correct sorting flags and activate hydro drifts */
/* Set the correct sorting flags and activate hydro drifts */
...
@@ -1892,8 +1893,8 @@ int cell_unskip_tasks(struct cell *c, struct scheduler *s) {
...
@@ -1892,8 +1893,8 @@ int cell_unskip_tasks(struct cell *c, struct scheduler *s) {
cj
->
dx_max_sort_old
=
cj
->
dx_max_sort
;
cj
->
dx_max_sort_old
=
cj
->
dx_max_sort
;
/* Activate the drift tasks. */
/* Activate the drift tasks. */
if
(
ci
->
nodeID
==
engine_rank
)
cell_activate_drift_part
(
ci
,
s
);
if
(
ci
->
nodeID
==
nodeID
)
cell_activate_drift_part
(
ci
,
s
);
if
(
cj
->
nodeID
==
engine_rank
)
cell_activate_drift_part
(
cj
,
s
);
if
(
cj
->
nodeID
==
nodeID
)
cell_activate_drift_part
(
cj
,
s
);
/* Check the sorts and activate them if needed. */
/* Check the sorts and activate them if needed. */
cell_activate_sorts
(
ci
,
t
->
flags
,
s
);
cell_activate_sorts
(
ci
,
t
->
flags
,
s
);
...
@@ -1914,7 +1915,7 @@ int cell_unskip_tasks(struct cell *c, struct scheduler *s) {
...
@@ -1914,7 +1915,7 @@ int cell_unskip_tasks(struct cell *c, struct scheduler *s) {
#ifdef WITH_MPI
#ifdef WITH_MPI
/* Activate the send/recv tasks. */
/* Activate the send/recv tasks. */
if
(
ci
->
nodeID
!=
engine_rank
)
{
if
(
ci
->
nodeID
!=
nodeID
)
{
/* If the local cell is active, receive data from the foreign cell. */
/* If the local cell is active, receive data from the foreign cell. */
if
(
cj_active
)
{
if
(
cj_active
)
{
...
@@ -1952,7 +1953,7 @@ int cell_unskip_tasks(struct cell *c, struct scheduler *s) {
...
@@ -1952,7 +1953,7 @@ int cell_unskip_tasks(struct cell *c, struct scheduler *s) {
/* If the local cell is active, send its ti_end values. */
/* If the local cell is active, send its ti_end values. */
if
(
cj_active
)
scheduler_activate_send
(
s
,
cj
->
send_ti
,
ci
->
nodeID
);
if
(
cj_active
)
scheduler_activate_send
(
s
,
cj
->
send_ti
,
ci
->
nodeID
);
}
else
if
(
cj
->
nodeID
!=
engine_rank
)
{
}
else
if
(
cj
->
nodeID
!=
nodeID
)
{
/* If the local cell is active, receive data from the foreign cell. */
/* If the local cell is active, receive data from the foreign cell. */
if
(
ci_active
)
{
if
(
ci_active
)
{
...
@@ -2002,8 +2003,8 @@ int cell_unskip_tasks(struct cell *c, struct scheduler *s) {
...
@@ -2002,8 +2003,8 @@ int cell_unskip_tasks(struct cell *c, struct scheduler *s) {
struct
cell
*
cj
=
t
->
cj
;
struct
cell
*
cj
=
t
->
cj
;
/* Only activate tasks that involve a local active cell. */
/* Only activate tasks that involve a local active cell. */
if
((
cell_is_active
(
ci
,
e
)
&&
ci
->
nodeID
==
engine_rank
)
||
if
((
cell_is_active
(
ci
,
e
)
&&
ci
->
nodeID
==
nodeID
)
||
(
cj
!=
NULL
&&
cell_is_active
(
cj
,
e
)
&&
cj
->
nodeID
==
engine_rank
))
{
(
cj
!=
NULL
&&
cell_is_active
(
cj
,
e
)
&&
cj
->
nodeID
==
nodeID
))
{
scheduler_activate
(
s
,
t
);
scheduler_activate
(
s
,
t
);
/* Set the drifting flags */
/* Set the drifting flags */
...
@@ -2019,7 +2020,7 @@ int cell_unskip_tasks(struct cell *c, struct scheduler *s) {
...
@@ -2019,7 +2020,7 @@ int cell_unskip_tasks(struct cell *c, struct scheduler *s) {
}
}
/* Unskip all the other task types. */
/* Unskip all the other task types. */
if
(
c
->
nodeID
==
engine_rank
&&
cell_is_active
(
c
,
e
))
{
if
(
c
->
nodeID
==
nodeID
&&
cell_is_active
(
c
,
e
))
{
for
(
struct
link
*
l
=
c
->
gradient
;
l
!=
NULL
;
l
=
l
->
next
)
for
(
struct
link
*
l
=
c
->
gradient
;
l
!=
NULL
;
l
=
l
->
next
)
scheduler_activate
(
s
,
l
->
t
);
scheduler_activate
(
s
,
l
->
t
);
...
...
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