Skip to content

Commit 1e212aa

Browse files
ax3lEZoni
andauthored
Tests: amrex.the_arena_init_size=0 (#430)
`amrex.the_arena_init_size=0` is default on CPU but not GPU. In order to run tests in parallel on the same GPU, we need to change the default so the first test does not allocate 3/4th of the memory of the GPU (to speed up later allocations in a pre-allocated heap). Co-authored-by: Edoardo Zoni <[email protected]>
1 parent 11ac88b commit 1e212aa

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tests/conftest.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ def amrex_init(tmpdir):
4343
# "abort_on_out_of_gpu_memory=1",
4444
# avoid managed memory unless explicitly used
4545
"amrex.the_arena_is_managed=0",
46+
# allocate GPU memory on-demand instead of pre-allocating 3/4th
47+
# to enable parallel test runs on the same GPU
48+
# https://amrex-codes.github.io/amrex/docs_html/RuntimeParameters.html?highlight=arena#memory
49+
"amrex.the_arena_init_size=0",
4650
]
4751
)
4852
yield

0 commit comments

Comments
 (0)