Last active
May 20, 2016 14:23
-
-
Save erikzenker/a6d5dc0d2c3e47d994085564c057927c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env sh | |
# Init paths | |
cd ~ | |
mkdir -p projects | |
cd projects | |
# Load modules | |
module load git | |
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++ | |
# Clone matmul | |
git clone https://github.com/BenjaminW3/matmul.git | |
cd matmul | |
git checkout develop | |
cd .. | |
# Clone alpaka | |
git clone https://github.com/ComputationalRadiationPhysics/alpaka.git | |
cd alpaka | |
git checkout develop | |
cd .. | |
# Load magic environment vars | |
source /sw/global/compilers/intel/2016/compilers_and_libraries_2016/linux/bin/compilervars.sh intel64 | |
# Export magic shared object path | |
export SINK_LD_LIBRARY_PATH=/sw/global/compilers/intel/2016/compilers_and_libraries_2016.2.181/linux/compiler/lib/intel64_lin_mic/ | |
export CXX=icc | |
export CC=icc | |
# Edit matmul/benchmark/CMAKELISTS.txt | |
# IF(NOT MSVC) | |
# LIST(APPEND _MATMUL_BENCHMARK_COMPILE_OPTIONS "-std=c99") | |
#+ LIST(APPEND _MATMUL_BENCHMARK_COMPILE_OPTIONS "-mmic") | |
# ENDIF() | |
# Edit matmul/matmulConfig.cmake | |
#+# MIC HACK | |
#+LIST(APPEND _MATMUL_COMPILE_OPTIONS_C_PRIVATE "-mmic") | |
#+LIST(APPEND _MATMUL_COMPILE_OPTIONS_CXX_PRIVATE "-mmic") | |
#+SET(ICC_MIC_LINK_FLAGS "-mmic") | |
#+SET( CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${ICC_MIC_LINK_FLAGS}" ) | |
# Build Makefile | |
cd matmul/benchmark | |
mkdir build | |
cd build | |
cmake .. | |
# set accelerator | |
ccmake . | |
# CMAKE_BUILD_TYPE: Release | |
# Build benchmark | |
make -j | |
# Run binary from host | |
micnativeloadex matmul_benchmark -a "100 7000 100 1" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Output: