Zoltan Developer's Guide  |  Next  |  Previous

Appendix: Using the Test Drivers: zdrive, zCPPdrive and zfdrive

Introduction

In order to facilitate development and testing of the Zoltan library, simple driver programs, zdrive (C), zCPPdrive (C++) and zfdrive (Fortran90), are included with the library distribution. The concept behind the drivers is to read in mesh or graph information from files, run Zoltan, and then output the new assignments for each processor to another file. The test drivers zdrive and zCPPdrive read ExodusII/NemesisI parallel FEM files, Chaco input files, or general Matrix-Market files. Parallel NemesisI files can be created from ExodusII or Genesis file using the NemesisI utilities nem_slice and nem_spread. The Fortran90 program zfdrive reads only Chaco input files and general Matrix-Market files.

Source code for zdrive is in the driver and ch directories of the Zoltan distribution. The source code for zCPPdrive is also in driver, and uses some of the same C source files (in driver and ch) that zdrive uses. Source code for zfdrive is in the fdriver directory.

The C and C++ test drivers are built automatically in the Autotools build system. The F90 driver is built when the configure option "--enable-f90interface" is provided. The drivers are placed in BUILD_DIR/src/driver and BUILD_DIR/src/fdriver, for build directory BUILD_DIR.

The C and C++ test drivers are built in the CMake build system when option "-D Zoltan_ENABLE_Tests:BOOL=ON" is provided. The F90 driver is built when option "-D Zoltan_ENABLE_F90INTERFACE:BOOL=ON" is also provided. The drivers are placed in BUILD_DIR/packages/zoltan/src/driver and BUILD_DIR/packages/zoltan/src/fdriver; they are also copied to BUILD_DIR/packages/zoltan/test.

Running the Test Drivers

The test drivers are run using an input command file. A fully commented example of this file and the possible options can be found in zdrive.inp. The default name for the command file is zdrive.inp, and the drivers will look for this file in the execution directory if an alternate name is not given on the command line. If another filename is being used for the command file, it should be specified as the first argument on the command line. (Note: zfdrive cannot read a command line argument; its input file must be named zdrive.inp.)

For an example of a simple input file, see the figure below. In this problem, the method being used for dynamic load balancing is RCB.  Input data is read from Chaco input files simple.graph and simple.coords.  Zoltan's DEBUG_LEVEL parameter is set to 3; default values of all other parameters are used. (Note: zfdrive can read only a simplified version of the input file. See the zfdrive notes in zdrive.inp for more details.)
 

Decomposition method  = rcb
Zoltan Parameters     = Debug_Level=3
File Type             = Chaco
File Name             = simple
Parallel Disk Info    = number=0
Example zdrive.inp file

The zdrive programs creates ascii files named "file_name.out.p.n", where file_name is the file name specified in zdrive.inp, p is the number of processors on which zdrive was run, and n=0,1,...,p-1 is the processor by which the file was created. (For zfdrive, the files are named "file_name.fout.p.n".) These files are in the same directory where the input graph file was located for that processor. Each file contains a list of global ids for the elements that are assigned to that processor after running Zoltan. The input decomposition can also be written in this format to files "file_name.in.p.n"; see "zdrive debug level" in zdrive.inp for more details.

Decompositions for 2D problems can be written to files that can be plotted by gnuplot. See "gnuplot output" in zdrive.inp for more information. Decompositions for 3D problems can be viewed after the test driver has finished by running the graphical tools vtk_view or vtk_write described next.

Adding New Algorithms

The driver has been set up in such a way that testing new algorithms that have been added to Zoltan is relatively simple. The method that is in the input file is passed directly to Zoltan. Thus, this string must be the same string that the parameter LB_METHOD is expecting.



[Table of Contents  |  Next:  Visualizing Geometric Partitions  |  Previous:  References  |  Privacy and Security]