Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
276 commits
Select commit Hold shift + click to select a range
f9373e8
WIP Read/Write Params
pgrete Apr 15, 2024
96a3f4c
Make ReadParams private member
pgrete Apr 15, 2024
61306a0
Merge remote-tracking branch 'origin/develop' into pgrete/pmd-output
pgrete Apr 18, 2024
56976a8
Fix root level in output
pgrete Apr 18, 2024
6199843
Move to mesh per record standard for writing
pgrete Apr 22, 2024
9fb9f68
Merge remote-tracking branch 'origin/develop' into pgrete/pmd-output
pgrete Apr 23, 2024
684b7ab
Allow for 2D and 3D output. Fix single dataset reset.
pgrete Apr 23, 2024
251c6ea
Fix logical loc
pgrete Apr 23, 2024
03f80c7
Rename opmd files
pgrete Apr 24, 2024
890fffe
Separate common calls to chunks and names
pgrete Apr 24, 2024
04359d3
Reuse shared chunk and name for restarts
pgrete Apr 24, 2024
2b89659
Add regression test
pgrete Apr 24, 2024
804e60d
Somewhat make restarts working
pgrete Apr 24, 2024
a436f55
Fix order of arguments for correct flush
pgrete Apr 26, 2024
6a3a80d
Merge remote-tracking branch 'origin/develop' into pgrete/pmd-output
pgrete Apr 26, 2024
28d725d
Fix handling of output variable names
pgrete Apr 26, 2024
a039ea1
Fix reading chunks for sparsely populated output files
pgrete Apr 26, 2024
ae8519f
Merge remote-tracking branch 'origin/develop' into pgrete/pmd-output
pgrete Apr 29, 2024
7476641
Dont tell anyone I spent days on this...
pgrete May 3, 2024
39d4b99
Temp disable dumping Views from device
pgrete May 3, 2024
d2ba882
Merge branch 'develop' into pgrete/pmd-output
pgrete May 22, 2024
626303d
Merge branch 'pgrete/fix-hasghost-restart' into pgrete/pmd-output
pgrete Jun 12, 2024
4241198
Dump deref cnt in opmd restart
pgrete Jun 12, 2024
101ebf2
Merge branch 'develop' into pgrete/pmd-output
BenWibking Jun 18, 2024
60a38b2
install openpmd in macOS CI
BenWibking Jun 18, 2024
461eeaa
Merge branch 'develop' into pgrete/pmd-output
BenWibking Jun 21, 2024
cd007d3
Merge remote-tracking branch 'origin/develop' into pgrete/pmd-output
pgrete Jun 25, 2024
28020db
Remove extraneous popRegion
pgrete Jun 25, 2024
5324e00
Merge remote-tracking branch 'origin/develop' into pgrete/pmd-output
pgrete Jul 11, 2024
af4b966
Fix formatting
pgrete Jul 11, 2024
0e015d1
Make format clang16 compatible
pgrete Jul 11, 2024
5135aea
Fix default backend_config parsing
pgrete Jul 12, 2024
b344291
another attempt
pgrete Jul 12, 2024
7486915
Bump OpenPMD version
pgrete Jul 12, 2024
0e3f758
pmd: Write scalar particle data
pgrete Jul 25, 2024
e39ef61
Code dedup
pgrete Jul 25, 2024
b938511
Allow writing non-scalar particles
pgrete Jul 25, 2024
08d6b41
Make positions standard compliant
pgrete Jul 25, 2024
bf74c7e
Allow for particles restarts (serial works)
pgrete Jul 25, 2024
3b37c26
Support particle restarts in parallel
pgrete Jul 26, 2024
0ca5b6f
Merge remote-tracking branch 'origin/develop' into pgrete/pmd-output
pgrete Jul 26, 2024
b30788a
Merge remote-tracking branch 'origin/develop' into pgrete/pmd-output
pgrete Aug 6, 2024
5f95466
Add now prefix to pmd outputs
pgrete Aug 6, 2024
6811594
Make linter happy
pgrete Aug 7, 2024
c0d7f11
Merge remote-tracking branch 'origin/develop' into pgrete/pmd-output
pgrete Sep 2, 2024
b2d7525
Bump OPMD version and add delim
pgrete Sep 4, 2024
f229274
Merge branch 'develop' into pgrete/pmd-output
pgrete Sep 26, 2024
3283635
Change delim. Is this stupid?
pgrete Sep 26, 2024
d59d573
Merge branch 'develop' into pgrete/pmd-output
pgrete Oct 7, 2024
3f95fc4
Make params IO test more flexible
pgrete Oct 7, 2024
1141ff3
Add test case for opmd params IO
pgrete Oct 7, 2024
e6e4d0b
Reading/writing non-ParArray Params works
pgrete Oct 7, 2024
8230f94
Allow writing ParArray and Views to Params
pgrete Oct 8, 2024
e64ae7e
Read ParArray/View from opmd raw
pgrete Oct 8, 2024
b789711
Make basic parsing of Params work
pgrete Oct 8, 2024
466ecd2
Restore view from opmd params
pgrete Oct 8, 2024
3aa4c78
Fix manual pararray reading
pgrete Oct 8, 2024
4c1c70f
Make linter happy?
pgrete Oct 8, 2024
8a1850b
Make restoring HostViews possible
pgrete Oct 9, 2024
1f02ffa
Make reading host arrays work using the direct interface in the unit …
pgrete Oct 9, 2024
d6565c5
Expands types for read/write to all vec
pgrete Oct 9, 2024
6065213
Remove debug info
pgrete Oct 9, 2024
4bf6a92
Merge branch 'develop' into pgrete/pmd-output
BenWibking Oct 16, 2024
e67f589
Merge branch 'develop' into pgrete/pmd-output
pgrete Nov 9, 2024
503a5b6
Fix bc interface from PR 1177
pgrete Nov 9, 2024
d064f03
Merge branch 'develop' into pgrete/pmd-output
BenWibking Nov 22, 2024
dfbcb27
Merge branch 'develop' into pgrete/pmd-output
pgrete Nov 29, 2024
4769a63
Fix output numbering for triggered opmd outputs
pgrete Nov 29, 2024
543dbf9
Make formatter happy
pgrete Nov 29, 2024
449cd5e
Bump opmd to 0.16.1 stable version (not requiring work around any more)
pgrete May 23, 2025
7f813c0
AMR restarts work and are bitwise identical now
pgrete May 23, 2025
3689e6c
Cross test opmd and rst outputs
pgrete May 23, 2025
2db2db7
Merge branch 'develop' into pgrete/pmd-output
pgrete May 23, 2025
aea0519
Fix merge issues
pgrete May 23, 2025
57b719a
Fix compile issue with std::string dtor of vectypes
pgrete May 23, 2025
9bed0ce
Allow embedded and system opmd build w and wo MPI
pgrete Jun 4, 2025
9ae2fde
Try opmd build in CI
pgrete Jun 5, 2025
0ac42c6
Provide path to openpmd_api
pgrete Jun 5, 2025
d230db9
Update CI containers to be used
pgrete Jun 5, 2025
41c94c5
Disable read/write of string views (not supported by Kokkos)
pgrete Jun 5, 2025
642e23d
Add comments
pgrete Jun 18, 2025
8e089bb
Add opmd dump/load of new uint64 ids
pgrete Jun 18, 2025
1b8b904
Add opmd write support for all field types
pgrete Jun 19, 2025
a1768b0
Fix 2D offsets
pgrete Jun 20, 2025
69fc044
Merge remote-tracking branch 'origin/develop' into pgrete/pmd-output
pgrete Jul 2, 2025
3d48016
First stab at opmd restart for non-CC fields
pgrete Jul 2, 2025
2a0cde8
Merge remote-tracking branch 'origin/develop' into pgrete/pmd-output
pgrete Jul 2, 2025
301f25b
First attempt at adding/restoring opmd sparseinfo
pgrete Jul 2, 2025
0d5d4d3
Fix misplaced comma
pgrete Jul 2, 2025
207d24b
Add missing int8_t to mpi type map
pgrete Jul 3, 2025
4fe5d63
Only write SparseInfo when sparse fields are present
pgrete Jul 3, 2025
762a9ce
Fix interfaces
pgrete Jul 24, 2025
be68203
Fix doc build
pgrete Jul 24, 2025
5ce4304
Add mutability maybe restart and made it so we can read old restart f…
jonahm-LANL Jul 28, 2025
ce7ef95
Just warn for default restart Params
pgrete Jul 29, 2025
80e3ef7
Update restart logic. Fixes #1235
pgrete Jul 29, 2025
f133962
Only warn about default non-input params
pgrete Jul 29, 2025
fbfd356
Ensure last output is not in the future
pgrete Jul 29, 2025
c7f8ab5
remove pmesh->is_restart for Globals
pgrete Jul 30, 2025
dd94417
Allow writing legacy id fields for particles
pgrete Jul 30, 2025
9d90214
Allow empty restart swarms
pgrete Jul 30, 2025
1988ed2
Unify missing var handling
pgrete Jul 30, 2025
38b1ec5
Add reminder todo to params
pgrete Jul 30, 2025
b3849d4
Add Changelog
pgrete Jul 30, 2025
51f45b7
change check orphans to default to false for restarts
jonahm-LANL Jul 30, 2025
dcc025d
more careful logic
jonahm-LANL Jul 30, 2025
04f0cab
oops added an if
jonahm-LANL Jul 30, 2025
3ab5353
ok try this
jonahm-LANL Jul 30, 2025
11a9884
Fix removing first elemn in linked list
pgrete Jul 31, 2025
43fcf78
Add missing guards
pgrete Jul 31, 2025
be19c0a
Merge branch 'pgrete/backwards-comapt-restarts-v2' into pgrete/pmd-ou…
pgrete Jul 31, 2025
fcc4a5b
Fix interface
pgrete Aug 1, 2025
72412bd
Check pin for opmd out and check vars skel
pgrete Aug 1, 2025
73e445f
Add option for single prec output in openpmd
pgrete Aug 1, 2025
d6936ae
Allow coarsened opmd outputs
pgrete Aug 1, 2025
4924929
Merge branch 'develop' into pgrete/pmd-output
pgrete Aug 18, 2025
cb8997b
Fix logic causing issues for restarts with varying output blocks
pgrete Aug 18, 2025
fa25d69
Fix formatting and test case
pgrete Aug 19, 2025
4f8249e
Merge branch 'pgrete/fix-output-block-restarts' into pgrete/pmd-output
pgrete Aug 19, 2025
6787b42
Fix/cleanup include logic and move format ver to impl
pgrete Aug 19, 2025
0a5df77
Add missing try-catch for opmd params
pgrete Aug 19, 2025
3edc7af
Fix opmd params try catch
pgrete Aug 19, 2025
7cc4040
Add final logic to opmd
pgrete Aug 19, 2025
e671e67
WIP slices
pgrete Aug 19, 2025
6ab9d02
Logic for slices seems to work. Data not.
pgrete Aug 20, 2025
6cd7c39
Fix final logic
pgrete Aug 21, 2025
56081fe
Fix slices
pgrete Aug 21, 2025
dc60f00
Merge remote-tracking branch 'origin/develop' into pgrete/pmd-output
pgrete Aug 21, 2025
3267252
Merge branch 'develop' into pgrete/pmd-output
pgrete Aug 25, 2025
505cdb4
Fix regression test
pgrete Aug 28, 2025
c657226
merge
BenWibking Sep 30, 2025
39c2a9a
fix style
BenWibking Sep 30, 2025
dcd576c
Merge branch 'develop' into pgrete/pmd-output
pgrete Oct 7, 2025
beeacba
Impl VariableExists for OpenPMD
pgrete Oct 7, 2025
00d9476
Format
pgrete Oct 7, 2025
4d33816
Merge branch 'develop' into pgrete/pmd-output
pgrete Oct 15, 2025
4efedc1
Use for sizes
pgrete Oct 22, 2025
9b30739
Merge branch 'develop' into pgrete/pmd-output
pgrete Nov 11, 2025
690f465
Merge branch 'develop' into pgrete/pmd-output
pgrete Nov 14, 2025
08e2eb8
Update contianer and requirements
pgrete Nov 21, 2025
1dd2dbf
Merge remote-tracking branch 'origin/develop' into pgrete/pmd-output
pgrete Dec 15, 2025
5317f3a
Add openPMD user facing doc
pgrete Dec 17, 2025
f0d0903
Merge remote-tracking branch 'origin/develop' into pgrete/pmd-output
pgrete Dec 17, 2025
7337b83
Create Parthenon FFTManager Class and Initial testing
lkasselm Jan 2, 2026
2597b5b
Added spectrum output type and initial tests
lkasselm Jan 2, 2026
c76f78f
Minor changes
lkasselm Jan 6, 2026
86d4aa7
Added UniformGridHelper Class
lkasselm Jan 6, 2026
4633fcd
FFTManager now uses UniformGridHelper
lkasselm Jan 6, 2026
e719390
Merge remote-tracking branch 'origin/develop' into pgrete/pmd-output
pgrete Jan 13, 2026
0effb48
Allow writing subset of variables.
pgrete Jan 13, 2026
c739945
Format
pgrete Jan 13, 2026
95351e8
Use base container
pgrete Jan 13, 2026
aee29d9
Merge branch 'develop' into pgrete/pmd-output
pgrete Jan 30, 2026
0d0e928
FFT Manager now uses PIMPL to hide the FFT backend.
lkasselm Feb 3, 2026
bdbc27e
spectral output now works in GPUs using the FFTManager
lkasselm Feb 3, 2026
c129b46
Minor changes (adding comments, moving lines)
lkasselm Feb 6, 2026
a6d7f73
Merge remote-tracking branch 'myfork/FFT' into lkasselm/fft
lkasselm Feb 6, 2026
206078d
Add HeFFTe as a submodule
lkasselm Feb 9, 2026
cf0de9b
Add heffte as submodule
lkasselm Feb 9, 2026
246cb62
Update src/pack/pack_utils.hpp
Yurlungur Feb 19, 2026
8530ea2
Merge branch 'develop' into pgrete/size_t-for-size
Yurlungur Feb 19, 2026
254e410
Merge remote-tracking branch 'origin/develop' into pgrete/pmd-output
pgrete Mar 9, 2026
535feff
Add spectral type in the spectrum output file name
lkasselm Mar 13, 2026
dbc99ff
Merge branch 'develop' into pgrete/size_t-for-size
pgrete Apr 28, 2026
e9b2985
size_t -> std::size_t
pgrete Apr 28, 2026
04903d5
One more oop
pgrete Apr 28, 2026
4563fc3
Merge branch 'develop' into pgrete/size_t-for-size
pgrete Apr 29, 2026
12c28cd
Merge branch 'develop' into pgrete/pmd-output
BenWibking Apr 30, 2026
9f6dd1c
update header names
BenWibking Apr 30, 2026
6af8f5c
build fix
BenWibking Apr 30, 2026
e7d40c3
openPMD bump
BenWibking Apr 30, 2026
9e712fa
Merge remote-tracking branch 'origin/pgrete/size_t-for-size' into pgr…
pgrete May 4, 2026
bdea6d2
Fix typo and size_t
pgrete May 4, 2026
6c67bac
Add include guard for opmd param test
pgrete May 4, 2026
0a1a159
Ensure opmd restart outputs cannot be coarsened
pgrete May 4, 2026
2409e30
Enforce no ghost zones in opmd outputs
pgrete May 4, 2026
51410a7
Fix fillsize logic for arb topolog elements
pgrete May 4, 2026
cf120bf
Build opmd-api for serial builds
pgrete May 4, 2026
72ab3cf
Allow trailing / in bp dir name for restarts
pgrete May 4, 2026
e42273f
Unify DumpOutputMode and SubOutputType
pgrete May 4, 2026
70e7194
Add .pmd file for VisIt and ParaView
pgrete May 4, 2026
5ee9f59
Add basic Partheon provenacne infos to opmd output
pgrete May 4, 2026
2feb3e9
Merge branch 'develop' into pgrete/pmd-output
pgrete May 4, 2026
d78ce0a
Add safety checks for coarsening factor
pgrete May 4, 2026
a648350
Fix include guards in params unit test
pgrete May 4, 2026
7925300
obey desired meshdata container for hdf5 var
pgrete May 4, 2026
9198ff2
Add safety check for standard compliant opmd record names
pgrete May 4, 2026
6efb2e8
Check coarsening factor depending on dimensionality
pgrete May 4, 2026
cd3e9c3
Fix logic...
pgrete May 4, 2026
f8f1ab6
Change default output_type to data
pgrete May 5, 2026
f7285b5
Relax dim requirement for vector output
pgrete May 5, 2026
a28377c
Merge branch 'develop' into pgrete/pmd-output
BenWibking May 15, 2026
2a6ee87
Added output type for slices of the magnetic-helicity density field
lkasselm May 18, 2026
a11c740
Merge branch 'develop' into pgrete/pmd-output
Yurlungur May 24, 2026
b544d4e
Refactor index flattening into uniform_grid_helper class
lkasselm May 27, 2026
b2a43fd
Made the spectrum output type more general and added example for Four…
lkasselm May 28, 2026
99fb782
Add documentation for FFT feature
lkasselm Jun 2, 2026
356fd1f
Refactoring: Add gather and scatter methods in UniformGridHelper. Add…
lkasselm Jun 2, 2026
8758de3
Minor cleanups / refactors
lkasselm Jun 4, 2026
0d62efb
Documentation changes
lkasselm Jun 4, 2026
450a932
Merge branch 'develop' into pgrete/pmd-output
pgrete Jun 4, 2026
ff2506d
Merge branch 'pgrete/pmd-output' into lkasselm/fft
pgrete Jun 4, 2026
7accbe5
cpp-py-formatter
Jun 4, 2026
def4592
Copyright headers and newlines
lkasselm Jun 7, 2026
28596cc
Remove helicity slice
lkasselm Jun 7, 2026
11a27c7
.
lkasselm Jun 7, 2026
59fdf24
mesh.hpp: Conditional includes of FFTManager and UniformGridHelper
lkasselm Jun 8, 2026
4872371
Fourier transform example: Remove unused function declaration
lkasselm Jun 8, 2026
4b8e062
uniform_grid_helper.cpp: Clean up print message for layout
lkasselm Jun 8, 2026
9921ee0
Change cmakelists and outputs.cpp to make compilation of all FFT rela…
lkasselm Jun 8, 2026
136ee21
Move Initialize() methods in UniformGridHelper and FFTManager into co…
lkasselm Jun 8, 2026
7d59062
CmakeLists.txt: Hide heffte stuff inside target guard
lkasselm Jun 8, 2026
8659ff0
Change #pragma once to include guards in uniform_grid_helper and FFTM…
lkasselm Jun 8, 2026
0cfde03
Spectral output - using std::format and double precision
lkasselm Jun 8, 2026
52b121e
Naming conventions
lkasselm Jun 8, 2026
fde63fb
Naming conventions, include order, md->NumBlocks() instead of pmesh->…
lkasselm Jun 9, 2026
658c46a
num_packs = 1 instead of pack_size = -1
lkasselm Jun 9, 2026
0ebdc10
Naming conventions
lkasselm Jun 9, 2026
d1c6b44
Documentation
lkasselm Jun 9, 2026
a28bd77
Directly use Kokkos::complex in FFT API so that no recast is needed
lkasselm Jun 10, 2026
aa31e0c
Load heFFTe via FetchContent instad of submodule and also allow syste…
lkasselm Jun 10, 2026
40ad91b
FFTManager comments
lkasselm Jun 10, 2026
d0652bf
Regression test for Fourier transform
lkasselm Jun 10, 2026
901d585
formatting
lkasselm Jun 10, 2026
c110c2c
Python formatting
lkasselm Jun 10, 2026
fbaf152
Move uniform_grid_helper from mesh/ into utils/
lkasselm Jun 10, 2026
2a4b237
Refactor spectrum calculation logic into utils/ and add generative AI…
lkasselm Jun 10, 2026
11775da
guard Fourier test build
lkasselm Jun 10, 2026
fe0ff61
include order
lkasselm Jun 10, 2026
32c5fec
Make linter happy I hope
lkasselm Jun 11, 2026
c94b0ed
Add FFT flag to ci settings
lkasselm Jun 11, 2026
613b59d
FFTManager backend selection: Check for KOKKOS_ENABLE_SYCL and throw …
lkasselm Jun 11, 2026
d5bb4ac
formatting
lkasselm Jun 11, 2026
aeb94ff
Changelog
lkasselm Jun 11, 2026
588c79c
README heFFTe optional dependency
lkasselm Jun 11, 2026
952c206
Merge branch 'develop' into lkasselm/fft
lkasselm Jun 13, 2026
9d11e62
Make backward FFT also use the workspace
lkasselm Jun 29, 2026
5f57f14
Fixed ordering mistake in calc_spectrum hermitian symmetry factor
lkasselm Jul 1, 2026
013f360
Fix single precision compilation with Real=float
pgrete Jul 10, 2026
e922a69
Add missed conversions
pgrete Jul 10, 2026
1de0f87
Merge remote-tracking branch 'origin/pgrete/single-prec-compile' into…
pgrete Jul 10, 2026
2a8fb80
Bump Heffte version to latest and ensure it work as external lib and …
pgrete Jul 10, 2026
31d72f4
Fix precision. Add heffte option. Move to namespace. Add CalcSpec poi…
pgrete Jul 10, 2026
6138245
Fix copyright
pgrete Jul 10, 2026
3b6c778
Add check for CalcSpec fun
pgrete Jul 10, 2026
6b2b170
Merge remote-tracking branch 'origin/develop' into lkasselm/fft
pgrete Jul 16, 2026
098fd66
Bump container and dep to rocm7.2.4
pgrete Jul 16, 2026
023d4cf
Merge branch 'pgrete/bump-rocm-container' into lkasselm/fft
pgrete Jul 16, 2026
5beaaa5
Merge remote-tracking branch 'origin/develop' into lkasselm/fft
pgrete Jul 28, 2026
45e2176
Enable FFT only with MPI
pgrete Jul 29, 2026
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
10 changes: 8 additions & 2 deletions .github/workflows/ci-extended.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,14 @@ jobs:
fi

