Strumenti Utente

Strumenti Sito


Access to Xeon PHI

This instructions are relative to the Xeon PHI Knights Corner. The additional instructions to access the PHI Knights Landing may be found here.

Machine name and access

The machine is and has the IP address

In case you have not already received and account, you should request the account to the SPM teacher sending an email with

  • SUbject: SPM PHI ACCOUNT 1718
  • Body: name, family name enrollement number and either CS or MCSN in case you are enrolled in Computer Science or in Computer Science and Networking

Once you have the account (will be an “spm16XX”) you may access the host with the Xeon PHI board by

  • ssh

You should change the password you received by email at first login issuing a command passwd at the shell prompt.


Please take into account the homes on are not subject to backup. Keep a local copy of whatever (source) files you are using on the machine. In case of problems I'll not be able to recover any of the home files.

Take into account that you may edit files on your machine and just compile and run them on the remote (host or PHI). What you can do is to have a local directory hosting the source files, may be develop and debug using local IDE (such as Eclipse or Visual Studio), then synchronize the files using the rsync command and execute commands on remote host via ssh commands from the shell prompt.

If you need further info concerning the procedure don't hesitate to ask me during question time or by email.

Accessing FastFlow and sample Code/Classworks

The correct version of FastFlow to use for the course is actually replicated under


and the exercises and material relative to the classworks are under


In case you want to access directly these directories under your own home directory, you may create symbolic links to the two directories by issuing commands such as:

    link -s /home/spm1501/fastflow .
    link -s /home/spm1501/public .

that will leave two new subdirectories (link) in the current directory.

Extra tools

All the non standard tools (or the versions newer than the ones provided in the standard distribution) are available under the directory



Oracle JDK 1.8 has been installed under /home/spm1501/public directory. Set up the PATH to the bin directory and please avoid to make local copies of it in your local home directory. Both compiler and run time have been installed. This only works on the host, it does not work on the Xeon PHI.

Compiling and running code on the PHI

In order to be able to use the tools, you have to run the script in

  • source /opt/intel/compilers_and_libraries/bin/ intel64 that will set up the proper compiler and library paths. I suggest you to make the execution of the script automatic by inserting the call to the script in the .bashrc configuration file of your home directory (add a line such as source /opt/intel/composerxe/bin/ intel64 at the end of this file)

In order to run a program on PHI:

  1. compile it on the host using icc with the additional flag -mmic
  2. copy the executable to the mic0 or mic1 with a scp a.out mic0:
  3. execute it on the mic: ssh mic0 ./a.out

Please take into account that a minimal set of libraries is available on the mic.


There are a few things to take into account when using FastFlow on PHI:

  • please take into account that you need to include the flag

    when compiling FastFlow programs, as the default mapping at the moment assumes a core numbering such as the one used for Sandy/Ivy Bridge (0 first context of the first core, 1 first context of the second core …) processors, which is different from the one used on PHI (0 first context of the first core, 1 second context of the first core …).

  • always use the compile flag

    to compile FastFlow code

  • use the FastFlow version in

    that is use the compile time flag

    -I /home/spm1501/fastflow

MIC0 and MIC1

You can use both the accelerators available on the machine (namely MIC0 and MIC1), despite the fact the examples in this page alway use mic0 …

Additional libraries

In case you need additional libraries on the MIC (e.g. you must copy the library from


to the MIC (with an SCP command) and then you should tell the MIC run time where to look for the library:



Available documentation on the Xeon PHI and the relative programming tools may be accessed at the Intel Xeon PHI Developer Zone

More documentation

magistraleinformaticanetworking/spm/spm1718.txt · Ultima modifica: 12/01/2018 alle 09:25 (6 anni fa) da Marco Danelutto