Newsgroups: comp.parallel.mpi
From: eddemain@neumann.uwaterloo.ca (Erik Demaine)
Subject: Re: Buglist for IBM's SP-2 implementation of MPI
Organization: University of Waterloo
Date: Mon, 12 Aug 1996 13:19:02 GMT
Message-ID: <Dw10zq.BIJ@undergrad.math.uwaterloo.ca>

Alan M. McKenney (mckenney@cims.nyu.edu) wrote:
: ...
:     I know I could just use MPICH, and the code runs fine
: under MPICH, but I worry that it *could* be a bug or a violation
: of the MPI standard (also, IMHO, a bug) in my code that 
: just doesn't cause a problem when using MPICH.  (E.g., the
: MPI_Send/MPI_Recv "potentially unsafe code" does deadlock
: under IBM's version for messages > 4K, but not under MPICH.)

It's hard to say, but you're probably running into the following uncommonly
realized part of the MPI standard: MPI_Send is blocking.  It's possible that
it doesn't return until a matching MPI_Recv is complete.  So, something like
the following is invalid:

        MPI_Send (..., p+1, ...);
        MPI_Recv (..., p-1, ...);

For something like this, use MPI_Sendrecv.  For more general non-blocking
sends, either set things up nicely or use MPI_Isend or MPI_Bsend.

Good luck,
Erik
-- 
Erik Demaine                 \/  e-mail: eddemain@neumann.uwaterloo.ca
Dept. of Computer Science    {}  URL: http://barrow.uwaterloo.ca/~eddemain/
University of Waterloo       []  PGP public key: finger above e-mail address
Waterloo, ON Canada N2L 3G1  ()  

