<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Apr 17, 2015 at 5:26 PM, Sun, Hui <span dir="ltr"><<a href="mailto:hus003@ucsd.edu" target="_blank">hus003@ucsd.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
<div style="direction:ltr;font-family:Tahoma;color:#000000;font-size:10pt">How do I run dsymutil so as to get the line numbers?</div></div></blockquote><div><br></div><div>dsymutil ./test</div><div><br></div><div> Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="direction:ltr;font-family:Tahoma;color:#000000;font-size:10pt"><div>
<div style="font-family:Times New Roman;color:#000000;font-size:16px">
<hr>
<div style="direction:ltr"><font face="Tahoma" size="2" color="#000000"><b>From:</b> Matthew Knepley [<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>]<br>
<b>Sent:</b> Friday, April 17, 2015 3:10 PM<br>
<b>To:</b> Sun, Hui<br>
<b>Cc:</b> Barry Smith; <a href="mailto:petsc-users@mcs.anl.gov" target="_blank">petsc-users@mcs.anl.gov</a><br>
<b>Subject:</b> Re: [petsc-users] install petsc with valgrind<br>
</font><br>
</div>
<div></div>
<div>
<div dir="ltr">
<div class="gmail_extra">
<div class="gmail_quote">On Fri, Apr 17, 2015 at 5:09 PM, Sun, Hui <span dir="ltr">
<<a href="mailto:hus003@ucsd.edu" target="_blank">hus003@ucsd.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I'm not sure if I'm doing the right thing. But I have just<br>
export PATH=$PATH:dir_to_valgind_bin<br>
<br>
And I rerun the command:<br>
-@${PETSC_DIR}/bin/petscmpiexec -valgrind -n ${NP} ./test -mx ${ND} -my ${ND} -mz ${ND} -ksp_monitor_short -ksp_type fgmres -pc_type asm<br>
<br>
Then it seems to output something, for example:<br>
==66450== Invalid write of size 8<br>
==66450== at 0x100055225: Schur_SetMatrix (in ./test)<br>
==66450== by 0x10004F218: StokesSetup (in ./test)<br>
==66450== by 0x1000DC582: main (in ./test)<br>
==66450== Address 0x7fff5f93fb28 is on thread 1's stack<br>
==66450== in frame #0, created by Schur_SetMatrix (???)<br>
==66450==<br>
</blockquote>
<div><br>
</div>
<div>Yes, this worked, and it shows you have a memory overwrite in your code. You have no line</div>
<div>numbers because you deleted the *.o files without running dsymutil.</div>
<div> </div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
And before those output, it has the following lines:<br>
--66450-- run: /usr/bin/dsymutil "./test"<br>
warning: (x86_64) /Users/hus003/projects/LS_BDRY/test/test.o unable to open object file<br>
warning: no debug symbols in executable (-arch x86_64)<br>
--66450-- run: /usr/bin/dsymutil "/Users/hus003/Documents/software/petsc-valgrind/petsc-valgrind-debug/lib/libpetsc.3.05.3.dylib"<br>
--66450-- run: /usr/bin/dsymutil "/Users/hus003/Documents/software/petsc-valgrind-install/lib/libmpicxx.12.dylib"<br>
--66450-- run: /usr/bin/dsymutil "/Users/hus003/Documents/software/petsc-valgrind-install/lib/libmpifort.12.dylib"<br>
--66450-- run: /usr/bin/dsymutil "/Users/hus003/Documents/software/petsc-valgrind-install/lib/libmpi.12.dylib"<br>
--66450-- run: /usr/bin/dsymutil "/Users/hus003/Documents/software/petsc-valgrind-install/lib/libpmpi.12.dylib"<br>
<br>
Does it mean that it's working? But what does these two warnings mean?<br>
</blockquote>
<div><br>
</div>
<div>These warnings mean that symbols are missing from those libraries, which is no surprise.</div>
<div><br>
</div>
<div> matt</div>
<div> </div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Best,<br>
Hui<br>
<br>
<br>
________________________________________<br>
From: Barry Smith [<a href="mailto:bsmith@mcs.anl.gov" target="_blank">bsmith@mcs.anl.gov</a>]<br>
Sent: Friday, April 17, 2015 2:57 PM<br>
To: Matthew Knepley<br>
Cc: Sun, Hui; <a href="mailto:petsc-users@mcs.anl.gov" target="_blank">petsc-users@mcs.anl.gov</a><br>
Subject: Re: [petsc-users] install petsc with valgrind<br>
<br>
Or make sure valgrind is in your path<br>
<br>
> On Apr 17, 2015, at 4:56 PM, Matthew Knepley <<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>> wrote:<br>
><br>
> As I said, it cannot find valgrind in your path. Remove it or install valgrind.<br>
><br>
> Matt<br>
><br>
> On Fri, Apr 17, 2015 at 4:55 PM, Sun, Hui <<a href="mailto:hus003@ucsd.edu" target="_blank">hus003@ucsd.edu</a>> wrote:<br>
> Thank you, Matt and Barry. I was trying to run the following:<br>
> -@${PETSC_DIR}/bin/petscmpiexec -valgrind -n ${NP} ./test -mx ${ND} -my ${ND} -mz ${ND} -ksp_monitor_short -ksp_type fgmres -pc_type asm<br>
><br>
> where NP=2, ND=32<br>
><br>
> And in the makefile I have specified the following:<br>
> include ${PETSC_DIR}/lib/petsc/conf/variables<br>
> include ${PETSC_DIR}/lib/petsc/conf/rules<br>
> include ${PETSC_DIR}/lib/petsc/conf/test<br>
><br>
> Best,<br>
> Hui<br>
><br>
><br>
> ________________________________________<br>
> From: Barry Smith [<a href="mailto:bsmith@mcs.anl.gov" target="_blank">bsmith@mcs.anl.gov</a>]<br>
> Sent: Friday, April 17, 2015 2:50 PM<br>
> To: Sun, Hui<br>
> Cc: <a href="mailto:petsc-users@mcs.anl.gov" target="_blank">petsc-users@mcs.anl.gov</a><br>
> Subject: Re: [petsc-users] install petsc with valgrind<br>
><br>
> Please please please always show WHAT YOU RAN with the error message. Otherwise we just must guess<br>
><br>
><br>
> > On Apr 17, 2015, at 3:58 PM, Sun, Hui <<a href="mailto:hus003@ucsd.edu" target="_blank">hus003@ucsd.edu</a>> wrote:<br>
> ><br>
> > Thank you Barry. I just have it installed. And I was running a code, and got the following error message:<br>
> ><br>
> > HYDU_create_process (utils/launch/launch.c:75): execvp error on file valgrind: (No such file or directory)<br>
> ><br>
> > ===================================================================================<br>
> > = BAD TERMINATION OF ONE OF YOUR APPLICATION PROCESSES<br>
> > = PID 66059 RUNNING AT <a href="http://math178.ucsd.edu" target="_blank">math178.ucsd.edu</a><br>
> > = EXIT CODE: 255<br>
> > = CLEANING UP REMAINING PROCESSES<br>
> > = YOU CAN IGNORE THE BELOW CLEANUP MESSAGES<br>
> > ===================================================================================<br>
> ><br>
> > What does this mean?<br>
> ><br>
> > Best,<br>
> > Hui<br>
> ><br>
> > ________________________________________<br>
> > From: Barry Smith [<a href="mailto:bsmith@mcs.anl.gov" target="_blank">bsmith@mcs.anl.gov</a>]<br>
> > Sent: Friday, April 17, 2015 1:08 PM<br>
> > To: Sun, Hui<br>
> > Cc: <a href="mailto:petsc-users@mcs.anl.gov" target="_blank">petsc-users@mcs.anl.gov</a><br>
> > Subject: Re: [petsc-users] install petsc with valgrind<br>
> ><br>
> > The development copy of PETSc allows using --prefix with MPICH <a href="http://www.mcs.anl.gov/petsc/developers/index.html" target="_blank">
http://www.mcs.anl.gov/petsc/developers/index.html</a><br>
> ><br>
> ><br>
> ><br>
> >> On Apr 17, 2015, at 2:38 PM, Sun, Hui <<a href="mailto:hus003@ucsd.edu" target="_blank">hus003@ucsd.edu</a>> wrote:<br>
> >><br>
> >> Hello,<br>
> >><br>
> >> I want to install petsc with valgrind. And I read some documentations, which suggests me to do<br>
> >> ./configure --download-mpich --with-valgind-dir=…<br>
> >><br>
> >> However, I also want to specify --prefix, but petsc doesn't allow me, because --download-mpich option does not work with --prefix install.<br>
> >><br>
> >> Is there anyway that I can have petsc --prefix, together with valgrind?<br>
> >><br>
> >> Best,<br>
> >> Hui<br>
> ><br>
><br>
><br>
<span><font color="#888888">><br>
> --<br>
> 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<span class="HOEnZb"><font color="#888888"><br>
</font></span></font></span></blockquote><span class="HOEnZb"><font color="#888888">
</font></span></div><span class="HOEnZb"><font color="#888888">
<br>
<br clear="all">
<div><br>
</div>
-- <br>
<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>
</font></span></div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">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></div>