From 84bf503f956deb14fd7f52a8ad100173b99e9c36 Mon Sep 17 00:00:00 2001 From: Weiqun Zhang Date: Thu, 3 Aug 2023 15:42:40 -0700 Subject: [PATCH] Change the default value of The_Pinned_Arena release threshold The old default of the size of device memory is too big for some machines (e.g., Perlmutter 80 GB nodes). Some WarpX runs were out of memory during restart. It is now set to half of the device memory. --- Src/Base/AMReX_Arena.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Src/Base/AMReX_Arena.cpp b/Src/Base/AMReX_Arena.cpp index d18fa0dd5d5..d60561e7887 100644 --- a/Src/Base/AMReX_Arena.cpp +++ b/Src/Base/AMReX_Arena.cpp @@ -282,7 +282,7 @@ Arena::Initialize () #ifdef AMREX_USE_SYCL the_arena_init_size = std::min(the_arena_init_size, Gpu::Device::maxMemAllocSize()); #endif - the_pinned_arena_release_threshold = Gpu::Device::totalGlobalMem(); + the_pinned_arena_release_threshold = Gpu::Device::totalGlobalMem() / Gpu::Device::numDevicePartners() / 2L; #endif ParmParse pp("amrex");