Quantcast
Channel: Intel® oneAPI Math Kernel Library & Intel® Math Kernel Library
Viewing all articles
Browse latest Browse all 2652

'mkl_dfti.f90' module error

$
0
0

I am trying to use intel mkl dft routines under windows/visual studio.
Running intel mkl DGEMM routine presents no problem (hence automatic linking via seems to work). My problem is when I include 'mkl_dfti.f90', in order to "use mkl_dfti" . That produces the error:

..\mkl_dfti.f90(27): error #6218: This statement is positioned incorrectly and/or has syntax errors.

and that points to the first line with code in mkl_dfti.f90

MODULE MKL_DFT_TYPE

Here is my full code:

  module mymodule
  use iso_c_binding
  INCLUDE 'mkl_dfti.f90'
  Use MKL_DFTI
  implicit none
  type(DFTI_DESCRIPTOR),POINTER :: My_Desc_Handle

  contains

  subroutine prepareMKLfft(nfft)
  integer(C_INT),intent(in)                 ::  nfft
  integer,parameter                         ::  fftdimension = 1
  Integer                                   :: Status
  Status = DftiCreateDescriptor( My_Desc_Handle, DFTI_DOUBLE, DFTI_COMPLEX, fftdimension, nfft )
  Status = DftiSetValue( My_Desc_Handle, DFTI_PLACEMENT, DFTI_NOT_INPLACE)
  Status = DftiCommitDescriptor( My_Desc_Handle )
  end subroutine prepareMKLfft

  subroutine finishMKLfft()
  Integer                                   :: Status
  Status = DftiFreeDescriptor(My_Desc1_Handle)
  end subroutine finishMKLfft

  subroutine fft(X_in,X_out,nfft)
  ! From: https://software.intel.com/en-us/mkl-developer-reference-fortran-fft-code-examples
  integer(C_INT),intent(in)                 ::  nfft
  complex(C_DOUBLE_COMPLEX),intent(in)      ::  X_in(:)
  complex(C_DOUBLE_COMPLEX),intent(out)     ::  X_out(:)
  Integer                                   :: Status
  Status = DftiComputeForward( My_Desc1_Handle, X_in, X_out )
  end subroutine fft

  subroutine ifft(X_in,X_out,nfft)
  integer(C_INT),intent(in)                 ::  nfft
  complex(C_DOUBLE_COMPLEX),intent(in)      ::  X_in(:)
  complex(C_DOUBLE_COMPLEX),intent(out)     ::  X_out(:)
  Integer                                   :: Status
  Status = DftiComputeBackward( My_Desc1_Handle, X_in, X_out )
  end subroutine fft

  end module mymodule

 

Does anyone know the answer to this? Help is very much appreciated.

(windows 7, visual studio 2013, intel parallel studio xe 2016 cluster edition update 3)


Viewing all articles
Browse latest Browse all 2652

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>