Difference between revisions of "MIC: Developers Quick Start Guide"

From Define Wiki
Jump to navigation Jump to search
Line 6: Line 6:
 
On compute020, copy ''openmp_sample.c'' from ''/shared/apps/intel/composerxe/Samples/en_US/C++/openmp_samples/'' to your home directory
 
On compute020, copy ''openmp_sample.c'' from ''/shared/apps/intel/composerxe/Samples/en_US/C++/openmp_samples/'' to your home directory
  
Build the application with the -mmicflag:
+
Build the application with the -mmic flag:
 
  > icc -mmic -vec-report3 -openmp openmp_sample.c
 
  > icc -mmic -vec-report3 -openmp openmp_sample.c
  

Revision as of 06:59, 15 January 2013

External Link to the Intel® Xeon Phi™ Coprocessor Developer's Quick Start Guide

Developer's Quick Start Guide

Native Compilation example

On compute020, copy openmp_sample.c from /shared/apps/intel/composerxe/Samples/en_US/C++/openmp_samples/ to your home directory

Build the application with the -mmic flag:

> icc -mmic -vec-report3 -openmp openmp_sample.c

Upload the binary to the coprocessor:

> scp a.out mic0:~/a.out

Copy over any shared libraries required by your application, in this case the OpenMP* runtime library:

> scp /shared/apps/intel/composerxe/lib/mic/libiomp5.so mic0:~/libiomp5.so

Connect to the coprocessor with ssh and export the local directory so that the application can find any shared libraries it uses (in this case the OpenMP* runtime library):

> ssh mic0
> export LD_LIBRARY_PATH=/home/roshan

This application may generate a segmentation fault if the stacksize is not set correctly. To modify the stacksize use:

> ulimit -s unlimited

Go to /home/roshan and run a.out: