Skip to content

Commit 852b3c3

Browse files
ggouaillardetScott Miller
authored andcommitted
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 <[email protected]> (cherry picked from commit 0c686f0)
1 parent 31ae3ea commit 852b3c3

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

orte/mca/regx/fwd/regx_fwd.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
/*
22
* Copyright (c) 2016-2018 Intel, Inc. All rights reserved.
3+
* Copyright (c) 2018 Research Organization for Information Science
4+
* and Technology (RIST). All rights reserved.
35
* $COPYRIGHT$
46
*
57
* Additional copyrights may follow
@@ -33,6 +35,7 @@
3335

3436
static int nidmap_create(opal_pointer_array_t *pool, char **regex);
3537
static int nidmap_parse(char *regex);
38+
static int extract_node_names(char *regex, char ***node_names);
3639
static int encode_nodemap(opal_buffer_t *buffer);
3740
static int decode_daemon_nodemap(opal_buffer_t *buffer);
3841
static int generate_ppn(orte_job_t *jdata, char **ppn);
@@ -41,6 +44,7 @@ static int parse_ppn(orte_job_t *jdata, char *ppn);
4144
orte_regx_base_module_t orte_regx_fwd_module = {
4245
.nidmap_create = nidmap_create,
4346
.nidmap_parse = nidmap_parse,
47+
.extract_node_names = extract_node_names,
4448
.encode_nodemap = encode_nodemap,
4549
.decode_daemon_nodemap = decode_daemon_nodemap,
4650
.generate_ppn = generate_ppn,
@@ -98,7 +102,6 @@ OBJ_CLASS_INSTANCE(orte_regex_node_t,
98102
opal_list_item_t,
99103
orte_regex_node_construct,
100104
orte_regex_node_destruct);
101-
static int extract_node_names(char *regexp, char ***names);
102105

103106
static int nidmap_create(opal_pointer_array_t *pool, char **regex)
104107
{

orte/mca/regx/regx.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
* Copyright (c) 2015-2018 Intel, Inc. All rights reserved.
44
* Copyright (c) 2015 Los Alamos National Security, LLC. All rights
55
* reserved.
6+
* Copyright (c) 2018 Research Organization for Information Science
7+
* and Technology (RIST). All rights reserved.
68
* $COPYRIGHT$
79
*
810
* Additional copyrights may follow
@@ -59,6 +61,7 @@ typedef int (*orte_regx_base_module_init_fn_t)(void);
5961

6062
typedef int (*orte_regx_base_module_nidmap_create_fn_t)(opal_pointer_array_t *pool, char **regex);
6163
typedef int (*orte_regx_base_module_nidmap_parse_fn_t)(char *regex);
64+
typedef int (*orte_regx_base_module_extract_node_names_fn_t)(char *regexp, char ***names);
6265

6366
/* create a regular expression describing the nodes in the
6467
* allocation */
@@ -87,6 +90,7 @@ typedef struct {
8790
orte_regx_base_module_init_fn_t init;
8891
orte_regx_base_module_nidmap_create_fn_t nidmap_create;
8992
orte_regx_base_module_nidmap_parse_fn_t nidmap_parse;
93+
orte_regx_base_module_extract_node_names_fn_t extract_node_names;
9094
orte_regx_base_module_encode_nodemap_fn_t encode_nodemap;
9195
orte_regx_base_module_decode_daemon_nodemap_fn_t decode_daemon_nodemap;
9296
orte_regx_base_module_build_daemon_nidmap_fn_t build_daemon_nidmap;

0 commit comments

Comments
 (0)