COSMOS Team Achieves 100x Speedup on Cosmology Code

By Tiffany Trader

August 24, 2015

One of the most popular sessions at the Intel Developer Forum last week in San Francisco, and certainly one of the most exciting from an HPC perspective, brought together two of the world’s foremost experts in parallel programming to discuss current state-of-the-art methods for leveraging parallelism on processors and coprocessors. The speakers, Intel’s Jim Jeffers and James Reinders, are also the co-editors of the just-published “High Performance Parallelism Pearls Volume Two: Multicore and Many-core Programming Approaches.”

You aren’t likely to meet two more engaging and engaged programmers who make learning about this stuff fun, even for this non-coder interloper. In writing the two volumes, the duo saw “example after example get performance and performance portability with ‘just parallel programming.'”

Many of the chapters focus on porting codes to the MIC Phi multicore processor, but in the process, the Xeon processors also accrued significant speedups, often 5x or more. As for why developers did not exploit this parallelism until they had the Phi in hand, Reinders and Jeffers refer to this phenomenon as the “inspiration of 60+ cores.”

High Performance Parallelism Pearls Vol2 coverLike the first volume, High Performance Parallelism Pearls Volume Two (Morgan Kaufmann, 2015) offers a sampling of successful programming efforts, demonstrating how to leverage parallelism from Intel Xeon and Xeon Phi processors across multiple vertical domains in science and industry. The book has been published with the spirit of knowledge sharing and all of the figures and source code are available for download to facilitate further exploration.

The IDF15 session (see slides) was focused on providing the developer audience with useful stories and examples for programming for high performance. While the editors are careful in saying they don’t have favorite chapters, the success story related in chapter 10, titled “Cosmic Microwave Background Analysis: Nested Parallelism in Practice,” stands out for its scientific accomplishment and for its programming prowess.

The chapter, which is featured on the cover of the book, highlights the work of researchers in Stephen Hawking’s group at the University of Cambridge, who achieved over a 100x speedup with optimizations carried out in the process of porting their code to the Intel Xeon Phi coprocessor (Knights Corner). The theoretical physicists at Cambridge use a simulation code called MODAL to probe the Cosmic Background Radiation (CMB), a microwave frequency background radiation left over from the Big Bang. In analyzing this data from the origin of the universe and verifying it against theoretical observations, the team is reconstructing the CMB bispectrum for the first time. What is truly remarkable is that in seeking to understand how the universe emerged out of an intense period of expansion, called inflation, the research team has found evidence of extra dimensions.

A production run using the original Modal code (unoptimized, pure MPI) takes about six hours on 512 Intel Xeon E5-4650L cores of the COSMOS SGI supercomputer. If it can be sped-up then it will greatly enhance the cross-validation process, which requires the code be run many times.

Write the authors:

“The calculation performed by Modal is a prime candidate for Intel Xeon Phi coprocessors — the inner product calculations are computationally very expensive, independent of one another, and require very little memory (with production runs using only O(100) MB of RAM and writing only O(1) MB to disk). However, the code as written does not express this calculation in a way that is conducive to the utilization of modern hardware. Our acceleration of Modal therefore has two components: tuning the code to ensure that it runs efficiently (i.e., optimization); and enabling the code to scale across vectors and many cores (i.e., modernization). Extracting performance from current and future generations of Intel Xeon processors and Intel Xeon Phi coprocessors is impossible without parallelism, and the process of optimization and modernization presented here is imperative for ensuring that COSMOS stay at the forefront of cosmological research.”

The chapter — written by James P. Briggs, James R. Fergusson, Juha Jäykkä, Simon J. Pennycook and Edward P. Shellard — details the 10-step process of optimizations, illustrated below:

Accelerating Cosmic Microwave Background Briggs speedup

Accelerating Cosmic Microwave Background Briggs code versions 1-10

The experiment was carried out using a dual socket Intel Xeon processor E5-4650L and an Intel Xeon Phi coprocessor 5110P with the Intel Composer XE 2015 (v15.0.0.090) compiler.

In addition to showcasing the potentially paradigm-changing science that is being enabled, the chapter, and a related paper from the authors, are salient teaching tools, reflecting the hallmarks of effective parallelism, including one that is sometimes omitted from discussion.

Here Jeffers begins reviewing what he and Reinders have long identified as the three most important vectors of parallelism: “data locality, that is making sure your data is structured properly for the parallelism pipeline; threading or scalability; and then vectorization, taking advantage of the syncing capability.”

“But what did we forget?” Reinders calls out.

“What we forgot,” said Jeffers, “is that you should actually analyze your code and see from an algorithm standpoint what you might be able to do to improve your code.”

