Knights Corner: Open source software stack

Knights Corner: Open source software stack

As mentioned in Knights Corner micro-architecture support” the open source software stack consists of an embedded Linux, a minimally modified GCC, plus driver software. There is a package for GDB available separately as well. Links for these resources can be found at intel.com/software/mic in the article titled “RESOURCES (including downloads).

MPSS

The full name for our software stack is the “Intel® Many Integrated Core (MIC) Platform Software Stack.”  Users often call it MPSS for short. It is dependent on the 2.6.34 Linux kernel, and it has been tested to work with specific versions of 64-bit Red Hat Enterprise 6.0, 6.1, and 6.2, as well as SuSE Linux Enterprise Server (SLES) 11 SP1. The readme.txt file has more information on how to build and install the stack.

The open source updates we have made are in support of the instruction set, the ABI, initializing and controlling an SMP on-a-chip, and the glue software to support the coprocessor communication with the host system.

The Symmetric Communications Interface (SCIF) is included in the RPM bundle. SCIF provides a mechanism for inter-node communications within a single platform. A node, for SCIF purposes, is defined as either a Knights Corner device or the Intel Xeon processor.  In particular, SCIF abstracts the details of communicating over the PCI Express bus. The SCIF APIs are callable from both user space (uSCIF) and kernel-space (kSCIF).

We learned a few things in doing our first implementations of MPSS and look forward to discussions with upstream projects about how MIC Architecture should be supported. What we have released now will be worthy of a “typical vendor code” label by the community, and we will work to upgrade from that. Naturally, we are not recommending checking in the code we have today. Nevertheless, it is functional and ready for use. In fact, it has been being actively used on prototype and pre-production machines for many months already. Going forward we are looking into to utilizing the Yocto project for our build system, which may make it even easier for those that wish to experiment with and build upon our environment.

GCC: the basics are in



Our changes to the GCC tool chain allow it to build the coprocessor’s Linux environment, including our drivers, for either the Knights Ferry prototype or Knights Corner coprocessor. The changes do not include support for Knights Corner vector instructions and related optimization improvements.  GCC for Knights Corner is really only for building the kernel and related tools; it is not for building applications. Using GCC to build an application for Knights Corner will most often result in low performance code due its current inability to vectorize for the new Knights Corner vector instructions. Future changes to give full usage of Knights Corner vector instructions would require work on the GCC vectorizer to utilize those instructions’ masking capabilities. This is something that requires a broader discussion in the GCC community than simply changing the code generator.

GCC also does not include support for any offload directives at this point. While the Intel compiler has “LEO” (Language Extensions for Offload), we are hopeful of a standard that brings together the GPU-only OpenACC with the more flexible Intel LEO offload model for coprocessors. We are engaged in the OpenMP committee hoping to find such a combination to be generally applicable, integrated and fully compatible with OpenMP (including the ability to offload OpenMP code). Once that is achieved, we think it will make sense to see if GCC’s OpenMP support should be extended. We can then work with the GCC community to discuss and assist these potential future additions to GCC.

GDB: ready for C and C++ developers

GDB is great for C and C++ application debugging unless Intel® Language Extensions for Offload (LEO) are being used. The Intel debugger is still a better choice for Fortran application debugging and for debugging programs using offload. We are working to collaborate with the GDB community to enhance GDB for Fortran and for offload debugging.

Linux support for Knights Corner

The changes in the Linux kernel are primarily for three reasons:

  • Numerous little changes to support the unique combination of an Intel® Pentium® processor core that also supports 64-bits including the Knights Corner vector instructions.
  • Power management, which is a feature not associated with the original Pentium processors. Power management is much more important when you have more than fifty of them on a single die!
  • The Knights Corner machine check architecture, also a feature not present in the original Pentium processor designs.



Join us in defining the environment!

We have it up and running, and have been told we rate as “typical vendor code” by open source community members who have seen it. We look forward to working with the community, to merge these concepts into the open source projects through the normal community review, feedback and assistance process. We know some code is ready, and some needs a little work, and some needs a rewrite to take advantage of standard methods that we overlooked in the initial implementation. This is true of our kernel changes, drivers, as well as the modifications to GCC and GDB.

Our choice of an open software stack, running on an SMP on-a-chip, is very exciting.  The discussion forum Intel® Many Integrated Core (MIC) Architecture Forum is available to join to discuss this further. The opportunities for innovation seem limitless.

For more complete information about compiler optimizations, see our Optimization Notice.

Comments