Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
SWIFTsim
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SWIFT
SWIFTsim
Commits
2a9c96e0
Commit
2a9c96e0
authored
5 years ago
by
Matthieu Schaller
Browse files
Options
Downloads
Patches
Plain Diff
Time the task dumping operations and add them to the analysis script when running with --task-dumps
parent
1bd0d6be
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/task.c
+18
-0
18 additions, 0 deletions
src/task.c
tools/analyse_runtime.py
+3
-0
3 additions, 0 deletions
tools/analyse_runtime.py
with
21 additions
and
0 deletions
src/task.c
+
18
−
0
View file @
2a9c96e0
...
...
@@ -915,6 +915,8 @@ void task_dump_all(struct engine *e, int step) {
#ifdef SWIFT_DEBUG_TASKS
const
ticks
tic
=
getticks
();
/* Need this to convert ticks to seconds. */
const
unsigned
long
long
cpufreq
=
clocks_get_cpufreq
();
...
...
@@ -1008,6 +1010,10 @@ void task_dump_all(struct engine *e, int step) {
}
fclose
(
file_thread
);
#endif // WITH_MPI
if
(
e
->
verbose
)
message
(
"took %.3f %s."
,
clocks_from_ticks
(
getticks
()
-
tic
),
clocks_getunit
());
#endif // SWIFT_DEBUG_TASKS
}
...
...
@@ -1036,6 +1042,8 @@ void task_dump_all(struct engine *e, int step) {
void
task_dump_stats
(
const
char
*
dumpfile
,
struct
engine
*
e
,
int
header
,
int
allranks
)
{
const
ticks
function_tic
=
getticks
();
/* Need arrays for sum, min and max across all types and subtypes. */
double
sum
[
task_type_count
][
task_subtype_count
];
double
tsum
[
task_type_count
][
task_subtype_count
];
...
...
@@ -1171,6 +1179,10 @@ void task_dump_stats(const char *dumpfile, struct engine *e, int header,
#ifdef WITH_MPI
}
#endif
if
(
e
->
verbose
)
message
(
"took %.3f %s."
,
clocks_from_ticks
(
getticks
()
-
function_tic
),
clocks_getunit
());
}
/**
...
...
@@ -1188,6 +1200,8 @@ void task_dump_stats(const char *dumpfile, struct engine *e, int header,
*/
void
task_dump_active
(
struct
engine
*
e
)
{
const
ticks
tic
=
getticks
();
/* Need this to convert ticks to seconds. */
unsigned
long
long
cpufreq
=
clocks_get_cpufreq
();
char
dumpfile
[
35
];
...
...
@@ -1234,4 +1248,8 @@ void task_dump_active(struct engine *e) {
count
++
;
}
fclose
(
file_thread
);
if
(
e
->
verbose
)
message
(
"took %.3f %s."
,
clocks_from_ticks
(
getticks
()
-
tic
),
clocks_getunit
());
}
This diff is collapsed.
Click to expand it.
tools/analyse_runtime.py
+
3
−
0
View file @
2a9c96e0
...
...
@@ -97,6 +97,9 @@ labels = [
[
"
engine_print_task_counts:
"
,
0
],
[
"
engine_drift_top_multipoles:
"
,
0
],
[
"
Communicating rebuild flag
"
,
0
],
[
"
task_dump_all
"
,
0
],
[
"
task_dump_stats
"
,
0
],
[
"
task_dump_active
"
,
0
],
[
"
engine_split:
"
,
0
],
[
"
space_init
"
,
0
],
[
"
engine_init
"
,
0
],
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment