Preparing for Aurora: Optimizing a Computational Dynamics Solver for Exascale

June 2, 2022

June 2, 2022 — As part of a series aimed at sharing best practices in preparing applications for Aurora, Argonne is highlighting researchers’ efforts to optimize codes to run efficiently on graphics processing units.

Kris Rowe, a computational scientist at the Argonne Leadership Computing Facility (ALCF), is leading efforts to optimize the computational dynamics solver NekRS for deployment on Aurora, the ALCF’s forthcoming 2-exaflop system. The ALCF is a U.S. Department of Energy (DOE) Office of Science User Facility located at Argonne National Laboratory.

Researchers use NekRS for mission-critical DOE problems like the simulation of coolant flow inside small modular reactors, as the Exascale Computing Project’s (ECP) ExaSMR effort aims to accomplish.

Like a number of computational science engineering applications, NekRS relies on OCCA, an open-source, vendor-neutral framework and library for parallel programming on diverse architectures. OCCA enables the transparent generation of raw backend code, as well as just-in-time compilation that permits SYCL/DPC++-compatible kernel-caching.

NekRS makes heavy use of the OCCA framework to achieve performance portability, leveraging the OCCA runtime to manage GPU memory, enqueue computations on GPUs, and effect just-in-time compilation of math kernels. The runtime translates human-readable source code into machine-executable binary while the application is still running. Furthermore, all NekRS math kernels are implemented using OCCA Kernel Language (OKL).

Development of the DPC++ backend for the OCCA portability framework included implementation of a source-to-source compiler for translating OKL to DPC++.

Best Practices

  • Successively tackle code problems of increasing scale and complexity.
  • Use roofline analysis to identify compute-intensive kernels and focus optimization efforts.
  • Search alternative framework backends for useful features to incorporate.

Lessons Learned

  • Replacing rather than revising certain algorithms can save time and improve performance.
  • Select sample inputs representative of the science problems the application will be used for.

Version Changes to the Nek Application

NekRS, which began as an offshoot of libParanumal (an experimental set of finite element flow solvers developed at Virginia Tech), is composed, in contrast to its Fortran-based predecessor, predominantly of C++ code.

Beyond providing a user interface similar to that of computational dynamics solver Nek5000, the construction of NekRS represents a major departure from its predecessor. However, the NekRS developers have engineered their code to include significant backwards compatibility, enabling users to port their existing case files with minimal effort.

Nek5000 was originally designed for strong scaling—that is, to minimize the time-to-solution for a given problem. NekRS is likewise designed for strong scaling, but in terms of a much greater magnitude: exascale computational power will help carry out far larger multiscale and multiphysics simulations than were possible with previous generations of high-performance computing (HPC) systems.

The Aurora-optimized version of NekRS is expected to differ only slightly from other iterations of the NekRS source code. Because differences in the generation of compiler code and between GPU microarchitectures can significantly impact performance, code customization is concentrated among the most performance-critical compute kernels. The ALCF maintains a fork of NekRS (a copy of the source code) on its GitHub page to enable enhanced user accessibility and for further development and hardware-specific optimization.

Optimizing NekRS for Aurora

The NekRS optimization strategy, as with many HPC science codes, is to climb a ladder of increasingly complex problems. That is, the developers begin with small issues, often fit for a single compute node or server, before working to resolve large-scale difficulties.

A single science code can exhibit a wide range of performance characteristics depending on how it is being used or on the problem to which it is being applied. Due to such variations in behavior, it is important that performance be analyzed using sample inputs representative of the challenges that the code will be used to solve.

The ECP-supported ExaSMR effort provides an illustrative example. ExaSMR aims to model the entire core of a small module reactor, which as a simulation is far too large for a single node to generate. The NekRS developers, however, provided Rowe with a simulation of a single reactor rod as a representative test problem to execute on a single node.

This test case, in conjunction with the Intel performance tools VTune and Advisor, enabled Rowe to identify which stages of the NekRS solver process require the most time. Indeed, as is the case with many other science codes, a small number of math kernels are responsible for most of each GPU’s compute time. Identifying information of this kind—which is capable of reducing the amount of code being targeted from tens of thousands of lines to just a few hundred—is critical for accelerating optimization efforts.

