The Intel Xeon Phi Coprocessor is the Intel's new high-performance CPU line which exploits a many-core technology to enhance performance while using x86-based instructions. It has been adopted by most world-leading supercomputing facilitites as Intel promises continous development (see Intel® Xeon® and Intel® Xeon Phi™ Roadmap Update).
Using Intel Xeon Phi Coprocessor
Intel Xeon Phi 3120A Coprocessor can be used in three different modes: offload, MPI, and native. As following figures describe, you make a parallel part of your code run in the coprocessor in the offload mode. In the MPI mode, you run MPI processes in a CPU while you also run MPI processes in the coprocessor. If your code is made of only parallel parts, you can execute your code only in the coprocessor in the native mode.
Usage of Xeon Phi Coprocessors requires installation of Intel Manycore Platform Software Stack (Intel MPSS) which is already available on Mars.
Intel Compilers are also needed to compile codes and make them run on the coprocessors. You can setup environments to use the Intel Compilers by sourcing shell scripts:
depending on your shell.
You can find a well-summarized guide of using Xeon Phi Coprocessors in PRACE's Best Practice Guide – Intel Xeon Phi.
Compilation and Running of Native Applications
For example, when you want to compile a native application using OpenMP parallelization, you simply should have -mmic option as well as -openmp option in your compilation.
icc -o ./multi ./multi.c -mmic -openmp
You should login to the Xeon Phi Coprocessor before you run the application.
Since the Coprocessor mounts file systems of Mars, you can find all relevant files including the compiled executable file. Considering dependences of your code on libraries, you should setup LD_LIBRARY_PATH. In most simple cases, you simply need to set LD_LIBRARTY_PATH to MIC_LD_LIBRARY_PATH.
export LD_LIBRARY_PATH=$MIC_LD_LIBRARY_PATH ./multi 184010-0047 816
The following Intel web pages are good guides to help you figure out programming methods with Intel Xeon Phi Coprocessors.
Optimization and Performance
Guides in the Intel sites include:
The following web pages present specific examples.
- pyMIC: A Python Offload Module for the Intel Xeon Phi Coprocessor - the link to the module is https://github.com/01org/pyMIC
The following links provide full-depth guides.