Python Snakes Its Way Into HPC

By Nicole Hemsoth

November 17, 2010

Interpreted programming languages usually don’t find too many friends in high performance computing. Yet Python, one of the most popular general-purpose interpreted languages, has garnered a small community of enthusiastic followers. True believers got the opportunity to hear about the language in the HPC realm in a tutorial session on Monday and a BoF session on Wednesday. Argonne National Lab’s William Scullin, who participated in both events, talked with HPCwire about the status of Python in this space and what developers might look forward to.

HPCwire: Python is not a language normally associated with high performance or scientific computing. What does it have to offer this user community not being fulfilled by traditional languages, like C, Fortran or other high productivity, interpreted languages like MATLAB?

William Scullin: In a way, Python’s growing adoption in the high performance and scientific computing space is a homecoming. Guido Van Rossum originally began Python as a way of providing an administrative scripting language for the Amoeba distributed operating system. Then as now, it combines simple, easy to learn and maintain syntax with access to the same powerful libraries and function calls you would find in any C or Fortran implementation. While there has always been an emphasis on reducing the time it takes to perform a computation, Python has truly shined in improving scientific computing by taking the work out of programming and reducing the time to solution.

Often, projects fail when they try to be all things to all people. MATLAB, Mathematica, SPSS, and Maple are all very useful tools, in part because they are focused on meeting the needs of a well funded community with very specific goals. Python, arising from a very diverse community that ranges from astrophysicists to game programmers to web designers to entry level computer science students, has been very successful due to the diversity of users. The standard library has become amazingly extensive without becoming inconsistent.

Likewise, the amount of software that has come out of the community is amazing, most of which is open source, and the vast majority of which follows the same coding guidelines as the core modules. This makes it possible to easily develop an interface to an embedded microcontroller to turn off the desk lamp when your simulation finally ends and automatically push results to a web server in less than an hour — or alternately turn on a coffee pot and resubmit your job when the simulation fails — all in one language.

HPCwire: Obviously, performance is a driving issue in HPC. How is the issue of execution performance being addressed?

Scullin: Performance is a matter of perspective. A favorite maxim in the Python community is that the greatest performance improvement comes from going to the working from the non-working state. A second maxim, from Knuth, is that premature optimization is the root of all evil. While the execution speed of a Python application may not be as fast as one written in C, C++, or Fortran, its ease of use and low learning curve sharply improves overall time to solution. It’s a question of developer time versus compute time.

Side stepping the issue, it’s ridiculously easy to extend Python with modules written in C, C++, and Fortran. It’s common in our community to utilize compiled high performance numerical kernels, then use Python to handle areas like I/O, workflow management, computational analysis, and steering. When areas become performance bottlenecks, those areas tend to be rewritten in C.

Conversely, I’ve seen C and Fortran projects where code complexity has prevented maintenance and functionality, leading to thousands of lines of compiled code being replaced with less than a hundred lines of Python. In many ways, Python is coming to fulfill the roles that frameworks like Cactus and Samurai sought to fill at the start of the decade — letting scientists worry about their problems while letting the language and interpreter do the heavy lifting.

HPCwire: Do you think a compiled implementation of Python would be a step in the right direction?

Scullin: There will always be a place for the interpreted reference implementation, especially in development, but if a Python compiler comes along that provides better performance without compromising the language, I can’t see it finding much resistance.

That said, there are currently projects such as Unladen Swallow, PyPy, Stackless Python, Jython, and Iron Python that provide alternatives to the CPython interpreter. Unladen Swallow, backed in part by Google, and PyPy both seek to close the performance gap with compiled languages. Unladen Swallow is particularly exciting as it’s backended into the Low Level Virtual Machine, which is the basis for multiple compilers including Clang, currently the default compiler under Apple’s OS X. This makes a Python compiler more a matter of when than if.

HPCwire: Can you describe some of the more important Python initiatives — language extensions, libraries, tools, etc. — that are aimed at the HPC domain?

Scullin: I cannot speak highly enough of NumPy, which is almost the Swiss army knife of Python for scientific and high performance computing. It’s been under active development for years now with each release providing better performance, automatic integration of popular high performance libraries like BLAS and LAPACK, more features, and greater portability. NumPy is further extended by SciPy, which provides additional tools and lab kits addressing almost every science domain.

Likewise, I think very highly of mpi4py, PyMPI, PyCUDA and its sister PyOpenCL, petsc4py, and PyTrilinos. All of these keep improving the options we have to accelerate our code using the very same tools and interfaces that are available through traditional compiled languages with none of the complexity.

