MPI by examples in Fortran
Università di Trieste
Dipartimento di Matematica e Informatica
1. Hello world. Starting and finalizing parallel computation (MPI_INIT,
MPI_FINALIZE
)
2. Hello from. Communicator size, process rank (MPI_COMM_WORLD, MPI_COMM_SIZE, MPI_COMM_RANK).
3. Send/receive. Sending and receiving messages
(MPI_SEND, MPI_RECV)
4. Deadlock. Message exchange with deadlock
5. No deadlock 1. Message exchange without deadlock
6. No deadlock 2. Avoiding deadlock with MPI_SENDRECV
7. Scatter/Gather. One-to-all communication. Distributing data and assembling the result (MPI_SCATTER, MPI_GATHER)
8. Broadcast. One-to-all communication. Sending the same data to all processors (MPI_BCAST)
9. All-to-all communication. Usefull for matrix transposition (MPI_ALLTOALL)
10. Parallel sum. An instance of the reduction functions over a vector (MPI_REDUCE)