HPC Coding: The Power of L(o)osing Control

By Tobias Weinzierl

August 16, 2018

Presented is a summary of the ISC18 workshop “The power of l(o)osing control,” which asked the question: “when does a re-implementation of mature simulation fragments with novel HPC paradigms pay off?”

Exascale roadmaps, exascale projects and exascale lobbyists ask, on-again-off-again, for a fundamental rewrite of major code building blocks. Otherwise, so they claim, codes will not scale up. Naturally, some exascale projects bombard computational scientists with new domain-specific or domain-tailored languages, compiler extensions, frameworks, libraries and programming paradigms. The projects receive, in return, rewrites of simulation codes that are significantly faster. After a while. Or they get nothing at all, as users of the all the splendid new ideas find out that the proposed is not a fit to their requirements, the wheel of exascale innovations has already turned once more, or the rewrites have been that little bit more complex and more time-consuming than anticipated so that a complete rewrite finally became unfeasible. For our methodological evangelist, developing frameworks, languages, libraries, whatever would be such a joy, if only there were no or at least competent users . . .

The ISC18 workshop “The power of l(o)osing control”, organised by Tobias Weinzierl, did ask “when does a re-implementation of mature simulation fragments with novel HPC paradigms pay off?” More precisely, the organiser did ask “where is the pain barrier where consortia are willing to rewrite major code parts?”, “to which degree are mature simulation codes willing to give up control of SIMDsation, task scheduling, data placement, and so forth?” and “what information (arithmetic intensity, affinity, dependencies) should new paradigms expect their user codes to provide explicitly to frameworks?” Some answers to these questions from the workshop are summarised below. Even more questions did arise however.

I’m so sick of rewriting my code every time a new exascale project comes around the corner.   The workshop kicked off with historical remarks by Tobias. When his software base underlying the H2020 FETHPC project ExaHyPE [1] was first developed as a heroic green-field approach, caches and careful memory usage used to be the non plus ultra. So the code was made to support extremely dynamic and adaptive meshes. Soon after, vectorisation and multicores became headliners on the center stage. This made the developers rewrite significant code parts into regular data structures fitting to parallel fors—just to learn afterwards that task-based parallelism is the new kid on the block everybody loves most. Today, the code tasks. But the developers didn’t win that much in terms of productivity, as they now have to think about proper task sizes, task priorities, mapping of tasks to MPI calls, and so forth. They feel being caught in a never-ending rewrite of core code parts as hardware and programming paradigms evolve. The code at no point had been future-proof.

We took away their scheduling ownership, now we have to get their data structures.   The actual workshop followed this introduction. It featured six talks. Nathan Ellingwood from Sandia pointed out that their Kokkos project [2] started from a few heroic research code endeavours, too. It had been after that that they started to roll their ideas out as general-purpose ecosystem for legacy codes. One of Kokkos’ key techniques to obtain scaling code goes one step beyond the rewrites Tobias did complain about: They do not only provide parallel programming constructs. They also encourage the user to model their codes explicitly in terms of abstract data structures.

Nathan’s talk pointed out that working, i.e., scaling HPC DSLs and frameworks rely on data structures plus execution patterns. Teaming them up allows middleware or runtimes to deliver performance by choosing the right data structure realisation plus concurrency for the right platform. If we only focus on parallel programming constructs, it is, to some degree, not surprising if rewrites fail to deliver.

Thomas Fahringer discussed the rationale and lessons learned through the AllScale project [3]. He opened his presentation with the statement “I don’t believe in MPI+X+Y”. And notably, he doesn’t believe in task-based programming as the silver bullet for scalability either. Going one step beyond Nathan’s talk, he proposed to re-specify all codes in terms of their data structures plus concurrency, too, but to ask a compiler to derive the tasks and parallel constructs from hereon. The abstraction of data access plus data structure is not realised within a library or runtime, but made part of the actual translator. It can then rely on many complex code optimisation techniques such as the fusion of various parallel code regions. As such, “giving up control” is not a flaw, problem or challenge. Thomas: “It is a design principle.”

Richard Bower from Durham’s Institute of Computational Cosmology (ICC) seemed to be impressed by this idea. A team around him has written a major astrophysical SPH code from scratch. The new code SWIFT [4] expresses all of its data as small work items and formalises all work on these guys as tasks with dependencies. This green-field development allows their runtime to scale up. In a way, they seem also to rely on parallelism through parallel modelling of computations plus a formalisation of the used data structures. They just did it manually.

A controversial discussion broke off. How many data structures does a programming paradigm have to offer to allow scientists to write meaningful non-toy code? State-of-the-art physics combines all types of hierarchical meshes with FFTs, particle representations, and unstructured data sets. Or do sophisticated solutions always have to give the users the choice either to work with data structure specs plus tasks or solely parallel processing constructs? In this case, we would lose some of the academic purity of “giving up control”. Or do we need approaches where the user basically constructs her data structures? We did not find an answer, but it seems that thinking in tasks plus the data they work on is the right way to go: thinking only in terms of parallel fors or tasks doesn’t go far enough.

Garbage in, garbage out.   Michael Bader presented his Chameleon project [5] and added an interesting observation to this: In his work, compute nodes may steal tasks plus their data from other ranks upon demand. Michael was able to present impressive scalability. They show that stealing leverages MPI work imbalances. Coming back to the compiler vs. runtime, it seems that a conclusion whether work decomposition should be done statically or dynamically is nowhere near. There are so many great opportunities, if systems suddenly can freely distribute their tasks in a lightweight manner also beyond shared memory borders.