- name: Configure
env:
ENABLE_FFT: ${{ matrix.parallel == 'mpi' && 'ON' || 'OFF' }}
run: |
cmake -B build \
-DCMAKE_BUILD_TYPE=Release \
-DENABLE_ASAN=${{ steps.cmake-vars.outputs.enable_asan }} \
-DMACHINE_VARIANT=${{ matrix.device }}-${{ matrix.parallel }}
-DMACHINE_VARIANT=${{ matrix.device }}-${{ matrix.parallel }} \
-DPARTHENON_ENABLE_FFT=${ENABLE_FFT}

- name: Build
run: cmake --build build
Expand Down Expand Up @@ -153,6 +156,8 @@ jobs:
key: gold-standard

- name: Configure
env:
ENABLE_FFT: ${{ matrix.parallel == 'mpi' && 'ON' || 'OFF' }}
run: |
git config --global --add safe.directory $(pwd)
# The extra CMAKE_PREFIX_PATH seems to be required for current rocm6.2 and 7.2, see
Expand All @@ -163,7 +168,8 @@ jobs:
-DCMAKE_BUILD_TYPE=Release \
-DMACHINE_VARIANT=hip-${{ matrix.parallel }} \
-DCMAKE_PREFIX_PATH=/opt/rocm-7.2.4 \
-DCMAKE_CXX_COMPILER=hipcc
-DCMAKE_CXX_COMPILER=hipcc \
-DPARTHENON_ENABLE_FFT=${ENABLE_FFT}

