Skip to content

Academic Lab Course of the 27th batch of Computer Science & Engineering | University of Rajshahi - πŸ‡§πŸ‡©

Notifications You must be signed in to change notification settings

ahnafshahrear/Parallel-Processing-And-Distributed-System-Lab

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

65 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Parallel Processing & Distributed System Lab

Ahnaf Shahrear Khan | ahnafshahrearkhan@gmail.com | LinkedIn | Facebook

  • Computer Science & Engineering, University of Rajshahi
  • Course Code: CSE-4112

Installation of MPI in Windows Subsystem for Linux

  • Go to Turn Windows features on or off & turn on the Windows Subsystem for Linux
  • Now go to windows Terminal & run the 1st command (if doesn't work run the 2nd command)
wsl.exe --install
wsl --install -d Ubuntu-22.04
  • If any error occurs go to the provided link & download the latest package from Step 4 - Download the Linux kernel update package
  • If further error occurs with error code 0x80370102 go to Terminal & run the following command
wsl --update
wsl --set-default-version 1
  • Now go to Ubunto & Setup with Username & Password
  • Then run the following commands on Ubunto
sudo apt-get update
sudo apt-get install mpich
  • Once after every session you have to mount your drive using the command on Ubuntu
cd /mnt/(C/D/E/F)

Run Command on Ubuntu

  • To run a C Program, go to Ubuntu & then run the following commands
mpicc name.c -o name
mpirun -n number_of_processors ./name  
  • To run a C++ Program, go to Ubuntu & then run the following commands
mpic++ name.cpp -o name
mpirun -n number_of_processors ./name  

Installation of MPI in Visual Studio Code

  • To install MPI, see this video & follow every step carefully. If you face the issue "sal.h dependency not found" or something like that, uninstall the MinGW compiler & follow this video

Run Command on Visual Studio Code

  • To run a C Program, go to Terminal > Run Build Task... in the VS Code & then run the following command
mpiexec -n number_of_processors file_name_without_extension

Lab Tasks

  • Write an MPI program to multiply two matrices of size MxN & NxP βœ“
  • Given a list of names & phone numbers as a phonebook. Write an MPI program to search for a name & phone number from the phonebook βœ“
  • Write an MPI program to simulate a simple calculator using a different process in parallel βœ“
  • Write an MPI program to count the words in a file & sort it in descending order of frequency of words that is, the highest occurring word must come first & the least occurring word must come last
  • Write an MPI program using synchronous send. The sender process sends a word to the receiver. The second process receives the word, toggles each letter of the word & sends it back to the first process. Both processes use synchronous send operations βœ“
  • Write an MPI program to add an array of size N using two processes. Print the result in the root process & the amount of time taken by each process βœ“
  • Write a CUDA program for matrix multiplication βœ“
  • Given a list of names & phone numbers as a phonebook. Write a CUDA program to search for a name & phone number from a phonebook βœ“
  • Given a paragraph & a pattern like %x%. Now write a CUDA program to find out the line number where %x% this pattern exists in the given paragraph

About

Academic Lab Course of the 27th batch of Computer Science & Engineering | University of Rajshahi - πŸ‡§πŸ‡©

Topics

Resources

Stars

Watchers

Forks