MATLAB’s Journey to Parallel Computing

By Michael Feldman

November 15, 2007

Propelled by its flagship MATLAB product, The MathWorks is one of the most important suppliers of software tools for the technical computing community. The MATLAB (MATrix LABoratory) language has become the preeminent interactive programming environment for scientists and engineers. Over a million customers are using it to develop technical computing applications around the world.

Recently, we got the opportunity to speak with The MathWorks co-founder and chief scientist Cleve Moler about the evolution of MATLAB and about how the language grew to include parallel programming support. The history of the MATLAB product spans over two decades.

In the early 1980s, Jack Little defined the business plan for the company, to be known as The MathWorks, while Moler was the brains behind MATLAB. Both Moler and Little, along with Steve Banger, developed the initial commercial product, MATLAB 1.0, which was launched in 1984, the same year The MathWorks was founded. Moler modestly refers to Little as the “heart and soul of the company,” but it is MATLAB that has become the company’s icon.

“I wrote MATLAB years ago, so I wouldn’t have to go down to the computer center after dinner to pick up my output,” said Moler. “It was important that MATLAB be interactive. That was more important to me than it was for it to be fast. I was worried about my time, not the computer’s time.”

But in the world of high performance technical computing, fast execution is also a big priority. When you start running applications that take weeks to complete on your PC, interactivity doesn’t mean much. These users want to tap parallel computing and still have an interactive workflow for even their largest data sets.

Although MATLAB started out as a single-threaded, shared memory programming language for the PC, even in those early days people were experimenting with it as a platform for parallel computing. In the 1980s, a few engineers were starting to use the INMOS transputer as a math accelerator. Moler said a South African company wrote a set of library functions for the transputer, and these became add-ons to MATLAB. In the late 80s, Moler himself played around with MATLAB on the Intel HyperCube, an early implementation of a parallel computer. But in these cases, MATLAB was used as the front-end for the parallel computations on the parallel computer. The language environment did not run natively on these architectures.

For the next decade, that became a recurring theme that stood in the way of extending MATLAB into parallel computing. In 1995, Moler wrote “Why There Isn’t a Parallel MATLAB,” in which he described the three major obstacles at the time: the memory model, granularity, and the business situation.

The conflict between MATLAB’s global memory model and the distributed model of most parallel systems meant that the large data matrices had to be sent back and forth between the host and the parallel computer. “It took far longer to distribute the data than it did to do the computation,” wrote Moler at the time. “Any matrix that would fit into memory on the host was too small to make effective use of the parallel computer itself.”

And on the shared memory machines of that era, it would have been difficult to implement the kind of multithreaded parallelism that would have made the design changes in the product worthwhile.

The other major problem was that early parallel computers were not built to be user-friendly. In the 1980s and 1990s, mainstream computing was still relying on Moore’s law to drive performance increases with single-core, single processor systems. The multiprocessor systems of the day were the mainframes and supercomputers, and as Moler noted, the people who owned these system didn’t buy any software; they developed it themselves. In most cases, these machines did not offer interactivity, which negates one of the main features of MATLAB.

That was more or less the case up until several years ago when cluster computers entered the mainstream. These clusters could be purchased by much smaller organizations — engineering firms, chemistry labs, finance services departments and other groups who could benefit from the collective computational power. In anticipation of this, Moler said he began working on a parallel version of MATLAB about five years ago.

“We could see that there was a potential business there,” said Moler. “And MATLAB had evolved to the point where it wasn’t just a matrix laboratory anymore. It was doing a lot of other things, so there was a possibility of doing more coarse-grained parallelism, which would be appropriate for distributed memory.”

This was before processors moved to multicore architectures. The first clusters were being built with single-core processors, but the simple multiplication of computing resources was still a revolution. MATLAB’s initial implementation of parallel computing defined a way for developers to explicitly specify distributed objects and computations. Two constructs were added: PARFOR (parallel for loops) and distributed arrays (large matrices distributed across separate memories). This is the basis for the Distributed Computing Toolbox, which was launched in 2004. The implementation has MATLAB running on multiple nodes of a cluster, with MPI under the hood.
The popularity of commodity clusters and the interactive computing experience is also what attracted Alan Edelman, chief science officer at Interactive Supercomputing (ISC), to use MATLAB as the basis for his company’s parallel computing platform, Star-P. But ISC did what The MathWorks didn’t want to do — provide a server-client model for high performance computing with MATLAB only on the client side. ISC has since expanded to support both the R and Python environments. But in all cases, the back-end acceleration on the HPC servers is performed by ISC software.

Moler, who has known Edelman since he was a grad student, said people are often confused by the distinction between the parallel computing products offered by the two companies. He says ISC didn’t change MATLAB, they just used it as a front-end. In The MathWorks’ implementation of distributed computing, MATLAB runs natively on the cluster nodes. “That’s harder, and that’s why it’s taken us longer,” Moler pointed out. “[ISC] is not a parallel MATLAB, they’re a conventional MATLAB attached to a parallel computer.”

One of the big challenges for MATLAB is how to leave peacefully with the job scheduler in the cluster. Most schedulers batch jobs under some sort of priority scheme. Under this model, user interactivity is a hit or miss proposition. Some systems offer dedicated time if you limit your request of resources — say 10 minutes and 8 processors. Otherwise, your job ends up in a batch queue. Depending upon how many other users there are, the results may or may not arrive quickly. A general solution may require more intimate integration between MATLAB and the job schedulers.

When the Distributed Computing Toolbox was envisioned, Moler was focused on cluster computing. But by the time the distributed product was launched in 2004, the dual-core Opteron was only year away. In the past few years, multicore processors have become the de facto processor architecture across almost every type of computer. But taking advantage of multiple cores requires a different approach, since it allows for shared memory multithreading, rather than just distributed memory multiprocessing. Expectations are different as well. Developers would like multicore to be supported transparently, at a level below the application software layer.

One way MATLAB does this is with implicit multithreading for matrix computation. But, according to Moler, the matrices have to be rather large before the multicore speedup is really effective. The product also uses multithreaded libraries that exploit multicore, such as ATLAS BLAS, and the Intel and AMD math libraries for matrix computations. But at this point, the matrix math components are just a portion of the entire product, Moler said.

“The question is how to do something more complicated that just matrices; and that’s difficult,” he admitted. Internally the engineers discussed adding multithreading constructs into the product. Some prototypes were built. But eventually they decided it was too complicated and didn’t really work well with the MATLAB model. Ultimately, they just weren’t convinced that explicit multithreading was the right way to go.

With accelerators like GPUs, the Cell processor, FPGAs and ClearSpeed boards coming on the scene, MATLAB users are starting to take advantage of the new parallel computing hardware. Thus far, the solutions have all involved library calls that can be invoked from MATLAB code. ClearSpeed and NVIDIA have demonstrated coprocessor acceleration from MATLAB code, and a number of people have experimented with mapping MATLAB code onto FPGAs. The limitation is that the code executed on the coprocessor needs to be substantial enough to make the overhead of sending the calculations off the host processor worthwhile.

From Moler’s point of view, native MATLAB support for exotic parallel processors will have to wait until a standard programming model and commodity hardware makes this practical. Conceivably this could happen within the next few years with the upcoming Intel Larrabee and AMD Fusion processors. These architectures promise to integrate CPU and GPU architectures and make general-purpose parallel computing available within a client. If one or both of these architectures become widely adopted, it is likely to encourage a native MATLAB implementation.

While Moler didn’t reveal any specific plans for these processors, there are a number of other developments on the drawing board. One of their projects is teaching their just-in-time compiler (JIT) to be multicore-aware. Currently the compiler only generates single-threaded code. Another area they’re looking at is enhancing the way the PARFOR and distributed arrays work. After a few years of experience with this model, there may be ways to make these structures work even better. Moler also said they’re looking at ways to parallelize the graphics capabilities of the product.

Like many software platform vendors, The MathWorks has come to the conclusion that parallel computing is their future, and the HPC community is a big part of that. It certainly wasn’t always the case. Moler said the company didn’t even come to the Supercomputing Conference until two years ago in Seattle at SC05, the year after the company introduced its Distributed Computing Toolbox. At that event, out of the 20 people from the company that attended, only Moler had been to the conference before. Last year at SC06 in Tampa, they had more people and a bigger booth, and this year at SC07 in Reno, they had their largest presence ever. With the technical computing community firmly entrenched in HPC, The MathWorks is likely to be a regular fixture at SC for some to come.

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!

Penguin Computing Brings Cascade Lake-AP to OCP Form Factor

July 7, 2020

Penguin Computing, a subsidiary of SMART Global Holdings, Inc., is announcing a new Tundra server, Tundra AP, that is the first to implement the Intel Xeon Scalable 9200 series processors (codenamed Cascade Lake-AP) in t Read more…

By Tiffany Trader

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 t Read more…

By Tiffany Trader

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

July 6, 2020

HPCwire: Let's start with HLRS and work our way up to the European scale. HLRS has stood out in the HPC world for its support of both scientific and industrial research. Can you discuss key developments in recent years? Read more…

By Steve Conway, Hyperion

The Barcelona Supercomputing Center Offers a Virtual Tour of Its MareNostrum Supercomputer

July 6, 2020

With the COVID-19 pandemic continuing to threaten the world and disrupt normal operations, facility tours remain a little difficult to operate, with many supercomputing centers having shuttered facility tours for visitor Read more…

By Oliver Peckham

What’s New in Computing vs. COVID-19: Fugaku, Congress, De Novo Design & More

July 2, 2020

Supercomputing, big data and artificial intelligence are crucial tools in the fight against the coronavirus pandemic. Around the world, researchers, corporations and governments are urgently devoting their computing reso Read more…

By Oliver Peckham

AWS Solution Channel

Maxar Builds HPC on AWS to Deliver Forecasts 58% Faster Than Weather Supercomputer

When weather threatens drilling rigs, refineries, and other energy facilities, oil and gas companies want to move fast to protect personnel and equipment. And for firms that trade commodity shares in oil, precious metals, crops, and livestock, the weather can significantly impact their buy-sell decisions. 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…

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 last year, IBM announced open sourcing its Power instructio 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 fam Read more…

By Tiffany Trader

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

July 6, 2020

HPCwire: Let's start with HLRS and work our way up to the European scale. HLRS has stood out in the HPC world for its support of both scientific and industrial 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

ISC 2020 Keynote: Hope for the Future, Praise for Fugaku and HPC’s Pandemic Response

June 24, 2020

In stark contrast to past years Thomas Sterling’s ISC20 keynote today struck a more somber note with the COVID-19 pandemic as the central character in Sterling’s annual review of worldwide trends in HPC. Better known for his engaging manner and occasional willingness to poke prickly egos, Sterling instead strode through the numbing statistics associated... Read more…

By John Russell

ISC 2020’s Student Cluster Competition Winners Announced

June 24, 2020

Normally, the Student Cluster Competition involves teams of students building real computing clusters on the show floors of major supercomputer conferences and Read more…

By Oliver Peckham

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


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

‘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

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

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

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

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

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