<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style id="owaParaStyle" type="text/css">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">Anton's issue is with doing exchange tags repeatedly; it seems to be mismatched isend/ireceives; as they accumulate, they run the memory out. Or something else is happening with
memory, maybe we need to do some flushes of the buffers. <br>
Jane's issue is different; assign ids might have problems.<br>
All these should deserve tickets. <br>
Iulian <br>
<div style="font-family: Times New Roman; color: #000000; font-size: 16px">
<hr tabindex="-1">
<div style="direction: ltr;" id="divRpF744631"><font size="2" color="#000000" face="Tahoma"><b>From:</b> Vijay S. Mahadevan [vijay.m@gmail.com]<br>
<b>Sent:</b> Wednesday, May 21, 2014 9:48 AM<br>
<b>To:</b> Jiangtao Hu<br>
<b>Cc:</b> Grindeanu, Iulian R.; kanaev@ibrae.ac.ru; MOAB dev<br>
<b>Subject:</b> Re: [MOAB-dev] Fwd: Re: Job exiting early [ThermHydraX]<br>
</font><br>
</div>
<div></div>
<div>
<div dir="ltr">Jane,
<div><br>
</div>
<div>
<div style="color:rgb(0,0,0); font-family:verdana,helvetica,sans-serif; font-size:13px; background-color:transparent">
// Global Ids </div>
<div style="color:rgb(0,0,0); font-family:verdana,helvetica,sans-serif; font-size:13px; background-color:transparent">
// 2.0 4 ------- 3 -------- 6 -------- 10 --------- 14 </div>
<div style="color:rgb(0,0,0); font-family:verdana,helvetica,sans-serif; font-size:13px; background-color:transparent">
// | | | | | </div>
<div style="color:rgb(0,0,0); font-family:verdana,helvetica,sans-serif; font-size:13px; background-color:transparent">
// | | | | | </div>
<div style="color:rgb(0,0,0); font-family:verdana,helvetica,sans-serif; font-size:13px; background-color:transparent">
// | | | | | </div>
<div style="color:rgb(0,0,0); font-family:verdana,helvetica,sans-serif; font-size:13px; background-color:transparent">
// 1.0 1 ------- 2 -------- 5 -------- 9 --------- 13</div>
<div style="color:rgb(0,0,0); font-family:verdana,helvetica,sans-serif; font-size:13px; background-color:transparent">
// 0.0 1.0 2.0 3.0 4.0 </div>
</div>
<div><br>
</div>
<div>This is certainly a bug and should not happen to start with. If you have this test case available, do send it to the list so that we can find out the actual reason for the misnumber. Anton's issue might or not be directly related to this bug but his reference
to GID being discontinuous shows that there is an outstanding issue here.</div>
<div class="gmail_extra"><br>
</div>
<div class="gmail_extra">Vijay<br>
<br>
<div class="gmail_quote">On Wed, May 21, 2014 at 8:06 PM, Jiangtao Hu <span dir="ltr">
<<a href="mailto:jiangtao_ma@yahoo.com" target="_blank">jiangtao_ma@yahoo.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex; border-left-width:1px; border-left-color:rgb(204,204,204); border-left-style:solid; padding-left:1ex">
<div>
<div style="color:rgb(0,0,0); background-color:rgb(255,255,255); font-family:verdana,helvetica,sans-serif; font-size:10pt">
<div>
<div>
<div style="color:rgb(0,0,0); background-color:rgb(255,255,255); font-family:verdana,helvetica,sans-serif; font-size:10pt">
<div><span>On unit test for my project, I am trying to use ParallelComm::assign_global_id() to get the global ids for vertices of a simple grid</span></div>
<div style="background-color:transparent"> // Mesh Ids </div>
<div style="background-color:transparent"> // 2.0 6 ------- 7 -------- 8 -------- 9 --------- 10 </div>
<div style="background-color:transparent"> // | | | | | </div>
<div style="background-color:transparent"> // | 1 | 2 | 3 | 4 | </div>
<div style="background-color:transparent"> // | | | | | </div>
<div style="background-color:transparent"> // 1.0 1 ------- 2 -------- 3 -------- 4 --------- 5</div>
<div style="background-color:transparent"><span></span></div>
<div style="background-color:transparent"> // 0.0 1.0 2.0 3.0 4.0 </div>
<div style="background-color:transparent"><br clear="none">
</div>
<div style="background-color:transparent; color:rgb(0,0,0); font-size:13px; font-family:verdana,helvetica,sans-serif; font-style:normal">
and got global ids as following</div>
<div style="background-color:transparent">// Global Ids </div>
<div style="background-color:transparent"> // 2.0 4 ------- 3 -------- 6 -------- 10 --------- 14 </div>
<div style="background-color:transparent"> // | | | | | </div>
<div style="background-color:transparent"> // | | | | | </div>
<div style="background-color:transparent"> // | | | | | </div>
<div style="background-color:transparent"> // 1.0 1 ------- 2 -------- 5 -------- 9 --------- 13</div>
<div style="background-color:transparent"> // 0.0 1.0 2.0 3.0 4.0 </div>
<div style="background-color:transparent"><br clear="none">
</div>
<div style="background-color:transparent; color:rgb(0,0,0); font-size:13px; font-family:verdana,helvetica,sans-serif; font-style:normal">
Don't know if this is what Anton got through. </div>
<div style="background-color:transparent; color:rgb(0,0,0); font-size:13px; font-family:verdana,helvetica,sans-serif; font-style:normal">
<br>
</div>
<div style="background-color:transparent; color:rgb(0,0,0); font-size:13px; font-family:verdana,helvetica,sans-serif; font-style:normal">
Iulian, if you are interested to see the test, please let me know, and I'll send to you.</div>
<div></div>
<div> </div>
<div>Jane </div>
<div><br clear="none">
<br clear="none">
</div>
<div>Asst. Researcher<br clear="none">
Dept. of Engineering Physics<br clear="none">
UW @ Madison</div>
<br clear="none">
<div><br clear="none">
</div>
<div>"And we know that for those who love God, that is, for those who are called according to his purpose, all things are working together for good." (Romans 8:28)</div>
<div>
<div class="h5">
<div>
<div style="display:block">
<div style="font-family:verdana,helvetica,sans-serif; font-size:10pt">
<div style="font-family:HelveticaNeue,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif; font-size:12pt">
<div dir="ltr"><font face="Arial">On Tuesday, May 20, 2014 5:36 PM, "Grindeanu, Iulian R." <<a href="mailto:iulian@mcs.anl.gov" target="_blank">iulian@mcs.anl.gov</a>> wrote:<br clear="none">
</font></div>
<br clear="none">
<br clear="none">
<div>
<div>
<div>
<div style="direction:ltr; font-family:Tahoma; color:rgb(0,0,0); font-size:10pt">
hmmm,<br clear="none">
this is not good :(<br clear="none">
<br clear="none">
Are you running this on mira? Do you have a small file for a laptop/workstation?<br clear="none">
Maybe I can create one similar.<br clear="none">
<br clear="none">
Do you see this only on 1024 processes or can it be lower count?<br clear="none">
<br clear="none">
How does your model look like?<br clear="none">
Any processor should not communicate with more than 64 other processes, maybe after ghosting this number is reached.<br clear="none">
<br clear="none">
Can you run a debug version of this ? maybe some asserts are not triggered in optimized mode.<br clear="none">
<br clear="none">
Is your file somewhere on mira I can get to it? <br clear="none">
<br clear="none">
Iulian<br clear="none">
<br clear="none">
<div>
<div style="font-family:'Times New Roman'; color:rgb(0,0,0); font-size:16px">
<hr>
<div style="direction:ltr"><font color="#000000" face="Tahoma"><b>From:</b> <a href="mailto:moab-dev-bounces@mcs.anl.gov" target="_blank">
moab-dev-bounces@mcs.anl.gov</a> [<a href="mailto:moab-dev-bounces@mcs.anl.gov" target="_blank">moab-dev-bounces@mcs.anl.gov</a>] on behalf of
<a href="mailto:kanaev@ibrae.ac.ru" target="_blank">kanaev@ibrae.ac.ru</a> [<a href="mailto:kanaev@ibrae.ac.ru" target="_blank">kanaev@ibrae.ac.ru</a>]<br clear="none">
<b>Sent:</b> Tuesday, May 20, 2014 5:05 PM<br clear="none">
<b>To:</b> MOAB dev<br clear="none">
<b>Subject:</b> Re: [MOAB-dev] Fwd: Re: Job exiting early [ThermHydraX]<br clear="none">
</font><br clear="none">
</div>
<div></div>
<div>
<div>The problem is still here </div>
<div>I've made a simple program performing certain numbers of exchange_tags calls within a loop
</div>
<div>If you run it on several processors with any mesh file it will eventually crash with the following message from every core:
</div>
<div> </div>
<div>Fatal error in PMPI_Isend: Internal MPI error!, error stack: </div>
<div>PMPI_Isend(148): MPI_Isend(buf=0xd0f300, count=4, MPI_UNSIGNED_CHAR, dest=1, tag=6, MPI_COMM_WORLD, request=0xcde354) failed
</div>
<div>(unknown)(): Internal MPI error! </div>
<div> </div>
<div>Thanks </div>
<div>Anton </div>
<div><br clear="none">
</div>
<div>On Tue, 20 May 2014 04:40:03 -0400, wrote: </div>
<blockquote style="padding-left:5px; border-left-color:rgb(16,16,255); border-left-width:2px; border-left-style:solid; margin-left:5px; width:100%">
<div>Please disregard that, the global_id space for Quads was incontinuous in my mesh file
</div>
<div>Will check back with correct mesh </div>
<div>Anton<br clear="none">
<br clear="none">
On Mon, 19 May 2014 15:17:14 -0400, wrote: </div>
<blockquote style="padding-left:5px; border-left-color:rgb(16,16,255); border-left-width:2px; border-left-style:solid; margin-left:5px; width:100%">
<div>Hello MOAB dev, </div>
<div>I've attached a simplified version of my program that crashes presumably after particular numbers calls of exchange_tags
</div>
<div>I ran it couple of times on Mira on 1024 cores (64 nodes in --mode c16) </div>
<div>It performs around 524378 iterations and then crushes (error file attached) </div>
<div>Can you please take a look at what Scott Parker from ALCF suggests about it:
</div>
<div>-------- Original Message -------- </div>
<table border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<th colspan="1" rowspan="1" valign="baseline" align="right">Subject: </th>
<td colspan="1" rowspan="1">Re: Job exiting early [ThermHydraX]</td>
</tr>
<tr>
<th colspan="1" rowspan="1" valign="baseline" align="right">Date: </th>
<td colspan="1" rowspan="1">Fri, 9 May 2014 18:48:25 -0500</td>
</tr>
<tr>
<th colspan="1" rowspan="1" valign="baseline" align="right">From: </th>
<td colspan="1" rowspan="1">Scott Parker </td>
</tr>
<tr>
<th colspan="1" rowspan="1" valign="baseline" align="right">To: </th>
<td colspan="1" rowspan="1"> </td>
</tr>
</tbody>
</table>
<br clear="none">
<br clear="none">
Anton-<br clear="none">
<br clear="none">
I took a look at the core files and from the stack trace it appears that the code is failing in an MPI_Isend call<br clear="none">
that is called from moab.ParallelComm::recv_buffer which is called from moab::ParallelComm::exchange_tags<br clear="none">
called from main(). The stack looks like:<br clear="none">
<br clear="none">
main<br clear="none">
moab::ParallelComm::exchange_tags<br clear="none">
moab.ParallelComm::recv_buffer<br clear="none">
MPI_Isend<br clear="none">
<br clear="none">
I've been able to get the same failure and error message you are seeing by having an MPI process call MPI_Isend<br clear="none">
when there are no matching receives. After 2 million Isends the program exits with the error you are seeing. So<br clear="none">
I'm pretty sure your ending up with a large number of outstanding requests and the program is failing because<br clear="none">
it can't allocate space for new MPI_Request objects.<br clear="none">
<br clear="none">
I'd suggest looking at how Moab is calling MPI and how many requests might be outstanding at any one time.<br clear="none">
Since the code is running for 5 hours and looks to be executing hundreds of thousands of iterations I wonder<br clear="none">
if there is some sort of send-receive mismatch that is letting requests accumulate. I think your best bet is to<br clear="none">
talk to the Moab folks and see if they have any ideas about why this might be happening.
<br clear="none">
<br clear="none">
One possibility is a load imbalance between processes - if you don't have any MPI_Barriers or other collectives in<br clear="none">
your code you could try adding a barrier to synchronize the processes.<br clear="none">
<br clear="none">
If the Moab guys can't help you and adding a barrier doesn't help I can work with you to instrument the code to<br clear="none">
collect more information on how MPI is being called and we could possibly pin down the source of the problem<br clear="none">
that way.<br clear="none">
<br clear="none">
<br clear="none">
Scott<br clear="none">
<br clear="none">
<br clear="none">
<div>On 5/2/14, 11:14 PM, <a rel="nofollow" shape="rect" href="mailto:kanaev@ibrae.ac.ru" target="_blank">
kanaev@ibrae.ac.ru</a> wrote:<br clear="none">
</div>
<blockquote>
<div>Hello Scott </div>
<div>The dir is cd /gpfs/mira-fs0/projects/ThermHydraX/kanaev/pinit </div>
<div>The run produced core files is 253035 </div>
<div> </div>
<div>I took another run with the line MPI_Allreduce(&r,&rmax,1,MPI_REAL8,MPI_MAX,MPI_COMM_WORLD); commented and it stopped the same very time iteration #524378, just passed some more lines
</div>
<div> </div>
<div>I use MOAB library and its function of exchanging data between processors so i think i cannot really count MPI requests
</div>
<div> </div>
<div>Anton </div>
<div><br clear="none">
On Mon, 28 Apr 2014 16:45:41 -0500, Scott Parker wrote: </div>
<blockquote style="padding-left:5px; border-left-color:rgb(16,16,255); border-left-width:2px; border-left-style:solid; margin-left:5px; width:100%">
<br clear="none">
Can you point me to the directory where your binary and core files are?<br clear="none">
<br clear="none">
The stack trace you sent shows a call to MPI_Waitany, do you know how many MPI requests<br clear="none">
the code generally has outstanding at any time?<br clear="none">
<br clear="none">
-Scott<br clear="none">
<br clear="none">
<div>On 4/28/14, 4:30 PM, <a rel="nofollow" shape="rect" href="mailto:kanaev@ibrae.ac.ru" target="_blank">
kanaev@ibrae.ac.ru</a> wrote:<br clear="none">
</div>
<blockquote>
<div>Hello Scott, </div>
<div>I took rerun with the mentioned keys. The code was freshly compiled with makefile attached just in case.
</div>
<div>I've got 1024 core files. Two of them are attached. </div>
<div>I run <span style="font-family:'Lucida Grande',Verdana,Arial,Helvetica,sans-serif">bgq_stack for core.0 and here's what i got:</span>
</div>
<div><span style="font-family:'Lucida Grande',Verdana,Arial,Helvetica,sans-serif"></span> [akanaev@miralac1 pinit]$bgq_stack pinit core.0
</div>
<div>------------------------------------------------------------------------ </div>
<div>Program : /gpfs/mira-fs0/projects/ThermHydraX/kanaev/pinit/pinit </div>
<div>------------------------------------------------------------------------ </div>
<div>+++ID Rank: 0, TGID: 1, Core: 0, HWTID:0 TID: 1 State: RUN </div>
<div> </div>
<div>00000000018334c0 </div>
<div>_ZN4PAMI6Device2MU7Factory12advance_implEPNS1_7ContextEmm </div>
<div>/bgsys/source/srcV1R2M1.17463/comm/sys/buildtools/pami/components/devices/bgq/mu2/Factory.h:269
</div>
<div> </div>
<div>000000000170da28 </div>
<div>PAMI_Context_trylock_advancev </div>
<div>/bgsys/source/srcV1R2M1.17463/comm/sys/buildtools/pami/api/c/pami.cc:554 </div>
<div> </div>
<div>000000000155d0dc </div>
<div>PMPI_Waitany </div>
<div>/bgsys/source/srcV1R2M1.17463/comm/lib/dev/mpich2/src/mpid/pamid/include/../src/mpid_progress.h:239
</div>
<div> </div>
<div>00000000010e84e4 </div>
<div>00000072.long_branch_r2off.H5Dget_space+0 </div>
<div>:0 </div>
<div> </div>
<div>0000000001042be0 </div>
<div>00000012.long_branch_r2off._ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode+0
</div>
<div>:0 </div>
<div> </div>
<div>00000000019de058 </div>
<div>generic_start_main </div>
<div>/bgsys/drivers/V1R2M1/ppc64/toolchain/gnu/glibc-2.12.2/csu/../csu/libc-start.c:226
</div>
<div> </div>
<div>00000000019de354 </div>
<div>__libc_start_main </div>
<div>/bgsys/drivers/V1R2M1/ppc64/toolchain/gnu/glibc-2.12.2/csu/../sysdeps/unix/sysv/linux/powerpc/libc-start.c:194
</div>
<div> </div>
<div>0000000000000000 </div>
<div>?? </div>
<div>??:0 </div>
<div><br clear="none">
</div>
<div>> Have these sort of runs succeeded in the past using the same code base with no changes and similar input data?
</div>
<div>That is the first time i'm trying to run this code for that long time </div>
<div> </div>
<div>Thanks </div>
<div>Anton </div>
<div><br clear="none">
On Thu, 24 Apr 2014 15:45:49 -0500, Scott Parker wrote: </div>
<blockquote style="padding-left:5px; border-left-color:rgb(16,16,255); border-left-width:2px; border-left-style:solid; margin-left:5px; width:1109px">
<br clear="none">
Anton-<br clear="none">
<br clear="none">
Thanks, it's aborting because of a runtime error that appears to be in the mpich layer. <br clear="none">
<br clear="none">
Can you rerun with "--env BG_COREDUMPONEXIT=1:BG_COREDUMPONERROR=1" added to your qsub line - that should<br clear="none">
generate some core files on which you can run bgq_stack.<br clear="none">
<br clear="none">
The system software (driver) on Mira was updated this week and I'd like to get a clearer picture of <br clear="none">
whether that could be related to you problem, so<br clear="none">
<br clear="none">
Has your code been recompiled since Monday? If not can you recompile and try running again<br clear="none">
<br clear="none">
Have these sort of runs succeeded in the past using the same code base with no changes and similar input data?<br clear="none">
<br clear="none">
-Scott<br clear="none">
<br clear="none">
<br clear="none">
<br clear="none">
<div>On 4/24/14, 2:59 PM, <a rel="nofollow" shape="rect" href="mailto:kanaev@ibrae.ac.ru" target="_blank">kanaev@ibrae.ac.ru</a> wrote:<br clear="none">
</div>
<blockquote>
<div>Sorry about the attached files, here the are </div>
<div>There's no core files after exiting, looks like stopping because of time requested expires but you can see from cobaltlog it's about 5 hours passed (10 hours was requested) before exit
</div>
<div>Anton </div>
<div>On Thu, 24 Apr 2014 14:07:07 -0500, Scott Parker wrote: </div>
<blockquote style="padding-left:5px; border-left-color:rgb(16,16,255); border-left-width:2px; border-left-style:solid; margin-left:5px; width:1029px">
<br clear="none">
Anton-<br clear="none">
<br clear="none">
Please send these emails to <a rel="nofollow" shape="rect" href="mailto:support@alcf.anl.gov" target="_blank">support@alcf.anl.gov</a> as I may not always be available to investigate.<br clear="none">
<br clear="none">
I don't see the cobalt or error files attached, so I can't really say anything about why your job may be<br clear="none">
failing. Do you get core files when the job crashed? If so I'd recommend using 'bgq_stack '<br clear="none">
to try and get the file and line number where the failure occurred. Knowing the line may be enough<br clear="none">
to let you figure it out, if not you'll need to dump the values of the variables at the time of the crash<br clear="none">
to get a clearer picture of what is going on.<br clear="none">
<br clear="none">
Scott<br clear="none">
<br clear="none">
<div>On 4/24/14, 1:36 PM, <a rel="nofollow" shape="rect" href="mailto:kanaev@ibrae.ac.ru" target="_blank">kanaev@ibrae.ac.ru</a> wrote:<br clear="none">
</div>
<blockquote>
<div>Hello Scott, </div>
<div>I've tried twice to run 10 hours 1024 cores job on Mira in mode c16 with </div>
<div>qsub -n 64 -t 10:00:00 --mode c16 -A ThermHydraX pinit Lid_128x128x1p1024.h5m
</div>
<div>Both times job exited earlier than expected on the same iteration after the same error during executing the following section (it's between two couts):
</div>
<div> ... </div>
<div>//LOOP OVER OWNED CELLS </div>
<div> double r = 0; </div>
<div> for (moab::Range::iterator it = owned_ents.begin(); it != owned_ents.end(); it++) {
</div>
<div> EntityHandle ent = *it; </div>
<div> int cellid = mb->id_from_handle(ent); </div>
<div> double Vol_; </div>
<div> double u_; </div>
<div> double v_; </div>
<div> double w_; </div>
<div> double r1,r2,r3; </div>
<div> double tmp; </div>
<div> </div>
<div> result = mb->tag_get_data(u, &ent, 1, &u_); </div>
<div> PRINT_LAST_ERROR; </div>
<div> result = mb->tag_get_data(v, &ent, 1, &v_); </div>
<div> PRINT_LAST_ERROR; </div>
<div> result = mb->tag_get_data(w, &ent, 1, &w_); </div>
<div> PRINT_LAST_ERROR; </div>
<div> </div>
<div> double result; </div>
<div> SCALAR_PRODUCT(result,u_,v_,w_,CG[cellid][2].lx,CG[cellid][2].ly,CG[cellid][2].lz);
</div>
<div> </div>
<div> r1 = (sound + fabs(result))/CG[cellid][2].length; </div>
<div> </div>
<div> SCALAR_PRODUCT(result,u_,v_,w_,CG[cellid][3].lx,CG[cellid][3].ly,CG[cellid][3].lz);
</div>
<div> </div>
<div> r2 = (sound + fabs(result))/CG[cellid][3].length; </div>
<div> </div>
<div> SCALAR_PRODUCT(result,u_,v_,w_,CG[cellid][5].lx,CG[cellid][5].ly,CG[cellid][5].lz);
</div>
<div> </div>
<div> r3 = (sound + fabs(result))/CG[cellid][5].length; </div>
<div> </div>
<div> tmp = MAX3(r1,r2,r3); </div>
<div> </div>
<div> r = MAX(tmp,r); </div>
<div> } </div>
<div> </div>
<div> double rmax; </div>
<div> MPI_Allreduce(&r,&rmax,1,MPI_REAL8,MPI_MAX,MPI_COMM_WORLD); </div>
<div> tau = CFL/rmax; </div>
<div> ttime+=tau; </div>
<div>... </div>
<div> </div>
<div>So it may be Allreduce </div>
<div>I've attached cobaltlog and error files of both runs </div>
<div>Can you please take a look and suggest a further debugging </div>
<div> </div>
<div>Thanks </div>
<div>Anton </div>
</blockquote>
</blockquote>
</blockquote>
</blockquote>
</blockquote>
<br clear="none">
</blockquote>
<div> </div>
</blockquote>
<br clear="none">
</blockquote>
<div> </div>
</blockquote>
<div> </div>
</div>
</div>
</div>
</div>
</div>
</div>
<br clear="none">
<br clear="none">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</div>
</div>
</body>
</html>