fftw3 function crashes when running intel MKL

fftw3 function crashes when running intel MKL

Hi, I have very annoying problem. I installed  Intel composer 2013 which I run with Ultimate Visual studio 2010. My fortran program uses fftw3 functions , for which Intel Visual Fortran has an appropriate wrapper. To build the application I have done the 2 following steps:

1. Put the path for fftw.h in the project->Properties->Fortran->Additional Include Directories to the location where the Intel composer 2013 is installed.

2. Enabled "UseIntel Math  Kernel Library" by choosing  "Sequential (/Qmkl:sequential)" oprion  in the project->Properties->Fortran->libraries->.

I also increased the allocation of Stack Reserbve Size and Stack Commit Size to fit them to the program requirements.

After all that I have succesfully compiled and built the program

The problem shows up when the program is running, generating the following error when trying to execute  fftw_execute_r2r(forward, in, in) function:

Unhandled exception at 0x00302827 in proba.exe: 0xC0000005: Access violation reading location 0x00000004.

When I run the same program on the Unix system, where  the both program and  fftw libriary were compiled with intel compiler everything is working perfect.

Many thanks for your help, Yuri

 

10 帖子 / 0 全新
最新文章
如需更全面地了解编译器优化,请参阅优化注意事项

Hello Yuri,

I am transferring this issue to the MKL forum. Someone on that forum should help you shortly.

Regards,
Annalee
Intel Developer Support

Dmitry Baksheev (Intel)的头像

Hi Yuri,

Accessing data at address 0x00000004 often aborts an application. Could you try to trace where this access took place? The address it printed may help if you have the application link map.
One of reasons why the incorrect access may happen is missing check for NULL plan returned by fftw_plan_r2r.
Additional information, maybe a piece of code and a build log, could help to identify the reason.
Thanks
Dima

Yuri,
Could you check how the test will work when you link the example from command line?
Is that 32 or 64 bit application?

I tried both 32 and 64 bit application with the same outcome. For 64 bit applicatio the following error is generated:
Unhandled exception at 0x000000013fe228c4 in proba.exe: 0xC0000005: Access violation reading location 0x0000000000000040.
Also the build log file is attached :

Build Log   

 Build started: Project: proba, Configuration: Debug|x64 

Output   

