diff --git a/laghos.cpp b/laghos.cpp index 566a3d58..68515e55 100644 --- a/laghos.cpp +++ b/laghos.cpp @@ -324,6 +324,13 @@ int main(int argc, char *argv[]) if (Mpi::Root()) { backend.Print(); } backend.SetGPUAwareMPI(gpu_aware_mpi); +#ifdef LAGHOS_USE_DEVICE_UMPIRE + // Warm up the device pool on the configured GPU to avoid first-use latency. + auto allocator = rm.getAllocator(allocator_name); + void *tmp_device_ptr = allocator.allocate(umpire_dev_block_size); + allocator.deallocate(tmp_device_ptr); +#endif + // Prepare the missing kernels. if (myid == 0) { KernelReporter::Enable(); } using TENS = QuadratureInterpolator::TensorEvalKernels;