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



Reply via email to