<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Sun, Apr 19, 2015 at 9:56 AM, 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 try to run<br>
-@${PETSC_DIR}/bin/petscmpiexec -valgrind -n 2 ./test -mx 32 -my 32 -mz 32<br>
<br>
It seems to be working, except that it gives me an error message:<br>
<br>
--21019-- run: /usr/bin/dsymutil "/Users/hus003/Documents/software/petsc-valgrind/petsc-valgrind-debug/lib/libpetsc.3.05.3.dylib"<br>
--21020-- run: /usr/bin/dsymutil "/Users/hus003/Documents/software/petsc-valgrind/petsc-valgrind-debug/lib/libpetsc.3.05.3.dylib"<br>
error: No such file or directory - old dSYM file cannot be overwritten: old: '/Users/hus003/Documents/software/petsc-valgrind/petsc-valgrind-debug/lib/libpetsc.3.05.3.dylib.dSYM/Contents/Resources/DWARF/libpetsc.3.05.3.dylib'<br></blockquote><div><br></div><div>It sounds like you created this as root or something.</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">
new:'/Users/hus003/Documents/software/petsc-valgrind/petsc-valgrind-debug/lib/libpetsc.3.05.3.dylib.dSYM/Contents/Resources/DWARF/libpetsc.3.05.3.dylib.x86_64'.<br>
<br>
Why do I get this message? Do I need to get rid of it?<br>
<br>
Best,<br>
Hui<br>
<br>
<br>
________________________________________<br>
From: Sun, Hui<br>
Sent: Friday, April 17, 2015 3:37 PM<br>
To: petsc-users<br>
Cc: Matthew Knepley<br>
Subject: RE: [petsc-users] install petsc with valgrind<br>
<br>
Thank you Satish! It works perfect.<br>
<br>
Hui<br>
<br>
<br>
________________________________________<br>
From: Satish Balay [<a href="mailto:balay@mcs.anl.gov">balay@mcs.anl.gov</a>]<br>
Sent: Friday, April 17, 2015 3:29 PM<br>
To: Sun, Hui<br>
Cc: Matthew Knepley; <a href="mailto:petsc-users@mcs.anl.gov">petsc-users@mcs.anl.gov</a><br>
Subject: Re: [petsc-users] install petsc with valgrind<br>
<br>
Well - its best if the .o files are not deleted.. [then you don't<br>
have to run dsymutil]. One way to do it [if using PETSc makefiles] is:<br>
<br>
make test RM=/bin/true<br>
<br>
To run dsymutil - I think you need the .o files anyway - and run it as instructed below.<br>
<br>
> --66450-- run: /usr/bin/dsymutil "./test"<br>
<br>
Satish<br>
<br>
On Fri, 17 Apr 2015, Sun, Hui wrote:<br>
<br>
> How do I run dsymutil so as to get the line numbers?<br>
><br>
><br>
> ________________________________<br>
> From: Matthew Knepley [<a href="mailto:knepley@gmail.com">knepley@gmail.com</a>]<br>
> Sent: Friday, April 17, 2015 3:10 PM<br>
> To: Sun, Hui<br>
> Cc: Barry Smith; <a href="mailto:petsc-users@mcs.anl.gov">petsc-users@mcs.anl.gov</a><br>
> Subject: Re: [petsc-users] install petsc with valgrind<br>
><br>
> On Fri, Apr 17, 2015 at 5:09 PM, Sun, Hui <<a href="mailto:hus003@ucsd.edu">hus003@ucsd.edu</a><mailto:<a href="mailto:hus003@ucsd.edu">hus003@ucsd.edu</a>>> wrote:<br>
> 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>
><br>
> Yes, this worked, and it shows you have a memory overwrite in your code. You have no line<br>
> numbers because you deleted the *.o files without running dsymutil.<br>
><br>
> 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>
><br>
> These warnings mean that symbols are missing from those libraries, which is no surprise.<br>
><br>
> matt<br>
><br>
> Best,<br>
> Hui<br>
><br>
><br>
> ________________________________________<br>
> From: Barry Smith [<a href="mailto:bsmith@mcs.anl.gov">bsmith@mcs.anl.gov</a><mailto:<a href="mailto:bsmith@mcs.anl.gov">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">petsc-users@mcs.anl.gov</a><mailto:<a href="mailto:petsc-users@mcs.anl.gov">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">knepley@gmail.com</a><mailto:<a href="mailto:knepley@gmail.com">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">hus003@ucsd.edu</a><mailto:<a href="mailto:hus003@ucsd.edu">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">bsmith@mcs.anl.gov</a><mailto:<a href="mailto:bsmith@mcs.anl.gov">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">petsc-users@mcs.anl.gov</a><mailto:<a href="mailto:petsc-users@mcs.anl.gov">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">hus003@ucsd.edu</a><mailto:<a href="mailto:hus003@ucsd.edu">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><<a href="http://math178.ucsd.edu" target="_blank">http://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">bsmith@mcs.anl.gov</a><mailto:<a href="mailto:bsmith@mcs.anl.gov">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">petsc-users@mcs.anl.gov</a><mailto:<a href="mailto:petsc-users@mcs.anl.gov">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">hus003@ucsd.edu</a><mailto:<a href="mailto:hus003@ucsd.edu">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>
> ><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<br>
><br>
><br>
<span class="HOEnZb"><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<br>
></font></span></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>