mpi returns n.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
MPI: Returns PowerPoint Presentation
Download Presentation
MPI: Returns

Loading in 2 Seconds...

play fullscreen
1 / 9

MPI: Returns - PowerPoint PPT Presentation


  • 122 Views
  • Uploaded on

MPI: Returns. By Camilo A Silva. Topics. Asynchronous Communication. Asynchronous Communication. Accessing elements of a shared data structure in an unstructured manner HOW? --BY distributing the shared data structure among the computational processes. Asynchronous Functions.

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'MPI: Returns' - felicia-mcdonald


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
mpi returns

MPI: Returns

By Camilo A Silva

topics
Topics
  • Asynchronous Communication
asynchronous communication
Asynchronous Communication
  • Accessing elements of a shared data structure in an unstructured manner
  • HOW?

--BY distributing the shared data structure among the computational processes

asynchronous simple program
Asynchronous simple program

int count, *buf, source;

MPI_Probe(MPI_ANY_SOURCE, 0, comm, &status);

source = status.MPI_SOURCE;

MPI_Get_count(status, MPI_INT, &count);

buf = malloc(count*sizeof(int));

MPI_Recv(buf, count, MPI_INT, source, 0, comm, &status);

example
/* Data task */

/* Computation task */ while(done != TRUE) {

receive(request);

reply_to(request);

}

while(done != TRUE) {

identify_next_task();

generate_requests();

process_replies();

}

Example…
mpi status
MPI_Status

In C: MPI_Status is a structure

• status.MPI_TAG is tag of incoming message

(useful if MPI_ANY_TAG was specified)

• status.MPI_SOURCE is source of incoming message

(useful if MPI_ANY_SOURCE was specified)

• How many elements of given datatype were received

MPI_Get_count(IN status, IN datatype, OUT count)

In Fortran: status is an array of integer

integer status(MPI_STATUS_SIZE)

status(MPI_SOURCE)

status(MPI_TAG)

In MPI-2: Will be able to specify MPI_STATUS_IGNORE

next topics
Next topics…
  • Modularity
  • Data Types + Heterogeneity
  • Buffer + Performance Issues
  • Compilation + Other important topics (topologies, MPI objects, tools for evaluating programs, and multiple program connection)