<div dir="ltr"><div><div><div>Hi Vahid,<br></div>segfault in mp_sum doesn't necessarily mean a problem there. Probably you wrote something to output array but not in a valid place before mp_sum.<br></div>Try to check your allocation of output and the copy make sure they are correct.<br><br></div>Ye<br><div><div><br></div></div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">===================<br>
Ye Luo, Ph.D.<br>
Leadership Computing Facility<br>
Argonne National Laboratory</div></div></div>
<br><div class="gmail_quote">2016-10-28 14:33 GMT-05:00 Vahid Askarpour <span dir="ltr"><<a href="mailto:vh261281@dal.ca" target="_blank">vh261281@dal.ca</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word">
<div>Hi Ye,</div>
<div><br>
</div>
<div>Thank you for your suggestion. I tried it and when I ran the code, it seg-faulted. I put flags in the code to see where the segmentation faults occurs. It happens as the code calls mp_sum. It seems that mp_sum may not</div>
<div>be able to handle this reduction.</div>
<div><br>
</div>
<div>Cheers,</div>
<div>Vahid</div><div><div class="h5">
<br>
<div>
<blockquote type="cite">
<div>On Oct 28, 2016, at 2:51 PM, Ye Luo <<a href="mailto:xw111luoye@gmail.com" target="_blank">xw111luoye@gmail.com</a>> wrote:</div>
<br class="m_2808508241249506849Apple-interchange-newline">
<div>
<div dir="ltr">
<div>
<div>In Fortran, whatever-D array is 1-D array. mp_sum should be fine.<br>
</div>
I saw something strange in your code that you were not copying the right things as you expected.<br>
How about the following?<br>
output(1:3,1:nbnds,(k_pool*<wbr>pool_id+1:k_pool*pool_id+k_<wbr>pool))=input(1:3,1:nbnds,1:k_<wbr>pool)<br>
</div>
<br>
Ye<br>
<div>
<div class="gmail_extra"><br clear="all">
<div>
<div class="m_2808508241249506849gmail_signature" data-smartmail="gmail_signature">
<div dir="ltr">===================<br>
Ye Luo, Ph.D.<br>
Leadership Computing Facility<br>
Argonne National Laboratory</div>
</div>
</div>
<br>
<div class="gmail_quote">2016-10-28 12:29 GMT-05:00 Vahid Askarpour <span dir="ltr">
<<a href="mailto:vh261281@dal.ca" target="_blank">vh261281@dal.ca</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Dear QE Users,<br>
<br>
I am working on some modifications to the QE-6.0 code using symmetry. When I try to combine a 3-D array scattered across nodes, I use the following:<br>
<br>
output(3,nbnds,(k_pool*pool_id<wbr>+1:k_pool*pool_id+k_pool))=inp<wbr>ut(3,nbnds,1:k_pool)<br>
<br>
Here, nbnds is the number of bands, k_pool is the number of k points/pool, and pool_id is the id of the pool. Here I am assuming the the number of k points is divisible by the number of pools.<br>
<br>
Then I call mp_sum(output,inter_pool_comm) to put all the segments of input across the nodesĀ into one output file.<br>
<br>
When I run the modified QE code in parallel, the output file is different from the serial run.<br>
<br>
Does the QE's mp_sum allow the above operation for a three-D array?<br>
<br>
Any hints or suggestions would be greatly appreciated.<br>
<br>
Vahid<br>
<span class="m_2808508241249506849HOEnZb"><font color="#888888"><br>
Vahid Askarpour<br>
Department of Physics and Atmospheric Science<br>
Dalhousie University,<br>
Halifax, NS, Canada<br>
______________________________<wbr>_________________<br>
Pw_forum mailing list<br>
<a href="mailto:Pw_forum@pwscf.org" target="_blank">Pw_forum@pwscf.org</a><br>
<a href="http://pwscf.org/mailman/listinfo/pw_forum" rel="noreferrer" target="_blank">http://pwscf.org/mailman/listi<wbr>nfo/pw_forum</a><br>
</font></span></blockquote>
</div>
<br>
</div>
</div>
</div>
______________________________<wbr>_________________<br>
Pw_forum mailing list<br>
<a href="mailto:Pw_forum@pwscf.org" target="_blank">Pw_forum@pwscf.org</a><br>
<a href="http://pwscf.org/mailman/listinfo/pw_forum" target="_blank">http://pwscf.org/mailman/<wbr>listinfo/pw_forum</a></div>
</blockquote>
</div>
<br>
</div></div></div>
<br>______________________________<wbr>_________________<br>
Pw_forum mailing list<br>
<a href="mailto:Pw_forum@pwscf.org">Pw_forum@pwscf.org</a><br>
<a href="http://pwscf.org/mailman/listinfo/pw_forum" rel="noreferrer" target="_blank">http://pwscf.org/mailman/<wbr>listinfo/pw_forum</a><br></blockquote></div><br></div>