User's guide Mondriaan version 2.01 (June 9, 2009)


This page is included with the software for completeness. It is continually being improved and updated. The most recent version can always be found at http://www.math.uu.nl/people/bisseling/Mondriaan/users_guide.html.

How to download and install Mondriaan

Download the latest version from the Mondriaan software homepage. Uncompress by This will create a directory Mondriaan2.01 which contains all the files of the Mondriaan package. The directory has one subdirectory tests, which contains a set of unit tests (and its own Makefile).

Important files are:

How to compile and test Mondriaan

Go inside the directory Mondriaan2.01 and type Here '%' is the prompt of your operating system.

This will compile all files needed for the program Mondriaan itself and create the program Mondriaan. Type

to compile and run all 95 unit tests. For each function of Mondriaan, we have written a small (undocumented) test, which will check the function for proper behaviour. The unit tests have been tried successfully on three architectures: Linux, Mac Os X, Solaris. If one or more of the tests fails, please try to identify the relevant error message, and inform me (R . H . Bisseling @ NOSPAM uu . nl ) about the problem. I'll try to help you solve it. The tests are in a script runtest.

Levels of verbosity

Mondriaan writes the output distributions to file. It can also generate useful statistics about the partitioning to the standard output stream stdout (or the screen). There are three levels of verbosity: silent, standard, and verbose. The silent mode is useful when running the unit tests by make test. (If these are not done silently, the OKs are obscured by clutter.) The silent mode may also be useful if (parts of) Mondriaan are used as library functions. The verbose mode is useful when debugging, or trying to understand a particular run in detail. The standard mode generates 1-2 pages of output, and is aimed at easy digestion. You can change the verbosity level by commenting and uncommenting the appropriate CFLAGS lines in the Makefile. Using the flag -DINFO generates standard output, and using the flags -DINFO -DINFO2 generates verbose output.

How to run Mondriaan

Go inside the directory Mondriaan2.01 and type if you want to partition the gemat11 matrix from Matrix Market for 8 processors with at most 3% load imbalance.

Output file: matrix

The program writes the distributed matrix to a file called "input-Px", where input is the name of the input matrix and x is the number of processors used in the distribution. We use an adapted Matrix Market format, with this structure:

Here, Pstart[k] points to the start of the nonzeros of processor k.

Output files: vectors

The program writes the processor numbers of the vector components to the files called "input-ux" and "input-vx, where input is the name of the input matrix and x is the number of processors used in the distribution. The vectors u and v are the output and input vectors of the sparse matrix-vector multiplication u=A*v.

In I/O files, all indices (i,j) for matrix entries a(i,j) and vector components u(i) and v(j) start numbering from 1, following the Matrix Market conventions. In I/O, the processors are numbered 1 to P. Internally, the indices are converted to the standard C-numbering starting from 0.

Output file: Cartesian submatrices

The program writes the row index sets I(q) and column index sets J(q) of the Cartesian submatrix I(q) x J(q) for the processors q=1,...,P to the file called "input-Cx", where input is the name of the input matrix and x is the number of processors used in the distribution. This file is additional information, useful e.g. for visualisation, and you may not need it.

Statistics on standard output

The program prints plenty of useful statistics to standard output. The communication volume is given for the two phases of the matrix-vector multiplication separately: the volume for v (first communication phase) and the volume for u (second communication phase). The bottom line is the communication cost which is defined as the sum of the costs of the two phases. The cost of a phase is the maximum of the number of data words sent and the number of data words received, over all processors. This metric is also called the BSP cost; it is the cost metric of the Bulk Synchronous Parallel model.

Program timers

The compile option -DTIME causes the cpu time used by Mondriaan for the matrix distribution to be printed, and also the time for the vector distribution. This timer has an accuracy of at least 0.01 seconds; it is in danger of clock wraparound. The compile option -DUNIX tells Mondriaan you are using a UNIX system. Together with -DTIME this also causes the elapsed (wall clock) time to be printed, which is an upper bound on the CPU time. Usually the resolution is higher, and there is no danger of clock wraparound. This is the best timer if you are the single user of the system.

Program options

The program has the following options. These can be set in the Mondriaan.defaults file. If no such file exists, it is created at run time. Afterwards, this file can be edited for further runs. The default values of the options are given below in boldface. It is possible to overrule the defaults from the command line, e.g. by typing you can force Mondriaan to split the matrix in one dimension only, namely by rows.

Nonnumerical options

The nonnumerical options are used to choose partitioning methods. You may need to change them from the defaults to explore different partitioning methods.

Numerical options

The numerical options are often used to optimise given partitioning methods. Setting values such as NrRestarts, MaxNrLoops, or MaxNrNoGainMoves to a higher number, often results in better quality of the partitioning solution, at the expense of increased runtime.

For code developers

If you develop new code, you probably would like to add possibilities to use your code through a new option. In that case you need to adjust a few files:

More information

All functions of Mondriaan have extensive documentation in the source code. Please have a look there for more details.
Last updated June 9, 2009 by Rob Bisseling.
to Home page Mondriaan package.