root/opal/mca/pmix/pmix4x/pmix/src/mca/preg/base/preg_base_stubs.c

/* [<][>][^][v][top][bottom][index][help] */

DEFINITIONS

This source file includes following definitions.
  1. pmix_preg_base_generate_node_regex
  2. pmix_preg_base_generate_ppn
  3. pmix_preg_base_parse_nodes
  4. pmix_preg_base_parse_procs
  5. pmix_preg_base_resolve_peers
  6. pmix_preg_base_resolve_nodes

   1 /*
   2  * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
   3  *                         University Research and Technology
   4  *                         Corporation.  All rights reserved.
   5  * Copyright (c) 2004-2006 The University of Tennessee and The University
   6  *                         of Tennessee Research Foundation.  All rights
   7  *                         reserved.
   8  * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
   9  *                         University of Stuttgart.  All rights reserved.
  10  * Copyright (c) 2004-2005 The Regents of the University of California.
  11  *                         All rights reserved.
  12  * Copyright (c) 2015-2017 Intel, Inc. All rights reserved.
  13  * $COPYRIGHT$
  14  *
  15  * Additional copyrights may follow
  16  *
  17  * $HEADER$
  18  */
  19 
  20 #include <src/include/pmix_config.h>
  21 
  22 #include <stdio.h>
  23 #ifdef HAVE_UNISTD_H
  24 #include <unistd.h>
  25 #endif
  26 
  27 #include "src/util/argv.h"
  28 #include "src/util/error.h"
  29 #include "src/include/pmix_globals.h"
  30 
  31 #include "src/mca/preg/base/base.h"
  32 
  33 pmix_status_t pmix_preg_base_generate_node_regex(const char *input,
  34                                                  char **regex)
  35 {
  36     pmix_preg_base_active_module_t *active;
  37 
  38     PMIX_LIST_FOREACH(active, &pmix_preg_globals.actives, pmix_preg_base_active_module_t) {
  39         if (NULL != active->module->generate_node_regex) {
  40             if (PMIX_SUCCESS == active->module->generate_node_regex(input, regex)) {
  41                 return PMIX_SUCCESS;
  42             }
  43         }
  44     }
  45 
  46     return PMIX_ERR_NOT_SUPPORTED;
  47 }
  48 
  49 pmix_status_t pmix_preg_base_generate_ppn(const char *input,
  50                                           char **ppn)
  51 {
  52     pmix_preg_base_active_module_t *active;
  53 
  54     PMIX_LIST_FOREACH(active, &pmix_preg_globals.actives, pmix_preg_base_active_module_t) {
  55         if (NULL != active->module->generate_ppn) {
  56             if (PMIX_SUCCESS == active->module->generate_ppn(input, ppn)) {
  57                 return PMIX_SUCCESS;
  58             }
  59         }
  60     }
  61 
  62     return PMIX_ERR_NOT_SUPPORTED;
  63 }
  64 
  65 pmix_status_t pmix_preg_base_parse_nodes(const char *regexp,
  66                                          char ***names)
  67 {
  68     pmix_preg_base_active_module_t *active;
  69 
  70     PMIX_LIST_FOREACH(active, &pmix_preg_globals.actives, pmix_preg_base_active_module_t) {
  71         if (NULL != active->module->parse_nodes) {
  72             if (PMIX_SUCCESS == active->module->parse_nodes(regexp, names)) {
  73                 return PMIX_SUCCESS;
  74             }
  75         }
  76     }
  77 
  78     return PMIX_ERR_NOT_SUPPORTED;
  79 }
  80 
  81 pmix_status_t pmix_preg_base_parse_procs(const char *regexp,
  82                                          char ***procs)
  83 {
  84     pmix_preg_base_active_module_t *active;
  85 
  86     PMIX_LIST_FOREACH(active, &pmix_preg_globals.actives, pmix_preg_base_active_module_t) {
  87         if (NULL != active->module->parse_procs) {
  88             if (PMIX_SUCCESS == active->module->parse_procs(regexp, procs)) {
  89                 return PMIX_SUCCESS;
  90             }
  91         }
  92     }
  93 
  94     return PMIX_ERR_NOT_SUPPORTED;
  95 }
  96 
  97 pmix_status_t pmix_preg_base_resolve_peers(const char *nodename,
  98                                            const char *nspace,
  99                                            pmix_proc_t **procs, size_t *nprocs)
 100 {
 101     pmix_preg_base_active_module_t *active;
 102 
 103     PMIX_LIST_FOREACH(active, &pmix_preg_globals.actives, pmix_preg_base_active_module_t) {
 104         if (NULL != active->module->resolve_peers) {
 105             if (PMIX_SUCCESS == active->module->resolve_peers(nodename, nspace, procs, nprocs)) {
 106                 return PMIX_SUCCESS;
 107             }
 108         }
 109     }
 110 
 111     return PMIX_ERR_NOT_SUPPORTED;
 112 }
 113 
 114 pmix_status_t pmix_preg_base_resolve_nodes(const char *nspace,
 115                                            char **nodelist)
 116 {
 117     pmix_preg_base_active_module_t *active;
 118 
 119     PMIX_LIST_FOREACH(active, &pmix_preg_globals.actives, pmix_preg_base_active_module_t) {
 120         if (NULL != active->module->resolve_nodes) {
 121             if (PMIX_SUCCESS == active->module->resolve_nodes(nspace, nodelist)) {
 122                 return PMIX_SUCCESS;
 123             }
 124         }
 125     }
 126 
 127     return PMIX_ERR_NOT_SUPPORTED;
 128 }

/* [<][>][^][v][top][bottom][index][help] */