Panagiota Gyftou - cs22400025
gyftoupan@di.uoa.gr
📦exercise_1/
├── 📂include/
│ └── *.h # Header files
├── 📂modules/
│ └── *.c # Source code files
├── 📂src/
│ ├── main.c
│ └── 📄Makefile
├── 📄Makefile
📦exercise_2/
📦exercise_3/
📦exercise_4/
📦exercise_5/
├── *.cpp
📄README.md
📄Report_7115112400025.pdf This helper script automates building and running every exercise in the Parallel Computing Systems handout. It will compile the serial, MPI, MPI+OpenMP and CUDA versions, execute each benchmark with your chosen parameters, and collect timing and output data.
Run the following script to execute all the exercises!
Also check for individual program runs and memory leaks
To compile the program, use the following command:
# Compile the main program
make If you compiled the files from the previous section you can run:
$ ./my_program *ARGS
*ARGS
You can also compile and run through the Makefile:
runto compile and run the main program and testsrunto compile and run only the main programrun-teststo compile and run only the tests
Here is the command to compile & run:
# Compile and run the main program and tests
make run ARGS="*ARGS"*ARGS
Don't forget to give the arguments through the ARGS variable!
Visit the Makefile files to get more info about the commands available (valgrind, run etc)
In each exercise, there is a helper script (experiments.sh) that automates the entire benchmarking workflow:
-
It runs all combinations of input parameters (e.g., different grid sizes, numbers of processes, etc.).
-
It gathers the timing and output data into a single results.csv file.
-
It invokes plot_results.py to generate the corresponding performance plots.
-
All generated plots are saved in the plots directory.
To execute the full suite of benchmarks and produce the graphs, simply run:
bash experiments.sh# exercise 1
make mpirun NP=4 MACHINES=../machines ARGS="-d 100000000"
# -n(procs) -d(darts)
# exercise 2
make mpirun NP=4 MACHINES=../machines ARGS="-g 1000 -gs 64" # -g(generations) -gs(grid size)
# exercise 3
make mpirun NP=4 MACHINES=../machines ARGS="-g 1000 -gs 64" # -g(generations) -gs(grid size)
# exercise 4
make mpirun NP=4 MACHINES=../machines ARGS="-g 1000 -gs 64" # -g(generations) -gs(grid size)