Valgrind nosetest

From Daya Bay
Jump to navigation Jump to search

20110919

  • Use debug 3.1.0 installation on RACF in daya0001:/data0/djaffed/3.1.0-dbg/NuWa-3.1.0
  • Usual setup
  • Simple test run:
  ./../external/valgrind/3.4.1/x86_64-slc5-gcc43-dbg/bin/valgrind $(which python) $(which nuwa.py) --help
  • That works. Where to setup the nosetest? What subdir?

20110920

  • Start with Production/FMCP11a/tests. More involved test run:
 $SITEROOT/../external/valgrind/3.4.1/x86_64-slc5-gcc43-dbg/bin/valgrind $(which python) $(which nuwa.py)  -A none --history=off -n 10 -H 33123 -R 975 -m"FMCP11a.runRadioact -r Co60_sst -d DayaBayAD2 -w 2010-07-01T16:00:00" >& vg00.log &
--suppressions=$ROOTSYS/etc/valgrind-root.supp
  • More involved test, using suppressions and generating them:
  $SITEROOT/../external/valgrind/3.4.1/x86_64-slc5-gcc43-dbg/bin/valgrind  -v --tool=memcheck --demangle=yes --num-callers=50 --error-limit=no --leak-check=full --show-reachable=yes --suppressions=$ROOTSYS/etc/valgrind-root.supp  --gen-suppressions=all  $(which python) $(which nuwa.py)  -A none --history=off -n 10 -H 33123 -R 975 -m"FMCP11a.runRadioact -r Co60_sst -d DayaBayAD2 -w 2010-07-01T16:00:00" >& vg01.log &
wget http://reserve02.usatlas.bnl.gov/lxr/source/atlas/External/AtlasValgrind/share/valgrind-python.supp
wget http://reserve02.usatlas.bnl.gov/lxr/source/atlas/External/AtlasValgrind/share/Gaudi.supp
wget http://reserve02.usatlas.bnl.gov/lxr/source/atlas/External/AtlasValgrind/share/root.supp
  • Actually got them opengrok since its hard to get source from lxr
 $SITEROOT/../external/valgrind/3.4.1/x86_64-slc5-gcc43-dbg/bin/valgrind  -v --tool=memcheck --demangle=yes --num-callers=50 --error-limit=no --leak-check=full --show-reachable=yes --suppressions=$ROOTSYS/etc/valgrind-root.supp   --suppressions=Gaudi.supp --suppressions=valgrind-python.supp --gen-suppressions=all  $(which python) $(which nuwa.py)  -A none --history=off -n 10 -H 33123 -R 975 -m"FMCP11a.runRadioact -r Co60_sst -d DayaBayAD2 -w 2010-07-01T16:00:00" >& vg02.log &

20110921

  • Created people/djaffe/OPW/valsupp.py to parse log file made with --gen-suppressions=all and produce a .supp file.
  • Run valsupp at r14232 on RACF on files produced yesterday:
$ ipython
In [1]: from valsupp import valsupp
In [2]: vs = valsupp()
In [3]: vs.read(file='vg01.log')
valsup.read Opened vg01.log
Found 1810 stanzas, of which 838 were unique
len(poem) 838
after exclusion, len(poem) 711
Opened file vg01.supp
Wrote 711 stanzas, of which 6 were unexpected

In [4]: vs.read(file='vg02.log')
valsup.read Opened vg02.log
Found 1769 stanzas, of which 833 were unique
len(poem) 833
after exclusion, len(poem) 702
Opened file vg02.supp
Wrote 702 stanzas, of which 6 were unexpected

  • The 6 unexpected include
    1. One from fun:uuid__generate_time
    2. Five from more (should be fixed by using more 0.8.3 and attendant patches)
  • Remove, by hand, the unexpected ones from more in vg01.supp to produce valgrind-nuwa01.supp
  • Commit valgrind-nuwa01.supp at 14233.
  • Test
$  $SITEROOT/../external/valgrind/3.4.1/x86_64-slc5-gcc43-dbg/bin/valgrind  -v --tool=memcheck --demangle=yes --num-callers=50 --error-limit=no --leak-check=full --show-reachable=yes --suppressions=$ROOTSYS/etc/valgrind-root.supp --suppressions=valgrind-nuwa01.supp --gen-suppressions=all  $(which python) $(which nuwa.py)  -A none --history=off -n 10 -H 33123 -R 975 -m"FMCP11a.runRadioact -r Co60_sst -d DayaBayAD2 -w 2010-07-01T16:00:00" >& vg03.log &
  • Results processed by valsupp.py
valsup.read Opened vg03.log
Found 482 stanzas, of which 349 were unique
len(poem) 349
after exclusion, len(poem) 220
Opened file vg03.supp
Wrote 220 stanzas, of which 12 were unexpected
  • Unexpected stanzas are all related to more. Why does the number double? Oddness.
  • Add vg03.supp without editting to suppressions and re-run:
 $SITEROOT/../external/valgrind/3.4.1/x86_64-slc5-gcc43-dbg/bin/valgrind  -v --tool=memcheck --demangle=yes --num-callers=50 --error-limit=no --leak-check=full --show-reachable=yes --suppressions=$ROOTSYS/etc/valgrind-root.supp --suppressions=valgrind-nuwa01.supp --suppressions=vg03.supp --gen-suppressions=all  $(which python) $(which nuwa.py)  -A none --history=off -n 10 -H 33123 -R 975 -m"FMCP11a.runRadioact -r Co60_sst -d DayaBayAD2 -w 2010-07-01T16:00:00" >& vg04.log &
  • Results after processing
