Python for HPC and the Intel Xeon Phi

Print Friendly, PDF & Email

Python-logo-notext.svgPython is a commonly used language within the overall computer industry. Python is an easy to use and elegant scripting language which had gained some popularity in the HPC industry. With the evolution of heterogeneous computing systems that involve both host processor CPUs such as the Intel Xeon and coprocessors such as the Intel Xeon Phi coprocessor, it is important to make sure that the libraries and ecosystem exist to allow Python applications to run on these systems.

For example, the application, GPAW, which is for simulating electronic structures in materials science research. GPAW can be run on a wide variety of systems, and scales well using coprocessors. GPAW is programmed in both C and Python. In GPAW, the high level nature of Python allows developers to design the algorithms, while C can be implemented for numeric intensive portions of the application through the use of highly optimized math kernels.  In this application, the Python portions of the code are serial, which makes offloading to the Intel Xeon Phi coprocessor not feasible. However, and interface has been developed, pyMIC, which allows the application to launch kernels and control data transfers to the coprocessor.

The pyMIC module provides an easy to use  way to offload applications to such coprocessors as the Intel Xeon Phi coprocessor. Data can be streamed asynchronously to the coprocessor. The application GPAW (open sourced) which now uses the pyMIC interface has been benchmarked, and shows considerable performance improvement as compared to a host only implementation. One caveat, is the developers must offload either C/C++ or Fortran compiled kernels. In the future, Python kernels are expected to be able to be offloaded as well.

It is important to understand that not all HPC applications are written in C/C++ or Fortran. Languages/scripting such as Python allow for high level development, but also can be used in a heterogeneous environment that use both the Intel Xeon CPU and the Intel Xeon Phi coprocessor.

Source:  CSC, Finland; Intel Corporation, Germany; Imperial College of London, UK

New Tools, New Rules Create faster code—faster—with the new Intel® Parallel Studio XE. Try it today.