From d228d3178e9387a6d7a840ac6088544f09153c7c Mon Sep 17 00:00:00 2001 From: "Peter W. Draper" <p.w.draper@durham.ac.uk> Date: Fri, 15 Sep 2017 17:31:36 +0100 Subject: [PATCH] Use full buffer when creating threadpool output file name, it is needed for MPI --- examples/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/main.c b/examples/main.c index c0b191d58f..6a7641dadc 100644 --- a/examples/main.c +++ b/examples/main.c @@ -791,10 +791,10 @@ int main(int argc, char *argv[]) { if (dump_threadpool && (dump_threadpool == 1 || j % dump_threadpool == 1)) { char dumpfile[40]; #ifdef WITH_MPI - snprintf(dumpfile, 30, "threadpool_info-rank%d-step%d.dat", engine_rank, + snprintf(dumpfile, 40, "threadpool_info-rank%d-step%d.dat", engine_rank, j + 1); #else - snprintf(dumpfile, 30, "threadpool_info-step%d.dat", j + 1); + snprintf(dumpfile, 40, "threadpool_info-step%d.dat", j + 1); #endif // WITH_MPI threadpool_dump_log(&e.threadpool, dumpfile, 1); } else { -- GitLab