I am trying to use IPP routine ippsSVD_64f_D2L_I from IVF.
I created interface
[fortran] interface !ippsSVD_64f_D2L_I(Ipp64f** mSrcDstA, int height, Ipp64f* pDstW,Ipp64f** mDstV, int width, int nIter); integer*4 function ippsSVD_64f_D2L_I(mSrcDstA,height,pDstW,mDstV,width,nIter) !DEC$ IF DEFINED(_X86_) !DEC$ ATTRIBUTES STDCALL, ALIAS : '_ippsSVD_64f_D2L_I@24' :: ippsSVD_64f_D2L_I !DEC$ ELSE !DEC$ ATTRIBUTES STDCALL, ALIAS : 'ippsSVD_64f_D2L_I' :: ippsSVD_64f_D2L_I !DEC$ ENDIF !DEC$ ATTRIBUTES REFERENCE :: mSrcDstA,mDstV,pDstW !DEC$ ATTRIBUTES VALUE :: height,width,nIter use ifwinty use iso_c_binding integer(C_INT) height,width,nIter real(C_DOUBLE) mSrcDstA(width,height) real(C_DOUBLE) mDstV(width,width) real(C_DOUBLE) pDstW(width) end function end interface [/fortran]
and I am able to compile code and run it. But when I try to call ippsSVD_64f_D2L_I routine I get error
Unhandled exception at 0x023cb7ac in Test.exe: 0xC0000005: Access violation reading location 0x00000000.
I did not found any FORTRAN interface example in installation of IPP.
Thanks for advice.
actually, except for a small number of functions from crypto lib, our library is supported with C interfaces only. If you need we can help ypu with this example of this routine (ippsSVD_64f_D2L_I).. let us know if any
I used dumpbin on dll library and it provides ippsSVD_64f_D2L_I@24 routine so I assumed it is STDCALL calling convention. If you can help me to write interface I will be very happy.
I saw your question at mkl forum, so first of all I would recommend you to get the evaluation version of Intel C/C++ compiler and evaluate the performance of ippsSVD implementation. It will the fastest way.
I do not think intel C compiler helps me because in IPP C language examples is not example to how use ippsSVD_64f_D2L_I routine, and any other SVD routines, (so I cannot look at it to translate it to fortran).
I am attaching my testing project. Problem calling ipps routines is in file testspeed.f90 and subroutine testspeedipp(A,B,x,m,n). I tried different types of call (even C standard calling).
May be problem is caused by 2D C arrays, i do not know if it is one memory block or a 1D array of pointers to 1D real array.