Tutorial steps not linking using MKL

404 views
Skip to first unread message

Bruno Turcksin

unread,
May 20, 2014, 8:51:26 PM5/20/14
to dea...@googlegroups.com
Hi all,

I'm trying to install deal.II with the intel compiler and MKL. I can compile deal.II without any problem but when I try to compile a tutorial step, I get this kind of error during the linking:

/g/software/intelXE/composer_xe_2011_sp1.11.339/mkl/lib/intel64/libmkl_gf_lp64.so: undefined reference to `mkl_lapack_zla_gbrcond_x'
/g/software/intelXE/composer_xe_2011_sp1.11.339/mkl/lib/intel64/libmkl_gf_lp64.so: undefined reference to `mkl_lapack_cgehrd'
/g/software/intelXE/composer_xe_2011_sp1.11.339/mkl/lib/intel64/libmkl_gf_lp64.so: undefined reference to `mkl_gmp___gmpz_divexact_ui'
/g/software/intelXE/composer_xe_2011_sp1.11.339/mkl/lib/intel64/libmkl_gf_lp64.so: undefined reference to `mkl_lapack_dgbtrs'
/g/software/intelXE/composer_xe_2011_sp1.11.339/mkl/lib/intel64/libmkl_gf_lp64.so: undefined reference to `mkl_spblas_lp64_mkl_sdiamm'
/g/software/intelXE/composer_xe_2011_sp1.11.339/mkl/lib/intel64/libmkl_gf_lp64.so: undefined reference to `mkl_lapack_dgejsv'
/g/software/intelXE/composer_xe_2011_sp1.11.339/mkl/lib/intel64/libmkl_gf_lp64.so: undefined reference to `mkl_blas_sgbmv'

MKL is in my path. I don't need libmkl_gf_lp64 since it is the gfortran interface for Lapack. I tried to take the library out of Make.global_options but I must do something wrong because it does not compile (I get the same error). Reading the user manual of the cluster, it seems that to have libmkl_gf_lp64 to work I need to link with the static library mkl_lapack95_lp64 (that's not done by deal.II right now) but since I don't need fortran, I just want to get ride of this library. Any idea how I can do that ? I have attached my detailed.log file in case it helps.

Best,

Bruno
detailed.log

Wolfgang Bangerth

unread,
May 20, 2014, 10:06:26 PM5/20/14
to dea...@googlegroups.com
On 05/20/2014 07:51 PM, Bruno Turcksin wrote:
> Hi all,
>
> I'm trying to install deal.II with the intel compiler and MKL. I can compile
> deal.II without any problem but when I try to compile a tutorial step, I get
> this kind of error during the linking:
>
> /g/software/intelXE/composer_xe_2011_sp1.11.339/mkl/lib/intel64/libmkl_gf_lp64.so:
> undefined reference to `mkl_lapack_zla_gbrcond_x'
> /g/software/intelXE/composer_xe_2011_sp1.11.339/mkl/lib/intel64/libmkl_gf_lp64.so:
> undefined reference to `mkl_lapack_cgehrd'
> /g/software/intelXE/composer_xe_2011_sp1.11.339/mkl/lib/intel64/libmkl_gf_lp64.so:
> undefined reference to `mkl_gmp___gmpz_divexact_ui'
> /g/software/intelXE/composer_xe_2011_sp1.11.339/mkl/lib/intel64/libmkl_gf_lp64.so:
> undefined reference to `mkl_lapack_dgbtrs'
> /g/software/intelXE/composer_xe_2011_sp1.11.339/mkl/lib/intel64/libmkl_gf_lp64.so:
> undefined reference to `mkl_spblas_lp64_mkl_sdiamm'
> /g/software/intelXE/composer_xe_2011_sp1.11.339/mkl/lib/intel64/libmkl_gf_lp64.so:
> undefined reference to `mkl_lapack_dgejsv'
> /g/software/intelXE/composer_xe_2011_sp1.11.339/mkl/lib/intel64/libmkl_gf_lp64.so:
> undefined reference to `mkl_blas_sgbmv'
>
> MKL is in my path. I don't need libmkl_gf_lp64 since it is the gfortran
> interface for Lapack. I tried to take the library out of Make.global_options
> but I must do something wrong because it does not compile (I get the same
> error).

The tutorials no longer use Make.global_options but instead inherit the
correct compiler/linker flags from cmake.


> Reading the user manual of the cluster, it seems that to have
> libmkl_gf_lp64 to work I need to link with the static library
> mkl_lapack95_lp64 (that's not done by deal.II right now) but since I don't
> need fortran, I just want to get ride of this library. Any idea how I can do
> that ? I have attached my detailed.log file in case it helps.

Do you know how this library got into the linker line to begin with? Do any of
your dependencies use it? E.g., if you do
ldd libepetra.so
does it link mkl_gf_lp64? Also, which library is mkl_blas_sgbmv in?

W.


--
------------------------------------------------------------------------
Wolfgang Bangerth email: bang...@math.tamu.edu
www: http://www.math.tamu.edu/~bangerth/

Bruno Turcksin

unread,
May 21, 2014, 9:45:43 AM5/21/14
to dea...@googlegroups.com

> Do you know how this library got into the linker line to begin with? Do any of
> your dependencies use it? E.g., if you do
> ldd libepetra.so
> does it link mkl_gf_lp64? Also, which library is mkl_blas_sgbmv in?
I don't use any external library. It's deal.II which pulls every Lapack
library that it can find. I think that mkl_blas_sgbmv is in
libmkl_blas95_lp64 which exists only as a static library like
libmkl_lapack95_lp64.

Best,

Bruno

Martin Kronbichler

unread,
May 21, 2014, 10:16:37 AM5/21/14
to dea...@googlegroups.com
Bruno,

> I don't use any external library. It's deal.II which pulls every
> Lapack library that it can find. I think that mkl_blas_sgbmv is in
> libmkl_blas95_lp64 which exists only as a static library like
> libmkl_lapack95_lp64.

From a quick look at my MKL, mkl_blas_sgbmv should be defined in
libmkl_core.so/.a. From my experience, one typically needs to pass
something like
-D
LAPACK_LIBRARIES="/path/to/mkl/libmkl_gf_lp64.so;/path/to/mkl/libmkl_sequential.so;/path/to/mkl/libmkl_core.so"
in order to get a functional MKL. (But it took me lots of attempts to
convince pick up MKL correctly with gcc, which is considerably better
than the Intel compiler for my code.)

Best,
Martin

Bruno Turcksin

unread,
May 21, 2014, 10:49:42 AM5/21/14
to dea...@googlegroups.com
Martin,

thanks! What I found is that some of the missing symbols where in
libmkl_sequential.so (like you said), libmkl_intel_thread.so, and
libmkl_gnu_thread.so. Libmkl_intel_thread.so was picked up by cmake but
libmkl_gnu_thread.so wasn't so that's why I had a problem with the
gfortran interface.

Best,

Bruno
Reply all
Reply to author
Forward
0 new messages