Go Big or Go Home

Me while walking around my grandfather’s garden to relieve stress

I’ve been telling myself this motto for almost the last 3 weeks.It encouraged me while working on the project, maybe it will help you too.So do you want to take a look at what happened after my last blog post? Fasten your seatbelts !

If you remember, I said in my last blog that we researched parallelization approaches.We used 2 different approaches in our project.

  • Master-worker approach
  • One-sided approach

What is Master-Worker Approach ?

To better understand this approach, I will give a real-life example.Imagine you are working for a company and let’s say there is 1 manager and 10 employees in this company.The manager is responsible for controlling everything.It is this person who will assign which task to which employee, collecting the results and assigning new tasks.Employees, on the other hand, wait, do and send the tasks to be given by this person.If you have understood everything by now, you now know how the master-worker works.

In our problem, the master process sends the nodes to be branch with MPI_Send functions to the worker processes and retrieves the computed values ​​of subnodees with MPI_Recv functions.

How About One-Sided Approach ?

This approach different from the master-worker because; without the need for functions such as send and receive, it can reach the specified areas and take it into its own memory.To initialize this area MPI_Window is used.Then other processes can reach and do put or get operation.

For our problem we want to have something like -Process 0 start and have 2 nodes.One of free process take one node from process 0 and compute.Each processes can share its nodes and so on.To make this we develop 2 version in one sided approach.

When process has more than 1 node;

  • Version 1: Inform the other free processes and one free process get this node
  • Version 2:It will look which process is free and put the node in it’s area


After implementing these approaches,we tested them with 130 different graphs.Below you can see the times of a graph that takes 955.37 seconds serially with 3,6,12,24 processes with master-worker and one-sided approaches.The results of the master-worker approach are better than the one-sided approach. The red line shows the result for the master-worker, while the blueline is the results of the one-sided approach.

Although I have worked hard to understand and apply these approaches, I am very happy that I was able to achieve results.I leave the link of the video we prepared with my group friend Carlos and say see you on my next blog https://www.youtube.com/watch?v=phreyXu41rU&list=PLhpKvYInDmFXs3uOSAVgWbflVLNHQW9YM&index=22&t=0s

Tagged with: , ,

Leave a Reply

Your email address will not be published. Required fields are marked *


This site uses Akismet to reduce spam. Learn how your comment data is processed.