Starting from:

$30

HPC- Parallel Processing- Assignment 1 Solved

Parallelization Scenario Master Process: 

-         Calculate the sub range size r=(y-x)/p  

-         Note that p is the number of processes. 

-         Broadcast x and r to each slave process using MPI_Send. 

-         Receive sub count from each slave process using MPI_Receive. 

-         Print total count of primes between x and y. 

Slave Process: 

-         Receive x and r through the MPI_Receive. 

-         Calculate the lower bound a and upper bound b according to its rank. 

-         Count primes in its sub range (between a and b). 

-         Print the partial count 

-         Send this partial count to the master process using the MPI_Send. 

More products