This repository contains assignments done for MA 513 course.
- data: This folder contains all the result outputs of the various iterations run on the code and naming of the files is according to the parameters set for that iteration.
- masterScript.sh: Main Script to loop over various iterations & calling runScript.sh for results corres. to each iteration.
- runScript.sh: Generates the overall mean-value execution times result by running the corres. code files as per the given iteration size.
- readFiles.py: Reads the results from all the iteration-output files and prints in a matrix form so as to be directly used for generating graphs (maybe using Google Sheets or any such graph generator).
- Assignment- Report.pdf: This is the report containing the theory, descriptions and results of the various experiments performed in each assignment.
To Study the effect of cache. This folder contains the following files:
- naive.cpp, opt1.cpp, opt2_0.cpp, opt2_1.cpp, opt2_2.cpp, opt2_3.cpp, opt3.cpp, and theo_calc.cpp are the various files used to compute outputs corres. to the - Naive Algo, Optimisation 1, Optimisation 2 (having 4 different optimizations within), Optimisation 3 and theoretical calculations respectively.
This assignment was focussed to get us familiar with the MPI syntax. It contains the following files:
- mpi_bsend.c - (Buffered) Asynchronous blocking send and receive.
- mpi_isend.c - (Immediate Return) Non-blocking send and receive.
- mpi_rsend.c - (Ready) Blocking send and receive.
- mpi_send.c - (Standard) send and receive.
- mpi_sendrecv.c - (Concurrent) send and receive.
- mpi_ssend.c - (Synchronous) Blocking send and receive.
To implement addition of numbers through various parallel methods and compare the results among those. This folder contains the following files:
- addNum_Naive.c - Conatins code to add numbers where P0 first sends n/p items to each processor, then each PE adds n/p items, finally each PE sends partial sum to P0 which adds all these elements and return the sum.
- addNum_Recur.c - Contains the code to add numbers where the distribution and collection of numbers is done hierarchially as discussed in class.
- addNum_Reduce.c - Contains the code to add numbers using inbuilt MPI_reduce to compute partial sum.
- odd_even_sorting.c - Contains the code for odd even sorting.
To implement matrix-vector multiplication using row division, column division and block division methods. This folder has the following files:
- mtrxVecMult_row.c - Row division method.
- mtrxVecMult_col.c - Column division method.
- mtrxVecMult_block.c - Block division method.
To perform gaussian elimination on matrix and also to implement its pipelined version. It contains the following files:
- gau_elmn_cyclic.c - Normal Gaussian Elimination.
- gau_elmn_pipe.c - Pipelined Gaussian Elimination.
Contains the mergesort code (mergeSort.c) using openMP written during lab.
It contains the following files having 2 parallel code versions for calculation of PI:
- pi_critical.c - Using critical section for shared variable.
- pi_reduce.c - Using reduce addition on the shared variable.
Solving the problem of multiplying two polynomials in parallel paradigm using 3 different methods:
-
School Method
-
Karatsuba's Algorithm
-
FFT Divide and Conquer Algorithm It contains the following files:
-
poly_mul_naive.c - Parallelising School Method.
-
poly_mul_krtsb.c - Parallelising Karatsuba's algorithm.
-
poly_mul_fft.c - Parallelising FFT divide and conquer algorithm.
Parallelising producer consumer problem with multiple consumers and multiple producers and a single bounded queue. It contains the following files:
- prod_cons.cpp - Main code for producer consumer problem.
- conc_queue.cpp - Helper code for Concurrent Queue.
- conc_queue.h - Header file used for Concurrent Queue.
Parallelising the code of Word acceptance on the reduced DFA. It contains the following files:
- dfa.c - Code for the given problem.
- dfa_input.txt - Various different DFA input files.