Newsgroups: comp.sys.sgi.bugs,comp.parallel.mpi
From: Anthony Chan <tonychan@rainbow.uchicago.edu>
Subject: Bugs of Array Services 3.1 on Origin2000
Organization: University of Chicago -- Academic Computing Services
Date: Thu, 9 Jul 1998 03:58:25 GMT
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-ID: <35A43FE1.C0CF7C84@rainbow.uchicago.edu>

Does anyone know any patch to the bug in the sub-communicator
(MPI_Group) routines in the native SGI's MPI (Array Services 3.1)?  I
would like to know if this problem has been documentated anywhere ?
Here is the test code:


***************************************************************************

*...  Test code to check if the MPI's subcommunicator routines
*...  returns correct rank and size
*
*...  Original source  from Andrea Malagoli
***************************************************************************

      program testgroup
      include 'mpif.h'

      integer comm_in, comm_out, ranks(10), nr
      integer group_in, group_out

      call MPI_Init(ierr)

      comm_in = MPI_COMM_WORLD

      call MPI_COMM_RANK(comm_in, myid, ierr)

*...  Setup a sub-communicator that contains only the current processor
...
*...  i.e. only one process per sub-communicator
      nranks   = 1
      ranks(1) = myid

*.... Generate the group corresponding to the input (parent)
communicator.
      call MPI_Comm_group( comm_in, group_in, ierr )

*.... Now we generate the sub-group containing the listed rank of nodes
      call MPI_Group_incl( group_in, nranks, ranks, group_out, ierr )

*.... Now we generate the sub-communicator
      call MPI_Comm_create( comm_in, group_out, comm_out, ierr )

      call MPI_Comm_rank( comm_in, irank_in, ierr )
      call MPI_Comm_rank( comm_out, irank_out, ierr )
      call MPI_Comm_size( comm_in, isize_in, ierr )
      call MPI_Comm_size( comm_out, isize_out, ierr )

*.... Here we should expect irank_out = 0 and isize_out = 1
      print 100, irank_in, isize_in, irank_out, isize_out
 100  format('On Proc@ Rank_in: ',i3,'   Size_in: ',i3,
     & '   | Rank_out: ',i3,'   Size_out:', i3)

      call MPI_Finalize(ierr)

      end

This code when compiled with native SGI's MPI and ran with 4 CPUs has
the following result:

On Proc:   0   Size_in:   4   | Rank_out:   0   Size_out:  4
On Proc:   2   Size_in:   4   | Rank_out:   2   Size_out:  4
On Proc:   1   Size_in:   4   | Rank_out:   1   Size_out:  4
On Proc:   3   Size_in:   4   | Rank_out:   3   Size_out:  4

However, the same code compiled with MPICH on the same Origin2000 has
the following results

On Proc:   0   Size_in:   4   | Rank_out:   0   Size_out:  1
On Proc:   2   Size_in:   4   | Rank_out:   0   Size_out:  1
On Proc:   3   Size_in:   4   | Rank_out:   0   Size_out:  1
On Proc:   1   Size_in:   4   | Rank_out:   0   Size_out:  1

The same result was found  using IBM's MPI or MPICH
on IBM's SP.   All MPICH produces the same result.

Has anyone found any similar problem in LAM ?

Thanks!

Anthony Chan.


