Skip to content

Instantly share code, notes, and snippets.

@erikzenker
Last active May 20, 2016 13:30
Show Gist options
  • Save erikzenker/92e3325a9b2ccb07850b8f227798d1a7 to your computer and use it in GitHub Desktop.
Save erikzenker/92e3325a9b2ccb07850b8f227798d1a7 to your computer and use it in GitHub Desktop.
Build for xeon phi on taurus
#! /usr/bin/env sh
# Intel tutorial: https://software.intel.com/en-us/articles/building-a-native-application-for-intel-xeon-phi-coprocessors
# Load modules
module load intel/2016.2.181
module load cmake/3.3.1
module load boost/1.60.0-intel2016.2.181-intelmpi5.1-knc
module load gcc/4.9.3 # gives hints to icc where to find libstdc++
# Load some magic numbers
source /sw/global/compilers/intel/2016/compilers_and_libraries_2016/linux/bin/compilervars.sh intel64
# Compile with pattern: icc source.c -mmic
cd /sw/global/compilers/intel
find -name libiomp5.so
#./11.1.069/lib/ia32/libiomp5.so
#./11.1.069/lib/intel64/libiomp5.so
#./12.1/composer_xe_2011_sp1.8.273/compiler/lib/ia32/libiomp5.so
#./12.1/composer_xe_2011_sp1.8.273/compiler/lib/intel64/libiomp5.so
#./2013/composer_xe_2013.1.117/compiler/lib/ia32/libiomp5.so
#./2013/composer_xe_2013.1.117/compiler/lib/intel64/libiomp5.so
#./2013/composer_xe_2013.1.117/compiler/lib/mic/libiomp5.so
#./2013/composer_xe_2013_sp1.0.080/compiler/lib/ia32/libiomp5.so
#./2013/composer_xe_2013_sp1.0.080/compiler/lib/intel64/libiomp5.so
#./2013/composer_xe_2013_sp1.0.080/compiler/lib/mic/libiomp5.so
#./2013/composer_xe_2015.1.133/compiler/lib/ia32/libiomp5.so
#./2013/composer_xe_2015.1.133/compiler/lib/intel64/libiomp5.so
#./2013/composer_xe_2015.1.133/compiler/lib/mic/libiomp5.so
#./2015/composer_xe_2015.3.187/compiler/lib/ia32/libiomp5.so
#./2015/composer_xe_2015.3.187/compiler/lib/intel64/libiomp5.so
#./2015/composer_xe_2015.3.187/compiler/lib/mic/libiomp5.so
#./2015/composer_xe_2015.2.164/compiler/lib/intel64/libiomp5.so
#./2015/composer_xe_2015.2.164/compiler/lib/mic/libiomp5.so
#./2015/composer_xe_2015.2.164/compiler/lib/ia32/libiomp5.so
#./9.1/cc/10.1.015/lib/libiomp5.so
#./9.1/cce/10.1.015/lib/libiomp5.so
#./9.1/fc/10.1.015/lib/libiomp5.so
#./9.1/fce/10.1.015/lib/libiomp5.so
#./2016/compilers_and_libraries_2016.1.150/linux/compiler/lib/intel64_lin/libiomp5.so
#./2016/compilers_and_libraries_2016.1.150/linux/compiler/lib/intel64_lin_mic/libiomp5.so
#./2016/clck/3.1.0.003/provider/share/common/lib/intel64/libiomp5.so
#./2016/clck/3.1.0.003/provider/share/common/lib/mic/libiomp5.so
#./2016/clck/3.1.2.006/provider/share/common/lib/intel64/libiomp5.so
#./2016/clck/3.1.2.006/provider/share/common/lib/mic/libiomp5.so
#./2016/compilers_and_libraries_2016.2.181/linux/compiler/lib/intel64_lin/libiomp5.so
#./2016/compilers_and_libraries_2016.2.181/linux/compiler/lib/intel64_lin_mic/libiomp5.so
#./.2016.2/compilers_and_libraries_2016.2.181/linux/compiler/lib/intel64_lin/libiomp5.so
#./.2016.2/compilers_and_libraries_2016.2.181/linux/compiler/lib/intel64_lin_mic/libiomp5.so
#./.2016.2/clck/3.1.2.006/provider/share/common/lib/intel64/libiomp5.so
#./.2016.2/clck/3.1.2.006/provider/share/common/lib/mic/libiomp5.so
# Set path to shared objects
export SINK_LD_LIBRARY_PATH=/sw/global/compilers/intel/2016/compilers_and_libraries_2016.2.181/linux/compiler/lib/intel64_lin_mic/
# Run binary from host
micnativeloadex a.out
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment