Content deleted Content added
→Functionality: clarify |
→Derived data types: MOS:YOU |
||
Line 79:
===Derived data types===
Many MPI functions require
Here is an example in C that passes arrays of <code>int</code>s from all processes to one. The one receiving process is called the "root" process, and it can be any designated process but normally it will be process 0. All the processes ask to send their arrays to the root with <code>MPI_Gather</code>, which is equivalent to having each process (including the root itself) call <code>MPI_Send</code> and the root make the corresponding number of ordered <code>MPI_Recv</code> calls to assemble all of these arrays into a larger one:<ref>{{cite web|url=https://www.open-mpi.org/doc/v1.8/man3/MPI_Gather.3.php|title=MPI_Gather(3) man page (version 1.8.8)|website=www.open-mpi.org}}</ref>
Line 93:
</syntaxhighlight>
However,
<syntaxhighlight lang="c">
MPI_Datatype newtype;
|