1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<!--Converted with LaTeX2HTML 2019.2 (Released June 5, 2019) -->
<HTML lang="EN">
<HEAD>
<TITLE>5 Parallelism</TITLE>
<META NAME="description" CONTENT="5 Parallelism">
<META NAME="keywords" CONTENT="user_guide">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
<META NAME="viewport" CONTENT="width=device-width, initial-scale=1.0">
<META NAME="Generator" CONTENT="LaTeX2HTML v2019.2">
<LINK REL="STYLESHEET" HREF="user_guide.css">
<LINK REL="next" HREF="node17.html">
<LINK REL="previous" HREF="node6.html">
<LINK REL="next" HREF="node17.html">
</HEAD>
<BODY >
<!--Navigation Panel-->
<A
HREF="node17.html">
<IMG WIDTH="37" HEIGHT="24" ALT="next" SRC="next.png"></A>
<A
HREF="user_guide.html">
<IMG WIDTH="26" HEIGHT="24" ALT="up" SRC="up.png"></A>
<A
HREF="node15.html">
<IMG WIDTH="63" HEIGHT="24" ALT="previous" SRC="prev.png"></A>
<A ID="tex2html85"
HREF="node1.html">
<IMG WIDTH="65" HEIGHT="24" ALT="contents" SRC="contents.png"></A>
<BR>
<B> Next:</B> <A
HREF="node17.html">6 Troubleshooting</A>
<B> Up:</B> <A
HREF="user_guide.html">User's Guide for the</A>
<B> Previous:</B> <A
HREF="node15.html">4.9 Calculation of phonon-renormalization</A>
<B> <A ID="tex2html86"
HREF="node1.html">Contents</A></B>
<BR>
<BR>
<!--End of Navigation Panel-->
<H1><A ID="SECTION00060000000000000000"></A>
<A ID="Sec:para"></A>
<BR>
5 Parallelism
</H1>
<P>
We refer to the corresponding section of the <TT>PWscf</TT> guide for
an explanation of how parallelism works.
<P>
<TT>ph.x</TT> may take advantage of MPI parallelization on images, plane waves (PW)
and on <B>k</B>-points (``pools''). Currently all other MPI and explicit
OpenMP parallelizations have very limited to nonexistent implementation.
<TT>phcg.x</TT> implements only PW parallelization.
All other codes may be launched in parallel, but will execute
on a single processor.
<P>
In ``image'' parallelization, processors can be divided into different
``images", corresponding to one (or more than one) ``irrep'' or <B>q</B>
vectors. Images are loosely coupled: processors communicate
between different images only once in a while, so image parallelization
is suitable for cheap communication hardware (e.g. Gigabit Ethernet).
Image parallelization is activated by specifying the option
<TT>-nimage N</TT> to <TT>ph.x</TT>. Inside an image, PW and <B>k</B>-point
parallelization can be performed: for instance,
<PRE>
mpirun -np 64 ph.x -ni 8 -nk 2 ...
</PRE>
will run 8 images on 8 processors each, subdivided into 2 pools
of 4 processors for <B>k</B>-point parallelization. In order
to run the <TT>ph.x</TT> code with these flags the <TT>pw.x</TT> run has to be run with:
<PRE>
mpirun -np 8 pw.x -nk 2 ...
</PRE>
without any <TT>-nimage</TT> flag.
After the phonon calculation with images the dynmical matrices of
<B>q</B>-vectors calculated in different images are not present in the
working directory. To obtain them you need to run
<TT>ph.x</TT> again with:
<PRE>
mpirun -np 8 ph.x -nk 2 ...
</PRE>
and the <TT>recover=.true.</TT> flag. This scheme is quite automatic and
does not require any additional work by the user, but it wastes some
CPU time because all images stops when the image that requires the
largest amount of time finishes the calculation. Load balancing
between images is still at
an experimental stage. You can look into the routine <TT>image_q_irr</TT>
inside <TT>PHonon/PH/check_initial_status</TT> to see the present
algorithm for work distribution and modify it if you think that
you can improve the load balancing.
<P>
A different paradigm is the usage of the GRID concept, instead of MPI,
to achieve parallelization over irreps and <B>q</B> vectors.
Complete phonon dispersion calculation can be quite long and
expensive, but it can be split into a number of semi-independent
calculations, using options <TT>start_q</TT>, <TT>last_q</TT>,
<TT>start_irr</TT>, <TT>last_irr</TT>. An example on how to
distribute the calculations and collect the results can be found
in <TT>examples/GRID_example</TT>. Reference:
<BR><I>Calculation of Phonon Dispersions on the GRID using Quantum
ESPRESSO</I>,
R. di Meo, A. Dal Corso, P. Giannozzi, and S. Cozzini, in
<I>Chemistry and Material Science Applications on Grid Infrastructures</I>,
editors: S. Cozzini, A. Laganà , ICTP Lecture Notes Series,
Vol. 24, pp.165-183 (2009).
<P>
<HR>
<!--Navigation Panel-->
<A
HREF="node17.html">
<IMG WIDTH="37" HEIGHT="24" ALT="next" SRC="next.png"></A>
<A
HREF="user_guide.html">
<IMG WIDTH="26" HEIGHT="24" ALT="up" SRC="up.png"></A>
<A
HREF="node15.html">
<IMG WIDTH="63" HEIGHT="24" ALT="previous" SRC="prev.png"></A>
<A ID="tex2html85"
HREF="node1.html">
<IMG WIDTH="65" HEIGHT="24" ALT="contents" SRC="contents.png"></A>
<BR>
<B> Next:</B> <A
HREF="node17.html">6 Troubleshooting</A>
<B> Up:</B> <A
HREF="user_guide.html">User's Guide for the</A>
<B> Previous:</B> <A
HREF="node15.html">4.9 Calculation of phonon-renormalization</A>
<B> <A ID="tex2html86"
HREF="node1.html">Contents</A></B>
<!--End of Navigation Panel-->
</BODY>
</HTML>
|