Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Savvas_Z_
Beginner
89 Views

Trouble linking

Hello,

I have installed MKL and I am having trouble linking with the mkl libraries. The Makefile for my compilation looks like the following:

#Makefile for 2D strong coupling project

CC =mpicc
OPT =
HEADERS =includes.h params.h
MKLPATH =/opt/intel/mkl/lib/mic
MKLINCLUDE =/opt/intel/composer_xe_2011_sp1.10.319/mkl/include
LIBS = -lgsl -lgslcblas -lm -lmkl_scalapack_lp64 -lmkl_intel_lp64 -lmkl_blacs_openmpi_lp64 -lmkl_intel_thread -lmkl_core -liomp5 -lpthread
LDFLAGS = -L${MKLPATH} ${LIBS}
CFLAGS = -I/usr/local/include/ -I${MKLINCLUDE}

2D_QSC: 2D_QSC.c pblas2D.c ${HEADERS} Makefile
    ${CC} ${OPT} -o 2D_QSC pblas2D.c 2D_QSC.c ${LDFLAGS}

clean:
      \rm *.o

the error i receive when i run make 2D_QSC is:

/usr/bin/ld: skipping incompatible /opt/intel/mkl/lib/mic/libmkl_scalapack_lp64.so when searching for -lmkl_scalapack_lp64

/usr/bin/ld: skipping incompatible /opt/intel/mkl/lib/mic/libmkl_scalapack_lp64.a when searching for -lmkl_scalapack_lp64

/usr/bin/ld: cannot find -lmkl_scalapack_lp64

and so on for each mkl library that I have referenced in Makefile. Any help would be greatly appreciated as this error is puzzling and have neither seen it before nor can find much info about it just by googling. Thank you.

Best,

Savvas

0 Kudos
6 Replies
Ying_H_Intel
Employee
89 Views

Hi Sawas,

I saw you are using the library for mic. (xeon(R)  phi coprocessor).   /opt/intel/mkl/lib/mic, so doe it mean you are building application for mic?  On the other hand, you haven't the compiler opiton -mmic.  Here is MKL user guide. for your reference.

http://software.intel.com/sites/products/documentation/doclib/mkl_sa/11/mkl_userguide_lnx/GUID-D0627...

Best Regards,

Ying

TimP
Black Belt
89 Views

Which compiler is mpicc using?  Intel doesn't offer an mpicc for MIC.  The most likely way to use MIC under mpicc would be as an open source MPI built with icc to take advantage of MIC offload features.  In that case, the normal default MKL linking (e.g. -mkl) would take care of it, provided that you used latest 13.1 or a 14.0 compiler.  With Intel MPI, mpiicc would be the wrapper to use for that purpose.

As Ying said, you would be able to use your MKLPATH only when building with icc -mmic cross-compiler for execution on the MIC by itself.  If using Intel MPI, again, you would need mpiicc.

Savvas_Z_
Beginner
89 Views

Hello,
thanks for your answers. Just to avoid any confusion. My architecture is i5 and not Xeon. Thus, I should NOT be using the library from mic.
The reason I did so was because this is the only directory in my computer that contains scalapack and blacs that my code is utilizing.
I think that the MKLPATH should be /opt/intel/composer_xe_2013_sp1/mkl/lib/intel64 BUT that directory has neither Scalapack nor Blacs.
The question is where should these libraries (scalapack and blacs) be for intel64 (i5) architecture? And if they are not in their normal spot why is this the case since I performed a default installation?
                                                                    Best, Savvas

Ying_H_Intel
Employee
89 Views

Hello Sawas,

Thanks for clarify. The cluster library ( scalapack and blacs) are optional install components. So you may need rerun the install script and select cluster library.

Best Regards,

Ying

P.S you may have know the link, but attach here for your reference.

MKL link advisor : http://software.intel.com/sites/products/mkl/MKL_Link_Line_Advisor.html

 MKL 11.0 releate notes: http://software.intel.com/en-us/articles/intel-mkl-111-release-notes. and related notice.

Important Notices:

•Intel MKL now provides a choice of components to install. Components necessary for PGI compiler, Compaq Visual Fortran Compiler, SP2DP interface and Cluster support (ScaLAPACK and Cluster DFT) are not installed unless explicitly selected during installation

Gennady_F_Intel
Moderator
89 Views

please look at this KB article to see more details about new install options with the latest 11.1 : http://software.intel.com/en-us/articles/intelr-mkl-new-install-option

Savvas_Z_
Beginner
89 Views

Resolved! Many thanks to all of you. It was just very deceiving that scalapack and blacs were optional for intel64 while they were there for the mic-xeon version...

Reply