HPCwire: Are there vendors out there with commercially-supported solutions?

Scullin: Indeed, and more importantly, most of them are active contributors to and supporters of the Python community. I can no longer count the number of consulting firms that provide Python solutions. It’s also been very encouraging seeing vendors add Python support to their products. Two companies well known in the HPC space, Rogue Wave and ParaTools, have both been very responsive.

Rogue Wave has provided access to their mathematical libraries, IMSL via PyIMSL. Furthermore, they have brought a number of people into the Python community via PyIMSL Studio which they market officially as a prototyping tool. I’ve encountered PyIMSL studio users so happy with their prototype Python applications with PyIMSL Studio, that they ran with the Python code as production code. I should also mention that while the TotalView debugger is not officially a Python tool, it’s seen a lot of use by Python HPC users and it will be interesting to see where it goes since Rogue Wave’s acquisition of Acumen.

ParaTools, a major contributor to the TAU Performance System and a leading consultant in the area of parallel and high performance codes has done a very good job of adding Python support to TAU.

Without hesitation, I have used their tools with C, Fortran, and Python and found their support to be helpful and responsive regardless of language.

While not directly in the HPC market, Enthought, deserves special mention. They host an array of Python projects with engineering and science applications. They provide a commercial packaging of the Python interpreter with commonly used libraries and utilities along with technical support as the Enthought Python Distribution. Most of all, they are active developers of NumPy and SciPy. Without their support and involvement, I am not sure that NumPy would have come together as nicely as it has.

While relatively new, I’ll also be interested to see what the future holds for MBA Sciences’s SPM.Python toolkit for bringing parallelism into serial Python programs. I’ll be keeping a close watch on PiCloud, a firm which provides an amazingly easy to user cloud computing platform that makes running Python codes on a compute cloud ridiculously easy. PiCloud users have their computations offloaded without any serious code changes, having to be involved in any aspect of setting up a cloud infrastructure, or doing any server management. They’ve seriously made it as simple as coding and running.

Finally, though it hasn’t been making a lot of noise lately, NVIDIA has been putting effort behind Copperhead, which while not a complete Python, allows for the rapid development of CUDA kernels in Python-like code.

HPCwire: Do you think most uses of Python in HPC will eventually involve either integration with C or Fortran or source code translation to those languages?

Scullin: I believe that HPC users will continue to choose the best possible tool to address a need in a given situation. Python is flexible enough that there will be continued integration with C, Fortran, and other languages. At the same time, interpreter performance is being rapidly addressed, which makes the issues that come with language translation into C and Fortran cause that sort of project to be less attractive to active Python developers. What will be interesting to watch is how codes written in a mix of C, C++, Fortran, Python and other languages perform and evolve as the LLVM platform continues to mature.

HPCwire: Can you point to any successful case studies or projects where Python has been employed in this arena?

Scullin: At Argonne, we are involved in the development of GPAW, a density-functional theory Python code based on the projector-augmented wave method. Originating out of an international collaboration, it is mostly a mix of C and Python with the vast majority of the code being Python. It has been run at scale successfully and routinely on our Blue Gene platform. While the porting of any application to platforms like the Cray XT series or the Blue Gene is an interesting exercise in computer science, it’s far more remarkable that the performance has been on par from what I’ve seen in C or C++ codes. Moreover, it is being used to produce reliable data used to generate publications.

The other community that a lot of people think of when looking for successful Python applications in the HPC space is bioinformatics. While I’ve not been involved with many bioinformatics codes, the last four or five years have seen a rising number of chemists and biologists appearing on Python-related mailing lists and at conferences discussing how they have been using Python to power their science. While Perl still holds sway in the field, Python is quickly becoming almost as popular.

HPCwire: For those HPC developers interested in learning more about what’s available in the Python ecosystem, can you point to some resources they could tap into?

Scullin: Depending on their particular interests, one of the best places to start is by visiting www.scipy.org. From there, you can find links to numerous mailing lists, information about conferences, code recipes, documentation, and much more. In the Chicago and Bay Areas there are very active Python users groups with sizable memberships with an interest in HPC and scientific computing. Finally, given Python’s ease of use, one of the best things you can do is to spend an afternoon with the interpreter, simply playing with code and seeing what the language can do for you without any effort. The joy of doing powerful things with simple code is one of the most admirable traits of the language.

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!

