You may already know that the Intel MPSS (Manycore Platform Software Stack) is only officially supported for RedHat and SUSE Linux distros. Using and enterprise distro might be very interesting if your company is running a large server environment or if your company is short on specialized people and you rely on the company's support for more complicated tasks.

Not all companies use enterprise Linux distributions and Ubuntu has a large share of the Linux distro market (if not the largest). Since I needed to setup a machine running Ubuntu 14.04 and MPSS 3.4 and could not find any documentation running the newest versions of Ubuntu/Linux Kernel/MPSS, I will try to document here how to get the Intel Xeon Phi running on Kernel 3.13.0 (which is not officially supported by the MPSS to the date of this post). The kernel module for was tested on Ubuntu 14.04 only, but it should compile and run without any problems in any system running Kernel 3.13.0 (not tested with newer versions).

<h3>Building and Installing Kernel Modules</h3>

To start, you will need to download the MPSS 3.4 kernel module sources, it can be download from <a href="https://software.intel.com/en-us/articles/intel-manycore-platform-software-stack-mpss">Intel's website</a> but only as part of the complete set of sources for MPSS platform. Since we do not need all sources and to make it easier, you can just clone/download the MPSS 3.4 module sources from my <a href="https://github.com/pentschev/mpss-modules">GitHub repository</a>, it is ready to be built for Linux Kernel 3.13.0.

After downloading the module source, one can build it by simply running <code>make</code>, but do not forget to install build-essential (install tools such as GCC and Make, required to compile the module) and also the kernel headers that is contained within package kernel-headers-generic on Ubuntu, these packages can be installed with the command <code>sudo apt-get install build-essential linux-headers-generic</code>. To install (as root), just execute <code>make install</code>. The correct kernel module for MPSS is now installed on your system, but it might be necessary to load it manually by running <code>modprobe mic</code> as root, or rebooting the machine.

<h3>Converting and Installing RPM Packages</h3>

With the kernel module already installed and loaded, it is time to install the remaining MPSS tools. As with the MPSS kernel module, there is no native support for Ubuntu which uses DEB packaging system, but only for RedHat and SUSE (both use RPM packaging system). The simplest way to install MPSS tools is probably to convert the RPM packages to DEB packages.

Let's first download the Linux MPSS 3.4 binaries from <a href="https://software.intel.com/en-us/articles/intel-manycore-platform-software-stack-mpss">Intel's website</a> and uncompressing the files by executing the following command:

<pre>
tar xf mpss-3.4-linux.tar
</pre>

After uncompressing the file, there will be a new directory called <code>mpss-3.4</code>, with about 50 RPM packages. To convert them to DEB packages, we will need another tool called alien, contained in the Ubuntu package with same name: <code>sudo apt-get install alien</code>.

Inside the <code>mpss-3.4</code> directory, you need to start the conversion of packages, executing the command <code>alien --scripts *.rpm</code>. This process may take a few minutes to complete.

After the conversion is completed, we simply install all DEB packages but this time not with <code>apt-get</code>, since it only installs packages that are available in the repositories defined for Ubuntu. To install the DEB packages we use the command <code>dpkg -i *.deb</code>, which may take one or two more minutes.

At this point, we have everything we need to get the Intel Xeon Phi co-processor up and running, but to compile code that runs on the Phi co-processor, it is necessary to have installed <a href="https://software.intel.com/en-us/intel-parallel-studio-xe">Intel Parallel Studio XE</a>.