Language Design for an Uncertain Hardware Future

By Roy Lurie

August 28, 2008

Do you know where your algorithms will be running two years from now? Five? Ten? Are you investing in code today that you will need to throw away? What language should you choose today for your algorithms, to protect your investment for the future?

Every industry faces increasing interest and need for high performance computing. From automotive simulation to financial risk modeling, to systems biology and communication systems design, the need for raw computing power has increased dramatically, and will continue to do so. With the advent of high performance computing, hardware will provide the platform needed for this work.

Some fear that the explosion of diversity in hardware architectures means that the hardware available today will be replaced by something faster and better just beyond the horizon. This has always been happening, but the “C” single processor model remained while the processor architecture evolved. In the world of FPGAs, GPGPUs, many-cores, accelerators, multicores, clusters, grids, Cell processors and reconfigurable hardware, this model is not working. How do you choose a strategy that insulates you from these changes?

Many organizations have algorithm intellectual property locked into a particular language or environment that makes it virtually impossible to migrate to new technology. Often the experts who understand the subtleties of these codes and the particular optimizations made to get the “best performance” are not around anymore. With an uncertain future, prematurely selecting your architecture, language, and algorithm will require you to, at best, invest heavily in migrating the code, or at worst, live with legacy systems beyond their useful life.

So, what should software developers and domain experts be demanding from language providers to reduce the risk of algorithm obsolescence?

A best practice in software engineering is, where possible, to write a program in the simplest way that is the easiest to understand and maintain. Don’t try to predict where the performance bottlenecks are going to be in the first pass. Once the algorithm is working correctly, run it to find the performance bottlenecks. Trying to optimize for performance before you have the right algorithm leads to speculative performance enhancements that make the code less readable and maintainable, and that doesn’t address the underlying performance issues because you guessed incorrectly. This article applies this logic to language design for the future of high performance systems.

Languages should allow domain experts to develop the right algorithm as quickly as possible, without worrying initially about architectural nuances. To optimize your long-term investment in algorithms, you need to be able to express the algorithm in the highest level of abstraction possible, without prematurely adding architecture- or system-specific constructs.

In this two-pass model, domain experts, like the scientists and engineers who will be major consumers of high performance computing systems, should be able to express their ideas in a natural way, allowing them to explore their solution space rapidly. To maximize their productivity, these experts should be able to focus on their core competencies. For example, image processing experts should have at hand a language whose semantics, syntax and functions match the domain’s normal expression of ideas. Allowing image processing experts to remain focused on the core algorithm concepts, rather than the mundane issues of memory allocation, threading or data handling, empowers them to rapidly create appropriate algorithms.

The second pass of this two-pass model is the ability for users to annotate the algorithm with additional information that will act as guides and input to the underlying execution engine in order to achieve optimal performance for a particular architecture. This might include annotations to describe parallelism in the algorithm. Clearly, there are situations where architecture drives algorithms, and a distinct two-pass model is infeasible.

A better approach would be for the language to require no annotation to make optimal use of a particular architecture. This “fully implicit” system requires only a single pass performing operations such as automatic parallelization. This is an active research area, with currently no general solution. So for the foreseeable future, some annotation will be needed to provide clues to the particular execution engine to perform optimally. Such a system can be described as “minimally explicit,” where the minimum amount of explicit information is needed to assist the execution engine in producing optimal performance.

An example of such an annotation is the PARFOR construct available in MATLAB. By annotating the FOR as a PARFOR, the user is annotating the FOR loop with information that says the contents of the FOR loop may be executed in any order. If additional computational resources are available, the underlying execution engine can evaluate the code in parallel for faster results. When executed on a single processor system, PARFOR behaves like a traditional FOR loop. When executed on a multicore machine or cluster, PARFOR can make use of the additional computational resources to evaluate the code in parallel for faster results. With an annotated approach, the same algorithm can be rendered to run on a single core CPU, a multicore shared memory system, a cluster or some specialized accelerator, for optimal performance.

Another example of such an annotation are the SPAWN and SYNC constructs provided by Cilk (http://supertech.csail.mit.edu/cilk/). Cilk is an algorithmic multithreaded language. The philosophy behind Cilk is that a programmer should concentrate on annotating the program to expose parallelism and exploit locality. Traditional serial C-code can be annotated, and when coupled with the Cilk runtime system, efficiently scaled for large-scale threaded operation.

The advantage of such an approach is that the user makes a simple language substitution to provide additional information to the underlying execution engine. There is minimal mental load on the user to take full advantage of the hardware available.

How does this relate back to the two-pass model? A good example is a financial quantitative analyst attempting a Monte Carlo risk analysis of a portfolio. Running on a standard PC, the analyst would build a model in MATLAB, using specific financial modeling algorithms and components and traditional FOR loops to iterate over an extensive set of scenarios. Performance issues might arise due to the computational complexity of the problem. Having recently acquired a multicore machine, the analyst might be able to use the same program, modifying the FOR to a PARFOR. With the advantage of the new hardware would come a proportional speed up. Needing to cut execution time even further, the analyst might run the same PARFOR code on a departmental cluster and achieve the desired performance speed up.

With minimal effort and without knowledge of the underlying system, this domain expert was able to achieve high performance by minimally annotating his initial code. This is the kind of result high performance computing users should demand from all languages in the future.

—–

About the Author

Dr. Roy Lurie is vice president of engineering at The MathWorks, Inc. He is responsible for the MATLAB family of products, which includes dedicated teams in the areas of language execution, parallel and distributed computing, image processing, control design, financial modeling and analysis, test and measurement, and computational biology. He received his Ph.D. in Electrical Engineering from the University of Witwatersrand in South Africa in 1994. Prior to joining The MathWorks in 1994, he founded and operated OptiNum Solutions, selling MathWorks tools into the South African market.

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!

Supercomputers Streamline Prediction of Dangerous Arrhythmia

June 2, 2020

Heart arrhythmia can prove deadly, contributing to the hundreds of thousands of deaths from cardiac arrest in the U.S. every year. Unfortunately, many of those arrhythmia are induced as side effects from various medicati Read more…

By Staff report

Indiana University to Deploy Jetstream 2 Cloud with AMD, Nvidia Technology

June 2, 2020

Indiana University has been awarded a $10 million NSF grant to build ‘Jetstream 2,’ a cloud computing system that will provide 8 aggregate petaflops of computing capability in support of data analysis and AI workload 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 instrumental to AMD’s datacenter market resurgence. Nanomet Read more…

By Doug Black

Supercomputer-Powered Protein Simulations Approach Lab Accuracy

June 1, 2020

Protein simulations have dominated the supercomputing conversation of late as supercomputers around the world race to simulate the viral proteins of COVID-19 as accurately as possible and simulate potential bindings in t Read more…

By Oliver Peckham

HPC Career Notes: June 2020 Edition

June 1, 2020

In this monthly feature, we'll keep you up-to-date on the latest career developments for individuals in the high-performance computing community. Whether it's a promotion, new company hire, or even an accolade, we've got Read more…

By Mariana Iriarte

AWS Solution Channel

Computational Fluid Dynamics on AWS

Over the past 30 years Computational Fluid Dynamics (CFD) has grown to become a key part of many engineering design processes. From aircraft design to modelling the blood flow in our bodies, the ability to understand the behaviour of fluids has enabled countless innovations and improved the time to market for many products. Read more…

Supercomputer Modeling Shows How COVID-19 Spreads Through Populations

May 30, 2020

As many states begin to loosen the lockdowns and stay-at-home orders that have forced most Americans inside for the past two months, researchers are poring over the data, looking for signs of the dreaded second peak of t Read more…

By Oliver Peckham

Indiana University to Deploy Jetstream 2 Cloud with AMD, Nvidia Technology

June 2, 2020

Indiana University has been awarded a $10 million NSF grant to build ‘Jetstream 2,’ a cloud computing system that will provide 8 aggregate petaflops of comp 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

COVID-19 HPC Consortium Expands to Europe, Reports on Research Projects

May 28, 2020

The COVID-19 HPC Consortium, a public-private effort delivering free access to HPC processing for scientists pursuing coronavirus research – some utilizing AI Read more…

By Doug Black

$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

IBM Boosts Deep Learning Accuracy on Memristive Chips

May 27, 2020

IBM researchers have taken another step towards making in-memory computing based on phase change (PCM) memory devices a reality. Papers in Nature and Frontiers Read more…

By John Russell

Hats Over Hearts: Remembering Rich Brueckner

May 26, 2020

HPCwire and all of the Tabor Communications family are saddened by last week’s passing of Rich Brueckner. He was the ever-optimistic man in the Red Hat presiding over the InsideHPC media portfolio for the past decade and a constant presence at HPC’s most important events. Read more…

Nvidia Q1 Earnings Top Expectations, Datacenter Revenue Breaks $1B

May 22, 2020

Nvidia’s seemingly endless roll continued in the first quarter with the company announcing blockbuster earnings that exceeded Wall Street expectations. Nvidia Read more…

By Doug Black

Microsoft’s Massive AI Supercomputer on Azure: 285k CPU Cores, 10k GPUs

May 20, 2020

Microsoft has unveiled a supercomputing monster – among the world’s five most powerful, according to the company – aimed at what is known in scientific an Read more…

By Doug Black

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

Global Supercomputing Is Mobilizing Against COVID-19

March 12, 2020

Tech has been taking some heavy losses from the coronavirus pandemic. Global supply chains have been disrupted, virtually every major tech conference taking place over the next few months has been canceled... 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

Steve Scott Lays Out HPE-Cray Blended Product Roadmap

March 11, 2020

Last week, the day before the El Capitan processor disclosures were made at HPE's new headquarters in San Jose, Steve Scott (CTO for HPC & AI at HPE, and former Cray CTO) was on-hand at the Rice Oil & Gas HPC conference in Houston. He was there to discuss the HPE-Cray transition and blended roadmap, as well as his favorite topic, Cray's eighth-gen networking technology, Slingshot. 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

Leading Solution Providers

SC 2019 Virtual Booth Video Tour

AMD
AMD
ASROCK RACK
ASROCK RACK
AWS
AWS
CEJN
CJEN
CRAY
CRAY
DDN
DDN
DELL EMC
DELL EMC
IBM
IBM
MELLANOX
MELLANOX
ONE STOP SYSTEMS
ONE STOP SYSTEMS
PANASAS
PANASAS
SIX NINES IT
SIX NINES IT
VERNE GLOBAL
VERNE GLOBAL
WEKAIO
WEKAIO

Contributors

Tech Conferences Are Being Canceled Due to Coronavirus

March 3, 2020

Several conferences scheduled to take place in the coming weeks, including Nvidia’s GPU Technology Conference (GTC) and the Strata Data + AI conference, have Read more…

By Alex Woodie

Exascale Watch: El Capitan Will Use AMD CPUs & GPUs to Reach 2 Exaflops

March 4, 2020

HPE and its collaborators reported today that El Capitan, the forthcoming exascale supercomputer to be sited at Lawrence Livermore National Laboratory and serve Read more…

By John Russell

‘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

Cray to Provide NOAA with Two AMD-Powered Supercomputers

February 24, 2020

The United States’ National Oceanic and Atmospheric Administration (NOAA) last week announced plans for a major refresh of its operational weather forecasting supercomputers, part of a 10-year, $505.2 million program, which will secure two HPE-Cray systems for NOAA’s National Weather Service to be fielded later this year and put into production in early 2022. Read more…

By Tiffany Trader

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

Fujitsu A64FX Supercomputer to Be Deployed at Nagoya University This Summer

February 3, 2020

Japanese tech giant Fujitsu announced today that it will supply Nagoya University Information Technology Center with the first commercial supercomputer powered Read more…

By Tiffany Trader

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

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