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!

What’s New in HPC Research: Volcanoes, Mobile Games, Proteins & More

July 14, 2020

In this bimonthly feature, HPCwire highlights newly published research in the high-performance computing community and related domains. From parallel programming to exascale to quantum computing, the details are here. Read more…

By Oliver Peckham

Joliot-Curie Supercomputer Used to Build First Full, High-Fidelity Aircraft Engine Simulation

July 14, 2020

When industrial designers plan the design of a new element of a vehicle’s propulsion or exterior, they typically use fluid dynamics to optimize airflow and increase the vehicle’s speed and efficiency. These fluid dyn Read more…

By Oliver Peckham

U.S. CTO Michael Kratsios Adds DoD Research & Engineering Title

July 13, 2020

Michael Kratsios, the U.S. Chief Technology Officer, has been appointed acting Undersecretary of Defense for research and engineering. He replaces Mike Griffin, who along with his deputy Lis Porter, stepped down last wee Read more…

By John Russell

Supercomputer Research Reveals Star Cluster Born Outside Our Galaxy

July 11, 2020

The Milky Way is our galactic home, containing our solar system and continuing into a giant band of densely packed stars that stretches across clear night skies around the world – but, it turns out, not all of those st Read more…

By Oliver Peckham

Max Planck Society Begins Installation of Liquid-Cooled Supercomputer from Lenovo

July 9, 2020

Lenovo announced today that it is supplying a new high performance computer to the Max Planck Society, one of Germany's premier research organizations. Comprised of Intel Xeon processors and Nvidia A100 GPUs, and featuri Read more…

By Tiffany Trader

AWS Solution Channel

INEOS TEAM UK Accelerates Boat Design for America’s Cup Using HPC on AWS

The America’s Cup Dream

The 36th America’s Cup race will be decided in Auckland, New Zealand in 2021. Like all the teams, INEOS TEAM UK will compete in a boat whose design will have followed guidelines set by race organizers to ensure the crew’s sailing skills are fully tested. Read more…

Intel® HPC + AI Pavilion

Supercomputing the Pandemic: Scientific Community Tackles COVID-19 from Multiple Perspectives

Since their inception, supercomputers have taken on the biggest, most complex, and most data-intensive computing challenges—from confirming Einstein’s theories about gravitational waves to predicting the impacts of climate change. Read more…

Xilinx Announces First Adaptive Computing Challenge

July 9, 2020

A new contest is challenging the computing world. Xilinx has announced the first Xilinx Adaptive Computing Challenge, a competition that will task developers and startups with finding creative workload acceleration solutions. Xilinx is running the Adaptive Computing Challenge in partnership with Hackster.io, a developing community... Read more…

By Staff report

Max Planck Society Begins Installation of Liquid-Cooled Supercomputer from Lenovo

July 9, 2020

Lenovo announced today that it is supplying a new high performance computer to the Max Planck Society, one of Germany's premier research organizations. Comprise Read more…

By Tiffany Trader

President’s Council Targets AI, Quantum, STEM; Recommends Spending Growth

July 9, 2020

Last week the President Council of Advisors on Science and Technology (PCAST) met (webinar) to review policy recommendations around three sub-committee reports: Read more…

By John Russell

Google Cloud Debuts 16-GPU Ampere A100 Instances

July 7, 2020

On the heels of the Nvidia’s Ampere A100 GPU launch in May, Google Cloud is announcing alpha availability of the A100 “Accelerator Optimized” VM A2 instance family on Google Compute Engine. The instances are powered by the HGX A100 16-GPU platform, which combines two HGX A100 8-GPU baseboards using... Read more…

By Tiffany Trader

Q&A: HLRS’s Bastian Koller Tackles HPC and Industry in Germany and Europe

July 6, 2020

In this exclusive interview for HPCwire – sadly not face to face – Steve Conway, senior advisor for Hyperion Research, talks with Dr.-Ing Bastian Koller about the state of HPC and its collaboration with Industry in Europe. Koller is a familiar figure in HPC. He is the managing director at High Performance Computing Center Stuttgart (HLRS) and also serves... Read more…

By Steve Conway, Hyperion

OpenPOWER Reboot – New Director, New Silicon Partners, Leveraging Linux Foundation Connections

July 2, 2020

Earlier this week the OpenPOWER Foundation announced the contribution of IBM’s A21 Power processor core design to the open source community. Roughly this time Read more…

By John Russell

Hyperion Forecast – Headwinds in 2020 Won’t Stifle Cloud HPC Adoption or Arm’s Rise

June 30, 2020

The semiannual taking of HPC’s pulse by Hyperion Research – late fall at SC and early summer at ISC – is a much-watched indicator of things come. This yea Read more…

By John Russell

Racism and HPC: a Special Podcast

June 29, 2020

