From 02d59e100674803542a3f99b38d4d25d5b34de9a Mon Sep 17 00:00:00 2001 From: Axel Huebl Date: Thu, 16 Jul 2020 09:28:58 -0700 Subject: Default: abort_on_out_of_gpu_memory = 1 (#1164) * Default: abort_on_out_of_gpu_memory = 1 Change the default input parameter from AMReX `amrex.abort_on_out_of_gpu_memory` from false (`0`) to true (`1`). We set this by default to avoid that users experience super-slow GPU runs when exceeding GPU memory. In such a case, users should explicitly set this to option. In my optinion, this is only an intermediate solution since what we actually want on out-of-GPU memory events should be: - finish current simulation step and cause a load balance or - trigger a checkpoint and shut down cleanly - then the user can manually restart with more resources We want to address the opposite case, user under-utilizes a GPU, with a warning for now. Ref.: - https://amrex-codes.github.io/amrex/docs_html/GPU.html#inputs-parameters * abort_on_out_of_gpu_memory: review Add review comments. Co-authored-by: L. Diana Amorim Co-authored-by: L. Diana Amorim --- Source/main.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'Source/main.cpp') diff --git a/Source/main.cpp b/Source/main.cpp index 4bbdce2da..75169bbb5 100644 --- a/Source/main.cpp +++ b/Source/main.cpp @@ -7,16 +7,14 @@ * License: BSD-3-Clause-LBNL */ #include "WarpX.H" +#include "Initialization/WarpXAMReXInit.H" #include "Utils/WarpXUtil.H" #include "Utils/WarpXProfilerWrapper.H" #include -#include #include #include -#include - int main(int argc, char* argv[]) { @@ -32,7 +30,7 @@ int main(int argc, char* argv[]) # endif #endif - amrex::Initialize(argc,argv); + warpx_amrex_init(argc, argv); // in Debug mode, we need a larger stack limit than usual bc of the parser. #if defined(AMREX_USE_CUDA) && defined(AMREX_DEBUG) -- cgit v1.2.3