PIPT


PIPT Home






Indiana University Open Systems Laboratory

* Starting LAM/MPI
* Running the Sample Driver
* Sample Driver: Batch Mode
* Sample Driver: Interactive Mode
* Status Checks
* Shutting down LAM/MPI

EXECUTION:

After all the packages have been installed and built, the sample driver program should be compiled and ready to run. The sample driver is located in the directory TOPDIR/PIPT-2.1.2/contrib/SampleDriver. However, there are still a few steps that must be performed before the sample driver can be run.

STARTING LAM/MPI:

  • INSTALLDIR/bin (where the LAM binaries are installed) *must* be in your .cshrc path
  • A text file listing machines to be used must be created. The "host" machine (i.e. the machine that the jobs will be run from) must be listed in the file. For best performance, use machines on one subnet. NOTE: The host machine will not contribute in the image processing calculations. For example, to have two machines process an image, three machines must be specified in the hostfile (the first of which must be the host machine).
  • LAM must be started on the target machines. From the command line, type:
    	unix% lamboot -v hostfile
    
    where hostfile is the filename of the file containing the hostnames of the machines to be used.
  • After LAM has been started (lamboot spawns a daemon on all the machines in the hostfile), you can verify that they are working properly with the command:
    	unix% tping N -c3
    
    If LAM is operating correctly, you will see the results of a "ping" type of command that visits each machine in the LAM boot.

RUNNING THE SAMPLE DRIVER:

The sample driver program can be run in one of two modes: batch or interactive. The batch mode takes in a text file that lists the routines (and their associated parameters) to run. The interactive mode has a GUI interface which allows the user to select input images and perform any of the default image processing routines in PIPT.

BATCH MODE:

There is a sample batch mode configuration file called "jobs" in the SampleDriver directory. It lists all the routines and their associated parameters that can be used in batch mode. Lines with a "#" in the first column are comments. Notice that two command lines near the top of the file are uncommented. They will run an average filter on the "rome.tif" image with 8 processors and a window size of 17x17, and a squared median filter on the "cars.tif" image with 8 processors and a window size of 17x17. Uncommenting any of the other sample lines will effectively run that process when the file is submitted in a batch job.

Two important lines near the top of the file specify the input directory where the images are and the output directory where the processed images should go. These lines alleviate the need to specify lengthy pathnames in image filenames used as parameters to routines. The input and output directories have automagically been filled in from the "configure" command when PIPT was installed. The input and output directories are, respectively: TOPDIR/PIPT-2.1.2/contrib/TestImages/in TOPDIR/PIPT-2.1.2/contrib/TestImages/out

To run the sample driver in batch mode, one must first start LAM/MPI (as described above) and then invoke the command "run_driver" in the sample driver directory with two parameters: the maximum number of processors to use (*must* be the same number of processors in the hostfile), and the *full* *pathname* to the job configuration file. For example:

	unix% cd TOPDIR/PIPT-2.1.2/contrib/SampleDriver
(make a hostfile named "hosts" with 3 machines in it)
	unix% ./run_driver jobfile

You will see some output indicating which jobs are being done to which images and where the output has been dumped.

INTERACTIVE MODE:

If you do not specify a jobfile on the command line, the sample driver defaults to the interactive mode. A window will appear with two text boxes for the input and output directories and several pull-down menus that contain all the default routines in PIPT. Some output may still appear in the unix window where you invoked the driver.

STATUS CHECKS:

While the sample driver is running, one can type "mpitask" to see the current status of the driver:

	unix% mpitask
	TASK                     BLKFUNC            BLKRANK         BLKTAG
	0 (local 0) Sample_driver MPI_Probe          ANY (comm 2)    ANY       
	Sample_driver            running                                      
	Sample_driver            running

We see that the program "Sample_driver" is running on three nodes, one of which is "local" (i.e. on this machine). The other information is not really important, it just shows that the slave processes are running.

THIS IS IMPORTANT FOR DEVELOPMENT WORK: when writing new routines and kernels, the present release of PIPT does not have any method of reporting stdout or signals back to the master! If your routine causes a segmentation fault (or other such nasty error), you can only tell by checking "mpitask". Future releases of PIPT will include error reporting mechanisms that will detect slave failures.

In addition, there is another command that should be used to "clean up" after an unsuccessful run of a program using PIPT. The "lamclean" program will remove any traces of processes running on the LAM virtual machine (to include killing any PIPT programs running). The "run_driver" script includes a "lamclean" command to ensure that two programs will not be competing against each other on the same virtual machine.

SHUTTING DOWN LAM/MPI:

After the you have finished using PIPT applications, LAM may be shut down. This is accomplished with the "wipe" command and the same hostfile that was previously used with the "lamboot" command to start LAM:

	unix% wipe -v hostfile


Please direct questions, comments, and feedback to:
pipt-devel@osl.iu.edu
Copyright ©1996-2012
OSL / IU
Thursday, 2-Jun-2005 15:45:02 EST