Enhancing Numerical Computation Performance

Enhancing Numerical Computation Performance
Slide Note
Embed
Share

Explore techniques to optimize numerical code performance by considering technology choices, algorithmic strategies, and the impact of memory, compute, and I/O resources. Learn how to identify bottlenecks, create performance models, profile for improvements, and leverage parallelization for enhanced efficiency.

  • Numerical Computation
  • Optimization Strategies
  • Performance Modeling
  • Parallelization
  • Technology Choices

Uploaded on Mar 12, 2025 | 0 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.

E N D

Presentation Transcript


  1. Speeding up numerical computations Tuomas Koskela ARC Collaborations HPC subgroup t.koskela@ucl.ac.uk

  2. What limits performance of my numerical code? Technology choices Algorithmic choices Compute is cheap, memory is expensive Especially so with GPUs I/O is much more expensive Concurrency <-> Load balance Clock rates no longer increase, parallelism is key

  3. How to measure and improve performance Make a model of performance bottlenecks Profile to prove/disprove the model Predict behavior Optimize the code! Refactoring, parallelisation, algorithms, Verify predictions Repeat

  4. Roofline model example Arithmetic Intensity (AI) = Flops/Bytes presented to DRAM [1] Attainable Flop/s = min(Peak Flop/s, AI * Bandwidth) Memory/Cache locality modifications are observed as changes in AI Peak Flop/s Attainable Flop/s Memory Bound Compute Bound [1] S. Williams, et. al., CACM, vol. 52, no. 4, pp. 65-76, 2009. Arithmetic Intensity (Flop/Byte)

  5. Example: CONQUEST Density Functional Theory (DFT) Code Written in Fortran Parallelised with MPI from 1 to O(100 000) cores https://github.com/OrderN/CONQUEST-release Open source https://github.com/OrderN/CONQUEST-release Collaboration between UCL ARC and Dept of Physics under ARCHER2 eCSE programme

  6. Performance model & predictions Concurrency in loops over grid points is not being exploited Parallelising with OpenMP will yield speedups MPI based parallelism scales badly on systems with large nodes Will scale better if we can exploit distributed parallelism on-node Matrix multiplication performance is limited by communication Overlapping communication with computation will improve performance

  7. Loops over grid Scalapack diagonalisation 127s runtime OMP Threads idle

  8. Loops over grid OMP threaded Scalapack is now a bigger bottleneck 40s runtime OMP Threads Working

  9. Weak scaling measurement on ARCHER2 Pure MPI is ~30% faster on one node Hybrid MPI+OpenMP is ~30% faster on 32 nodes

  10. Messages sent out Rank 1 gets a slow receive, everyone else has to wait Same receive/wait pattern repeats

  11. Messages sent out

  12. Summary Many factors can limit code performance, usually it s not serial compute Profiling tools and techniques can help you reason about performance bottlenecks and fix them Contact us to collaborate on solving this kind of issues

More Related Content