Open MPI logo

Open MPI Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Development mailing list

Subject: [OMPI devel] btl_openib_component.c -- min_distance
From: guillaume (guillaume.mangeot_at_[hidden])
Date: 2009-08-03 09:14:56


Hello,

I'm currently looking at the carto framework and the way it is used by
the openib btl. Looking at the code, I found this :

1963 if(min_distance < 0 || min_distance < distance)
1964 min_distance = distance;

at ompi/mca/btl/openib/btl_openib_component.c

in the function:
1920 static int get_ib_dev_distance(struct ibv_device *dev)

In this function, we seem to be computing distances between a given IB
card and the processors included in our affinity. I don't know which
strategy would be best here (i.e getting the min or the max), but I
think we should either rename min_distance to max_distance or replace
the "<" sign by ">".

Moreover this function is used later in the function:
1984 sort_devs_by_distance(struct ibv_device **ib_devs, int count)
to make an array of IB devices ascending sorted.

Thanks.

Guillaume