Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
Welcome to the Intel Community. If you get an answer you like, please mark it as an Accepted Solution to help others. Thank you!
26747 Discussions

Undefined reference to fftw3 functions

Navdeep_Rana
Beginner
353 Views

I installed mkl wrappers for fftw i.e. fftw3xc, fftw3xf, fftw3x_cdft with
 

make libintel64 INSTALL_DIR=$MKLROOT/lib/intel64

and I am sourcing

$MKLROOT/bin/mklvars.sh intel64
$INTELPATH/compilervars.sh intel64

but I end up getting the following undefined error. Can anyone help?

obj/fftw3_mpi.o: In function `fftw3_mpi_mp_create_fftw3_plans_':
fftw3_mpi.f90:(.text+0x9ce): undefined reference to `fftw_mpi_plan_dft_r2c_2d_f03'
fftw3_mpi.f90:(.text+0x13fb): undefined reference to `fftw_mpi_plan_dft_c2r_2d_f03'
obj/fftw3_mpi.o: In function `fftw3_mpi_mp_fft_':
fftw3_mpi.f90:(.text+0x20df): undefined reference to `fftw_mpi_execute_dft_c2r'
fftw3_mpi.f90:(.text+0x2eb4): undefined reference to `fftw_mpi_execute_dft_r2c'
obj/fftw3_mpi.o: In function `fftw3_mpi_mp_init_fftw3_':
fftw3_mpi.f90:(.text+0x3578): undefined reference to `fftw_mpi_init'
fftw3_mpi.f90:(.text+0x359b): undefined reference to `fftw_mpi_local_size_2d_f03'

 

0 Kudos
4 Replies
Juergen_R_R
Valued Contributor I
353 Views

This is a linking error. Can you post the link command?

Navdeep_Rana
Beginner
353 Views

Juergen R. wrote:

This is a linking error. Can you post the link command?

Yes I figured that out. Had to link using -lfftw3x_cdft_lp64 -lfftw3xf_intel -mkl instead of -mkl.

It now compiles but on runline runtime shows the following error.

Intel MKL FATAL ERROR: Cannot load symbol MKLMPI_Get_wrappers
Juergen_R_R
Valued Contributor I
353 Views

Are you sure that the directory where your linked libraries are located, is in the DYLD_LIBRARY_PATH?

Navdeep_Rana
Beginner
353 Views

Juergen R. wrote:

Are you sure that the directory where your linked libraries are located, is in the DYLD_LIBRARY_PATH?


Okay this is new. I never knew of any such variable, but I did set it up and I get the same error.

Reply