Skip to content

Commit 1967e41

Browse files
committed
regx/reverse: fixed adding an empty range for no numerical hostnames
Example: For the nodelist `jjss,jjss0000001,jjss0000003,jjss0000002` a regular expression was `jjss[0:0],jjss[7:1,3,2]` that led to incorrect unpacking the first host as `jjs0`. This commit fixes an adding empty range for not numeric hostnames. Here is the fixed regex for this exapmle: `jjss,jjss[7:1,3,2]` Signed-off-by: Boris Karasev <karasev.b@gmail.com>
1 parent d1ad90f commit 1967e41

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

orte/mca/regx/reverse/regx_reverse.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,9 @@ static int nidmap_create(opal_pointer_array_t *pool, char **regex)
142142
for( j = 0; j <= i; ++j) {
143143
prefix[j] = node[j];
144144
}
145-
startnum = j;
145+
if (numdigits) {
146+
startnum = j;
147+
}
146148
break;
147149
}
148150
}

0 commit comments

Comments
 (0)