400 likes | 549 Vues
Numerical Excellence. François Cassier Jonathan Gibson. 23 rd January 2012 CERN. Agenda. Introduction to NAG NAG Fortran Compiler NAG’s Numerical Libraries and Toolboxes NAG Fortran and C Libraries NAG Toolbox for MATLAB ... NAG HPC Services. Introduction to NAG.
E N D
Numerical Excellence François Cassier Jonathan Gibson 23rd January 2012 CERN
Agenda Introduction to NAG NAG Fortran Compiler NAG’s Numerical Libraries and Toolboxes NAG Fortran and C Libraries NAG Toolbox for MATLAB ... NAG HPC Services
Introduction to NAG Founded in 1970 as a co-operative project in UK Operates as a commercial, not-for-profit organization Worldwide operations Oxford & Manchester, UK Chicago, US Tokyo, Japan Taipei, Taiwan Over 3,000 customer sites worldwide Staff of ~100, over 50% technical, over 25 PhDs September 14
Numerical Algorithms Group - What We Do NAG provides mathematical and statistical algorithm libraries widely used in industry and academia Committed to research & development Library code written and contributed by some of the world’s most renowned mathematicians and computer scientists Many collaborative projects – e.g. CSE Support to the UK’s largest supercomputer, HECToR
Partnerships with leading academics University of Aachen University of Birmingham Illinois Institute of Technology Fudan University K U Leuven Kings College London University of Manchester New York University Osaka City University University of Oxford Universita di Roma I Shanghai University Stanford University University of Strathclyde National University of Singapore University of Tennessee Tsinghua University University of Warwick
Portfolio Numerical Libraries Highly flexible for use in many computing languages, programming environments, hardware platforms and for high performance computing methods NAG Fortran Compiler and GUI based Windows Compiler: Fortran Builder Visualization and graphics software Build data visualization applications with NAG’s IRIS Explorer Algorithmic Differentiation (New) Also called “Automatic Differentiation” Consultancy services
NAG development philosophy First priority: accuracy Second priority: performance How fast do you want the wrong answer? Algorithms chosen for usefulness robustness accuracy stability speed
NAG Fortran Compiler World’s first Fortran 90 compiler Developed and enhanced to include Fortran 95 and most features of Fortran 2003. Regularly updated, fully supported. EXCELLENT (the world’s best) checking compiler
NAG Fortran Builder (Windows version) Integrated Development Environment for NAG compiler on Windows PC Perfectly integrated with NAG Library NAG example program templates Extra facilities: tools e.g. Fortran Polisher, Fortran converter, LAPACK examples Integrated debugger
New Features – NAG Compiler 5.3 • Fortran 2008 Features • BLOCK construct, ISO_FORTRAN_ENV, etc. • OpenMP 3.0 • Most commonly used features • More Fortran 2003 Features • FINAL subroutines, etc. • Other New Features • Performance improvements, additional error checking, integrated tools
Why Use NAG Maths Libraries and Toolboxes? Global reputation for quality – accuracy, reliability and robustness… Extensively tested, supported and maintained code Reduce development time Concentrate on your key areas Components Fit into your environment Simple interfaces to your favourite packages Regular performance improvements!
NAG Library and Toolbox Contents Root Finding Summation of Series Quadrature Ordinary Differential Equations Partial Differential Equations Numerical Differentiation Integral Equations Mesh Generation Interpolation Curve and Surface Fitting Optimization Approximations of Special Functions Dense Linear Algebra Sparse Linear Algebra Correlation & Regression Analysis Multivariate Methods Analysis of Variance Random Number Generators Univariate Estimation Nonparametric Statistics Smoothing in Statistics Contingency Table Analysis Survival Analysis Time Series Analysis Operations Research
New Features –NAG LibrariesMark 23 Mark 23 has new routines in many areas including... • Complex Lambert W function • Wavelet Transforms • One dimensional continuous transforms • Two dimensional discrete and multi-level transforms • ODE’s • BVP solution through Chebyshev pseudo-spectral method • Matrix Operations • Matrix exponentials • Functions of real symmetric and Hermitianmatricies • Lapack 3.2 Cholesky solvers and factorizations • Interpolation • Modified Shepard’s method in 4D/5D • Optimization • Minimization by quadratic approximation (BOBYQA) • Stochastic global optimization using PSO (most effective in the SMP library) • RNG’s • Generators of multivariate copulas • Skip-ahead for Mersenne Twister • L’Ecuyer MRG32K3a generator • Statistics • Quantiles of streamed data, bivariate Student’s t, and two probability density functions • Nearest correlation matrices • Hierarchical mixed effects regression • Quantile regression • Peirce Outlier detection • Anderson–Darling goodness-of-fit
NAG Librairies Availability • NAG Fortran Library (FL) • NAG Library for SMP & Multi Cores (FS) • NAG Parallel Library (FD) • NAG C Library (CL) • NAG Library for .NET (DT) • NAG Toolbox for MATLAB (MB)
O/S & Compilers Supporting Wide Range of O/S Windows Linux Mac Solaris AIX HP-UX 32-bit, 64-bit ... Support leading compilers (Fortran, C & C++, .NET) NAG Intel, Pathscale, PGI GCC, GFortran Absoft, Lahey, Visual C++ ...
NAG Libraries Ease of Integration C++ (various) CUDA OpenCL Visual Basic Java Borland Delphi Python F# … and more Excel MATLAB SciLab Octave Mathematica Maple LabVIEW R and S-Plus SAS … and more
NAG Toolbox for MATLAB Contains essentially all NAG Library functionality not a subset Fully integrated into MATLAB many routine arguments become optional easier to read code can be used with MATLAB compiler complete documentation for each routine inside MATLAB or PDF including examples Easy migration to production code in C/C++ or Fortran
NAG Toolbox help chapters NAG formatting (in PDF) MATLAB formatting
How to call the NAG routine Calling the NAG routinein MATLAB MATLAB plot
NAG Toolbox for MATLAB Offers complementary functionality to MATLAB Alternative to several specialist toolboxes From www.walkingrandomly.com: “I really like the NAG Toolbox for MATLAB for the following reasons: It has saved my employer, The University of Manchester, a lot of money since we don’t need as many licenses for toolboxes such as Statistics, Optimisation, Curve Fitting and Splines. It can speed up MATLAB calculations – see my article on MATLAB’s interp1 function for example. Their support team is superb.”
NAG Library for SMP & Multicore • Based on standard NAG Fortran Library • Uses OpenMP to exploit SMP architecture • Mark 23 available soon • Identical interfaces to standard Fortran Library • just re-link the application • easy access to parallelism for non-specialists • user is shielded from details of parallelism • assists rapid migration from serial code • can be used along with user’s own parallelism • i.e. within the user’s own OpenMP or MPI code
Interoperability • We want to bring benefits of SMP to multiple environments • Currently: • Fortran 77 and 90 (with interface blocks available) • From C programs via NAG C Header files • Toolbox for Matlab (Windows now, Linux soon) • Investigating technical issues for other possibilities: • Better C support via NAG C Library interfaces (“C SMP Library”) • Excel
NAG Library Functionality Root Finding Summation of Series (e.g. FFT) Quadrature Ordinary Differential Equations Partial Differential Equations Numerical Differentiation Integral Equations Mesh Generation Interpolation Curve and Surface Fitting Optimisation Approximations of Special Functions Wavelet Transforms Dense Linear Algebra Sparse Linear Algebra Correlation and Regression Analysis Multivariate Analysis of Variance Random Number Generators Univariate Estimation Nonparametric Statistics Smoothing in Statistics Contingency Table Analysis Survival Analysis Time Series Analysis Operations Research
S.V.D. (DBDSQR) Improved serial performance too NCPU Performance (Mflops) Problem size (N) netlib DBDSQR + ACML BLAS SMP DBDSQR+ ACML BLAS
E01TGF/E01THF: Interpolation Intel Xeon E5310 1.6 GHz, N=100,000 Time (secs) Number of cores
G13EAF: Kalman filter (1 iteration) AMD Magny-Cours, dual socket, 2.2 GHz N=2000, M=L=1000 Time (secs) Number of cores
C09EAF: 2-D discrete wavelet transform AMD Magny-Cours, dual socket, 2.2 GHz M=N=15000, DB8, Half, Forward Time (secs) Number of cores
Coming later this year in Mark 23 • New parallel routines in the areas of: • Particle Swarm Optimization • Pseudo Random Number Generator • 2D wavelet routines • 4D and 5D interpolation routines
Some CSE successes so far • Speed and Scalability of Key Materials Science Code (CASTEP) Quadrupled • Speed and I/O Performance of Oceanography Code (NEMO) Enhanced • Performance of Quantum Monte-Carlo Application (CASINO) Quadrupled • Speed and Scalability of Materials Science Simulations (CP2K) Enhanced • Performance of Atmospheric Chemistry Simulations (GLOMAP/TOMCAT) Enhanced • Performance of Geodynamic Thermal Convection Simulations (CITCOM) Enhanced • Scalability of Fluid Turbulence Simulations (EBL) Enhanced up to 40x • Simulations of Catalytic Chemistry with ChemShell 8x Faster • Scalability of Ocean Modelling Application (Fluidity-ICOM) Dramatically Improved • Performance of Molecular Dynamics Application (DL_POLY_3) 20x Faster • Capabilities of Key Materials Science Application (CASTEP) Significantly Enhanced • Performance of Heart Modelling Application (CARP) 20x Faster • Performance of Turbulent Fluid Flow Simulations (Incompact3D) Improved by factor of 6x • Performance and Capabilities of Materials Science Code (Conquest) Enhanced • Aircraft Noise Simulations (CABARET) Get Faster and Reach Bigger Models http://www.hector.ac.uk/cse/reports/
Specialist HPC Training • We offer a wide selection of courses • From introductory programming courses • Fortran 95 (2/3 days) • Parallel Programming with MPI (2/3 days) • OpenMP (2/3 days) • An Introduction to CUDA Programming (2 days) • An Introduction to OpenCL Programming (2 days) • To courses for more experienced programmers • Debugging, Profiling and Optimising (3 days) • Parallel I/O (1 day) • Multicore (1 day) • As well as bespoke courses to meet your specific requirements
Summary NAG for Quality, World-leading Numerical Software Components accurate, reliable, robust extensively tested, supported and maintained code updated for new architectures and new algorithms NAG for Expertise in HPC Services To build HPC capability CSE Services Trainings
NAG Key Contacts www.nag.co.uk Technical Support and Help support@nag.co.uk NAG: fcassier@nag.com NAGNews http://www.nag.co.uk/NAGNews/Index.asp
Further Information NAG Products http://www.nag.co.uk/products_and_services.asp NAG C Library http://www.nag.co.uk/numeric/CL/CLdescription.asp NAG Toolbox for MATLAB http://www.nag.co.uk/numeric/MB/start.asp NAG Toolbox for MATLAB – some demos can be found via here: http://www.nag.co.uk/numeric/MB/product_demonstrations.asp NAG and Octave http://www.nag.co.uk/doc/TechRep/html/Tr4_09/Tr4_09.asp NAG And Scilab http://www.nag.co.uk/doc/techrep/html/TR5_09/TR5_09.asp NAG Data Mining Components http://www.nag.co.uk/numeric/dr/drdescription.asp NAG and Excel http://www.nag.co.uk/numeric/callingDLLsfromotherlang.asp NAG and Java http://www.nag.co.uk/doc/TechRep/html/Tr1_04/Tr1_04.asp NAG and R http://www.nag.co.uk/numeric/RunderWindows.asp NAG and GPUs http://www.nag.co.uk/numeric/GPUs/ NAG Library for .NET (beta) http://www.nag.co.uk/numeric/DT/DTdescription.asp Calling NAG DLLs from C# http://www.nag.co.uk/numeric/csharp.asp Download software from http://www.nag.co.uk/downloads/index.asp NAGNews http://www.nag.co.uk/NAGNews/index.asptechnical articles and news