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.
Isn't it because you're calling MPI_Scatter() even on rank 2 which is not
part of your new_comm?
users-bounces_at_[hidden] wrote on 03/06/2012 01:52:06 PM:
> De : Timothy Stitt <Timothy.Stitt.9_at_[hidden]>
> A : "users_at_[hidden]" <users_at_[hidden]>
> Date : 03/06/2012 01:52 PM
> Objet : [OMPI users] Scatter+Group Communicator Issue
> Envoyé par : users-bounces_at_[hidden]
> Hi all,
> I am scratching my head over what I think should be a relatively
> simple group communicator operation. I am hoping some kind person
> can put me out of my misery and figure out what I'm doing wrong.
> Basically, I am trying to scatter a set of values to a subset of
> process ranks (hence the need for a group communicator). When I run
> the sample code over 4 processes (and scattering to 3 processes), I
> am getting a group-communicator related error in the scatter operation:
> > [stats.crc.nd.edu:29285] *** An error occurred in MPI_Scatter
> > [stats.crc.nd.edu:29285] *** on communicator MPI_COMM_WORLD
> > [stats.crc.nd.edu:29285] *** MPI_ERR_COMM: invalid communicator
> > [stats.crc.nd.edu:29285] *** MPI_ERRORS_ARE_FATAL (your MPI job
> will now abort)
> > Complete - Rank 1
> > Complete - Rank 0
> > Complete - Rank 3
> The actual test code is below:
> program scatter_bug
> use mpi
> implicit none
> integer :: ierr,my_rank,procValues(3),procRanks(3)
> integer :: in_cnt,orig_group,new_group,new_comm,out
> call MPI_INIT(ierr)
> call MPI_COMM_RANK(MPI_COMM_WORLD,my_rank,ierr)
> ! Create sub-communicator
> call MPI_COMM_GROUP(MPI_COMM_WORLD, orig_group, ierr)
> call MPI_Group_incl(orig_group, in_cnt, procRanks, new_group, ierr)
> call MPI_COMM_CREATE(MPI_COMM_WORLD, new_group, new_comm, ierr)
> call MPI_SCATTER(procValues, 1, MPI_INTEGER, out, 1, MPI_INTEGER,
> 0, new_comm, ierr);
> print *,"Complete - Rank", my_rank
> end program scatter_bug
> Thanks in advance for any advice you can give.
> users mailing list