diff --git a/Src/Base/AMReX_ParallelDescriptor.cpp b/Src/Base/AMReX_ParallelDescriptor.cpp index d112d490932..d550f8b580e 100644 --- a/Src/Base/AMReX_ParallelDescriptor.cpp +++ b/Src/Base/AMReX_ParallelDescriptor.cpp @@ -321,6 +321,11 @@ ParallelDescriptor::StartParallel (int* argc, call_mpi_finalize = 0; } + // It seems that for some MPI implementation, the first call to MPI_Wtime is always 0. That + // sometimes causes problems for amrex::UniqueString function. So we call MPI_Wtime here. + auto tfoo = MPI_Wtime(); + amrex::ignore_unused(tfoo); + #ifdef AMREX_MPI_THREAD_MULTIPLE { int requested = MPI_THREAD_MULTIPLE;