Potentially saving datacenters millions of CPU node hours, Intel and the University of Illinois at Urbana–Champaign (UIUC) have collaborated to develop AVX-512 optimizations for the NAMD scalable molecular dynamics code. These optimizations will be incorporated into release 2.15 with patches available for earlier versions. Users of the Frontera supercomputer at the Texas Advanced Computing Center (TACC) are already using the NAMD patch to help accelerate research into the pathology and treatment of COVID-19.[i]
Benchmarks show that Intel’s optimized version of this workhorse application can run up to 1.8x faster on Intel Xeon Scalable processors compared to the non-optimized version. Note that the 1.8x is coming from the Intel Xeon Gold 6148 results (specifically 0.66 compared to 1.17). The performance when combining both the software optimization and hardware performance of newer processors such as an Intel Xeon Platinum 9282 results in NAMD running 3x faster.
Considered a reference by the NAMD scientific community, the million atom STMV (Satellite Tobacco Mosaic Virus) benchmark is indicative of the relative performance improvement scientists can expect for their own simulations. A 1.8x speedup in the NAMD code means that scientists can potentially obtain their molecular modeling results 1.8x faster or have their runs tie up 1.8x fewer nodes.
David Hardy is a senior research programmer in the Theoretical and Computational Biophysics Group of the Beckman Institute at the University of Illinois at Urbana-Champaign and is the lead developer of NAMD. He says, “NAMD development continues to benefit from a long-standing relationship with Intel, providing critical insights into current and upcoming technology, together with software engineering expertise and code contributions to improve performance.”
Optimizing a top HPC application
NAMD (short for Nanoscale Molecular Dynamics) is a widely utilized application in the HPC space. [ii] Researchers use NAMD to simulate detailed atomic scale models that can illuminate molecular structural details of how a virus works and what aspects of its structure offer potential targets for vaccines and treatments.
John Cazes (director of High Performance Computing, TACC) sees a tremendous benefit for NAMD users at TACC: “From Stampede to Stampede2 and now on Frontera, NAMD has been a major tool for scientists using TACC resources. We track application usage regularly and NAMD is always in the top 5, if not number one, each quarter. The Intel and UIUC improvements to NAMD will benefit our users on both Stampede2 and Frontera. We look forward to updating our installs when version 2.15 with AVX-512 support is released.”
Million node hour savings scales to large systems
Intel believes the significant performance boost from the optimized NAMD code will allow researchers to achieve longer timescales in the simulation of relevant molecules associated with disease, and by extension enable them to better understand aspects of infection with atom-level detail.
More specifically, the Intel optimized code speeds the computation of non-bonded atomic operations, which consume most of the NAMD runtime. The optimization uses a “tile” algorithm [iii] that increases the computational efficiency of each computational node by exploiting the Intel AVX-512 vector units and larger cache of the Intel Xeon Scalable processors. The tile algorithm does not affect NAMD’s scaling behavior across nodes, so researchers essentially get a 1.8x more powerful supercomputer simply by using the optimized code on large simulations.
Benchmarks confirm the speedup potential. Shown below is the strong scaling of NAMD on the TACC Frontera supercomputer running two different large synthetic benchmark systems, each assembled from “gluing” the STMV periodic cube (1,066,628 atoms) into an array of STMV to produce a bigger periodic system. The smaller system consists of a 5x2x2 array of 20 STMV (totaling about 21M atoms), and the larger system consists of a 7x6x5 array of 210 STMV (totaling about 224M atoms). Shown in Figure 2 are the performance results of the three different versions of NAMD (AVX2, AVX-512, and AVX-512 tiles, as compared in Figure 1) running the two synthetic benchmark systems, confirming the speedup available from the latest AVX-512 Tiles optimization and demonstrating NAMD’s scalability on Frontera for large simulations. The three NAMD versions use the Charm++ runtime system with the UCX communication layer, all built with the Intel 2019 C++ compiler.
Understanding the impact
To understand the impact of the optimized NAMD code, consider the efforts of a research team from the University of California San Diego (UCSD) led by Rommie Amaro (professor of Chemistry and Biochemistry at UCSD).
TACC reports that Amaro and her team have already used about 2.3 million Frontera node hours for molecular dynamics simulations and modeling, the most among any researchers using the system to study COVID-19. [iv]
The project provides an example of the magnitude of compute resources involved in a single research study. According to the Intel benchmarks, the optimizations have the potential for million-node hour savings for just this one project. Mike Brown, principal engineer in HPC at Intel Corporation, adds, “The savings are cumulative. When added with the many research projects in molecular biophysics running NAMD on AVX-512 capable clusters, both at TACC and other institutions, the impact to science can be very significant.”
The societal impact of such large-scale molecular studies can be huge. Amaro is a corresponding author of another recent study in which simulations on the National Science Foundation (NSF)-funded Frontera supercomputer reveal surprising information about the atomic makeup of the coronavirus’s exterior shield. This shell is the part of the virus we are trying to destroy when we wash our hands for 20 seconds. Contact by rubbing with soap destroys this viral shield.
Once inside the body, this shell camouflages the virus so it can hide itself from defending antibodies in our immune system.
The study, published June 12, 2020 discovered that shield’s sugary coating of molecules, called glycans, also prime the coronavirus to infect a cell by changing the shape of an internal spike protein.
Amaro noted, “That was really surprising to see. It’s one of the major results of our study. It suggests that the role of glycans in this case is going beyond shielding to potentially having these chemical groups actually being involved in the dynamics of the spike protein,” she said.
She likened the action of the glycan to pulling the trigger of a gun. “When that bit of the spike goes up, the finger is on the trigger of the infection machinery.” Amaro said. “When it gets like that, all it has to do is come up against an ACE2 receptor in the human cell, and then it’s going to bind super tightly and the cell is basically infected.”
Visualizing the model dynamics provides a wealth of information
Scientists have to study and visualize the dynamics of these atomic level models so they can understand what the computer model is telling them.
The key word is “visualize” as scientists also require powerful visual capabilities that can display the tremendous amount of data generated by optimized models running on world class supercomputers. Molecular dynamics simulations performed with NAMD (and other packages) are all about depicting the atoms of the system in motion. However, it’s not just a question of modeling the system, it’s also about visualizing the dynamics. Both visualization and simulation are closely related.
Amaro describes the dynamics of a good viral model as a “computational microscope” that lets scientists study “the wiggles and jiggles of the atoms”. [v] The latter reference pays homage to Physicist Richard Feynman who famously said, “Everything that living things do can be understood in terms of the jiggling and wiggling of atoms.”[vi]
To give others a sense of the jiggly nature of the atoms in these simulations, Amaro’s team created a moving visualization of the coronavirus spiked-protein, which can give readers a sense. This visualization is based on research they performed at TACC.
Intel’s NAMD optimization work dovetails nicely with their open source SDVis (Software Defined Visualization) initiative with various industry collaborators which allows scientists to visualize huge data sets using CPUs – even on exascale supercomputers. [vii] Many major visualization tools such as ParaView, VisIt, and VMD (Visual Molecular Dynamics) have adopted the Intel SDVis libraries which include Embree, OSPRay, and OpenSWR.
For leadership research such as the coronavirus envelope simulations, the SDVis solutions are the right tool at the right time as they were designed to handle extremely large, data intensive visualizations. VMD in particular is pertinent as it was designed to be used in conjunction with NAMD, for the setup and analysis of the atomic scale systems,[viii] and has a demonstrated ability to render large models comprising hundreds of millions of atoms. [ix]
CPU-based rendering is becoming the norm in the HPC community. At TACC for example, Paul Navrátil (Director of Visualization, TACC) points out that, “CPU-based SDVis will be our primary visual analysis mode on Frontera.” Looking to the future, please see the article “Preparing for the Arrival of Aurora with CPU-based Interactive Visualization.” For general information on SDVis, please consult sdvis.org.
Intel NAMD optimizations offer significant improvements on Intel Xeon Scalable processor workload that will free millions of node hours of time for additional research. Benchmarks show that the optimized version with AVX-512 support can run up to 1.8x faster on Intel Xeon Scalable processors compared to the non-optimized version. The impact of these optimizations is cumulative.
UIUC and Intel continue to collaborate on software optimizations and algorithms to best exploit leading supercomputers, including Aurora, the planned U.S. exascale supercomputer to be located at Argonne National Laboratory. There is hope that NAMD will get even faster, as Mike Brown notes the CPU optimization work for NAMD is not done.
Besides NAMD, other Intel optimization efforts include LAMMPS (a molecular dynamics code), GROMACS (a package for protein, lipids, and nucleic acids simulation), AMBER (another molecular dynamics code), and others [x] to facilitate scientific innovation on the largest CPU-based supercomputers.
Rob Farber is a global technology consultant and author with an extensive background in HPC, AI, and teaching. Rob can be reached at [email protected]
[i] While NAMD 2.13 does include optimizations for vector computing (in part from previous collaboration between Intel and UIUC), the CPU algorithm that considers each interaction between pairs of atoms does not make the best use of AVX-512 vector units.