Subsequent to identifying critical kernels, roofline analysis (as performed with Intel Advisor) calculates the difference between actual measured performance and the hardware’s theoretical peak. Moreover, the insights gleaned via roofline analysis can help determine which optimization techniques are most appropriate for a given situation, or even if an entirely new algorithm should be considered.

Such considerations of new algorithms have driven what Rowe considers to be some of his most interesting recent work. In one instance the researchers added an algorithm that exploits an algebraic structure known as the tensor product. The tensor product of the discretization methods used by NekRS permits a given kernel to be computed in multiple equivalent ways. For example, data for a single mesh element (subdomain) can be represented either as a large vector or as a cube of numbers. Both approaches have strengths and weaknesses and offer different advantages and disadvantages depending on the particular kernel, problem size, and hardware characteristics.

Once NekRS has been optimized for a single Aurora compute node, Rowe will use a sequence of larger test problems to optimize multi-node performance. Particular attention will be paid to MPI (message-passing interface) communication patterns exercised by the application. The final step will be to analyze the performance of NekRS as applied to the full ExaSMR reactor core problem at scale and running on the complete Aurora system.

Keeping OCCA Up to Date

The OCCA framework is compatible with kernels written in OKL in addition to those written in backend-specific code, such as SYCL. The primary goal in optimizing NekRS kernels is to improve performance to the maximum extent permitted by OKL kernels; OKL kernels were selected because they are immediately portable to other vendor architectures.

However, in certain cases additional performance improvements can be realized only by employing newer features that the SYCL programming model enables and for which no equivalents exist in OCCA. Subsequently, developers survey the programming models of alternative OCCA backends like CUDA, HIP, and OpenMP, for analogous features. In instances where such analogues exist, the feature can be introduced into the OCCA framework in a unified manner.

This is illustrative of one of OCCA’s strengths—its relative agility enables developers to it incorporate bleeding-edge developments as they occur.

To gauge the needs of OCCA users and better coordinate development, Rowe has led the effort to establish the OCCA Technical Advisory Forum (TAF). Holding open, biweekly meetings, the OCCA TAF brings together stakeholders from the DOE, U.S. universities, Intel, AMD, Shell, and CCG, among others.


Source: Nils Heinonen, Argonne Leadership Computing Facility

Subscribe to HPCwire's Weekly Update!

Be the most informed person in the room! Stay ahead of the tech trends with industy updates delivered to you every week!

Supercomputing Helps Explain the Milky Way’s Shape

September 30, 2022

If you look at the Milky Way from “above,” it almost looks like a cat’s eye: a circle of spiral arms with an oval “iris” in the middle. That iris — a starry bar that connects the spiral arms — has two stran Read more…

Top Supercomputers to Shake Up Earthquake Modeling

September 29, 2022

Two DOE-funded projects — and a bunch of top supercomputers — are converging to improve our understanding of earthquakes and enable the construction of more earthquake-resilient buildings and infrastructure. The firs Read more…

How Intel Plans to Rebuild Its Manufacturing Supply Chain

September 29, 2022

Intel's engineering roots saw a revival at this week's Innovation, with attendees recalling the show’s resemblance to Intel Developer Forum, the company's annual developer gala last held in 2016. The chipmaker cut t Read more…

Intel Labs Launches Neuromorphic ‘Kapoho Point’ Board

September 28, 2022

Over the past five years, Intel has been iterating on its neuromorphic chips and systems, aiming to create devices (and software for those devices) that closely mimic the behavior of the human brain through the use of co Read more…

DOE Announces $42M ‘COOLERCHIPS’ Datacenter Cooling Program

September 28, 2022

