Skip to content

panagiotagyft/Parallel_Programming_MPI_MPI-OpenMP_CUDA

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

M127 - Parallel Computing Systems

MPI, MPI+OpenMP, CUDA

Spring Semester 2024–2025

Panagiota Gyftou - cs22400025
gyftoupan@di.uoa.gr

Project Structure


📦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 

Introduction - Problem

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.

Test the program utility

Run the following script to execute all the exercises!

Also check for individual program runs and memory leaks

Compile & Run

1. Compile the Program

To compile the program, use the following command:

# Compile the main program 
make 

2. Run the Program

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:

  • run to compile and run the main program and tests
  • run to compile and run only the main program
  • run-tests to 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)

Run benchmarks:

In each exercise, there is a helper script (experiments.sh) that automates the entire benchmarking workflow:

  1. It runs all combinations of input parameters (e.g., different grid sizes, numbers of processes, etc.).

  2. It gathers the timing and output data into a single results.csv file.

  3. It invokes plot_results.py to generate the corresponding performance plots.

  4. 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

Run Examples (Individual runs are invoked as follows):

# 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)  

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors