Hi arash,
When working with infiniband opensm attaches to a specific IB port on the local machine and configures only the fabric connected to it.
For the described environment you would have to use a switch for communicating all nodes.
Thank you,
Karen.