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] Deadlock/NULL pointer dereference in openib BTL
From: Jeff Squyres (jsquyres_at_[hidden])
Date: 2011-02-14 13:05:35


Thanks Jeremiah; I've filed the following ticket about this:

    https://svn.open-mpi.org/trac/ompi/ticket/2722

On Feb 10, 2011, at 3:50 PM, Jeremiah Willcock wrote:

> Running the following program on two nodes connected by Infiniband and OMPI 1.5.1 (openib BTL), one task per node:
>
> #include <mpi.h>
> #include <stdlib.h>
>
> int main(int argc, char** argv) {
> int rank, size, i, *buf1, *buf2;
> MPI_Request* reqs;
> MPI_Init(&argc, &argv);
> MPI_Comm_rank(MPI_COMM_WORLD, &rank);
> MPI_Comm_size(MPI_COMM_WORLD, &size);
> buf1 = (int*)calloc(1000 * size, sizeof(int));
> if (!buf1) abort();
> buf2 = (int*)calloc(1000 * size, sizeof(int));
> if (!buf2) abort();
> reqs = (MPI_Request*)malloc(2 * size * sizeof(MPI_Request));
> if (!reqs) abort();
> for (i = 0; i < size; ++i) {
> MPI_Isend(buf1 + 1000 * i, 1000, MPI_INT, (i + rank) % size, 0, MPI_COMM_WORLD, &reqs[i]);
> MPI_Irecv(buf2 + 1000 * i, 1000, MPI_INT, (i + rank) % size, 0, MPI_COMM_WORLD, &reqs[size + i]);
> }
> MPI_Waitall(2 * size, reqs, MPI_STATUSES_IGNORE);
> free(buf1);
> free(buf2);
> free(reqs);
> MPI_Finalize();
> return 0;
> }
>
> produces an infinite loop in MPI_Waitall. Running under valgrind, the MPI_Waitall call produces a NULL pointer dereference and thus a segmentation fault. The code works correctly in Open MPI 1.4.1 and in 1.5.1 when using the TCP BTL.
>
> -- Jeremiah Willcock
> _______________________________________________
> users mailing list
> users_at_[hidden]
> http://www.open-mpi.org/mailman/listinfo.cgi/users

-- 
Jeff Squyres
jsquyres_at_[hidden]
For corporate legal information go to:
http://www.cisco.com/web/about/doing_business/legal/cri/