Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
117 Views

Undefined reference to fftw3 functions

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
Highlighted
Valued Contributor I
117 Views

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

0 Kudos
Highlighted
Beginner
117 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
0 Kudos
Highlighted
Valued Contributor I
117 Views

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

0 Kudos
Highlighted
Beginner
117 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.

0 Kudos