Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
7234 Discussions

Error: cannot find -lmkl_p4 ..... please help...........

debraj_de1
Beginner
668 Views
Hi,

We were compiling a program with MKL.

The error shown is:
[ded@wci32-oib mm-app-0.0.2]$ make
cc -I/home/ded/intel/mkl/9.1.023/include -I/home/ded/mvapich-0.9.9/mvapich-0.9.9/include -L/home/ded/intel/mkl/9.1.023/lib/32 -lmkl_p4 -lvml -lguide -lpthread -lm
mm.c -o mm
/usr/bin/ld: skipping incompatible /home/ded/intel/mkl/9.1.023/lib/32/libmkl_p4.so when searching for -lmkl_p4
/usr/bin/ld: cannot find -lmkl_p4
collect2: ld returned 1 exit status
make: *** [mm] Error 1
[ded@wci32-oib mm-app-0.0.2]$
------------------------------------------------
The Makefile is as follows:

CC = /home/ded/mvapich-0.9.9/mvapich-0.9.9/bin/mpicc
MPI_INCLUDE = /home/ded/mvapich-0.9.9/mvapich-0.9.9/include
#MKL_DIR = /usr/local/mkl-7.0.17/mkl70
#MKL_DIR = /usr/local/mkl/mkl721
MKL_DIR = /home/ded/intel/mkl/9.1.023
MKL_PATH = $(MKL_DIR)/lib/32
MKL_INCLUDE = $(MKL_DIR)/include

all: mm

mm: mm.c
cc -I$(MKL_INCLUDE) -I$(MPI_INCLUDE) -L$(MKL_PATH) -lmkl_p4 -lguide -lpthread -lm
mm.c -o mm

clean:
rm -f mm
-------------------------------------------------------


0 Kudos
1 Reply
TimP
Honored Contributor III
668 Views
It looks as if your mpicc may be a 64-bit compiler, so you would have to switch to the corresponding library in the em64t section of your MKL library installation.
If your only reason for linking in Intel OpenMP support is on account of MKL, and you don't intend to ask for threading in MKL, the mkl serial library may be preferable.
0 Kudos
Reply