Richard’s endeavour computes proper work decompositions in regular intervals which can be issued by the user, while Thomas’ and Nathan’s tools take ownership of work distribution through abstract specifications of data structures. All approaches rely on the fact that the right level of concurrency is provided, and that proper heuristics—when does decomposition pay off, e.g.—do exist. As Daniel Weingaertner from the Universidade Federal do Paran`a in the audience pointed out: The art is exactly this, to hide technical details (load distribution but also tiny little parameters such as grain sizes or pinning) from the developer. And that’s where runtimes and compilers really can help. Otherwise, developers might provide garbage input data. Michael’s approach provided a useful additional dimension: His approach hinges on online performance measurements. If the conclusion holds that many compile-time, static tunings due to heuristics are doomed to fail with the complex machines we face today, his approach still will succeed. Exaggerated: There’s no such thing as garbage in (in terms of work decomposition), but there is garbage work distribution.

We use C/C++ to improve accessibility and then suffer from the language’s restrictions and syntactic overhead.   Any new programming model is worth developing if and only if there are users. And users have to be technically able to handle these models. Nathan’s, Richard’s, Thomas’ and Tobias’ approaches therefore all rely on C/C++. It seems that this language has finally become the ultimate to-be-used language. Bye, bye Fortran.

Harald Köstler kicked off his talk with “I have to say I’m surprised all people seem to use C++”. His refreshing talk was a tour de force through various studies on DSLs in HPC. They mainly orbit around stencil and multigrid codes. The ExaStencils/ExaSlang [6] project was one of them. Now, you might disagree with Harald that languages such as Scala or Lisp should be real candidates to program your next-generation-DSL—actually the majority of the audience first considered this to be a joke—but he made valid points: C++ templates are neither easy to maintain nor to use. Yet, most DSL extensions use generic meta programming. C++ itself is not a trivial, compact language. After all, it is way too generic to meet this goal. We consider it to be straightforward as we all are used to it, but how many young students bring along the right mastery of C++ already? Finally, just start to dream about opportunities that arise once you accept that you can use Just-In-Time compilation for example or stricter type checking. Indeed, Thomas had dropped an argument along these lines before: Compilers can contextualise code and tailor it to a situation. And if they fail due to a lack of information, they can at least let the user know that they’d prefer some more annotations, e.g. He admitted that compiling and understanding C++ was a painful exercise in AllScale. So maybe C++ is not the ultimate thing after all?

These computational scientists should be forced to rewrite everything from scratch from time to time anyway—this makes them tidy up their codes.  Richard and Tobias both gave talks on bigger pieces of software. While Tobias follows an incremental approach where core routines are replaced when new technologies emerge, Richard’s endeavour is a complete rewrite of well-established physics and algorithms with a task paradigm. With Tobias being unhappy about the zombie of rewrites—they never go away—it was natural to ask Richard: was it worth it?

This is a delicate question, as obviously it took his team quite a while to deliver the new code base. This is time “lost” for “actual” science. However, he came to the conclusion that it has been worth it nevertheless. It is easy to say this once your code is up and scaling, but Richard pointed out that there are two further success implications: His team has learned a lot about software. And his team has cleaned up the code.

Whenever one starts a complete rewrite, it is very human and convenient to sit down, and try to strip a code design off its historic ballast. Complete rewrites (triggering re-thinks) improve the code quality. It is however, as Richard pointed out, almost sad to recognise that interfaces then grow and become more complex again. You start with a neat, clean design and you end up again with a complex piece of code.

The Swiss army knife is just yet another framework.  The audience just started to digest Harald’s preferences for esoteric languages, when he confessed another thing: As far as he observes, most successful DSLs rely on fast and successful libraries under the hood. So the DSL’s job is not to come up with the performance. In most projects, it is its jobs to make the performance available to the user. Nathan had clarified before that Kokkos relies on BLAS et al., while Thomas’ talk did support this impression, too: His compiler also relies on libraries for performance-critical tasks. These observations relax the burden of scalability for DSLs.

In this context, Martin Kronbichler collected some ideas and lessons learned how to make a general-purpose library underlying many different codes perform. His work around deal.II [7] focuses on particular mesh types with “only” particular mesh entities and tensor-product styles, while deal.II provides manufactured data iterators and operators for popular operations. deal.II might not be a classic DSL, as it is very versatile. However, his work on purpose exploits particular characteristics and specialisations to get the whole thing fast.

Richard’s observation that their task system is tailored towards their particular application started some arguments around the question “what is a framework”? Many frameworks or libraries are probably not worth calling them that way, as they are effectively written for one particular purpose. Their programmers might claim that they are generic—they are computer scientists after all—but, at the end of the day, what they call frameworks simply realise plain functional decomposition. Different components in one piece of software do different things.

It was not clear among the workshop participants to which degree frameworks and DSLs had to be generic. Even the other way round, one might come to the conclusion that frameworks have to grow and evolve with their applications and deliver exactly the level of flexibility an actual project needs. Richard and Harald for example pointed out that they both look into structured vs. unstructured data structures or the decision when to store data as AoS or SoA. Some evergreens never disappear.

A few more implications from this project-framework co-design approach were discussed next: Richard clarified that starting from scratch is the easy part. The difficult part is to stop. Once a team has written component i itself—this will be the ultimate fit to the project— there is this temptation to write component i+1 as well. We did it for the mesh, why not also write our own load balancing? And the load balancing worked out really well (indeed it is an exact fit to our project though we are not really competitive with state-of-the-art libraries), wouldn’t it be clever to come up with our own few linear equation system solvers? And so forth . . . Perhaps the framework hasn’t been there in the first place. It grew and noone told it to stop. If this were the case, the term framework would describe a flaw rather than a cool computer science thing.

Come on, love me for the money.  Let’s forget about such heretic ideas and close the discussion with two observations. The first one was made by Richard and explicitly stated by Nathan: Their ecosystems started to flourish once they provided the right tools. Task graph plotters for task-based systems are an example. The best concept might be hard to digest if you don’t give developers the right tools that allow them to develop economically. The Kokkos and the deal.II team added the second mandatory ingredient for success: a reasonable user base and active engagement with that very base.

Both items highlight that continuous, long-term funding is essential for a successful introduction of (exascale) programming paradigms, runtimes, DSLs, compilers and frameworks. Consortia need the time and resources to build up a development ecosystem around any new programming concept and to equip them with the right tools. Establishing this does not materialise in immediate scientific output, and, at the same time, it has to start way before actual computational science can be made through a new paradigm. Well, finally there had been broad agreement among all workshop participants: The establishment of a community and ecosystem is something that requires resources, but it neither fits to standard projects of short and medium duration, nor to our project notion, which has to start from the computational challenge. In an ideal world, the ecosystem has to be there before to allow application specialists to assess it and to move into a mature environment to solve “their” problem. There should thus be more funding for the ecosystem not tied to particular application research questions.

About the Author

Tobias Weinzierl is Associate Professor at the Department of Computer Science at Durham University. His work orbits around novel algorithms and clever implementations for applications from scientific computing which employ state-of-the-art physics and mathematics. At the moment, his research focuses mainly on data flow/movement (minimisation), data structure (organisation) and programming paradigm challenges. He is particularly interested in dynamically adaptive multiscale methods based upon spacetrees that interact with multigrid solvers for elliptic and parabolic partial differential equations, that host particle systems with particles of varying cut-off radii or size, or carry Finite Volume-alike discretisations. He is involved in multiple scientific open source projects such as ExaHyPE [1] and Peano [8].

References
[1] ExaHyPE—an Exascale Hyperbolic PDE Engine. http://exahype.eu
[2] Kokkos—The C++ Performance Portability Programming Model. https://github.com/kokkos/kokkos/wiki
[3] AllScale—An Exascale Programming, Multi-objective Optimisation and Resilience Management Environment Based on Nested Recursive Parallelism. http://www.allscale.eu
[4] SWIFT—SPH With Inter-dependent Fine-grain Tasking. http://icc.dur.ac.uk/swift
[5] Chameleon—Eine Taskbasierte Programmierumgebung zur Entwicklung reaktiver HPC Anwendungen. http://www.chameleon-hpc.org
[6] Exastencils—Advanced Stencil-Code Engineering. http://www.exastencils.org
[7] deal.II—an open source finite element library. https://www.dealii.org
[8] Peano—a framework for dynamically adaptive Cartesian meshes. http://www.peanoframework.org

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!

The Present and Future of AI: A Discussion with HPC Visionary Dr. Eng Lim Goh

November 27, 2020

As HPE’s chief technology officer for artificial intelligence, Dr. Eng Lim Goh devotes much of his time talking and consulting with enterprise customers about how AI can benefit their business operations and products. Read more…

By Todd R. Weiss

SC20 Panel – OK, You Hate Storage Tiering. What’s Next Then?

November 25, 2020

Tiering in HPC storage has a bad rep. No one likes it. It complicates things and slows I/O. At least one storage technology newcomer – VAST Data – advocates dumping the whole idea. One large-scale user, NERSC storage architect Glenn Lockwood sort of agrees. The challenge, of course, is that tiering... Read more…

By John Russell

Exscalate4CoV Runs 70 Billion-Molecule Coronavirus Simulation

November 25, 2020

The winds of the pandemic are changing – for better and for worse. Three viable vaccines now teeter on the brink of regulatory approval, which will pave the way for broad distribution by April or May. But until then, COVID-19 cases are skyrocketing across the U.S. and Europe... Read more…

By Oliver Peckham

Azure Scaled to Record 86,400 Cores for Molecular Dynamics

November 20, 2020

A new record for HPC scaling on the public cloud has been achieved on Microsoft Azure. Led by Dr. Jer-Ming Chia, the cloud provider partnered with the Beckman Institute for Advanced Science and Technology at the Universi Read more…

By Oliver Peckham

Gordon Bell Special Prize Goes to Massive SARS-CoV-2 Simulations

November 19, 2020

2020 has proven a harrowing year – but it has produced remarkable heroes. To that end, this year, the Association for Computing Machinery (ACM) introduced the Gordon Bell Special Prize for High Performance Computing-Ba Read more…

By Oliver Peckham

AWS Solution Channel

Introducing AWS ParallelCluster as an Intel Select Solution

High performance computing (HPC) system owners can spend weeks or months researching, procuring, and assembling components to build HPC clusters to run their workloads. Understanding and managing the complexities of compute, storage, networking, and software requirements can be confusing and time-consuming, slowing innovation and results. Read more…

Intel® HPC + AI Pavilion

Intel Keynote Address

Intel is the foundation of HPC – from the workstation to the cloud to the backbone of the Top500. At SC20, Intel’s Trish Damkroger, VP and GM of high performance computing, addresses the audience to show how Intel and its partners are building the future of HPC today, through hardware and software technologies that accelerate the broad deployment of advanced HPC systems. Read more…

Gordon Bell Prize Winner Breaks Ground in AI-Infused Ab Initio Simulation

November 19, 2020

The race to blend deep learning and first-principle simulation to speed up solutions and scale up problems tackled is one of the most exciting research areas in computational science today. This year’s ACM Gordon Bell Prize winner announced today at SC20 makes significant progress in that direction. Read more…

By John Russell

The Present and Future of AI: A Discussion with HPC Visionary Dr. Eng Lim Goh

November 27, 2020

As HPE’s chief technology officer for artificial intelligence, Dr. Eng Lim Goh devotes much of his time talking and consulting with enterprise customers about Read more…

By Todd R. Weiss

SC20 Panel – OK, You Hate Storage Tiering. What’s Next Then?

November 25, 2020

Tiering in HPC storage has a bad rep. No one likes it. It complicates things and slows I/O. At least one storage technology newcomer – VAST Data – advocates dumping the whole idea. One large-scale user, NERSC storage architect Glenn Lockwood sort of agrees. The challenge, of course, is that tiering... Read more…

By John Russell

Exscalate4CoV Runs 70 Billion-Molecule Coronavirus Simulation

November 25, 2020

The winds of the pandemic are changing – for better and for worse. Three viable vaccines now teeter on the brink of regulatory approval, which will pave the way for broad distribution by April or May. But until then, COVID-19 cases are skyrocketing across the U.S. and Europe... Read more…

By Oliver Peckham

Azure Scaled to Record 86,400 Cores for Molecular Dynamics

November 20, 2020

A new record for HPC scaling on the public cloud has been achieved on Microsoft Azure. Led by Dr. Jer-Ming Chia, the cloud provider partnered with the Beckman I Read more…

By Oliver Peckham

Gordon Bell Special Prize Goes to Massive SARS-CoV-2 Simulations

November 19, 2020

2020 has proven a harrowing year – but it has produced remarkable heroes. To that end, this year, the Association for Computing Machinery (ACM) introduced the Read more…

By Oliver Peckham

Gordon Bell Prize Winner Breaks Ground in AI-Infused Ab Initio Simulation

November 19, 2020

The race to blend deep learning and first-principle simulation to speed up solutions and scale up problems tackled is one of the most exciting research areas in computational science today. This year’s ACM Gordon Bell Prize winner announced today at SC20 makes significant progress in that direction. Read more…

By John Russell

SC20 Keynote: Climate, Exascale & the Ultimate Answer

November 19, 2020

SC20’s keynote was delivered by renowned meteorologist and climatologist Bjorn Stevens, a director at the Max Planck Institute for Meteorology since 2008 and a professor at the University of Hamburg. In his keynote, Stevens traced the history of climate science from its earliest days through... Read more…

By Oliver Peckham

EuroHPC Exec. Dir. Talks Procurement, EPI, and Europe’s Efforts to Control its HPC Destiny

November 19, 2020

While much of the HPC community’s attention is fixed on SC20’s flood of news and new product announcements, Anders Dam Jensen, the newly-minted executive di Read more…

By Steve Conway

Nvidia Said to Be Close on Arm Deal

August 3, 2020

GPU leader Nvidia Corp. is in talks to buy U.K. chip designer Arm from parent company Softbank, according to several reports over the weekend. If consummated Read more…

By George Leopold

Supercomputer-Powered Research Uncovers Signs of ‘Bradykinin Storm’ That May Explain COVID-19 Symptoms

July 28, 2020

Doctors and medical researchers have struggled to pinpoint – let alone explain – the deluge of symptoms induced by COVID-19 infections in patients, and what Read more…

By Oliver Peckham

Azure Scaled to Record 86,400 Cores for Molecular Dynamics

November 20, 2020

A new record for HPC scaling on the public cloud has been achieved on Microsoft Azure. Led by Dr. Jer-Ming Chia, the cloud provider partnered with the Beckman I Read more…

By Oliver Peckham

Google Hires Longtime Intel Exec Bill Magro to Lead HPC Strategy

September 18, 2020

In a sign of the times, another prominent HPCer has made a move to a hyperscaler. Longtime Intel executive Bill Magro joined Google as chief technologist for hi Read more…

By Tiffany Trader

HPE Keeps Cray Brand Promise, Reveals HPE Cray Supercomputing Line

August 4, 2020

The HPC community, ever-affectionate toward Cray and its eponymous founder, can breathe a (virtual) sigh of relief. The Cray brand will live on, encompassing th Read more…

By Tiffany Trader

10nm, 7nm, 5nm…. Should the Chip Nanometer Metric Be Replaced?

June 1, 2020

The biggest cool factor in server chips is the nanometer. AMD beating Intel to a CPU built on a 7nm process node* – with 5nm and 3nm on the way – has been i Read more…

By Doug Black

NICS Unleashes ‘Kraken’ Supercomputer

April 4, 2008

A Cray XT4 supercomputer, dubbed Kraken, is scheduled to come online in mid-summer at the National Institute for Computational Sciences (NICS). The soon-to-be petascale system, and the resulting NICS organization, are the result of an NSF Track II award of $65 million to the University of Tennessee and its partners to provide next-generation supercomputing for the nation's science community. Read more…

Is the Nvidia A100 GPU Performance Worth a Hardware Upgrade?

October 16, 2020

Over the last decade, accelerators have seen an increasing rate of adoption in high-performance computing (HPC) platforms, and in the June 2020 Top500 list, eig Read more…

By Hartwig Anzt, Ahmad Abdelfattah and Jack Dongarra

Leading Solution Providers

Contributors

Aurora’s Troubles Move Frontier into Pole Exascale Position

October 1, 2020

Intel’s 7nm node delay has raised questions about the status of the Aurora supercomputer that was scheduled to be stood up at Argonne National Laboratory next year. Aurora was in the running to be the United States’ first exascale supercomputer although it was on a contemporaneous timeline with... Read more…

By Tiffany Trader

European Commission Declares €8 Billion Investment in Supercomputing

September 18, 2020

Just under two years ago, the European Commission formalized the EuroHPC Joint Undertaking (JU): a concerted HPC effort (comprising 32 participating states at c Read more…

By Oliver Peckham

Texas A&M Announces Flagship ‘Grace’ Supercomputer

November 9, 2020

Texas A&M University has announced its next flagship system: Grace. The new supercomputer, named for legendary programming pioneer Grace Hopper, is replacing the Ada system (itself named for mathematician Ada Lovelace) as the primary workhorse for Texas A&M’s High Performance Research Computing (HPRC). Read more…

By Oliver Peckham

Top500: Fugaku Keeps Crown, Nvidia’s Selene Climbs to #5

November 16, 2020

With the publication of the 56th Top500 list today from SC20's virtual proceedings, Japan's Fugaku supercomputer – now fully deployed – notches another win, Read more…

By Tiffany Trader

At Oak Ridge, ‘End of Life’ Sometimes Isn’t

October 31, 2020

Sometimes, the old dog actually does go live on a farm. HPC systems are often cursed with short lifespans, as they are continually supplanted by the latest and Read more…

By Oliver Peckham

Nvidia and EuroHPC Team for Four Supercomputers, Including Massive ‘Leonardo’ System

October 15, 2020

The EuroHPC Joint Undertaking (JU) serves as Europe’s concerted supercomputing play, currently comprising 32 member states and billions of euros in funding. I Read more…

By Oliver Peckham

Microsoft Azure Adds A100 GPU Instances for ‘Supercomputer-Class AI’ in the Cloud

August 19, 2020

Microsoft Azure continues to infuse its cloud platform with HPC- and AI-directed technologies. Today the cloud services purveyor announced a new virtual machine Read more…

By Tiffany Trader

Nvidia-Arm Deal a Boon for RISC-V?

October 26, 2020

The $40 billion blockbuster acquisition deal that will bring chipmaker Arm into the Nvidia corporate family could provide a boost for the competing RISC-V architecture. As regulators in the U.S., China and the European Union begin scrutinizing the impact of the blockbuster deal on semiconductor industry competition and innovation, the deal has at the very least... Read more…

By George Leopold

  • arrow
  • Click Here for More Headlines
  • arrow
Do NOT follow this link or you will be banned from the site!
Share This