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>
Этот коммит содержится в:
родитель
a056fdea2d
Коммит
0c686f01e5
@ -1,5 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2016-2018 Intel, Inc. All rights reserved.
|
* Copyright (c) 2016-2018 Intel, Inc. All rights reserved.
|
||||||
|
* Copyright (c) 2018 Research Organization for Information Science
|
||||||
|
* and Technology (RIST). All rights reserved.
|
||||||
* $COPYRIGHT$
|
* $COPYRIGHT$
|
||||||
*
|
*
|
||||||
* Additional copyrights may follow
|
* Additional copyrights may follow
|
||||||
@ -33,6 +35,7 @@
|
|||||||
|
|
||||||
static int nidmap_create(opal_pointer_array_t *pool, char **regex);
|
static int nidmap_create(opal_pointer_array_t *pool, char **regex);
|
||||||
static int nidmap_parse(char *regex);
|
static int nidmap_parse(char *regex);
|
||||||
|
static int extract_node_names(char *regex, char ***node_names);
|
||||||
static int encode_nodemap(opal_buffer_t *buffer);
|
static int encode_nodemap(opal_buffer_t *buffer);
|
||||||
static int decode_daemon_nodemap(opal_buffer_t *buffer);
|
static int decode_daemon_nodemap(opal_buffer_t *buffer);
|
||||||
static int generate_ppn(orte_job_t *jdata, char **ppn);
|
static int generate_ppn(orte_job_t *jdata, char **ppn);
|
||||||
@ -41,6 +44,7 @@ static int parse_ppn(orte_job_t *jdata, char *ppn);
|
|||||||
orte_regx_base_module_t orte_regx_fwd_module = {
|
orte_regx_base_module_t orte_regx_fwd_module = {
|
||||||
.nidmap_create = nidmap_create,
|
.nidmap_create = nidmap_create,
|
||||||
.nidmap_parse = nidmap_parse,
|
.nidmap_parse = nidmap_parse,
|
||||||
|
.extract_node_names = extract_node_names,
|
||||||
.encode_nodemap = encode_nodemap,
|
.encode_nodemap = encode_nodemap,
|
||||||
.decode_daemon_nodemap = decode_daemon_nodemap,
|
.decode_daemon_nodemap = decode_daemon_nodemap,
|
||||||
.generate_ppn = generate_ppn,
|
.generate_ppn = generate_ppn,
|
||||||
@ -98,7 +102,6 @@ OBJ_CLASS_INSTANCE(orte_regex_node_t,
|
|||||||
opal_list_item_t,
|
opal_list_item_t,
|
||||||
orte_regex_node_construct,
|
orte_regex_node_construct,
|
||||||
orte_regex_node_destruct);
|
orte_regex_node_destruct);
|
||||||
static int extract_node_names(char *regexp, char ***names);
|
|
||||||
|
|
||||||
static int nidmap_create(opal_pointer_array_t *pool, char **regex)
|
static int nidmap_create(opal_pointer_array_t *pool, char **regex)
|
||||||
{
|
{
|
||||||
|
@ -3,6 +3,8 @@
|
|||||||
* Copyright (c) 2015-2018 Intel, Inc. All rights reserved.
|
* Copyright (c) 2015-2018 Intel, Inc. All rights reserved.
|
||||||
* Copyright (c) 2015 Los Alamos National Security, LLC. All rights
|
* Copyright (c) 2015 Los Alamos National Security, LLC. All rights
|
||||||
* reserved.
|
* reserved.
|
||||||
|
* Copyright (c) 2018 Research Organization for Information Science
|
||||||
|
* and Technology (RIST). All rights reserved.
|
||||||
* $COPYRIGHT$
|
* $COPYRIGHT$
|
||||||
*
|
*
|
||||||
* Additional copyrights may follow
|
* Additional copyrights may follow
|
||||||
@ -59,6 +61,7 @@ typedef int (*orte_regx_base_module_init_fn_t)(void);
|
|||||||
|
|
||||||
typedef int (*orte_regx_base_module_nidmap_create_fn_t)(opal_pointer_array_t *pool, char **regex);
|
typedef int (*orte_regx_base_module_nidmap_create_fn_t)(opal_pointer_array_t *pool, char **regex);
|
||||||
typedef int (*orte_regx_base_module_nidmap_parse_fn_t)(char *regex);
|
typedef int (*orte_regx_base_module_nidmap_parse_fn_t)(char *regex);
|
||||||
|
typedef int (*orte_regx_base_module_extract_node_names_fn_t)(char *regexp, char ***names);
|
||||||
|
|
||||||
/* create a regular expression describing the nodes in the
|
/* create a regular expression describing the nodes in the
|
||||||
* allocation */
|
* allocation */
|
||||||
@ -87,6 +90,7 @@ typedef struct {
|
|||||||
orte_regx_base_module_init_fn_t init;
|
orte_regx_base_module_init_fn_t init;
|
||||||
orte_regx_base_module_nidmap_create_fn_t nidmap_create;
|
orte_regx_base_module_nidmap_create_fn_t nidmap_create;
|
||||||
orte_regx_base_module_nidmap_parse_fn_t nidmap_parse;
|
orte_regx_base_module_nidmap_parse_fn_t nidmap_parse;
|
||||||
|
orte_regx_base_module_extract_node_names_fn_t extract_node_names;
|
||||||
orte_regx_base_module_encode_nodemap_fn_t encode_nodemap;
|
orte_regx_base_module_encode_nodemap_fn_t encode_nodemap;
|
||||||
orte_regx_base_module_decode_daemon_nodemap_fn_t decode_daemon_nodemap;
|
orte_regx_base_module_decode_daemon_nodemap_fn_t decode_daemon_nodemap;
|
||||||
orte_regx_base_module_build_daemon_nidmap_fn_t build_daemon_nidmap;
|
orte_regx_base_module_build_daemon_nidmap_fn_t build_daemon_nidmap;
|
||||||
|
Загрузка…
Ссылка в новой задаче
Block a user