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
4d6e36b5
Commit
4d6e36b5
authored
Oct 14, 2016
by
Matthieu Schaller
Browse files
Time engine_print_task_count()
parent
947a2001
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/engine.c
View file @
4d6e36b5
...
...
@@ -2181,17 +2181,21 @@ int engine_marktasks(struct engine *e) {
*/
void
engine_print_task_counts
(
struct
engine
*
e
)
{
struct
scheduler
*
sched
=
&
e
->
sched
;
const
ticks
tic
=
getticks
();
struct
scheduler
*
const
sched
=
&
e
->
sched
;
const
int
nr_tasks
=
sched
->
nr_tasks
;
const
struct
task
*
const
tasks
=
sched
->
tasks
;
/* Count and print the number of each task type. */
int
counts
[
task_type_count
+
1
];
for
(
int
k
=
0
;
k
<=
task_type_count
;
k
++
)
counts
[
k
]
=
0
;
for
(
int
k
=
0
;
k
<
sched
->
nr_tasks
;
k
++
)
{
if
(
sched
->
tasks
[
k
].
skip
)
for
(
int
k
=
0
;
k
<
nr_tasks
;
k
++
)
{
if
(
tasks
[
k
].
skip
)
counts
[
task_type_count
]
+=
1
;
else
counts
[(
int
)
sched
->
tasks
[
k
].
type
]
+=
1
;
counts
[(
int
)
tasks
[
k
].
type
]
+=
1
;
}
message
(
"Total = %d"
,
nr_tasks
);
#ifdef WITH_MPI
printf
(
"[%04i] %s engine_print_task_counts: task counts are [ %s=%i"
,
e
->
nodeID
,
clocks_get_timesincestart
(),
taskID_names
[
0
],
counts
[
0
]);
...
...
@@ -2205,6 +2209,10 @@ void engine_print_task_counts(struct engine *e) {
fflush
(
stdout
);
message
(
"nr_parts = %zu."
,
e
->
s
->
nr_parts
);
message
(
"nr_gparts = %zu."
,
e
->
s
->
nr_gparts
);
if
(
e
->
verbose
)
message
(
"took %.3f %s."
,
clocks_from_ticks
(
getticks
()
-
tic
),
clocks_getunit
());
}
/**
...
...
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