Go to the first, previous, next, last section, table of contents.


A complete MPI example

This following Fortran program can be run with an arbitrary number of processes. All of the processes first send an integer to process 0, and then process 0 receives these integers one by one. Each process sends its MPI rank as the integer, so process 0 can check the integrity of the data by being sure it receives integer i from process i. If all integers are received correctly, process 0 prints `Data from all i nodes received correctly!'. If not all of the integers were received correctly, process 0 would print `Data NOT RECEIVED CORRECTLY from all i nodes!'.


Go to the first, previous, next, last section, table of contents.