Assist with Project Management

Closed Posted 6 years ago Paid on delivery
Closed Paid on delivery

C++ Visual Studio

Assist me to develop a parallel program with MPI that supports the following computation.

1). It generates five processes P0, P1, P2, P3, and P4.

2). Main process gets a number n from key board, then initiates MPI.

3) Process Pi (i=0,1,2,3) uses n to call the following two functions.

a) function prime(int n) finds the smallest prime number q that q=8m+(2i+1) >n for some integer m. Note a prime number p is an integer that is not product of two integers less than p.

b) function twin(int n) finds the least twin number (q, q+2) that q=8m+(2i+1)> n for some integer m. A pair (q,q+2) is a twin if both q and q+2 are prime numbers.

4) P4 gets all four results from the other four processes and returns the least prime number and twin.

For example, if n=10, P0 returns 11 and (11,13), P1 returns 13 and (17, 19), P2 returns 17 and (17, 19), and P3 returns 19 and (29,31). Finally, P4 returns 11 and (11,13). All the five processes share the same program.

C++ Programming Computer Science Computer Support Parallels Automation Programming

Project ID: #15668562

About the project

1 proposal Remote project Active 6 years ago