Skip to content
GitLab
Menu
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
ae845b37
Commit
ae845b37
authored
May 01, 2020
by
Peter W. Draper
Committed by
Matthieu Schaller
Jun 21, 2020
Browse files
Output a report about tasks that use more than 5% of the runtime in a step
parent
e6590cea
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/task.c
View file @
ae845b37
...
...
@@ -1125,6 +1125,7 @@ void task_dump_stats(const char *dumpfile, struct engine *e, int header,
}
}
double
stepdt
=
(
double
)
e
->
toc_step
-
(
double
)
e
->
tic_step
;
double
total
[
1
]
=
{
0
.
0
};
for
(
int
l
=
0
;
l
<
e
->
sched
.
nr_tasks
;
l
++
)
{
int
type
=
e
->
sched
.
tasks
[
l
].
type
;
...
...
@@ -1152,6 +1153,12 @@ void task_dump_stats(const char *dumpfile, struct engine *e, int header,
tmax
[
type
][
subtype
]
=
tic
;
}
total
[
0
]
+=
dt
;
/* Check if this is a problematic task and make a report. */
if
(
e
->
verbose
)
if
(
dt
/
stepdt
>
0
.
05
)
message
(
"Long running task detected: %s/%s using %.1f%% of step runtime"
,
taskID_names
[
type
],
subtaskID_names
[
subtype
],
dt
/
stepdt
*
100
.
0
);
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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