Phoenix Project
Matrix Multiply Example Application Readme
Last revised May 27, 2009


1. Application Overview
-----------------------

Matrix Multiply application computes the product of 2 matrices
of the same size.


2. Provided Files
-----------------

matrix_multiply.c: The version of the file that uses the MapReduce engine
matrix_multiply-seq.c: The sequential version of the application
matrix_multiply-pthread.c: The Pthreads version of the application
Makefile: Compiles all 3 versions of the application
README: This file


3. Running the Application
--------------------------

Run 'make' to compile all 3 versions of the application. 

./matrix_multiply <side of matrix> <size of Row block> [create files] - MapReduce Version
side of matrix: Specifies the length of the side of the matrix (both matrices are of the same size) (required)
size of Row block: Number of rows that are assigned for each map task (required)
create files: Flag to create the files that hold the input matrices (optional)
(Leave argument blank if files already exist. The files will be used as input to the application. Set flag to 1 to create files for the first time.) 

The files created are 
"matrix_file_A.txt" (input file)
"matrix_file_B.txt" (input file)

./matrix_multiply-pthread <side of matrix> [create files] - Pthreads version
side of matrix: Specifies the length of the side of the matrix (both matrices are of the same size) (required)
create files: Flag to create the files that hold the input and output matrices (optional)
(Leave argument blank if files already exist. The files will be used as input to the application
and the output will be compared to the output file. Set flag to 1 to create files for the first time.) 

The files created are 
"matrix_file_A.txt" (input file)
"matrix_file_B.txt" (input file)
"matrix_file_out_pthreads.txt" (output file)

./matrix_multiply-seq <side of matrix> - Serial Version
side of matrix: Specifies the length of the side of the matrix (both matrices are of the same size) (required)
This version does not have the option to create the matrix files. Run the MapReduce or Pthreads version to create them.


End File
