1
1
Граф коммитов

10 Коммитов

Автор SHA1 Сообщение Дата
Scott Miller
1b0cfdf264 v4.0.x: regx/naive: add regx/naive component
Signed-off-by: Scott Miller <scott.miller1@ibm.com>
2019-08-26 11:37:07 -04:00
perrynzhou
5acaf006ae regx/base: fix an integer overflow
use strtol() instead of atoi() in order to handle hostnames
containing a large number.

This is a one-off commit for the release branches since
the regx framework has already been removed from master.

Refs. open-mpi/ompi#6729

Signed-off-by: perrynzhou <perrynzhou@gmail.com>
2019-06-06 14:37:33 +09:00
Boris Karasev
87c90866cb regx: fixed the order of hosts for ranges with different prefixes
Example:
For the list of hosts `a01,b00,a00` a regex is generated:
`a[2:1.0],b[2:0]`, where `a`-hosts prefixes moved to the begining,
it breaks the hosts ordering.
This commit fixes regex for that case to `a[2:1],b[2:0],a[2:0]`

Signed-off-by: Boris Karasev <karasev.b@gmail.com>
(cherry picked from commit 46e38b9193)
2019-02-11 12:06:49 +02:00
Boris Karasev
62044da5d9 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>
(cherry picked from commit 1967e41a71)
2019-02-11 12:06:34 +02:00
Ralph Castain
7a818a26a9 Whitespace cleanup
Signed-off-by: Ralph Castain <rhc@open-mpi.org>
2018-01-12 10:32:49 -08:00
Gilles Gouaillardet
4130c93976 regx/reverse: add the reverse component
Search for the digits to be compressed from the end of the node names.

For example, if the nodelist is c712f6n01,c712f6n02,c712f6n03
the regx/fwd component generates c[3:712]f6n01,c[3:712]f6n02,c[3:712]f6n03@(3)
when the regx/reverse component generates c712f6n[2:1-3]@0(3) which is
a better fit here.

Josh Hursey authored the changes and must be credited.

Signed-off-by: Gilles Gouaillardet <gilles@rist.or.jp>
2018-01-12 11:45:49 +09:00
Gilles Gouaillardet
c2a358ff45 regx: move most functions from the fwd component to base
Signed-off-by: Gilles Gouaillardet <gilles@rist.or.jp>
2018-01-12 11:45:48 +09:00
Gilles Gouaillardet
0c686f01e5 regx: add the extract_node_names callback
typedef int (*orte_regx_base_module_extract_node_names_fn_t)(char *regexp, char ***names);

among other things, that will make testing way easier.

Signed-off-by: Gilles Gouaillardet <gilles@rist.or.jp>
2018-01-12 10:58:41 +09:00
Gilles Gouaillardet
a056fdea2d regx/fwd: correctly handle node names with multiple set of digits
Refs. open-mpi/ompi#4689

Signed-off-by: Gilles Gouaillardet <gilles@rist.or.jp>
2018-01-12 10:58:36 +09:00
Ralph Castain
4cd7f3b202 Convert nidmap to regx framework
Handle the need for different regex generator/parsers by moving the
orte/util/nidmap and orte/util/regex code into a new "regx" framework.
Use the original code to complete a "fwd" component, and create a
scaffold for IBM's "reverse" component.

Signed-off-by: Ralph Castain <rhc@open-mpi.org>
2018-01-10 20:28:21 -08:00