From cdcebab3bd632a14756aa432fc172022a31e5990 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 9 Dec 2016 14:43:56 -0500 Subject: [PATCH] make the output of the %CPU/OpenMP threads line consistent with compiling in OpenMP support, not having USER-OMP installed --- src/finish.cpp | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/finish.cpp b/src/finish.cpp index 0d767b42cd..67e9ce5578 100644 --- a/src/finish.cpp +++ b/src/finish.cpp @@ -158,25 +158,24 @@ void Finish::end(int flag) // CPU use on MPI tasks and OpenMP threads -#ifdef LMP_USER_OMP - const char fmt2[] = - "%.1f%% CPU use with %d MPI tasks x %d OpenMP threads\n"; - if (screen) fprintf(screen,fmt2,cpu_loop,nprocs,nthreads); - if (logfile) fprintf(logfile,fmt2,cpu_loop,nprocs,nthreads); -#else if (lmp->kokkos) { const char fmt2[] = "%.1f%% CPU use with %d MPI tasks x %d OpenMP threads\n"; if (screen) fprintf(screen,fmt2,cpu_loop,nprocs,lmp->kokkos->num_threads); if (logfile) fprintf(logfile,fmt2,cpu_loop,nprocs,lmp->kokkos->num_threads); } else { +#if defined(_OPENMP) + const char fmt2[] = + "%.1f%% CPU use with %d MPI tasks x %d OpenMP threads\n"; + if (screen) fprintf(screen,fmt2,cpu_loop,nprocs,nthreads); + if (logfile) fprintf(logfile,fmt2,cpu_loop,nprocs,nthreads); +#else const char fmt2[] = "%.1f%% CPU use with %d MPI tasks x no OpenMP threads\n"; if (screen) fprintf(screen,fmt2,cpu_loop,nprocs); if (logfile) fprintf(logfile,fmt2,cpu_loop,nprocs); - } #endif - + } } }