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

Problem with compiling 64 bit Cluster MKL FFT program

Bogdan_S_
Beginner
210 Views

I've been trying to compile cluster version of MKL FFT (MPI version). I've followed link adviser for 64-bit architecture and used this line:

mpicc -o fftmkl_mpi.out fftmkl_mpi.c -Wl,--start-group  $MKLROOT/lib/mic/libmkl_cdft_core.a $MKLROOT/lib/mic/libmkl_intel_ilp64.a $MKLROOT/lib/mic/libmkl_core.a $MKLROOT/lib/mic/libmkl_intel_thread.a -Wl,--end-group $MKLROOT/lib/mic/libmkl_blacs_intelmpi_ilp64.a -lpthread -lm

Mind you that I'm using regular mpicc wrapper, with previously set OMPI_CC=icc variable in order for wrapper to use icc instead of gcc. However the previous compiling line (suggested by linking adviser) produces lots of (almost identical) errors, one of them being: 

ld: k1om architecture of input file `/home/sataric/intel/composer_xe_2013_sp1.1.106/mkl/lib/mic/libmkl_core.a(_knc_xcsdft2d.o)' is incompatible with i386:x86-64 output

I have sourced 64-bit compiler variables in script via: source ~/intel/composer_xe_2013_sp1.1.106/bin/compilervars.sh intel64, but it seems that there is some 32-64 bit incompatibility in linking stage, and I don't know why?

Thanks in advance for any help :)

 

 

0 Kudos
2 Replies
TimP
Honored Contributor III
210 Views

If you don't care to make your compile options consistent with your choice of MKL library path, you should simply use MKL link options such as -mkl [sequential] (which requires an Intel compiler).

As the message hints, the libraries in /lib/mic/ would be link-compatible only with a build in which mpiicc -mmic is used throughout, and would run only on the MIC KNC coprocessor.

There is no satisfactory support for building with gcc compatible with MIC KNC, in case you are using Intel MPI.  A significant effort in studying methods would be needed for using open source MPI for MIC KNC; even if you explained what you are doing, this might not be an appropriate place to ask.   MKL has support for open source MPI on host but not on MIC.

0 Kudos
Ying_H_Intel
Employee
210 Views

Hi Bogdan,

Right, as you haven't mentioned what MPI and what architecture of your target cluster,  i suppose you are using Intel MPI and Intel Xeon Phi coprocessor (or mic). Thus from MKL link advisor, the compile comand line is  like

 mpiicc  -mmic FFT_example.c -o fft.mic
 -DMKL_ILP64 -openmp -I$(MKLROOT)/include
   -Wl,--start-group  $(MKLROOT)/lib/mic/libmkl_cdft_core.a $(MKLROOT)/lib/mic/libmkl_intel_ilp64.a $(MKLROOT)/lib/mic/libmkl_core.a $(MKLROOT)/lib/mic/libmkl_intel_thread.a -Wl,--end-group $(MKLROOT)/lib/mic/libmkl_blacs_ilp64.a -lpthread -lm

One more thing, as Tim said,  if you are working for Intel Xeon Phi coprocessor (MIC) , then  Intel MPI, Intel Compiler may required because there is no satisfactory support for other MPI and compiler so far.

Best Regards,

Ying

0 Kudos
Reply