Author: Pengfei Ren
Source Code: project.c serial.c Executable: project serial Outputfile: serial_output, pivot0_4_output, pivot0_8_output, pivot0_16_output, pivot1_4_output, pivot1_8_output, pivot1_16_output, pivot2_4_output, pivot2_8_output, pivot_16_output
Others: jobscript, Makefile;
- To compile the source code, just 'make'. Then you will get the executale programs: project, serial;
- To execute the serial program, just './serial > serial_output', then you will get the results in 'serial_output'.
- To execute the parallel program, use 'qsub -q wsuq jobscript' to execute the program 'project'. Generally after 2 minutes, you will get the results in 'output';
- To change the number of processors used in the program, you need to change: 'ppn' in the 'jobscript'.
- Three pivot selection strategies are implemented: 0. the average of the first element and the last element on processor 0 of each group; 1. the median of three randomly selected elements on processor 0 of each group; 2. the randomly selected element on processor 0 of each group. You can change the way of selecting pivot by changing the macro 'PIVOT_SEL' in project.c respectively to '0', '1', and '2'.