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
98d55233
Commit
98d55233
authored
Dec 04, 2017
by
Matthieu Schaller
Browse files
Code formatting
parent
44ba3356
Changes
5
Hide whitespace changes
Inline
Side-by-side
src/engine.c
View file @
98d55233
...
...
@@ -3275,7 +3275,7 @@ void engine_marktasks_mapper(void *map_data, int num_elements,
/* Hydro ghost tasks ? */
else
if
(
t
->
type
==
task_type_ghost
||
t
->
type
==
task_type_extra_ghost
||
t
->
type
==
task_type_ghost_in
||
t
->
type
==
task_type_ghost_out
)
{
t
->
type
==
task_type_ghost_in
||
t
->
type
==
task_type_ghost_out
)
{
if
(
cell_is_active
(
t
->
ci
,
e
))
scheduler_activate
(
s
,
t
);
}
...
...
@@ -3287,8 +3287,8 @@ void engine_marktasks_mapper(void *map_data, int num_elements,
/* Periodic gravity stuff (Note this is not linked to a cell) ? */
else
if
(
t
->
type
==
task_type_grav_top_level
||
t
->
type
==
task_type_grav_ghost_in
||
t
->
type
==
task_type_grav_ghost_out
)
{
t
->
type
==
task_type_grav_ghost_in
||
t
->
type
==
task_type_grav_ghost_out
)
{
scheduler_activate
(
s
,
t
);
}
...
...
@@ -3386,7 +3386,6 @@ void engine_print_task_counts(struct engine *e) {
if
(
tasks
[
k
].
type
==
task_type_recv
&&
tasks
[
k
].
subtype
==
task_subtype_rho
)
count_recv_rho
++
;
}
}
message
(
"Total = %d (per cell = %d)"
,
nr_tasks
,
...
...
@@ -3405,9 +3404,11 @@ void engine_print_task_counts(struct engine *e) {
/* message("nr_parts = %zu.", e->s->nr_parts); */
/* message("nr_gparts = %zu.", e->s->nr_gparts); */
/* message("nr_sparts = %zu.", e->s->nr_sparts); */
message
(
"send_ti=%d, recv_ti=%d, send_gpart=%d, recv_gpart=%d, send_xv=%d, recv_xv=%d, send_rho=%d, recv_rho=%d"
,
count_send_ti
,
count_recv_ti
,
count_send_gpart
,
count_recv_gpart
,
count_send_xv
,
count_recv_xv
,
count_send_rho
,
count_recv_rho
);
message
(
"send_ti=%d, recv_ti=%d, send_gpart=%d, recv_gpart=%d, send_xv=%d, "
"recv_xv=%d, send_rho=%d, recv_rho=%d"
,
count_send_ti
,
count_recv_ti
,
count_send_gpart
,
count_recv_gpart
,
count_send_xv
,
count_recv_xv
,
count_send_rho
,
count_recv_rho
);
if
(
e
->
verbose
)
message
(
"took %.3f %s."
,
clocks_from_ticks
(
getticks
()
-
tic
),
...
...
@@ -3903,7 +3904,8 @@ void engine_skip_force_and_kick(struct engine *e) {
t
->
type
==
task_type_timestep
||
t
->
subtype
==
task_subtype_force
||
t
->
subtype
==
task_subtype_grav
||
t
->
type
==
task_type_grav_long_range
||
t
->
type
==
task_type_grav_ghost_in
||
t
->
type
==
task_type_grav_ghost_out
||
t
->
type
==
task_type_grav_ghost_in
||
t
->
type
==
task_type_grav_ghost_out
||
t
->
type
==
task_type_grav_top_level
||
t
->
type
==
task_type_grav_down
||
t
->
type
==
task_type_cooling
||
t
->
type
==
task_type_sourceterms
)
t
->
skip
=
1
;
...
...
@@ -4192,7 +4194,7 @@ void engine_step(struct engine *e) {
e
->
s_updates
,
e
->
wallclock_time
,
e
->
step_props
);
fflush
(
e
->
file_timesteps
);
}
message
(
"
\n
"
);
/* Move forward in time */
...
...
src/runner_doiact_grav.h
View file @
98d55233
...
...
@@ -945,8 +945,8 @@ void runner_dopair_grav(struct runner *r, struct cell *ci, struct cell *cj,
const
double
max_distance2
=
max_distance
*
max_distance
;
/* Anything to do here? */
if
(
!
((
cell_is_active
(
ci
,
e
)
&&
ci
->
nodeID
==
nodeID
)
||
(
cell_is_active
(
cj
,
e
)
&&
cj
->
nodeID
==
nodeID
)))
if
(
!
((
cell_is_active
(
ci
,
e
)
&&
ci
->
nodeID
==
nodeID
)
||
(
cell_is_active
(
cj
,
e
)
&&
cj
->
nodeID
==
nodeID
)))
return
;
#ifdef SWIFT_DEBUG_CHECKS
...
...
src/scheduler.c
View file @
98d55233
...
...
@@ -218,17 +218,19 @@ void scheduler_write_dependencies(struct scheduler *s, int verbose) {
/* Write to the ffile */
fprintf
(
f
,
"
\t
%s->%s;
\n
"
,
ta_name
,
tb_name
);
/* Change style for MPI communications */
if
(
ta
->
type
==
task_type_send
||
ta
->
type
==
task_type_recv
)
fprintf
(
f
,
"
\t
%s [shape = box];
\n
"
,
ta_name
);
if
(
tb
->
type
==
task_type_send
||
tb
->
type
==
task_type_recv
)
fprintf
(
f
,
"
\t
%s [shape = box];
\n
"
,
tb_name
);
/* Change colour of implicit tasks */
if
(
ta
->
implicit
)
fprintf
(
f
,
"
\t
%s [style = filled];
\n\t
%s [color = grey];
\n
"
,
ta_name
,
ta_name
);
if
(
tb
->
implicit
)
fprintf
(
f
,
"
\t
%s [style = filled];
\n\t
%s [color = grey];
\n
"
,
tb_name
,
tb_name
);
/* Change style for MPI communications */
if
(
ta
->
type
==
task_type_send
||
ta
->
type
==
task_type_recv
)
fprintf
(
f
,
"
\t
%s [shape = box];
\n
"
,
ta_name
);
if
(
tb
->
type
==
task_type_send
||
tb
->
type
==
task_type_recv
)
fprintf
(
f
,
"
\t
%s [shape = box];
\n
"
,
tb_name
);
/* Change colour of implicit tasks */
if
(
ta
->
implicit
)
fprintf
(
f
,
"
\t
%s [style = filled];
\n\t
%s [color = grey];
\n
"
,
ta_name
,
ta_name
);
if
(
tb
->
implicit
)
fprintf
(
f
,
"
\t
%s [style = filled];
\n\t
%s [color = grey];
\n
"
,
tb_name
,
tb_name
);
}
}
}
...
...
@@ -826,8 +828,8 @@ void scheduler_splittasks_mapper(void *map_data, int num_elements,
}
else
if
(
t
->
subtype
==
task_subtype_grav
)
{
scheduler_splittask_gravity
(
t
,
s
);
}
else
if
(
t
->
type
==
task_type_grav_top_level
||
t
->
type
==
task_type_grav_ghost_in
||
t
->
type
==
task_type_grav_ghost_out
)
{
t
->
type
==
task_type_grav_ghost_in
||
t
->
type
==
task_type_grav_ghost_out
)
{
/* For future use */
}
else
{
error
(
"Unexpected task sub-type"
);
...
...
@@ -1323,7 +1325,7 @@ void scheduler_start(struct scheduler *s) {
/* Don't check the FFT task */
if
(
t
->
type
==
task_type_grav_top_level
||
t
->
type
==
task_type_grav_ghost_in
||
t
->
type
==
task_type_grav_ghost_out
)
t
->
type
==
task_type_grav_ghost_out
)
continue
;
if
(
ci
==
NULL
&&
cj
==
NULL
)
{
...
...
src/space.c
View file @
98d55233
...
...
@@ -466,7 +466,7 @@ void space_regrid(struct space *s, int verbose) {
c
->
ti_old_part
=
ti_old
;
c
->
ti_old_gpart
=
ti_old
;
c
->
ti_old_multipole
=
ti_old
;
if
(
s
->
gravity
)
c
->
multipole
=
&
s
->
multipoles_top
[
cid
];
if
(
s
->
gravity
)
c
->
multipole
=
&
s
->
multipoles_top
[
cid
];
}
/* Be verbose about the change. */
...
...
src/task.c
View file @
98d55233
...
...
@@ -48,14 +48,13 @@
/* Task type names. */
const
char
*
taskID_names
[
task_type_count
]
=
{
"none"
,
"sort"
,
"self"
,
"pair"
,
"sub_self"
,
"sub_pair"
,
"init_grav"
,
"ghost_in"
,
"ghost"
,
"ghost_out"
,
"extra_ghost"
,
"drift_part"
,
"drift_gpart"
,
"kick1"
,
"kick2"
,
"timestep"
,
"send"
,
"recv"
,
"grav_top_level"
,
"grav_long_range"
,
"none"
,
"sort"
,
"self"
,
"pair"
,
"sub_self"
,
"sub_pair"
,
"init_grav"
,
"ghost_in"
,
"ghost"
,
"ghost_out"
,
"extra_ghost"
,
"drift_part"
,
"drift_gpart"
,
"kick1"
,
"kick2"
,
"timestep"
,
"send"
,
"recv"
,
"grav_top_level"
,
"grav_long_range"
,
"grav_ghost_in"
,
"grav_ghost_out"
,
"grav_mm"
,
"grav_down"
,
"cooling"
,
"sourceterms"
};
"cooling"
,
"sourceterms"
};
/* Sub-task type names. */
const
char
*
subtaskID_names
[
task_subtype_count
]
=
{
...
...
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