Difference between revisions of "MIC: Developers Quick Start Guide"
(Created page with "== External Link to the Intel® Xeon Phi™ Coprocessor Developer's Quick Start Guide == [http://software.intel.com/en-us/articles/intel-xeon-phi-coprocessor-developers-quick-...") |
|||
| (5 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
| − | == External | + | == External Links to the Intel® Xeon Phi™ Coprocessor Developer's Quick Start Guide == |
| + | [https://software.intel.com/en-us/articles/building-a-native-application-for-intel-xeon-phi-coprocessors Building a native application for Xeon Phi] | ||
| + | |||
[http://software.intel.com/en-us/articles/intel-xeon-phi-coprocessor-developers-quick-start-guide Developer's Quick Start Guide] | [http://software.intel.com/en-us/articles/intel-xeon-phi-coprocessor-developers-quick-start-guide Developer's Quick Start Guide] | ||
== Native Compilation example == | == 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 | ||
| + | |||
| + | Find the dependencies of the application by setting the <tt>SINK_LD_LIBRARY_PATH</tt> and then running <tt>micnativeloadex</tt>. For example: | ||
| + | export SINK_LD_LIBRARY_PATH=/opt/intel/composer_xe_2013_sp1.X.XXX/compiler/lib/mic/:/home/user1/myproject/:$LD_LIBRARY_PATH | ||
| + | /opt/intel/mic/bin/micnativeloadex a.out -l | ||
| + | |||
| + | 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: | ||
Latest revision as of 16:40, 6 January 2015
External Links to the Intel® Xeon Phi™ Coprocessor Developer's Quick Start Guide
Building a native application for Xeon Phi
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
Find the dependencies of the application by setting the SINK_LD_LIBRARY_PATH and then running micnativeloadex. For example:
export SINK_LD_LIBRARY_PATH=/opt/intel/composer_xe_2013_sp1.X.XXX/compiler/lib/mic/:/home/user1/myproject/:$LD_LIBRARY_PATH /opt/intel/mic/bin/micnativeloadex a.out -l
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: