Funktionsübersicht . . Nicht-blockierende Kommunikation

Hilfesystem für den Message Passing Interface Standard MPI


MPI_Probe

testet auf das Vorhandensein einer Nachricht (blockierend)

Syntax:

Input Prarameter: Output Parameter: Aufruf:

für das Empfangen einer Nachricht von einem beliebigen Sender, mit beliebigen tag und unbekannter Länge

#include "mpi.h"

    int          myid, msglen, *msg; 
    MPI_Status   stat;
    MPI_Comm     comm;

    ...
    MPI_Probe(MPI_ANY_SOURCE, MPI_ANY_TAG, comm, &stat);
    MPI_Get_count(&stat, MPI_INT, &msglen);
    msg=malloc(msglen*sizeof(int));
    MPI_Recv(msg, msglen, MPI_INT, stat.MPI_SOURCE, stat.MPI_TAG, 
             comm, &stat);
    ...

Beispiel