Changes between Version 4 and Version 5 of Challenge


Ignore:
Timestamp:
03/11/19 16:10:49 (7 years ago)
Author:
siegel
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Challenge

    v4 v5  
    4343
    4444
    45 MPI Reference
    46 =============
     45== MPI Reference ==
    4746
    48 Constants:
     47=== Constants ===
    4948
    50   MPI_COMM_WORLD (type MPI_Comm)
    51   MPI_STATUS_IGNORE (type MPI_Status*)
    52   MPI_ANY_SOURCE (type int)
    53   MPI_INT (type MPI_Datatype)
    54   MPI_DOUBLE (type MPI_Datatype)
     49 * `MPI_COMM_WORLD` (type `MPI_Comm`)
     50 * `MPI_STATUS_IGNORE` (type `MPI_Status*`)
     51 * `MPI_ANY_SOURCE` (type `int`)
     52 * `MPI_ANY_TAG` (type `int`)
     53 * `MPI_INT` (type `MPI_Datatype`)
     54 * `MPI_DOUBLE` (type `MPI_Datatype`)
    5555
     56=== Functions ===
    5657
    57 Functions:
     58 * `MPI_Init(NULL, NULL)`
     59 * `MPI_Finalize()`
    5860
    59 MPI_Init(NULL, NULL);
    60 MPI_Finalize();
    61 
    62 MPI_Init must be called before other MPI functions.   MPI_Finalize
     61`MPI_Init` must be called before other MPI functions.   `MPI_Finalize`
    6362must be called before termination and after all other MPI functions.
    6463
    65 MPI_Comm_size(MPI_Comm comm, int *nprocs);
    66 MPI_Comm_rank(MPI_Comm comm, int *rank);
     64 * `MPI_Comm_size(MPI_Comm comm, int *nprocs)`
     65 * `MPI_Comm_rank(MPI_Comm comm, int *rank)`
    6766
    6867Get the number of processes in the communicator, and the "rank" (ID
    6968number) of this process within the communicator.
    7069
    71 int MPI_Send(const void *buf, int count, MPI_Datatype datatype,
    72              int dest, int tag, MPI_Comm comm);
     70 * `int MPI_Send(const void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm)`
    7371
    7472Sends a message to the process of rank dest.
    75 You can use NULL for buf if count is 0 --- an empty message.
     73You can use `NULL` for `buf` if `count` is 0 --- an empty message.
    7674
    77 int MPI_Recv(void *buf, int count, MPI_Datatype datatype, int source,
    78              int tag,  MPI_Comm comm, MPI_Status *status);
     75* `int MPI_Recv(void *buf, int count, MPI_Datatype datatype, int source, int tag,  MPI_Comm comm, MPI_Status *status)`
    7976
    8077Receives a message from the specified source process.
    81 source can be MPI_ANY_SOURCE --- to receive from any source ("wildcard").
    82 status can be MPI_STATUS_IGNORE, if you don't care about the status.
    83 Otherwise, declare a variable of type MPI_Status and pass a pointer to it.
     78`source` can be `MPI_ANY_SOURCE` --- to receive from any source ("wildcard").
     79status can be `MPI_STATUS_IGNORE`, if you don't care about the status.
     80Otherwise, declare a variable of type `MPI_Status` and pass a pointer to it.
    8481
     82{{{
    8583int MPI_Sendrecv(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
    8684                 int dest, int sendtag,
     
    8886                 int source, int recvtag,
    8987                 MPI_Comm comm, MPI_Status *status);
     88}}}
    9089
    91 Combines one MPI_Send operation and one MPI_Recv operation into a
     90Combines one `MPI_Send` operation and one `MPI_Recv` operation into a
    9291single command.  It behaves as if the two operations execute
    9392concurrently in separate threads.  Used to avoid deadlocks that could
    94 result if all processes do MPI_Send; MPI_Recv.
     93result if all processes do `MPI_Send; MPI_Recv`.