Blame examples/README

Packit Service c5cf8c
Example MPI programs
Packit Service c5cf8c
Packit Service c5cf8c
This directory contains some example MPI programs.  They are described below.
Packit Service c5cf8c
Examples of MPI programs in Fortran 77, Fortran 90, and C++ are found in the
Packit Service c5cf8c
directories f77, f90, and cxx respectively.
Packit Service c5cf8c
Packit Service c5cf8c
cpi - A simple program to compute pi
Packit Service c5cf8c
Packit Service c5cf8c
Optional programs
Packit Service c5cf8c
These programs are not built by default, but may be built and run
Packit Service c5cf8c
Packit Service c5cf8c
hellow - A simple "hello world" program
Packit Service c5cf8c
icpi - An interactive version of cpi
Packit Service c5cf8c
Packit Service c5cf8c
parent and child - A simple example of using MPI_Comm_spawn
Packit Service c5cf8c
Packit Service c5cf8c
pmandel* - Programs to solve the Mandelbrot set
Packit Service c5cf8c
Packit Service c5cf8c
Running the pmandel* programs
Packit Service c5cf8c
-----------------------------
Packit Service c5cf8c
 The programs pmandel* solve the Mandelbrot set. The input to the program
Packit Service c5cf8c
 are the coordinates, scale etc for plotting the output of the program and the 
Packit Service c5cf8c
 number of iterations to solve the set. The output is an image file (default is
Packit Service c5cf8c
 pmandel.ppm) of the Portable Pixel Map format. Help on using the program can
Packit Service c5cf8c
 be obtained by running the executable with "-help" parameter.
Packit Service c5cf8c
Packit Service c5cf8c
 To run the pmandel* tests you can either run it in the interactive mode (-i option)
Packit Service c5cf8c
 or run it in a non-interactive mode. In the interactive mode the output of the
Packit Service c5cf8c
 program is saved as an image file (you can specify the name of the file using -out
Packit Service c5cf8c
 option of the program). In the non-interactive mode you need a visualizer for the 
Packit Service c5cf8c
 output (A Visualizer is available in Windows. Compile the project pman_vis for the
Packit Service c5cf8c
 visualizer.). 
Packit Service c5cf8c
 Non-interactive execution eg -- 
Packit Service c5cf8c
	mpiexec -n 2 pmandel -i
Packit Service c5cf8c
 (The program prompts for entering the coordinates, scales and no of iterations
Packit Service c5cf8c
  and output is saved in pmandel.ppm file)
Packit Service c5cf8c
Packit Service c5cf8c
 Interactive execution eg -- 
Packit Service c5cf8c
	mpiexec -n 2 pmandel
Packit Service c5cf8c
Packit Service c5cf8c
  (Now open the visualizer program, pman_vis.exe, created by compiling pmandel_vis
Packit Service c5cf8c
   project in windows. Click on File -> Connect and select "TCP Socket Connect".
Packit Service c5cf8c
   Leave the default settings and click connect. The visualizer program connects to
Packit Service c5cf8c
   pmandel program and displays the output)  
Packit Service c5cf8c
Packit Service c5cf8c
 pmandel* programs differ in the MPI functionalities used. For example,
Packit Service c5cf8c
 pmandel_service.c uses MPI_Open_Port() to connect to the visualizer while pmandel.c
Packit Service c5cf8c
 uses the sockets directly for the connection.  
Packit Service c5cf8c
Packit Service c5cf8c
Packit Service c5cf8c
Others will be documented later.