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

Use AMReX FFT for IGF Solver #5457

Open
wants to merge 6 commits into
base: development
Choose a base branch
from
Open
Show file tree
Hide file tree
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
12 changes: 0 additions & 12 deletions .azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ jobs:
# Cartesian 3D
cartesian_3d:
WARPX_CMAKE_FLAGS: -DWarpX_DIMS=3 -DWarpX_FFT=ON -DWarpX_PYTHON=ON
WARPX_HEFFTE: 'TRUE'
# Cylindrical RZ
cylindrical_rz:
WARPX_CMAKE_FLAGS: -DWarpX_DIMS=RZ -DWarpX_FFT=ON -DWarpX_PYTHON=ON
Expand Down Expand Up @@ -121,17 +120,6 @@ jobs:
-DCMAKE_CXX_STANDARD=17 \
-Duse_cmake_find_lapack=ON -Dbuild_tests=OFF -DCMAKE_VERBOSE_MAKEFILE=ON
fi
if [ "${WARPX_HEFFTE:-FALSE}" == "TRUE" ]; then
cmake-easyinstall --prefix=/usr/local git+https://github.com/icl-utk-edu/[email protected] \
-DCMAKE_CXX_COMPILER_LAUNCHER=$(which ccache) \
-DCMAKE_CXX_STANDARD=17 -DHeffte_ENABLE_DOXYGEN=OFF \
-DHeffte_ENABLE_FFTW=ON -DHeffte_ENABLE_TESTING=OFF \
-DHeffte_ENABLE_CUDA=OFF -DHeffte_ENABLE_ROCM=OFF \
-DHeffte_ENABLE_ONEAPI=OFF -DHeffte_ENABLE_MKL=OFF \
-DHeffte_ENABLE_PYTHON=OFF -DHeffte_ENABLE_FORTRAN=OFF \
-DHeffte_ENABLE_MAGMA=OFF \
-DCMAKE_VERBOSE_MAKEFILE=ON
fi
# Python modules required for test analysis
python3 -m pip install --upgrade -r Regression/requirements.txt
python3 -m pip cache purge
Expand Down
13 changes: 1 addition & 12 deletions .github/workflows/cuda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,16 +62,6 @@ jobs:
-DBUILD_CLI_TOOLS=OFF \
-DCMAKE_CXX_COMPILER_LAUNCHER=$(which ccache) \
-DCMAKE_VERBOSE_MAKEFILE=ON
cmake-easyinstall --prefix=/usr/local \
git+https://github.com/icl-utk-edu/[email protected] \
-DCMAKE_CXX_COMPILER_LAUNCHER=$(which ccache) \
-DCMAKE_CXX_STANDARD=17 -DHeffte_ENABLE_DOXYGEN=OFF \
-DHeffte_ENABLE_FFTW=OFF -DHeffte_ENABLE_TESTING=OFF \
-DHeffte_ENABLE_CUDA=ON -DHeffte_ENABLE_ROCM=OFF \
-DHeffte_ENABLE_ONEAPI=OFF -DHeffte_ENABLE_MKL=OFF \
-DHeffte_ENABLE_PYTHON=OFF -DHeffte_ENABLE_FORTRAN=OFF \
-DHeffte_ENABLE_MAGMA=OFF \
-DCMAKE_VERBOSE_MAKEFILE=ON
- name: build WarpX
run: |
export CCACHE_COMPRESS=1
Expand All @@ -92,7 +82,6 @@ jobs:
-DWarpX_openpmd_internal=OFF \
-DWarpX_PRECISION=SINGLE \
-DWarpX_FFT=ON \
-DWarpX_HEFFTE=ON \
-DAMReX_CUDA_ERROR_CROSS_EXECUTION_SPACE_CALL=ON \
-DAMReX_CUDA_ERROR_CAPTURE_THIS=ON
cmake --build build_sp -j 4
Expand Down Expand Up @@ -137,7 +126,7 @@ jobs:
which nvcc || echo "nvcc not in PATH!"

