Open MPI logo

Open MPI User's Mailing List Archives

  |   Home   |   Support   |   FAQ   |  

This web mail archive is frozen.

This page is part of a frozen web archive of this mailing list.

You can still navigate around this archive, but know that no new mails have been added to it since July of 2016.

Click here to be taken to the new web archives of this list; it includes all the mails that are in this frozen archive plus all new mails that have been sent to the list since it was migrated to the new archives.

Subject: Re: [OMPI users] Question about MPI_Waitany
From: Edgar Gabriel (gabriel_at_[hidden])
Date: 2008-01-30 13:41:38


I think you are mixing up two different things here: a NULL pointer is
invalid, and thus Open MPI has to raise an error. If a request is
MPI_REQUEST_NULL, that's perfectly legal according to the standard.
However MPI_REQUEST_NULL is not a NULL pointer, its a well defined value.

Francisco Jesús Martínez Serrano wrote:
> Hello Users,
>
> the man page for MPI_Waitany states that
>
> "The array_of_requests list *may contain null* or inactive handles. If
> the list contains no active handles (list has length zero or all
> entries are null or inactive), then the call returns immediately with
> index = MPI_UNDEFINED, and an empty status."
>
> I've been having problems with Open MPI and a code that runs fine with
> LAM, I have managed to trace it to a call to MPI_Waitany with some
> requests set to null (but properly allocated).
>
> The current trunk code for ompi/mpi/c/waitany.c states:
>
> int MPI_Waitany(int count, MPI_Request *requests, int *index,
> MPI_Status *status)
> {
>
> OPAL_CR_TEST_CHECKPOINT_READY();
>
> if ( MPI_PARAM_CHECK ) {
> int i, rc = MPI_SUCCESS;
> OMPI_ERR_INIT_FINALIZE(FUNC_NAME);
> if ((NULL == requests) && (0 != count)) {
> rc = MPI_ERR_REQUEST;
> } else {
> for (i = 0; i < count; i++) {
> if (NULL == requests[i]) {
> rc = MPI_ERR_REQUEST;
> break;
> }
> }
> }
> if ((NULL == index) || (0 > count)) {
> rc = MPI_ERR_ARG;
> }
> OMPI_ERRHANDLER_CHECK(rc, MPI_COMM_WORLD, rc, FUNC_NAME);
> }
> (...)
>
>>From what I understand in this code, if any of the requests is NULL
> then an MPI_ERR_REQUEST error will be issued.
>
> Is this a limitation of Open MPI (i.e. further processing of this
> query will result in an error if a request is null), or a simple bug?
> Of course, I could be mistaken... :-)
>
> Cheers!
> _______________________________________________
> users mailing list
> users_at_[hidden]
> http://www.open-mpi.org/mailman/listinfo.cgi/users