[Trilinos-Users] Installing with Intel MKL

Mark Hoemmen mhoemme at sandia.gov
Sun Nov 21 22:41:01 MST 2010


Here are the relevant lines from a do-configure script I have that uses Intel's MKL.  First set MKL_LIB in your shell with the path to the MKL libraries, and replace the TPL_BLAS_LIBRARIES link line with an appropriate line for your use or non-use of the multithreaded MKL.

-D TPL_ENABLE_BLAS:BOOL=ON \
-D TPL_BLAS_LIBRARIES:STRING="-L$MKL_LIB -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -liomp5" \
-D TPL_ENABLE_LAPACK:BOOL=ON \
-D TPL_LAPACK_LIBRARIES:STRING="-L$MKL_LIB -lmkl_lapack" \

This is for a static-libraries build, if I recall correctly.

mfh

On Nov 21, 2010, at 10:34 PM, Einar Otnes wrote:

> Well, yes. The problem is that the libraries are not found even if I  
> set the DIRS as I showed you in my script. I need to the path in the  
> LIBRARIES
> 
> Best
> Einar
> 
> On Nov 21, 2010, at 22:53, "Mark Hoemmen" <mhoemme at sandia.gov> wrote:
> 
>> On Nov 21, 2010, at 10:41 AM, trilinos-users-request at software.sandia.gov 
>> wrote:
>>> Message: 1
>>> Date: Sun, 21 Nov 2010 08:09:23 -0800 (PST)
>>> From: einaro at yahoo.com
>>> Subject: [Trilinos-Users] Installing with Intel MKL
>>> To: trilinos-users at software.sandia.gov
>>> Message-ID: <155585.87484.qm at web111613.mail.gq1.yahoo.com>
>>> Content-Type: text/plain; charset="us-ascii"
>>> 
>>> Dear experts,
>>> I have been trying to install Trilinos using the BLAS/LAPACK  
>>> libraries from
>>> Intel MKL, but I have a few questions to how to set up the cmake  
>>> script. I
>>> started from one of the scripts provided with the distribution.
>>> 
>>> The problem is related to providing the path to the blas/lapack  
>>> libraries which
>>> does not seem to work for me. In order to make this work I need to  
>>> provide the
>>> path inside the
>>> 
>>> TPL_LAPACK_LIBRARIES definition as
>>> "-D  TPL_LAPACK_LIBRARIES:STRING="-L/opt/intel/Compiler/11.1/073/ 
>>> mkl/lib/em64t
>>> -lmkl_intel_lp64 -Wl,--start-group -lmkl_intel_thread -lmkl_core
>>> -Wl,--end-group -lguide -lpthread" "
>>> This is also done in a few of the sampleScripts which are provided  
>>> with the
>>> distribution.
>>> 
>>> My problem with this is that when I want to link trilinos into my  
>>> own programs,
>>> the compiler thinks that the path is a library and try to link in
>>> "-l -L/opt/intel/Compiler/11.1/073/mkl/lib/em64", which then causes  
>>> some
>>> problems.
>>> 
>>> Can you please tell me what I'm doing wrong?
>>> 
>>> The cmake script I'm using follows below...
>>> 
>>> Thanks,
>>> 
>>> Einar
>>> 
>>> ### 
>>> ### 
>>> ### 
>>> ### 
>>> ### 
>>> ### 
>>> ###################################################################
>>> 
>>> #!/bin/bash
>>> 
>>> TRILINOS_PATH=~/Software/src/trilinos-10.6.1-Source
>>> EXTRA_ARGS=$@
>>> FORTRAN_LIBRARIES=""
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> cmake \
>>>        -D CMAKE_BUILD_TYPE:STRING=DEBUG \
>>>        -D
>>> CMAKE_INSTALL_PREFIX:PATH=~/Software/src/trilinos-10.6.1-Source/ 
>>> installed \
>>>        -D Trilinos_ENABLE_DEFAULT_PACKAGES:BOOL=ON \
>>>        -D Trilinos_ENABLE_ALL_PACKAGES:BOOL=OFF \
>>>        -D Trilinos_ENABLE_Tpetra:BOOL=ON \
>>>        -D Trilinos_ENABLE_Teuchos:BOOL=ON \
>>>        -D Trilinos_ENABLE_TESTS:BOOL=ON \
>>>        -D TPL_ENABLE_Boost:BOOL=ON \
>>>        -D TPL_ENABLE_BLAS:BOOL=ON \
>>>        -D TPL_ENABLE_LAPACK:BOOL=ON \
>>>        -D Boost_INCLUDE_DIRS:PATH="/dd/Packages/boost/1.41.0/ 
>>> include" \
>>>        -D Boost_LIBRARY_DIRS:PATH="/dd/Packages/boost/1.41.0/lib" \
>>>        -D
>>> TPL_BLAS_LIBRARY_DIRS:PATH="/opt/intel/Compiler/11.1/073/mkl/lib/ 
>>> em64t" \
>>>        -D BLAS_LIBRARY_DIRS:PATH="/opt/intel/Compiler/11.1/073/mkl/ 
>>> lib/em64t"
>>> \
>>>        -D TPL_LIBRARY_DIRS:PATH="/opt/intel/Compiler/11.1/073/mkl/ 
>>> lib/em64t"
>>> \
>>>        -D
>>> Trilinos_TPL_LIBRARY_DIRS:PATH="/opt/intel/Compiler/11.1/073/mkl/ 
>>> lib/em64t" \
>>>        -D
>>> TPL_BLAS_LIBRARIES:STRING="-L/opt/intel/Compiler/11.1/073/mkl/lib/ 
>>> em64t
>>> -lmkl_intel_lp64 -Wl,--start-group -lmkl_intel_thread -lmkl_core - 
>>> Wl,--end-group
>>> -lguide -lpthread" \
>> 
>> Greetings --
>> 
>> If you are setting BLAS_LIBRARY_DIRS already, then you should be  
>> able to omit the directory in TPL_BLAS_LIBRARIES, right?
>> 
>> mfh
>> _______________________________________________
>> Trilinos-Users mailing list
>> Trilinos-Users at software.sandia.gov
>> http://software.sandia.gov/mailman/listinfo/trilinos-users
>> 
> 




More information about the Trilinos-Users mailing list