With massive machines like Frontier guzzling tens of megawatts of power to operate, datacenters’ energy use is of increasing concern for supercomputer operations – and particularly for the U.S. Department of Energy ( Read more…

AWS Solution Channel

Shutterstock 1818499862

Rearchitecting AWS Batch managed services to leverage AWS Fargate

AWS service teams continuously improve the underlying infrastructure and operations of managed services, and AWS Batch is no exception. The AWS Batch team recently moved most of their job scheduler fleet to a serverless infrastructure model leveraging AWS Fargate. Read more…

Microsoft/NVIDIA Solution Channel

Shutterstock 1166887495

Improving Insurance Fraud Detection using AI Running on Cloud-based GPU-Accelerated Systems

Insurance is a highly regulated industry that is evolving as the industry faces changing customer expectations, massive amounts of data, and increased regulations. A major issue facing the industry is tracking insurance fraud. Read more…

Do You Believe in Science? Take the HPC Covid Safety Pledge

September 28, 2022

ISC 2022 was back in person, and the celebration was on. Frontier had been named the first exascale supercomputer on the Top500 list, and workshops, poster sessions, paper presentations, receptions, and booth meetings we Read more…

How Intel Plans to Rebuild Its Manufacturing Supply Chain

September 29, 2022

Intel's engineering roots saw a revival at this week's Innovation, with attendees recalling the show’s resemblance to Intel Developer Forum, the company's ann Read more…

Intel Labs Launches Neuromorphic ‘Kapoho Point’ Board

September 28, 2022

Over the past five years, Intel has been iterating on its neuromorphic chips and systems, aiming to create devices (and software for those devices) that closely Read more…

HPE to Build 100+ Petaflops Shaheen III Supercomputer

September 27, 2022

The King Abdullah University of Science and Technology (KAUST) in Saudi Arabia has announced that HPE has won the bid to build the Shaheen III supercomputer. Sh Read more…

Intel’s New Programmable Chips Next Year to Replace Aging Products

September 27, 2022

Intel shared its latest roadmap of programmable chips, and doesn't want to dig itself into a hole by following AMD's strategy in the area.  "We're thankfully not matching their strategy," said Shannon Poulin, corporate vice president for the datacenter and AI group at Intel, in response to a question posed by HPCwire during a press briefing. The updated roadmap pieces together Intel's strategy for FPGAs... Read more…

Intel Ships Sapphire Rapids – to Its Cloud

September 27, 2022

Intel has had trouble getting its chips in the hands of customers on time, but is providing the next best thing – to try out those chips in the cloud. Delayed chips such as Sapphire Rapids server processors and Habana Gaudi 2 AI chip will be available on a platform called the Intel Developer Cloud, which was announced at the Intel Innovation event being held in San Jose, California. Read more…

More Details on ‘Half-Exaflop’ Horizon System, LCCF Emerge

September 26, 2022

Since 2017, plans for the Leadership-Class Computing Facility (LCCF) have been underway. Slated for full operation somewhere around 2026, the LCCF’s scope ext Read more…

Nvidia Shuts Out RISC-V Software Support for GPUs 

September 23, 2022

Nvidia is not interested in bringing software support to its GPUs for the RISC-V architecture despite being an early adopter of the open-source technology in its GPU controllers. Nvidia has no plans to add RISC-V support for CUDA, which is the proprietary GPU software platform, a company representative... Read more…

Nvidia Introduces New Ada Lovelace GPU Architecture, OVX Systems, Omniverse Cloud

September 20, 2022

In his GTC keynote today, Nvidia CEO Jensen Huang launched another new Nvidia GPU architecture: Ada Lovelace, named for the legendary mathematician regarded as Read more…

Nvidia Shuts Out RISC-V Software Support for GPUs 

September 23, 2022

Nvidia is not interested in bringing software support to its GPUs for the RISC-V architecture despite being an early adopter of the open-source technology in its GPU controllers. Nvidia has no plans to add RISC-V support for CUDA, which is the proprietary GPU software platform, a company representative... Read more…

AWS Takes the Short and Long View of Quantum Computing

August 30, 2022

It is perhaps not surprising that the big cloud providers – a poor term really – have jumped into quantum computing. Amazon, Microsoft Azure, Google, and th Read more…

US Senate Passes CHIPS Act Temperature Check, but Challenges Linger

July 19, 2022

The U.S. Senate on Tuesday passed a major hurdle that will open up close to $52 billion in grants for the semiconductor industry to boost manufacturing, supply chain and research and development. U.S. senators voted 64-34 in favor of advancing the CHIPS Act, which sets the stage for the final consideration... Read more…

Chinese Startup Biren Details BR100 GPU

August 22, 2022

Amid the high-performance GPU turf tussle between AMD and Nvidia (and soon, Intel), a new, China-based player is emerging: Biren Technology, founded in 2019 and headquartered in Shanghai. At Hot Chips 34, Biren co-founder and president Lingjie Xu and Biren CTO Mike Hong took the (virtual) stage to detail the company’s inaugural product: the Biren BR100 general-purpose GPU (GPGPU). “It is my honor to present... Read more…

Newly-Observed Higgs Mode Holds Promise in Quantum Computing

June 8, 2022

The first-ever appearance of a previously undetectable quantum excitation known as the axial Higgs mode – exciting in its own right – also holds promise for developing and manipulating higher temperature quantum materials... Read more…

AMD’s MI300 APUs to Power Exascale El Capitan Supercomputer

June 21, 2022

Additional details of the architecture of the exascale El Capitan supercomputer were disclosed today by Lawrence Livermore National Laboratory’s (LLNL) Terri Read more…

Tesla Bulks Up Its GPU-Powered AI Super – Is Dojo Next?

August 16, 2022

Tesla has revealed that its biggest in-house AI supercomputer – which we wrote about last year – now has a total of 7,360 A100 GPUs, a nearly 28 percent uplift from its previous total of 5,760 GPUs. That’s enough GPU oomph for a top seven spot on the Top500, although the tech company best known for its electric vehicles has not publicly benchmarked the system. If it had, it would... Read more…

Exclusive Inside Look at First US Exascale Supercomputer

July 1, 2022

HPCwire takes you inside the Frontier datacenter at DOE's Oak Ridge National Laboratory (ORNL) in Oak Ridge, Tenn., for an interview with Frontier Project Direc Read more…

Leading Solution Providers

Contributors

AMD Opens Up Chip Design to the Outside for Custom Future

June 15, 2022

AMD is getting personal with chips as it sets sail to make products more to the liking of its customers. The chipmaker detailed a modular chip future in which customers can mix and match non-AMD processors in a custom chip package. "We are focused on making it easier to implement chips with more flexibility," said Mark Papermaster, chief technology officer at AMD during the analyst day meeting late last week. Read more…

Nvidia, Intel to Power Atos-Built MareNostrum 5 Supercomputer

June 16, 2022

The long-troubled, hotly anticipated MareNostrum 5 supercomputer finally has a vendor: Atos, which will be supplying a system that includes both Nvidia and Inte Read more…

UCIe Consortium Incorporates, Nvidia and Alibaba Round Out Board

August 2, 2022

The Universal Chiplet Interconnect Express (UCIe) consortium is moving ahead with its effort to standardize a universal interconnect at the package level. The c Read more…

Using Exascale Supercomputers to Make Clean Fusion Energy Possible

September 2, 2022

Fusion, the nuclear reaction that powers the Sun and the stars, has incredible potential as a source of safe, carbon-free and essentially limitless energy. But Read more…

Is Time Running Out for Compromise on America COMPETES/USICA Act?

June 22, 2022

You may recall that efforts proposed in 2020 to remake the National Science Foundation (Endless Frontier Act) have since expanded and morphed into two gigantic bills, the America COMPETES Act in the U.S. House of Representatives and the U.S. Innovation and Competition Act in the U.S. Senate. So far, efforts to reconcile the two pieces of legislation have snagged and recent reports... Read more…

Nvidia, Qualcomm Shine in MLPerf Inference; Intel’s Sapphire Rapids Makes an Appearance.

September 8, 2022

The steady maturation of MLCommons/MLPerf as an AI benchmarking tool was apparent in today’s release of MLPerf v2.1 Inference results. Twenty-one organization Read more…

India Launches Petascale ‘PARAM Ganga’ Supercomputer

March 8, 2022

Just a couple of weeks ago, the Indian government promised that it had five HPC systems in the final stages of installation and would launch nine new supercomputers this year. Now, it appears to be making good on that promise: the country’s National Supercomputing Mission (NSM) has announced the deployment of “PARAM Ganga” petascale supercomputer at Indian Institute of Technology (IIT)... Read more…

Not Just Cash for Chips – The New Chips and Science Act Boosts NSF, DOE, NIST

August 3, 2022

After two-plus years of contentious debate, several different names, and final passage by the House (243-187) and Senate (64-33) last week, the Chips and Science Act will soon become law. Besides the $54.2 billion provided to boost US-based chip manufacturing, the act reshapes US science policy in meaningful ways. NSF’s proposed budget... Read more…

  • arrow
  • Click Here for More Headlines
  • arrow
HPCwire