git clone https://github.com/AMReX-Codes/amrex.git ../amrex
cd ../amrex && git checkout --detach 4b703fec6c2ff983e465c8cef0cc4947231edb07 && cd -
cd ../amrex && git checkout --detach 456c93c7d9512f1cdffac0574973d7df41417898 && cd -
make COMP=gcc QED=FALSE USE_MPI=TRUE USE_GPU=TRUE USE_OMP=FALSE USE_FFT=TRUE USE_CCACHE=TRUE -j 4

ccache -s
Expand Down
13 changes: 0 additions & 13 deletions .github/workflows/dependencies/hip.sh
Original file line number Diff line number Diff line change
Expand Up @@ -79,16 +79,3 @@ sudo curl -L -o /usr/local/bin/cmake-easyinstall https://raw.githubusercontent.c
sudo chmod a+x /usr/local/bin/cmake-easyinstall
export CEI_SUDO="sudo"
export CEI_TMP="/tmp/cei"

# heFFTe
#
cmake-easyinstall --prefix=/usr/local \
git+https://github.com/icl-utk-edu/[email protected] \
-DCMAKE_CXX_COMPILER_LAUNCHER=$(which ccache) \
-DCMAKE_CXX_STANDARD=17 -DHeffte_ENABLE_DOXYGEN=OFF \
-DHeffte_ENABLE_FFTW=OFF -DHeffte_ENABLE_TESTING=OFF \
-DHeffte_ENABLE_CUDA=OFF -DHeffte_ENABLE_ROCM=ON \
-DHeffte_ENABLE_ONEAPI=OFF -DHeffte_ENABLE_MKL=OFF \
-DHeffte_ENABLE_PYTHON=OFF -DHeffte_ENABLE_FORTRAN=OFF \
-DHeffte_ENABLE_MAGMA=OFF \
-DCMAKE_VERBOSE_MAKEFILE=ON
6 changes: 2 additions & 4 deletions .github/workflows/hip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,7 @@ jobs:
-DWarpX_MPI=ON \
-DWarpX_OPENPMD=ON \
-DWarpX_PRECISION=SINGLE \
-DWarpX_FFT=ON \
-DWarpX_HEFFTE=ON
-DWarpX_FFT=ON
cmake --build build_sp -j 4

export WARPX_MPI=OFF
Expand Down Expand Up @@ -122,8 +121,7 @@ jobs:
-DWarpX_MPI=ON \
-DWarpX_OPENPMD=ON \
-DWarpX_PRECISION=DOUBLE \
-DWarpX_FFT=ON \
-DWarpX_HEFFTE=ON
-DWarpX_FFT=ON
cmake --build build_2d -j 4

export WARPX_MPI=OFF
Expand Down
37 changes: 0 additions & 37 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ option(WarpX_LIB "Build WarpX as a library" OFF)
option(WarpX_MPI "Multi-node support (message-passing)" ON)
option(WarpX_OPENPMD "openPMD I/O (HDF5, ADIOS)" ON)
option(WarpX_FFT "FFT-based solvers" OFF)
option(WarpX_HEFFTE "Multi-node FFT-based solvers" OFF)
option(WarpX_PYTHON "Python bindings" OFF)
option(WarpX_SENSEI "SENSEI in situ diagnostics" OFF)
option(WarpX_QED "QED support (requires PICSAR)" ON)
Expand Down Expand Up @@ -146,10 +145,6 @@ mark_as_advanced(WarpX_MPI_THREAD_MULTIPLE)

option(WarpX_amrex_internal "Download & build AMReX" ON)

if(WarpX_HEFFTE AND NOT WarpX_MPI)
message(FATAL_ERROR "WarpX_HEFFTE (${WarpX_HEFFTE}) can only be used if WarpX_MPI is ON.")
endif()

# change the default build type to Release (or RelWithDebInfo) instead of Debug
set_default_build_type("Release")

