[Pw_forum] Difficulties compiling comp_resp_mat.j to optimize the U
Gabriele Sclauzero
sclauzer at sissa.it
Mon May 25 18:00:25 CEST 2009
Axel Kohlmeyer wrote:
> On Mon, 2009-05-25 at 15:48 +0100, pc229 at kent.ac.uk wrote:
>> I do apologize,
>> I made a mistake when I paste the string that I use to compile it.
>> Anyway I tried both the static and the dynamics compilation using
>> either this string
>>
>> and the output is :
>>
>>
>> and
>> ifort -o resp_mat.x resp_mat.f90 \
>> -L/opt/intel/mkl/10.1.2.024/lib/32 -lmkl_lapack64 -lmkl -lguide
>> -lpthread
>
> why suddenly use now -lmkl_lapack64 ???
> there is not libmkl_lapack64.so in the 32bit version of mkl.
In my machine at SISSA there is, but maybe it is a rather exotic installation... (actually
I was surprised myself...)
[sclauzer at brenta:/usr/local/intel_mkl_90/lib/32]$ ls -l
total 110268
-r--r--r-- 1 root root 267450 Oct 6 2006 libguide.a
-r-xr-xr-x 1 root root 226328 Oct 6 2006 libguide.so
-r-xr-xr-x 1 root root 4744646 Oct 6 2006 libmkl_def.so
-r--r--r-- 1 root root 47116850 Oct 6 2006 libmkl_ia32.a
-r-xr-xr-x 1 root root 663086 Oct 6 2006 libmkl_ias.so
-r-xr-xr-x 1 root root 2967647 Oct 6 2006 libmkl_lapack32.so
-r-xr-xr-x 1 root root 3014308 Oct 6 2006 libmkl_lapack64.so
-r--r--r-- 1 root root 10418470 Oct 6 2006 libmkl_lapack.a
-r-xr-xr-x 1 root root 5645669 Oct 6 2006 libmkl_p3.so
-r-xr-xr-x 1 root root 6511253 Oct 6 2006 libmkl_p4m.so
-r-xr-xr-x 1 root root 6462455 Oct 6 2006 libmkl_p4p.so
-r-xr-xr-x 1 root root 6586091 Oct 6 2006 libmkl_p4.so
-r-xr-xr-x 1 root root 768161 Oct 6 2006 libmkl.so
-r--r--r-- 1 root root 1333138 Oct 6 2006 libmkl_solver.a
-r-xr-xr-x 1 root root 2189200 Oct 6 2006 libmkl_vml_def.so
-r-xr-xr-x 1 root root 2595590 Oct 6 2006 libmkl_vml_p3.so
-r-xr-xr-x 1 root root 3623813 Oct 6 2006 libmkl_vml_p4m.so
-r-xr-xr-x 1 root root 3624853 Oct 6 2006 libmkl_vml_p4p.so
-r-xr-xr-x 1 root root 3640224 Oct 6 2006 libmkl_vml_p4.so
-r-xr-xr-x 1 root root 476207 Oct 6 2006 libvml.so
In fact libmkl_lapack32.so contains single precision LAPACK routines, while
libmkl_lapack64.so the double precision ones.
Anyway I agree that the better way to understand how to link MKL is to read the local
guide or check Intel's website.
GS
> it should work with plain -lmkl_lapack
>
> cheers,
> axel.
>
>
>> I cannot manage this problem. If it doesn't matter, can you please
>> send me, privately, your compiled version? I am struggling a lot.
>> Thank you, Piero
>
> _please_ rather then doing random stuff that does not make sense,
> spend some time reading the MKL documentation. it is quite detailed,
> useful and explains _everything_ about linking MKL dynamically and
> statically. you have to keep in mind that the linux linker always
> prefers shared libraries (.so) over static libraries. you should
> also see from the documentation that the static version or lapack
> is already included in libmkl_ia32.a. in conclusion: either link with
>
> -openmp -lmkl_lapack -lmkl
>
> or
>
> -i-static -openmp -lmkl_ia32
>
> or
>
> -lmkl_lapack -lmkl_intel -lmkl_sequential -lmkl_core
>
> cheers,
> axel.
>
>> ----- Original Message -----
>> From: Gabriele Sclauzero <sclauzer at sissa.it>
>> Date: Monday, May 25, 2009 3:18 pm
>> Subject: Re: [Pw_forum] Difficulties compiling comp_resp_mat.j to
>> optimize the U
>> To: PWSCF Forum <pw_forum at pwscf.org>
>>
>>> I thought Axel already replied to this post...
>>>
>>> Pieremanuele Canepa wrote:
>>>> Dear all,
>>>> I'm trying to compile the comp_resp_mat.j concerning the
>>> DFT+U. Then, I
>>>> tried to use the default settings (ifort-o r.x resp_mat.f90
>>>> -L/soft/local/intel/mkl72/lib/32 -lmkl_lapack \ -lmkl_ia32 -
>>> lguide
>>>> -lpthread) and what I got, is reported below. Do you have any
>>> suggestions?> Probably I am making some stupid mistake.
>>> have somebody already
>>>> compiled this program on 32 bit machine?
>>>> I don't have any experience compiling with lapack libraries as
>>> you can
>>>> probably realize.
>>>> Cheers, Piero
>>> I don't understand if you're trying to link against mkl 7.2 or
>>> 10.1. Do you know at least
>>> which version is installed on your machine and where? Try to
>>> find out this first.
>>>
>>> On my 32 bit Intel machine I've got MKL 9.0 installed in
>>> /usr/local/intel_mkl_90/ and this
>>> compilation command works (for static linking):
>>>
>>> ifort -o resp_mat.x resp_mat.f90 \
>>> -L"/usr/local/intel_mkl_90/lib/32" -
>>> lmkl_lapack -lmkl_ia32 -lguide -lpthread
>>>
>>> ldd resp_mat.x
>>> linux-gate.so.1
>>> => (0x00af3000)
>>> libguide.so =>
>>> /usr/local/intel_mkl_90/lib/32/libguide.so (0x00a55000)
>>> libm.so.6 =>
>>> /lib/libm.so.6 (0x00aa4000)
>>> libc.so.6 =>
>>> /lib/libc.so.6 (0x00111000)
>>> libgcc_s.so.1
>>> => /lib/libgcc_s.so.1 (0x00d4c000)
>>> libdl.so.2 =>
>>> /lib/libdl.so.2 (0x00acd000)
>>> libpthread.so.0
>>> => /lib/libpthread.so.0 (0x00ad3000)
>>> /lib/ld-
>>> linux.so.2 (0x00941000)
>>>
>>>
>>> If you want to link dynamically use:
>>>
>>> ifort -o resp_mat.x resp_mat.f90 \
>>> -L"/usr/local/intel_mkl_90/lib/32" -
>>> lmkl_lapack64 -lmkl -lguide -lpthread
>>>
>>> ldd resp_mat.x
>>> linux-gate.so.1
>>> => (0x00741000)
>>>
>>> libmkl_lapack64.so =>
>>> /usr/local/intel_mkl_90/lib/32/libmkl_lapack64.so (0x00c32000)
>>> libmkl.so =>
>>> /usr/local/intel_mkl_90/lib/32/libmkl.so (0x00eba000)
>>> libguide.so =>
>>> /usr/local/intel_mkl_90/lib/32/libguide.so (0x00111000)
>>> libpthread.so.0
>>> => /lib/libpthread.so.0 (0x00ad3000)
>>> libm.so.6 =>
>>> /lib/libm.so.6 (0x00aa4000)
>>> libc.so.6 =>
>>> /lib/libc.so.6 (0x0095f000)
>>> libgcc_s.so.1
>>> => /lib/libgcc_s.so.1 (0x0015e000)
>>> libdl.so.2 =>
>>> /lib/libdl.so.2 (0x00acd000)
>>> /lib/ld-
>>> linux.so.2 (0x00941000)
>>>
>>> Obviously you must change the path to the exact location of your
>>> MKL installation
>>>
>>>
>>> HTH
>>>
>>> GS
>>>
>>>
>>>> resp_mat.f90(92): (col. 7) remark: LOOP WAS VECTORIZED.
>>>> resp_mat.f90(93): (col. 7) remark: LOOP WAS VECTORIZED.
>>>> resp_mat.f90(119): (col. 7) remark: LOOP WAS VECTORIZED.
>>>> resp_mat.f90(188): (col. 7) remark: LOOP WAS VECTORIZED.
>>>> resp_mat.f90(235): (col. 13) remark: PARTIAL LOOP WAS VECTORIZED.
>>>> resp_mat.f90(235): (col. 13) remark: PARTIAL LOOP WAS VECTORIZED.
>>>> resp_mat.f90(235): (col. 13) remark: PARTIAL LOOP WAS VECTORIZED.
>>>> resp_mat.f90(235): (col. 13) remark: PARTIAL LOOP WAS VECTORIZED.
>>>> resp_mat.f90(252): (col. 10) remark: PERMUTED LOOP WAS VECTORIZED.
>>>> resp_mat.f90(265): (col. 16) remark: PERMUTED LOOP WAS VECTORIZED.
>>>> resp_mat.f90(322): (col. 7) remark: LOOP WAS VECTORIZED.
>>>> resp_mat.f90(339): (col. 7) remark: LOOP WAS VECTORIZED.
>>>> resp_mat.f90(365): (col. 16) remark: PARTIAL LOOP WAS VECTORIZED.
>>>> resp_mat.f90(377): (col. 7) remark: LOOP WAS VECTORIZED.
>>>> resp_mat.f90(483): (col. 13) remark: PARTIAL LOOP WAS VECTORIZED.
>>>> resp_mat.f90(483): (col. 13) remark: PARTIAL LOOP WAS VECTORIZED.
>>>> resp_mat.f90(483): (col. 13) remark: PARTIAL LOOP WAS VECTORIZED.
>>>> resp_mat.f90(483): (col. 13) remark: PARTIAL LOOP WAS VECTORIZED.
>>>> resp_mat.f90(500): (col. 10) remark: PERMUTED LOOP WAS VECTORIZED.
>>>> resp_mat.f90(513): (col. 16) remark: PERMUTED LOOP WAS VECTORIZED.
>>>> /tmp/ifortMUANg9.o: In function `invmat_.':
>>>> resp_mat.f90:(.text+0x9c33): undefined reference to `dcopy_'
>>>> resp_mat.f90:(.text+0x9c4a): undefined reference to `dgetrf_'
>>>> resp_mat.f90:(.text+0x9c6a): undefined reference to `dgetri_'
>>>> /opt/intel/mkl/10.1.2.024/lib/32/libmkl_lapack.so
>>>> <http://10.1.2.20/lib/32/libmkl_lapack.so>: undefined
>>> reference to
>>>> `mkl_pds_c_blklu_unsym_omp_pardiso'
>>>> /opt/intel/mkl/10.1.2.024/lib/32/libmkl_lapack.so
>>>> <http://10.1.2.20/lib/32/libmkl_lapack.so>: undefined
>>> reference to
>>>> `mkl_lapack_cpptrs'
>>>> /opt/intel/mkl/10.1.2.024/lib/32/libmkl_lapack.so
>>>> <http://10.1.2.20/lib/32/libmkl_lapack.so>: undefined
>>> reference to
>>>> `mkl_serv_strcat2'
>>>> /opt/intel/mkl/10.1.2.024/lib/32/libmkl_lapack.so
>>>> <http://10.1.2.20/lib/32/libmkl_lapack.so>: undefined
>>> reference to
>>>> `mkl_pds_blklu_omp_pardiso'
>>>> and so on
>>>> --
>>>> Pieremanuele Canepa
>>>> Room 230
>>>> School of Physical Sciences, Ingram Building,
>>>> University of Kent, Canterbury, Kent,
>>>> CT2 7NH
>>>> United Kingdom
>>>> -----------------------------------------------------------
>>>>
>>>>
>>>> ---------------------------------------------------------------
>>> ---------
>>>> _______________________________________________
>>>> Pw_forum mailing list
>>>> Pw_forum at pwscf.org
>>>> http://www.democritos.it/mailman/listinfo/pw_forum
>>> --
>>>
>>>
>>> o ------------------------------------------------ o
>>> | Gabriele Sclauzero, PhD
>>> Student |
>>> | c/o: SISSA & CNR-INFM
>>> Democritos, |
>>> | via Beirut 2-4,
>>> 34014 Trieste (Italy) |
>>> | email:
>>> sclauzer at sissa.it |
>>> | phone: +39 040 3787
>>> 511 |
>>> | skype:
>>> gurlonotturno |
>>> o ------------------------------------------------ o
>>> _______________________________________________
>>> Pw_forum mailing list
>>> Pw_forum at pwscf.org
>>> http://www.democritos.it/mailman/listinfo/pw_forum
>>>
>> ---
>> Pieremanuele Canepa
>> Room 230
>> School of Physical Sciences, Ingram Building,
>> University of Kent, Canterbury, Kent,
>> CT2 7NH
>> United Kingdom
>>
>> _______________________________________________
>> Pw_forum mailing list
>> Pw_forum at pwscf.org
>> http://www.democritos.it/mailman/listinfo/pw_forum
>
--
o ------------------------------------------------ o
| Gabriele Sclauzero, PhD Student |
| c/o: SISSA & CNR-INFM Democritos, |
| via Beirut 2-4, 34014 Trieste (Italy) |
| email: sclauzer at sissa.it |
| phone: +39 040 3787 511 |
| skype: gurlonotturno |
o ------------------------------------------------ o
More information about the Pw_forum
mailing list