Open MPI logo

Hardware Locality Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Hardware Locality Development mailing list

Subject: Re: [hwloc-devel] PCI device name question
From: Jeffrey Squyres (jsquyres_at_[hidden])
Date: 2012-03-20 16:48:41

On Mar 20, 2012, at 3:45 PM, Brice Goglin wrote:

> That looks good to me, as long as starting port numbers to 1 for
> non-IB/OFED is OK.

Hmm. Not sure about that. I always thought it was strange that IB devices started with port 1.

Are *we* (hwloc) supplying the port number, or are you getting it from /sys somewhere?

(/me reads the patch and ibdev2netdev...)

Ah, I see -- we're effectively doing the same thing as the ibdev2netdev script:

port=$(cat /sys/class/net/$eth/dev_id)
port=$(printf "%d" $port)
port=$(( port + 1 ))

Hrm. I don't know if the +1 is a good assumption to make in general.

Jeff Squyres
For corporate legal information go to: