Skip to content

Commit

Permalink
FFT: Fix for Intel limitation (AMReX-Codes#4222)
Browse files Browse the repository at this point in the history
It turns out Intel does not support batched 2D FFT.
  • Loading branch information
WeiqunZhang authored Nov 12, 2024
1 parent d6c9caa commit 2aa22d1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions Src/FFT/AMReX_FFT_OpenBCSolver.H
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@

#include <AMReX_FFT_R2C.H>

#include <AMReX_VisMF.H>

namespace amrex::FFT
{

Expand Down Expand Up @@ -54,6 +52,9 @@ OpenBCSolver<T>::OpenBCSolver (Box const& domain, Info const& info)
{
#if (AMREX_SPACEDIM == 3)
if (m_info.batch_mode) {
#if defined(AMREX_USE_SYCL)
amrex::Abort("FFT::OpenBCSolver: batch mode not support because Intel does not support batched 2d fft.");
#endif
auto gdom = make_grown_domain(domain,m_info);
gdom.enclosedCells(2);
gdom.setSmall(2, 0);
Expand Down
2 changes: 1 addition & 1 deletion Src/FFT/AMReX_FFT_R2C.H
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ R2C<T,D,S>::R2C (Box const& domain, Info const& info)
int myproc = ParallelContext::MyProcSub();
int nprocs = std::min(ParallelContext::NProcsSub(), m_info.nprocs);

#if (AMREX_SPACEDIM == 3)
#if (AMREX_SPACEDIM == 3) && !defined(AMREX_USE_SYCL) /* Intel does not support batched 2d fft */
if (S == DomainStrategy::slab && (m_real_domain.length(1) > 1)) {
m_slab_decomp = true;
}
Expand Down

0 comments on commit 2aa22d1

Please sign in to comment.