Expand Down Expand Up @@ -197,10 +192,6 @@ option(ABLASTR_FFT "compile AnyFFT wrappers" ${WarpX_FFT})
if(WarpX_FFT)
set(ABLASTR_FFT ON CACHE STRING "FFT-based solvers" FORCE)
endif()
option(ABLASTR_HEFFTE "compile AnyFFT wrappers" ${WarpX_HEFFTE})
if(WarpX_HEFFTE)
set(ABLASTR_HEFFTE ON CACHE STRING "Multi-Node FFT-based solvers" FORCE)
endif()

# this defined the variable BUILD_TESTING which is ON by default
include(CTest)
Expand Down Expand Up @@ -242,23 +233,6 @@ if(WarpX_FFT)
endif()
endif()

# multi-node FFT
if(WarpX_HEFFTE)
if(WarpX_COMPUTE STREQUAL CUDA)
set(_heFFTe_COMPS CUDA)
elseif(WarpX_COMPUTE STREQUAL HIP)
set(_heFFTe_COMPS ROCM)
elseif(WarpX_COMPUTE STREQUAL SYCL)
set(_heFFTe_COMPS ONEAPI)
else() # NOACC, OMP
set(_heFFTe_COMPS FFTW) # or MKL
endif()
# note: we could also enforce GPUAWARE for CUDA and HIP, which can still be
# disabled at runtime

find_package(Heffte REQUIRED COMPONENTS ${_heFFTe_COMPS})
endif()

# Python
if(WarpX_PYTHON)
find_package(Python 3.8 COMPONENTS Interpreter Development.Module REQUIRED)
Expand Down Expand Up @@ -499,10 +473,6 @@ foreach(D IN LISTS WarpX_DIMS)
endif()
endif()

if(ABLASTR_HEFFTE)
target_link_libraries(ablastr_${SD} PUBLIC Heffte::Heffte)
endif()

if(WarpX_PYTHON)
target_link_libraries(pyWarpX_${SD} PRIVATE pybind11::module pybind11::windows_extras)
if(WarpX_PYTHON_IPO)
Expand Down Expand Up @@ -593,13 +563,6 @@ foreach(D IN LISTS WarpX_DIMS)
target_compile_definitions(ablastr_${SD} PUBLIC ABLASTR_USE_FFT)
endif()

if(WarpX_HEFFTE)
target_compile_definitions(ablastr_${SD} PUBLIC WARPX_USE_HEFFTE)
endif()
if(ABLASTR_HEFFTE)
target_compile_definitions(ablastr_${SD} PUBLIC ABLASTR_USE_HEFFTE)
endif()