Compiling with Intel(R) Visual Fortran Compiler XE 13.0.0.089 [Intel(R) 64]...
ifort /nologo /debug:full /Od /I&quotC:\Program Files (x86)\Intel\Composer XE 2013\mkl\include\fftw&quot /warn:interfaces /module:&quotx64\Debug\\&quot /object:&quotx64\Debug\\&quot /Fd&quotx64\Debug\vc100.pdb&quot /traceback /check:bounds /check:stack /libs:static /threads /dbglibs /Qmkl:sequential /c /Qvc10 /Qlocation,link,&quotC:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\\bin\amd64&quot &quotD:\PostDoc\AirFoil\Generic\proba\src\parameters.f90&quot
ifort /nologo /debug:full /Od /I&quotC:\Program Files (x86)\Intel\Composer XE 2013\mkl\include\fftw&quot /warn:interfaces /module:&quotx64\Debug\\&quot /object:&quotx64\Debug\\&quot /Fd&quotx64\Debug\vc100.pdb&quot /traceback /check:bounds /check:stack /libs:static /threads /dbglibs /Qmkl:sequential /c /Qvc10 /Qlocation,link,&quotC:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\\bin\amd64&quot &quotD:\PostDoc\AirFoil\Generic\proba\src\grid.f90&quot
ifort /nologo /debug:full /Od /I&quotC:\Program Files (x86)\Intel\Composer XE 2013\mkl\include\fftw&quot /warn:interfaces /module:&quotx64\Debug\\&quot /object:&quotx64\Debug\\&quot /Fd&quotx64\Debug\vc100.pdb&quot /traceback /check:bounds /check:stack /libs:static /threads /dbglibs /Qmkl:sequential /c /Qvc10 /Qlocation,link,&quotC:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\\bin\amd64&quot &quotD:\PostDoc\AirFoil\Generic\proba\src\user.f90&quot
ifort /nologo /debug:full /Od /I&quotC:\Program Files (x86)\Intel\Composer XE 2013\mkl\include\fftw&quot /warn:interfaces /module:&quotx64\Debug\\&quot /object:&quotx64\Debug\\&quot /Fd&quotx64\Debug\vc100.pdb&quot /traceback /check:bounds /check:stack /libs:static /threads /dbglibs /Qmkl:sequential /c /Qvc10 /Qlocation,link,&quotC:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\\bin\amd64&quot &quotD:\PostDoc\AirFoil\Generic\proba\src\myfft.f90&quot
ifort /nologo /debug:full /Od /I&quotC:\Program Files (x86)\Intel\Composer XE 2013\mkl\include\fftw&quot /warn:interfaces /module:&quotx64\Debug\\&quot /object:&quotx64\Debug\\&quot /Fd&quotx64\Debug\vc100.pdb&quot /traceback /check:bounds /check:stack /libs:static /threads /dbglibs /Qmkl:sequential /c /Qvc10 /Qlocation,link,&quotC:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\\bin\amd64&quot &quotD:\PostDoc\AirFoil\Generic\proba\src\variables.f90&quot
ifort /nologo /debug:full /Od /I&quotC:\Program Files (x86)\Intel\Composer XE 2013\mkl\include\fftw&quot /warn:interfaces /module:&quotx64\Debug\\&quot /object:&quotx64\Debug\\&quot /Fd&quotx64\Debug\vc100.pdb&quot /traceback /check:bounds /check:stack /libs:static /threads /dbglibs /Qmkl:sequential /c /Qvc10 /Qlocation,link,&quotC:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\\bin\amd64&quot &quotD:\PostDoc\AirFoil\Generic\proba\src\operators.f90&quot
ifort /nologo /debug:full /Od /I&quotC:\Program Files (x86)\Intel\Composer XE 2013\mkl\include\fftw&quot /warn:interfaces /module:&quotx64\Debug\\&quot /object:&quotx64\Debug\\&quot /Fd&quotx64\Debug\vc100.pdb&quot /traceback /check:bounds /check:stack /libs:static /threads /dbglibs /Qmkl:sequential /c /Qvc10 /Qlocation,link,&quotC:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\\bin\amd64&quot &quotD:\PostDoc\AirFoil\Generic\proba\src\operators_pressure.f90&quot
ifort /nologo /debug:full /Od /I&quotC:\Program Files (x86)\Intel\Composer XE 2013\mkl\include\fftw&quot /warn:interfaces /module:&quotx64\Debug\\&quot /object:&quotx64\Debug\\&quot /Fd&quotx64\Debug\vc100.pdb&quot /traceback /check:bounds /check:stack /libs:static /threads /dbglibs /Qmkl:sequential /c /Qvc10 /Qlocation,link,&quotC:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\\bin\amd64&quot &quotD:\PostDoc\AirFoil\Generic\proba\src\main.f90&quot
Linking...
Link /OUT:&quotx64\Debug\proba.exe&quot /INCREMENTAL:NO /NOLOGO /MANIFEST /MANIFESTFILE:&quotD:\PostDoc\AirFoil\Generic\proba\x64\Debug\proba.exe.intermediate.manifest&quot /MANIFESTUAC:&quotlevel='asInvoker' uiAccess='false'&quot /DEBUG /PDB:&quotD:\PostDoc\AirFoil\Generic\proba\x64\Debug\proba.pdb&quot /SUBSYSTEM:CONSOLE /STACK:99999999,99999999 /IMPLIB:&quotD:\PostDoc\AirFoil\Generic\proba\x64\Debug\proba.lib&quot &quotx64\Debug\parameters.obj&quot &quotx64\Debug\grid.obj&quot &quotx64\Debug\user.obj&quot &quotx64\Debug\myfft.obj&quot &quotx64\Debug\variables.obj&quot &quotx64\Debug\operators.obj&quot &quotx64\Debug\operators_pressure.obj&quot &quotx64\Debug\main.obj&quot
Link: executing 'link'

Embedding manifest...
mt.exe /nologo /outputresource:&quotD:\PostDoc\AirFoil\Generic\proba\x64\Debug\proba.exe;#1&quot /manifest &quotD:\PostDoc\AirFoil\Generic\proba\x64\Debug\proba.exe.intermediate.manifest&quot

proba - 0 error(s), 0 warning(s)

Can I upload the whole project, so you could exam it on your mashine?
Many thanks, Yuri

yes, you can, but it would be much better if you prepare the smallest test case as you can for reproducing the problem on our side.

Ok, attached is a very simple project which is supposed to perform fft transform
Note that in order to run it on your machine you will need to change the include path for fftw.
The program crashes when dfftw_execute_r2r routine is called
Thank you for your help, Yuri

附件: 

附件尺寸
下载 fftw-check.zip13.67 MB

Ok, attached is a very simple project which is supposed to perform fft transform
Note that in order to run it on your machine you will need to change the include path for fftw.
The program crashes when dfftw_execute_r2r routine is called
Thank you for your help, Yuri

附件: 

附件尺寸
下载 fftw-check.zip13.67 MB
Dmitry Baksheev (Intel)的头像

Yuri,

Thank you for posting the example. MKL FFTW wrappers do not support 2D r2r.
MKL conveys this information by returning null fftw plan.

Thanks
Dima

登陆并发表评论。