Open MPI logo

Open MPI User's Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Open MPI User's mailing list

Subject: Re: [OMPI users] Bug MPI_Iscatter
From: Jeff Hammond (jeff.science_at_[hidden])
Date: 2013-11-21 18:30:55


This program makes no sense and is wrong in multiple ways.

Jeff

On Thu, Nov 21, 2013 at 4:19 PM, Pierre Jolivet <jolivet_at_[hidden]> wrote:
> 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.
> _______________________________________________
> users mailing list
> users_at_[hidden]
> http://www.open-mpi.org/mailman/listinfo.cgi/users

-- 
Jeff Hammond
jeff.science_at_[hidden]