| 1 |
# |
| 2 |
# Copyright © 2013-2014 University of Wisconsin-La Crosse. |
| 3 |
# All rights reserved. |
| 4 |
# Copyright © 2016 Inria. All rights reserved. |
| 5 |
# |
| 6 |
# Additional copyrights may follow. |
| 7 |
# See COPYING in top-level directory. |
| 8 |
# |
| 9 |
|
| 10 |
First you have to build netloc, install it and add netloc binary path |
| 11 |
to your PATH environment variable. In bash, just do: |
| 12 |
|
| 13 |
$ PATH=$PATH:/path/to/netloc/installation/bin |
| 14 |
$ export PATH |
| 15 |
|
| 16 |
Then create a directory to gather your cluster information and enter it: |
| 17 |
|
| 18 |
$ mkdir mycluster-data |
| 19 |
$ cd mycluster-data/ |
| 20 |
|
| 21 |
Create a subdirectory "hwloc" and place the lstopo XML output of your nodes |
| 22 |
there. |
| 23 |
|
| 24 |
$ ssh node001 lstopo ~/mycluster-data/hwloc/node001.xml |
| 25 |
[...] |
| 26 |
|
| 27 |
$ ls -l hwloc/ |
| 28 |
-rw-r--r-- 1 user group 74242 13 sept. 15:07 node001.xml |
| 29 |
[...] |
| 30 |
-rw-r--r-- 1 user group 26438 24 sept. 08:59 node263.xml |
| 31 |
-rw-r--r-- 1 user group 26438 13 sept. 08:11 node264.xml |
| 32 |
|
| 33 |
Now run the netloc_ib_gather_raw script to gather IB network information. |
| 34 |
It uses the hwloc information to find out the IB subnets to query. |
| 35 |
|
| 36 |
It uses ibnetdiscover and ibroute utilities which require privileged |
| 37 |
access. You can either run the entire script as root, or pass --sudo |
| 38 |
so that ibnetdiscover and ibroute are called by sudo. |
| 39 |
|
| 40 |
If the hwloc XML files are not in the "hwloc", specify it with --hwloc-dir. |
| 41 |
|
| 42 |
$ netloc_ib_gather_raw ~/mycluster-data --sudo |
| 43 |
Found 1 subnets in hwloc directory: |
| 44 |
Subnet fe80:0000:0000:0000 is locally accessible from board qib0 port 1. |
| 45 |
|
| 46 |
Looking at fe80:0000:0000:0000 (through local board qib0 port 1)... |
| 47 |
Running ibnetdiscover... |
| 48 |
Getting routes... |
| 49 |
Running ibroute for switch LID 19... |
| 50 |
[...] |
| 51 |
Running ibroute for switch LID 7... |
| 52 |
Running ibroute for switch LID 12... |
| 53 |
|
| 54 |
Now you have IB information under the "ib-raw" directory. |
| 55 |
Each subnet gets one file and one directory. |
| 56 |
|
| 57 |
$ ls -l ~/mycluster-data/ib-raw/ |
| 58 |
-rw-r--r-- 1 user group 274493 22 janv. 15:21 ib-subnet-fe80:0000:0000:0000.txt |
| 59 |
drwxr-xr-x 2 user group 4096 22 janv. 15:21 ibroutes-fe80:0000:0000:0000/ |
| 60 |
|
| 61 |
The last step is to run netloc_ib_extract_dats to collect the IB information. |
| 62 |
|
| 63 |
It automatically looks inside the "ib-raw" directory by default and generates |
| 64 |
the output under "netloc". These can be changed with "--raw-dir" and "--out-dir". |
| 65 |
|
| 66 |
$ netloc_ib_extract_dats . |
| 67 |
---------------------------------------------------------------------- |
| 68 |
Processing Subnet: fe80:0000:0000:0000 |
| 69 |
---------------------------------------------------------------------- |
| 70 |
--------------- General Network Information |
| 71 |
|
| 72 |
The netloc information is now ready for use under the "netloc" subdirectory. |
| 73 |
|
| 74 |
$ ls -l netloc/ |
| 75 |
-rw-r--r-- 1 user group 3226573 22 janv. 15:31 IB-fe80:0000:0000:0000-log-paths.ndat |
| 76 |
-rw-r--r-- 1 user group 384011 22 janv. 15:31 IB-fe80:0000:0000:0000-nodes.ndat |
| 77 |
-rw-r--r-- 1 user group 3237964 22 janv. 15:31 IB-fe80:0000:0000:0000-phy-paths.ndat |
| 78 |
|
| 79 |
$ lsnettopo netloc/ |
| 80 |
Network: IB-fe80:0000:0000:0000 |
| 81 |
Type : InfiniBand |
| 82 |
Subnet : fe80:0000:0000:0000 |
| 83 |
Hosts : 279 |
| 84 |
Switches: 25 |
| 85 |
[...] |