Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Zlamal__Jakub
New Contributor III
68 Views

FORTRAN interface

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.

Jakub

0 Kudos
6 Replies
Gennady_F_Intel
Moderator
68 Views

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

--Gennady

Zlamal__Jakub
New Contributor III
68 Views

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.

Jakub

Gennady_F_Intel
Moderator
68 Views

Jakub,

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 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.

--Gennady

Zlamal__Jakub
New Contributor III
68 Views

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).

Jakub

Steven_L_Intel1
Employee
68 Views

Jakub,

Can you attach a test program I can use to see the problem? It should be possible to make this work.

Zlamal__Jakub
New Contributor III
68 Views

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.

Jakub

Reply