<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1250">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p>Dear Max,</p>
<p><br>
</p>
<p>Actually there was a more serious bug than I thought. It is related to the internal poor-man bands parallelization, and this bug appears when 
<span>nproc_pool>nbnd</span> (i.e. for a specific combination of the number of cores, number of k point pools, and number of bands).</p>
<p><br>
</p>
<p>I have made a merge request with the fix on Gitlab, and here is the link for the two modified routines that you can put in PW/src and recompile the code. Please let us know if there are still problems.</p>
<p><a href="https://drive.google.com/drive/folders/1ORTA5kILqvqBuWpl0CQYdeX8vv0CTF4L?usp=sharing" class="OWAAutoLink" id="LPlnk332407" previewremoved="true">https://drive.google.com/drive/folders/1ORTA5kILqvqBuWpl0CQYdeX8vv0CTF4L?usp=sharing</a></p>
<p><br>
</p>
<p>Many thanks to Paolo for explaining to me how the poor-man bands parallelization works!</p>
<p><br>
</p>
<p>Greetings,</p>
<p>Iurii<br>
</p>
<p><br>
</p>
<div id="Signature">
<div id="divtagdefaultwrapper" dir="ltr" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, "EmojiFont", "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;">
<div name="divtagdefaultwrapper" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:; margin:0">
<div name="divtagdefaultwrapper" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:; margin:0">
<font size="3" face="'Times New Roman', Times, serif" color="808080">--<br>
Dr. Iurii TIMROV<br>
Postdoctoral Researcher<br>
<font color="808080"><font face="'Times New Roman', Times, serif"></font></font></font></div>
<font color="808080"></font>
<div name="divtagdefaultwrapper" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:; margin:0">
<font size="3" face="'Times New Roman', Times, serif" color="808080">STI - IMX <font color="808080">
<font face="'Times New Roman', Times, serif">- THEOS</font></font></font><font size="3" face="'Times New Roman', Times, serif" color="808080"> and NCCR - MARVEL<br>
</font></div>
<div name="divtagdefaultwrapper" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:; margin:0">
<font size="3" face="'Times New Roman', Times, serif" color="808080"><font size="3" face="'Times New Roman', Times, serif" color="808080">Swiss Federal Institute of Technology Lausanne (EPFL<font color="808080"><font face="'Times New Roman', Times, serif">)</font></font></font><br>
</font></div>
<font color="808080"></font>
<div name="divtagdefaultwrapper" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:; margin:0">
<font size="3" face="'Times New Roman', Times, serif" color="808080">CH-1015 Lausanne, Switzerland<br>
+41 21 69 34 881</font></div>
<div name="divtagdefaultwrapper" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:; margin:0">
<a href="http://people.epfl.ch/265334" tabindex="0" id="LPNoLP">http://people.epfl.ch/265334</a><br>
</div>
</div>
</div>
</div>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> developers <developers-bounces@lists.quantum-espresso.org> on behalf of Max Amsler <amsler.max@gmail.com><br>
<b>Sent:</b> Friday, August 14, 2020 2:31:00 PM<br>
<b>To:</b> General discussion list for Quantum ESPRESSO developers<br>
<b>Subject:</b> Re: [QE-developers] Bug for U_projection_type = 'ortho-atomic'</font>
<div> </div>
</div>
<div>Thanks Iurii,
<div class="">I recompiled with your recommended changes, but it the run no just hangs after reaching self consistency without reporting any error messages. Any idea what the reason could be?</div>
<div class=""><br class="">
</div>
<div class="">Best</div>
<div class="">Max<br class="">
<div class="">
<div><br class="">
<blockquote type="cite" class="">
<div class="">On 14 Aug 2020, at 11:00, Timrov Iurii <<a href="mailto:iurii.timrov@epfl.ch" class="">iurii.timrov@epfl.ch</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div dir="ltr" style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">
<div id="x_divtagdefaultwrapper" dir="ltr" style="font-size: 12pt; font-family: Calibri, Helvetica, sans-serif;" class="">
<div style="margin-top: 0px; margin-bottom: 0px;" class="">Dear Max,</div>
<div style="margin-top: 0px; margin-bottom: 0px;" class=""><br class="">
</div>
<div style="margin-top: 0px; margin-bottom: 0px;" class="">Thank you for reporting the bug! It is easy to fix it, in PW/src/force_hub.f90, on line 438 replace</div>
<div style="margin-top: 0px; margin-bottom: 0px;" class=""><span class="">IF (okvan) DEALLOCATE (dproj_us)</span></div>
<div style="margin-top: 0px; margin-bottom: 0px;" class="">by</div>
<div style="margin-top: 0px; margin-bottom: 0px;" class=""><span class="">IF (ALLOCATED(<span class="">dproj_us</span>))</span><span class="Apple-converted-space"> </span><span class="">DEALLOCATE (dproj_us)</span></div>
<div style="margin-top: 0px; margin-bottom: 0px;" class=""><span class=""><br class="">
</span></div>
<div style="margin-top: 0px; margin-bottom: 0px;" class=""><span class="">Another solution is to move</span></div>
<div style="margin-top: 0px; margin-bottom: 0px;" class=""><span class=""></span><span class="">IF (okvan) DEALLOCATE (dproj_us)</span></div>
<div style="margin-top: 0px; margin-bottom: 0px;" class="">before line 436</div>
<div style="margin-top: 0px; margin-bottom: 0px;" class=""><br class="">
</div>
<div style="margin-top: 0px; margin-bottom: 0px;" class=""><font size="2" class=""><span style="font-size: 10pt;" class="">> starting_magnetization(1) = 5.</span></font><br class="">
</div>
<div style="margin-top: 0px; margin-bottom: 0px;" class=""><br class="">
</div>
<div style="margin-top: 0px; margin-bottom: 0px;" class="">BTW, starting_magnetization should be in the range from -1 to +1.</div>
<div style="margin-top: 0px; margin-bottom: 0px;" class=""><br class="">
</div>
<div style="margin-top: 0px; margin-bottom: 0px;" class="">Greetings,</div>
<div style="margin-top: 0px; margin-bottom: 0px;" class="">Iurii<br class="">
</div>
<div style="margin-top: 0px; margin-bottom: 0px;" class=""><br class="">
</div>
<div id="x_Signature" class="">
<div id="x_divtagdefaultwrapper" dir="ltr" style="font-size: 12pt; font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" class="">
<div name="x_divtagdefaultwrapper" style="font-family: Calibri, Arial, Helvetica, sans-serif; margin: 0px;" class="">
<div name="x_divtagdefaultwrapper" style="font-family: Calibri, Arial, Helvetica, sans-serif; margin: 0px;" class="">
<font size="3" face="'Times New Roman', Times, serif" color="808080" class="">--<br class="">
Dr. Iurii Timrov<br class="">
Postdoctoral Researcher<br class="">
<font color="808080" class=""><font face="'Times New Roman', Times, serif" class=""></font></font></font></div>
<font color="808080" class=""></font>
<div name="x_divtagdefaultwrapper" style="font-family: Calibri, Arial, Helvetica, sans-serif; margin: 0px;" class="">
<font size="3" face="'Times New Roman', Times, serif" color="808080" class="">STI - IMX<span class="Apple-converted-space"> </span><font color="808080" class=""><font face="'Times New Roman', Times, serif" class="">- THEOS</font></font></font><font size="3" face="'Times New Roman', Times, serif" color="808080" class=""><span class="Apple-converted-space"> </span>and
 NCCR - MARVEL<br class="">
</font></div>
<div name="x_divtagdefaultwrapper" style="font-family: Calibri, Arial, Helvetica, sans-serif; margin: 0px;" class="">
<font size="3" face="'Times New Roman', Times, serif" color="808080" class=""><font size="3" face="'Times New Roman', Times, serif" color="808080" class="">Swiss Federal Institute of Technology Lausanne (EPFL<font color="808080" class=""><font face="'Times New Roman', Times, serif" class="">)</font></font></font><br class="">
</font></div>
<font color="808080" class=""></font>
<div name="x_divtagdefaultwrapper" style="font-family: Calibri, Arial, Helvetica, sans-serif; margin: 0px;" class="">
<font size="3" face="'Times New Roman', Times, serif" color="808080" class="">CH-1015 Lausanne, Switzerland<br class="">
+41 21 69 34 881</font></div>
<div name="x_divtagdefaultwrapper" style="font-family: Calibri, Arial, Helvetica, sans-serif; margin: 0px;" class="">
<a href="http://people.epfl.ch/265334" tabindex="0" id="LPNoLP" class="">http://people.epfl.ch/265334</a><br class="">
</div>
</div>
</div>
</div>
</div>
<hr tabindex="-1" style="display: inline-block; width: 799.671875px;" class="">
<div id="x_divRplyFwdMsg" dir="ltr" class=""><font face="Calibri, sans-serif" style="font-size: 11pt;" class=""><b class="">From:</b><span class="Apple-converted-space"> </span>developers <<a href="mailto:developers-bounces@lists.quantum-espresso.org" class="">developers-bounces@lists.quantum-espresso.org</a>>
 on behalf of Max Amsler <<a href="mailto:amsler.max@gmail.com" class="">amsler.max@gmail.com</a>><br class="">
<b class="">Sent:</b><span class="Apple-converted-space"> </span>Friday, August 14, 2020 9:04:27 AM<br class="">
<b class="">To:</b><span class="Apple-converted-space"> </span>General discussion list for Quantum ESPRESSO developers<br class="">
<b class="">Subject:</b><span class="Apple-converted-space"> </span>[QE-developers] Bug for U_projection_type = 'ortho-atomic'</font>
<div class=""> </div>
</div>
</div>
<font size="2" style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="font-size: 10pt;" class="">
<div class="PlainText">Dear all,<br class="">
I have been trying to run a vc-relaxation with version 6.6 of QE, using the newly implemented U_projection_type = 'ortho-atomic’. After the SCF has converged and the forces on the atoms are about to be computed, pw.x crashes with an error complaining that an
 array is not being allocated:<br class="">
