diff --git a/examples/main.c b/examples/main.c index c0b191d58ff6ac2acfdf6f6d184739ff17799f0c..6a7641dadc5c7cc07d890d788c550a4a5c735085 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 {