<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">You are all right, the third dimension of becsum can have size 4 even if nspin_mag is equal 1. Thanks Vittorio to spot this problem!<div><br></div><div>I do not think the GPU version of addusdens is affected by that because both nspin and nspin_mag are used apparently in the proper way. I will double-check.<div><br></div><div>F</div><div><br></div><div><br><div><div>On Jun 10, 2013, at 4:01 PM, Andrea Dal Corso <<a href="mailto:dalcorso@sissa.it">dalcorso@sissa.it</a>> wrote:</div><blockquote type="cite"><br>On Mon, 2013-06-10 at 15:38 +0800, Filippo Spiga wrote:<br><blockquote type="cite">Dear Vittorio,<br><br>On Jun 10, 2013, at 2:47 PM, Vittorio Zecca <<a href="mailto:zeccav@gmail.com">zeccav@gmail.com</a>> wrote:<br><blockquote type="cite">In addusdens.f90 line 104 there is a shape mismatch because tbecsum<br>has one element,<br>while becsum has four.<br></blockquote><br><br>'tbecsum' is a one-dimentional array created to 'store' values of<br>'becsum' varying 'nspin_mag' (latest dimension of a three-dimensional<br>array). It can have only one or two or four elements (it depends by<br>the input case, see modules/noncol.f90). I said that 'becsum' is<br>a three-dimensional array because inside the routine 'addusdens_g' the<br>array 'becsum' comes from USPP (Modules/uspp.f90). If you look at the<br>file you will see at line 136-137 that 'becsum' is defined as …<br><br><br>  REAL(DP), ALLOCATABLE :: &<br>       becsum(:,:,:)           ! \sum_i f(i) <psi(i)|beta_l><beta_m|<br>psi(i)><br><br><br>Dimensions across these arrays seems consistent to me. Searching<br>across the source code I can find some four-dimensional "becsum"-like<br>arrays but they also have different names…<br><br><br>Carlo? Paolo? Anything to add?<br></blockquote><br>It seems to me that Vittorio is right, tbecsum should be declared nspin,<br>otherwise in the case in which nspin_mag=1 and nspin=4 you are copying 4<br>elements of becsum in an array with one element. <br>In allocate_nlpot becsum is declared nspin.<br>Maybe some compilers do not note the problem (so far I had not noticed<br>it) because you use only one element of tbecsum, but I think it is not<br>correct fortran.<br><br>Andrea<br><br><blockquote type="cite"><br><br>Regards,<br>Filippo<br><br>--<br>Mr. Filippo SPIGA, M.Sc.<br><a href="http://www.linkedin.com/in/filippospiga">http://www.linkedin.com/in/filippospiga</a> ~ skype: filippo.spiga<br><br>«Nobody will drive us out of Cantor's paradise.» ~ David Hilbert<br><br><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>http://qe-forge.org/mailman/listinfo/q-e-developers<br></blockquote>-- <br>Andrea Dal Corso                    Tel. 0039-040-3787428<br>SISSA, Via Bonomea 265              Fax. 0039-040-3787249<br>I-34136 Trieste (Italy)             e-mail: <a href="mailto:dalcorso@sissa.it">dalcorso@sissa.it</a><br><br><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>http://qe-forge.org/mailman/listinfo/q-e-developers<br></blockquote></div><br><div>
<div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; orphans: 2; text-align: -webkit-auto; text-indent: 0px; widows: 2; border-spacing: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; orphans: 2; text-align: -webkit-auto; text-indent: 0px; widows: 2; border-spacing: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; orphans: 2; text-align: -webkit-auto; text-indent: 0px; widows: 2; border-spacing: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; orphans: 2; text-indent: 0px; widows: 2; border-spacing: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; orphans: 2; text-indent: 0px; widows: 2; border-spacing: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; orphans: 2; text-indent: 0px; widows: 2; border-spacing: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; orphans: 2; text-indent: 0px; widows: 2; border-spacing: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; orphans: 2; text-indent: 0px; widows: 2; border-spacing: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; orphans: 2; text-indent: 0px; widows: 2; border-spacing: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; orphans: 2; text-indent: 0px; widows: 2; border-spacing: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; orphans: 2; text-indent: 0px; widows: 2; border-spacing: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; orphans: 2; text-indent: 0px; widows: 2; border-spacing: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; orphans: 2; text-indent: 0px; widows: 2; border-spacing: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">--<br>Mr. Filippo SPIGA, M.Sc.</div><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><a href="http://www.linkedin.com/in/filippospiga" style="font-family: Arial; ">http://www.linkedin.com/in/filippospiga</a> ~ skype: filippo.spiga<br><br>«Nobody will drive us out of Cantor's paradise.» ~ David Hilbert</div></span></div></span></div></span></div></span></div></span></div></span></div></span></div></span></div></span></div></span></div></span></div></span></div></span></div></span></div></div></div></div></div>
</div>
<br></div></div></body></html>