Technical Setup
#
Basic SetupPrerequisites: git
, Java 8+ SDK
, sbt
, OpenCL
See more details on installing the dependencies below.
- Clone the
shine
repository to a directory of your choice that we call$SHINE_ROOT
. - In
$SHINE_ROOT
, runsetup.sh
to download all required submodules. - Run
sbt compile
(perform this steps even if you want to use IDEA IntelliJ, because IntelliJ does not execute all subproject dependencies correctly that are required for an initial setup). - Run
sbt test
.
#
Configuring IntelliJ- Download IDEA IntelliJ (http://www.jetbrains.com/idea/) and choose to install the Scala Plugin during setup.
- Launch IntelliJ. From the menu choose
File
->Open...
. Then, select$SHINE_ROOT
and pressOK
. - From the menu bar choose
Run
->Edit Configurations...
. UnderTemplates
chooseScalaTest
and add the following line toVM parameters
:-Djava.library.path=lib/executor/lib/Executor/build -Xss26m
(this will tell IntelliJ where to find the Executor library and use 26MB of thread stack size which is needed for arithmetic simplifactions sometimes).
#
Installing Dependencies#
Docker ImageYou can find the build file for a Docker image here: https://github.com/michel-steuwer/docker-scala-opencl
Note that AMD's SDK is stored with git lfs
, so you will have to download it after checking out the repository.
#
On Debian:- Install Portable OpenCL:
apt-get install pocl
- Install the build dependencies:
#
On NixOS:- Add
pkgs.intel-ocl
tohardware.opengl.extraPackages
andnixos-rebuild
. Runningnix-shell -p clinfo --run clinfo
should show OpenCL support. - You will need
sbt
,cmake
andgcc
to compile the project:nix-env -iA nixos.sbt nixos.cmake nixos.gcc
. - You will need
clang
to run some of the tests, however some utilities clash withgcc
s, so we need to: - Help
FindOpenCL
find the OpenCL library in NixOS:(From now onsbt compile
does not need to be told where the OpenCL bindings are.) - We can now run the tests with
sbt test
.
#
Running the TestsYou can run the test suite with sbt test
.
You can run subsets or specific tests using testOnly
, e.g., sbt "testOnly rise.*"
to run all the RISE tests, or sbt "testOnly rise.elevate.circularBuffering"
to run that specific test.
You can output debugging information generated by the tests by setting the RISE_LOG_LEVEL
environment variable to debug
: RISE_LOG_LEVEL=debug sbt "testOnly rise.*"
.