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
5c4fbfb2
Commit
5c4fbfb2
authored
Nov 06, 2018
by
Matthieu Schaller
Browse files
Applied code formatting tool.
parent
7ee5f906
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/engine_maketasks.c
View file @
5c4fbfb2
...
...
@@ -486,7 +486,7 @@ void engine_make_hierarchical_tasks_common(struct engine *e, struct cell *c) {
}
else
{
scheduler_addunlock
(
s
,
c
->
kick2
,
c
->
timestep
);
}
scheduler_addunlock
(
s
,
c
->
timestep
,
c
->
kick1
);
#if defined(WITH_LOGGER)
...
...
@@ -498,8 +498,8 @@ void engine_make_hierarchical_tasks_common(struct engine *e, struct cell *c) {
/* 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
]);
if
(
c
->
progeny
[
k
]
!=
NULL
)
engine_make_hierarchical_tasks_common
(
e
,
c
->
progeny
[
k
]);
}
}
...
...
@@ -572,7 +572,7 @@ void engine_make_hierarchical_tasks_gravity(struct engine *e, struct cell *c) {
}
/* We are below the super-cell but not below the maximal splitting depth */
else
if
((
c
->
grav
.
super
!=
NULL
)
&&
else
if
((
c
->
grav
.
super
!=
NULL
)
&&
((
c
->
maxdepth
-
c
->
depth
)
>=
space_subdepth_diff_grav
))
{
/* Local tasks only... */
...
...
@@ -581,7 +581,7 @@ void engine_make_hierarchical_tasks_gravity(struct engine *e, struct cell *c) {
if
(
is_self_gravity
)
{
c
->
grav
.
drift_out
=
scheduler_addtask
(
s
,
task_type_drift_gpart_out
,
task_subtype_none
,
0
,
1
,
c
,
NULL
);
task_subtype_none
,
0
,
1
,
c
,
NULL
);
c
->
grav
.
init_out
=
scheduler_addtask
(
s
,
task_type_init_grav_out
,
task_subtype_none
,
0
,
1
,
c
,
NULL
);
...
...
@@ -1169,9 +1169,8 @@ void engine_link_gravity_tasks(struct engine *e) {
/* drift ---+-> gravity --> grav_down */
/* init --/ */
if
(
ci_parent
!=
cj_parent
)
{
/* Avoid double unlock */
scheduler_addunlock
(
sched
,
cj_parent
->
grav
.
drift_out
,
t
);
scheduler_addunlock
(
sched
,
cj_parent
->
grav
.
drift_out
,
t
);
scheduler_addunlock
(
sched
,
cj_parent
->
grav
.
init_out
,
t
);
scheduler_addunlock
(
sched
,
t
,
cj_parent
->
grav
.
down_in
);
}
...
...
@@ -1219,9 +1218,8 @@ void engine_link_gravity_tasks(struct engine *e) {
/* drift ---+-> gravity --> grav_down */
/* init --/ */
if
(
ci_parent
!=
cj_parent
)
{
/* Avoid double unlock */
scheduler_addunlock
(
sched
,
cj_parent
->
grav
.
drift_out
,
t
);
scheduler_addunlock
(
sched
,
cj_parent
->
grav
.
drift_out
,
t
);
scheduler_addunlock
(
sched
,
cj_parent
->
grav
.
init_out
,
t
);
scheduler_addunlock
(
sched
,
t
,
cj_parent
->
grav
.
down_in
);
}
...
...
src/space.c
View file @
5c4fbfb2
...
...
@@ -505,14 +505,14 @@ void space_regrid(struct space *s, int verbose) {
c
->
grav
.
ti_old_multipole
=
ti_current
;
#ifdef WITH_MPI
c
->
mpi
.
tag
=
-
1
;
c
->
mpi
.
hydro
.
recv_xv
=
NULL
;
c
->
mpi
.
hydro
.
recv_rho
=
NULL
;
c
->
mpi
.
hydro
.
recv_gradient
=
NULL
;
c
->
mpi
.
hydro
.
send_xv
=
NULL
;
c
->
mpi
.
hydro
.
send_rho
=
NULL
;
c
->
mpi
.
hydro
.
send_gradient
=
NULL
;
c
->
mpi
.
grav
.
recv
=
NULL
;
c
->
mpi
.
grav
.
send
=
NULL
;
c
->
mpi
.
hydro
.
recv_xv
=
NULL
;
c
->
mpi
.
hydro
.
recv_rho
=
NULL
;
c
->
mpi
.
hydro
.
recv_gradient
=
NULL
;
c
->
mpi
.
hydro
.
send_xv
=
NULL
;
c
->
mpi
.
hydro
.
send_rho
=
NULL
;
c
->
mpi
.
hydro
.
send_gradient
=
NULL
;
c
->
mpi
.
grav
.
recv
=
NULL
;
c
->
mpi
.
grav
.
send
=
NULL
;
#endif // WITH_MPI
if
(
s
->
gravity
)
c
->
grav
.
multipole
=
&
s
->
multipoles_top
[
cid
];
#ifdef SWIFT_DEBUG_CHECKS
...
...
src/task.c
View file @
5c4fbfb2
...
...
@@ -411,8 +411,10 @@ int task_lock(struct task *t) {
char
buff
[
MPI_MAX_ERROR_STRING
];
int
len
;
MPI_Error_string
(
err
,
buff
,
&
len
);
error
(
"Failed to test request on send/recv task (type=%s/%s tag=%lld, %s)."
,
taskID_names
[
t
->
type
],
subtaskID_names
[
t
->
subtype
],
t
->
flags
,
buff
);
error
(
"Failed to test request on send/recv task (type=%s/%s tag=%lld, "
"%s)."
,
taskID_names
[
t
->
type
],
subtaskID_names
[
t
->
subtype
],
t
->
flags
,
buff
);
}
return
res
;
#else
...
...
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