Skip to content

mpi_ialltoall apparently erroneous complaint about invalid argument #1023

@emmanuelthome

Description

@emmanuelthome

This complains with openmpi-1.10.rc2 (well, not specific to that version. Same goes for 1.8.8).
The blocking function accepts the arguments, though.
Same goes for ialltoallv and ialltoallw

Here is the transcript, and next the source code.

Best regards,

E.

catrel-30 ~ $ ~/Packages/openmpi-1.10.1rc2/bin/mpicc -std=c99 test2.c && ~/Packages/openmpi-1.10.1rc2/bin/mpirun -n 2 ./a.out
[catrel-30:51966] *** An error occurred in MPI_Ialltoall
[catrel-30:51966] *** reported by process [4104650753,0]
[catrel-30:51966] *** on communicator MPI_COMM_WORLD
[catrel-30:51966] *** MPI_ERR_ARG: invalid argument of some other kind
[catrel-30:51966] *** MPI_ERRORS_ARE_FATAL (processes in this communicator will now abort,
[catrel-30:51966] ***    and potentially your MPI job)
[catrel-30.loria.fr:51964] 1 more process has sent help message help-mpi-errors.txt / mpi_errors_are_fatal
[catrel-30.loria.fr:51964] Set MCA parameter "orte_base_help_aggregate" to 0 to see all help / error messages
#include <mpi.h>
#include <stdio.h>
#include <stdlib.h>

int main(int argc, char * argv[])
{
    int size;
    int rank;

    MPI_Init(&argc, &argv);
    MPI_Comm_size(MPI_COMM_WORLD, &size);
    MPI_Comm_rank(MPI_COMM_WORLD, &rank);

    int * recvbuf = malloc(size * sizeof(int));
    for(int r = 0 ; r < size ; r++) {
        recvbuf[r] = rank*size+r;
    }   
    MPI_Request req;
    MPI_Ialltoall(MPI_IN_PLACE, 1, MPI_INT, recvbuf, 1, MPI_INT, MPI_COMM_WORLD, &req);
    MPI_Wait(&req, MPI_STATUS_IGNORE);

    for(int r = 0 ; r < size ; r++) {
        if (recvbuf[r] != r*size+rank)
            abort();
    }       
    free(recvbuf);

    MPI_Finalize();
}   

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions