Presenter : Nageeb Yahya Alsurmi GS21565 Lecturer : Assoc. Prof. Dr Mohamed Othman Test Suite for Evaluating Performance of MPI Implementations That Support MPI_THREAD_MULTIPLE By: Rajeev Thakur and William Gropp Argonne National Laboratory, USA
Deadlock occurs when a process holds a lock and then attempts to acquire a second lock. If the second lock is already held by another process, the first process will be blocked. If the second process then attempts to acquire the lock held by the first process, the system has "deadlocked": no progress will ever be made
They cause blocking, which means some threads/processes have to wait until a lock (or a whole set of locks) is released
Process 0 Process 1 Thread 0 Thread 1 Thread 1 Thread 0 MPI_Recv(src1) MPI_Send(dest1) MPI_Recv(src0) MPI_Send(dest0) Buffer full Wait for thread 1 to complete the send operation to start reading from the buffer The buffer is full but still a data are sending so thread 1 wait for thread 0 to empty (read) the buffer
Test1 (non threading mode )- has an iterative loop in which a process communicates with its four nearest neighbors by posting nonblocking sends and receives, followed by a computation phase, followed by an MPI_ Waitall for the communication to complete.
T est2 ( threading mode ). - is similar except that, before the iterative loop, each process spawns a thread that blocks on an MPI_Recv.
This technique effectively simulates asynchronous progress by the MPI implementation.
If total time ( threading mode ) < total time ( non threading ) there is no overlap.