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

Cannot correctly link

ntiy
Beginner
310 Views
Hey guys.

While trying to build HPCC according to instructions found at

http://software.intel.com/en-us/articles/performance-tools-for-software-developers-building-the-hpcc-benchmark/

I run into the error message:
ld: cannot find -lmkl


Have no clue what to do. Here are some relevant links from my makefile:


-----------------------------------------
LAdir = /share/apps/intel/mkl/10.2.2.025
LAinc = -I$(LAdir)/include
LAlib = -L$(LAdir)/lib/em64t -lmkl
....
....
HPL_LIBS = $(HPLlib) $(LAlib) $(MPlib) -lm
....
....
HPL_DEFS = $(F2CDEFS) $(HPL_OPTS) $(HPL_INCLUDES)
...
...
CC = mpicc
CCNOOPT = $(HPL_DEFS) -O0 -g
CCFLAGS = $(HPL_DEFS) -O3 -xP -ip -fno-alias
#
LINKER = mpicc
LINKFLAGS = $(CCFLAGS)
...
...
...
-----------------------------------------

Compilation breaks with the above error message.

I also tried to use link advisor, as people recommend for example here:
http://origin-software.intel.com/en-us/forums/showthread.php?t=71396

For my system:
linux-x64
intel xeon CPU
openMPI compiled against intel compiler

advisor generated the following set of options for me:
$(MKLPATH)/libmkl_solver_ilp64_sequential.a -Wl,--start-group $(MKLPATH)/libmkl_intel_ilp64.a $(MKLPATH)/libmkl_sequential.a $(MKLPATH)\\
/libmkl_core.a $(MKLPATH)/libmkl_blacs_openmpi_ilp64.a -Wl,--end-group -lpthread

This also didn't help and I got the same error upon compilation (cannot find -lmkl).

I would appreciate any help with this issue.
Thanks.
0 Kudos
2 Replies
VipinKumar_E_Intel
310 Views
0 Kudos
ntiy
Beginner
310 Views
Hey.

Thanks for reply. However I am still frustrated. When I try to buil MPI MKL FFT lib following your instructions I get library libfftw2x_cdft_DOUBLE.a not libfftw2x_cdft_DOUBLE.ilp64 as suggested. And therefore I am still not able to compile hpcc. Here goes:

------------------

# pwd
/share/apps/intel/mkl/10.2.2.025/interfaces/fftw2x_cdft

# make libem64t mpi=intel3 PRECISION=MKL_DOUBLE interface=ilp64
make clean libfftw2x_cdft_DOUBLE.a _IA=em64t Ibin=bin64
make[1]: Entering directory `/share/apps/intel/mkl/10.2.2.025/interfaces/fftw2x_cdft'
rm -rf obj
rm -f ../../lib/em64t/libfftw2x_cdft_DOUBLE.a
mkdir -p obj
make -f makefile objects
make[2]: Entering directory `/share/apps/intel/mkl/10.2.2.025/interfaces/fftw2x_cdft'
mpiicc -c -w -DMKL_DOUBLE -I../../include wrappers/1d_create_plan.c -o obj/1d_create_plan.o
mpiicc -c -w -DMKL_DOUBLE -I../../include wrappers/1d_destroy_plan.c -o obj/1d_destroy_plan.o
mpiicc -c -w -DMKL_DOUBLE -I../../include wrappers/1d_fftw.c -o obj/1d_fftw.o
mpiicc -c -w -DMKL_DOUBLE -I../../include wrappers/1d_local_sizes.c -o obj/1d_local_sizes.o
mpiicc -c -w -DMKL_DOUBLE -I../../include wrappers/nd_create_plan.c -o obj/nd_create_plan.o
mpiicc -c -w -DMKL_DOUBLE -I../../include wrappers/nd_destroy_plan.c -o obj/nd_destroy_plan.o
mpiicc -c -w -DMKL_DOUBLE -I../../include wrappers/nd_fftw.c -o obj/nd_fftw.o
mpiicc -c -w -DMKL_DOUBLE -I../../include wrappers/nd_local_sizes.c -o obj/nd_local_sizes.o
mpiicc -c -w -DMKL_DOUBLE -I../../include wrappers/rnd_create_plan.c -o obj/rnd_create_plan.o
mpiicc -c -w -DMKL_DOUBLE -I../../include wrappers/rnd_destroy_plan.c -o obj/rnd_destroy_plan.o
mpiicc -c -w -DMKL_DOUBLE -I../../include wrappers/rnd_fftw.c -o obj/rnd_fftw.o
mpiicc -c -w -DMKL_DOUBLE -I../../include wrappers/rnd_local_sizes.c -o obj/rnd_local_sizes.o
make[2]: Leaving directory `/share/apps/intel/mkl/10.2.2.025/interfaces/fftw2x_cdft'
ar rs ../../lib/em64t/libfftw2x_cdft_DOUBLE.a obj/*.o
ar: creating ../../lib/em64t/libfftw2x_cdft_DOUBLE.a
rm -rf obj
make[1]: Leaving directory `/share/apps/intel/mkl/10.2.2.025/interfaces/fftw2x_cdft'
----------------------

Any ideas?

0 Kudos
Reply