- name: Build
run: cmake --build build
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
## Current develop

### Added (new features/APIs/variables/...)
- [[PR 1403]](https://github.com/parthenon-hpc-lab/parthenon/pull/1403) Add interface for Fourier transforms on uniform meshes via heFFTe
- [[PR 1408]](https://github.com/parthenon-hpc-lab/parthenon/pull/1408) Add GetAsUnresolvedString() method to ParameterInput
- [[PR 1050]](https://github.com/parthenon-hpc-lab/parthenon/pull/1050) Add support for OpenPMD/ADIOS2 output (incl slices and coarsened dumps)
- [[PR 1271]](https://github.com/parthenon-hpc-lab/parthenon/pull/1271) Add option to set a minimum number of teams for boundary communication kernels
Expand Down
38 changes: 38 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ else()
OFF)
endif()

option(PARTHENON_ENABLE_FFT "Enable Parthenon FFT functionality" OFF)
option(PARTHENON_USE_SYSTEM_HEFFTE "Use system-installed heFFTe instead of fetching it" OFF)

# Check if we are using Parthenon as a subproject
set(_parthenon_is_toplevel OFF)
if (CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
Expand Down Expand Up @@ -492,7 +495,42 @@ set(CMAKE_INSTALL_INCLUDEDIR "${CMAKE_INSTALL_INCLUDEDIR}/parthenon")
set(DOC_GEN_PATH "${CMAKE_SOURCE_DIR}/doc/sphinx/src/generated" CACHE STRING
"Path to save generated data for docs.")

if (PARTHENON_ENABLE_FFT)
if(NOT ENABLE_MPI)
message(FATAL_ERROR
"PARTHENON_ENABLE_FFT requires MPI because the heFFTe backend uses "
"an MPI communicator. Reconfigure without PARTHENON_DISABLE_MPI=ON.")
endif()
if (PARTHENON_USE_SYSTEM_HEFFTE)
find_package(Heffte REQUIRED)
if (NOT Heffte_FOUND)
message(FATAL_ERROR "heFFTe requested to be used from the environment but it was "
"not found. Either append the path to the installed heFFTe lib via "
"Heffte_DIR or CMAKE_PREFIX_PATH, or use the version fetched by Parthenon by "
"keeping PARTHENON_USE_SYSTEM_HEFFTE=OFF")
endif()
else()
include(FetchContent)
set(Heffte_ENABLE_CUDA ${Kokkos_ENABLE_CUDA} CACHE BOOL "Enable CUDA for heFFTe" FORCE)
set(Heffte_ENABLE_ROCM ${Kokkos_ENABLE_HIP} CACHE BOOL "Enable ROCm for heFFTe" FORCE)
FetchContent_Declare(Heffte
GIT_REPOSITORY "https://github.com/icl-utk-edu/heffte.git"
GIT_TAG "4d8d459") # current (Jul26) GitHub `master` (from Nov25)
FetchContent_MakeAvailable(Heffte)
if (NOT TARGET Heffte::Heffte)
add_library(Heffte::Heffte ALIAS Heffte)
endif()
install(TARGETS Heffte EXPORT parthenonTargets)
endif()
endif()

add_subdirectory(src)

if (PARTHENON_ENABLE_FFT)
target_link_libraries(parthenon PRIVATE Heffte::Heffte)
target_compile_definitions(parthenon PUBLIC PARTHENON_ENABLE_FFT)
endif()

add_subdirectory(example)
add_subdirectory(benchmarks)

Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ Parthenon -- a performance portable block-structured adaptive mesh refinement fr
* OpenPMD and ADIOS2 (for outputs)
* HDF5 (for outputs)
* Ascent (for in situ visualization and analysis)
* heFFTe (for performing Fourier transforms on uniform meshes)

## Other

Expand Down
1 change: 1 addition & 0 deletions doc/sphinx/src/chapters/advanced_features.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ and solvers.
../interface/sparse
../integrators
../solvers
../fourier_transforms
Loading
Loading