Difference between revisions of "MIC: Developers Quick Start Guide"
Jump to navigation
Jump to search
| Line 7: | Line 7: | ||
Build the application with the -mmic flag: | Build the application with the -mmic flag: | ||
| − | + | icc -mmic -vec-report3 -openmp openmp_sample.c | |
Upload the binary to the coprocessor: | 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>. For example: | ||
| + | export SINK_LD_LIBRARY_PATH=/opt/intel/composer_xe_2013_sp1.X.XXX/compiler/lib/mic/:/home/user1/myproject/:$LD_LIBRARY_PATH | ||
Copy over any shared libraries required by your application, in this case the OpenMP* runtime library: | 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): | 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: | 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: | Go to /home/roshan and run a.out: | ||
Revision as of 14:25, 6 January 2015
External Link to the Intel® Xeon Phi™ Coprocessor 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
Find the dependencies of the application by setting the SINK_LD_LIBRARY_PATH. For example:
export SINK_LD_LIBRARY_PATH=/opt/intel/composer_xe_2013_sp1.X.XXX/compiler/lib/mic/:/home/user1/myproject/:$LD_LIBRARY_PATH
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: