<div dir="ltr"><div dir="ltr"><br></div><div dir="ltr">You are very right. As a quick fix, just remove the protection against zero-size allocations: I don't think it serves any purpose any longer<br></div><div dir="ltr"><br></div><div>Paolo<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Sep 24, 2021 at 10:16 AM Lothar Brendel <<a href="mailto:lothar.brendel@uni-due.de">lothar.brendel@uni-due.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Dear espressoers,<br>
<br>
I'm pretty sure to have found an inconsistency regarding the treatment <br>
of the case of zero wavefunctions in a PP file (nwfc = 0):<br>
<br>
In upflib/read_upf_v1.f90:subroutine read_pseudo_pswfc(), the allocation <br>
of the chi array is protected against the zero case:<br>
<br>
ALLOCATE( upf%chi( upf%mesh, MAX( upf%nwfc, 1 ) ) )<br>
<br>
But for the MPI slave ranks in Modules/read_pseudo.f90:SUBROUTINE <br>
upf_bcast(), it is *not*:<br>
<br>
ALLOCATE( upf%chi(upf%mesh,upf%nwfc) )<br>
<br>
<br>
Hence, when subsequently broadcasting the array, the slave ranks are <br>
receiving the data into a zero sized array.<br>
<br>
<br>
Kind regards<br>
Lothar Brendel<br>
<br>
_______________________________________________<br>
developers mailing list<br>
<a href="mailto:developers@lists.quantum-espresso.org" target="_blank">developers@lists.quantum-espresso.org</a><br>
<a href="https://lists.quantum-espresso.org/mailman/listinfo/developers" rel="noreferrer" target="_blank">https://lists.quantum-espresso.org/mailman/listinfo/developers</a><br>
</blockquote></div><br clear="all"><br>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>Paolo Giannozzi, Dip. Scienze Matematiche Informatiche e Fisiche,<br>Univ. Udine, via delle Scienze 206, 33100 Udine, Italy<br>Phone +39-0432-558216, fax +39-0432-558222<br><br></div></div></div></div></div></div>