wiki:GettingStarted

MTGL

Get the Software

Visit the downloads page to get the latest software.

If you want the latest development version, check it out anonymously from the subversion repository using this command:

svn co https://software.sandia.gov/svn/mtgl/trunk mtgl

This will create a directory called mtgl locally that will contain the repository. Anonymous users only have read access to the repository.

If you are a developer with an account, the same command will work if the username on your machine is the same as your svn username. You will just be prompted for your password. If your username on your machine is different from your svn username, you can check out the code using this command.

svn co --username <username> https://software.sandia.gov/svn/mtgl/trunk mtgl

If you are a developer that has an account, then you will have write access as well as read access.

Installing MTGL

MTGL follows the standard installation method of Unix-like systems. For those unfamiliar with this, the short version is to issue the following commands from the root MTGL directory:

./configure --prefix=<mtgl_install_dir>
make install

If you are an administrator and want to install in the default location (/usr/local), then don't include the '--prefix' option. Note that nothing actually happens in the make step because the library is just a bunch of header files that need to be copied.

If you are installing from a version downloaded from the subversion repository, you need to do an additional step before the above steps:

autoreconf -ifs

If you want to configure for Qthreads, do

./configure --with-qthreads=<qthreads install location>

If you want to configure for OpenMP, do

./configure --with-openmp

If you want to compile for a different compiler, do

./configure CXX=<compiler executable>

Building the tests

The MTGL includes some tests of its algorithms. The tests show examples of using the algorithms in the MTGL and allow testing of the algorithms and data structures. Building the tests is not a required step to utilize the MTGL as a library. Building the tests takes quite a while on the XMT, so you probably don't want to build them unless you need to.

The tests are located in the test/ subdirectory of the checkout. Run

make check

from the main directory of the checkout or test/ subdirectory to build the most common tests.

To build an individual test, run

make <test_executable>

from the test subdirectory, where <test_executable> is the name of a test. For example, 'test_pagerank' is the test of the pagerank algorithm.

Building the tutorials

The MTGL includes some tutorial programs, which are described in detail at the MTGL Tutorials page. The tutorials are located in the tutorial/ subdirectory of the checkout. Run

make tutorial

from the main directory of the checkout or tutorial/ subdirectory to build the tutorials.

To build an individual tutorial, run

make <tutorial_executable>

from the tutorial subdirectory, where <tutorial_executable> is the name of a tutorial. For example, 'input_output' is a tutorial covering the input and output of graphs in MTGL.


Qthreads

Sandia's qthreads library allows the MTGL to be run using multiple threads on non-XMT systems.

Get the Software

Download the latest qthreads library from its webpage,  https://code.google.com/p/qthreads/. These instructions assume you are using qthreads version 1.10 or later.

Installing qthreads

Before using MTGL with qthreads, the library needs to be installed. qthreads follows the standard installation method of Unix-like systems. For those unfamiliar with this, the short version is to issue the following commands from the directory where you unzipped qthreads:

./configure --prefix=<qthread_install_dir>
make
make install

If you are an administrator and want to install in the default location (/usr/local), then don't include the '--prefix' option. If you need more help read the INSTALL file included with qthreads.

Configure the MTGL to Use qthreads

Once qthreads is built and installed, you can configure the MTGL library to use it.

From the MTGL trunk, run 'autoreconf -ifs' if you haven't already. Next, run configure with the following options:

./configure --with-qthreads[=qthreads_install_dir]

If you installed qthreads in the default directory, you don't need to include '=qthreads_install_dir'. Otherwise, give the directory in which you installed qthreads.