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

Using MPI FFTW Wrapper Library problem

I'm currently porting application from GNU FFTW2.0 to Intel MKL FFTW using Wrapper Library under 64-bit Linux.
I've successfully built libfftw2x_cdft_DOUBLE.a and I'm linking my app with that line:

mpicc    main.o  run.o  predict.o begrun.o endrun.o global.o timestep.o  init.o restart.o  io.o accel.o   read_ic.o  ngb.o system.o  allocate.o  density.o gravtree.o hydra.o  driftfac.o domain.o  allvars.o potential.o forcetree.o   peano.o gravtree_forcetest.o pm_periodic.o pm_nonperiodic.o longrange.o   -g    -L/usr/common/pdsoft/lib -lgsl -lgslcblas -lm -Wl,--start-group /usr/local/composerxe/mkl/lib/intel64/libmkl_intel_lp64.a /usr/local/composerxe/mkl/lib/intel64/libmkl_sequential.a /usr/local/composerxe/mkl/lib/intel64/libmkl_core.a /usr/local/composerxe/mkl/lib/intel64/libfftw2x_cdft_DOUBLE.a -Wl,--end-group -lpthread    -o  Gadget2  


And I'm getting the problem of undefined reference in MKL files:

/usr/local/composerxe/mkl/lib/intel64/libfftw2x_cdft_DOUBLE.a(rnd_create_plan.o): In function `rfftw2d_mpi_create_plan':
rnd_create_plan.c:(.text+0xc9): undefined reference to `DftiCreateDescriptorDM'
rnd_create_plan.c:(.text+0x10a): undefined reference to `DftiSetValueDM'
/usr/local/composerxe/mkl/lib/intel64/libfftw2x_cdft_DOUBLE.a(rnd_create_plan.o): In function `rfftw3d_mpi_create_plan':
rnd_create_plan.c:(.text+0x2dc): undefined reference to `DftiCreateDescriptorDM'
rnd_create_plan.c:(.text+0x31d): undefined reference to `DftiSetValueDM'
/usr/local/composerxe/mkl/lib/intel64/libfftw2x_cdft_DOUBLE.a(rnd_create_plan.o): In function `rfftwnd_mpi_create_plan':
rnd_create_plan.c:(.text+0x571): undefined reference to `DftiCreateDescriptorDM'
rnd_create_plan.c:(.text+0x5a7): undefined reference to `DftiCreateDescriptorDM'
rnd_create_plan.c:(.text+0x5f4): undefined reference to `DftiSetValueDM'
/usr/local/composerxe/mkl/lib/intel64/libfftw2x_cdft_DOUBLE.a(rnd_fftw.o): In function `rfftwnd_mpi':
rnd_fftw.c:(.text+0x67): undefined reference to `DftiSetValueDM'
rnd_fftw.c:(.text+0x8b): undefined reference to `DftiSetValueDM'
rnd_fftw.c:(.text+0xe7): undefined reference to `DftiComputeForwardDM'
rnd_fftw.c:(.text+0x10b): undefined reference to `DftiComputeBackwardDM'
rnd_fftw.c:(.text+0x131): undefined reference to `DftiSetValueDM'
rnd_fftw.c:(.text+0x185): undefined reference to `DftiComputeForwardDM'
rnd_fftw.c:(.text+0x1a6): undefined reference to `DftiComputeBackwardDM'
rnd_fftw.c:(.text+0x1cf): undefined reference to `DftiSetValueDM'
/usr/local/composerxe/mkl/lib/intel64/libfftw2x_cdft_DOUBLE.a(rnd_local_sizes.o): In function `rfftwnd_mpi_local_sizes':
rnd_local_sizes.c:(.text+0x39): undefined reference to `DftiGetValueDM'
rnd_local_sizes.c:(.text+0x71): undefined reference to `DftiGetValueDM'
rnd_local_sizes.c:(.text+0xa9): undefined reference to `DftiGetValueDM'
rnd_local_sizes.c:(.text+0xdd): undefined reference to `DftiGetValueDM'
rnd_local_sizes.c:(.text+0x111): undefined reference to `DftiGetValueDM'
/usr/local/composerxe/mkl/lib/intel64/libmkl_intel_lp64.a(_DftiFreeDescriptorDM_lp64.o): In function `DFTIFREEDESCRIPTORDM_':
_DftiFreeDescriptorDM.c:(.text+0x2): undefined reference to `mkl_cdft_DftiFreeDescriptorDM'
/usr/local/composerxe/mkl/lib/intel64/libmkl_intel_lp64.a(_DftiCommitDescriptorDM_lp64.o): In function `DFTICOMMITDESCRIPTORDM_':
_DftiCommitDescriptorDM.c:(.text+0x2): undefined reference to `mkl_cdft_DftiCommitDescriptorDM'
collect2: ld returned 1 exit status
make: *** [Gadget2] Error 1


What am I doing wrong?
0 Kudos
1 Reply
Highlighted
Moderator
74 Views

undefined reference to `DftiCreateDescriptorDM'....
This is the Cluster FFT function, therefore you have to add CFFT libs like
-Wl,--start-group ....... libmkl_cdft_core.a ...libmkl_blacs_lp64.a -Wl,--end-group 
see the Linker Adviser for the details.

0 Kudos