Skip to content

Commit 229eddc

Browse files
committed
netloc: update ib_gather_raw for new hwloc
Signed-off-by: Cyril Bordage <[email protected]>
1 parent e9967c8 commit 229eddc

File tree

2 files changed

+20
-18
lines changed

2 files changed

+20
-18
lines changed

netloc/topology.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* Copyright © 2013-2014 University of Wisconsin-La Crosse.
33
* All rights reserved.
4-
* Copyright © 2016 Inria. All rights reserved.
4+
* Copyright © 2016-2017 Inria. All rights reserved.
55
*
66
* $COPYRIGHT$
77
*
@@ -180,7 +180,7 @@ netloc_topology_t *netloc_topology_construct(char *path)
180180
HASH_FIND_STR(topology->nodes, field, node);
181181

182182
if (!node) {
183-
fprintf(stderr, "Node node found: %s\n", field);
183+
fprintf(stderr, "Node not found: %s\n", field);
184184
utarray_free(topology->partitions);
185185
utarray_free(topology->topos);
186186
return NULL;

utils/netloc/infiniband/netloc_ib_gather_raw.in

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env perl
22

33
#
4-
# Copyright © 2013-2016 Inria. All rights reserved.
4+
# Copyright © 2013-2017 Inria. All rights reserved.
55
#
66
# See COPYING in top-level directory.
77
#
@@ -202,22 +202,24 @@ if (@forcesubnets) {
202202
my $boardname = undef;
203203
my $portnum = undef;
204204
while (my $line = <FILE>) {
205-
if ($line =~ /<object type=\"OSDev\".* name=\"(.+)\".* osdev_type=\"3\".*>/) {
205+
if ($line =~ /<object type=\"OSDev\".* name=\"((?!hfi)(?!usnic).+)\".* osdev_type=\"3\".*>/) {
206206
$boardname = $1;
207-
} elsif ($line =~ /<\/object>/) {
208-
$boardname = undef;
209-
} elsif ($line =~ /<info name=\"Port([0-9]+)GID([0-9]+)\".* value=\"([0-9a-fA-F:]{19}):([0-9a-fA-F:]{19})\"\/.*>/) {
210-
$servers{$hostname}->{gids}->{$boardname}->{$1}->{$2}->{subnet} = $3;
211-
$servers{$hostname}->{gids}->{$boardname}->{$1}->{$2}->{guid} = $4;
212-
} elsif ($line =~ /<info name=\"Port([0-9]+)LID\" value=\"(0x[0-9a-fA-F]+)\"\/>/) {
213-
# lid must be between 0x1 and 0xbfff
214-
if ((hex $2) < 1 or (hex $2) > 49151) {
215-
$servers{$hostname}->{gids}->{$boardname}->{$1}->{invalid} = 1;
216-
}
217-
} elsif ($line =~ /<info name=\"Port([0-9]+)State\" value=\"([0-9])\"\/>/) {
218-
# state must be active = 4
219-
if ($2 != 4) {
220-
$servers{$hostname}->{gids}->{$boardname}->{$1}->{invalid} = 1;
207+
} elsif (defined $boardname) {
208+
if ($line =~ /<\/object>/) {
209+
$boardname = undef;
210+
} elsif ($line =~ /<info name=\"Port([0-9]+)GID([0-9]+)\".* value=\"([0-9a-fA-F:]{19}):([0-9a-fA-F:]{19})\"\/.*>/) {
211+
$servers{$hostname}->{gids}->{$boardname}->{$1}->{$2}->{subnet} = $3;
212+
$servers{$hostname}->{gids}->{$boardname}->{$1}->{$2}->{guid} = $4;
213+
} elsif ($line =~ /<info name=\"Port([0-9]+)LID\" value=\"(0x[0-9a-fA-F]+)\"\/>/) {
214+
# lid must be between 0x1 and 0xbfff
215+
if ((hex $2) < 1 or (hex $2) > 49151) {
216+
$servers{$hostname}->{gids}->{$boardname}->{$1}->{invalid} = 1;
217+
}
218+
} elsif ($line =~ /<info name=\"Port([0-9]+)State\" value=\"([0-9])\"\/>/) {
219+
# state must be active = 4
220+
if ($2 != 4) {
221+
$servers{$hostname}->{gids}->{$boardname}->{$1}->{invalid} = 1;
222+
}
221223
}
222224
}
223225
}

0 commit comments

Comments
 (0)