1 / 23

Test and Validation Studies of Mathematical Software Libraries

This summary highlights the work of a technical student at CERN LCG AA Meeting in September 2004, covering test and validation studies of mathematical software libraries. Topics include special functions, distributions, random numbers, frequency tests, point tests, numerical integration, and linear algebra. Results and conclusions are provided.

imorrison
Download Presentation

Test and Validation Studies of Mathematical Software Libraries

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Test and Validation Studies of Mathematical Software Libraries A summary of my work as a technical student at CERN LCG AA Meeting, 22. September 2004

  2. Special Functions • Comparison of numerical results • Performance • GSL-NAG-C and GSL-TMath • Bessel functions • Gamma, Logarithm of Gamma, Error function and Complementary Error function

  3. Results • GSL performed very well compared to NAG-C • Difference usually less than the estimated error • Bigger differences between GSL and TMath • Little difference in time for GSL • NAG-C and TMath are faster

  4. Timing of Special Functions • 100 000 function calls for Bessel I0, I1, J0 and J1 • 50 000 function calls for the rest

  5. Distributions • Comparison of numerical results • Performance in the evaluation • Generation of random numbers according to distribution • Comparison and Kolmogorov-Smirnov test • Normal distribution, Landau distribution, Gamma distribution, Poisson distribution and Chi-Square distribution

  6. Timing Results for some Distributions • 1 000 000 function calls

  7. Random Numbers According to Distribution

  8. Random Numbers • Two tests • Frequency test • Point test • Main generators from GSL • gsl_rng_mt19937 • gsl_rng_cmrg • gsl_rng_mrg • gsl_rng_taus • gsl_rng_taus2 • gsl_rng_gfsr4 • gsl_rng_ranlux389 • gsl_rng_ranlux • gsl_rng_ranlxd2

  9. Frequency Test Fill space in d dimensions with points formed from a sequence of random numbers. Look in a small volume and the frequency as the number of bins which maximize |Nodd-Neven|. gsl_rng_minstd

  10. Frequency Test • With this frequency, look other places in the space and compute Nodd. • Nodd should be normal distributed

  11. Results • 10 results for Nodd • Kolmogorov-Smirnov test • Taus, 8 dim and Ranlux389, 6 dim • New test for poor results • All passed

  12. Point Test • Arrange a sequence of random numbers into multidimensional points • Define distance between two points as • Find all points Pi that are closer to P1 than the mean-n*standard deviation (n=3,4,5) • Calculate the distance between Pi+1 and P2

  13. Point test • For the distance should be normal distributed. • Use Kolmogorov-Smirnov test • All generators pass

  14. Numerical Integration • Wrapper for existing gsl algorithms • Tested on a few number of integrals • Compare numerical results with analytical results • No difference larger than 10-7 (input tolerance), but need further testing

  15. Integrals

  16. Quadrature routines QAG – adaptive integration QAGUI – adaptive integration from zero to infinity QAGS – adaptive integration with singularities QNG – non-adaptive Gauss-Kronrod integration NB! Different integrals are used, marked with (*) on last slide Performance in Numerical Integration

  17. Linear Algebra • E. Myklebust summer student 2003 • A Comparative study of Numerical Linear Algebra Libraries • Particle Track Reconstruction, Kalman filter update equations • Multiplication, addition, inversion and transpose • Originally 2x2, 2x5, 5x2 and 5x5 • Extended to bigger matrices • 2x5, 4x10, 10x25 and 20x50 • CLHEP, uBLAS, LAPACK, GSL and ROOT • Used timer from SEAL base

  18. Results (Linux, P4 1.8 MHz ) • High RMS for GSL and LAPACK in 2x5 • Error with ROOT for 20x50

  19. Conclusions • GSL performs reasonably good • Both tests of randomness were passed by all the main generators from GSL • More testing is needed for the numerical integration • All test programs are in the SEAL cvs repository • A test suite can be easily created and automatically run for new SEAL releases • A written report of my work will be put on the webpage when finished

  20. Results

More Related