This repository contains a program implements a parallel data exchange protocol using the MPI standard. The logic is designed to simulate a scenario where processes (ranks) communicate with neighbors at specific distances (D1 and D2) to the right, perform computations, and update their local state over T iterations. The implementation is modularized into distinct functions for data initialization, computa- tion, buffer updates, and neighbor handling.
The code is designed to be compiled with the MPICH library.
- Compilation To compile the source code, use the following command:
mpicc -o src src.c -lm
(Note: The -lm flag is required to link the math library for the log function.)
- Execution The job can be submitted using the provided SLURM script or run interactively using mpirun. The arguments required are M , D1, D2, T , and the seed. Example for P=16:
mpirun -np 16 ./src 262144 2 4 10 1000
For the assignment submission, the execution is handled via the job.sh script which iterates over the required configurations.
Krishna Agrawal, Shivang Sonker, Vivek, Naman Yadav, Rohit Yadav