Simplifying the use of complex numbers with SYCL

science
Thomas Applencourt

ALCF's Thomas Applencourt and colleagues developed a method that streamlines the use of complex numbers in SYCL.

An ALCF-led team was awarded Most Outstanding Paper at the 2023 IWOCL & SYCLcon conference for "Standardizing complex numbers in SYCL."

Complex numbers are an integral part of running scientific simulations on high performance computing (HPC) systems.

The numbers, which represent the sum of real and imaginary numbers, allow researchers to create mathematical models that produce simulations involving quantum mechanics, fluid dynamics, and other phenomena.

“Everyone in HPC needs complex numbers to execute their science,” said Thomas Applencourt, an assistant computational scientist at the Argonne Leadership Computing Facility (ALCF). The ALCF is a U.S. Department of Energy (DOE) Office of Science user facility at DOE’s Argonne National Laboratory.

Nevin Liber accepts Most Outstanding Paper award at 2023 IWOCL & SYCLcon

ALCF's Nevin Liber (middle) accepts the Most Outstanding Paper award on behalf of the team at the 2023 IWOCL & SYCLcon conference.

Applencourt recently led a collaborative effort to create a method that streamlines the use of complex numbers in SYCL, a key programming framework for the Aurora exascale supercomputer. Aurora is an Intel-Hewlett Packard Enterprise system currently under construction at the ALCF. The team’s work, which was recognized as Most Outstanding Paper at the 2023 IWOCL & SYCLcon conference, provides an open-source library of complex numbers and associated math functions that can be used in computations carried out with SYCL.

“Before we developed this approach, researchers using SYCL had to create custom implementations for complex numbers for every simulation they wanted to perform,” Applencourt said. “Not only does it take time to make your own implementations, but it also opens the door to potential errors.”

“With our method, SYCL users now have something that is portable across different systems and something they know will lead to accurate results,” he added.

While most HPC programming tools are equipped to handle complex numbers, SYCL was originally created to aid in the development of graphics, so it did not account for the use of complex numbers needed in scientific computing. With support from Intel, Codeplay, the Khronos Group, DOE’s Exascale Computing Project and many partner organizations, SYCL has evolved considerably in recent years, emerging as an important framework for enabling portable programming across heterogeneous HPC architectures, including DOE’s exascale systems.

To test its functionality, the team collaborated with the developers of two applications: GENE and Milc-Dslash. GENE is a plasma microturbulence code used for fusion energy research. Milc-Dslash is a benchmark derived from Milc, a simulation code used for lattice quantum chromodynamics research. They found that the new SYCL implementation for complex numbers worked as intended with no significant impacts on application performance.

“With our new standardized implementation, you don’t have to worry about maintaining your own library for complex numbers,” said Kevin Harms, ALCF performance engineering team lead and co-author of the paper. “SYCL complex numbers provides a solution that should result in the same or similar performance whether you’re running on Aurora or other HPC systems.”

Looking ahead, the team is aiming to have their implementation integrated into the next SYCL specification, making it an official feature of the programming framework. Until then, their open-source implementation can be accessed at: https://github.com/argonne-lcf/SyclCPLX

In addition to Applencourt and Harms, the paper was co-authored by Brice Videau (Argonne), Nevin Liber (Argonne), Bryce Allen (Argonne/University of Chicago), Amanda Dufek (NERSC), Jefferson le Quellec (Codeplay), and Aiden Belton-Schure (Codeplay).

==========

The Argonne Leadership Computing Facility provides supercomputing capabilities to the scientific and engineering community to advance fundamental discovery and understanding in a broad range of disciplines. Supported by the U.S. Department of Energy’s (DOE’s) Office of Science, Advanced Scientific Computing Research (ASCR) program, the ALCF is one of two DOE Leadership Computing Facilities in the nation dedicated to open science.

Argonne National Laboratory seeks solutions to pressing national problems in science and technology. The nation's first national laboratory, Argonne conducts leading-edge basic and applied scientific research in virtually every scientific discipline. Argonne researchers work closely with researchers from hundreds of companies, universities, and federal, state and municipal agencies to help them solve their specific problems, advance America's scientific leadership and prepare the nation for a better future. With employees from more than 60 nations, Argonne is managed by UChicago Argonne, LLC for the U.S. Department of Energy's Office of Science.

The U.S. Department of Energy's Office of Science is the single largest supporter of basic research in the physical sciences in the United States and is working to address some of the most pressing challenges of our time. For more information, visit https://energy.gov/science