Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
2025.1.0 - Português


MPI_Wait

Waits for an MPI request to complete

Syntax

res = MPI_Wait(request)
res = MPI_Wait(request, comm=mpi_comm)

Arguments

request

The MPI request.

comm=mpi_comm

If the optional argument "comm" is given, this function will use the MPI communicator created by MPI_Create_comm. If not, the default MPI_COMM_WORLD is used.

res

The variable sent by MPI_Isend and matching the MPI Request declared by MPI_Irecv. If the optional argument "comm" is given, all nodes which are not in the communicator will return empty matrix.

Description

TODO.

Examples

MPI_Init();
rnk = MPI_Comm_rank();
sizeNodes = MPI_Comm_size();

SLV = rnk;
Master = ~ SLV;

assert_checkequal(MPI_Comm_size(), 2);

if Master
   for slaveId = 1:sizeNodes-1
     value = slaveId*2
     MPI_Isend(value, slaveId, 42);
   end
else
    rankSource = 0;
    tag = 0;
    MPI_Irecv(rankSource, tag, 42); // MPI_Irecv does not return any value
    value = MPI_Wait(42) // the value will be returned by MPI_Wait
    value == 2
end

MPI_Finalize();
exit();

See also

  • MPI_Irecv — Nonblocking reception of data from a node
  • MPI_Isend — Nonblocking send data from a node to another
Report an issue
<< MPI implementation Scilab MPI Localização >>

Copyright (c) 2022-2024 (Dassault Systèmes)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Thu May 22 12:56:24 CEST 2025