Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.

hpcc + mkl/fftw linking error

sonicato
Beginner
1,221 Views

Hello,

I get two undefined reference while linking the hpcc benchmark with the mkl 10.0.5 and the new beta release, which was delivered with 11.0.044 Compiler Suite:

/opt/intel/Compiler/11.0/044/mkl/lib/em64t/libmkl_intel_lp64.a(_DftiFreeDescriptorDM_lp64.o): In function `dftifreedescriptordm_':
_DftiFreeDescriptorDM_iface.c:(.text+0x2): undefined reference to `mkl_cdft_DftiFreeDescriptorDM'
/opt/intel/Compiler/11.0/044/mkl/lib/em64t/libmkl_intel_lp64.a(_DftiCommitDescriptorDM_lp64.o): In function `dfticommitdescriptordm_':
_DftiCommitDescriptorDM_iface.c:(.text+0x2): undefined reference to `mkl_cdft_DftiCommitDescriptorDM'

My linker flags:

-L/opt/intel/Compiler/11.0/044/mkl/lib/em64t /opt/intel/Compiler/11.0/044/mkl/lib/em64t/libfftw2xc_intel.a /opt/intel/Compiler/11.0/044/mkl/lib/em64t/libfftw2xf_intel.a /opt/intel/Compiler/11.0/044/mkl/lib/em64t/libfftw2x_cdft_DOUBLE.a -lmkl_cdft_core -lmkl_blacs_openmpi_lp64 -lmkl_em64t -lguide -lmpi -lm

I compiled the hpcc with the -DUSING_FFTW, also complied the fftw2c wrapper and mpi mkl fftw library.

Any help would be appreciated.
Thanks in advance,
Jens

0 Kudos
3 Replies
Andrey_G_Intel2
Employee
1,221 Views
Quoting - sonicato

Hello,

I get two undefined reference while linking the hpcc benchmark with the mkl 10.0.5 and the new beta release, which was delivered with 11.0.044 Compiler Suite:

/opt/intel/Compiler/11.0/044/mkl/lib/em64t/libmkl_intel_lp64.a(_DftiFreeDescriptorDM_lp64.o): In function `dftifreedescriptordm_':
_DftiFreeDescriptorDM_iface.c:(.text+0x2): undefined reference to `mkl_cdft_DftiFreeDescriptorDM'
/opt/intel/Compiler/11.0/044/mkl/lib/em64t/libmkl_intel_lp64.a(_DftiCommitDescriptorDM_lp64.o): In function `dfticommitdescriptordm_':
_DftiCommitDescriptorDM_iface.c:(.text+0x2): undefined reference to `mkl_cdft_DftiCommitDescriptorDM'

My linker flags:

-L/opt/intel/Compiler/11.0/044/mkl/lib/em64t /opt/intel/Compiler/11.0/044/mkl/lib/em64t/libfftw2xc_intel.a /opt/intel/Compiler/11.0/044/mkl/lib/em64t/libfftw2xf_intel.a /opt/intel/Compiler/11.0/044/mkl/lib/em64t/libfftw2x_cdft_DOUBLE.a -lmkl_cdft_core -lmkl_blacs_openmpi_lp64 -lmkl_em64t -lguide -lmpi -lm

I compiled the hpcc with the -DUSING_FFTW, also complied the fftw2c wrapper and mpi mkl fftw library.

Any help would be appreciated.
Thanks in advance,
Jens

sonicato,

the linker in Linux-like OSes is sequential dependent. Try to change your link line to "L/opt/intel/Compiler/11.0/044/mkl/lib/em64t /opt/intel/Compiler/11.0/044/mkl/lib/em64t/libfftw2xc_intel.a /opt/intel/Compiler/11.0/044/mkl/lib/em64t/libfftw2xf_intel.a /opt/intel/Compiler/11.0/044/mkl/lib/em64t/libfftw2x_cdft_DOUBLE.a -Wl,--start-group -lmkl_blacs_openmpi_lp64 -lmkl_em64t -lmkl_cdft_core -Wl,--end-group -lguide -lmpi -lm"

Andrey

0 Kudos
Vladimir_Petrov__Int
New Contributor III
1,221 Views
Quoting - sonicato

Hello,

I get two undefined reference while linking the hpcc benchmark with the mkl 10.0.5 and the new beta release, which was delivered with 11.0.044 Compiler Suite:

/opt/intel/Compiler/11.0/044/mkl/lib/em64t/libmkl_intel_lp64.a(_DftiFreeDescriptorDM_lp64.o): In function `dftifreedescriptordm_':
_DftiFreeDescriptorDM_iface.c:(.text+0x2): undefined reference to `mkl_cdft_DftiFreeDescriptorDM'
/opt/intel/Compiler/11.0/044/mkl/lib/em64t/libmkl_intel_lp64.a(_DftiCommitDescriptorDM_lp64.o): In function `dfticommitdescriptordm_':
_DftiCommitDescriptorDM_iface.c:(.text+0x2): undefined reference to `mkl_cdft_DftiCommitDescriptorDM'

My linker flags:

-L/opt/intel/Compiler/11.0/044/mkl/lib/em64t /opt/intel/Compiler/11.0/044/mkl/lib/em64t/libfftw2xc_intel.a /opt/intel/Compiler/11.0/044/mkl/lib/em64t/libfftw2xf_intel.a /opt/intel/Compiler/11.0/044/mkl/lib/em64t/libfftw2x_cdft_DOUBLE.a -lmkl_cdft_core -lmkl_blacs_openmpi_lp64 -lmkl_em64t -lguide -lmpi -lm

I compiled the hpcc with the -DUSING_FFTW, also complied the fftw2c wrapper and mpi mkl fftw library.

Any help would be appreciated.
Thanks in advance,
Jens

Hello Jens,

What you need to do is to change the linker flags as follows:

-L/opt/intel/Compiler/11.0/044/mkl/lib/em64t /opt/intel/Compiler/11.0/044/mkl/lib/em64t/libfftw2xc_intel.a /opt/intel/Compiler/11.0/044/mkl/lib/em64t/libfftw2xf_intel.a /opt/intel/Compiler/11.0/044/mkl/lib/em64t/libfftw2x_cdft_DOUBLE.a -Wl,--start-group /opt/intel/Compiler/11.0/044/mkl/lib/em64t/libmkl_cdft_core.a /opt/intel/Compiler/11.0/044/mkl/lib/em64t/libmkl_intel_lp64.a /opt/intel/Compiler/11.0/044/mkl/lib/em64t/libmkl_intel_thread.a /opt/intel/Compiler/11.0/044/mkl/lib/em64t/libmkl_core.a /opt/intel/Compiler/11.0/044/mkl/lib/em64t/libmkl_blacs_openmpi_lp64.a -Wl,--end-group -lguide -lmpi -lm

This should resolve the dependency.

By the way, keep in mind that HPCC uses MPI FFTW interface in a modified manner. Namely the following functions must be altered to work with 64-bit integers (e.g. size_t instead of int's): fftw_mpi_create_plan and fftw_mpi_local_sizes.

Best regards,

-Vladimir

0 Kudos
sonicato
Beginner
1,221 Views

Thx for the fast answers!

These two replies solved my problem.

Regards,

Jens

0 Kudos
Reply