Re: opensm with multiple IB subnets

Ken Teague
2010-04-21T00:07:02Z

On Tue, Apr 20, 2010 at 2:13 PM, Ken Teague <kteague-e+AXbWqSrlAAvxtiuMwx3w@public.gmane.org> wrote:
> I have a 17-node cluster and each node has a single IB card that has
> 2x IB ports (ib0 and ib1).....

After doing a little more research, I confirmed that my understanding
of the manual page is correct.  To run opensm for each GUID, I
modified my init script to run a for loop based on the information
returned from "ibstat -p".

I added this near the beginning of the script where the other
environment variables are located:
<snip>
OFA_HOME="/usr/local/sbin"
IBSTAT_BIN="${OFA_HOME}/ibstat"
IBSTAT_ARG="-p"
OPENSM_BIN="${OFA_HOME}/opensm"
OPENSM_ARG="-B -g"
<snip>

I replaced the single line which started opensm with this for loop:
for i in `${IBSTAT_BIN} ${IBSTAT_ARG}`
do
${OPENSM_BIN} ${OPENSM_ARG} ${i}
done
<snip>

If anyone has a more elegant way to handle this, I'm open to
suggestions.  Many thanks.

Ken