Mathematica Takes on Parallelism

By John West

January 22, 2010

Like just about everyone else, I head into the SC conference season hungry for cool new hardware news. Throw in a quantum computing demonstration, or string together a couple thousand Atom processors into a computing prototype, and I head for the keyboard like a suburban American dad heads for the turkey on Thanksgiving day.

There are other kinds of announcements that happen during SC about new services, business models, software, machine installations, and so on. So many announcements, in fact, that it’s not possible to do more than perfunctory service to most of them. This article is about one of the important developments I didn’t cover during the November rush: the announcement of Mathematica 7.

On the day the exhibit floor opened at SC08, Wolfram Research announced the latest version of its flagship product, Mathematica 7. The tool has long been a part of the “thinking workflow” for engineers, scientists, and a host of other technical professionals. Mathematica allows uers to manipulate mathematical statements, and visualize the results, using mathematical notation directly rather than a special grammar or intermediate form. What is important about the Mathematica 7 announcement is that it marked the introduction of features that turn Mathematica into a gateway through which users can take advantage of the power of high performance and large-scale computing without changing their workflow and in many cases without being aware that they are working in parallel.

Mathematica is a symbolic manipulation environment that allows users to manipulate mathematical and logical expressions directly in the mathematical notation you’d expect to find in a textbook or use with pen and paper. Alongside this capability for symbolic manipulation lie sophicated numerical methods that allow the system to reduce expressions to numeric answers when appropriate. Reports from users of several of the most popular systems indicate that Mathematica, always strong with respect to symbolic manipulation, has closed the numerical gap it once had with respect to other packages.

I came from a MATLAB-centric environment, and so I was interested in knowing how the tools are different from one another. In contrast with Mathematica’s focus on expression in symbolic language, MATLAB offers users a language that is similar to C and HPF, a distinction that reflects the fundamental difference in the kind of thinking the two tools are designed to support. There is a widely-held generality that if your interest is in numerical methods and matrix manipulation, MATLAB is the right choice. On the other hand, if you are more generally interested in mathematics, or need to express theoretical problems directly in the language of mathematics, Mathematica is the right choice. Both packages are quite sophisticated, and I find that this generalization isn’t always helpful.

One user I spoke with described the choice between MATLAB and Mathematica as one that comes down to how your brain is wired: if you naturally start with equations on paper and then work your way out to data and programs, then Mathematica is likely to be a good fit for you. But if you like to start with data first and then try to find a model that fits what you observe, MATLAB is the way to go.

Either way, these environments and others like them offer users the ability to use a computer to answer questions or solve problems without having to reduce the problem to an expression in C or FORTRAN. And many of the available mathematics environments, MATLAB and Mathematica among them, offer rich support for parallel processing and a wide variety of third party tools.

But why does this matter?

Researchers using computer applications to facilitate their research can expect to face two discontinuities as the computational requirements of their applications grow and they require more computer resources. The first discontinuity occurs when an application moves from operating with a single thread of execution to multiple simultaneous threads. Today this transition can happen while the user stays in the familiar operating environment of his desktop, but he may also transition to a small shared resource. This shared resource could look a lot like his familiar desktop environment, or it might be a totally new environment that disrupts his existing workflow and toolsets. The application usually has to be rearchitected to take advantage of the performance potential offered by adding more execution threads, and this can require substantial new skills or even the addition of new team members to parallelize the application.

The next transition is to resources that permit simultaneous execution of a very large number of tasks: supercomputers. This often involves rearchitecting the application again to take advantage of orders of magnitude more parallelism. Unfortunately, the transition also nearly always involves a complete disruption of previous workflows, new tools, and new ways for the user to interact with the resource during development. Literally everything may be new, from the command line interface (no Gnome or Windows GUI on most supercomputers) to working with a batch queuing system. This is a problem for users who must adapt to an unfamiliar and often unfriendly environment at the same time that they are dealing with the fundamental issues of the science, and computer science, in their application that frequently arise at supercomputing scale.

The features included in last November’s upgrade of Mathematica are designed to minimize both kinds of workflow disruptions. Support for parallelism is now included in all versions of the product, reflecting the growing ubiquity of multicore processors. The approach, which the company calls “immediate interactive parallel computing,” builds multicore awareness into the base application so that when an opportunity arises to run on multiple cores, the application will automatically do that. No change to the expression of the problem is necessary, and no checkboxes have to be ticked by the user. Mathematica just takes advantage of multiple cores on behalf of the user when it makes sense to do so.

Mathematica also supports semantics for explicitly-declared parallelism. There are parallel analogues to serial functions such as Table and Map that allow users to specify that certain portions of a computation be performed in parallel. There are also commands that allow users to define a function and then distribute that definition to multiple processors for parallel evaluation. In both cases Mathematica handles the generation, scheduling and rendezvous of threads and gathering of results automatically so that the user does not have to specify that level of detail.

This screencast on the Mathematica site offers an excellent introduction to explicit parallelism, and provides a window into how Mathematica works. You’ll find many other screencasts and live examples on the site as well if you want a more detailed look at how Mathematica works.

But what about growing beyond the cores in a socket? Wolfram added gridMathematica in this release to provide parallel semantics to allow users to access everything from multiple sockets in a single box to HPC clusters. gridMathematica is licensed in two versions, Local and Server. The local version adds another four cores to the four licensed in the standard version of Mathematica, and will let users take advantage of multiple sockets on a single machine. The server license comes in bundles of 16 cores, and can support larger scale processing. gridMathematica can integrate with common batch workload schedulers, but it doesn’t have to.

Wolfram has created what it calls the Lightweight Grid System to manage cluster resources as you might need if cycles are being harvested from resources that are usually used for something else. Interestingly gridMathematica supports clusters with heterogeneous nodes: provided Mathematica supports a particular platform or OS, gridMathematica can harness it into a single cluster. This means that clusters can be built from any mix of 32- and 64-bit platforms running Windows, Mac OS, Linux, and Solaris.

Wolfram has expanded this concept even further with a planned feature called HPC Cloud Service for Mathematica. This feature will allow users who don’t already have a cluster to run their Mathematica application on a commercial cloud resource. Users will take advantage of the cloud service by clicking a few buttons in the cloud GUI with their existing Mathematica notebook to ask it to run the notebook in the cloud.

The concept is that Mathematica automatically analyzes your notebook, creates the bundles of work and runs them in parallel, gathers the parallel results, and sends them back to the desktop where the user initiated the request. Originally announced in November, Wolfram’s HPC Cloud offering has been delayed by the company’s Wolfram|Alpha computational knowledge engine. No word on when release is expected, although the company does emphasize that work is continuing on the HPC Cloud Service offering.

So where does Mathematica fit in your environment? If you, or your center’s users, are primarily using mature Fortran or C applications that have been under development for many years, it may not fit at all. All of these environments take time to become proficient, and Mathematica is no exception. On the other hand, if you already have users of mathematical environments of one flavor or another, or you are accommodating users who are developing new applications and who are domain specialists rather than “HPC people,” Mathematica may be a good fit. It has the potential to increase the effectiveness of your users and provide them with higher levels of performance in a way that is much easier to manage than moving directly from an idea (or a working serial prototype) to an explicitly-parallelized traditional application.

Subscribe to HPCwire's Weekly Update!

Be the most informed person in the room! Stay ahead of the tech trends with industry updates delivered to you every week!

Kathy Yelick on Post-Exascale Challenges

April 18, 2024

With the exascale era underway, the HPC community is already turning its attention to zettascale computing, the next of the 1,000-fold performance leaps that have occurred about once a decade. With this in mind, the ISC Read more…

2024 Winter Classic: Texas Two Step

April 18, 2024

Texas Tech University. Their middle name is ‘tech’, so it’s no surprise that they’ve been fielding not one, but two teams in the last three Winter Classic cluster competitions. Their teams, dubbed Matador and Red Read more…

2024 Winter Classic: The Return of Team Fayetteville

April 18, 2024

Hailing from Fayetteville, NC, Fayetteville State University stayed under the radar in their first Winter Classic competition in 2022. Solid students for sure, but not a lot of HPC experience. All good. They didn’t Read more…

Software Specialist Horizon Quantum to Build First-of-a-Kind Hardware Testbed

April 18, 2024

Horizon Quantum Computing, a Singapore-based quantum software start-up, announced today it would build its own testbed of quantum computers, starting with use of Rigetti’s Novera 9-qubit QPU. The approach by a quantum Read more…

2024 Winter Classic: Meet Team Morehouse

April 17, 2024

Morehouse College? The university is well-known for their long list of illustrious graduates, the rigor of their academics, and the quality of the instruction. They were one of the first schools to sign up for the Winter Read more…

MLCommons Launches New AI Safety Benchmark Initiative

April 16, 2024

MLCommons, organizer of the popular MLPerf benchmarking exercises (training and inference), is starting a new effort to benchmark AI Safety, one of the most pressing needs and hurdles to widespread AI adoption. The sudde Read more…

Kathy Yelick on Post-Exascale Challenges

April 18, 2024

With the exascale era underway, the HPC community is already turning its attention to zettascale computing, the next of the 1,000-fold performance leaps that ha Read more…

Software Specialist Horizon Quantum to Build First-of-a-Kind Hardware Testbed

April 18, 2024

Horizon Quantum Computing, a Singapore-based quantum software start-up, announced today it would build its own testbed of quantum computers, starting with use o Read more…

MLCommons Launches New AI Safety Benchmark Initiative

April 16, 2024

MLCommons, organizer of the popular MLPerf benchmarking exercises (training and inference), is starting a new effort to benchmark AI Safety, one of the most pre Read more…

Exciting Updates From Stanford HAI’s Seventh Annual AI Index Report

April 15, 2024

As the AI revolution marches on, it is vital to continually reassess how this technology is reshaping our world. To that end, researchers at Stanford’s Instit Read more…

Intel’s Vision Advantage: Chips Are Available Off-the-Shelf

April 11, 2024

The chip market is facing a crisis: chip development is now concentrated in the hands of the few. A confluence of events this week reminded us how few chips Read more…

The VC View: Quantonation’s Deep Dive into Funding Quantum Start-ups

April 11, 2024

Yesterday Quantonation — which promotes itself as a one-of-a-kind venture capital (VC) company specializing in quantum science and deep physics  — announce Read more…

Nvidia’s GTC Is the New Intel IDF

April 9, 2024

After many years, Nvidia's GPU Technology Conference (GTC) was back in person and has become the conference for those who care about semiconductors and AI. I Read more…

Google Announces Homegrown ARM-based CPUs 

April 9, 2024

Google sprang a surprise at the ongoing Google Next Cloud conference by introducing its own ARM-based CPU called Axion, which will be offered to customers in it Read more…

Nvidia H100: Are 550,000 GPUs Enough for This Year?

August 17, 2023

The GPU Squeeze continues to place a premium on Nvidia H100 GPUs. In a recent Financial Times article, Nvidia reports that it expects to ship 550,000 of its lat Read more…

Synopsys Eats Ansys: Does HPC Get Indigestion?

February 8, 2024

Recently, it was announced that Synopsys is buying HPC tool developer Ansys. Started in Pittsburgh, Pa., in 1970 as Swanson Analysis Systems, Inc. (SASI) by John Swanson (and eventually renamed), Ansys serves the CAE (Computer Aided Engineering)/multiphysics engineering simulation market. Read more…

Intel’s Server and PC Chip Development Will Blur After 2025

January 15, 2024

Intel's dealing with much more than chip rivals breathing down its neck; it is simultaneously integrating a bevy of new technologies such as chiplets, artificia Read more…

Choosing the Right GPU for LLM Inference and Training

December 11, 2023

Accelerating the training and inference processes of deep learning models is crucial for unleashing their true potential and NVIDIA GPUs have emerged as a game- Read more…

Baidu Exits Quantum, Closely Following Alibaba’s Earlier Move

January 5, 2024

Reuters reported this week that Baidu, China’s giant e-commerce and services provider, is exiting the quantum computing development arena. Reuters reported � Read more…

Comparing NVIDIA A100 and NVIDIA L40S: Which GPU is Ideal for AI and Graphics-Intensive Workloads?

October 30, 2023

With long lead times for the NVIDIA H100 and A100 GPUs, many organizations are looking at the new NVIDIA L40S GPU, which it’s a new GPU optimized for AI and g Read more…

Shutterstock 1179408610

Google Addresses the Mysteries of Its Hypercomputer 

December 28, 2023

When Google launched its Hypercomputer earlier this month (December 2023), the first reaction was, "Say what?" It turns out that the Hypercomputer is Google's t Read more…

AMD MI3000A

How AMD May Get Across the CUDA Moat

October 5, 2023

When discussing GenAI, the term "GPU" almost always enters the conversation and the topic often moves toward performance and access. Interestingly, the word "GPU" is assumed to mean "Nvidia" products. (As an aside, the popular Nvidia hardware used in GenAI are not technically... Read more…

Leading Solution Providers

Contributors

Shutterstock 1606064203

Meta’s Zuckerberg Puts Its AI Future in the Hands of 600,000 GPUs

January 25, 2024

In under two minutes, Meta's CEO, Mark Zuckerberg, laid out the company's AI plans, which included a plan to build an artificial intelligence system with the eq Read more…

China Is All In on a RISC-V Future

January 8, 2024

The state of RISC-V in China was discussed in a recent report released by the Jamestown Foundation, a Washington, D.C.-based think tank. The report, entitled "E Read more…

Shutterstock 1285747942

AMD’s Horsepower-packed MI300X GPU Beats Nvidia’s Upcoming H200

December 7, 2023

AMD and Nvidia are locked in an AI performance battle – much like the gaming GPU performance clash the companies have waged for decades. AMD has claimed it Read more…

DoD Takes a Long View of Quantum Computing

December 19, 2023

Given the large sums tied to expensive weapon systems – think $100-million-plus per F-35 fighter – it’s easy to forget the U.S. Department of Defense is a Read more…

Nvidia’s New Blackwell GPU Can Train AI Models with Trillions of Parameters

March 18, 2024

Nvidia's latest and fastest GPU, codenamed Blackwell, is here and will underpin the company's AI plans this year. The chip offers performance improvements from Read more…

Eyes on the Quantum Prize – D-Wave Says its Time is Now

January 30, 2024

Early quantum computing pioneer D-Wave again asserted – that at least for D-Wave – the commercial quantum era has begun. Speaking at its first in-person Ana Read more…

GenAI Having Major Impact on Data Culture, Survey Says

February 21, 2024

While 2023 was the year of GenAI, the adoption rates for GenAI did not match expectations. Most organizations are continuing to invest in GenAI but are yet to Read more…

The GenAI Datacenter Squeeze Is Here

February 1, 2024

The immediate effect of the GenAI GPU Squeeze was to reduce availability, either direct purchase or cloud access, increase cost, and push demand through the roof. A secondary issue has been developing over the last several years. Even though your organization secured several racks... Read more…

  • arrow
  • Click Here for More Headlines
  • arrow
HPCwire