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

Update AMReX and pyAMReX dependencies. #760

Closed
wants to merge 11 commits into from
22 changes: 19 additions & 3 deletions cmake/dependencies/ABLASTR.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,15 @@ macro(find_ablastr)
endif()
endif()

# control FFT cache (option 1)
if(ImpactX_amrex_internal OR ImpactX_amrex_src)
if(ImpactX_FFT)
set(AMReX_FFT ON CACHE INTERNAL "")
else()
set(AMReX_FFT OFF CACHE INTERNAL "")
endif()
endif()

# transitive control for openPMD superbuild
if(ImpactX_openpmd_src)
set(WarpX_openpmd_src ${ImpactX_openpmd_src} CACHE PATH
Expand Down Expand Up @@ -71,6 +80,13 @@ macro(find_ablastr)
set(WarpX_MPI_THREAD_MULTIPLE ${ImpactX_MPI_THREAD_MULTIPLE} CACHE INTERNAL "" FORCE)
set(WarpX_IPO ${ImpactX_IPO} CACHE INTERNAL "" FORCE)

#control FFT cache (option 2)
if(ImpactX_FFT)
set(AMReX_FFT ON CACHE INTERNAL "")
else()
set(AMReX_FFT OFF CACHE INTERNAL "")
endif()

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a commented duplicate of 40-44, because I wasn't sure of the best place to put this.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll add this control to #790, thanks!

# shared libs, i.e. for Python bindings, need relocatable code
if(ImpactX_PYTHON OR BUILD_SHARED_LIBS)
set(AMReX_PIC ON CACHE INTERNAL
Expand Down Expand Up @@ -127,7 +143,7 @@ macro(find_ablastr)
set(COMPONENT_DIM 3D)
set(COMPONENT_PRECISION ${ImpactX_PRECISION} P${ImpactX_PRECISION})

find_package(ABLASTR 24.10 CONFIG REQUIRED COMPONENTS ${COMPONENT_DIM})
find_package(ABLASTR 25.01 CONFIG REQUIRED COMPONENTS ${COMPONENT_DIM})
message(STATUS "ABLASTR: Found version '${ABLASTR_VERSION}'")
endif()

Expand Down Expand Up @@ -161,15 +177,15 @@ set(ImpactX_openpmd_src ""
set(ImpactX_ablastr_repo "https://github.com/ECP-WarpX/WarpX.git"
CACHE STRING
"Repository URI to pull and build ABLASTR from if(ImpactX_ablastr_internal)")
set(ImpactX_ablastr_branch "24.10"
set(ImpactX_ablastr_branch "bbf9e0d2d3eae080ded84e15481a975efbed454b"
CACHE STRING
"Repository branch for ImpactX_ablastr_repo if(ImpactX_ablastr_internal)")

# AMReX is transitively pulled through ABLASTR
set(ImpactX_amrex_repo "https://github.com/AMReX-Codes/amrex.git"
CACHE STRING
"Repository URI to pull and build AMReX from if(ImpactX_amrex_internal)")
set(ImpactX_amrex_branch "e64ffef57a7608d1d60f9abe738cc634e9c1272e"
set(ImpactX_amrex_branch "25.01"
CACHE STRING
"Repository branch for ImpactX_amrex_repo if(ImpactX_amrex_internal)")

Expand Down
4 changes: 2 additions & 2 deletions cmake/dependencies/pyAMReX.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ function(find_pyamrex)
endif()
elseif(NOT ImpactX_pyamrex_internal)
# TODO: MPI control
find_package(pyAMReX 24.10 CONFIG REQUIRED)
find_package(pyAMReX 24.12 CONFIG REQUIRED)
message(STATUS "pyAMReX: Found version '${pyAMReX_VERSION}'")
endif()
endfunction()
Expand All @@ -74,7 +74,7 @@ option(ImpactX_pyamrex_internal "Download & build pyAMReX" ON)
set(ImpactX_pyamrex_repo "https://github.com/AMReX-Codes/pyamrex.git"
CACHE STRING
"Repository URI to pull and build pyamrex from if(ImpactX_pyamrex_internal)")
set(ImpactX_pyamrex_branch "8742a79c29b7db30c7287c8e33109c0d8be1277a"
set(ImpactX_pyamrex_branch "438c7945c5d1663d131503625d84f82ec9393201"
CACHE STRING
"Repository branch for ImpactX_pyamrex_repo if(ImpactX_pyamrex_internal)")

Expand Down
2 changes: 2 additions & 0 deletions src/particles/spacecharge/PoissonSolve.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ namespace impactx::spacecharge
sorted_phi.emplace_back(&phi[lev]);
}

const bool is_igf_2d = false;
const bool do_single_precision_comms = false;
const bool eb_enabled = false;
ablastr::fields::computePhi(
Expand All @@ -95,6 +96,7 @@ namespace impactx::spacecharge
pc.GetParGDB()->boxArray(),
ablastr::utils::enums::GridType::Collocated,
is_solver_igf_on_lev0,
is_igf_2d,
eb_enabled,
do_single_precision_comms,
rel_ref_ratio
Expand Down
Loading