[fortran]PROGRAM ft ! Fortran example. ! 2D complex to complex, and real to conjugate-even USE MKL_DFTI INCLUDE ! .. Implicit None Statement .. IMPLICIT NONE Complex :: X_2D(32,100) Real :: Y_2D(34, 102) Complex :: X(3200) Real :: Y(3468) Equivalence (X_2D, X) Equivalence (Y_2D, Y) type(DFTI_DESCRIPTOR), POINTER :: My_Desc1_Handle, My_Desc2_Handle Integer :: Status, L(2) !...put input data into X_2D(j,k), Y_2D(j,k), 1<=j=32,1<=k<=100 ! Reading in data OPEN(unit=12,file="X.dat",form='binary',status="old") READ(unit=12) X CLOSE(unit=12) OPEN(unit=13,file="Y.dat",form='binary',status="old") READ(unit=13) Y CLOSE(unit=13) !...set L(1) = 32, L(2) = 100 L(1) = 32 L(2) = 100 !...the transform is a 32-by-100 ! Perform a complex to complex transform Status = DftiCreateDescriptor( My_Desc1_Handle, DFTI_SINGLE,& DFTI_COMPLEX, 2, L) Status = DftiCommitDescriptor( My_Desc1_Handle) Status = DftiComputeForward( My_Desc1_Handle, X) Status = DftiFreeDescriptor(My_Desc1_Handle) ! result is given by X_2D(j,k), 1<=j<=32, 1<=k<=100 OPEN(unit=1, file="Xft.dat",status="replace",form='binary') WRITE(unit=1) X_2D CLOSE(unit=1) ! Perform a real to complex conjugate-even transform Status = DftiCreateDescriptor( My_Desc2_Handle, DFTI_SINGLE,& DFTI_REAL, 2, L) Status = DftiCommitDescriptor( My_Desc2_Handle) Status = DftiComputeForward( My_Desc2_Handle, Y) Status = DftiFreeDescriptor(My_Desc2_Handle) ! result is given by the complex value z(j,k) 1<=j<=32; 1<=k<=100 ! and is stored in CCS format OPEN(unit=2, file="Yft.dat",status="replace",form='binary') WRITE(unit=2) Y_2D CLOSE(unit=2) DEALLOCATE(X_2D,Y_2D) END PROGRAM ft [/fortran]
Hi
I hope to get help on my (lage time-lag) follow up question below.
I upgraded to composer_xe_2013.5.192 and tried to repeat the steps in comment #4 from mecej4.
When I run the command
ifort -I$MKLINCLUDE -c mkl_dfti.f90
I get the following output which mentions undefined references
$ ifort -I$MKLINCLUDE -c mkl_dfti.f90
/opt/intel/composer_xe_2013.5.192/compiler/lib/intel64/for_main.o: In function `main':
/export/users/nbtester/efi2linux_nightly/branch-13_0gt/20130608_000000/libdev/frtl/src/libfor/for_main.c:(.text+0x38): undefined reference to `MAIN__'
When I subsequently try to compile my code I get the following:
I would appreciate if anyone can advise me as to what the problem is and what I should do to fix it?
Thanks, John
$ ifort CGoct3D.f90 -L$MKLPATH -I$MKLINCLUDE -lmkl_solver_lp64_sequential -Wl,--start-group -lmkl_intel_lp64 -lmkl_sequential -lmkl_core -Wl,--end-group -lpthread -fast
ipo: warning #11021: unresolved mkl_dft_commit_node_d_c2c_md_omp
Referenced in libmkl_core.a(_avx2_dfti_create_dcmd.o)
Referenced in libmkl_core.a(_avx_dfti_create_dcmd.o).....
and more that I had to cut because the spam filter of the web site would not accept it.
For more complete information about compiler optimizations, see our Optimization Notice.