valsup.read Opened vg04.log
Found 395 stanzas, of which 284 were unique
len(poem) 284
after exclusion, len(poem) 152
Opened file vg04.supp
Wrote 152 stanzas, of which 0 were unexpected
  • Continue to iterate... (the definition of insanity is doing the same thing and expecting a different result)
 $SITEROOT/../external/valgrind/3.4.1/x86_64-slc5-gcc43-dbg/bin/valgrind  -v --tool=memcheck --demangle=yes --num-callers=50 --error-limit=no --leak-check=full --show-reachable=yes --suppressions=$ROOTSYS/etc/valgrind-root.supp --suppressions=valgrind-nuwa01.supp --suppressions=vg03.supp --suppressions=vg04.supp --gen-suppressions=all  $(which python) $(which nuwa.py)  -A none --history=off -n 10 -H 33123 -R 975 -m"FMCP11a.runRadioact -r Co60_sst -d DayaBayAD2 -w 2010-07-01T16:00:00" >& vg05.log &
  • After processing with valsupp.py:
valsup.read Opened vg05.log
Found 336 stanzas, of which 228 were unique
len(poem) 228
after exclusion, len(poem) 103
Opened file vg05.supp
Wrote 103 stanzas, of which 0 were unexpected

20110922

  • Apparently all reporting cannot be suppressed. Let's see how identical it is
$SITEROOT/../external/valgrind/3.4.1/x86_64-slc5-gcc43-dbg/bin/valgrind  -v --tool=memcheck --demangle=yes --num-callers=50 --error-limit=no --leak-check=full --show-reachable=yes --suppressions=$ROOTSYS/etc/valgrind-root.supp --suppressions=valgrind-nuwa01.supp --suppressions=vg03.supp --suppressions=vg04.supp  $(which python) $(which nuwa.py)  -A none --history=off -n 10 -H 33123 -R 975 -m"FMCP11a.runRadioact -r Co60_sst -d DayaBayAD2 -w 2010-07-01T16:00:00" >& vg06a.log &
[1] 13814

 $SITEROOT/../external/valgrind/3.4.1/x86_64-slc5-gcc43-dbg/bin/valgrind  -v --tool=memcheck --demangle=yes --num-callers=50 --error-limit=no --leak-check=full --show-reachable=yes --suppressions=$ROOTSYS/etc/valgrind-root.supp --suppressions=valgrind-nuwa01.supp --suppressions=vg03.supp --suppressions=vg04.supp  $(which python) $(which nuwa.py)  -A none --history=off -n 10 -H 33123 -R 975 -m"FMCP11a.runRadioact -r Co60_sst -d DayaBayAD2 -w 2010-07-01T16:00:00" >& vg06b.log &
[2] 15168
  • Files are almost identical. Wrote a little python script to remove prefix containing process id that is inserted by valgrind. Then compared the files:
 svn export http://dayabay.ihep.ac.cn/svn/dybsvn/people/djaffe/OPW/rvgp.pyA    rvgp.pyExport complete.
 python rvgp.py vg06a.log | python ../../MDC10b/tests/novox.py - | grep -v Time> uvg06a.log
 python rvgp.py vg06b.log | python ../../MDC10b/tests/novox.py - | grep -v Time> uvg06b.log
 diff -s uvg06a.log uvg06b.log 
30980c30980
<  translate:            fast SP updates identified: 641,526 ( 90.1%)
---
>  translate:            fast SP updates identified: 641,527 ( 90.1%)
30983,30985c30983,30985
<      tt/tc: 128,703,571 tt lookups requiring 22,689,846,735 probes
<      tt/tc: 128,703,571 fast-cache updates, 232 flushes
<   transtab: new        481,284 (12,590,883 -> 172,298,878; ratio 136:10) [0 scs]
---
>      tt/tc: 128,703,445 tt lookups requiring 22,689,793,366 probes
>      tt/tc: 128,703,445 fast-cache updates, 232 flushes
>   transtab: new        481,286 (12,590,910 -> 172,299,381; ratio 136:10) [0 scs]
30988,30989c30988,30989
<  scheduler: 68,686,868,278 jumps (bb entries).
<  scheduler: 686,868/252,166,341 major/minor sched events.
---
>  scheduler: 68,686,868,712 jumps (bb entries).
>  scheduler: 686,868/252,166,235 major/minor sched events.
  • Can make a nosetest with usual reference comparison. Will need to park suppression files somewhere....

20111010

  • Make my own debug installation daya0001:/data0/djaffed/MINE3/
  • ./dybinst trunk all begun Mon Oct 10 09:05:45 EDT 2011
    • Fail Installing setuptools ... failed with 1
    • Assume some glitch, try cp ../MINEbis/external/tarFiles/setuptools-0.6c11-py2.7.egg external/tarFiles/.<.code>
    • ./dybinst trunk external setuptools nose xmlnose ipython more mysql_python django data SQLAlchemy virtualenv
    • now fail Installing nose ... failed with 1
    • did not setup proxy yet. try it
    • . /afs/rhic.bnl.gov/dayabay/software/trunk/setup_bnl_proxy.sourceme
    • ./dybinst trunk external nose xmlnose ipython more mysql_python django data SQLAlchemy virtualenv
    • DONE
  • ./dybinst trunk projects start Mon Oct 10 11:11:53 EDT 2011
  • DONE
  • ./dybinst trunk tests
  • DONE. OK