Write a parallel program with mpi

Assignment Help C/C++ Programming
Reference no: EM13889886

Question: Trying more than two weeks but not getting corect program due date is already over.please hel me anyone

For this project, the students are to use MS Visual Studio to program and run a simple multi-process console program using MPI in visual C++. The MPI libraries can be downloaded and added to visual C++ project on the project property tab. There are many available MPI libraries online, such as MS HPC, MPICH etc. The installation/configuration steps can also be found on the internet, usually from the library provider websites, as computer science master students, this should not be an issue.

The goal of this project is for student to learn the basic implementation of multi-process programming in parallel computing with MPI and using the knowledge learned from the course to decompose a relative complex computation problem into smaller parallel problems.

The student is required to design their own decomposition logic on the given problem, such as the number of processes produced, how and where to pass the result from one process to another etc.

Problem requirement:

Write 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).

Reference no: EM13889886

Questions Cloud

Calculate hartfords budgeted selling expense for coming year : The company estimates that the sales representatives will drive a total of 70,000 miles next year. Calculate Hartford's budgeted selling expenses for the coming year.
Would ownership of this cylinder provide with market power : An underground vault near Paris contains a cylinder made of iridium and platinum. By definition it weighs one kilogram. Would ownership of this cylinder provide you with market power? Would you be a monopolist?
Assignment oncomprehensive case assessment and presentation- : specify the population involved (race, gender, culture, ethnicity, sexual orientation, ability, or other special circumstance). All cases should be rural.
Does a high long-run elasticity of demand in an industry : Does a very high long-run elasticity of demand in an industry necessarily imply that there is no public policy issue?
Write a parallel program with mpi : Write a parallel program with MPI that supports the computation - design own decomposition logic on the given problem, such as the number of processes produced, how and where to pass the result from one process to another etc.
Difference between a static budget and a continuous budget : Why is the difference between a static budget and a continuous budget important in understanding budgets? How are understandability and comparability enhanced when knowing who is responsible for the budgeting process?
A random variable x follows a normal distribution : A random variable X follows a normal distribution with standard deviation 13.  A random sample of 30 individuals is selected from the population, and a confidence interval for  is calculated to be (87.348, 96.652).  What is the confidence level for t..
What are the skills and strengths of the client? : What are the skills and strengths of the client?
Why profits might not a good indicator for deadweight loss : Provide an explanation for why profits might not be a good indicator for deadweight loss. What about if profits were persistently positive in an industry?

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd