manual:xeonphi
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
manual:xeonphi [2014/07/08 15:00] – created zenke | manual:xeonphi [2014/12/15 12:54] (current) – [Preparing Auryn for Xeon Phi/MIC] zenke | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== | + | ====== |
- | This section is to document highly | + | The following |
- | ===== Building Boost for Xeon Phi ===== | + | This has been tested |
- | '' | + | ===== Compiling Boost for Xeon Phi/MIC ===== |
+ | |||
+ | For the most part you can follow one of Boosts tutorials for the compilation [[http:// | ||
+ | < | ||
+ | using mpi : / | ||
+ | </ | ||
+ | to enable MPI and to tell the build toolchain Jam which compiler to use. Note that you might have to adapt the version numbers in this example to your actual version. | ||
+ | |||
+ | Building of boost was then achieved by using a command line similar to the following. It is important to pass the '' | ||
+ | <code shell> | ||
+ | ./b2 toolset=intel | ||
+ | </ | ||
+ | |||
+ | ===== Preparing Auryn for Xeon Phi/MIC ===== | ||
+ | |||
+ | To run smoothly on the architecture and to make efficient use of vectorization you need to set the following switches in the '' | ||
+ | To do so find the following precompile directives in '' | ||
+ | <code cpp> | ||
+ | // #define CODE_ACTIVATE_PREFETCHING_INTRINSICS | ||
+ | #define CODE_USE_SIMD_INSTRUCTIONS_EXPLICITLY | ||
+ | #define CODE_ACTIVATE_CILK_INSTRUCTIONS | ||
+ | </ | ||
+ | |||
+ | ===== Building Auryn for Xeon Phi/MIC ===== | ||
+ | |||
+ | With this done one simply has to create a new subdir in the Auryn build directory and add the following Makefile: | ||
+ | |||
+ | <code Makefile> | ||
+ | .SECONDARY: | ||
+ | |||
+ | CC = / | ||
+ | CXX = / | ||
+ | |||
+ | CFLAGS= -ansi -Wall -pipe -O3 -mmic -static_mpi -static-intel -vec-report2 -pedantic | ||
+ | LDFLAGS= -L/ | ||
+ | |||
+ | include ../ | ||
+ | </ | ||
+ | |||
+ | Again the path variables will probably need to be updated to your needs. Furthermore depending on where you installed the Boost-for-MIC libraries you might have to add a cflag '' | ||
+ | |||
+ | Now you are almost set for compilation. However, before you compile '' | ||
+ | <code shell> | ||
+ | source / | ||
+ | source / | ||
+ | </ | ||
+ | |||
+ | Invoking '' | ||
+ | |||
+ | |||
+ | ===== Running Auryn simulations on Xeon Phi/MIC ===== | ||
+ | |||
+ | To run a simulation (e.g. sim_background) in native mode on a Xeon Phi card you need to copy the binary and the required shared libraries to the card. This essentially follows the steps outlined in this Intel tutorial [[https:// | ||
+ | |||
+ | Finally the code can be run on the coprocessor card: | ||
+ | <code shell> | ||
+ | [xyz@srv1-mic0 tmp]# mpirun -n 60 ./ | ||
+ | </ | ||
+ | |||
+ | |||
+ | Enjoy! |
manual/xeonphi.txt · Last modified: 2014/12/15 12:54 by zenke