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
db532b7e
Commit
db532b7e
authored
3 years ago
by
Matthieu Schaller
Committed by
Matthieu Schaller
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Also raise errors if self/pair tasks are found in the unskip
parent
e1082380
No related branches found
No related tags found
1 merge request
!1353
Draft: Subtask speedup - Still requires work
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/cell_unskip.c
+29
-2
29 additions, 2 deletions
src/cell_unskip.c
with
29 additions
and
2 deletions
src/cell_unskip.c
+
29
−
2
View file @
db532b7e
...
...
@@ -1587,13 +1587,20 @@ int cell_unskip_hydro_tasks(struct cell *c, struct scheduler *s) {
/* Activate hydro drift */
if
(
t
->
type
==
task_type_self
)
{
#ifdef ONLY_SUBTASKS
error
(
"Found some self tasks!"
);
#else
if
(
ci_nodeID
==
nodeID
)
cell_activate_drift_part
(
ci
,
s
);
if
(
ci_nodeID
==
nodeID
&&
with_timestep_limiter
)
cell_activate_limiter
(
ci
,
s
);
#endif
}
/* Set the correct sorting flags and activate hydro drifts */
else
if
(
t
->
type
==
task_type_pair
)
{
#ifdef ONLY_SUBTASKS
error
(
"Found some self tasks!"
);
#else
/* Store some values. */
atomic_or
(
&
ci
->
hydro
.
requires_sorts
,
1
<<
t
->
flags
);
atomic_or
(
&
cj
->
hydro
.
requires_sorts
,
1
<<
t
->
flags
);
...
...
@@ -1613,6 +1620,7 @@ int cell_unskip_hydro_tasks(struct cell *c, struct scheduler *s) {
/* Check the sorts and activate them if needed. */
cell_activate_hydro_sorts
(
ci
,
t
->
flags
,
s
);
cell_activate_hydro_sorts
(
cj
,
t
->
flags
,
s
);
#endif
}
/* Store current values of dx_max and h_max. */
...
...
@@ -2040,9 +2048,13 @@ int cell_unskip_stars_tasks(struct cell *c, struct scheduler *s,
/* Activate the drifts */
if
(
t
->
type
==
task_type_self
&&
ci_active
)
{
#ifdef ONLY_SUBTASKS
error
(
"Found some self tasks!"
);
#else
cell_activate_drift_spart
(
ci
,
s
);
cell_activate_drift_part
(
ci
,
s
);
if
(
with_timestep_sync
)
cell_activate_sync_part
(
ci
,
s
);
#endif
}
/* Only activate tasks that involve a local active cell. */
...
...
@@ -2051,6 +2063,9 @@ int cell_unskip_stars_tasks(struct cell *c, struct scheduler *s,
scheduler_activate
(
s
,
t
);
if
(
t
->
type
==
task_type_pair
)
{
#ifdef ONLY_SUBTASKS
error
(
"Found some self tasks!"
);
#else
/* Activate stars_in for each cell that is part of
* a pair task as to not miss any dependencies */
if
(
ci_nodeID
==
nodeID
)
...
...
@@ -2099,6 +2114,7 @@ int cell_unskip_stars_tasks(struct cell *c, struct scheduler *s,
cell_activate_hydro_sorts
(
ci
,
t
->
flags
,
s
);
cell_activate_stars_sorts
(
cj
,
t
->
flags
,
s
);
}
#endif
}
else
if
(
t
->
type
==
task_type_sub_self
)
{
...
...
@@ -2261,7 +2277,11 @@ int cell_unskip_stars_tasks(struct cell *c, struct scheduler *s,
#endif
if
(
t
->
type
==
task_type_self
&&
ci_active
)
{
#ifdef ONLY_SUBTASKS
error
(
"Found some self tasks!"
);
#else
scheduler_activate
(
s
,
t
);
#endif
}
else
if
(
t
->
type
==
task_type_sub_self
&&
ci_active
)
{
...
...
@@ -2478,13 +2498,19 @@ int cell_unskip_black_holes_tasks(struct cell *c, struct scheduler *s) {
/* Activate the drifts */
if
(
t
->
type
==
task_type_self
)
{
cell_activate_drift_part
(
ci
,
s
);
#ifdef ONLY_SUBTASKS
error
(
"Found some self tasks!"
);
#else
cell_activate_drift_part
(
ci
,
s
);
cell_activate_drift_bpart
(
ci
,
s
);
#endif
}
/* Activate the drifts */
else
if
(
t
->
type
==
task_type_pair
)
{
#ifdef ONLY_SUBTASKS
error
(
"Found some self tasks!"
);
#else
/* Activate the drift tasks. */
if
(
ci_nodeID
==
nodeID
)
cell_activate_drift_bpart
(
ci
,
s
);
if
(
ci_nodeID
==
nodeID
)
cell_activate_drift_part
(
ci
,
s
);
...
...
@@ -2498,6 +2524,7 @@ int cell_unskip_black_holes_tasks(struct cell *c, struct scheduler *s) {
scheduler_activate
(
s
,
ci
->
hydro
.
super
->
black_holes
.
black_holes_in
);
if
(
cj_nodeID
==
nodeID
)
scheduler_activate
(
s
,
cj
->
hydro
.
super
->
black_holes
.
black_holes_in
);
#endif
}
/* Store current values of dx_max and h_max. */
...
...
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