[Wien] MKL 10 linking

Andrey Sobolev inconnu at list.ru
Thu Dec 6 09:37:59 CET 2007


Hello, Andrzej.

I have successfully compiled and linked Wien2k against mkl10 with ifort compiler with options listed below: 
FOPT:-FR -mp1 -w -prec_div -pc80 -pad -ip -DINTEL_VML -O3 -xT
LDFLAGS:$(FOPT) -L/opt/intel/mkl/10.0.011/lib/em64t -lpthread -static
DPARALLEL:'-DParallel'
R_LIBS:-lmkl_lapack -lmkl_em64t -lguide -lmkl_intel_thread -pthread

Every program works good, including lapw2. However, I had to set OMP_NUM_THREADS to 1, as leaving this variable equal to the number of processors led to some unexpected segmentation fault in OpenMP libraries during lapw1. Dynamic linking also works, but one has to be careful about the versions of the libraries and the order in ld.conf. I've got a weird seg fault which was due to 32bit libraries that came first in ld.conf. We've been using it for a while already and the timing is wonderful - we've got a 2x increase in calculation speed in comparison to compiling with gfortran. 

Cheers.
Andrey.

-----Original Message-----
From: awronka at uni.lodz.pl
To: Wien at zeus.theochem.tuwien.ac.at
Date: Mon, 3 Dec 2007 23:45:12 +0100 (CET)
Subject: [Wien] MKL 10 linking

> 
>                 Dear mkl 10 Users,
> 
> I've run more tests with with mkl 10 dynamic linking and recognized that
> can realize more aggressive optimization ( "-O3 -xX" where X=T is for my
> Core 2 Duo proc and X=P for Pentium IV) for all WIEN2k progs besides
> lapw2, where "-O1 -xX" only. For more offensive optimization lapw2 crashed
> with segmentation error.
> 
> What about  new propositions for dynamic and static MKL 10 linking?
> 
> Greetengs,
> 
> Andrzej
> 
> >Dear Gerhard, please check these options - it seems to work (Centos 5, Suse
> >10.3) with mkl 10 (ifort fce 10):
> 
> O: -FR -mp1 -w -prec_div -pad -ip -DINTEL_VML -O0 -traceback
> L: $(FOPT) -L/your_mkl_10_em64t_library_path -lpthread
> R: -lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lpthread
> 
> Regards
> 
> Andrzej
> 
> 
> >Thanks for the remark,
> >I recognized that they use different linking models in particular for
> >threading.
> >This is different from older Verions.
> >Seems I have to play around a little to find a solution.
> 
> >Ciao
> >Gerhard
> 
> -----Ursprüngliche Nachricht-----
> Von: wien-bounces at zeus.theochem.tuwien.ac.at im Auftrag von
> awronka at uni.lodz.pl
> Gesendet: Sa 01.12.2007 14:56
> An: Wien at zeus.theochem.tuwien.ac.at
> Betreff: Re: [Wien] lapw1.def fail --  invalid pointer
> 
> They started a new layered model concept in mkl 10:
> http://softwarecommunity.intel.com/isn/downloads/softwareproducts/pdfs/347460.pdf
> to support a richer set of circumstances, compilers and threading in
> particular.
> They introduced the "dummy libraries" to provide backward compatibility
> (mkl 9), and changed also a general form of of specifying paths and
> libraries in the link line in comparison with mkl 9:
> 
> -L<MKL path> -I<MKL include>
> 
> [-lmkl_lapack95] [-lmkl_blas95]
> 
> [cluster components]
> 
> [-Wl,--start-group]
> 
> [{-lmkl_{intel, intel_ilp64, intel_lp64, intel_sp2dp, gf, gf_ilp64, gf_lp64}]
> 
> [-lmkl_{intel_thread, sequential}]
> 
> [{-lmkl_solver, -lmkl_solver_lp64, -lmkl_solver_ilp64}]
> 
> {{[-lmkl_lapack] -lmkl_{ia32, em64t, ipf}},
> 
> -lmkl_core}}
> 
> [-Wl,--end-group]
> 
> [{-lguide, -liomp5}] [-lpthread] [-lm]
> 
> I have tried previous (ifort fce 10, mkl 9) compilation options for mkl 10
> (CentOS5 and Suse 10.3), but it does't work for me and have the same glibc
> detected error.
> 
> Regards,
> 
> Andrzej
> 
> 
> 
> >I had several times the error lapw1.def failt or uplapw1.def failt
> >
> > A closer look revealed:
> > *** glibc detected *** /home/fecher/Fortran_Work/Wien2k/lapw1c: free():
> invalid pointer: 0x00002aaac4605010 ***
> >
> > Has anyone an idea where this error comes from ?
> > It seems also to occur with the test.case, but not in every run.
> > Is a hardware failure a possible cause ?
> >
> > System:
> > 2  Xeon 5160, 8GB RAM
> > Wien2k 07.3,
> > Red Hat 4.1.2-27, Linux version 2.6.23.1-10.fc7 #1 SMP,
> > ifort fce 10.1.008
> > mkl 10.0.011
> >
> > Ciao
> > Gerhard
> > _______________________________________________
> > Wien mailing list
> > Wien at zeus.theochem.tuwien.ac.at
> > http://zeus.theochem.tuwien.ac.at/mailman/listinfo/wien
> 
> _______________________________________________
> Wien mailing list
> Wien at zeus.theochem.tuwien.ac.at
> http://zeus.theochem.tuwien.ac.at/mailman/listinfo/wien
> 
> 
> 
> 
> --------------------------------------------------------------------------------
> 
> 
> > _______________________________________________
> > Wien mailing list
> > Wien at zeus.theochem.tuwien.ac.at
> > http://zeus.theochem.tuwien.ac.at/mailman/listinfo/wien
> >
> 
> 
> _______________________________________________
> Wien mailing list
> Wien at zeus.theochem.tuwien.ac.at
> http://zeus.theochem.tuwien.ac.at/mailman/listinfo/wien
> 


More information about the Wien mailing list