aboutsummaryrefslogtreecommitdiff
path: root/Source/main.cpp
diff options
context:
space:
mode:
authorGravatar Andrew Myers <atmyers@lbl.gov> 2020-07-07 21:23:15 -0700
committerGravatar GitHub <noreply@github.com> 2020-07-07 21:23:15 -0700
commitff34274fa4e2eff4942847c57243e140e7b12fc8 (patch)
tree117b1232056d27911f6e2e1b1405dc9d0c1c21a6 /Source/main.cpp
parent772d1b2347ecaa3d8d9b27fa32b7bb703b22aee4 (diff)
downloadWarpX-ff34274fa4e2eff4942847c57243e140e7b12fc8.tar.gz
WarpX-ff34274fa4e2eff4942847c57243e140e7b12fc8.tar.zst
WarpX-ff34274fa4e2eff4942847c57243e140e7b12fc8.zip
Raise the stack limit when running with cuda (#1154)
* raise the stack limit when running with cuda * fix comment + only do this in debug mode
Diffstat (limited to 'Source/main.cpp')
-rw-r--r--Source/main.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/Source/main.cpp b/Source/main.cpp
index ee0db6960..4bbdce2da 100644
--- a/Source/main.cpp
+++ b/Source/main.cpp
@@ -34,6 +34,11 @@ int main(int argc, char* argv[])
amrex::Initialize(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)
+ AMREX_CUDA_SAFE_CALL(cudaDeviceSetLimit(cudaLimitStackSize, 20*1024));
+#endif
+
ConvertLabParamsToBoost();
CheckGriddingForRZSpectral();