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: [OMPI users] MPI_PROC_NULL
From: jody (jody.xha_at_[hidden])
Date: 2009-02-12 17:00:46


Hi

In my application i use MPI_PROC_NULL
as an argument in MPI_Sendrecv to simplify the
program (i.e. no special cases for borders)
With 1.3 it works, but under 1.3.1a0r20520
i get the following error:
[jody_at_localhost 3D]$ mpirun -np 2 ./sr
[localhost.localdomain:29253] *** An error occurred in MPI_Sendrecv
[localhost.localdomain:29253] *** on communicator MPI_COMM_WORLD
[localhost.localdomain:29253] *** MPI_ERR_RANK: invalid rank
[localhost.localdomain:29253] *** MPI_ERRORS_ARE_FATAL (goodbye)
[localhost.localdomain:29252] *** An error occurred in MPI_Sendrecv
[localhost.localdomain:29252] *** on communicator MPI_COMM_WORLD
[localhost.localdomain:29252] *** MPI_ERR_RANK: invalid rank
[localhost.localdomain:29252] *** MPI_ERRORS_ARE_FATAL (goodbye)

According to the MPI-book it shpuld be ok to use MPI_PROC_NULL in such cases.
Is there a rreason why this doesn't work anymore?

Here's a code which reproduces the problem:

[jody_at_localhost 3D]$ cat sr.cpp
#include <stdio.h>

#include "mpi.h"

int main(int iArgC, char *apArgV[]) {
    int iRank;
    int iSize;

    MPI_Init(&iArgC, &apArgV);

    MPI_Comm_size(MPI_COMM_WORLD, &iSize);
    MPI_Comm_rank(MPI_COMM_WORLD, &iRank);

    MPI_Status st;
    MPI_Sendrecv(&iRank, 1, MPI_INT, MPI_PROC_NULL, 77,
                 &iSize, 1, MPI_INT, 1, 77, MPI_COMM_WORLD, &st);

    MPI_Finalize();
    return 0;
}

Thank You
  Jody