#!/bin/bash # Some useful environment variables RUNTIME_LINK="http://portablecl.org/downloads/pocl-0.14.tar.gz" BENCHMARK_REPO="http://gogs.heisenberg.ovh/andreagus/rodinia-benchmark.git" BASE_DIR=`pwd` # Install all the dependencies needed for compiling the runtime sudo apt-get update && sudo apt-get upgrade -y sudo apt-get install -y vim build-essential flex bison libtool libncurses5* git-core htop cmake libhwloc-dev libclang-3.8-dev clang-3.8 and llvm-3.8-dev zlib1g ocl-icd-libopencl1 clinfo libglew-dev time gnuplot clinfo ocl-icd-dev ocl-icd-opencl-dev # Create the needed folders if [ ! -d "runtime" ]; then mkdir runtime wget -qO- $RUNTIME_LINK | tar xzvf - -C runtime/ fi if [ ! -d "rodinia-benchmark" ]; then git clone $BENCHMARK_REPO fi RUNTIME_DIR=runtime/`ls runtime` BENCHMARK_DIR=benchmark/`ls benchmark` echo $RUNTIME_DIR echo $BENCHMARK_DIR if [ ! -d "$RUNTIME_DIR/build" ]; then mkdir $RUNTIME_DIR/build fi # Compile the runtime cd $RUNTIME_DIR/build make clean cmake -DLLC_HOST_CPU=cortex-a15 ../ make clean make -j8 # Add the .icd file that enable the ocl-icd loader to identify the mali platform echo "/usr/lib/arm-linux-gnueabihf/mali-egl/libOpenCL.so" | sudo tee /etc/OpenCL/vendors/mali.icd