Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Network & Security Expert

MPI contains hundreds of functions, a small subset of which is enough for most practical purposes. We shall talk about some of them in this unit.

Functions for MPI Environment:

int MPI_Init ( int *argc, char ** argv)

    It initializes the MPI environment. By that, No MPI function can be called before MPI_Init.

int MPI_Finalize (void)

It stops the MPI environment.  No MPI function can be called after MPI_Finalize. Each MPI process belongs to one or more groups (also known as communicator). Every process is recognized by its rank (0 to group size -1) within the given group. Initially, all processes belong to a default group known as MPI_COMM_WORLD group. Additional groups can be produced by the user as and when needed.  Now, we shall learn some functions related to communicators.

int MPI_Comm_size (MPI_Comm comm,  int *size)

returns variable size that have number of processes in group comm.

int MPI_Comm_rank (MPI_Comm comm,  int *rank)

returns rank of calling process in group comm.

Functions for Message Passing:

MPI processes cannot share memory space and single process cannot directly access other process's variables. Therefore, they need some type of communication between themselves. In MPI environment this communication is in the kind of message passing. A message in MPI has the following fields:

msgaddr: It can be each address in the sender's address space and refers to location in memory where message data begins.

count:  Number of occurrence of data items of message datatype obtained in message.

datatype:  Type of data in message. This field is beneficial in the sense that MPI supports heterogeneous computing and the different nodes may interpret count field differently. For example, if the message have a strings of 2n characters (count =2n), some machines may interpret it have 2n characters and some containing n characters depending upon the storage allocated per character (1 or 2). The basic datatype in MPI having of all basic parts in C and Fortran with two additional types namely MPI_BYTE and MPI_PACKED. MPI_BYTE denotes a byte of 8 bits.

dest or source : Receiving process or Rank of sending in communicator.

tag: Identifier for definite message or type of message. It let the programmer to deal with the arrival of message in an orderly way, even if the arrival of the message is not orderly.

comm.: Communicator. It is an group of a process and object wrapping context .It is allocated by system instead of user.

The functions used for messaging passing are:

int MPI_Send(void *msgaddr, int count,  MPI_Datatype datatype, int dest, int tag, MPI_Comm comm.)

on return, msg can be reused instantly.

int MPI_Recv(void *msgaddr, int count,  MPI_Datatype datatype, int dest, int tag, MPI_Comm comm.)

on return, msg contains requested message.

MPI message passing may be either collective or point-to-point.

Computer Network & Security, Computer Science

  • Category:- Computer Network & Security
  • Reference No.:- M9525766

Have any Question?


Related Questions in Computer Network & Security

Question in regards to encryption does the public key and

Question : In regards to encryption, does the public key and private key come from the sender or does the receiver already have the private and is given the public key by the sender? The response must be typed, single sp ...

Advanced network design assessment - human factors in

Advanced Network Design Assessment - Human factors in network analysis and design Purpose of the assessment - This assignment is designed to assess students' knowledge and skills related to the following learning outcome ...

What is the difference between a positive economic

What is the difference between a positive economic statement and a normative one.

Advanced network design assessment - human factors in

Advanced Network Design Assessment - Human factors in network analysis and design Purpose of the assessment - This assignment is designed to assess students' knowledge and skills related to the following learning outcome ...

Describe 2 variables a government will look at to predict

Describe 2 variables a government will look at to predict where the economy will be in the next six months.

Short answers1 the discussion question to debate is how

Short Answers: 1. The discussion question to debate is how have companies like Apple, Microsoft and the big providers (ATT, Verizon, Sprint, etc) impacted communication today? 2. Technology wise what do you imagine for t ...

Assume that the number of customers who arrive at a water

Assume that the number of customers who arrive at a water ice stand follows the Poisson distribution with an average rate of 6.4 per 30 minutes. What is the probability that more than one customer will arrive during the ...

Overview of network security assessment - security

Overview of Network Security Assessment - Security Challenges in Emerging Networks Purpose of the assessment - The purpose of this assignment is to develop skills to independently think of innovation. Students will be ab ...

Part ian attacker seeks to view the contents of a specific

Part I An attacker seeks to view the contents of a specific Microsoft Word document file to which they do not have any kind of access. You may assume that: - no exploitable vulnerabilities of any kind exist; - the attack ...

Question a signal travels through an amplifier and its

Question : A signal travels through an amplifier, and its power increased and becomes doubled. Then calculate amplification for this condition 2 Discuss about the TCP/IP PROTOCOL SUITE and Principles of Protocol Layering ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As