if(WarpX_PYTHON AND pyWarpX_VERSION_INFO)
# for module __version__
target_compile_definitions(pyWarpX_${SD} PRIVATE
Expand Down
2 changes: 0 additions & 2 deletions Docs/source/install/cmake.rst
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ CMake Option Default & Values Descr
``WarpX_PRECISION`` SINGLE/**DOUBLE** Floating point precision (single/double)
``WarpX_PARTICLE_PRECISION`` SINGLE/**DOUBLE** Particle floating point precision (single/double), defaults to WarpX_PRECISION value if not set
``WarpX_FFT`` ON/**OFF** FFT-based solvers
``WarpX_HEFFTE`` ON/**OFF** Multi-Node FFT-based solvers
``WarpX_PYTHON`` ON/**OFF** Python bindings
``WarpX_QED`` **ON**/OFF QED support (requires PICSAR)
``WarpX_QED_TABLE_GEN`` ON/**OFF** QED table generation support (requires PICSAR and Boost)
Expand Down Expand Up @@ -275,7 +274,6 @@ Environment Variable Default & Values Descr
``WARPX_PRECISION`` SINGLE/**DOUBLE** Floating point precision (single/double)
``WARPX_PARTICLE_PRECISION`` SINGLE/**DOUBLE** Particle floating point precision (single/double), defaults to WarpX_PRECISION value if not set
``WARPX_FFT`` ON/**OFF** FFT-based solvers
``WARPX_HEFFTE`` ON/**OFF** Multi-Node FFT-based solvers
``WARPX_QED`` **ON**/OFF PICSAR QED (requires PICSAR)
``WARPX_QED_TABLE_GEN`` ON/**OFF** QED table generation (requires PICSAR and Boost)
``BUILD_PARALLEL`` ``2`` Number of threads to use for parallel builds
Expand Down
3 changes: 1 addition & 2 deletions Docs/source/install/dependencies.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ Optional dependencies include:
- `FFTW3 <http://www.fftw.org>`__: for spectral solver (PSATD or IGF) support when running on CPU or SYCL

- also needs the ``pkg-config`` tool on Unix
- `heFFTe 2.4.0+ <https://github.com/icl-utk-edu/heffte>`__: for multi-node spectral solver (IGF) support
- `BLAS++ <https://github.com/icl-utk-edu/blaspp>`__ and `LAPACK++ <https://github.com/icl-utk-edu/lapackpp>`__: for spectral solver (PSATD) support in RZ geometry
- `Boost 1.66.0+ <https://www.boost.org/>`__: for QED lookup tables generation support
- `openPMD-api 0.15.1+ <https://github.com/openPMD/openPMD-api>`__: we automatically download and compile a copy of openPMD-api for openPMD I/O support
Expand Down Expand Up @@ -81,7 +80,7 @@ Conda (Linux/macOS/Windows)

.. code-block:: bash

conda create -n warpx-cpu-mpich-dev -c conda-forge blaspp boost ccache cmake compilers git "heffte=*=mpi_mpich*" lapackpp "openpmd-api=*=mpi_mpich*" openpmd-viewer python make numpy pandas scipy yt "fftw=*=mpi_mpich*" pkg-config matplotlib mamba mpich mpi4py ninja pip virtualenv
conda create -n warpx-cpu-mpich-dev -c conda-forge blaspp boost ccache cmake compilers git lapackpp "openpmd-api=*=mpi_mpich*" openpmd-viewer python make numpy pandas scipy yt "fftw=*=mpi_mpich*" pkg-config matplotlib mamba mpich mpi4py ninja pip virtualenv
conda activate warpx-cpu-mpich-dev

# compile WarpX with -DWarpX_MPI=ON
Expand Down
12 changes: 0 additions & 12 deletions Examples/Tests/open_bc_poisson_solver/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,3 @@ if(WarpX_FFT)
OFF # dependency
)
endif()

if(WarpX_HEFFTE)
add_warpx_test(
test_3d_open_bc_poisson_solver_heffte # name
3 # dims
2 # nprocs
inputs_test_3d_open_bc_poisson_solver_heffte # inputs
analysis.py # analysis
diags/diag1000001 # output
OFF # dependency
)
endif()

This file was deleted.

1 change: 0 additions & 1 deletion GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ USE_OPENPMD = FALSE
WarpxBinDir = Bin

USE_FFT = FALSE
USE_HEFFTE = FALSE
USE_RZ = FALSE

USE_EB = FALSE
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
{
"lev=0": {
"Bx": 100915933.446046,
"Bx": 100915933.44604117,
"By": 157610622.18548763,
"Bz": 2.76973993530483e-13,
"Ex": 4.725065270619211e+16,
"Ey": 3.0253948989388292e+16,
"Bz": 9.614441087794229e-14,
"Ex": 4.725065270619209e+16,
"Ey": 3.025394898938681e+16,
"Ez": 3276573.9514776673,
"rho": 10994013582437.193
},
"electron": {
"particle_momentum_x": 5.701277606055763e-19,
"particle_momentum_y": 3.6504516636842883e-19,
"particle_momentum_x": 5.7012776060557455e-19,
"particle_momentum_y": 3.650451663685222e-19,
"particle_momentum_z": 1.145432768297242e-10,
"particle_position_x": 17.314086912497864,
"particle_position_y": 0.25836912671877965,
"particle_position_y": 0.25836912671877954,
"particle_position_z": 10066.329600000008,
"particle_weight": 19969036501.910976
}
Expand Down
Loading
Loading