compiling PETSc with Intel MKL 10.0.1.14

Randall Mackie rlmackie862 at gmail.com
Tue Feb 3 20:51:05 CST 2009


Satish,

Thanks for the clarification concerning em64t and 64. They've always been a bit
of a mystery to me.

I tried both your method below of specifying the correct library, and doing
it Paul's way, and both seem to work, but you're right, I continue to get those
warnings.

Additionally an executable is created, and appears to run, although I need to
look at this a bit more carefully to be completely sure.

Do you have an idea of how much difference there is in computation times
using the Intel MKL optimized libraries versus just having PETSc download
and compile them itself?

Thanks for your help, I'll continue to work on this tomorrow.

Randy


Satish Balay wrote:
> Ok - for one you are on a x86_64 machine. So
> --with-blas-lapack-dir=/opt/intel/mkl/10.0.3.020/lib/64 is incorrect.
> 
> --with-blas-lapack-dir=/opt/intel/mkl/10.0.3.020/lib/em64t would be
> the correct thing [or --with-blas-lapack-dir=/opt/intel/mkl/10.0.3.020
> - so that configure determines the correct subdir in lib]
> 
> Note: intel calls 'x86_64' [i.e AMD64]  as 'em64t', and IA64 [i.e itanium] as '64'
> 
> 
> However currently you get link time warnings. The exectuable gets
> created - so it should run correctly. Can you confirm this? [I don't
> see any errors in the output you sent.]
> 
> And I don't think you'll be able to get rid of these warnings. Your
> compiler is already configured to look into both locations.
> 
> run 'mpicc -v foo.c' [on any simple c code] - and you'll see the
> following link paths.
> 
>  "-L/opt/intel/mkl/10.0.3.020/lib/64" "-L/opt/intel/mkl/10.0.3.020/lib/em64t"
> 
> [It should not be linking agaings '64' version. It should only use 'em64t' version]
> 
> Satish
> 
> On Tue, 3 Feb 2009, Randall Mackie wrote:
> 
>> Hi Satish,
>>
>> I compiled PETSC with the following options:
>>
>> ./configure PETSC_ARCH=linux-intel-opt --with-fortran-kernels=generic
>> --with-blas-lapack-dir
>> =/opt/intel/mkl/10.0.3.020/lib/64 --with-scalar-type=complex
>> --with-debugging=0
>>
>> PETSc compiled just fine, but when I tried to compile my application, or run
>> the tests
>> within PETSC, it bombed out looking for the MKL libraries like:
>>
>>
>> mpif90 -O   -o d3inv_DA_1_1_4_petsc ...  ,-rpath,/opt/intel/mkl/
>> 10.0.3.020/lib/64 -L/opt/intel/mkl/10.0.3.020/lib/64 -lmkl_lapack -lmkl
>> -lguide -lpthread -lPEPCF9r/lib64 -L/usr/mpi/intel/mvapich-1.0.1/lib/shared
>> -L/usr/mpi/intel/mvapich-1.0.1/lib -ldl -lmpich -libverbs -libumad
>> -libcommon -lpthread -lrt -L/opt/intel/mkl/
>> 10.0.3.020/libopt/intel/mkl/10.0.3.020/lib/em64t ......
>>
>> ld: skipping incompatible
>> /opt/intel/mkl/10.0.3.020/lib/64/libmkl_lapack.sowhen searching for
>> -lmkl_lapack
>> etc.
>>
>> I'll try Paul's method of specifying the exact libraries to be included. If
>> you want, I can
>> still send you the configure log.
>>
>> Randy
>>
>> On Tue, Feb 3, 2009 at 3:25 PM, Satish Balay <balay at mcs.anl.gov> wrote:
>>
>>> I just successfully compiled petsc-dev [which is almost same as
>>> petsc-3.0.0-p3] & MLK successfully with both intel & gnu compilers.
>>>
>>> ./configure
>>> --with-blas-lapack-dir=/gfs/software/software/intel/compilersuite/10.1/mkl/10.0.011
>>> --with-mpi=0 PETSC_ARCH=linux-mkl
>>>
>>>
>>> ./configure
>>> --with-blas-lapack-dir=/gfs/software/software/intel/compilersuite/10.1/mkl/10.0.011
>>> --with-mpi=0 PETSC_ARCH=linux-icc-mkl CC=icc FC=ifort
>>>
>>> What problems are you encountering? Send configure.log to petsc-maint..
>>>
>>> Satish
>>>
>>> On Tue, 3 Feb 2009, Randall Mackie wrote:
>>>
>>>> Paul,
>>>>
>>>> Have you tried this with Petsc 3.0.0? I just tried to compile it using
>>>> MKL 10.0.3.020, and I am having the same issue you specified below, in
>>> that
>>>> Petsc is looking for -lmkl_lapack -lmkl -lguide etc and the compilation
>>>> doesn't work.
>>>>
>>>> Randy
>>>>
>>>>
>>>>
>>>>
>>>> Paul T. Bauman wrote:
>>>>> Sorry this took so long to get around to doing. So it turns out that
>>> there's
>>>>> a newer version of 2.3.3p13 posted at the PETSc ftp server. This worked
>>>>> flawlessly with the new MKL. I guess it got fixed and checked-in, but
>>> not
>>>>> under a new patch?
>>>>>
>>>>> Thanks,
>>>>>
>>>>> Paul
>>>>>
>>>>> Barry Smith wrote:
>>>>>>   Please send the configure.log to petsc-maint at mcs.anl.gov
>>>>>>
>>>>>>    Barry
>>>>>>
>>>>>> On Aug 15, 2008, at 1:39 PM, Paul T. Bauman wrote:
>>>>>>
>>>>>>> Was there ever a fix/workaround introduced for this? I'm using
>>> 2.3.3p13
>>>>>>> and I'm having trouble getting the config to recognize mkl
>>> 10.0.3.020.
>>>>>>> Thanks,
>>>>>>>
>>>>>>> Paul
>>>>>>>
>>>>>>> Barry Smith wrote:
>>>>>>>>  Could you email to petsc-maint at mcs.anl.gov ALL the messages as
>>> to
>>>>>>>> what goes wrong with
>>>>>>>> our current linking so we can fix it?
>>>>>>>>
>>>>>>>>   Thanks
>>>>>>>>
>>>>>>>>   Barry
>>>>>>>>
>>>>>>>> On Jun 18, 2008, at 3:32 PM, Randall Mackie wrote:
>>>>>>>>
>>>>>>>>> We've upgraded Intel MKL to version 10.0, but in this version,
>>> Intel
>>>>>>>>> has
>>>>>>>>> changed how libraries are suppose to be linked. For example,
>>> the
>>>>>>>>> libmkl_lapack.a
>>>>>>>>> is a dummy library, but that's what the PETSc configure script
>>> looks
>>>>>>>>> for.
>>>>>>>>>
>>>>>>>>> The documentation says, for example, to compile LAPACK in the
>>> static
>>>>>>>>> case,
>>>>>>>>> use libmkl_lapack.a libmkl_em64t.a
>>>>>>>>>
>>>>>>>>> and in the layered pure case to use
>>>>>>>>> libmkl_intel_lp64.a libmkl_intel_thread.a libmkl_core.a
>>>>>>>>>
>>>>>>>>> However, the PETSC configuration wants -lmkl_lapack -lmkl
>>> -lguide
>>>>>>>>> -lpthread
>>>>>>>>>
>>>>>>>>> Any suggestions are appreciated.
>>>>>>>>>
>>>>>>>>> Randy
>>>>>>>>>
>>>>>>
>>>>>
>>>>
>>>
> 


More information about the petsc-users mailing list