Math LHCb Ivan Belyaev LHCb, CERN & ITEP/Moscow
4 Feb'2k+2 Computing Ivan Belyaev LHCb CERN & ITEP/Moscow 2 Math libraries “External” LHC Computing GRID project LHC Computing GRID project RTAG (Requirements and Technology Assessment Group) for math library review RTAG (Requirements and Technology Assessment Group) for math library review Review, requirements & recommendation, suggestions Review, requirements & recommendation, suggestions now now Real impact for LHCb Real impact for LHCb long term long term“Internal” What math libraries are currently actually used? What math libraries are currently actually used? OO world FORTRAN world What we need in nearest future? What we need in nearest future? e.g. LHCb-light studies: no FOTRAN - no CERNLIB? How to distribute our software ? licence How to distribute our software ? licence
4 Feb'2k+2 Computing Ivan Belyaev LHCb CERN & ITEP/Moscow 3 RTAG for math library review Chair: Frederic JAMES Chair: Frederic JAMES Mandate: Review the current situation with math libraries and make recommendations Mandate: Review the current situation with math libraries and make recommendations Review the current situation of the usage of the various math libraries in the experiments (including but not limited to NagC++, GSL, CLHEP, ROOT) Review the current situation of the usage of the various math libraries in the experiments (including but not limited to NagC++, GSL, CLHEP, ROOT) Identify and recommend which ones should be adopted, which ones could be discontinued Identify and recommend which ones should be adopted, which ones could be discontinued Suggest possible improvements to the existing ones Suggest possible improvements to the existing ones Estimate resources needed for this activity Estimate resources needed for this activity Timescale - Initial report in 1 month, final report within 2 months Timescale - Initial report in 1 month, final report within 2 months Makeup - Reps from experiments, IT/API (CLHEP), ROOT + additional members at chair’s discretion Makeup - Reps from experiments, IT/API (CLHEP), ROOT + additional members at chair’s discretion Guidance – The result of the RTAG should allow to establish a clear program of work to streamline the status of math libraries and find the maximum commonality between experiments, taking into account cost, maintenance and projected evolution of the experiment needs Guidance – The result of the RTAG should allow to establish a clear program of work to streamline the status of math libraries and find the maximum commonality between experiments, taking into account cost, maintenance and projected evolution of the experiment needs
4 Feb'2k+2 Computing Ivan Belyaev LHCb CERN & ITEP/Moscow 4 Existing math libs NagC NagC umentation/Nag_C/NAGd oc/cl/html/mark6.html umentation/Nag_C/NAGd oc/cl/html/mark6.html GSL: GSL: GNU Scientific Library GNU Scientific Library ry/gsl.html ry/gsl.html CLHEP (rudimentary) CLHEP (rudimentary) /lhc++/clhep/index.html /lhc++/clhep/index.html ROOT (all CERNLIB) ROOT (all CERNLIB) STL (rudimentary) STL (rudimentary) Geant4 (includes CLHEP) Geant4 (includes CLHEP) Fragments: Fragments: MidNight ( Minuit) ? What Else? What Else?
4 Feb'2k+2 Computing Ivan Belyaev LHCb CERN & ITEP/Moscow 5 General features I NagC and GSL General purpose powerful C- libraries General purpose powerful C- libraries Wide functionality Wide functionality Special functions Special functions Linear algebra Linear algebra Equation solvers Equation solvers Minimization Minimization Random numbers Random numbers Statistics Statistics Interpolation, extrapolation, integration,… Interpolation, extrapolation, integration,… Ugly user interface Ugly user interface High performance High performanceCLHEP “de-facto” standard “de-facto” standard Useful classes (C++) Useful classes (C++) Functionality Functionality Random numbers Rudimentary: Linear algebra very limited very inefficient Access to the functions No functions
4 Feb'2k+2 Computing Ivan Belyaev LHCb CERN & ITEP/Moscow 6 General features II STL Standard: Standard: Statistics Statistics General purpose templated classes like vectors, arrays, matrices: General purpose templated classes like vectors, arrays, matrices: Very efficient: in-lined and optimized Very efficient: in-lined and optimized rudimentary rudimentaryRoot CERNLIB CERNLIBGeant4 CLHEP CLHEP Special functions Special functions Interpolation, extrapolation, integration,… Interpolation, extrapolation, integration,…
4 Feb'2k+2 Computing Ivan Belyaev LHCb CERN & ITEP/Moscow 7 functionality (inverse view I) Special functions: Special functions: NagC NagC GSL GSL (Geant4) (Geant4) Statistics Statistics NagC NagC GSL GSL STL STL Minimization Minimization NagC NagC GSL GSL Ordinary equations Ordinary equations NagC GSL CLHEP (linear) Differential equations Differential equations NagC GSL Geant4 Random numbers Random numbers CLHEP NagC GSL
4 Feb'2k+2 Computing Ivan Belyaev LHCb CERN & ITEP/Moscow 8 functionality (inverse view II) Linear algebra classes: Linear algebra classes: matrices and vectors matrices and vectors CLHEP CLHEP “de-facto” standard “de-facto” standard Nice C++ interface Nice C++ interface STL STL The “standard” is not a standard yet (now) The “standard” is not a standard yet (now) C++ interface C++ interface NagC and SLT NagC and SLT C-interface, ugly, unfriendly C-interface, ugly, unfriendly Prone to memory leaks Prone to memory leaks Linear algebra operations CLHEP CLHEP limited functionality inefficient STL STL limited functionality very efficient NagC and GSL with ATLAS/C-BLAS NagC and GSL with ATLAS/C-BLAS excellent functionality very efficient Should be hidden !
4 Feb'2k+2 Computing Ivan Belyaev LHCb CERN & ITEP/Moscow 9 Current usage in LHCb Current usage in LHCb (as known for me) (as known for me) CLHEP (everywhere) CLHEP (everywhere) NagC NagC Special function(s) (Tr) Special function(s) (Tr) Linear algebra (Calo) Linear algebra (Calo) ? Could be substituted with GSL without problems! Could be substituted with GSL without problems! GSL need to be installed! GSL need to be installed! Win2K? Win2K? NagC has no visible advantages with respect to GSL NagC has no visible advantages with respect to GSL NagC requires the license NagC requires the license Panoramix/SoCalo distribution is illegal GSL is covered by GPL GSL is covered by GPL Quality? Performance? Quality? Performance? GSL allows: in-line optimization usage of specialized ATLAS/C-BLAS libraries
4 Feb'2k+2 Computing Ivan Belyaev LHCb CERN & ITEP/Moscow 10 (I think) we need Some internal LHCb review or discussion on the current and future usage of math libraries (I think) we need Some internal LHCb review or discussion on the current and future usage of math libraries Need to consider the replacement of NagC with GSL as soon as possible. Need to consider the replacement of NagC with GSL as soon as possible. GSL installation GSL installation LHCb area ? LHCb area ? CERN-wide ? CERN-wide ? My view could be biased My view could be biased and even wrong and even wrong For RTAG I need your help !