<div dir="auto">Why isn’t the sum all computed after doing a gather to the root- is there a limitation of 27 processes (7 devices) for gather? We thought a collector could handle much more,</div><div dir="auto"><br></div><div dir="auto">Best,</div><div dir="auto">Brent</div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Jan 16, 2021 at 2:18 PM Thakur, Rajeev <<a href="mailto:thakur@anl.gov">thakur@anl.gov</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)">
<div lang="EN-US" link="blue" vlink="purple" style="word-wrap:break-word">
<div class="m_5775256964517184380WordSection1">
<p class="MsoNormal"><span style="font-family:"Lucida Grande",sans-serif">It uses a different algorithm and communicates much less data. The sum is not all computed after doing a gather to the root.<u style="font-family:"Lucida Grande",sans-serif"></u><u style="font-family:"Lucida Grande",sans-serif"></u></span></p></div></div><div lang="EN-US" link="blue" vlink="purple" style="word-wrap:break-word"><div class="m_5775256964517184380WordSection1">
<p class="MsoNormal"><span style="font-family:"Lucida Grande",sans-serif"><u style="font-family:"Lucida Grande",sans-serif"></u> <u style="font-family:"Lucida Grande",sans-serif"></u></span></p>
<div style="border-style:solid none none;border-top-width:1pt;padding:3pt 0in 0in;border-top-color:rgb(181,196,223)">
<p class="MsoNormal"><b><span style="font-size:12pt;color:black">From: </span></b><span style="font-size:12pt;color:black">Brent Morgan <<a href="mailto:brent.taylormorgan@gmail.com" target="_blank">brent.taylormorgan@gmail.com</a>><br>
<b>Date: </b>Saturday, January 16, 2021 at 2:58 PM<br>
<b>To: </b>"Thakur, Rajeev" <<a href="mailto:thakur@anl.gov" target="_blank">thakur@anl.gov</a>><br>
<b>Cc: </b>Robert Katona <<a href="mailto:robert.katona@hotmail.com" target="_blank">robert.katona@hotmail.com</a>>, "Zhou, Hui" <<a href="mailto:zhouh@anl.gov" target="_blank">zhouh@anl.gov</a>>, "<a href="mailto:devel@mpich.org" target="_blank">devel@mpich.org</a>" <<a href="mailto:devel@mpich.org" target="_blank">devel@mpich.org</a>><br>
<b>Subject: </b>Re: [mpich-devel] mpich3 error<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">We will try MPI_Reduce which will improve our code, but it will not solve the underlying problem. <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Best,<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">Brent<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<p class="MsoNormal">On Sat, Jan 16, 2021 at 1:31 PM Thakur, Rajeev <<a href="mailto:thakur@anl.gov" target="_blank">thakur@anl.gov</a>> wrote:<u></u><u></u></p>
</div>
<blockquote style="border-style:none none none solid;border-left-width:1pt;padding:0in 0in 0in 6pt;margin-left:4.8pt;margin-right:0in;border-left-color:rgb(204,204,204)">
<div>
<div>
<p class="MsoNormal"><span style="font-family:"Lucida Grande",sans-serif">Your mail all the way below says “</span><span style="font-size:13.5pt;font-family:-webkit-standard,serif;color:black">We
are using MPI_Gather collector for merely calculating the sum of the result of N processes”. Why don’t you use MPI_Reduce instead then?</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:13.5pt;font-family:-webkit-standard,serif;color:black"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:13.5pt;font-family:-webkit-standard,serif;color:black">Rajeev</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-family:"Lucida Grande",sans-serif"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-family:"Lucida Grande",sans-serif"> </span><u></u><u></u></p>
<div style="border-style:solid none none;border-top-width:1pt;padding:3pt 0in 0in;border-top-color:rgb(181,196,223)">
<p class="MsoNormal"><b><span style="font-size:12pt;color:black">From:
</span></b><span style="font-size:12pt;color:black">Brent Morgan via devel <<a href="mailto:devel@mpich.org" target="_blank">devel@mpich.org</a>><br>
<b>Reply-To: </b>"<a href="mailto:devel@mpich.org" target="_blank">devel@mpich.org</a>" <<a href="mailto:devel@mpich.org" target="_blank">devel@mpich.org</a>><br>
<b>Date: </b>Saturday, January 16, 2021 at 1:38 PM<br>
<b>To: </b>"Zhou, Hui" <<a href="mailto:zhouh@anl.gov" target="_blank">zhouh@anl.gov</a>><br>
<b>Cc: </b>Brent Morgan <<a href="mailto:brent.taylormorgan@gmail.com" target="_blank">brent.taylormorgan@gmail.com</a>>, "<a href="mailto:devel@mpich.org" target="_blank">devel@mpich.org</a>" <<a href="mailto:devel@mpich.org" target="_blank">devel@mpich.org</a>>,
Robert Katona <<a href="mailto:robert.katona@hotmail.com" target="_blank">robert.katona@hotmail.com</a>><br>
<b>Subject: </b>Re: [mpich-devel] mpich3 error</span><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<div>
<div>
<p class="MsoNormal">Hi Hui, Mpich community,<u></u><u></u></p>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">Thanks for the response. You're right, I'll provide a toy program that replicates the code structure (and results). The toy program is calculating a sum value from each process-
the value isn't too important for this toy program. The timing, however, is the only thing important in our demonstration. It exactly replicates what we are observing for our actual program. This directly relates to the MPI functionality- we can't find
out what the issue is.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><img border="0" src="cid:1770dfb7e44ad7999131" style="width:896px;max-width:100%"><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">I have attached the code. Is something wrong with our implementation? It starts with the main() function. Thank you very much for any help,<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">Best,<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">Brent<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">PS My subscription to
<a href="mailto:discuss@mpich.org" target="_blank">discuss@mpich.org</a> is pending currently.<u></u><u></u></p>
</div>
</div>
</div>
<p class="MsoNormal"> <u></u><u></u></p>
<div>
<div>
<p class="MsoNormal">On Sat, Jan 16, 2021 at 12:24 PM Brent Morgan <<a href="mailto:brent.taylormorgan@gmail.com" target="_blank">brent.taylormorgan@gmail.com</a>> wrote:<u></u><u></u></p>
</div>
<blockquote style="border-style:none none none solid;border-left-width:1pt;padding:0in 0in 0in 6pt;margin:5pt 0in 5pt 4.8pt;border-left-color:rgb(204,204,204)">
<div>
<p class="MsoNormal">Hi Hui, Mpich community,<u></u><u></u></p>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">Thanks for the response. You're right, I'll provide a toy program that replicates the code structure (and results). The toy program is calculating a sum value from each process-
the value isn't too important for this toy program. The timing, however, is the only thing important in our demonstration. It exactly replicates what we are observing for our actual program. This directly relates to the MPI functionality- we can't find
out what the issue is.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><img border="0" src="cid:1770dfb7e44ad7999131" style="width:896px;max-width:100%"><u></u><u></u></p>
</div>
</div>
</blockquote>
</div>
</div>
</div>
<div>
<div>
<div>
<blockquote style="border-style:none none none solid;border-left-width:1pt;padding:0in 0in 0in 6pt;margin:5pt 0in 5pt 4.8pt;border-left-color:rgb(204,204,204)">
<div>
<div>
<p class="MsoNormal">I have attached the code. Is something wrong with our implementation? It starts with the main() function. Thank you very much for any help,<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">Best,<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">Brent<u></u><u></u></p>
</div>
</div>
<p class="MsoNormal"> <u></u><u></u></p>
<div>
<div>
<p class="MsoNormal">On Fri, Jan 15, 2021 at 10:43 PM Zhou, Hui <<a href="mailto:zhouh@anl.gov" target="_blank">zhouh@anl.gov</a>> wrote:<u></u><u></u></p>
</div>
<blockquote style="border-style:none none none solid;border-left-width:1pt;padding:0in 0in 0in 6pt;margin:5pt 0in 5pt 4.8pt;border-left-color:rgb(204,204,204)">
<div>
<div>
<p class="MsoNormal">Your description only mentions MPI_Gather. If there is indeed problem with MPI_Gather, then you should be able to reproduce the issue with a sample program. Share with us and we
can better assist you. If you can’t reproduce the issue with a simple example, then I suspect there are other problems that you are not able to fully describe. We really can’t help much without able to see the code.<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">That said, I am not even sure what is the issue you are describing. 100 process MPI_Gather will be slower than 50 process MPI_Gather. And since it is a collective, if one of your
process is delayed due to some computations or else, the whole collective will take longer to finish just due to waiting for the late process. You really need tell us what your program is doing in order for us to even offer an intelligent guess.<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<div>
<div>
<div>
<p class="MsoNormal">-- <br>
Hui Zhou<u></u><u></u></p>
</div>
</div>
</div>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<div style="border-style:solid none none;border-top-width:1pt;padding:3pt 0in 0in;border-top-color:rgb(181,196,223)">
<p class="MsoNormal" style="margin-bottom:12pt"><b><span style="font-size:12pt;color:black">From:
</span></b><span style="font-size:12pt;color:black">Brent Morgan <<a href="mailto:brent.taylormorgan@gmail.com" target="_blank">brent.taylormorgan@gmail.com</a>><br>
<b>Date: </b>Friday, January 15, 2021 at 10:42 PM<br>
<b>To: </b>Zhou, Hui <<a href="mailto:zhouh@anl.gov" target="_blank">zhouh@anl.gov</a>>,
<a href="mailto:discuss@mpich.org" target="_blank">discuss@mpich.org</a> <<a href="mailto:discuss@mpich.org" target="_blank">discuss@mpich.org</a>><br>
<b>Cc: </b>Robert Katona <<a href="mailto:robert.katona@hotmail.com" target="_blank">robert.katona@hotmail.com</a>><br>
<b>Subject: </b>Re: [mpich-devel] mpich3 error</span><u></u><u></u></p>
</div>
<div>
<div>
<p class="MsoNormal">Hi MPICH community,<u></u><u></u></p>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">My team has downloaded mpich 3.3.2 (using ch3 as default) and implemented MPI, and for small # of processes (<50), everything worked fine for our MPI implementation. For >=50 processes,
there was a ch3 error and crashed the program after a random amount of seconds (sometimes 10seconds, sometimes 100seconds). So we compiled mpich 3.3.2 with ch4 (instead of default ch3) using '--with-device=ch4:ofi` flag and this got rid of the error- but
for >12 processes, the speed would slow down to 2x slower suddenly.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">Upon Hui's suggestion, we upgraded to mpich 3.4 and compiled with '--with-device=ch4:ofi` flag (where ch4 is default for mpich 3.4). Everything worked fine until we hit 20 processes;
after >=20 processes, the 2x slowdown is happening again.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">We have tried 1 communicator and multiple communicators in an attempt to make the MPI implementation faster, but there's no significant difference in observations. We are using
MPI_Gather collector for merely calculating the sum of the result of N processes, but we can't seem to maintain stability within MPI as we increase N processes. Is there something we are missing that is ultimately causing this error? We are at a loss here,
thank you.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">Best,<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">Brent<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
</blockquote>
</div>
</div>
</div>
</blockquote>
</div>
</div>
</div>
</div>
</blockquote></div></div>