Hello,
The following code doesn’t execute properly :
#include <mpi.h>

int main(int argc, char** argv) {
    int          taskid, ntasks;
    MPI_Init(&argc, &argv);
    MPI_Request rq;

    MPI_Comm_rank(MPI_COMM_WORLD,&taskid);
    MPI_Comm_size(MPI_COMM_WORLD,&ntasks);
    double* r;
    int l = 0;
    if(taskid > 0)
        MPI_Iscatter(NULL, 0, MPI_DATATYPE_NULL, r, l, MPI_DOUBLE, 0, 
MPI_COMM_WORLD, &rq);
    MPI_Finalize();
}

Outcome:
*** An error occurred in MPI_Type_extent
*** MPI_ERR_TYPE: invalid datatype

Hotfix: change MPI_DATATYPE_NULL to something else.

Thanks for a quick fix.

Reply via email to