Hyperion: HPC Server Market Ekes 1 Percent Gain in 2020, Storage Poised for ‘Tipping Point’

May 12, 2021

The HPC User Forum meeting taking place virtually this week (May 11-13) kicked off with Hyperion Research’s market update, covering the 2020 period. Although the HPC server market had been facing a 6.7 percent COVID-re Read more…

Finland’s CSC Chronicles the COVID Research Performed on Its ‘Puhti’ Supercomputer

May 11, 2021

CSC, Finland’s IT Center for Science, is home to a variety of computing resources, including the 1.7 petaflops Puhti supercomputer. The 682-node, Intel Cascade Lake-powered system, which places about halfway down the T Read more…

IBM Debuts Qiskit Runtime for Quantum Computing; Reports Dramatic Speed-up

May 11, 2021

In conjunction with its virtual Think event, IBM today introduced an enhanced Qiskit Runtime Software for quantum computing, which it says demonstrated 120x speedup in simulating molecules. Qiskit is IBM’s quantum soft Read more…

AMD Chipmaker TSMC to Use AMD Chips for Chipmaking

May 8, 2021

TSMC has tapped AMD to support its major manufacturing and R&D workloads. AMD will provide its Epyc Rome 7702P CPUs – with 64 cores operating at a base clock of 2.0GHz – implemented in HPE's single-socket ProLian Read more…

Supercomputer Research Tracks the Loss of the World’s Glaciers

May 7, 2021

British Columbia – which is over twice the size of California – contains around 17,000 glaciers that cover three percent of its landmass. These glaciers are crucial for the Canadian province, which relies on its many Read more…

AWS Solution Channel

FLYING WHALES runs CFD workloads 15 times faster on AWS

FLYING WHALES is a French startup that is developing a 60-ton payload cargo airship for the heavy lift and outsize cargo market. The project was born out of France’s ambition to provide efficient, environmentally friendly transportation for collecting wood in remote areas. Read more…

Meet Dell’s Pete Manca, an HPCwire Person to Watch in 2021

May 7, 2021

Pete Manca heads up Dell's newly formed HPC and AI leadership group. As senior vice president of the integrated solutions engineering team, he is focused on custom design, technology alliances, high-performance computing Read more…

Hyperion: HPC Server Market Ekes 1 Percent Gain in 2020, Storage Poised for ‘Tipping Point’

May 12, 2021

The HPC User Forum meeting taking place virtually this week (May 11-13) kicked off with Hyperion Research’s market update, covering the 2020 period. Although Read more…

IBM Debuts Qiskit Runtime for Quantum Computing; Reports Dramatic Speed-up

May 11, 2021

In conjunction with its virtual Think event, IBM today introduced an enhanced Qiskit Runtime Software for quantum computing, which it says demonstrated 120x spe Read more…

AMD Chipmaker TSMC to Use AMD Chips for Chipmaking

May 8, 2021

TSMC has tapped AMD to support its major manufacturing and R&D workloads. AMD will provide its Epyc Rome 7702P CPUs – with 64 cores operating at a base cl Read more…

Fast Pass Through (Some of) the Quantum Landscape with ORNL’s Raphael Pooser

May 7, 2021

In a rather remarkable way, and despite the frequent hype, the behind-the-scenes work of developing quantum computing has dramatically accelerated in the past f Read more…

IBM Research Debuts 2nm Test Chip with 50 Billion Transistors

May 6, 2021

IBM Research today announced the successful prototyping of the world's first 2 nanometer chip, fabricated with silicon nanosheet technology on a standard 300mm Read more…

LRZ Announces New Phase of SuperMUC-NG Supercomputer with Intel’s ‘Ponte Vecchio’ GPU

May 5, 2021

At the Leibniz Supercomputing Centre (LRZ) in München, Germany – one of the constituent centers of the Gauss Centre for Supercomputing (GCS) – the SuperMUC Read more…

Crystal Ball Gazing at Nvidia: R&D Chief Bill Dally Talks Targets and Approach

May 4, 2021

There’s no quibbling with Nvidia’s success. Entrenched atop the GPU market, Nvidia has ridden its own inventiveness and growing demand for accelerated computing to meet the needs of HPC and AI. Recently it embarked on an ambitious expansion by acquiring Mellanox (interconnect)... Read more…

Intel Invests $3.5 Billion in New Mexico Fab to Focus on Foveros Packaging Technology

May 3, 2021

Intel announced it is investing $3.5 billion in its Rio Rancho, New Mexico, facility to support its advanced 3D manufacturing and packaging technology, Foveros. Read more…

Julia Update: Adoption Keeps Climbing; Is It a Python Challenger?

January 13, 2021

The rapid adoption of Julia, the open source, high level programing language with roots at MIT, shows no sign of slowing according to data from Julialang.org. I Read more…

AMD Chipmaker TSMC to Use AMD Chips for Chipmaking

May 8, 2021

TSMC has tapped AMD to support its major manufacturing and R&D workloads. AMD will provide its Epyc Rome 7702P CPUs – with 64 cores operating at a base cl Read more…

Intel Launches 10nm ‘Ice Lake’ Datacenter CPU with Up to 40 Cores

April 6, 2021

The wait is over. Today Intel officially launched its 10nm datacenter CPU, the third-generation Intel Xeon Scalable processor, codenamed Ice Lake. With up to 40 Read more…

CERN Is Betting Big on Exascale

April 1, 2021

The European Organization for Nuclear Research (CERN) involves 23 countries, 15,000 researchers, billions of dollars a year, and the biggest machine in the worl Read more…

HPE Launches Storage Line Loaded with IBM’s Spectrum Scale File System

April 6, 2021

HPE today launched a new family of storage solutions bundled with IBM’s Spectrum Scale Erasure Code Edition parallel file system (description below) and featu Read more…

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…

Saudi Aramco Unveils Dammam 7, Its New Top Ten Supercomputer

January 21, 2021

By revenue, oil and gas giant Saudi Aramco is one of the largest companies in the world, and it has historically employed commensurate amounts of supercomputing Read more…

Quantum Computer Start-up IonQ Plans IPO via SPAC

March 8, 2021

IonQ, a Maryland-based quantum computing start-up working with ion trap technology, plans to go public via a Special Purpose Acquisition Company (SPAC) merger a Read more…

Leading Solution Providers

Contributors

Can Deep Learning Replace Numerical Weather Prediction?

March 3, 2021

Numerical weather prediction (NWP) is a mainstay of supercomputing. Some of the first applications of the first supercomputers dealt with climate modeling, and Read more…

AMD Launches Epyc ‘Milan’ with 19 SKUs for HPC, Enterprise and Hyperscale

March 15, 2021

At a virtual launch event held today (Monday), AMD revealed its third-generation Epyc “Milan” CPU lineup: a set of 19 SKUs -- including the flagship 64-core, 280-watt 7763 part --  aimed at HPC, enterprise and cloud workloads. Notably, the third-gen Epyc Milan chips achieve 19 percent... Read more…

Livermore’s El Capitan Supercomputer to Debut HPE ‘Rabbit’ Near Node Local Storage

February 18, 2021

A near node local storage innovation called Rabbit factored heavily into Lawrence Livermore National Laboratory’s decision to select Cray’s proposal for its CORAL-2 machine, the lab’s first exascale-class supercomputer, El Capitan. Details of this new storage technology were revealed... Read more…

African Supercomputing Center Inaugurates ‘Toubkal,’ Most Powerful Supercomputer on the Continent

February 25, 2021

Historically, Africa hasn’t exactly been synonymous with supercomputing. There are only a handful of supercomputers on the continent, with few ranking on the Read more…

GTC21: Nvidia Launches cuQuantum; Dips a Toe in Quantum Computing

April 13, 2021

Yesterday Nvidia officially dipped a toe into quantum computing with the launch of cuQuantum SDK, a development platform for simulating quantum circuits on GPU-accelerated systems. As Nvidia CEO Jensen Huang emphasized in his keynote, Nvidia doesn’t plan to build... Read more…

New Deep Learning Algorithm Solves Rubik’s Cube

July 25, 2018

Solving (and attempting to solve) Rubik’s Cube has delighted millions of puzzle lovers since 1974 when the cube was invented by Hungarian sculptor and archite Read more…

The History of Supercomputing vs. COVID-19

March 9, 2021

The COVID-19 pandemic poses a greater challenge to the high-performance computing community than any before. HPCwire's coverage of the supercomputing response t Read more…

HPE Names Justin Hotard New HPC Chief as Pete Ungaro Departs

March 2, 2021

HPE CEO Antonio Neri announced today (March 2, 2021) the appointment of Justin Hotard as general manager of HPC, mission critical solutions and labs, effective Read more…

  • arrow
  • Click Here for More Headlines
  • arrow
HPCwire