<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Can't find the examples/dftf/ directory in my MKL install in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Can-t-find-the-examples-dftf-directory-in-my-MKL-install/m-p/1717066#M37335</link>
    <description>&lt;P&gt;Examples&amp;nbsp; live in the&amp;nbsp;&amp;lt;mkl root&amp;gt;/share/doc/mkl/examples folder.&amp;nbsp; There you will find dftf/ folder by unpacking the examples_core_f.tgz archive (or equivalent if you are on Windows).&lt;/P&gt;</description>
    <pubDate>Mon, 15 Sep 2025 15:47:35 GMT</pubDate>
    <dc:creator>Spencer_P_Intel</dc:creator>
    <dc:date>2025-09-15T15:47:35Z</dc:date>
    <item>
      <title>Can't find the examples/dftf/ directory in my MKL install</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Can-t-find-the-examples-dftf-directory-in-my-MKL-install/m-p/1717031#M37334</link>
      <description>&lt;P&gt;I just installed the standalone MKL and it did not include the&amp;nbsp;examples/dftf/ directory. The&amp;nbsp; MKL developers guide says it should exist. Where can I get these examples or are they now gone?&lt;/P&gt;</description>
      <pubDate>Mon, 15 Sep 2025 11:08:17 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Can-t-find-the-examples-dftf-directory-in-my-MKL-install/m-p/1717031#M37334</guid>
      <dc:creator>brianreinhold</dc:creator>
      <dc:date>2025-09-15T11:08:17Z</dc:date>
    </item>
    <item>
      <title>Re: Can't find the examples/dftf/ directory in my MKL install</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Can-t-find-the-examples-dftf-directory-in-my-MKL-install/m-p/1717066#M37335</link>
      <description>&lt;P&gt;Examples&amp;nbsp; live in the&amp;nbsp;&amp;lt;mkl root&amp;gt;/share/doc/mkl/examples folder.&amp;nbsp; There you will find dftf/ folder by unpacking the examples_core_f.tgz archive (or equivalent if you are on Windows).&lt;/P&gt;</description>
      <pubDate>Mon, 15 Sep 2025 15:47:35 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Can-t-find-the-examples-dftf-directory-in-my-MKL-install/m-p/1717066#M37335</guid>
      <dc:creator>Spencer_P_Intel</dc:creator>
      <dc:date>2025-09-15T15:47:35Z</dc:date>
    </item>
    <item>
      <title>Re: Can't find the examples/dftf/ directory in my MKL install</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Can-t-find-the-examples-dftf-directory-in-my-MKL-install/m-p/1717300#M37337</link>
      <description>&lt;P&gt;Thank you! It's good to have those. My plan routine compiled and built but was totally different than the example. I don't understand how it built.&lt;BR /&gt;&lt;BR /&gt;After looking at the examples I changed my routine to&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;module Fftw3HelpersModule
    use, intrinsic :: iso_c_binding
    implicit none

    ! FFTW plan handles for different transforms
    integer*8 :: plan_spectral_to_grid_sin = 0
    integer*8 :: plan_grid_to_spectral_sin = 0
    integer*8 :: plan_spectral_to_grid_cos = 0
    integer*8 :: plan_grid_to_spectral_cos = 0
    integer*8 :: plan_spectral_to_grid_zonal_1d = 0
    integer*8 :: plan_grid_to_spectral_zonal_1d = 0

    contains

    subroutine setup_fftw_plans(Nx, Ny)
        use, intrinsic :: iso_c_binding
        implicit none

        include 'fftw3.f'
        include 'fftw3_mkl.f'

        integer(c_int), intent(in) :: Nx, Ny
        real(C_FLOAT), allocatable :: dummy(:, :)
        real(C_FLOAT), allocatable :: dummy_1d(:)

        ! Cleanup existing plans
        if (plan_spectral_to_grid_sin .NE. 0) call sfftw_destroy_plan(plan_spectral_to_grid_sin)
        if (plan_grid_to_spectral_sin .NE. 0) call sfftw_destroy_plan(plan_grid_to_spectral_sin)
        if (plan_spectral_to_grid_cos .NE. 0) call sfftw_destroy_plan(plan_spectral_to_grid_cos)
        if (plan_grid_to_spectral_cos .NE. 0) call sfftw_destroy_plan(plan_grid_to_spectral_cos)
        if (plan_spectral_to_grid_zonal_1d .NE. 0) call sfftw_destroy_plan(plan_spectral_to_grid_zonal_1d)
        if (plan_grid_to_spectral_zonal_1d .NE. 0) call sfftw_destroy_plan(plan_grid_to_spectral_zonal_1d)

        allocate(dummy(Ny, Nx))
        allocate(dummy_1d(Ny))

        ! Plans for sin(kx)sin(ly) and cos(kx)sin(ly) components
        call sfftw_plan_r2r_2d(plan_grid_to_spectral_sin, Ny, Nx, dummy, dummy, FFTW_RODFT00, FFTW_R2HC, FFTW_MEASURE) ! MKL_RODFT00
        call sfftw_plan_r2r_2d(plan_spectral_to_grid_sin, Ny, Nx, dummy, dummy, FFTW_RODFT00, FFTW_HC2R, FFTW_MEASURE)
        ! Plans for sin(kx)cos(ly) and cos(kx)cos(ly) components
        call sfftw_plan_r2r_2d(plan_grid_to_spectral_cos, Ny, Nx, dummy, dummy, FFTW_REDFT00, FFTW_R2HC, FFTW_MEASURE)
        call sfftw_plan_r2r_2d(plan_spectral_to_grid_cos, Ny, Nx, dummy, dummy, FFTW_REDFT00, FFTW_HC2R, FFTW_MEASURE)
        ! Plans for zonal flow components cos(ly).
        call sfftw_plan_r2r_1d(plan_grid_to_spectral_zonal_1d, Ny, dummy_1d, dummy_1d, FFTW_REDFT00, FFTW_MEASURE)
        call sfftw_plan_r2r_1d(plan_spectral_to_grid_zonal_1d, Ny, dummy_1d, dummy_1d, FFTW_REDFT00, FFTW_MEASURE)

        deallocate(dummy)
        deallocate(dummy_1d)
    end subroutine setup_fftw_plans

