Community
cancel
Showing results for 
Search instead for 
Did you mean: 
fam__fen
Beginner
231 Views

Why I could not use the mkl-fftw3 in abaqus subroutine

I use abaqus2019 with vs2017 and ivf2019, I could easily compile and link my codes with mkl-fftw3 in vs IDE, where I just choose to modify 'Use Intel Math Kernel Library' as '/Qmkl:sequential'.

But when I wanted to call fortran subroutine which used mkl-fftw3 in abaqus, it did not work well, although I have modified the file 'C:\Program Files\Dassault Systemes\SimulationServices\V6R2019x\win_b64\SMA\site\win86_64.env' as below

compile_fortran=['ifort','/Qmkl:sequential',

I have also tested other libraries like degsv in mkl, they both worked well when calling them in abaqus.

Below error informations are showed in log file

error LNK2019: unresolved external symbol DFFTW_PLAN_DFT_1D referenced in function MAIN__

error LNK2019: unresolved external symbol DFFTW_EXECUTE referenced in function MAIN__

error LNK2019: unresolved external symbol DFFTW_DESTROY_PLAN referenced in function MAIN__

 

0 Kudos
4 Replies
Gennady_F_Intel
Moderator
231 Views

Actually that's strange as all of these FFTW3 interfaces are integrated into Intel MKL. They are defined in mkl_intel_ilp64.lib, mkl_intel_ilp64_dll.lib mkl_intel_lp64.lib, mkl_intel_lp64_dll.lib and mkl_rt.lib of  Intel® 64 architecture. 

You may try to manually link with MKL by following the MKL Linker Adviser tips.

fam__fen
Beginner
231 Views

I tried to include codes below, it did not show compile and link error anymore, but the results were all zeros.

!dec$objcomment lib:'mkl_intel_ilp64.lib'
!dec$objcomment lib:'mkl_sequential.lib'
!dec$objcomment lib:'mkl_core.lib'
!dec$objcomment lib:'mkl_intel_ilp64_dll.lib'
!dec$objcomment lib:'mkl_intel_lp64_dll.lib'
!dec$objcomment lib:'mkl_intel_lp64.lib'
!dec$objcomment lib:'mkl_rt.lib'
  program main
  implicit none  
  double complex t_in(5,5), t_out(5,5)
  integer*8 plan
  integer i 

  t_in = dcmplx(reshape([1:25],[5,5]))

  call dfftw_plan_dft_2d(plan,5,5,t_in,t_out,FFTW_FORWARD,FFTW_E
 1  STIMATE)
  call dfftw_execute_dft(plan, t_in, t_out)
  call dfftw_destroy_plan(plan)
  PRINT*,t_in
  PRINT*,t_out
  END

Could you help me why it should be like that?

 (1.00000000000000,0.000000000000000E+000)
 (2.00000000000000,0.000000000000000E+000)
 (3.00000000000000,0.000000000000000E+000)
 (4.00000000000000,0.000000000000000E+000)
 (5.00000000000000,0.000000000000000E+000)
 (6.00000000000000,0.000000000000000E+000)
 (7.00000000000000,0.000000000000000E+000)
 (8.00000000000000,0.000000000000000E+000)
 (9.00000000000000,0.000000000000000E+000)
 (10.0000000000000,0.000000000000000E+000)
 (11.0000000000000,0.000000000000000E+000)
 (12.0000000000000,0.000000000000000E+000)
 (13.0000000000000,0.000000000000000E+000)
 (14.0000000000000,0.000000000000000E+000)
 (15.0000000000000,0.000000000000000E+000)
 (16.0000000000000,0.000000000000000E+000)
 (17.0000000000000,0.000000000000000E+000)
 (18.0000000000000,0.000000000000000E+000)
 (19.0000000000000,0.000000000000000E+000)
 (20.0000000000000,0.000000000000000E+000)
 (21.0000000000000,0.000000000000000E+000)
 (22.0000000000000,0.000000000000000E+000)
 (23.0000000000000,0.000000000000000E+000)
 (24.0000000000000,0.000000000000000E+000)
 (25.0000000000000,0.000000000000000E+000)
 (0.000000000000000E+000,0.000000000000000E+000)
 (0.000000000000000E+000,0.000000000000000E+000)
 (0.000000000000000E+000,0.000000000000000E+000)
 (0.000000000000000E+000,0.000000000000000E+000)
 (0.000000000000000E+000,0.000000000000000E+000)
 (0.000000000000000E+000,0.000000000000000E+000)
 (0.000000000000000E+000,0.000000000000000E+000)
 (0.000000000000000E+000,0.000000000000000E+000)
 (0.000000000000000E+000,0.000000000000000E+000)
 (0.000000000000000E+000,0.000000000000000E+000)
 (0.000000000000000E+000,0.000000000000000E+000)
 (0.000000000000000E+000,0.000000000000000E+000)
 (0.000000000000000E+000,0.000000000000000E+000)
 (0.000000000000000E+000,0.000000000000000E+000)
 (0.000000000000000E+000,0.000000000000000E+000)
 (0.000000000000000E+000,0.000000000000000E+000)
 (0.000000000000000E+000,0.000000000000000E+000)
 (0.000000000000000E+000,0.000000000000000E+000)
 (0.000000000000000E+000,0.000000000000000E+000)
 (0.000000000000000E+000,0.000000000000000E+000)
 (0.000000000000000E+000,0.000000000000000E+000)
 (0.000000000000000E+000,0.000000000000000E+000)
 (0.000000000000000E+000,0.000000000000000E+000)
 (0.000000000000000E+000,0.000000000000000E+000)
 (0.000000000000000E+000,0.000000000000000E+000)

 

Gennady_F_Intel
Moderator
231 Views

Please check the list of libs that MKL linker adviser suggests.  Compiling ilp64 and lp64 libs are not accepted. You may also check MKL User's guide to see more details and linking examples. 

Shen__Fei
Beginner
231 Views

HI Fam,

 

Have you solved your problem?

Currently I also find s similar problem with using mkl functions (dgetrf and dgetri). After adding '/Qmkl:sequential' in the compile_fortran of the win86_64.env file, it still have two errors (error LNK2019: unresolved external symbol). I used abaqus2019+vs2015+ivf2018.

 

Do you have any idea on my problem? Thanks.

Reply