Exascale computing aspires to provide breakthrough solutions addressing today’s most critical challenges in scientific discovery, energy assurance, economic competitiveness, and national security. This has been the main target of the US Department of Energy (DOE) Exascale Computing Initiative (ECI). Formed in 2016, ECI aims to accelerate research, development, acquisition, and deployment projects to deliver exacale-computing capability to the DOE labs by the early to mid 2020s. ECI’s main component, the Exascale Computing Project (ECP), was launched to bring together research, development, and deployment activities as part of a capable exascale computing ecosystem to ensure an enduring exascale computing capability for the nation.
Exascale computing aims to meet the increasing demands from large scientific applications. Software targeting exascale is typically designed for heterogeneous architectures; henceforth, it is not only important to develop well-designed software, but also make it aware of the hardware architecture and efficiently exploit its power. Currently, several ECP applications rely on efficient computation of the Fast Fourier Transform (FFT); thus, one of the ECP-supported software technology efforts is the design and implementation of a Highly Efficient FFT for Exascale (heFFTe) library that targets the upcoming exascale supercomputers.
Considered one of the top 10 algorithms of the 20th century, the FFT is widely used by applications in science and engineering. This includes applications and diverse numerical software ranging from molecular dynamics to spectrum estimation, fast convolution and correlation, signal modulation, wireless multimedia applications, and machine learning. For all these applications, it is critical to have access to a heterogeneous, fast and scalable parallel FFT library, with an implementation that can take advantage of novel hardware components, and efficiently exploit their benefits.
Highly efficient implementations to compute FFT on a single node have been developed for a long time. One of the most widely used libraries is FFTW, which has been tuned to optimally perform in several architectures. Vendor libraries for this purpose have also been highly optimized; such is the case of MKL (Intel), ESSL (IBM), CUFFT (NVIDIA) and clFFT (AMD). Novel libraries are also being developed to further optimize single node FFT computation, e.g., FFTX. Most of the previous libraries have been extended to distributed-memory versions, some by the original developers, and others by different authors.
However, the current state-of-the-art FFT libraries are not scalable on large heterogeneous machines with many nodes or even on one node with multiple high-performance GPUs. Furthermore, these libraries require large FFTs in order to deliver acceptable performance on one GPU. Efforts to simply enhance classical and existing FFT packages with optimization tools and techniques—like autotuning and code generation—have so far not been able to provide the efficient, high-performance FFT library capable of harnessing the power of supercomputers with heterogeneous GPU-accelerated nodes. In particular, ECP applications that require FFT-based solvers might suffer from the lack of fast and scalable 3-D FFT routines for distributed heterogeneous parallel systems, which is the very type of system that will be used in upcoming Exascale machines.
heFFTe METHODOLOGY AND ALGRORITHMIC DESIGN
HeFFTe (pronounced “hefty”), provides very good (linear) scalability for large node count. It is open-source and consists of C++ and CUDA kernels with (CUDA-aware) MPI and OpenMP interface for communication. It has a user-friendly interface and does not require any commercial compiler. Wrappers to interface with C, Fortran and Python are available. Its main objective is to become the standard for large FFT computations on the upcoming exascale systems. Fig. 1 shows how heFFTe is positioned on the ECP software stack, and some of its target exascale applications (gray boxes).
Multidimensional FFTs can be performed by a sequence of low-dimensional FFTs. Typical approaches used by parallel libraries are the “pencil” and “slab” decompositions. Fig. 2 illustrates the pencil decomposition approach, which computes 3D FFTs by means of three batched 1D FFTs. The original domain is given on the left, spread on a 4x3x3 processor grid. Next is a communication step that redistributes the domain into 1D vectors (pencils) spreading entirely through one of the (3D) directions. Then, in parallel, each processor performs 1D FFTs on the pencils that it holds, followed by communication to form pencils in the next direction, 1D FFTs for that direction, repeat the same for the last direction, followed by final domain redistribution to the original domain. On the other hand, slab decomposition relies on computing sets of 2D and 1D FFTs.
Communications at Exascale
The current bottleneck for many applications is communication costs. On the Summit pre-exascale supercomputer at ORNL for example, a computational node can perform about 13,440 double precision floating-point (FP64) operations for the time it can receive (or send) a single FP64 value. Thus, if an algorithm does not perform about 13,440 operations per value sent (or received), the node will idle, waiting for data. The FFT does not provide this high value of data reuse. In fact, for a vector of size N, the number of FFT floating point operations is only O(N log2N), making FFTs memory-bound operations. A typical profile is shown on Figure 3, Right, where the MPI communications take more than 97% of the total time. A corresponding run on multi-core CPUs is given on Figure 3, Left. The local FFT operations are memory bound and take about 50% of the time. The other 50% are in MPI communications. heFFTe accelerates the local operations 43× using GPUs. However, MPI communications remained about the same, using CUDA-Aware MPI doing GPUDirect communication.
Fig. 4 illustrates the strong (Left) and weak (Right) scalability of heFFTe, also compared to the FFTE library. HeFFTe overcomes FFTE in performance by a factor of two and has better scalability. Scalability is very important for large-scale systems. In the strong scaling, the same problem is solved on increasing number of nodes, and the time to solution is ideally supposed to go down, proportional to the compute resources used. In weak scaling, both problem sizes and compute resources are proportionally increased, so ideally the time to solution will be a flat line, e.g., as achieved by heFFTe on Fig. 4, Right.
Read the full paper, published in Computational Science – ICCS 2020, to learn more about heFFTe, its performance on current supercomputers and use in ECP applications.