end module Fftw3HelpersModule&lt;/LI-CODE&gt;&lt;P&gt;It was&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;module Fftw3HelpersModule
    use, intrinsic :: iso_c_binding
    implicit none

    include 'fftw3.f03' 

    ! FFTW plan handles for different transforms
    type(c_ptr) :: plan_spectral_to_grid_sin, plan_grid_to_spectral_sin
    type(c_ptr) :: plan_spectral_to_grid_cos, plan_grid_to_spectral_cos
    type(c_ptr) :: plan_spectral_to_grid_zonal_1d, plan_grid_to_spectral_zonal_1d

    contains

    subroutine setup_fftw_plans(Nx, Ny)
        use, intrinsic :: iso_c_binding
        implicit none

        include 'fftw3.f03'        

        integer(c_int), intent(in) :: Nx, Ny
        real(C_FLOAT), allocatable :: dummy(:, :)
        real(C_FLOAT), allocatable :: dummy_1d(:)

        ! Cleanup existing plans
        if (c_associated(plan_spectral_to_grid_sin)) call fftw_destroy_plan(plan_spectral_to_grid_sin)
        if (c_associated(plan_grid_to_spectral_sin)) call fftw_destroy_plan(plan_grid_to_spectral_sin)
        if (c_associated(plan_spectral_to_grid_cos)) call fftw_destroy_plan(plan_spectral_to_grid_cos)
        if (c_associated(plan_grid_to_spectral_cos)) call fftw_destroy_plan(plan_grid_to_spectral_cos)
        if (c_associated(plan_spectral_to_grid_zonal_1d)) call fftw_destroy_plan(plan_spectral_to_grid_zonal_1d)
        if (c_associated(plan_grid_to_spectral_zonal_1d)) call fftw_destroy_plan(plan_grid_to_spectral_zonal_1d)

        allocate(dummy(Ny, Nx))
        allocate(dummy_1d(Ny))

        ! Plans for sin(kx)sin(ly) and cos(kx)sin(ly) components
        plan_grid_to_spectral_sin = fftwf_plan_r2r_2d(Ny, Nx, dummy, dummy, FFTW_RODFT00, FFTW_R2HC, FFTW_MEASURE)
        plan_spectral_to_grid_sin = fftwf_plan_r2r_2d(Ny, Nx, dummy, dummy, FFTW_RODFT00, FFTW_HC2R, FFTW_MEASURE)
        ! Plans for sin(kx)cos(ly) and cos(kx)cos(ly) components
        plan_grid_to_spectral_cos = fftwf_plan_r2r_2d(Ny, Nx, dummy, dummy, FFTW_REDFT00, FFTW_R2HC, FFTW_MEASURE)
        plan_spectral_to_grid_cos = fftwf_plan_r2r_2d(Ny, Nx, dummy, dummy, FFTW_REDFT00, FFTW_HC2R, FFTW_MEASURE)
        ! Plans for zonal flow components cos(ly).
        plan_grid_to_spectral_zonal_1d = fftwf_plan_r2r_1d(Ny, dummy_1d, dummy_1d, FFTW_REDFT00, FFTW_MEASURE)
        plan_spectral_to_grid_zonal_1d = fftwf_plan_r2r_1d(Ny, dummy_1d, dummy_1d, FFTW_REDFT00, FFTW_MEASURE)

        deallocate(dummy)
        deallocate(dummy_1d)
    end subroutine setup_fftw_plans

end module Fftw3HelpersModule&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;I am assuming the changes I made to follow the examples are correct.&lt;/P&gt;</description>
      <pubDate>Tue, 16 Sep 2025 22:33:08 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Can-t-find-the-examples-dftf-directory-in-my-MKL-install/m-p/1717300#M37337</guid>
      <dc:creator>brianreinhold</dc:creator>
      <dc:date>2025-09-16T22:33:08Z</dc:date>
    </item>
  </channel>
</rss>

