Open MPI logo

Open MPI User's Mailing List Archives

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

Subject: [OMPI users] Allgather in inter-communicator bug,
From: Battalgazi YILDIRIM (yildirimga_at_[hidden])
Date: 2010-05-19 18:00:21


I am trying to use intercommunicator ::Allgather between two child process.
I have fortran and Python code,
I am using mpi4py for python. It seems that ::Allgather is not working
properly in my desktop.

 I have contacted first mpi4py developers (Lisandro Dalcin), he simplified
my problem and provided two example files ( and fortran.f90,
please see below).

We tried with different MPI vendors, the following example worked correclty(
it means the final print out should be array('i', [1, 2, 3, 4, 5, 6, 7, 8])

However, it is not giving correct answer in my two desktop (Redhat and
ubuntu) both

Could yo look at this problem please?

If you want to follow our discussion before you, you can go to following

yildirim_at_memosa:~/python_intercomm$ more
from mpi4py import MPI
from array import array
import os

progr = os.path.abspath('a.out')
child = MPI.COMM_WORLD.Spawn(progr,[], 8)
n = child.remote_size
a = array('i', [0]) * n
print a

yildirim_at_memosa:~/python_intercomm$ more fortran.f90
program main
 use mpi
 implicit none
 integer :: parent, rank, val, dummy, ierr
 call MPI_Init(ierr)
 call MPI_Comm_get_parent(parent, ierr)
 call MPI_Comm_rank(parent, rank, ierr)
 val = rank + 1
 call MPI_Allgather(val, 1, MPI_INTEGER, &
                    dummy, 0, MPI_INTEGER, &
                    parent, ierr)
 call MPI_Comm_disconnect(parent, ierr)
 call MPI_Finalize(ierr)
end program main

yildirim_at_memosa:~/python_intercomm$ mpif90 fortran.f90
yildirim_at_memosa:~/python_intercomm$ python
array('i', [0, 0, 0, 0, 0, 0, 0, 0])