Dear Edward,
I have experience with mpi4py-fft.
Does your data map (well) to a uniform covering grid?
In that case the domain decomposition is (should be) straightforward.
Here are two helper functions to setup the FFTs and get the local
wavenumber mesh:
https://github.com/pgrete/energy-transfer-analysis/blob/back-to-mpi4py-fft/FFTHelperFuncs.py
and the `readAllFieldsWithYT` function here
https://github.com/pgrete/energy-transfer-analysis/blob/d1577f91f96db2a8ff2d7e3c64375becce014647/IOhelperFuncs.py#L172C5-L172C24
contains the code to load the data.
Depending on your data you may have to adjust the
`ad = ds.covering_grid(level=0,
left_edge=start_pos,dims=FFTHelperFuncs.local_shape)`
line (e.g., if you only want to extra a subset of your volume at a given
level).
I'm happy to provide further instructions.
Cheers,
Philipp
On 7/22/25 2:32 PM, 林子祥 via yt-dev wrote:
Hi all,
At the yt workshop 2025, Matt and I discussed how to add a function to
yt to analyse the matter power spectrum of a cosmological simulation.
Based on Matt's suggestions, I tried using |mpi4py-fft| to handle the
FFT with MPI. However, this library has specific requirements for the
data decomposition. So, I need to understand how yt handles domain
decomposition in order to proceed.
Could someone point me to the relevant part of the code or documentation
that describes yt’s domain decomposition strategy? Alternatively, any
advice on how to interface yt’s data layout with |mpi4py-fft| would be
greatly appreciated. Thanks in advance!
Best regards,
Edward
_______________________________________________
yt-dev mailing list -- yt-dev@python.org
To unsubscribe send an email to yt-dev-le...@python.org
https://mail.python.org/mailman3//lists/yt-dev.python.org
Member address: pgr...@hs.uni-hamburg.de
_______________________________________________
yt-dev mailing list -- yt-dev@python.org
To unsubscribe send an email to yt-dev-le...@python.org
https://mail.python.org/mailman3//lists/yt-dev.python.org
Member address: arch...@mail-archive.com