Trunk

From Manta Wiki
Jump to: navigation, search

Checking out the Source

  • Check out the source repository using svn:
svn checkout https://gforge.sci.utah.edu/svn/Manta/trunk Manta

The last option specifies the local destination directory for the checkout. Note that if you are behind a firewall it may be necessary to configure a proxy connection in the ~/.subversion/servers file.

Take a look at the directories created by the checkout. The directories Core, Engine, Image, Interface, Model, and UserInterface contain source code for the core Manta shared libraries. StandAlone and scenes contain code which attaches the core shared libraries to user interfaces. StandAlone also contains some benchmarking scripts written in perl.

  • Create a build directory -- I usually place build directories for each platform I work on directly below the directory that I checked the code out to.
mkdir Manta/build-demo
cd Manta/build-demo

Configuring

The CMake build utility is responsible for producing make files or IDE project files for building Manta. Most developers build manta from the command line using gmake although the code has been build using XCode as well.

The ccmake command line gui allows a developer to configure many basic options for the renderer such as whether to use floats or doubles for the Manta Real type or what max size ray packets to use.

Several files including: MantaTypes.h and Interface/Parameters.h are produced by the cmake configure process.

  • Run ccmake in the build directory and pass the relative location of the source repository as the argument.
ccmake ..

Screen after running ccmake for the first time.

Note: On many systems the default compiler is sufficient. It is possible to configure cmake to use the Intel compiler or another special compiler. Set the environment variables CC and CXX to the compiler you wish to use. Manta will build with predefined release and debug flags with GCC and the Intel Compiler (icc) on most platforms.

The CMAKE_BUILD_TYPE variable is set to Release by default. This variable may be set to Debug as well. On most platforms, Release contains flags to include debug symbols in the output to enable profiling and very high level debugging.

Please note: The paths to files and libraries on this page are only examples. You should substitute paths that are appropriate to your local machine. If you are using a SCI Institute facility machine many of the dependencies may be available locally but the paths won't necessarily match.

Minimal Build

Building Manta with the least amount of effort (and options):

  • Don't set any additional cmake options. Press 'c' to configure once, all of the '*' characters should disappear. Then press 'g' to generate. At the command line run make, the binaries will be placed in the bin/ directory.

Alternatively, you could skip the whole ccmake screen:

cmake .. && gmake -sj8
bin/manta -np 1

Build Options

Several cmake variables affect the configuration of Manta. These may be set during an initial build or may be changed from the cmake command line.


Including swig/python

  • Swig and Python provide a nice scripting environment for configuring Manta and writing GUIs for visualization. See additional swig python instructions.

Including Teem

  • Teem is an optional dependency that is used for input and output of images and other raster data. Instructions for building teem. If you plan to generate screen shots or load scalar volumes into Manta, teem is required.


Manta types

  • Real

The manta Real typedef in MantaTypes.h. Usually set to double or float using the MANTA_REAL cmake variable.

  • Packet sizes

Fragment and Ray Packet static sizes are defined by MANTA_FRAGMENT_MAXSIZE and MANTA_RAYPACKET_MAXSIZE.

Default Scene

To run the default scene issue:

bin/manta
Running bin/manta on a really old Itanium2 over glx.

If you move the binaries and library from the location they were installed (or compiled in the case of these instructions), it is necessary to update your LD_LIBRARY_PATH environment variable to reflect the new location of the libraries.

Scenes

Scene are shared libraries which are dynamically loaded to add specific functionality. By default building all of the scenes is enabled in ccmake. Each scene may be individually disabled to decrease build time.

Scene libraries are places in the lib/ directory.

Trouble Shooting

Enabling SSE Code Paths

  • The build script now automatically detects if the compiler supports SSE.

On platforms which support it, SSE code paths are available. Specific options are enabled to add this code to the build. If the options are disabled, stub files will be used instead and manta will throw exceptions if you try to use the code paths.

The following values must be set in ccmake (and should be enabled automatically on supported platforms):

MANTA_REAL                       float
MANTA_SSE                        ON

Including fox

The Fox toolkit is no longer supported in the Manta trunk repository. It has been moved to an external Manta-project along with code associated with the Boeing777 massive model renderer.

See the Manta-Fox Manta project.

Most Manta GUIs are written in wxPython now.