<div dir="ltr"><div dir="ltr">On Mon, Sep 26, 2022 at 12:40 PM Duan Junming via petsc-users <<a href="mailto:petsc-users@mcs.anl.gov" target="_blank">petsc-users@mcs.anl.gov</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>




<div dir="ltr">
<div id="m_-4463180744509148331m_-1310866754557404651m_5810407354669892074divtagdefaultwrapper" dir="ltr" style="font-size:12pt;color:rgb(0,0,0);font-family:"Times New Roman",Times,serif,Times,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols">
<p><span style="color:rgb(34,34,34);font-family:Arial,Helvetica,sans-serif;font-size:small">Dear all,</span></p>
<div style="color:rgb(34,34,34);font-family:Arial,Helvetica,sans-serif;font-size:small">
<br>
</div>
<div style="color:rgb(34,34,34);font-family:Arial,Helvetica,sans-serif;font-size:small">
I am using PETSc 3.17.4 on a Linux server, compiling with --download-exodus --download-hdf5 --download-openmpi --download-triangle --with-fc=0 --with-debugging=0 PETSC_ARCH=arch-linux-c-opt COPTFLAGS="-g -O3" CXXOPTFLAGS="-g -O3".</div>
<div style="color:rgb(34,34,34);font-family:Arial,Helvetica,sans-serif;font-size:small">
The strange thing is when I run my code with mpirun -np 1 ./main, the CPU time is 30s.</div>
<div style="color:rgb(34,34,34);font-family:Arial,Helvetica,sans-serif;font-size:small">
When I use mpirun -np 2 ./main, the CPU time is 16s. It's OK.</div>
<div style="color:rgb(34,34,34);font-family:Arial,Helvetica,sans-serif;font-size:small">
But when I use more than 2 CPUs, like mpirun -np 3 ./main, the CPU time is 30s.</div>
<div style="color:rgb(34,34,34);font-family:Arial,Helvetica,sans-serif;font-size:small">
The output of command time is: real 0m30.189s, user 9m3.133s, sys 10m55.715s.</div>
<div style="color:rgb(34,34,34);font-family:Arial,Helvetica,sans-serif;font-size:small">
I can also see that the CPU load is about 100% for each process when np = 2, but the CPU load goes to 2000%, 1000%, 1000% for each process (the server has 40 CPUs).</div>
<div style="color:rgb(34,34,34);font-family:Arial,Helvetica,sans-serif;font-size:small">
Do you have any idea about this?</div></div></div></div></blockquote><div><br></div><div>I believe this is an MPI implementation problem, in which there is a large penalty for oversubscription. I think you can try</div><div><br></div><div>  --download-mpich --download-mpich-pm=gforker</div><div><br></div><div>which should be good for oversubscription.</div><div><br></div><div>  Thanks,</div><div><br></div><div>      Matt</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div dir="ltr"><div id="m_-4463180744509148331m_-1310866754557404651m_5810407354669892074divtagdefaultwrapper" dir="ltr" style="font-size:12pt;color:rgb(0,0,0);font-family:"Times New Roman",Times,serif,Times,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols">
<div style="color:rgb(34,34,34);font-family:Arial,Helvetica,sans-serif;font-size:small">
Thanks in advance!</div></div></div></div></blockquote></div>-- <br><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div><div><br></div><div><a href="http://www.cse.buffalo.edu/~knepley/" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div></div>