Demonstration of parallel computing using goroutines in Go, OpenMP, MPI, and their hybrid implementations in both C and C++, as well as GPU computing with CUDA
Implemented in GOlang (with goroutines) and C++ with OpenMP
Usage:
cd lab1/lab1_go && go run main.gog++-14 -fopenmp lab1.cpp -o whatevername && mpirun -n 1 ./whatevernameor just./whatevername
Distributing the sum function between threads and final summation in a public variable using "reduction"
Usage: g++-14 -fopenmp lab2-5.cpp -o whatevername && ./whatevername
Usage g++-14 lab3-8.cpp -o whatevername && ./whatevername
Usage: mpicc -g0 -o whatever main.c && mpirun -n 10 ./whatever
If you wish to run it on cluster of machines, you should use mpirun -np 10 --host node1,node2,node3,node4 ./whatever or you can specify a file which contains list of host machines, even with amount of processes for each one
Keywords: MPI_Send, MPI_Recv, MPI_Sendrecv. Communication schemes: Baton, Master-Worker, Ring, Each-to-Each
Keywords: MPI_Bcast, MPI_Reduce, MPI_Scatter, MPI_Gather, MPI_Datatype, MPI_Comm, MPI_CHAR, MPI_Op, MPI_MAX, MPI_MIN, MPI_SUM, MPI_PROD
- Number of occurrences of all characters present in a string
- Matrix Multiplication using MPI broadcasting
Contains examples of combination of the mentioned technologies. Lab7_2 shows how the number PI could be effectively calculated with MPI + OpenMP approaches
In the given examples, I used CUDA and OpenACC to demonstrate the difference in code complexity for calculating the value of Pi. CUDA is significantly more efficient but requires more extensive coding, while OpenACC is more concise and intuitive. Additionally, there is an example of matrix multiplication implemented using the CUDA approach.




