root/orte/mca/rml/base/rml_base_contact.c

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

DEFINITIONS

This source file includes following definitions.
  1. orte_rml_base_parse_uris

   1 /*
   2  * Copyright (c) 2004-2007 The Trustees of Indiana University and Indiana
   3  *                         University Research and Technology
   4  *                         Corporation.  All rights reserved.
   5  * Copyright (c) 2004-2011 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) 2016-2017 Intel, Inc. All rights reserved.
  13  * $COPYRIGHT$
  14  *
  15  * Additional copyrights may follow
  16  *
  17  * $HEADER$
  18  */
  19 /** @file */
  20 
  21 #include "orte_config.h"
  22 #include "orte/constants.h"
  23 #include "orte/types.h"
  24 
  25 #include "opal/util/argv.h"
  26 #include "opal/util/output.h"
  27 
  28 #include "opal/dss/dss.h"
  29 #include "orte/mca/errmgr/errmgr.h"
  30 #include "orte/mca/routed/routed.h"
  31 #include "orte/util/name_fns.h"
  32 #include "orte/util/proc_info.h"
  33 #include "orte/runtime/orte_globals.h"
  34 
  35 #include "orte/mca/rml/rml.h"
  36 #include "orte/mca/rml/base/rml_contact.h"
  37 #include "orte/mca/rml/base/base.h"
  38 
  39 
  40 int orte_rml_base_parse_uris(const char* uri,
  41                              orte_process_name_t* peer,
  42                              char*** uris)
  43 {
  44     int rc;
  45 
  46     /* parse the process name */
  47     char* cinfo = strdup(uri);
  48     char* ptr = strchr(cinfo, ';');
  49     if(NULL == ptr) {
  50         ORTE_ERROR_LOG(ORTE_ERR_BAD_PARAM);
  51         free(cinfo);
  52         return ORTE_ERR_BAD_PARAM;
  53     }
  54     *ptr = '\0';
  55     ptr++;
  56     if (ORTE_SUCCESS != (rc = orte_util_convert_string_to_process_name(peer, cinfo))) {
  57         ORTE_ERROR_LOG(rc);
  58         free(cinfo);
  59         return rc;
  60     }
  61 
  62     if (NULL != uris) {
  63         /* parse the remainder of the string into an array of uris */
  64         *uris = opal_argv_split(ptr, ';');
  65     }
  66     free(cinfo);
  67     return ORTE_SUCCESS;
  68 }

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