Mpi functions and environment, Computer Networking

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.

Posted Date: 3/2/2013 7:07:23 AM | Location : United States







Related Discussions:- Mpi functions and environment, Assignment Help, Ask Question on Mpi functions and environment, Get Answer, Expert's Help, Mpi functions and environment Discussions

Write discussion on Mpi functions and environment
Your posts are moderated
Related Questions
What advantages does fiber optics have over other media? One main advantage of fiber optics is that is it less susceptible to electrical interference. It also supports higher ba

DNS - Server Attacks It’s not so easy to list all the associated attacks as they are evolving way so fast. As any error of flaw is identified, a patch is released in response

Question 1 List 10 common ActiveX controls Question 2 Discuss Network Interface using any OS Question 3 Explain BGP components and its working Question 4 G

Retransmission of packets The disadvantage  of thronging away a correctly received packet is that  the subsequent retransmission  of the  packet might  be lost  or garbled and

Q. Explain about Multiplicative Decrease ? Multiplicative Decrease (MD) if a time-out take places the threshold is set to one maximum segment size (TCP Tahoe, TCP Reno).

Describe what is meant by Asymmetric Multiprocessing (AMP)? Ans) It imposses hierarchy and a division of labour between processors. Only one designated processor, the master, co

Q. Network performance measured by delay and throughput ? delay versus load Delay is composed of? Throughput v/s network load

Dear expert; I have an assignment about Network Administrator Support . Here is the topic about:- Virtualization is an emerging type of network operating system that is currently

Distributed Shared Memory (DSM) systems copy a shared memory abstraction on loosely coupled architectures in order to allow shared memory programming despite missing hardware suppo

The second point to consider is that from each location, some calls are internal to that site and some are going to outside locations. Again, as an approximation, MyCo telecom peop