Getting NRT Up And Running

NRT is currently only supported on Ubuntu (for progress on building in OSX visit this page). Once you have a machine up and running with this OS, follow these instructions to setup NRT.

NOTE: If you are running Ubuntu 11.10, only want to build modules and don't want to edit NRT's source, then you should just install the .deb package available at http://nrtkit.org

Install Required Dependencies

  • Install dependencies:
    # Install boost 45 or later - used for serialization, among other small things
    sudo apt-add-repository ppa:antal.buss/boost
    # open synaptic and for ^that^ software source change lucid to maverick (if runing lucid)
    sudo apt-get update
    # Install all dependencies for nrt and gcc4.6 all in one go (we do this first to prevent our gcc4.6 symlinks from getting overwritten later)
    sudo apt-get install libcloog-ppl0 libgmpxx4ldbl libmpc2 libppl-c2 libppl7 qt4-qmake libqt4-core libqt4-dev libcv-dev \
    libcvaux-dev libhighgui-dev libgtk2.0-dev libgtkmm-2.4-dev libzeroc-ice33-dev cmake
    # The following will download the main required 64-bit packages for gcc4.6
    wget -c https://launchpad.net/~ubuntu-toolchain-r/+archive/test/+build/2103518/+files/cpp-4.6_4.6-20101218-1_amd64.deb
    wget -c https://launchpad.net/~ubuntu-toolchain-r/+archive/test/+build/2103518/+files/fixincludes_4.6-20101218-1_amd64.deb
    wget -c https://launchpad.net/~ubuntu-toolchain-r/+archive/test/+build/2103518/+files/g%2B%2B-4.6_4.6-20101218-1_amd64.deb
    wget -c https://launchpad.net/~ubuntu-toolchain-r/+archive/test/+build/2103518/+files/gcc-4.6_4.6-20101218-1_amd64.deb
    wget -c https://launchpad.net/~ubuntu-toolchain-r/+archive/test/+build/2103518/+files/gcc-4.6-base_4.6-20101218-1_amd64.deb
    wget -c https://launchpad.net/~ubuntu-toolchain-r/+archive/test/+build/2103518/+files/libgcc1_4.6-20101218-1_amd64.deb
    wget -c https://launchpad.net/~ubuntu-toolchain-r/+archive/test/+build/2103518/+files/libgomp1_4.6-20101218-1_amd64.deb
    wget -c https://launchpad.net/~ubuntu-toolchain-r/+archive/test/+build/2103518/+files/libstdc%2B%2B6_4.6-20101218-1_amd64.deb
    wget -c https://launchpad.net/~ubuntu-toolchain-r/+archive/test/+build/2103518/+files/libstdc%2B%2B6-4.6-dev_4.6-20101218-1_amd64.deb
    wget -c https://launchpad.net/~ubuntu-toolchain-r/+archive/test/+build/2103518/+files/libstdc%2B%2B6-4.6-pic_4.6-20101218-1_amd64.deb
    wget -c https://launchpad.net/~ubuntu-toolchain-r/+archive/test/+build/2103518/+files/libmudflap0_4.6-20101218-1_amd64.deb
    wget -c http://launchpadlibrarian.net/52052284/libmpfr4_3.0.0-2_amd64.deb
 
  • Install the packages using dpkg
      dpkg -i *.deb
      apt-get -f install
 
  • Setup the symbolic links to make your system use the new gcc
      # Remove the old symbolic links
      sudo rm /usr/bin/gcc
      sudo rm /usr/bin/g++
      sudo rm /usr/bin/c++
      # Create symbolic links to the new compiler
      sudo ln -s /usr/bin/gcc-4.6 /usr/bin/gcc
      sudo ln -s /usr/bin/g++-4.6 /usr/bin/g++
      sudo ln -s /usr/bin/g++-4.6 /usr/bin/c++
      # Make sure everything is ok - both should report version 4.6.0
      gcc --version 
      g++ --version
 

Install yaml-cpp

    # Download yaml-cpp v. 2.5 from the Google code site
    wget http://yaml-cpp.googlecode.com/files/yaml-cpp-0.2.5.tar.gz
 
    # Unpack and install yaml-cpp
    tar xvf yaml-cpp-0.2.5.tar.gz
    cd yaml-cpp-0.2.5/ && mkdir build && cd build
    cmake .. && make && sudo make install
    sudo ldconfig /usr/local/lib/
 
    # Clean up
    cd ../.. && rm -rf yaml-cpp-0.2.5 && rm yaml-cpp-0.2.5.tar.gz

Install other dependencies

# get eigen3 and install it by following option 2 in INSTALL (run cmake, don't just copy the files)
# To install: Download Eigen3
  wget http://bitbucket.org/eigen/eigen/get/3.0-beta3.tar.gz
 
  # Unpack and install Eigen3
  tar xvf 3.0-beta3.tar.gz
  cd 3.0-beta3/ && mkdir build && cd build
  cmake .. && make && sudo make install
  sudo ldconfig /usr/local/lib/
 
  # Clean up
  cd ../.. && rm -rf 3.0-beta3 && rm 3.0-beta3.tar.gz
 
  # TODO: include fix for parallelism.h file
 
# get flann and install it
# To install: Download flann
wget http://www.cs.ubc.ca/~mariusm/uploads/FLANN/flann-1.6.7-src.zip
 
# Unpackand install flann
unzip flann-1.6.7-src.zip
cd flann-1-6.7-src && mkdir build && cd build
cmake .. && make && sudo make install
sudo ldconfig /usr/local/lib
 
# clean up
cd ../.. && rm -rf flann-1.6.7-src && rm flann-1.6.7-src.zip

Get NRT

  • Download a copy of subversion
      sudo apt-get install subversion
 
  • Check out the code from our repository.
    • You will need a username/password, which you can get by emailing Dr. Itti.
      cd ~/workspace/
      svn checkout svn://isvn.usc.edu/software/nrt/trunk/nrt
      # Enter in username/password...
 

Build NRT

  • Create a build directory inside of the newly checked out repository
      cd ~/workspace/nrt
      mkdir build
      cd build
 
  • Configure the build using Cmake
      cmake ..
 
  • At this point you should see a bunch of happy messages letting you know that all packages have been found.
  • Build NRT
      make
 
  • Try running some of the test programs included in the build to ensure everything went ok.
      ./tests/test-ThreadPool
      ./tests/test-Option
      ./tests/test-stream --in=random --out=display # Should display some random pixel
      # etc...
 

Using the GUI

  • The NRTMODULEPATH environment variable is a comma-separated list of directories in which NRT should look for Modules. Make sure that the NRTMODULEPATH environment variable is set, by issuing:
export NRTMODULEPATH="${HOME}/nrtilab/src/Modules"

If you are part of the NeovisionII project, you should include your NeoII modules as well, so instead:

export NRTMODULEPATH="${HOME}/nrtilab/src/Modules:${HOME}/nrtilab/src/Apps/nrtneo2/Modules"

You can put this command in your ~/.bash_aliases so that the variable will be set in new terminals you open.

  • Start the GUI:
~/nrt/build/nrtDesigner --master
  • Start one or more module loaders on one or more machines, typically you would do this in a different terminal from the one in which you have started the GUI:
~/nrt/build/nrtLoader --masterip=192.168.0.254

where you should replace 192.168.0.254 by the IP address of the machine on which you are running the nrtDesigner program. To find out the IP of a machine, just issue a ping machine and look for the IP in there.

  • Ready to rock'n roll!
installation.txt · Last modified: 2011/12/03 09:37 by rand