I didn't use a root account. ________________________________ From: Matthew Knepley [[email protected]] Sent: Sunday, April 19, 2015 8:15 AM To: Sun, Hui Cc: petsc-users Subject: Re: [petsc-users] install petsc with valgrind
On Sun, Apr 19, 2015 at 9:56 AM, Sun, Hui <[email protected]<mailto:[email protected]>> wrote: I try to run -@${PETSC_DIR}/bin/petscmpiexec -valgrind -n 2 ./test -mx 32 -my 32 -mz 32 It seems to be working, except that it gives me an error message: --21019-- run: /usr/bin/dsymutil "/Users/hus003/Documents/software/petsc-valgrind/petsc-valgrind-debug/lib/libpetsc.3.05.3.dylib" --21020-- run: /usr/bin/dsymutil "/Users/hus003/Documents/software/petsc-valgrind/petsc-valgrind-debug/lib/libpetsc.3.05.3.dylib" 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' It sounds like you created this as root or something. Matt 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'. Why do I get this message? Do I need to get rid of it? Best, Hui ________________________________________ From: Sun, Hui Sent: Friday, April 17, 2015 3:37 PM To: petsc-users Cc: Matthew Knepley Subject: RE: [petsc-users] install petsc with valgrind Thank you Satish! It works perfect. Hui ________________________________________ From: Satish Balay [[email protected]<mailto:[email protected]>] Sent: Friday, April 17, 2015 3:29 PM To: Sun, Hui Cc: Matthew Knepley; [email protected]<mailto:[email protected]> Subject: Re: [petsc-users] install petsc with valgrind Well - its best if the .o files are not deleted.. [then you don't have to run dsymutil]. One way to do it [if using PETSc makefiles] is: make test RM=/bin/true To run dsymutil - I think you need the .o files anyway - and run it as instructed below. > --66450-- run: /usr/bin/dsymutil "./test" Satish On Fri, 17 Apr 2015, Sun, Hui wrote: > How do I run dsymutil so as to get the line numbers? > > > ________________________________ > From: Matthew Knepley [[email protected]<mailto:[email protected]>] > Sent: Friday, April 17, 2015 3:10 PM > To: Sun, Hui > Cc: Barry Smith; [email protected]<mailto:[email protected]> > Subject: Re: [petsc-users] install petsc with valgrind > > On Fri, Apr 17, 2015 at 5:09 PM, Sun, Hui > <[email protected]<mailto:[email protected]><mailto:[email protected]<mailto:[email protected]>>> > wrote: > I'm not sure if I'm doing the right thing. But I have just > export PATH=$PATH:dir_to_valgind_bin > > And I rerun the command: > -@${PETSC_DIR}/bin/petscmpiexec -valgrind -n ${NP} ./test -mx ${ND} -my ${ND} > -mz ${ND} -ksp_monitor_short -ksp_type fgmres -pc_type asm > > Then it seems to output something, for example: > ==66450== Invalid write of size 8 > ==66450== at 0x100055225: Schur_SetMatrix (in ./test) > ==66450== by 0x10004F218: StokesSetup (in ./test) > ==66450== by 0x1000DC582: main (in ./test) > ==66450== Address 0x7fff5f93fb28 is on thread 1's stack > ==66450== in frame #0, created by Schur_SetMatrix (???) > ==66450== > > Yes, this worked, and it shows you have a memory overwrite in your code. You > have no line > numbers because you deleted the *.o files without running dsymutil. > > And before those output, it has the following lines: > --66450-- run: /usr/bin/dsymutil "./test" > warning: (x86_64) /Users/hus003/projects/LS_BDRY/test/test.o unable to open > object file > warning: no debug symbols in executable (-arch x86_64) > --66450-- run: /usr/bin/dsymutil > "/Users/hus003/Documents/software/petsc-valgrind/petsc-valgrind-debug/lib/libpetsc.3.05.3.dylib" > --66450-- run: /usr/bin/dsymutil > "/Users/hus003/Documents/software/petsc-valgrind-install/lib/libmpicxx.12.dylib" > --66450-- run: /usr/bin/dsymutil > "/Users/hus003/Documents/software/petsc-valgrind-install/lib/libmpifort.12.dylib" > --66450-- run: /usr/bin/dsymutil > "/Users/hus003/Documents/software/petsc-valgrind-install/lib/libmpi.12.dylib" > --66450-- run: /usr/bin/dsymutil > "/Users/hus003/Documents/software/petsc-valgrind-install/lib/libpmpi.12.dylib" > > Does it mean that it's working? But what does these two warnings mean? > > These warnings mean that symbols are missing from those libraries, which is > no surprise. > > matt > > Best, > Hui > > > ________________________________________ > From: Barry Smith > [[email protected]<mailto:[email protected]><mailto:[email protected]<mailto:[email protected]>>] > Sent: Friday, April 17, 2015 2:57 PM > To: Matthew Knepley > Cc: Sun, Hui; > [email protected]<mailto:[email protected]><mailto:[email protected]<mailto:[email protected]>> > Subject: Re: [petsc-users] install petsc with valgrind > > Or make sure valgrind is in your path > > > On Apr 17, 2015, at 4:56 PM, Matthew Knepley > > <[email protected]<mailto:[email protected]><mailto:[email protected]<mailto:[email protected]>>> > > wrote: > > > > As I said, it cannot find valgrind in your path. Remove it or install > > valgrind. > > > > Matt > > > > On Fri, Apr 17, 2015 at 4:55 PM, Sun, Hui > > <[email protected]<mailto:[email protected]><mailto:[email protected]<mailto:[email protected]>>> > > wrote: > > Thank you, Matt and Barry. I was trying to run the following: > > -@${PETSC_DIR}/bin/petscmpiexec -valgrind -n ${NP} ./test -mx ${ND} -my > > ${ND} -mz ${ND} -ksp_monitor_short -ksp_type fgmres -pc_type asm > > > > where NP=2, ND=32 > > > > And in the makefile I have specified the following: > > include ${PETSC_DIR}/lib/petsc/conf/variables > > include ${PETSC_DIR}/lib/petsc/conf/rules > > include ${PETSC_DIR}/lib/petsc/conf/test > > > > Best, > > Hui > > > > > > ________________________________________ > > From: Barry Smith > > [[email protected]<mailto:[email protected]><mailto:[email protected]<mailto:[email protected]>>] > > Sent: Friday, April 17, 2015 2:50 PM > > To: Sun, Hui > > Cc: > > [email protected]<mailto:[email protected]><mailto:[email protected]<mailto:[email protected]>> > > Subject: Re: [petsc-users] install petsc with valgrind > > > > Please please please always show WHAT YOU RAN with the error message. > > Otherwise we just must guess > > > > > > > On Apr 17, 2015, at 3:58 PM, Sun, Hui > > > <[email protected]<mailto:[email protected]><mailto:[email protected]<mailto:[email protected]>>> > > > wrote: > > > > > > Thank you Barry. I just have it installed. And I was running a code, and > > > got the following error message: > > > > > > HYDU_create_process (utils/launch/launch.c:75): execvp error on file > > > valgrind: (No such file or directory) > > > > > > =================================================================================== > > > = BAD TERMINATION OF ONE OF YOUR APPLICATION PROCESSES > > > = PID 66059 RUNNING AT > > > math178.ucsd.edu<http://math178.ucsd.edu><http://math178.ucsd.edu> > > > = EXIT CODE: 255 > > > = CLEANING UP REMAINING PROCESSES > > > = YOU CAN IGNORE THE BELOW CLEANUP MESSAGES > > > =================================================================================== > > > > > > What does this mean? > > > > > > Best, > > > Hui > > > > > > ________________________________________ > > > From: Barry Smith > > > [[email protected]<mailto:[email protected]><mailto:[email protected]<mailto:[email protected]>>] > > > Sent: Friday, April 17, 2015 1:08 PM > > > To: Sun, Hui > > > Cc: > > > [email protected]<mailto:[email protected]><mailto:[email protected]<mailto:[email protected]>> > > > Subject: Re: [petsc-users] install petsc with valgrind > > > > > > The development copy of PETSc allows using --prefix with MPICH > > > http://www.mcs.anl.gov/petsc/developers/index.html > > > > > > > > > > > >> On Apr 17, 2015, at 2:38 PM, Sun, Hui > > >> <[email protected]<mailto:[email protected]><mailto:[email protected]<mailto:[email protected]>>> > > >> wrote: > > >> > > >> Hello, > > >> > > >> I want to install petsc with valgrind. And I read some documentations, > > >> which suggests me to do > > >> ./configure --download-mpich --with-valgind-dir=… > > >> > > >> However, I also want to specify --prefix, but petsc doesn't allow me, > > >> because --download-mpich option does not work with --prefix install. > > >> > > >> Is there anyway that I can have petsc --prefix, together with valgrind? > > >> > > >> Best, > > >> Hui > > > > > > > > > > > -- > > What most experimenters take for granted before they begin their > > experiments is infinitely more interesting than any results to which their > > experiments lead. > > -- Norbert Wiener > > > > -- > What most experimenters take for granted before they begin their experiments > is infinitely more interesting than any results to which their experiments > lead. > -- Norbert Wiener > -- What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead. -- Norbert Wiener