“So the biggest leap here was this,” Jeffers continues. “[The developers] were moving forward with parallelism, you see they are getting pretty good gains up through [code version] six. They are moving forward. They have the original code. They did some loop modifications and then at number three, Intel MKL integration routines come in. When they hit step seven, they have been v-tuning their code, looking at the hotspots, and then boom, the MKL integration routine is the hotspot. So they picked the one that best met the inputs and outputs they wanted. It turns out they didn’t need all the power of that, the precision, etc. So they wrote their own. They used the new trapezium rule integrator and bang [performance shoots up] — so, it’s not all about the three vectors.”

“So don’t forget your algorithms,” adds Reinders, emphatically. “Do you really need the algorithm you are using? They went from a 10x to a 60x speedup in that one step, and it was an algorithm change and it affected Xeon and Xeon Phi almost equally.”

“And this is a production code,” Jeffers emphasizes, “extremely important to them, to their analysis, and really to the world in understanding the universe.”

From the COSMOS team: “We find that using a simple trapezium rule integrator combined with hand-selected sampling points (to improve accuracy in areas of interest) provides sufficient numerical accuracy to obtain a physically meaningful result, and the reduced space and time requirements of this simplified method give a speed-up of O(10x).”

A summary of the team’s conclusions appears in a presentation posted to manycore.com:

CMD Intel Cambridge Briggs Conclusions
“The total speed-up relative to the original baseline code is close to 100x on both platforms,” the authors write in chapter 10 of the new Pearls volume. “Further the results shown here use only two processor sockets or one coprocessor–by dividing the complete problem space across nodes using MPI, and then subdividing across the processor and coprocessor present in each node, the calculation can be accelerated even further. These optimizations have thus enabled COSMOS to completely change the way in which the code is used; rather than running on the entire system for hours, after careful selection of cosmological parameters, Modal can now be incorporated as part of a larger Monte Carlo pipeline to quickly evaluate the likelihood of alternative parameters.”

On the IDF15 showroom floor, Intel demonstrated a visualization of the cosmic background radiation rendered with the open-source OSPRay Ray Tracing engine running live on two pre-production Intel Knights Landing cards connected by the Omni-Path pre-production fabric. Being able to observe the Planck data with this tool allows scientists to see correlations predicted by Einstein’s theory of general relativity.

Intel COSMOS CBR visualization IDF15 1200x

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!

Royalty-free stock illustration ID: 1675260034

Solving Heterogeneous Programming Challenges with SYCL

December 8, 2021

In the first of a series of guest posts on heterogenous computing, James Reinders, who returned to Intel last year after a short "retirement," considers how SYCL will contribute to a heterogeneous future for C++. Reinde Read more…

Quantinuum Debuts Quantum-based Cryptographic Key Service – Is this Quantum Advantage?

December 7, 2021

Quantinuum – the newly-named company resulting from the merger of Honeywell’s quantum computing division and UK-based Cambridge Quantum – today launched Quantum Origin, a service to deliver “completely unpredicta Read more…

SC21 Was Unlike Any Other — Was That a Good Thing?

December 3, 2021

For a long time, the promised in-person SC21 seemed like an impossible fever dream, the assurances of a prominent physical component persisting across years of canceled conferences, including two virtual ISCs and the virtual SC20. With the advent of the Delta variant, Covid surges in St. Louis and contention over vaccine requirements... Read more…

The Green500’s Crystal Anniversary Sees MN-3 Crystallize Its Winning Streak

December 2, 2021

“This is the 30th Green500,” said Wu Feng, custodian of the Green500 list, at the list’s SC21 birds-of-a-feather session. “You could say 15 years of Green500, which makes it, I guess, the crystal anniversary.” Indeed, HPCwire marked the 15th anniversary of the Green500 – which ranks supercomputers by flops-per-watt, rather than just by flops – earlier this year with... Read more…

AWS Arm-based Graviton3 Instances Now in Preview

December 1, 2021

Three years after unveiling the first generation of its AWS Graviton chip-powered instances in 2018, Amazon Web Services announced that the third generation of the processors – the AWS Graviton3 – will power all-new Amazon Elastic Compute 2 (EC2) C7g instances that are now available in preview. Debuting at the AWS re:Invent 2021... Read more…

AWS Solution Channel

Introducing AWS HPC Connector for NICE EnginFrame

HPC customers regularly tell us about their excitement when they’re starting to use the cloud for the first time. In conversations, we always want to dig a bit deeper to find out how we can improve those initial experiences and deliver on the potential they see. Read more…

