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
-------------------------------------------------------
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
-------------------------------------------------------
連結已複製
1 回應
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.
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.