0

I am trying to use the dft examples provided with MKL. I am trying to compile the program basic_dp_complex_dft_1d.f90, which uses MKL_DFTI module. Since Intel doesn't provide with pre-compiled modules, I'm trying tom compile the mkl_dfti.f90 in the /oneapi/mkl/@latest/includes. But I am unable to compile this file and generate a mod file. I keep getting too man errors which look like this:

...
mkl_dfti.f90(359): error #6457: This derived type name has not been declared.   [DFTI_DESCRIPTOR]
       TYPE(DFTI_DESCRIPTOR), POINTER :: desc
------------^
mkl_dfti.f90(364): error #7002: Error in opening the compiled module file.  Check INCLUDE paths.   [MKL_DFT_TYPE]
       USE MKL_DFT_TYPE
-----------^
mkl_dfti.f90(369): error #6683: A kind type parameter must be a compile-time constant.   [DFTI_DPKP]
       REAL(DFTI_DPKP), INTENT(IN) :: DblVal
------------^
mkl_dfti.f90(771): catastrophic error: Too many errors, exiting
compilation aborted for mkl_dfti.f90 (code 1)

This is probably a very basic question. Please help

I tried using ifx -mkl mkl_dfti.f90, but it didn't work. I don't know what else to do.

  • Welcome, I suggest reading [ask]. Please do not show "errors which look like", but show the exact error output from the start. The first error is most important and sometimes the only relevant one. Use MKL Link Line Advisor https://www.intel.com/content/www/us/en/developer/tools/oneapi/onemkl-link-line-advisor.html and show us the exact command according to the advisor that you tried and the complete error output you received. – Vladimir F Героям слава Jun 11 '23 at 06:51
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Jun 12 '23 at 12:24

1 Answers1

0

In order access and to use module MKL_DFTI, we need to get the module in the folder you are compiling and running. As the program says to "USE MKL_DFTI" we need to provide the MKL_DFTI module so that the compiler can use all the variables, data types, and procedures, etc.

Please find the below commands for modules generation,compiling and running the code:

ifx -c /opt/intel/oneapi/mkl/latest/include/mkl_dfti.f90

ifx -qmkl basic_dp_complex_dft_1d.f90

./a.out

Also, you can use the Intel Link Line Advisor https://www.intel.com/content/www/us/en/developer/tools/oneapi/onemkl-link-line-advisor.html for compiling the code using different compiler and linker options.

Please try these commands and let us know if you are facing any issues.