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
bcdd0dcb
Commit
bcdd0dcb
authored
6 years ago
by
James Willis
Browse files
Options
Downloads
Patches
Plain Diff
Dump task stats.
parent
5e4bb17c
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!543
Fof
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
examples/main_fof.c
+43
-6
43 additions, 6 deletions
examples/main_fof.c
with
43 additions
and
6 deletions
examples/main_fof.c
+
43
−
6
View file @
bcdd0dcb
...
...
@@ -194,7 +194,7 @@ int main(int argc, char *argv[]) {
int
with_self_gravity
=
0
;
int
with_hydro
=
0
;
int
with_stars
=
0
;
int
with_fof
=
0
;
int
with_fof
=
1
;
int
with_feedback
=
0
;
int
with_fp_exceptions
=
0
;
int
with_drift_all
=
0
;
...
...
@@ -998,9 +998,17 @@ int main(int argc, char *argv[]) {
engine_redistribute
(
&
e
);
#endif
#ifdef SWIFT_DEBUG_TASKS
e
.
tic_step
=
getticks
();
#endif
/* Initialise the particles */
engine_init_particles
(
&
e
,
flag_entropy_ICs
,
clean_smoothing_length_values
,
0
);
#ifdef SWIFT_DEBUG_TASKS
e
.
toc_step
=
getticks
();
#endif
/* Perform first FOF search after the first snapshot dump. */
fof_search_tree
(
&
s
);
...
...
@@ -1008,23 +1016,52 @@ int main(int argc, char *argv[]) {
MPI_Barrier
(
MPI_COMM_WORLD
);
#endif
}
#ifdef SWIFT_DEBUG_TASKS
char
dumpfile
[
32
];
snprintf
(
dumpfile
,
sizeof
(
dumpfile
),
"thread_info-step%d.dat"
,
1
);
FILE
*
file_thread
;
file_thread
=
fopen
(
dumpfile
,
"w"
);
/* Add some information to help with the plots */
fprintf
(
file_thread
,
" %d %d %d %d %lld %lld %lld %lld %lld %d %lld
\n
"
,
-
2
,
-
1
,
-
1
,
1
,
e
.
tic_step
,
e
.
toc_step
,
e
.
updates
,
e
.
g_updates
,
e
.
s_updates
,
0
,
cpufreq
);
for
(
int
l
=
0
;
l
<
e
.
sched
.
nr_tasks
;
l
++
)
{
if
(
!
e
.
sched
.
tasks
[
l
].
implicit
&&
e
.
sched
.
tasks
[
l
].
toc
!=
0
)
{
fprintf
(
file_thread
,
" %i %i %i %i %lli %lli %i %i %i %i %i
\n
"
,
e
.
sched
.
tasks
[
l
].
rid
,
e
.
sched
.
tasks
[
l
].
type
,
e
.
sched
.
tasks
[
l
].
subtype
,
(
e
.
sched
.
tasks
[
l
].
cj
==
NULL
),
e
.
sched
.
tasks
[
l
].
tic
,
e
.
sched
.
tasks
[
l
].
toc
,
(
e
.
sched
.
tasks
[
l
].
ci
==
NULL
)
?
0
:
e
.
sched
.
tasks
[
l
].
ci
->
hydro
.
count
,
(
e
.
sched
.
tasks
[
l
].
cj
==
NULL
)
?
0
:
e
.
sched
.
tasks
[
l
].
cj
->
hydro
.
count
,
(
e
.
sched
.
tasks
[
l
].
ci
==
NULL
)
?
0
:
e
.
sched
.
tasks
[
l
].
ci
->
grav
.
count
,
(
e
.
sched
.
tasks
[
l
].
cj
==
NULL
)
?
0
:
e
.
sched
.
tasks
[
l
].
cj
->
grav
.
count
,
e
.
sched
.
tasks
[
l
].
sid
);
}
}
fclose
(
file_thread
);
#endif // SWIFT_DEBUG_TASKS
#ifdef SWIFT_DEBUG_THREADPOOL
/* Dump the task data using the given frequency. */
if
(
dump_threadpool
)
{
char
dumpfile
[
52
];
char
threadpool_
dumpfile
[
52
];
#ifdef WITH_MPI
snprintf
(
dumpfile
,
52
,
"threadpool_info-rank%d-step%d.dat"
,
engine_rank
,
0
);
snprintf
(
threadpool_
dumpfile
,
52
,
"threadpool_info-rank%d-step%d.dat"
,
engine_rank
,
0
);
#else
snprintf
(
dumpfile
,
52
,
"threadpool_info-step%d.dat"
,
0
);
snprintf
(
threadpool_
dumpfile
,
52
,
"threadpool_info-step%d.dat"
,
0
);
#endif // WITH_MPI
threadpool_dump_log
(
&
e
.
threadpool
,
dumpfile
,
1
);
threadpool_dump_log
(
&
e
.
threadpool
,
threadpool_
dumpfile
,
1
);
}
else
{
threadpool_reset_log
(
&
e
.
threadpool
);
}
#endif // SWIFT_DEBUG_THREADPOOL
/* used parameters */
parser_write_params_to_file
(
params
,
"used_parameters.yml"
,
1
);
/* unused parameters */
...
...
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