Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.

DFTICommitDescriptor Acces Violation

callf
Beginner
503 Views

Hi !

I am trying to use the Math Kernel Library to develop a Fourier analysis from a bigger program but I need to do it as a .DLL file. The problem is that I have been facing problem when I change the vector length to from 128 to the next power of 2, or 256, or higher. It happens everytime when the DFTICommitDescriptor is called. The message is:

"Unhandled exception at 0x00000000 in Console1.exe: 0xC0000005: Access violation." 

This problem doesn't show when the input size vector is smaller and when my functions are called together with my MAIN.f90 as an auxiliary functions as .f90 files.

Here is the following implemented FFT code for the .DLL :

!include 'mkl_dfti.f90'

module AnaVib_FFT_module

implicit none
contains

subroutine AnaVib_FFT(x,y,dim)

use MKL_DFTI
USE MKL95_PRECISION, ONLY: WP =>SP

integer, intent(in) :: dim
complex, dimension(dim), intent(in) :: x
complex, dimension(dim), intent(inout) :: y
complex(8), dimension(dim) :: y_aux

type(DFTI_DESCRIPTOR), POINTER :: My_Desc_Handle

Integer :: Status
Status = -1

y_aux = DBLE(x)

Status = DftiCreateDescriptor(My_Desc_Handle, DFTI_DOUBLE, DFTI_COMPLEX,1,dim)
Status = DftiCommitDescriptor(My_Desc_Handle)Status = DftiComputeForward(My_Desc_Handle, y_aux)

y = y_aux

Status = DftiFreeDescriptor(My_Desc_Handle)

end subroutine AnaVib_FFT

end module AnaVib_FFT_module

Thanks in advance.

0 Kudos
8 Replies
Chao_Y_Intel
Moderator
503 Views
Hello, which version of Intel MKL are you using now? If you can attached the MAIN.f90 file, and project files, that will be helpful to reproduce this problem. Thanks, Chao
0 Kudos
callf
Beginner
503 Views
Hi! We're using the 10.2 version of the MKL on an VS 2010. I could upload a .zip file of the project I use. I have left some comments inside the codelines detailing a little bit more. But mainly, the error happens just by changing the variable DIM to 256 in the Console1.f90 program. Thanks for the assistance
0 Kudos
Chao_Y_Intel
Moderator
503 Views
The project needs a 'Source1.f90' file. Is that missed in the attachment. Thanks, Chao
0 Kudos
callf
Beginner
503 Views
Sorry, Chao. I've fixed that!
0 Kudos
Chao_Y_Intel
Moderator
503 Views
Hi, Thanks for the code. I can reproduce the problem here. I am checking it for further information. Chao
0 Kudos
Chao_Y_Intel
Moderator
503 Views
Hello, In the project file, there is a conflict setting: In Property>>Fortran>>Libraries>>Use MKL Kernel Library: it set as Qmkl:sequential flag, which will use sequential MKL library. But in the Property>>Linker>>Input>>Additional Dependencies, it also added threaded MKL libraries. I remove one of them, and the error did not happen. Thanks, Chao
0 Kudos
callf
Beginner
503 Views
I tried your recommendation, but it didn't work either. We will convert your methods to C++. thanks for help Chao!
0 Kudos
Chao_Y_Intel
Moderator
503 Views
Hello, I attached the fixed project file here. I could not reproduce the error after using the correct project settings. thanks, chao
0 Kudos
Reply