Good catch. I will take a look and see how best to fix this. -Nathan
On Tue, Aug 26, 2014 at 07:03:24PM +0300, Lisandro Dalcin wrote: > I finally managed to track down some issues in mpi4py's test suite > using Open MPI 1.8+. The code below should be enough to reproduce the > problem. Run it under valgrind to make sense of my following > diagnostics. > > In this code I'm creating a 2D, periodic Cartesian topology out of > COMM_SELF. In this case, the process in COMM_SELF has 4 logical in/out > links to itself. So we have size=1 but indegree=outdegree=4. However, > in ompi/mca/coll/basic/coll_basic_module.c, "size * 2" request are > being allocated to manage communication: > > if (OMPI_COMM_IS_INTER(comm)) { > size = ompi_comm_remote_size(comm); > } else { > size = ompi_comm_size(comm); > } > basic_module->mccb_num_reqs = size * 2; > basic_module->mccb_reqs = (ompi_request_t**) > malloc(sizeof(ompi_request_t *) * basic_module->mccb_num_reqs); > > I guess you have to also special-case for topologies and allocate > indegree+outdegree requests (not sure about this number, just > guessing). > > > #include <stdio.h> > #include <mpi.h> > > int main(int argc, char *argv[]) > { > MPI_Comm comm; > int ndims = 2, dims[2] = {1,1}, periods[2] = {1,1}; > int sendbuf = 7, recvbuf[5] = {0,0,0,0,0}; > MPI_Init(&argc, &argv); > > MPI_Cart_create(MPI_COMM_SELF, ndims, dims, periods, 0, &comm); > > MPI_Neighbor_allgather(&sendbuf, 1, MPI_INT, > recvbuf, 1, MPI_INT, > comm); > > {int i; for (i=0;i<5;i++) printf("%d ",recvbuf[i]); printf("\n");} > > MPI_Finalize(); > return 0; > } > > > -- > Lisandro Dalcin > ============ > Research Scientist > Computer, Electrical and Mathematical Sciences & Engineering (CEMSE) > Numerical Porous Media Center (NumPor) > King Abdullah University of Science and Technology (KAUST) > http://numpor.kaust.edu.sa/ > > 4700 King Abdullah University of Science and Technology > al-Khawarizmi Bldg (Bldg 1), Office # 4332 > Thuwal 23955-6900, Kingdom of Saudi Arabia > http://www.kaust.edu.sa > > Office Phone: +966 12 808-0459 > _______________________________________________ > devel mailing list > de...@open-mpi.org > Subscription: http://www.open-mpi.org/mailman/listinfo.cgi/devel > Link to this post: > http://www.open-mpi.org/community/lists/devel/2014/08/15713.php
pgp4ELRAwv940.pgp
Description: PGP signature