From 0fd7b1966b812effd8d0a139e3ecb74600bc654d Mon Sep 17 00:00:00 2001 From: Riyaz Haque <5333387+rfhaque@users.noreply.github.com> Date: Fri, 15 May 2026 00:01:33 -0700 Subject: [PATCH 1/3] warm up device pool --- laghos.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/laghos.cpp b/laghos.cpp index 566a3d58..c8fa7f3b 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 = allocator.allocate(umpire_dev_block_size); + allocator.deallocate(tmp); + #endif + // Prepare the missing kernels. if (myid == 0) { KernelReporter::Enable(); } using TENS = QuadratureInterpolator::TensorEvalKernels; From 34126db1dd9ce9e2cd629c45b25dc8cfdaddab7e Mon Sep 17 00:00:00 2001 From: Riyaz Haque Date: Fri, 15 May 2026 00:04:59 -0700 Subject: [PATCH 2/3] Formatting --- laghos.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/laghos.cpp b/laghos.cpp index c8fa7f3b..a605e1a7 100644 --- a/laghos.cpp +++ b/laghos.cpp @@ -324,13 +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 = allocator.allocate(umpire_dev_block_size); - allocator.deallocate(tmp); - #endif - +#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 = allocator.allocate(umpire_dev_block_size); + allocator.deallocate(tmp); +#endif + // Prepare the missing kernels. if (myid == 0) { KernelReporter::Enable(); } using TENS = QuadratureInterpolator::TensorEvalKernels; From 1d8154b883d996d18acb5cb4ce0c4670687e9041 Mon Sep 17 00:00:00 2001 From: Riyaz Haque Date: Fri, 15 May 2026 00:07:12 -0700 Subject: [PATCH 3/3] Changes --- laghos.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/laghos.cpp b/laghos.cpp index a605e1a7..68515e55 100644 --- a/laghos.cpp +++ b/laghos.cpp @@ -327,8 +327,8 @@ int main(int argc, char *argv[]) #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 = allocator.allocate(umpire_dev_block_size); - allocator.deallocate(tmp); + void *tmp_device_ptr = allocator.allocate(umpire_dev_block_size); + allocator.deallocate(tmp_device_ptr); #endif // Prepare the missing kernels.