1 / 9

MPI: Returns

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.

Download Presentation

MPI: Returns

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. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. MPI: Returns By Camilo A Silva

  2. Topics • Asynchronous Communication

  3. Asynchronous Communication • Accessing elements of a shared data structure in an unstructured manner • HOW? --BY distributing the shared data structure among the computational processes

  4. Asynchronous Functions

  5. 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);

  6. /* Data task */ /* Computation task */ while(done != TRUE) { receive(request); reply_to(request); } while(done != TRUE) { identify_next_task(); generate_requests(); process_replies(); } Example…

  7. Asynchronous example

  8. 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

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

More Related