[Wien] Installation with MPI and GNU compilers

Laurence Marks L-marks at northwestern.edu
Wed May 2 16:26:44 CEST 2018


In fact Peter added the vector code in lapw1, although I added it to aim
and lapw5. I did the W2kinit with some help.

I suspect I probably use the -DINTEL_VML parameter in W2kinit and perhaps
aim/lapw5 a bit sloppily, and it could be generalized. For instance it
makes sense to modify the code so -DOPENBLAS or similar is set and then
have some compile time #ifdef statements.

However, this gets to be somewhat tricky as I don't have access to all
compilers (and I suspect Peter does not either).

Also, W2kinit does some important things such as setup some error handlers
and set ulimit. (If you go back a few years you will find ever third email
of the list was about ulimit issues!) Setting this for other systems can be
tricky. I think we resolved the MAC issues, but they seem to reoccur.

And...one has to worry about compatibility and portability. While Fortran
is standard, C is less so and system calls embedded in compilers can
change. Plus, gfortran is in a state of flux. When I recently tested the
mixer with it I noticed that it gave a compile time warning that DO loops
with floating point variables was a "deleted" feature. (Fortunately the
mixer still seems to work.)

On Wed, May 2, 2018 at 9:08 AM, Fecher, Gerhard <fecher at uni-mainz.de> wrote:

> Dear Pavel,
> maybe it's better to ask Laurence, seems he was writing the VML things.
>
> I didn't look into the code within the last years, what I found on a fast
> look is:
>
> The only place where the INTEL_VML is used  any longer seems to be in
> Hamilt.f of LAPW1
> I found that it is commented in all other cases where it was once used.
>
> If you don't use INTEL_VML, the INTEL ifort will vectorice the loops in
> vectf.f of LAPW1 (see code in Hamilt.f that calls it)
> (as I mentioned, maybe one has to link the libsvml explicitely)
>
> For example
> -O2 -xHost -qopt-report=1 -qopt-report-phase=vec
> will show you which loops were vectorized
>
> I could not see that the svml has a reduced accuracy, however, you can set
> the performance/accuracy level in the VML.
> What you can do is to set a threshhold for the loop size (similar to
> unroll), might need some short study of the manual.
>
> I could not see that in W2kinit.F a threshold for the loops (size of the
> arrays) was set,
> only the precision was set there for the INTEL_VML script, however,
> I guess that Laurence used it where only large arrays appeared.
>
> NB: I enjoy more questions about how to increase the speed or how to
> improve the code.
>
>
> Ciao
> Gerhard
>
> DEEP THOUGHT in D. Adams; Hitchhikers Guide to the Galaxy:
> "I think the problem, to be quite honest with you,
> is that you have never actually known what the question is."
>
> ====================================
> Dr. Gerhard H. Fecher
> Institut of Inorganic and Analytical Chemistry
> Johannes Gutenberg - University
> 55099 Mainz
> and
> Max Planck Institute for Chemical Physics of Solids
> 01187 Dresden
> ________________________________________
> Von: Pavel Ondračka [pavel.ondracka at email.cz]
> Gesendet: Mittwoch, 2. Mai 2018 12:05
> An: Fecher, Gerhard
> Betreff: Re: [Wien] Installation with MPI and GNU compilers
>
> I'm using private answer since this might be getting too technical for
> the list and in fact not interesting for majority of users...
>
> Fecher, Gerhard píše v St 02. 05. 2018 v 09:00 +0000:
> > I never checked that: does the  -DINTEL_VML switch correspond to the
> > VML library routines of MKL
> > or to the
> > SVML library routines of the compiler
>
> The lapw1 calls directly the VML library, for example the vdcos, vdsin
> functions, but I have not checked the rest of Wien2k.
>
> > this makes a difference, the svml routines are automatically invoked
> > by the INTEL compiler if one uses -O2 optimization or higher.
> > (check also the usage of the switches -vec, -no-vec, -vec-report)
> >
> > The VML routines of the MKL make only sense for appropriate sizes of
> > the vectors, otherwise, they may even slow down the program (how much
> > might also depend on threads etc.).
>
> The common usage of the VML in Wien2k is to call the VML functions with
>  a _large_ array as an argument. So if I understand it correctly the
> vectorization is done inside the VML and the VML chooses the best
> intrinsic. Since the arrays are large, there is a speedup in all cases.
>
> BTW are you sure the -O2 switch alone will give you the svml
> intrinsic? IMO the svml intrinsic have different accuracy (might not be
> strictly IEEE compliant as compared to the scalar variants) so I would
> expect you need to specify it explicitly with some additional flag that
> you are OK with this (e.g. for GCC you need the -ffast-math switch to
> get the vectorized sse,avx goniometric fuctions from the libmvec).
>
> > A note (for the INTEL Fortran):
> > I vaguely remember that the -DINTEL_VML switch did not bring any
> > better performance, at that time one needed to give the -lsvml (with
> > path to the compiler libs) explicitely.
> >
> > Ciao
> > Gerhard
> >
> Best regards
> Pavel
> _______________________________________________
> Wien mailing list
> Wien at zeus.theochem.tuwien.ac.at
> https://urldefense.proofpoint.com/v2/url?u=http-3A__zeus.
> theochem.tuwien.ac.at_mailman_listinfo_wien&d=DwIFBA&c=
> yHlS04HhBraes5BQ9ueu5zKhE7rtNXt_d012z2PA6ws&r=U_
> T4PL6jwANfAy4rnxTj8IUxm818jnvqKFdqWLwmqg0&m=wmyY1dhGbwZI3oD02dwXOGa_s3afe_
> LJdSea-dHnBZg&s=yKwJ1eDMhXNnx8lfTdFJzKZ2ky182xvw_qemg_Hap8c&e=
> SEARCH the MAILING-LIST at:  https://urldefense.proofpoint.
> com/v2/url?u=http-3A__www.mail-2Darchive.com_wien-
> 40zeus.theochem.tuwien.ac.at_index.html&d=DwIFBA&c=
> yHlS04HhBraes5BQ9ueu5zKhE7rtNXt_d012z2PA6ws&r=U_
> T4PL6jwANfAy4rnxTj8IUxm818jnvqKFdqWLwmqg0&m=wmyY1dhGbwZI3oD02dwXOGa_s3afe_
> LJdSea-dHnBZg&s=9-0hCMIR1GVVfXz3pmjs9JR2Su5gfqttq9X1dt11Rn8&e=
>



-- 
Professor Laurence Marks
"Research is to see what everybody else has seen, and to think what nobody
else has thought", Albert Szent-Gyorgi
www.numis.northwestern.edu ; Corrosion in 4D: MURI4D.numis.northwestern.edu
Partner of the CFW 100% program for gender equity, www.cfw.org/100-percent
Co-Editor, Acta Cryst A
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://zeus.theochem.tuwien.ac.at/pipermail/wien/attachments/20180502/33dac357/attachment.html>


More information about the Wien mailing list