Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
5.5.1 - Русский

Change language to:
English - Français - 日本語 - Português -

Please note that the recommended version of Scilab is 2024.0.0. This page might be outdated.
However, this page did not exist in the previous stable version.

Справка Scilab >> Scilab MPI > MPI_Irecv

MPI_Irecv

Nonblocking receive of data from a node

Calling Sequence

MPI_Irecv(rank,tag)

Arguments

rank

The rank. TODO

tag

The tag. TODO

Description

Receive a variable from a specified node in a nonblock (asynchronous) way. The value is usually sent by the function MPI_Isend.

Note that, due to its asynchronous nature, MPI_Irecv does not return any value. The value sent by the source node will be returned by MPI_Wait.

Technical implementation

For more information on the implementation of Scilab/MPI, please see Technical details about the implementation

Examples

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
    assert_checkequal(value,2);
end

MPI_Finalize();
exit()

See Also

  • MPI_Isend — Nonblocking send data from a node to an other
  • MPI_Wait — Waits for an MPI request to complete
Report an issue
<< MPI_Init Scilab MPI MPI_Isend >>

Copyright (c) 2022-2023 (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 Oct 02 14:01:18 CEST 2014