Nvidia Dominates Latest MLPerf Results but Competitors Start Speaking Up

December 1, 2021

MLCommons today released its fifth round of MLPerf training benchmark results with Nvidia GPUs again dominating. That said, a few other AI accelerator companies participated and, one of them, Graphcore, even held a separ Read more…

Royalty-free stock illustration ID: 1675260034

Solving Heterogeneous Programming Challenges with SYCL

December 8, 2021

In the first of a series of guest posts on heterogenous computing, James Reinders, who returned to Intel last year after a short "retirement," considers how SYC Read more…

Quantinuum Debuts Quantum-based Cryptographic Key Service – Is this Quantum Advantage?

December 7, 2021

Quantinuum – the newly-named company resulting from the merger of Honeywell’s quantum computing division and UK-based Cambridge Quantum – today launched Q Read more…

SC21 Was Unlike Any Other — Was That a Good Thing?

December 3, 2021

For a long time, the promised in-person SC21 seemed like an impossible fever dream, the assurances of a prominent physical component persisting across years of canceled conferences, including two virtual ISCs and the virtual SC20. With the advent of the Delta variant, Covid surges in St. Louis and contention over vaccine requirements... Read more…

The Green500’s Crystal Anniversary Sees MN-3 Crystallize Its Winning Streak

December 2, 2021

“This is the 30th Green500,” said Wu Feng, custodian of the Green500 list, at the list’s SC21 birds-of-a-feather session. “You could say 15 years of Green500, which makes it, I guess, the crystal anniversary.” Indeed, HPCwire marked the 15th anniversary of the Green500 – which ranks supercomputers by flops-per-watt, rather than just by flops – earlier this year with... Read more…

Nvidia Dominates Latest MLPerf Results but Competitors Start Speaking Up

December 1, 2021

MLCommons today released its fifth round of MLPerf training benchmark results with Nvidia GPUs again dominating. That said, a few other AI accelerator companies Read more…

At SC21, Experts Ask: Can Fast HPC Be Green?

November 30, 2021

HPC is entering a new era: exascale is (somewhat) officially here, but Moore’s law is ending. Power consumption and other sustainability concerns loom over the enormous systems and chips of this new epoch, for both cost and compliance reasons. Reconciling the need to continue the supercomputer scale-up while reducing HPC’s environmental impacts... Read more…

Raja Koduri and Satoshi Matsuoka Discuss the Future of HPC at SC21

November 29, 2021

HPCwire's Managing Editor sits down with Intel's Raja Koduri and Riken's Satoshi Matsuoka in St. Louis for an off-the-cuff conversation about their SC21 experience, what comes after exascale and why they are collaborating. Koduri, senior vice president and general manager of Intel's accelerated computing systems and graphics (AXG) group, leads the team... Read more…

Jack Dongarra on SC21, the Top500 and His Retirement Plans

November 29, 2021

HPCwire's Managing Editor sits down with Jack Dongarra, Top500 co-founder and Distinguished Professor at the University of Tennessee, during SC21 in St. Louis to discuss the 2021 Top500 list, the outlook for global exascale computing, and what exactly is going on in that Viking helmet photo. Read more…

IonQ Is First Quantum Startup to Go Public; Will It be First to Deliver Profits?

November 3, 2021

On October 1 of this year, IonQ became the first pure-play quantum computing start-up to go public. At this writing, the stock (NYSE: IONQ) was around $15 and its market capitalization was roughly $2.89 billion. Co-founder and chief scientist Chris Monroe says it was fun to have a few of the company’s roughly 100 employees travel to New York to ring the opening bell of the New York Stock... Read more…

Enter Dojo: Tesla Reveals Design for Modular Supercomputer & D1 Chip

August 20, 2021

Two months ago, Tesla revealed a massive GPU cluster that it said was “roughly the number five supercomputer in the world,” and which was just a precursor to Tesla’s real supercomputing moonshot: the long-rumored, little-detailed Dojo system. Read more…

Esperanto, Silicon in Hand, Champions the Efficiency of Its 1,092-Core RISC-V Chip

August 27, 2021

Esperanto Technologies made waves last December when it announced ET-SoC-1, a new RISC-V-based chip aimed at machine learning that packed nearly 1,100 cores onto a package small enough to fit six times over on a single PCIe card. Now, Esperanto is back, silicon in-hand and taking aim... Read more…

US Closes in on Exascale: Frontier Installation Is Underway

September 29, 2021

At the Advanced Scientific Computing Advisory Committee (ASCAC) meeting, held by Zoom this week (Sept. 29-30), it was revealed that the Frontier supercomputer is currently being installed at Oak Ridge National Laboratory in Oak Ridge, Tenn. The staff at the Oak Ridge Leadership... Read more…

