Personal tools
  • Help

brains:Building

From NITRC Wiki

Jump to: navigation, search

Return to brains:MainPage

Contents

Building BRAINS

Prerequisites

You will need the following tools and libraries installed to build BRAINS

Make a Sandbox Directory

This is the directory where you will download the source code, download images, and generated the resulting binaries

% mkdir /scratch/brains
% cd /scratch/brains


Download the BRAINS Software

  • Beta release
% svn co https://www.nitrc.org/svn/brains/BRAINS/branches/BRAINS3_Release-1_0 BRAINS3
  • Development version
% svn co https://www.nitrc.org/svn/brains/BRAINS/trunk BRAINS3 

To enable testing - Download the BRAINS Testing data

% svn checkout --username developername https://www.nitrc.org/svn/brainstestdata

Configuration Variables:

  • Testing - By default this is set to ON. If you don't wish to build BRAINS3 tests, when you configure your build tree, set the following variables to be OFF
    • BRAINS_BUILD_TESTING
    • BUILD_TESTING
    • Slicer3_USE_VTK_DEBUG_LEAKS
  • Python - By default this is set to ON. Presently you should set the following variables to be OFF.
    • Slicer3_BUILD_NUMPY
    • Slicer3_USE_PYTHON
    • Slicer3_USE_PYTHONQT
  • Graphical User Interface (BRAINSTracerQt). Turn the following variables to ON
    • BRAINS_BUILD_GUI
    • BRAINS3_USE_QT
  • Build Type - Debug or Release
    • CMAKE_BUILD_TYPE - For production use set to Release, Debug mode should only be used for development. You will see approximately a 4x speed increase building under Release mode.
  • Installation Directory - Specify the location of the installed binaries using the CMake variable CMAKE_INSTALL_PREFIX

Build the BRAINS Software

Make a build directory and run CMake to configure it for building

% mkdir BRAINS3-build
% cd BRAINS3-build
% ccmake ../BRAINS3/SuperBuild

Ignorable warning message that occurs during make file generation:

Image:Brains:CcmakeWarning.png

Important CMake options:

  • set the library path to allow the GenerateCLP program to find its required shared libraries.
% source ../BRAINS3/SuperBuild/setpath.sh

There is also a 'setpath.csh' script if you are running the C shell.

  • run 'make' to generate all libraries and executables
% make
  • on multiprocessor machines, you can speed up builds by running make in parallel
% make -j2 # for a dual core machine. -j4 for quad core, etc

Building BRAINS 64-bit on OS X 10.5

The default on OS X 10.5 is to build programs 32-bit. On OS X 10.6 the default is 64-bit. To build 64-bit on OS X, you need to set the CMake parameter CMAKE_OSX_ARCHITECTURES to "x86_64"

Platforms

The current build scripts has been tested on the following platforms

  • Linux
    • Red Hat Enterprise Linux 5.5 -- 32 & 64 bit.
    • Ubuntu - 32 bit - 8.10
    • Ubuntu - 64 bit - 7.10
    • Ubuntu - 64 bit - 8.10
  • Macintosh
    • Mac OS X - Intel - 10.5
    • Mac OS X - Intel - 10.6.x
    • Mac OS X - PPC - 10.5 - Deprecated -- will probably work, but we no longer have PPC Macs to test builds with. Note: need to set the environmental variable as described below
    • Mac OS X - 10.4 - Needs testing
 % export MACOSX_DEPLOYMENT_TARGET="10.4"


  • Windows
    • MinGW - Needs testing
    • Visual Studio - Needs testing

Enabling Regression Testing Suite

  1. Change directories to the location where you ran the BRAINS svn checkout
  2. Checkout the regression testing suite
  3. Add tests for recently developed regression testing suite

The results from the testing suite are posted on the BRAINS Dart Dashboard



How to Add a BRAINS Test Procedure

  1. Create a file with the test in src/regressionmodule/module
    • The name of the procedure needs to match the file name
    • The procedure should take two inputs
      • pathToRegressionDir - Base directory for regression tsting data
      • dateString - Time stamp for test
    • Two global variables have been defined: MODULE_SUCCESS and MODULE_FAILURE. Your test should return one of these values depending on the status of your test
    • Convenience functions have been created for testing purposes
      • StartModule - Start module logging
      • StopModule - Stop module logging and return module status
      • ReportTestStatus - Report if a test passes or fails
      • CoreImageTest - test an image for specified parameters
  2. Add the test procedure name to the CMakeLists.txt file in src/iplTclCmd
  3. CMake will generate a wrapper script for testing the procedure
  4. Quick test for testing new test
brains3 -b <Path-To-BRAINS-COMPILE>/<Platform>/DEBUG-build/BRAINS3-build/src/Testing/results/<Test>_wrapper.b2


BRAINS Quality Dashboard

BRAINS Dart Dashboard

Powered by MediaWiki
  • This page was last modified 02:52, 7 April 2011.
  • This page has been accessed 4,897 times.
  •