Open MPI logo

Open MPI Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Development mailing list

Subject: Re: [OMPI devel] MPI_Graph_create
From: Chris Samuel (csamuel_at_[hidden])
Date: 2009-10-15 19:40:09

----- "David Singleton" <David.Singleton_at_[hidden]> wrote:

> Kiril Dichev has already pointed a problem with MPI_Cart_create
> MPI_Graph_create has the same problem. I checked all other
> functions with logical in arguments and no others do anything
> similar.

I suspect the issue (looking at trunk) is at line 113
of ompi/mpi/c/graph_create.c :

    re_order = (1 == reorder) ? true:false;

Which means that re_order is only true if 1 is passed
through via the reorder parameter.

I suspect changing it to:

    re_order = (0 == reorder) ? false:true;

would fix it as then re_order is only false if 0 is
passed through (assuming you define 0 as false and
!0 as true). Tested via a little harness program
and it seems to do the right thing.


Christopher Samuel - (03) 9925 4751 - Systems Manager
 The Victorian Partnership for Advanced Computing
 P.O. Box 201, Carlton South, VIC 3053, Australia
VPAC is a not-for-profit Registered Research Agency