EasyManua.ls Logo

Intel Xeon Phi User Manual

Intel Xeon Phi
32 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #21 background imageLoading...
Page #21 background image
Intel® Xeon Phi Coprocessor DEVELOPERS QUICK START GUIDE
21
size_t size = 1*1e6;
int n_bytes = size*sizeof(float);
data = (_Cilk_shared float *)_Offload_shared_malloc (n_bytes);
for (int i=0; i<size; ++i)
{
data[i] = i%10;
}
_Cilk_offload MIC_OMPReduction(size);
_Offload_shared_free(data);
return 0;
}
Code Example 4: Using the “_Cilk_shared” and “_Cilk_offload” Keywords with Dynamic Allocation in
C/C++
Note: For more examples on using the implicit memory copy model, see:
C: /opt/intel/composerxe/Samples/en_US/C++/mic_samples/shrd_sampleC
and …/LEO_tutorial
C++: /opt/intel/composerxe/Samples/en_US/C++/mic_samples/shrd_sampleCPP
For more information, users are encouraged to read the Intel C++ Compiler User and Reference Guides and/or
the Intel Fortran Compiler User and Reference Guides.
The section “Restrictions on Offload Using Shared Virtual Memory” in the document “Intel C++ Compiler User
and Reference Guide” shows some restrictions of using this programming model.
Native Compilation
Applications can also be run natively on the Intel® Xeon Phi™ Coprocessor, in which case the coprocessor will
be treated as a standalone multicore computer. Once the binary is built on the host system, copy the binary
and other related binaries or data to the Intel® Xeon Phi™ Coprocessor’s filesystem (or make them visible over
there via NFS).
Example:
1. Copy openmp_sample.c from
/opt/intel/composerxe/Samples/en_US/C++/openmp_samples/ to your home directory
2. Build the application with the mmic flag:
icc mmic vec-report3 openmp openmp_sample.c
3. Upload the binary to the coprocessor:
scp a.out mic0:/tmp/a.out
4. Copy over any shared libraries required by your application, in this case the OpenMP* runtime library:

Table of Contents

Question and Answer IconNeed help?

Do you have a question about the Intel Xeon Phi and is the answer not in the manual?

Intel Xeon Phi Specifications

General IconGeneral
Threads per core4
ThreadsUp to 288
InterfacePCIe 3.0 x16
PCIe Version3.0
CoresUp to 72
MemoryUp to 16 GB
TDP215 W to 300 W
SocketLGA 3647
Manufacturing Process14 nm
Instruction Setx86-64
Process Technology14nm

Summary

Understanding the Intel® Xeon Phi™ Coprocessor

Introduction

Overview of the Intel® Xeon Phi™ Coprocessor and its purpose.

Intel® Many Integrated Core Architecture Overview

Details the architecture of the Intel® Xeon Phi™ Coprocessor, including its cores and vector units.

Intel® Xeon Phi™ System Setup and Installation

Preparing Your System for First Use

Guides through the initial setup and installation of drivers and software.

Steps to install the Software Development tools

Instructions for installing the necessary compilers and development tools.

Regaining Access to the Intel® Xeon Phi™ Coprocessor after Reboot

Procedures for re-establishing access to the coprocessor after a system reboot.

Developing Applications for Intel® Xeon Phi™

Getting Started/Developing Intel® Xeon Phi™ Software

Introduces the process of developing applications for the Intel® Xeon Phi™ Coprocessor.

Available Software Development Tools / Environments

Lists and describes the compilers, libraries, and tools for development.

Documentation and Sample Code

Points to essential documentation and sample code for learning and development.

Optimizing Performance on Intel® Xeon Phi™

Using the Offload Compiler – Explicit Memory Copy Model

Explains the explicit memory copy model for offloading code to the coprocessor.

Parallel Programming Options on the Intel® Xeon Phi™ Coprocessor

Covers various parallel programming models like OpenMP, Cilk Plus, and TBB.

Using Intel® MKL

Details how to use the Intel Math Kernel Library for performance optimization.

Related product manuals