deadlock possible in mpi-conduit w/ blocking sends

From: George Caragea (george_at_east_dot_isi_dot_edu)
Date: Thu Aug 14 2008 - 09:06:04 PDT

  • Next message: postmaster_at_smtprelay_dot_nersc_dot_gov: "Delivery Status Notification (Failure)"
    Hi all,
    When using the GASNet mpi-conduit built upon the AMMPI library, I think 
    that there is a deadlock possible when using blocking sends 
    (AMMPI_NONBLOCKING_SENDS=0).
    
    Consider the following GASNet client  pseudocode code (based on 
    testcore1.c):
    
    SENDER
    iter=0;
    while (iter++<n)
         gasnet_AMRequestShort(RECEIVER);
    
    reply_handler()  {}
    ------------------------------------------
    RECEIVER
    while (iter<n)
         gasnet_AMPoll();
    
    request_handler(sender)
         iter++;
         gasnet_AMReplyShort(sender);
    
    If blocking MPI sends are used, then we can have the following scenario:
    
    SENDER                           RECEIVER
    t=0: send M1                      t=0: AMPoll() - no message
    t=1:     AMPoll() - no message    t=1: AMPoll() - no message
    t=2:     BSend(M1)                t=2: AMPoll() - no message
    t=3: send M2                      t=3: AMPoll() - message M1
    t=4:     AMPoll() - no message    t=4:    process M1
    t=5:     BSend(M2)                t=5:    BSend(R1)
    
    In this case, we get a deadlock since both processes are waiting in a 
    blocking send.
    
    Is this a problem with AMMPI/mpi-conduit or am I missing something? If 
    it is indeed a problem, is the only solution using blocking sends?
    
    Thank you,
    George
    

  • Next message: postmaster_at_smtprelay_dot_nersc_dot_gov: "Delivery Status Notification (Failure)"