In this repository you will find the following files:
- compile.sh: a bash script that compiles all the source codes, putting the executables into a bin subfolder.
- benchmark.sh: a bash script that run all the executables in the bin subfolders, as well as initializing the report files that will be put in a report folder.
- clean.sh: a bash script that delete the executables as well as the reports. It is used to clean the workspace when you want to retry a test.
- plot_results.m: a GNU octave script that creates the plots form the report files and stores them into the plot folder.
- run.pbs: a pbs script needed to run on the cluster.
- matMul: the serial code for matrix multiplication.
- matMulRowsPar: the parallel code for matrix multiplication in which I applied a data partition by rows of the output matrix.
- matMulColsPar: the parallel code for matrix multiplication in which I applied a data partition by columns of the output matrix.
- matMulBlockPar: the parallel code for matrix multiplication in which I applied a data partition by blocks of the output matrix.
You will also find the files generated by my experiment on the cluster:
- bin folder: it contains the executables generated by compile.sh.
- report flder: it contains the .csv files with the statistics produced by the programs.
- plots folder: it contains the plots obtained running plot_results.m.
- debugs folder: it's an empty folder. If you uncomment the debug part of the codes, each mpi processor will put in this folder some debug files.
- outputs.o: the output file generated by the cluster. It contains the information about the nodes in which the experiment was run.
- errors.e: the error file generated by the cluster. Fortunatley, it's empty.
Run this experiment is very simple thanks to the scripts that automante most of the passages.
In the unitn hpc cluster, do follow these steps:
- Submit the PBS script with
qsub run.pbs
, it will automatically call compile.sh and benchmark.sh, generating the binaries and launching them. After this step you should be able to see the report files in their folder. - On a machine with installed GNU octave, you can run plot_results.m to create the plots. Alternativley, you can use any plot tool you want. In that case read alex_pegoraro_227642_homework_3.pdf to understand the structure of the .csv files and be able to read them.
- If you want to clean your workspace run clean.sh, it will delete all the executables and the report files (but not the plots). Note: if you run a simulation without cleaning the workspace the new results will be appended to the current report files.
Note: this is the way to test all the programs one shot. If you want to benchmrk only a specific one, read alex_pegoraro_227642_homework_3.pdf to understand the peculiarity and the logic of each program.