<br class="">
forrtl: severe (153): allocatable array or pointer is not allocated<br class="">
Image              PC                Routine            Line        Source            <span class="Apple-converted-space"> </span><br class="">
pw.x               0000000000EA50B4  Unknown               Unknown  Unknown<br class="">
pw.x               0000000000757C94  dndtau_k_                 438  force_hub.f90<br class="">
pw.x               000000000074B521  force_hub_                160  force_hub.f90<br class="">
pw.x               00000000004C92ED  forces_                   116  forces.f90<br class="">
pw.x               00000000005CCE5C  run_pwscf_                172  run_pwscf.f90<br class="">
pw.x               000000000041005D  MAIN__                    106  pwscf.f90<br class="">
pw.x               000000000040FE92  Unknown               Unknown  Unknown<br class="">
libc-2.26.so       00002AAAB2F60F8A  __libc_start_main     Unknown  Unknown<br class="">
pw.x               000000000040FDAA  Unknown               Unknown  Unknown<br class="">
<br class="">
pw.x was compiled on daint at CSCS, with the intel compiler version 19.0.1.144.<br class="">
<br class="">
Running on 144 cores with -nk 4.<br class="">
<br class="">
The input file is as follows:<br class="">
<br class="">
————————————————————————<span class="Apple-converted-space"> </span><br class="">
 &control<br class="">
    calculation='vc-relax'<br class="">
    restart_mode='from_scratch',<br class="">
    pseudo_dir = './',<br class="">
    outdir='./',<br class="">
    prefix='CrO2',<br class="">
    nstep=100,<br class="">
    disk_io='low',<br class="">
    max_seconds=79200<br class="">
    forc_conv_thr = 1.d-5<br class="">
    etot_conv_thr = 1.d-5<br class="">
 /<br class="">
 &system<br class="">
U_projection_type = 'ortho-atomic'<br class="">
    nspin = 2<br class="">
    starting_magnetization(1) = 5.<br class="">
    starting_magnetization(2) = 0.<br class="">
    ibrav= 0,<span class="Apple-converted-space"> </span><br class="">
    nat=  6,<span class="Apple-converted-space"> </span><br class="">
    ntyp = 2<br class="">
    nosym=.false.<br class="">
    ecutwfc  =  100.0 ,<br class="">
    ecutrho  = 1200.0 ,<br class="">
    occupations  =  'smearing' ,<br class="">
    smearing  =  'gaussian' ,<br class="">
    degauss  =  0.01 ,<br class="">
    lda_plus_u=.true.<br class="">
    lda_plus_u_kind     = 0,<br class="">
    Hubbard_U(1) = 6.5022<br class="">
 /<br class="">
 &electrons<br class="">
    conv_thr =  1.0d-12,<br class="">
    mixing_beta = 0.4,<br class="">
 /<br class="">
 &ions<br class="">
 /<br class="">
 &cell<br class="">
 press_conv_thr = 0.1<br class="">
 /<br class="">
ATOMIC_SPECIES<br class="">
Cr0 51.9961 Cr.pbe-spn-rrkjus_psl.1.0.0.UPF<br class="">
O  15.99   O.pbe-n-rrkjus_psl.1.0.0.UPF<br class="">
K_POINTS automatic<br class="">
   8 8 12         0    0    0<br class="">
CELL_PARAMETERS (angstrom)<br class="">
   4.515875669   0.000000000   0.000000000<br class="">
   0.000000000   4.515868266   0.000000000<br class="">
   0.000000000   0.000000000   3.010520517<br class="">
<br class="">
ATOMIC_POSITIONS (crystal)<br class="">
Cr0 0.0000000000 0.0000000000 0.0000000000<br class="">
Cr0 0.5000000000 0.5000000000 0.5000000000<br class="">
O 0.3038809317 0.3038796501 0.0000000000<br class="">
O 0.8038809317 0.1961203369 0.5000000000<br class="">
O 0.6961190683 0.6961203499 0.0000000000<br class="">
O 0.1961190683 0.8038796501 0.5000000000<br class="">
————————————————————————<span class="Apple-converted-space"> </span><br class="">
<br class="">
_______________________________________________<br class="">
developers mailing list<br class="">
<a href="mailto:developers@lists.quantum-espresso.org" class="">developers@lists.quantum-espresso.org</a><br class="">
<a href="https://lists.quantum-espresso.org/mailman/listinfo/developers" class="">https://lists.quantum-espresso.org/mailman/listinfo/developers</a><br class="">
</div>
</span></font><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">_______________________________________________</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">
<span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">developers
 mailing list</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">
<a href="mailto:developers@lists.quantum-espresso.org" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">developers@lists.quantum-espresso.org</a><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">
<a href="https://lists.quantum-espresso.org/mailman/listinfo/developers" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">https://lists.quantum-espresso.org/mailman/listinfo/developers</a></div>
</blockquote>
</div>
<br class="">
</div>
</div>
</div>
</body>
</html>