******************************************************************
* RooFit - S T R E S S suite *
******************************************************************
******************************************************************
* Starting S T R E S S basic suite *
******************************************************************
Test 1 : Generate,Fit and Plot on basic p.d.f...................OK
Test 2 : Addition operator p.d.f................................OK
Test 3 : Product operator p.d.f.................................OK
Test 4 : Conditional product operator p.d.f.....................OK
Test 5 : Analytically convolved p.d.f...........................OK
Test 6 : Simultaneous operator p.d.f............................SKIPPED
Test 7 : Addition oper. p.d.f with range transformed fractions..SKIPPED
Test 8 : Multiple observable configurations of p.d.f.s..........OK
Test 9 : Formula expressions....................................OK
Test 10 : Functions of discrete variables........................OK
Test 11 : Workspace persistence..................................SKIPPED
Test 12 : Extended likelihood constructions......................OK
Test 13 : Data import and persistence............................OK
Test 14 : Plotting with variable bin sizes.......................OK
Test 15 : Likelihood ratio projections...........................OK
Test 16 : Complex slice projections..............................OK
Test 17 : Interactive fitting....................................OK
Test 18 : Lagrange multipliers...................................OK
Test 19 : Chi^2 fits.............................................OK
Test 20 : Use of conditional observables.........................OK
Test 21 : Constant term optimization.............................SKIPPED
Test 22 : Numeric Integration....................................SKIPPED
******************************************************************
* Darwin macbrun.local 8.10.1 Darwin Kernel Version 8.10.1: W
******************************************************************
******************************************************************
* ROOTMARKS = 747.9 * Root5.17/05 20071016/1544
******************************************************************
Q A S t r a t e g y f o r R o o F i t
********************************************
* stressRooFit package for QA testing (now operational)
----------------------------------------------------
- Replace set of private macros that were used so far for testing.
- Monolithic version in $ROOTSYS/test, modular development version
in $ROOTSYS/roofitcore/test.
- Now implements 17 tests excercising most aspects of RooFit.
Another 5 tests are foreseen by the end of next week to extend coverage
- Several of these tests excercise very complex projections and other
advanced manipulations of p.d.f.s. Suite timing is kept short by
reducing default number of input events for fits and projections.
- Input data is kept to minimum by generating data for fitting and
plotting from p.d.f rather than taking it from external source.
Testing framework sets seed of random generator to standard value
at begin of each test to ensure reproducibility.
- Basic test suite takes ~30 seconds, reference file ~100 Kb, mostly plots and fit results.
- Each test is based on RooFitUnitTest utility class that can perform automated
regression tests on
- RooPlots with (multiple) data and p.d.f projections,
- RooTables
- RooFitResults (full output including correlation matrix is tested)
- Double_t values
- Test will fail if runTest() function returns false (currently not used),
any ERROR or FATAL messages are logged through RooMsgService, or any of the
regression tests fail.
- Reference file automatically produced by running stressRooFit with '-w' option.
The reference file itself is easily validated manually as all plots and tables
are easily browsed or printed interactively.
* Memory leaks are checked by running valgrind on stressRooFit.
-------------------------------------------------------------
- I run each test separately using the '-n <#> -mc' arguments where <#> is the test
number and -mc activates the memory check mode.
- In memory check mode
- RooTrace memory tracing is activated (keeps track of all RooFit objects)
- Post-run regression tests are not performed as reference file I/O appears to leave some
objects in memory after file is closed that clutter valgrind output. Objects offered
for regression test are immediately deleted by test framework to avoid false leak reports.
- I run valgrind with following arguments
valgrind --suppressions=valgrind-suppression_ROOT.supp --suppressions=valgrind-suppression_ROOT_optional.supp \
--tool=memcheck --leak-check=full --show-reachable=yes
then I apply a home grown awk-based filter on output to weed out CINT-related leak reports that involve RooFit objects
in the trace as well as couple of other related patterns (TClass etc, full list below) . I also
filter out any leak pattern that does not involve any RooFit class.
Here is the relevant fragment of the filter script. buf[] is the array containing each leak report token
with buf[1] being the 'at' line of the report.
--- CINT leak ignore rules based on line 2 matching ---
if (match(buf[2],"G__store_dictposition")) doprint=0 ;
if (match(buf[2],"G__call_setup_funcs")) doprint=0 ;
if (match(buf[2],"G__search_tagname")) doprint=0 ;
if (match(buf[2],"G__allocvariable")) doprint=0 ;
if (match(buf[2],"G__memfunc_para_setup")) doprint=0 ;
if (match(buf[2],"G__add_ipath")) doprint=0 ;
if (match(buf[2],"G__getparameterlist")) doprint=0 ;
if (match(buf[2],"G__params::operator")) doprint=0 ;
if (match(buf[2],"G__stack_instance")) doprint=0 ;
if (match(buf[2],"G__createfuncmacro")) doprint=0 ;
if (match(buf[2],"G__malloc")) doprint=0 ;
if (match(buf[2],"G__createtemplateclass")) doprint=0 ;
if (match(buf[3],"_GLOBAL__I_gCINTMutex")) doprint=0 ;
if (match(buf[2],"G__add_setup_func")) doprint=0 ;
if (match(buf[2],"G__search_typename")) doprint=0 ;
if (match(buf[2],"G__herits::operator")) doprint=0 ;
if (match(buf[2],"G__savestring")) doprint=0 ;
if (match(buf[2],"G__set_class_autoloading_table")) doprint=0 ;
--- Other ROOT leak ignore rules based on line 2/3 matching ---
if (match(buf[2],"TFormula::Compile")) doprint=0 ; // Note that TFormula seems to have a leak
if (match(buf[2],"TFormula::Optimize")) doprint=0 ;
if (match(buf[2],"TCint::CreateListOfBaseClasses")) doprint=0 ;
if (match(buf[2],"TClassTable::TClassTable")) doprint=0 ;
if (match(buf[2],"TCint::SetClassInfo")) doprint=0 ;
if (match(buf[2],"TStringRef::GetRep")) doprint=0 ;
if (match(buf[2],"TGuiFactory::CreateApplicationImp")) doprint=0 ;
if (match(buf[3],"TApplication::CreateApplication")) doprint=0 ;
--- ROOT leak ignore rules based on any line matching ---
for (j=0 ; j<iline ; j++) {
if (match(buf[j],"GenerateInitInstance")) doprint=0 ;
if (match(buf[j],"ROOT::TGenericClassInfo::Init")) doprint=0 ;
if (match(buf[j],"ROOT::TDefaultInitBehavior::CreateClass")) doprint=0 ;
if (match(buf[j],"TClass::GetStreamerInfo")) doprint=0 ;
if (match(buf[j],"TClass::Streamer")) doprint=0 ;
if (match(buf[j],"TClass::CalculateStreamerOffset")) doprint=0 ;
}
The stressRooFit suite shows no valgrind memory access errors or conditional jumps on uninitialized values.
Also, with this level of filtering stressRooFit currently runs clean of leaks. To achieve this I fixed O(10)
small leaks in various places. In addition I have installed an automatic cleanup procedure that destroys all singleton
instances that RooFit creates using an atexit() handler which show up as leaks in --show-reachable=yes mode.
Massif profiling of stressRooFit shows a mostly flat time profile. The total amount allocated is
dominated by the large 2D lookup tables used for the fast complex error functions that are used by some
of the B physics p.d.f.s in the tests (which are also deleted by the atexit() handler)
* To be done
-----------
- Short term: Still need to tune tolerance settings for automated comparisons to avoid false alarm due
to numeric noise variations on different platforms.
- Short term: Finish 5 additional test in basic suite. Time scale one week.
- Long term: Implement 'Extended' suite of tests with another O(10) tests
that are too CPU intensive to be run routinely (couple of months)