Skip to content

Commit

Permalink
Fix Intel oneMKL FFT setup
Browse files Browse the repository at this point in the history
  • Loading branch information
WeiqunZhang committed Nov 13, 2024
1 parent 2aa22d1 commit a1224d2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
6 changes: 3 additions & 3 deletions Src/FFT/AMReX_FFT_Helper.H
Original file line number Diff line number Diff line change
Expand Up @@ -254,10 +254,10 @@ struct Plan
strides.push_back(1);
#ifndef AMREX_USE_MKL_DFTI_2024
pp->set_value(oneapi::mkl::dft::config_param::FWD_STRIDES, strides);
pp->set_value(oneapi::mkl::dft::config_param::BWD_STRIDES, strides);
// Do not set BWD_STRIDES
#else
pp->set_value(oneapi::mkl::dft::config_param::FWD_STRIDES, strides.data());
pp->set_value(oneapi::mkl::dft::config_param::BWD_STRIDES, strides.data());
// Do not set BWD_STRIDES
#endif
pp->set_value(oneapi::mkl::dft::config_param::WORKSPACE,
oneapi::mkl::dft::config_value::WORKSPACE_EXTERNAL);
Expand Down Expand Up @@ -1239,7 +1239,7 @@ void Plan<T>::init_r2c (IntVectND<M> const& fft_size, void* pbf, void* pbb, bool

#ifndef AMREX_USE_MKL_DFTI_2024
pp->set_value(oneapi::mkl::dft::config_param::FWD_STRIDES, strides);
pp->set_value(oneapi::mkl::dft::config_param::BWD_STRIDES, strides);
// Do not set BWD_STRIDES
#else
pp->set_value(oneapi::mkl::dft::config_param::FWD_STRIDES, strides.data());
// Do not set BWD_STRIDES
Expand Down
3 changes: 0 additions & 3 deletions Src/FFT/AMReX_FFT_OpenBCSolver.H
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,6 @@ 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) && !defined(AMREX_USE_SYCL) /* Intel does not support batched 2d fft */
#if (AMREX_SPACEDIM == 3)
if (S == DomainStrategy::slab && (m_real_domain.length(1) > 1)) {
m_slab_decomp = true;
}
Expand Down

0 comments on commit a1224d2

Please sign in to comment.