Skip to content

Latest commit

 

History

History
176 lines (121 loc) · 11.8 KB

File metadata and controls

176 lines (121 loc) · 11.8 KB

UNIWA

UNIVERSITY OF WEST ATTICA
SCHOOL OF ENGINEERING
DEPARTMENT OF COMPUTER ENGINEERING AND INFORMATICS

University of West Attica · Department of Computer Engineering and Informatics


Introduction to Parallel Computing

Collective Communication

Vasileios Evangelos Athanasiou
Student ID: 19390005

GitHub · LinkedIn


Supervision

Supervisor: Vasileios Mamalis, Professor

UNIWA Profile

Supervisor: Grammati Pantziou, Professor

UNIWA Profile · LinkedIn

Co-supervisor: Michalis Iordanakis, Academic Scholar

UNIWA Profile · Scholar


Athens, January 2023



INSTALL

Collective Communication

This guide explains how to set up, build, and run the project on your local machine.


1. Repository Setup

git clone https://github.com/Introduction-to-Parallel-Computing/Collective-Communication.git
cd Collective-Communication/src

2. Technical Implementation

  • Programming Language: C
  • Parallel Environment: MPI

2.1 Key MPI Routines Used

  • MPI_Init
  • MPI_Comm_rank
  • MPI_Comm_size
  • MPI_Bcast
  • MPI_Scatter
  • MPI_Gather
  • MPI_Reduce
  • MPI_Scan
  • MPI_Finalize

2.2 Communication Model

  • Primary: Collective communication
  • Secondary: Point-to-point blocking communication (used specifically for the prefix sum logic)

3. Usage

3.1 Compilation

Compile the source code using the MPI compiler wrapper:

mpicc -o collective_communication collective_communication.c

3.2 Execution

Run the program with mpirun, specifying the number of processes:

mpirun -np 4 ./collective_communication

Important:

The vector size N must satisfy:

$$ N mod p = 0 $$

(i.e., N must be an integer multiple of the number of processes)


4. Constraints & Limitations

4.1 Data Distribution Constraint:

The current implementation does not support uneven vector sizes across processes.

4.2 Scalability Limitation:

Handling cases where

$$ N < p $$

is not supported, as some processes would remain idle.


5. Open the Documentation

  1. Navigate to the docs/ directory
  2. Open the report corresponding to your preferred language:
    • English: Collective-Communication.pdf
    • Greek: Συλλογική-Επικοινωνία.pdf