deploy.sh 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. #!/bin/bash
  2. # Some useful environment variables
  3. RUNTIME_LINK="http://portablecl.org/downloads/pocl-0.14.tar.gz"
  4. BENCHMARK_REPO="http://gogs.heisenberg.ovh/andreagus/rodinia-benchmark.git"
  5. BASE_DIR=`pwd`
  6. # Install all the dependencies needed for compiling the runtime
  7. sudo apt-get update && sudo apt-get upgrade -y
  8. 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
  9. # Create the needed folders
  10. if [ ! -d "runtime" ]; then
  11. mkdir runtime
  12. wget -qO- $RUNTIME_LINK | tar xzvf - -C runtime/
  13. fi
  14. if [ ! -d "rodinia-benchmark" ]; then
  15. git clone $BENCHMARK_REPO
  16. fi
  17. RUNTIME_DIR=runtime/`ls runtime`
  18. BENCHMARK_DIR=benchmark/`ls benchmark`
  19. echo $RUNTIME_DIR
  20. echo $BENCHMARK_DIR
  21. if [ ! -d "$RUNTIME_DIR/build" ]; then
  22. mkdir $RUNTIME_DIR/build
  23. fi
  24. # Compile the runtime
  25. cd $RUNTIME_DIR/build
  26. make
  27. cmake -DLLC_HOST_CPU=cortex-a15 ../
  28. make -j8
  29. # Add the .icd file that enable the ocl-icd loader to identify the mali platform
  30. echo "/usr/lib/arm-linux-gnueabihf/mali-egl/libOpenCL.so" | sudo tee /etc/OpenCL/vendors/mali.icd