Tips on using Intel MKL for BLAS/LAPACK?

685 views
Skip to first unread message

Dustin Lang

unread,
May 20, 2014, 9:29:30 PM5/20/14
to ceres-...@googlegroups.com
Hi,

I'm trying to using MKL via:

cmake ../ceres-solver-1.8.0 \
-DBLAS_LIBRARIES="${MKL_LIBDIR}/libmkl_intel_lp64.a,${MKL_LIBDIR}/libmkl_sequential.a,${MKL_LIBDIR}/libmkl_core.a" \
-DLAPACK_LIBRARIES="${MKL_LIBDIR}/libmkl_intel_lp64.a,${MKL_LIBDIR}/libmkl_sequential.a,${MKL_LIBDIR}/libmkl_core.a" \
...

I also tried space-separating them.  cmake runs, and make runs until:

> make
make[2]: *** No rule to make target `/usr/common/usg/intel/composer_xe_2011_sp1.9.293/mkl/lib/intel64/libmkl_intel_lp64.a,/usr/common/usg/intel/composer_xe_2011_sp1.9.293/mkl/lib/intel64/libmkl_sequential.a,/usr/common/usg/intel/composer_xe_2011_sp1.9.293/mkl/lib/intel64/libmkl_core.a', needed by `lib/libceres.so.1.8.0'.  Stop.

It looks like the makefile is assuming a single file, while I need (apparently) to specify the three libraries.

Am I specifying the lib incorrectly, or is this a bug?

Thanks,
--dustin

Sameer Agarwal

unread,
May 21, 2014, 1:23:20 AM5/21/14
to ceres-...@googlegroups.com
Dustin,

There should be an easier way to do this. We use FindLAPACK.cmake and FindBLAS.cmake scripts that ship with cmake. These scripts handle Intel MKL correctly. You should not have to specify the individual library files by hand.

Alex can say more?

Sameer





--
You received this message because you are subscribed to the Google Groups "Ceres Solver" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ceres-solver...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ceres-solver/b7531f19-2cc1-4f1c-9093-afb94e7cb498%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Dustin Lang

unread,
May 21, 2014, 9:00:29 AM5/21/14
to ceres-...@googlegroups.com
Huh, well now I feel dumb... It appears that IF you have MKL in your LD_LIBRARY_PATH and ATLAS NOT in your LD_LIBRARY_PATH, FindLAPACK and FindBLAS just do the right thing without specify ANYTHING on the command-line, and ceres builds fine.  Mystical.

Thanks / apologies for the noise.

--dustin


Reply all
Reply to author
Forward
0 new messages