[Trilinos-Users] MKL / ACML

Willenbring, James M jmwille at sandia.gov
Fri Dec 10 09:19:49 MST 2010


Hal,

Thank you for the detailed description.  I will file a bug.

Jim

-----Original Message-----
From: trilinos-users-bounces at software.sandia.gov [mailto:trilinos-users-bounces at software.sandia.gov] On Behalf Of Meyer, Hal
Sent: Friday, December 10, 2010 8:34 AM
To: Tommy Binford; Alireza Nejadmalayeri
Cc: trilinos-users at software.sandia.gov
Subject: Re: [Trilinos-Users] MKL / ACML

I am seeing the same problem on a gnu/linux system where I have built blas and lapack from source. The error is in Makefile.export.Trilinos.

The location of my blas/lapack are defined below:

    BLAS_LIB                := -L$(DEPEND_INSTALL)/blas -lblas
    LAPACK_LIB              := -L$(DEPEND_INSTALL)/lapack -llapack

The cmake option is set here:

        cd $(TRILINOS_BUILD_DIR) && ($(MODULE_COMMANDS) $(CMAKE) \
                ......
                -D TPL_BLAS_LIBRARIES:STRING="$(BLAS_LIB)" \
                -D TPL_LAPACK_LIBRARIES:STRING="$(LAPACK_LIB)" \
                $(TRILINOS_SRC_DIR))

Trilinos builds without error, but the link fails with the following error.

    /usr/bin/ld: cannot find -l-L/scratch1/hxm/aleph/build/tsali/aleph.2472/user/machines/tsali/lapack

In my Makefile I am including:

    -include $(TRILINOS_DIR)/include/Makefile.export.Trilinos

When I look at the include file, the error is in that file.

    grep -i lapack Makefile.export.*
    Makefile.export.Trilinos:Trilinos_TPL_LIBRARIES= /scratch1/hxm/aleph/build/tsali/aleph.2472/user/machines/tsali/exodus/lib/libnetcdf.a -l-L/scratch1/hxm/aleph/build/tsali/aleph.2472/user/machines/tsali/lapack -llapack -l-L/scratch1/hxm/aleph/build/tsali/aleph.2472/user/machines/tsali/blas -lblas

Note the -l-L after libnetcdf.a. This file is created by trilinos.

The work around I started using was to specify the full path, not "-L... -l ...", but I would rather use the "-L.. -l.." format.

I hope this is helpful.
Hal

_______________________________________
From: trilinos-users-bounces at software.sandia.gov [trilinos-users-bounces at software.sandia.gov] On Behalf Of Tommy Binford [tbinford at gmail.com]
Sent: Friday, December 10, 2010 07:21
To: Alireza Nejadmalayeri
Cc: trilinos-users at software.sandia.gov
Subject: Re: [Trilinos-Users] MKL / ACML

I'm not sure because I've never seen the -l-L option, but I think you
might have a problem in your makefile prepending a "-l" onto your
library paths.  My guess is ld doesn't know what

-l-L/opt/intel/mkl/10.2.5.035/lib/em64t

means.  It should probably be

-L/opt/intel/mkl/10.2.5.035/lib/em64t

This also happens on

-l-L/opt/intel/mkl/10.2.5.035/lib/em64t -lmkl_intel_lp64

Hope this helps.

TLB

On Thu, Dec 9, 2010 at 11:52 PM, Alireza Nejadmalayeri
<Alireza.Nejadmalayeri at colorado.edu> wrote:
> Thanks, Chris. I have tried something similar. It works as long as I use
> cmake. But if I compile my code using makefile, I'll get:
>
> /apps/rhel5/mpich2-1.3.1/64/nemesis-intel-11.1.072/bin/mpicxx -c -g -O0 -g
> -I/usr/rmt_share/scratch95/a/alireza/The_Trilions_Project/trilinos-10.6.1__Install_mpi_wrapper_debug_MKL2/include
> -DMYAPP_EPETRA main.cpp
> icpc: command line warning #10120: overriding '-O3' with '-O0'
> /usr/bin/ar cr libmyappLib.a main.o
> /apps/rhel5/mpich2-1.3.1/64/nemesis-intel-11.1.072/bin/mpicxx -g -O0 -g
> -I/usr/rmt_share/scratch95/a/alireza/The_Trilions_Project/trilinos-10.6.1__Install_mpi_wrapper_debug_MKL2/include
> -DMYAPP_EPETRA
> -L/usr/rmt_share/scratch95/a/alireza/The_Trilions_Project/trilinos-10.6.1__Install_mpi_wrapper_debug_MKL2/lib
> libmyappLib.a -laztecoo -ltpetrainout -ltpetra -ltriutils -lepetra
> -lkokkoslinalg -lkokkosnodeapi -lkokkos -ltpi -lteuchos
> -l-L/opt/intel/mkl/10.2.5.035/lib/em64t -lmkl_intel_lp64 -lmkl_core
> -lmkl_sequential -l-L/opt/intel/mkl/10.2.5.035/lib/em64t -lmkl_intel_lp64
> -lmkl_core -lmkl_sequential -o MyApp.exe
> icpc: command line warning #10120: overriding '-O3' with '-O0'
> ld: cannot find -l-L/opt/intel/mkl/10.2.5.035/lib/em64t
>
> Any thoughts/suggestions?
>
> Thank you,
> alireza
>
>
> ----- Original Message -----
> From: "Baker, Christopher G." <bakercg at ornl.gov>
> To: <Alireza.Nejadmalayeri at colorado.edu>;
> <trilinos-users at software.sandia.gov>
> Sent: Thursday, December 09, 2010 6:16 PM
> Subject: RE: [Trilinos-Users] MKL / ACML
>> The following will link in the sequential BLAS:
>>
>> set SEQMKL="-L${MKLROOT}/lib/em64t -lmkl_intel_lp64 -lmkl_core
>> -lmkl_sequential"
>>
>>
>> cmake ......
>>  -D TPL_BLAS_LIBRARIES:STRING="${SEQMKL}"                             \
>>  -D TPL_LAPACK_LIBRARIES:STRING="${SEQMKL}"                           \
>>
>>
>>
>> -----Original Message-----
>> From: Alireza Nejadmalayeri [mailto:Alireza.Nejadmalayeri at colorado.edu]
>> Sent: Thursday, December 09, 2010 06:39 PM Eastern Standard Time
>> To: trilinos-users at software.sandia.gov
>> Subject: [Trilinos-Users] MKL / ACML
>>
>> Hello,
>>
>> I wonder if anyone has built Trilinos with  Intel MKL or ACML libraries
>> (for BLAS and LAPACK). I would like to have a sample configure script since
>> mine is causing various problems.
>>
>> Thank you,
>> alireza
>>
>>
>>
>>
> _______________________________________________
> Trilinos-Users mailing list
> Trilinos-Users at software.sandia.gov
> http://software.sandia.gov/mailman/listinfo/trilinos-users
>
>


_______________________________________________
Trilinos-Users mailing list
Trilinos-Users at software.sandia.gov
http://software.sandia.gov/mailman/listinfo/trilinos-users

_______________________________________________
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