AMD Launches Milan-X CPU with 3D V-Cache and Multichip Instinct MI200 GPU

November 8, 2021

At a virtual event this morning, AMD CEO Lisa Su unveiled the company’s latest and much-anticipated server products: the new Milan-X CPU, which leverages AMD’s new 3D V-Cache technology; and its new Instinct MI200 GPU, which provides up to 220 compute units across two Infinity Fabric-connected dies, delivering an astounding 47.9 peak double-precision teraflops. “We're in a high-performance computing megacycle, driven by the growing need to deploy additional compute performance... Read more…

Intel Reorgs HPC Group, Creates Two ‘Super Compute’ Groups

October 15, 2021

Following on changes made in June that moved Intel’s HPC unit out of the Data Platform Group and into the newly created Accelerated Computing Systems and Graphics (AXG) business unit, led by Raja Koduri, Intel is making further updates to the HPC group and announcing... Read more…

Killer Instinct: AMD’s Multi-Chip MI200 GPU Readies for a Major Global Debut

October 21, 2021

AMD’s next-generation supercomputer GPU is on its way – and by all appearances, it’s about to make a name for itself. The AMD Radeon Instinct MI200 GPU (a successor to the MI100) will, over the next year, begin to power three massive systems on three continents: the United States’ exascale Frontier system; the European Union’s pre-exascale LUMI system; and Australia’s petascale Setonix system. Read more…

Hot Chips: Here Come the DPUs and IPUs from Arm, Nvidia and Intel

August 25, 2021

The emergence of data processing units (DPU) and infrastructure processing units (IPU) as potentially important pieces in cloud and datacenter architectures was Read more…

Leading Solution Providers

Contributors

D-Wave Embraces Gate-Based Quantum Computing; Charts Path Forward

October 21, 2021

Earlier this month D-Wave Systems, the quantum computing pioneer that has long championed quantum annealing-based quantum computing (and sometimes taken heat fo Read more…

HPE Wins $2B GreenLake HPC-as-a-Service Deal with NSA

September 1, 2021

In the heated, oft-contentious, government IT space, HPE has won a massive $2 billion contract to provide HPC and AI services to the United States’ National Security Agency (NSA). Following on the heels of the now-canceled $10 billion JEDI contract (reissued as JWCC) and a $10 billion... Read more…

The Latest MLPerf Inference Results: Nvidia GPUs Hold Sway but Here Come CPUs and Intel

September 22, 2021

The latest round of MLPerf inference benchmark (v 1.1) results was released today and Nvidia again dominated, sweeping the top spots in the closed (apples-to-ap Read more…

Three Chinese Exascale Systems Detailed at SC21: Two Operational and One Delayed

November 24, 2021

Details about two previously rumored Chinese exascale systems came to light during last week’s SC21 proceedings. Asked about these systems during the Top500 media briefing on Monday, Nov. 15, list author and co-founder Jack Dongarra indicated he was aware of some very impressive results, but withheld comment when asked directly if he had... Read more…

Ahead of ‘Dojo,’ Tesla Reveals Its Massive Precursor Supercomputer

June 22, 2021

In spring 2019, Tesla made cryptic reference to a project called Dojo, a “super-powerful training computer” for video data processing. Then, in summer 2020, Tesla CEO Elon Musk tweeted: “Tesla is developing a [neural network] training computer... Read more…

2021 Gordon Bell Prize Goes to Exascale-Powered Quantum Supremacy Challenge

November 18, 2021

Today at the hybrid virtual/in-person SC21 conference, the organizers announced the winners of the 2021 ACM Gordon Bell Prize: a team of Chinese researchers leveraging the new exascale Sunway system to simulate quantum circuits. The Gordon Bell Prize, which comes with an award of $10,000 courtesy of HPC pioneer Gordon Bell, is awarded annually... Read more…

Quantum Computer Market Headed to $830M in 2024

September 13, 2021

What is one to make of the quantum computing market? Energized (lots of funding) but still chaotic and advancing in unpredictable ways (e.g. competing qubit tec Read more…

IBM Introduces its First Power10-based Server, the Power E1080; Targets Hybrid Cloud

September 8, 2021

IBM today introduced the Power E1080 server, its first system powered by a Power10 IBM microprocessor. The new system reinforces IBM’s emphasis on hybrid cloud markets and the new chip beefs up its inference capabilities. IBM – like other CPU makers – is hoping to make inferencing a core capability... Read more…

  • arrow
  • Click Here for More Headlines
  • arrow
HPCwire