<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from text --><style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<meta content="text/html; charset=UTF-8">
<style type="text/css" style="">
<!--
p
        {margin-top:0;
        margin-bottom:0}
-->
</style>
<div dir="ltr">
<div id="x_divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:#000000; font-family:Calibri,Arial,Helvetica,sans-serif">
<p>Hi Lorenzo, </p>
<p><br>
</p>
<p>    In your last email you mentioned the field 'pdir', I have not been able to find this in the documentation, is this what you meant? I have been using QE 6.0 source downloaded from the QE website.. It looks like the kstrings generation is hardcoded in
 one direction:</p>
<p><br>
</p>
<p></p>
<div>!  --- Find vector between consecutive points in strings ---<br>
   dk(1)=xk(1,2)-xk(1,1)<br>
   dk(2)=xk(2,2)-xk(2,1) <br>
   dk(3)=xk(3,2)-xk(3,1)<br>
   dkmod=SQRT(dk(1)**2+dk(2)**2+dk(3)**2)*tpiba<br>
   IF (ABS(dkmod-gvec/(nppstr-1)) > eps) & <br>
     CALL errore('c_phase','Wrong k-strings? ln 364',1)</div>
<p></p>
<p><br>
</p>
<p>as this is where the error is when I use other than gdir=3 (I added ln 364 to identify what fails exactly)<br>
</p>
<p><br>
</p>
<p>Thanks for the assistance!</p>
<p>Kindest regards,</p>
<p>Louis<br>
</p>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> pw_forum-bounces@pwscf.org <pw_forum-bounces@pwscf.org> on behalf of Lorenzo Paulatto <lorenzo.paulatto@impmc.upmc.fr><br>
<b>Sent:</b> 08 February 2017 08:55:32<br>
<b>To:</b> PWSCF Forum<br>
<b>Subject:</b> Re: [Pw_forum] PW.x homogeneous electric field berry phase calculation in trigonal cell</font>
<div> </div>
</div>
</div>
<font size="2"><span style="font-size:10pt;">
<div class="PlainText">On Tuesday, February 7, 2017 6:47:18 PM CET Louis Fry-Bouriaux wrote:<br>
>     Interesting, I will try that, I will add that I tried the calculation<br>
> with lelfield=.true. and all efield_cart values to zero and it gives me the<br>
> same error. I also reduced the number of auto k points to speed up testing<br>
> (auto: 6 2 2 0 0 0/ nppstr=6, which takes ~160s). I may take a look at the<br>
> code maybe there is something that can be done if I identify what is going<br>
> on :/<br>
<br>
Hello,<br>
I managed to find the original emails from 2012 about the issue; it used to be <br>
much worst but Paolo Giannozzi wrote a quick fix that does make the issue much <br>
lighter. <br>
<br>
Still. the case gdir=3 (or pdir=3, if you are doing polarization) is much <br>
faster than the other cases, and there is not easy solution. The reason is <br>
that the code needs to build planes of G-vectors that are orthogonal to the <br>
direction of the k-points string. <br>
<br>
The bottleneck is a single call:<br>
CALL mp_sum(aux_g(:), intra_bgrp_comm )<br>
which collects a wavefunctions over all the CPUs.<br>
<br>
This call becomes slower and slower when more CPUs are involved. It used to be <br>
unbearably slow, now it is just slow. <br>
<br>
There is no obvious solution, as the parallelisation is hard-coded along the z <br>
direction. Try to stick to gdir=3 if you can.<br>
<br>
hth<br>
<br>
-- <br>
Dr. Lorenzo Paulatto<br>
IdR @ IMPMC -- CNRS & Université Paris 6<br>
+33 (0)1 44 275 084 / skype: paulatz<br>
<a href="http://www.impmc.upmc.fr/~paulatto/">http://www.impmc.upmc.fr/~paulatto/</a><br>
23-24/4é16 Boîte courrier 115, <br>
4 place Jussieu 75252 Paris Cédex 05<br>
<br>
_______________________________________________<br>
Pw_forum mailing list<br>
Pw_forum@pwscf.org<br>
<a href="http://pwscf.org/mailman/listinfo/pw_forum">http://pwscf.org/mailman/listinfo/pw_forum</a><br>
</div>
</span></font>
</body>
</html>