Promoting greater diversity in HPC is a much-discussed goal and ostensibly a long-sought goal in HPC. Yet it seems clear HPC is far from achieving this goal. Re Read more…

Top500 Trends: Movement on Top, but Record Low Turnover

June 25, 2020

The 55th installment of the Top500 list saw strong activity in the leadership segment with four new systems in the top ten and a crowning achievement from the f Read more…

By Tiffany Trader

Supercomputer Modeling Tests How COVID-19 Spreads in Grocery Stores

April 8, 2020

In the COVID-19 era, many people are treating simple activities like getting gas or groceries with caution as they try to heed social distancing mandates and protect their own health. Still, significant uncertainty surrounds the relative risk of different activities, and conflicting information is prevalent. A team of Finnish researchers set out to address some of these uncertainties by... Read more…

By Oliver Peckham

[email protected] Turns Its Massive Crowdsourced Computer Network Against COVID-19

March 16, 2020

For gamers, fighting against a global crisis is usually pure fantasy – but now, it’s looking more like a reality. As supercomputers around the world spin up Read more…

By Oliver Peckham

[email protected] Rallies a Legion of Computers Against the Coronavirus

March 24, 2020

Last week, we highlighted [email protected], a massive, crowdsourced computer network that has turned its resources against the coronavirus pandemic sweeping the globe – but [email protected] isn’t the only game in town. The internet is buzzing with crowdsourced computing... Read more…

By Oliver Peckham

Supercomputer Simulations Reveal the Fate of the Neanderthals

May 25, 2020

For hundreds of thousands of years, neanderthals roamed the planet, eventually (almost 50,000 years ago) giving way to homo sapiens, which quickly became the do Read more…

By Oliver Peckham

DoE Expands on Role of COVID-19 Supercomputing Consortium

March 25, 2020

After announcing the launch of the COVID-19 High Performance Computing Consortium on Sunday, the Department of Energy yesterday provided more details on its sco Read more…

By John Russell

Neocortex Will Be First-of-Its-Kind 800,000-Core AI Supercomputer

June 9, 2020

Pittsburgh Supercomputing Center (PSC - a joint research organization of Carnegie Mellon University and the University of Pittsburgh) has won a $5 million award Read more…

By Tiffany Trader

Honeywell’s Big Bet on Trapped Ion Quantum Computing

April 7, 2020

Honeywell doesn’t spring to mind when thinking of quantum computing pioneers, but a decade ago the high-tech conglomerate better known for its control systems waded deliberately into the then calmer quantum computing (QC) waters. Fast forward to March when Honeywell announced plans to introduce an ion trap-based quantum computer whose ‘performance’ would... Read more…

By John Russell

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

Leading Solution Providers

Contributors

Nvidia’s Ampere A100 GPU: Up to 2.5X the HPC, 20X the AI

May 14, 2020

Nvidia's first Ampere-based graphics card, the A100 GPU, packs a whopping 54 billion transistors on 826mm2 of silicon, making it the world's largest seven-nanom Read more…

By Tiffany Trader

‘Billion Molecules Against COVID-19’ Challenge to Launch with Massive Supercomputing Support

April 22, 2020

Around the world, supercomputing centers have spun up and opened their doors for COVID-19 research in what may be the most unified supercomputing effort in hist Read more…

By Oliver Peckham

Australian Researchers Break All-Time Internet Speed Record

May 26, 2020

If you’ve been stuck at home for the last few months, you’ve probably become more attuned to the quality (or lack thereof) of your internet connection. Even Read more…

By Oliver Peckham

15 Slides on Programming Aurora and Exascale Systems

May 7, 2020

Sometime in 2021, Aurora, the first planned U.S. exascale system, is scheduled to be fired up at Argonne National Laboratory. Cray (now HPE) and Intel are the k Read more…

By John Russell

Summit Supercomputer is Already Making its Mark on Science

September 20, 2018

Summit, now the fastest supercomputer in the world, is quickly making its mark in science – five of the six finalists just announced for the prestigious 2018 Read more…

By John Russell

TACC Supercomputers Run Simulations Illuminating COVID-19, DNA Replication

March 19, 2020

As supercomputers around the world spin up to combat the coronavirus, the Texas Advanced Computing Center (TACC) is announcing results that may help to illumina Read more…

By Staff report

$100B Plan Submitted for Massive Remake and Expansion of NSF

May 27, 2020

Legislation to reshape, expand - and rename - the National Science Foundation has been submitted in both the U.S. House and Senate. The proposal, which seems to Read more…

By John Russell

John Martinis Reportedly Leaves Google Quantum Effort

April 21, 2020

John Martinis, who led Google’s quantum computing effort since establishing its quantum hardware group in 2014, has left Google after being moved into an advi Read more…

By John Russell

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