Hi Barry,<div><br></div><div>If I use the intel mpi, my code can correctly run and can produce some correct results. Yes, you are right. The IBM MPI has some bugs.</div><div><br></div><div>Thank you for your help.</div><div>
<br></div><div>Regards,<br><br><div class="gmail_quote">On Tue, Jun 25, 2013 at 11:08 AM, Satish Balay <span dir="ltr"><<a href="mailto:balay@mcs.anl.gov" target="_blank">balay@mcs.anl.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On Tue, 25 Jun 2013, Fande Kong wrote:<br>
<br>
> Hi Barry,<br>
><br>
> How to use valgrind to debug parallel program on the supercomputer with<br>
> many cores? If we follow the instruction "mpiexec -n NPROC valgrind<br>
> --tool=memcheck -q --num-callers=20 --log-file=valgrind.log.%p<br>
> PETSCPROGRAMNAME -malloc off PROGRAMOPTIONS",  for 10000 cores, 10000 files<br>
> will be printed. Maybe we need to put all information into a single file.<br>
> How to do this?<br>
<br>
</div>For this many cores - the PIDs across nodes won't be unique. It might<br>
map over to say 1000 files - so I suggest [assuming $HOSTNAME is set<br>
on each host]<br>
<br>
--log-file=valgrind.log.%q{HOSTNAME}.%p<br>
<br>
You don't want to be mixing output from all the cores - then it would<br>
be unreadable.<br>
<br>
But if your filesystem cannot handle these many files - you could try<br>
consolidating output per node as:<br>
<br>
--log-file=valgrind.log.%q{HOSTNAME}<br>
<br>
[or perhaps create a subdir per node or something - and stash files in<br>
these dirs]<br>
<br>
for each hostname: mkdir -p ${HOSTNAME}<br>
<br>
--log-file=%q{HOSTNAME}/valgrind.log.%p<br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
Satish<br>
<br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br><div style="line-height:21px;font-family:Verdana;font-size:14px;background-color:rgb(255,255,255)">Fande Kong</div><div style="line-height:21px;font-family:Verdana;font-size:14px;background-color:rgb(255,255,255)">
ShenZhen Institutes of Advanced Technology</div><div style="line-height:21px;font-family:Verdana;font-size:14px;background-color:rgb(255,255,255)">Chinese Academy of Sciences</div>
</div>