[Trilinos-Users] MKL / ACML
Conjeepuram Subramanian, Natarajan
C.S.Natarajan at bp.com
Fri Dec 10 09:33:59 MST 2010
Hello,
might be a bit too late, but I have built trilinos 10.2 without
problems using MKL lapack and blas. The configure script I use is below
:
-D
CMAKE_CXX_COMPILER:FILEPATH=/hpc/soft/intel/x86_64/ict-3.2.1.015/impi/3.
2.1.009/bin64/mpiicpc \
-D
CMAKE_C_COMPILER:FILEPATH=/hpc/soft/intel/x86_64/ict-3.2.1.015/impi/3.2.
1.009/bin64/mpiicc \
-D
CMAKE_Fortran_COMPILER:FILEPATH=/hpc/soft/intel/x86_64/ict-3.2.1.015/imp
i/3.2.1.009/bin64/mpiifort \
-D CMAKE_INSTALL_PREFIX:PATH=/hpc/soft/natac0/trlin_10_5 \
-D Trilinos_ENABLE_Epetra:BOOL=ON \
-D Trilinos_ENABLE_Teuchos:BOOL=ON \
-D Trilinos_ENABLE_AztecOO:BOOL=ON \
-D Trilinos_ENABLE_Triutils:BOOL=ON\
-D Trilinos_ENABLE_ML:BOOL=ON\
-D Trilinos_ENABLE_ML_Metis:BOOL=ON\
-D Trilinos_ENABLE_Galeri:BOOL=ON\
-D Trilinos_ENABLE_Amesos:BOOL=ON\
-D Trilinos_ENABLE_Didasko:BOOL=ON\
-D Trilinos_ENABLE_Pamgen:BOOL=ON\
-D Trilinos_ENABLE_FEI:BOOL=ON\
-D TPL_ENABLE_ParMETIS:BOOL=ON \
-D ParMETIS_INCLUDE_DIRS:PATH=/hpc/soft/natac0/ParMetis-3.1.1\
-D ParMETIS_LIBRARY_DIRS:PATH=/hpc/soft/natac0/ParMetis-3.1.1\
-D TPL_ENABLE_METIS:BOOL=ON \
-D METIS_INCLUDE_DIRS:PATH=/hpc/soft/natac0/ParMetis-3.1.1/METISLib\
-D METIS_LIBRARY_DIRS:PATH=/hpc/soft/natac0/ParMetis-3.1.1\
-D TPL_BLAS_LIBRARIES:STRING="-lmkl_intel_lp64 -Wl,--start-group
-lmkl_intel_thread -lmkl_core -Wl,--end-group -lguide -lpthread" \
-D TPL_LAPACK_LIBRARIES:STRING="-lmkl_intel_lp64 -Wl,--start-group
-lmkl_intel_thread -lmkl_core -Wl,--end-group -lguide -lpthread" \
-D Trilinos_ENABLE_TESTS:BOOL=ON \
-D TPL_ENABLE_MPI:BOOL=ON \
-D
MPI_BASE_DIR:PATH=/hpc/soft/intel/x86_64/ict-3.2.1.015/impi/3.2.1.009 \
-D
MPI_BIN_DIR:PATH=/hpc/soft/intel/x86_64/ict-3.2.1.015/impi/3.2.1.009/bin
64 \
-D CMAKE_CXX_FLAGS:STRING="-limf -O3 -DMPICH_IGNORE_CXX_SEEK" \
-D MPI_USE_COMPILER_WRAPPERS:BOOL=OFF \
Cheers,
C.S.N
-----Original Message-----
From: trilinos-users-bounces at software.sandia.gov
[mailto:trilinos-users-bounces at software.sandia.gov] On Behalf Of
Willenbring, James M
Sent: Friday, December 10, 2010 10:20 AM
To: Meyer, Hal; Tommy Binford; Alireza Nejadmalayeri
Cc: trilinos-users at software.sandia.gov
Subject: Re: [Trilinos-Users] MKL / ACML
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/lapac
k
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/li
b/libnetcdf.a
-l-L/scratch1/hxm/aleph/build/tsali/aleph.2472/user/machines/tsali/lapac
k -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
_______________________________________________
Trilinos-Users mailing list
Trilinos-Users at software.sandia.gov
http://software.sandia.gov/mailman/listinfo/trilinos-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://software.sandia.gov/pipermail/trilinos-users/attachments/20101210/38b33f29/attachment-0001.html
More information about the Trilinos-Users
mailing list