Skip to content
Snippets Groups Projects
Commit a7df77f7 authored by Peter W. Draper's avatar Peter W. Draper
Browse files

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!1239Fix threadpool
......@@ -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[40];
snprintf(dumpfile, 40, "mpiuse_report-rank%d-step%d.dat", engine_rank,
char dumpfile[80];
snprintf(dumpfile, 80, "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[40];
char dumpfile[80];
#ifdef WITH_MPI
snprintf(dumpfile, 40, "threadpool_info-rank%d-step%d.dat", engine_rank,
snprintf(dumpfile, 80, "threadpool_info-rank%d-step%d.dat", engine_rank,
j + 1);
#else
snprintf(dumpfile, 40, "threadpool_info-step%d.dat", j + 1);
snprintf(dumpfile, 80, "threadpool_info-step%d.dat", j + 1);
#endif // WITH_MPI
threadpool_dump_log(&e.threadpool, dumpfile, 1);
} else {
......
......@@ -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
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment