Closing the Parallelism Gap with the Chapel Language

By Michael Feldman

November 19, 2008

Chapel is a high-level parallel programming language being developed by Cray for DARPA’s High Productivity Computing Systems (HPCS) program. The goal of the language is to increase programmer productivity for large-scale computing platforms.

An all-day Chapel tutorial and a joint PGAS tutorial with X10 and UPC were conducted this week at SC08 by Brad Chamberlain, the technical lead for the Chapel language project, along with Steven Deitz, David Iten and Samuel Figueroa. We asked Chamberlain to give us an overview of the language, the rational behind its design, and an update on the current state of the Chapel effort.

HPCwire: What problem is Chapel designed to solve?

Chamberlain: In the broadest terms, Chapel is being designed to make parallel programmers more productive. In designing the language, our goal is to support the elegant expression of parallel algorithms without sacrificing the performance and portability enjoyed by MPI programmers today. This is obviously a challenging goal, yet it’s one that we have had successes with previously, and it’s a primary motivator in our work with Chapel.

More specifically, we are designing Chapel to be a very general parallel language. If you have any parallel algorithm in mind, you ought to be able to express it in Chapel without running into some limitation in the language that forces you to go back to the parallel programming model that you were using previously. This is a fairly significant departure from many of the previous parallel languages that have inspired our work, in that most of them have tended to address only one specific portion of the parallel computing space — data parallelism, say — without offering much for algorithms that require other styles of parallelism such as task-parallelism, concurrent programming, or a combination of all three. Focusing on a restricted problem domain is a reasonable (and wise) approach to take in an academic project, but in order to create a parallel language with any chance of being broadly adopted and used, we believe that greater generality and applicability is necessary.

Chapel’s support for general parallel programming also means that the language is applicable to general levels of parallelism within software and hardware. Most applications contain opportunities for parallelism at multiple levels within the program’s structure: modules, functions, statements, and expressions. Yet most existing parallel programming models only support a single level of software parallelism — say, cooperating executables — requiring the user to mix in additional programming models and notations in order to express parallelism at other levels. This raises a significant barrier to expressing and exposing all of the parallelism within an application. Similarly, parallel computers support concurrency at many levels: across machines, across multiple nodes within a machine, across the processor cores within a node, and even within the core in the form of vector instructions, multithreading, or other forms of instruction-level parallelism. We are designing Chapel’s features so that an application’s parallelism can take advantage of all of these levels of architectural parallelism.

Finally, Chapel is being designed to solve the generation gap that exists between mainstream and parallel languages. Students today graduate with experience in languages like Java, C#, Perl, Python, and MATLAB, yet if they enter the HPC workforce, they are likely to find themselves programming in Fortran, C, and, if they are lucky, C++. Chapel is being designed to bring some of the concepts and philosophies found in modern mainstream languages into the HPC arena, and to do so without disenfranchising programmers who are most comfortable in traditional languages like C and Fortran. This is a bit of a balancing act, but based on comments from both camps, we are optimistic that we’ve designed a language that’s palatable to both perspectives.

HPCwire: In layman’s terms, can you give us a brief overview of the language?

Chamberlain: Chapel has four main feature areas: the base language, its task-parallel features, its data-parallel features, and features for controlling locality. The base language consists of all of the features that you would traditionally expect to find in a sequential programming language: types, variables, expressions, statements, functions, and so forth. We very intentionally decided not to make Chapel an extension of an existing language, yet the base language features should be familiar to anyone who has programmed in languages like C, C++, Java, or Fortran. It’s worth mentioning a few of the departures from these languages as well: Chapel has support for iterators in the CLU or Ruby sense of the term — functions that generate a stream of values during their execution rather than a single return value, making them useful for driving loops. Chapel also supports the option to elide type specifications in many contexts such as variable declarations or formal argument lists. This supports code reuse and exploratory programming as in most scripting languages. Unlike scripting languages, all Chapel variables have a fixed, static type in order to avoid runtime overheads.

Chapel’s task-parallel features support the ability to create a number of tasks running concurrently in structured and unstructured ways. These tasks can coordinate with one another through the use of synchronization variables which support a “full/empty” state in addition to their normal value. By default, reads and writes on these synchronization variables block until the variable is full/empty, providing a more elegant means of coordinating than traditional locks and semaphores. Chapel’s data parallel features are built around a rich set of array types including multidimensional, strided, sparse, and associative arrays. Parallel loops can be used to iterate over an array’s indices or elements, and scalar functions can be promoted which applies them to array values in parallel.

Finally, since the placement of data and tasks can be so critical to achieving performance on large-scale systems, Chapel supports a set of locality features that permit users to reason about the machine resources on which their programs are executing. This is supported through the concept of a locale — a built-in type in Chapel that represents a unit of architectural locality such as an SMP node or multicore processor in a commodity cluster. Users can specify the locale on which each variable is stored, and can direct tasks to execute on a specific locale either explicitly or in a data-driven manner. Finally, Chapel’s arrays can be distributed across multiple locales, causing any data parallel operations on the array to automatically be executed in parallel by all of the locales owning a piece of it.

HPCwire: What are the major differences between Chapel and the other two original HPCS languages, X10 and Fortress?

Chamberlain: Chapel has similarities to X10 and Fortress, but there are numerous differences between the three languages as well. Compared to X10, Chapel tends to make less of a distinction between remote and local data. For example, if a Chapel task running on locale 0 wants to access a variable stored on locale 1, it can do so simply by naming the variable, relying on the compiler and runtime to provide the communication necessary to implement the remote reference. In contrast, X10’s semantics were designed to make such communications very explicit in the language’s syntax in order to keep the programmer aware of the cost involved. This is a reasonable approach, and it’s similar to the one we took in our previous work on a language called ZPL. However, in that work we found that such syntactic distinctions were a barrier to code reuse and so decided that in Chapel we would support transparent remote accesses in the name of productivity. Even so, Chapel programmers have complete control over the locality of their variables, and performance-minded programmers can query, assert, and reason about the placement of their data values.

Other differences between X10 and Chapel stem from X10’s Java heritage. This has caused X10 to have more of an inherent object-oriented flavor which shows up in a number of ways. As one example, an assignment between two X10 array variables is interpreted as a pointer assignment resulting in an array alias as a Java programmer would expect. In contrast, Chapel’s array assignments result in an assignment of one array’s elements to the other as in Fortran, MATLAB, and arguably mathematics.

In designing Fortress, Sun’s team chose to tackle a very fundamental and challenging question in programming language design: Given that it is difficult to anticipate how a language will need to evolve over time, how can the language be designed to minimally restrict its flexibility, permitting library developers to define things that we typically consider to be “part of the language” such as the data types, the parallel implementation of operators, and even operator precedence. Fortress is an implicitly parallel language that makes the evaluation of many constructs, like loop iterations, parallel by default. Fortress also supports a mathematically oriented syntax through the use of Unicode symbols and operators to express a computation. While we believe Fortress to be a very important and promising language effort, we also believe that the main productivity challenges facing parallel programmers today are caused more by the low-level expression of parallelism rather than the lack of implicitly parallel loops and mathematical syntax. To this end, our approach could be viewed as being more evolutionary, trying to build on the lessons learned from the parallel languages of the 1990’s while improving on their deficits and striving for more generality. That said, our approach also has some similarities to Fortress. Most notably, Chapel is striving to provide user-defined distributions that would allow an advanced user to write their own low-level implementation of a distributed parallel array in Chapel. This is similar to the Fortress theme of permitting library authors to specify such details, providing the end-user with a higher-level view of these complex data structures. As a final note, our recent conversations with the Fortress team have suggested that they are primarily focused on shared-memory platforms for the time being while the Chapel team continues to focus predominantly on large-scale distributed memory machines.

HPCwire: What is the status of the language today?

Chamberlain: Chapel is very much a work-in-progress and our status today reveals that. We have a reasonably complete draft of the language specification available, but it is a document that continues to evolve as we gain more experience with the language, receive feedback from the community, and find and address flaws in our own assumptions. Most of our team’s day-to-day effort is spent implementing the Chapel compiler. Our compiler takes a source-to-source compilation approach, translating Chapel into C with calls to portable communication and threading libraries that implement the inter- and intra-locale parallelism. This approach makes our implementation very portable, allowing us to compile and run Chapel programs on a range of platforms from desktop multicore machines to commodity clusters; from the deskside Cray CX1 to the high-end Cray X2, XMT, and petascale XT5 systems; and even on our competitors’ systems.

Looking at the Chapel compiler today, the base language is in reasonable shape, to the extent that we find ourselves implementing more and more of the language in Chapel itself and enjoying its productivity benefits. The task parallel features are also quite stable and support the creation and synchronization of tasks within a locale or across multiple locales. Our data parallel features have been supported in a single-threaded reference implementation for some time now, permitting early users to experiment with the various array types and their parallel operators in a sequential execution. In the past few months we have just started getting our first parallel distributed arrays up and running, though additional work is required there before those features could be considered stable.

The primary deficit in our current implementation is performance. While performance has been a primary factor throughout Chapel’s design, our implementation efforts to date have focused almost exclusively on providing a correct reference implementation in order to get feedback from early users and correct any missteps as quickly as possible. In recent months we have started to focus increasingly on performance and looking toward 2009, we anticipate focusing our efforts on adding performance optimizations and fleshing out the implementation of distributed parallel arrays.

HPCwire: What are the future plans for Chapel and how does it fit into DARPA’s HPCS program?

Chamberlain: In 2009, Cray’s HPCS productivity team will start a focused effort to study Chapel’s productivity by writing a number of benchmarks and mini-applications in Chapel with the goal of spanning a wide range of computational idioms in HPC. In the short-term these studies will focus on programmability and code flexibility, but as the Chapel compiler continues to mature they will also include performance studies relative to MPI. To this end, Chapel is an important part of Cray’s HPCS productivity story, striving to make Cray’s HPCS architecture — and all parallel computers — more programmable without sacrificing the portability or performance enjoyed by MPI users today. Not surprisingly, Chapel is just one part of Cray’s HPCS program, and other efforts focus on the hardware architecture and the rest of the software stack.

HPCwire: The adoption rate of new programming languages is quite low. Is there any strategy being developed to try to overcome this challenge?

Chamberlain: Historically, users have been most inclined to adopt new programming languages when a complementary technology shift has made the change compelling. Looking to the near future, the parallel programming community is facing petascale machines for the first time as well as increasingly heterogeneous system architectures. Simultaneously, in the mainstream and open-source communities, a growing interest in parallel programming is anticipated due to the emergence of multicore processors. We believe that these challenges could lead parallel programmers to adopt new programming languages — particularly ones like Chapel that do a better job of separating the concerns of expressing a parallel algorithm from managing the low-level details required to implement it. In designing Chapel, we have done what we can to minimize barriers to adoption, including the design of the language features themselves and our decision to pursue a portable implementation. During the past two years, we have also made a number of limited releases of our compiler available to users in government labs, academia, and industry in order to get their early feedback and address their concerns. We also decided at Chapel’s inception that we would release our compiler as open-source software in order to reduce barriers to adoption and collaboration. We view Cray’s role with Chapel as an inventor and incubator, but ultimately hope that the language will grow in popularity to the extent that it can make the transition from a Cray-controlled language to more of a broad-community effort.

HPCwire: Is there a way for interested users to start experimenting with Chapel today?

Chamberlain: Yes, we will be performing our first-ever public release of Chapel in the SC08 timeframe under the BSD open source license. This release will contain our source-to-source compiler, allowing users to compile and run Chapel programs on their desktops, commodity clusters, and Cray systems. The release will be a snapshot of our work in progress, and it is being made available in order to get feedback from the community and make Chapel more useful to a broader set of users. The release will not be a complete implementation of Chapel, nor is it intended to support performance studies. To obtain the release, keep an eye on our public Web site at http://chapel.cs.washington.edu.

We conducted two Chapel tutorials at SC08 — a standalone tutorial on Sunday and a joint PGAS tutorial with X10 and UPC on Monday. Each tutorial featured a hands-on session in which participants experimented with the Chapel language and compiler with the development team standing by to answer questions.

HPCwire: Will you be able to run both Chapel and other programming models on the same system?

Chamberlain: Of course. Nothing about Chapel precludes the use of other programming models on a system, and Cray systems will continue to support MPI, OpenMP, UPC, and CAF for the foreseeable future. The more interesting question is whether a single application will be able to use Chapel in combination with other programming models like C, Fortran, MPI, UPC, and CAF. We believe that such interoperability is of the utmost importance in order to preserve legacy code that would be prohibitively expensive to rewrite from scratch. Calling between Chapel and C/Fortran is something that we anticipate supporting in the near future. The more challenging question is, how can a user make calls from an MPI program into a Chapel program, or vice-versa, without having to copy or redistribute their large, distributed data structures? We believe that Chapel’s user-defined distributions could serve as a crucial tool in addressing this challenge, and we are fostering some strategic collaborations to explore this topic, but at this point it is still very much an open research question.

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!

DDN Enables 50TB/Day Trans-Pacific Data Transfer for Yahoo Japan

December 6, 2016

Transferring data from one data center to another in search of lower regional energy costs isn’t a new concept, but Yahoo Japan is putting the idea into transcontinental effect with a system that transfers 50TB of data a day from Japan to the U.S., where electricity costs a quarter of the rates in Japan. Read more…

By Doug Black

Infographic Highlights Career of Admiral Grace Murray Hopper

December 5, 2016

Dr. Grace Murray Hopper (December 9, 1906 – January 1, 1992) was an early pioneer of computer science and one of the most famous women achievers in a field dominated by men. Read more…

By Staff

Ganthier, Turkel on the Dell EMC Road Ahead

December 5, 2016

Who is Dell EMC and why should you care? Glad you asked is Jim Ganthier’s quick response. Ganthier is SVP for validated solutions and high performance computing for the new (even bigger) technology giant Dell EMC following Dell’s acquisition of EMC in September. In this case, says Ganthier, the blending of the two companies is a 1+1 = 5 proposition. Not bad math if you can pull it off. Read more…

By John Russell

AWS Embraces FPGAs, ‘Elastic’ GPUs

December 2, 2016

A new instance type rolled out this week by Amazon Web Services is based on customizable field programmable gate arrays that promise to strike a balance between performance and cost as emerging workloads create requirements often unmet by general-purpose processors. Read more…

By George Leopold

AWS Launches Massive 100 Petabyte ‘Sneakernet’

December 1, 2016

Amazon Web Services now offers a way to move data into its cloud by the truckload. Read more…

By Tiffany Trader

Weekly Twitter Roundup (Dec. 1, 2016)

December 1, 2016

Here at HPCwire, we aim to keep the HPC community apprised of the most relevant and interesting news items that get tweeted throughout the week. Read more…

By Thomas Ayres

HPC Career Notes (Dec. 2016)

December 1, 2016

In this monthly feature, we’ll keep you up-to-date on the latest career developments for individuals in the high performance computing community. Read more…

By Thomas Ayres

Lighting up Aurora: Behind the Scenes at the Creation of the DOE’s Upcoming 200 Petaflops Supercomputer

December 1, 2016

In April 2015, U.S. Department of Energy Undersecretary Franklin Orr announced that Intel would be the prime contractor for Aurora: Read more…

By Jan Rowell

Ganthier, Turkel on the Dell EMC Road Ahead

December 5, 2016

Who is Dell EMC and why should you care? Glad you asked is Jim Ganthier’s quick response. Ganthier is SVP for validated solutions and high performance computing for the new (even bigger) technology giant Dell EMC following Dell’s acquisition of EMC in September. In this case, says Ganthier, the blending of the two companies is a 1+1 = 5 proposition. Not bad math if you can pull it off. Read more…

By John Russell

AWS Launches Massive 100 Petabyte ‘Sneakernet’

December 1, 2016

Amazon Web Services now offers a way to move data into its cloud by the truckload. Read more…

By Tiffany Trader

Lighting up Aurora: Behind the Scenes at the Creation of the DOE’s Upcoming 200 Petaflops Supercomputer

December 1, 2016

In April 2015, U.S. Department of Energy Undersecretary Franklin Orr announced that Intel would be the prime contractor for Aurora: Read more…

By Jan Rowell

Seagate-led SAGE Project Delivers Update on Exascale Goals

November 29, 2016

Roughly a year and a half after its launch, the SAGE exascale storage project led by Seagate has delivered a substantive interim report – Data Storage for Extreme Scale. Read more…

By John Russell

Nvidia Sees Bright Future for AI Supercomputing

November 23, 2016

Graphics chipmaker Nvidia made a strong showing at SC16 in Salt Lake City last week. Read more…

By Tiffany Trader

HPE-SGI to Tackle Exascale and Enterprise Targets

November 22, 2016

At first blush, and maybe second blush too, Hewlett Packard Enterprise’s (HPE) purchase of SGI seems like an unambiguous win-win. SGI’s advanced shared memory technology, its popular UV product line (Hanna), deep vertical market expertise, and services-led go-to-market capability all give HPE a leg up in its drive to remake itself. Bear in mind HPE came into existence just a year ago with the split of Hewlett-Packard. The computer landscape, including HPC, is shifting with still unclear consequences. One wonders who’s next on the deal block following Dell’s recent merger with EMC. Read more…

By John Russell

Intel Details AI Hardware Strategy for Post-GPU Age

November 21, 2016

Last week at SC16, Intel revealed its product roadmap for embedding its processors with key capabilities and attributes needed to take artificial intelligence (AI) to the next level. Read more…

By Alex Woodie

SC Says Farewell to Salt Lake City, See You in Denver

November 18, 2016

After an intense four-day flurry of activity (and a cold snap that brought some actual snow flurries), the SC16 show floor closed yesterday (Thursday) and the always-extensive technical program wound down today. Read more…

By Tiffany Trader

Why 2016 Is the Most Important Year in HPC in Over Two Decades

August 23, 2016

In 1994, two NASA employees connected 16 commodity workstations together using a standard Ethernet LAN and installed open-source message passing software that allowed their number-crunching scientific application to run on the whole “cluster” of machines as if it were a single entity. Read more…

By Vincent Natoli, Stone Ridge Technology

IBM Advances Against x86 with Power9

August 30, 2016

After offering OpenPower Summit attendees a limited preview in April, IBM is unveiling further details of its next-gen CPU, Power9, which the tech mainstay is counting on to regain market share ceded to rival Intel. Read more…

By Tiffany Trader

AWS Beats Azure to K80 General Availability

September 30, 2016

Amazon Web Services has seeded its cloud with Nvidia Tesla K80 GPUs to meet the growing demand for accelerated computing across an increasingly-diverse range of workloads. The P2 instance family is a welcome addition for compute- and data-focused users who were growing frustrated with the performance limitations of Amazon's G2 instances, which are backed by three-year-old Nvidia GRID K520 graphics cards. Read more…

By Tiffany Trader

Think Fast – Is Neuromorphic Computing Set to Leap Forward?

August 15, 2016

Steadily advancing neuromorphic computing technology has created high expectations for this fundamentally different approach to computing. Read more…

By John Russell

The Exascale Computing Project Awards $39.8M to 22 Projects

September 7, 2016

The Department of Energy’s Exascale Computing Project (ECP) hit an important milestone today with the announcement of its first round of funding, moving the nation closer to its goal of reaching capable exascale computing by 2023. Read more…

By Tiffany Trader

HPE Gobbles SGI for Larger Slice of $11B HPC Pie

August 11, 2016

Hewlett Packard Enterprise (HPE) announced today that it will acquire rival HPC server maker SGI for $7.75 per share, or about $275 million, inclusive of cash and debt. The deal ends the seven-year reprieve that kept the SGI banner flying after Rackable Systems purchased the bankrupt Silicon Graphics Inc. for $25 million in 2009 and assumed the SGI brand. Bringing SGI into its fold bolsters HPE's high-performance computing and data analytics capabilities and expands its position... Read more…

By Tiffany Trader

ARM Unveils Scalable Vector Extension for HPC at Hot Chips

August 22, 2016

ARM and Fujitsu today announced a scalable vector extension (SVE) to the ARMv8-A architecture intended to enhance ARM capabilities in HPC workloads. Fujitsu is the lead silicon partner in the effort (so far) and will use ARM with SVE technology in its post K computer, Japan’s next flagship supercomputer planned for the 2020 timeframe. This is an important incremental step for ARM, which seeks to push more aggressively into mainstream and HPC server markets. Read more…

By John Russell

IBM Debuts Power8 Chip with NVLink and Three New Systems

September 8, 2016

Not long after revealing more details about its next-gen Power9 chip due in 2017, IBM today rolled out three new Power8-based Linux servers and a new version of its Power8 chip featuring Nvidia’s NVLink interconnect. Read more…

By John Russell

Leading Solution Providers

Vectors: How the Old Became New Again in Supercomputing

September 26, 2016

Vector instructions, once a powerful performance innovation of supercomputing in the 1970s and 1980s became an obsolete technology in the 1990s. But like the mythical phoenix bird, vector instructions have arisen from the ashes. Here is the history of a technology that went from new to old then back to new. Read more…

By Lynd Stringer

US, China Vie for Supercomputing Supremacy

November 14, 2016

The 48th edition of the TOP500 list is fresh off the presses and while there is no new number one system, as previously teased by China, there are a number of notable entrants from the US and around the world and significant trends to report on. Read more…

By Tiffany Trader

Intel Launches Silicon Photonics Chip, Previews Next-Gen Phi for AI

August 18, 2016

At the Intel Developer Forum, held in San Francisco this week, Intel Senior Vice President and General Manager Diane Bryant announced the launch of Intel's Silicon Photonics product line and teased a brand-new Phi product, codenamed "Knights Mill," aimed at machine learning workloads. Read more…

By Tiffany Trader

CPU Benchmarking: Haswell Versus POWER8

June 2, 2015

With OpenPOWER activity ramping up and IBM’s prominent role in the upcoming DOE machines Summit and Sierra, it’s a good time to look at how the IBM POWER CPU stacks up against the x86 Xeon Haswell CPU from Intel. Read more…

By Tiffany Trader

Beyond von Neumann, Neuromorphic Computing Steadily Advances

March 21, 2016

Neuromorphic computing – brain inspired computing – has long been a tantalizing goal. The human brain does with around 20 watts what supercomputers do with megawatts. And power consumption isn’t the only difference. Fundamentally, brains ‘think differently’ than the von Neumann architecture-based computers. While neuromorphic computing progress has been intriguing, it has still not proven very practical. Read more…

By John Russell

Dell EMC Engineers Strategy to Democratize HPC

September 29, 2016

The freshly minted Dell EMC division of Dell Technologies is on a mission to take HPC mainstream with a strategy that hinges on engineered solutions, beginning with a focus on three industry verticals: manufacturing, research and life sciences. "Unlike traditional HPC where everybody bought parts, assembled parts and ran the workloads and did iterative engineering, we want folks to focus on time to innovation and let us worry about the infrastructure," said Jim Ganthier, senior vice president, validated solutions organization at Dell EMC Converged Platforms Solution Division. Read more…

By Tiffany Trader

Container App ‘Singularity’ Eases Scientific Computing

October 20, 2016

HPC container platform Singularity is just six months out from its 1.0 release but already is making inroads across the HPC research landscape. It's in use at Lawrence Berkeley National Laboratory (LBNL), where Singularity founder Gregory Kurtzer has worked in the High Performance Computing Services (HPCS) group for 16 years. Read more…

By Tiffany Trader

Micron, Intel Prepare to Launch 3D XPoint Memory

August 16, 2016

Micron Technology used last week’s Flash Memory Summit to roll out its new line of 3D XPoint memory technology jointly developed with Intel while demonstrating the technology in solid-state drives. Micron claimed its Quantx line delivers PCI Express (PCIe) SSD performance with read latencies at less than 10 microseconds and writes at less than 20 microseconds. Read more…

By George Leopold

  • arrow
  • Click Here for More Headlines
  • arrow
Share This