<div dir="ltr"><div><div><div><div><div><div><div><div>Dear Stefano and Paolo, <br><br></div>Thank you for your reply. I will look at ways to perturb the system and impose a phase as you suggested.<br><br></div>@ Paolo: Although your commit make sense: vkb_ (npwx, nkb) is defined as having a possible length of npwx but is assigned value only for npw < npwx. It does not work. <br></div>We call the init_us_2 routine inside EPW. I've checked that we indeed only access the npw element and not above. <br></div>I get NaN for ig==1. I believe that this issue is a compiler problem. The variable should be initialized before assigning it a value. <br></div>I'm using <br>ifort (IFORT) 15.0.3 20150407<br>Copyright (C) 1985-2015 Intel Corporation. All rights reserved.<br><br></div>If I put vkb_(:, :) = (0.d0,0.d0) at the beginning of the routine, it works for me.<br><br></div>Best, <br><br></div>Samuel <br><div><div><br><br><div><div><div><div><div><div><h3 class=""><span name="stefano de gironcoli" class=""><br></span></h3></div></div></div></div></div></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 2 November 2015 at 10:19, Paolo Giannozzi <span dir="ltr"><<a href="mailto:p.giannozzi@gmail.com" target="_blank">p.giannozzi@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><span class="">On Sun, Nov 1, 2015 at 9:39 PM, stefano de gironcoli <span dir="ltr"><<a href="mailto:degironc@sissa.it" target="_blank">degironc@sissa.it</a>></span> wrote:<br></span><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
<div text="#000000" bgcolor="#FFFFFF"><span class=""><span><blockquote type="cite">
<div dir="ltr">
<div>
<div>
<div>
<div>
In passing, while looking into that, I found a bug
PW/src/init_us_2.f90<br>
<br>
</div>
At the beginning of the routine the out variable vkb_
should be initialized<br>
vkb_(:, :) = (0.d0,0.d0)<br>
<br>
</div>
I had some NaN due to that and adding the zeroing solved it.
<br>
</div>
</div>
</div>
</blockquote></span></span>
I thought that having defined the variable INTENT(OUT) it should be
zeroed automatically but probably it is not always like that. thanks.<br></div></blockquote><div><br></div><div text="#000000" bgcolor="#FFFFFF">moreover, one should never access those array elements. Anyway: see the commit I just made<span class="HOEnZb"><font color="#888888"><br></font></span></div></div><span class="HOEnZb"><font color="#888888"><br></font></span></div><span class="HOEnZb"><font color="#888888"><div class="gmail_extra">Paolo<br clear="all"></div><div class="gmail_extra"><br>-- <br><div><div dir="ltr"><div><div dir="ltr"><span><span><font color="#888888">Paolo Giannozzi, Dept. Chemistry&Physics&Environment,<br>
Univ. Udine, via delle Scienze 208, 33100 Udine, Italy<br>
Phone <a href="tel:%2B39-0432-558216" value="+390432558216" target="_blank">+39-0432-558216</a>, fax <a href="tel:%2B39-0432-558222" value="+390432558222" target="_blank">+39-0432-558222</a></font></span></span></div></div></div></div>
</div></font></span></div>
<br>_______________________________________________<br>
Q-e-developers mailing list<br>
<a href="mailto:Q-e-developers@qe-forge.org">Q-e-developers@qe-forge.org</a><br>
<a href="http://qe-forge.org/mailman/listinfo/q-e-developers" rel="noreferrer" target="_blank">http://qe-forge.org/mailman/listinfo/q-e-developers</a><br>
<br></blockquote></div><br></div>