Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Managed Memory Workarounds #793

Merged
merged 1 commit into from
Jan 10, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/source/usage/parameters.rst
Original file line number Diff line number Diff line change
@@ -813,7 +813,7 @@ Overall simulation parameters
* ``amrex.the_arena_is_managed`` (``0`` or ``1``; default is ``0`` for false)
When running on GPUs, device memory that is accessed from the host will automatically be transferred with managed memory.
This is useful for convenience during development, but has sometimes severe performance and memory footprint implications if relied on (and sometimes vendor bugs).
For all regular ImpactX operations, we therefore do explicit memory transfers without the need for managed memory and thus changed the AMReX default to false.
For all regular ImpactX operations, we therefore do explicit memory transfers without the need for managed memory.
`Please also see the documentation in AMReX <https://amrex-codes.github.io/amrex/docs_html/GPU.html#inputs-parameters>`__.

* ``amrex.omp_threads`` (``system``, ``nosmt`` or positive integer; default is ``nosmt``)
3 changes: 0 additions & 3 deletions examples/aperture/input_aperture.in
Original file line number Diff line number Diff line change
@@ -35,9 +35,6 @@ collimator.shape = rectangular
collimator.xmax = 1.0e-3
collimator.ymax = 1.5e-3

# work-around for https://github.com/ECP-WarpX/impactx/issues/499
amrex.the_arena_is_managed = 1


###############################################################################
# Algorithms
5 changes: 0 additions & 5 deletions examples/aperture/run_absorber.py
Original file line number Diff line number Diff line change
@@ -6,13 +6,8 @@
#
# -*- coding: utf-8 -*-

import amrex.space3d as amr
from impactx import ImpactX, distribution, elements

# work-around for https://github.com/ECP-WarpX/impactx/issues/499
pp_amrex = amr.ParmParse("amrex")
pp_amrex.add("the_arena_is_managed", 1)

sim = ImpactX()

# set numerical parameters and IO control
5 changes: 0 additions & 5 deletions examples/aperture/run_aperture.py
Original file line number Diff line number Diff line change
@@ -6,13 +6,8 @@
#
# -*- coding: utf-8 -*-

import amrex.space3d as amr
from impactx import ImpactX, distribution, elements

# work-around for https://github.com/ECP-WarpX/impactx/issues/499
pp_amrex = amr.ParmParse("amrex")
pp_amrex.add("the_arena_is_managed", 1)

sim = ImpactX()

# set numerical parameters and IO control
5 changes: 0 additions & 5 deletions examples/aperture/run_aperture_periodic.py
Original file line number Diff line number Diff line change
@@ -6,13 +6,8 @@
#
# -*- coding: utf-8 -*-

import amrex.space3d as amr
from impactx import ImpactX, distribution, elements

# work-around for https://github.com/ECP-WarpX/impactx/issues/499
pp_amrex = amr.ParmParse("amrex")
pp_amrex.add("the_arena_is_managed", 1)

sim = ImpactX()

# set numerical parameters and IO control
2 changes: 0 additions & 2 deletions tests/python/conftest.py
Original file line number Diff line number Diff line change
@@ -32,8 +32,6 @@ def amrex_init(tmpdir):
"amrex.signal_handling=0",
# abort GPU runs if out-of-memory instead of swapping to host RAM
"amrex.abort_on_out_of_gpu_memory=1",
# do not rely on implicit host-device memory transfers
"amrex.the_arena_is_managed=0",
]
)
yield
Loading
Oops, something went wrong.