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
7ee5f906
Commit
7ee5f906
authored
Nov 06, 2018
by
Matthieu Schaller
Browse files
No need for the 'end_force_in' task.
parent
3d1124c7
Changes
8
Hide whitespace changes
Inline
Side-by-side
examples/analyse_tasks.py
View file @
7ee5f906
...
...
@@ -53,7 +53,7 @@ infile = args.input
# Tasks and subtypes. Indexed as in tasks.h.
TASKTYPES
=
[
"none"
,
"sort"
,
"self"
,
"pair"
,
"sub_self"
,
"sub_pair"
,
"init_grav"
,
"init_grav_out"
,
"ghost_in"
,
"ghost"
,
"ghost_out"
,
"extra_ghost"
,
"drift_part"
,
"drift_gpart"
,
"drift_gpart_out"
,
"end_force"
,
"end_force_in"
,
"kick1"
,
"kick2"
,
"timestep"
,
"send"
,
"recv"
,
"grav_long_range"
,
"grav_mm"
,
"grav_down_in"
,
"end_force"
,
"kick1"
,
"kick2"
,
"timestep"
,
"send"
,
"recv"
,
"grav_long_range"
,
"grav_mm"
,
"grav_down_in"
,
"grav_down"
,
"grav_mesh"
,
"cooling"
,
"star_formation"
,
"sourceterms"
,
"stars_ghost_in"
,
"stars_ghost"
,
"stars_ghost_out"
,
"count"
]
...
...
examples/plot_tasks.py
View file @
7ee5f906
...
...
@@ -111,7 +111,7 @@ pl.rcParams.update(PLOT_PARAMS)
# Tasks and subtypes. Indexed as in tasks.h.
TASKTYPES
=
[
"none"
,
"sort"
,
"self"
,
"pair"
,
"sub_self"
,
"sub_pair"
,
"init_grav"
,
"init_grav_out"
,
"ghost_in"
,
"ghost"
,
"ghost_out"
,
"extra_ghost"
,
"drift_part"
,
"drift_gpart"
,
"drift_gpart_out"
,
"end_force"
,
"end_force_in"
,
"kick1"
,
"kick2"
,
"timestep"
,
"send"
,
"recv"
,
"grav_long_range"
,
"grav_mm"
,
"grav_down_in"
,
"end_force"
,
"kick1"
,
"kick2"
,
"timestep"
,
"send"
,
"recv"
,
"grav_long_range"
,
"grav_mm"
,
"grav_down_in"
,
"grav_down"
,
"grav_mesh"
,
"cooling"
,
"star_formation"
,
"sourceterms"
,
"stars_ghost_in"
,
"stars_ghost"
,
"stars_ghost_out"
,
"count"
]
...
...
src/cell.c
View file @
7ee5f906
...
...
@@ -2770,7 +2770,6 @@ int cell_unskip_hydro_tasks(struct cell *c, struct scheduler *s) {
if
(
c
->
kick2
!=
NULL
)
scheduler_activate
(
s
,
c
->
kick2
);
if
(
c
->
timestep
!=
NULL
)
scheduler_activate
(
s
,
c
->
timestep
);
if
(
c
->
end_force
!=
NULL
)
scheduler_activate
(
s
,
c
->
end_force
);
if
(
c
->
end_force_in
!=
NULL
)
scheduler_activate
(
s
,
c
->
end_force_in
);
if
(
c
->
hydro
.
cooling
!=
NULL
)
scheduler_activate
(
s
,
c
->
hydro
.
cooling
);
if
(
c
->
hydro
.
star_formation
!=
NULL
)
scheduler_activate
(
s
,
c
->
hydro
.
star_formation
);
...
...
@@ -2920,7 +2919,6 @@ int cell_unskip_gravity_tasks(struct cell *c, struct scheduler *s) {
if
(
c
->
kick2
!=
NULL
)
scheduler_activate
(
s
,
c
->
kick2
);
if
(
c
->
timestep
!=
NULL
)
scheduler_activate
(
s
,
c
->
timestep
);
if
(
c
->
end_force
!=
NULL
)
scheduler_activate
(
s
,
c
->
end_force
);
if
(
c
->
end_force_in
!=
NULL
)
scheduler_activate
(
s
,
c
->
end_force_in
);
if
(
c
->
grav
.
down
!=
NULL
)
scheduler_activate
(
s
,
c
->
grav
.
down
);
if
(
c
->
grav
.
down_in
!=
NULL
)
scheduler_activate
(
s
,
c
->
grav
.
down_in
);
if
(
c
->
grav
.
mesh
!=
NULL
)
scheduler_activate
(
s
,
c
->
grav
.
mesh
);
...
...
src/cell.h
View file @
7ee5f906
...
...
@@ -544,9 +544,6 @@ struct cell {
/*! The task to end the force calculation */
struct
task
*
end_force
;
/*! Implicit task (going up- and down the tree) for the end force */
struct
task
*
end_force_in
;
/*! The first kick task */
struct
task
*
kick1
;
...
...
src/engine_maketasks.c
View file @
7ee5f906
...
...
@@ -462,10 +462,6 @@ void engine_make_hierarchical_tasks_common(struct engine *e, struct cell *c) {
c
->
end_force
=
scheduler_addtask
(
s
,
task_type_end_force
,
task_subtype_none
,
0
,
0
,
c
,
NULL
);
/* Implicit task for the up pass */
c
->
end_force_in
=
scheduler_addtask
(
s
,
task_type_end_force_in
,
task_subtype_none
,
0
,
1
,
c
,
NULL
);
/* Subgrid tasks */
if
(
is_with_cooling
)
{
...
...
@@ -491,33 +487,20 @@ void engine_make_hierarchical_tasks_common(struct engine *e, struct cell *c) {
scheduler_addunlock
(
s
,
c
->
kick2
,
c
->
timestep
);
}
//scheduler_addunlock(s, c->end_force_in, c->end_force);
scheduler_addunlock
(
s
,
c
->
timestep
,
c
->
kick1
);
#if defined(WITH_LOGGER)
scheduler_addunlock
(
s
,
c
->
kick1
,
c
->
logger
);
#endif
}
}
/* We are below the super-cell but not below the maximal splitting depth */
else
if
(
c
->
super
!=
NULL
)
{
/* Local tasks only... */
if
(
c
->
nodeID
==
e
->
nodeID
)
{
c
->
end_force_in
=
scheduler_addtask
(
s
,
task_type_end_force_in
,
task_subtype_none
,
0
,
1
,
c
,
NULL
);
}
else
{
/* We are above the super-cell so need to go deeper */
scheduler_addunlock
(
s
,
c
->
end_force_in
,
c
->
parent
->
end_force_in
);
}
/* Recurse. */
if
(
c
->
split
)
for
(
int
k
=
0
;
k
<
8
;
k
++
)
if
(
c
->
progeny
[
k
]
!=
NULL
)
engine_make_hierarchical_tasks_common
(
e
,
c
->
progeny
[
k
]);
}
/* Recurse. */
if
(
c
->
split
)
for
(
int
k
=
0
;
k
<
8
;
k
++
)
if
(
c
->
progeny
[
k
]
!=
NULL
)
engine_make_hierarchical_tasks_common
(
e
,
c
->
progeny
[
k
]);
}
/**
...
...
src/engine_marktasks.c
View file @
7ee5f906
...
...
@@ -444,8 +444,7 @@ void engine_marktasks_mapper(void *map_data, int num_elements,
}
/* End force ? */
else
if
(
t_type
==
task_type_end_force
||
t_type
==
task_type_end_force_in
)
{
else
if
(
t_type
==
task_type_end_force
)
{
if
(
cell_is_active_hydro
(
t
->
ci
,
e
)
||
cell_is_active_gravity
(
t
->
ci
,
e
))
scheduler_activate
(
s
,
t
);
...
...
src/task.c
View file @
7ee5f906
...
...
@@ -63,7 +63,6 @@ const char *taskID_names[task_type_count] = {"none",
"drift_gpart"
,
"drift_gpart_out"
,
"end_force"
,
"end_force_in"
,
"kick1"
,
"kick2"
,
"timestep"
,
...
...
src/task.h
View file @
7ee5f906
...
...
@@ -55,7 +55,6 @@ enum task_types {
task_type_drift_gpart
,
task_type_drift_gpart_out
,
/* Implicit */
task_type_end_force
,
task_type_end_force_in
,
/* Implicit */
task_type_kick1
,
task_type_kick2
,
task_type_timestep
,
...
...
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