Installation

florianjacob edited this page Jul 3, 2016 · 7 revisions

Introduction

This page provides instructions for installing Ocelot on various platforms.

You may want to have a look here for a short installation guide.

Requirements

Compiler Tools

The following compiler tools are required (tested):

  • C++ Compiler (GCC 4.7.3)
    • GCC 4.8 version can be supported, but may CUDA 4.2 may not work with GCC 4.8
  • Lex Lexer Generator (Flex 2.5.35)
  • YACC Parser Generator (Bison 2.5.1)
    • The default version of bison in Ubuntu 14.04 is higher than 2.5.1 which is not supported by GPUOcelot.
  • SCons
  • CUDA 4.2
    • CUDA 5.0 and CUDA 5.5 can be supported, but regression tests may fail.

Libraries

The following libraries are required to be installed:

  • boost_system (1.49)
    • Ocelot does not work with boost version > 1.49
  • boost_filesystem (1.49)
  • boost_serialization (1.49)
  • GLEW (optional for GL interop) (1.5)
  • GL (for NVIDIA GPU Devices)

Library Headers

The following external library headers are required to be on your search path:

Comments

We require a compiler that supports parts of the upcoming C++0x standard.

Ocelot is rigorously tested on 64-bit Ubuntu 12.04.1 LTS using GCC-4.6.3. We strive to be ANSI C++ compliant, but only the specified systems is actively tested.

CPU Target

The CPU target requires LLVM to be installed. Ocelot has been tested with LLVM release 3.4. Anything newer than 3.4 won't work, see #102.

GPU Target

The GPU target requires a CUDA enabled driver to be installed and on your library search path.

Installing

Ocelot

From Github

Checkout Ocelot from github:

Checkout Hydrazine submodule under /path/to/gpuocelot:

  • git submodule init; git submodule update;

Optionally: Install boost

  • sudo apt-get install libboost-all-dev

Optionally: Install compiler tools

  • sudo apt-get install flex bison g++ scons

Enter the gpuocelot/ocelot directory

  • cd gpuocelot/ocelot

Run the build script.

  • sudo ./build.py --install

This will install the Ocelot development headers and libraries:

  • libocelot.so

Create the necessary system links to the Ocelot library so the dynamic linker will find it:

  • sudo ldconfig

This library can be used to access the tools within ocelot or linked against a CUDA application compiled with NVCC to emulate a CUDA device.

Alternatively, there is a new utility, OcelotConfig that is intended simply the process of linking against Ocelot.

To link a program against Ocelot:

  • g++ -o my_program my_program.o OcelotConfig -l

Regression Tests

Ocelot comes with the NVIDIA CUDA SDK 2.2 and 2.3 as regression tests and as examples of how to correctly build and link programs.

Installing

  1. Download the sdk from subversion or the download page
  2. Extract the archive
  3. Configure with: ./configure LDFLAGS="-Lpath_to_ocelot_libs -Lpath_to_cublas_and_cufft_libs"
  4. Run make check to build all of the sdk tests
  5. Run make test to run all of the sdk examples and verify the outputs.

Windows Build (Experimental)

Tools

Building

  • Open a visual studio command line prompt
  • Go to the Ocelot trunk
  • Put MinGW/bin on your path (make sure it has flex/bison)
  • python.exe build.py --install --path C:\Ocelot -w