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
a7df77f7
Commit
a7df77f7
authored
4 years ago
by
Peter W. Draper
Browse files
Options
Downloads
Plain Diff
Merge branch 'fix_threadpool' into 'master'
Fix threadpool See merge request
!1239
parents
a7ce844d
3c01d1b6
No related branches found
No related tags found
1 merge request
!1239
Fix threadpool
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
examples/main.c
+5
-5
5 additions, 5 deletions
examples/main.c
src/threadpool.c
+3
-3
3 additions, 3 deletions
src/threadpool.c
with
8 additions
and
8 deletions
examples/main.c
+
5
−
5
View file @
a7df77f7
...
...
@@ -1550,8 +1550,8 @@ int main(int argc, char *argv[]) {
/* Dump MPI requests if collected. */
#if defined(SWIFT_MPIUSE_REPORTS) && defined(WITH_MPI)
{
char
dumpfile
[
4
0
];
snprintf
(
dumpfile
,
4
0
,
"mpiuse_report-rank%d-step%d.dat"
,
engine_rank
,
char
dumpfile
[
8
0
];
snprintf
(
dumpfile
,
8
0
,
"mpiuse_report-rank%d-step%d.dat"
,
engine_rank
,
j
+
1
);
mpiuse_log_dump
(
dumpfile
,
e
.
tic_step
);
}
...
...
@@ -1560,12 +1560,12 @@ int main(int argc, char *argv[]) {
#ifdef SWIFT_DEBUG_THREADPOOL
/* Dump the task data using the given frequency. */
if
(
dump_threadpool
&&
(
dump_threadpool
==
1
||
j
%
dump_threadpool
==
1
))
{
char
dumpfile
[
4
0
];
char
dumpfile
[
8
0
];
#ifdef WITH_MPI
snprintf
(
dumpfile
,
4
0
,
"threadpool_info-rank%d-step%d.dat"
,
engine_rank
,
snprintf
(
dumpfile
,
8
0
,
"threadpool_info-rank%d-step%d.dat"
,
engine_rank
,
j
+
1
);
#else
snprintf
(
dumpfile
,
4
0
,
"threadpool_info-step%d.dat"
,
j
+
1
);
snprintf
(
dumpfile
,
8
0
,
"threadpool_info-step%d.dat"
,
j
+
1
);
#endif // WITH_MPI
threadpool_dump_log
(
&
e
.
threadpool
,
dumpfile
,
1
);
}
else
{
...
...
This diff is collapsed.
Click to expand it.
src/threadpool.c
+
3
−
3
View file @
a7df77f7
...
...
@@ -273,7 +273,7 @@ void threadpool_map(struct threadpool *tp, threadpool_map_function map_function,
void
*
extra_data
)
{
#ifdef SWIFT_DEBUG_THREADPOOL
ticks
tic
=
getticks
();
ticks
tic
_total
=
getticks
();
#endif
/* If we just have a single thread, call the map function directly. */
...
...
@@ -284,7 +284,7 @@ void threadpool_map(struct threadpool *tp, threadpool_map_function map_function,
#ifdef SWIFT_DEBUG_THREADPOOL
tp
->
map_function
=
map_function
;
threadpool_log
(
tp
,
0
,
N
,
tic
,
getticks
());
threadpool_log
(
tp
,
0
,
N
,
tic
_total
,
getticks
());
#endif
}
else
{
...
...
@@ -343,7 +343,7 @@ void threadpool_map(struct threadpool *tp, threadpool_map_function map_function,
#ifdef SWIFT_DEBUG_THREADPOOL
/* Log the total call time to thread id -1. */
threadpool_log
(
tp
,
-
1
,
N
,
tic
,
getticks
());
threadpool_log
(
tp
,
-
1
,
N
,
tic
_total
,
getticks
());
#endif
}
...
...
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