Technical Setup
Basic Setup#
Prerequisites: git, Java 8+ SDK, sbt, OpenCL
See more details on installing the dependencies below.
- Clone the
shinerepository to a directory of your choice that we call$SHINE_ROOT. - In
$SHINE_ROOT, runsetup.shto 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_ROOTand pressOK. - From the menu bar choose
Run->Edit Configurations.... UnderTemplateschooseScalaTestand 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 Image#
You 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-ocltohardware.opengl.extraPackagesandnixos-rebuild. Runningnix-shell -p clinfo --run clinfoshould show OpenCL support. - You will need
sbt,cmakeandgccto compile the project:nix-env -iA nixos.sbt nixos.cmake nixos.gcc. - You will need
clangto run some of the tests, however some utilities clash withgccs, so we need to: - Help
FindOpenCLfind the OpenCL library in NixOS:(From now onsbt compiledoes not need to be told where the OpenCL bindings are.) - We can now run the tests with
sbt test.
Running the Tests#
You 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.*".