From Dries.Kimpe@XXXXXXXXXXXXXX Mon Feb 4 09:26:51 2008 Date: Mon, 4 Feb 2008 16:24:03 +0100 From: Dries Kimpe To: mpi-forum@XXXXXXXXXXX MIME-Version: 1.0 Content-Disposition: inline X-Operating-System: mhdmobile Genuine Intel(R) CPU U2500 @ 1.20GHz GNU/Linux User-Agent: Mutt/1.5.16 (2007-06-09) X-Spam-Details: rule=cautious_notspam policy=cautious score=0 spamscore=0 ipscore=0 phishscore=0 bulkscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx engine=3.1.0-0801230000 definitions=main-0802040020 X-Spam-Details: rule=tag_notspam policy=tag score=0 spamscore=0 ipscore=0 phishscore=0 bulkscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx engine=3.1.0-0801230000 definitions=main-0802040020 X-Spam-OrigSender: mpi-forum-bounces@XXXXXXXXXXX X-Spam-OrigSender: Dries.Kimpe@XXXXXXXXXXXXXX X-Spam-Bar: X-Spam-Bar: Subject: [mpi-forum] MPI_Startall / MPI_Waitall / MPI_Testall clarification? X-BeenThere: mpi-forum@XXXXXXXXXXX X-Mailman-Version: 2.1.8 Precedence: list List-Id: General MPI Forum mailing list List-Archive: List-Post: List-Help: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: mpi-forum-bounces@XXXXXXXXXXX Errors-To: mpi-forum-bounces@XXXXXXXXXXX X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at mailgw.mcs.anl.gov >From the standard: (same for MPI_Startall, MPI_Testall) The error-free execution of MPI_WAITALL(count, array_of_requests, array_of_statuses) has the same effect as the execution of MPI_WAIT(&array_of_request[i], &array_of_statuses[i]), for i=0 ,..., count-1, in some arbitrary order. What about count==0? 1) Is it allowed? 2) If it is allowed, should a valid pointer be provided as the array_of_requests argument? Looking at mpich-1.0.6p1, I see the following: Function Allows count==0 Allows bufptr=0 when count==0 MPI_Testall Y Y MPI_Testsome Y Y MPI_Testany Y Y MPI_Waitsome Y Y MPI_Waitall Y Y MPI_Waitany Y Y MPI_Startall Y N For MPI_Startall: Fatal error in MPI_Startall: Invalid argument, error stack: MPI_Startall(147): MPI_Startall(count=0, req_array=(nil)) failed MPI_Startall(80).: Null pointer in parameter array_of_requests[0]0:Return code = 0, signaled with Interrupt Considering the other ...all functions allow count==0 and ignore the array in this case, the behaviour of MPI_Startall is probably just an oversight in mpich. For some reason, OpenMPI has exactly the same behavior; MPI_Startall doesn't allow req_array==0 even if count==0 (MPI_ERR_REQUEST is raised/returned) There is also an issue: progress. For example, in OpenMPI, calling MPI_Testall with count==0 doesn't do anything at all. More specific, it doesn't call the progress engine. Mpich however, does call the progress engine, even if count==0. (On the other hand, MPI_Waitall does NOT try to make progress if count==0) I propose to clarify where needed, and explicitly allow count==0; Also, if count==0, then 0 should be accepted as pointer for the request array, and no guarantee of progress should be made. If count==0, the returned error code should be MPI_SUCCESS (unless of course, an asynchronous error is detected). It would suffice to add "When count is zero, this call has no effect." (For MPI_Startall, MPI_Testall, MPI_Waitall this can be right after the text quoted on top of this message; For MPI_Waitany, MPI_Testany, MPI_Waitsome, MPI_Testsome, the addition should be at the end of the paragraph.) Greetings, Dries _______________________________________________ mpi-forum mailing list mpi-forum@XXXXXXXXXXX http://lists.cs.uiuc.edu/mailman/listinfo/mpi-forum