root/orte/mca/routed/direct/routed_direct_component.c

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

DEFINITIONS

This source file includes following definitions.
  1. orte_routed_direct_component_query

   1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
   2 /*
   3  * Copyright (c) 2007-2015 Los Alamos National Security, LLC.
   4  *                         All rights reserved.
   5  * Copyright (c) 2004-2008 The Trustees of Indiana University.
   6  *                         All rights reserved.
   7  * Copyright (c) 2015-2016 Intel, Inc.  All rights reserved.
   8  * $COPYRIGHT$
   9  *
  10  * Additional copyrights may follow
  11  *
  12  * $HEADER$
  13  */
  14 
  15 #include "orte_config.h"
  16 #include "orte/constants.h"
  17 
  18 #include "opal/mca/base/base.h"
  19 
  20 #include "orte/runtime/orte_globals.h"
  21 #include "orte/util/proc_info.h"
  22 
  23 #include "orte/mca/routed/base/base.h"
  24 #include "routed_direct.h"
  25 
  26 static int orte_routed_direct_component_query(mca_base_module_t **module, int *priority);
  27 
  28 /**
  29  * component definition
  30  */
  31 orte_routed_component_t mca_routed_direct_component = {
  32       /* First, the mca_base_component_t struct containing meta
  33          information about the component itself */
  34 
  35     .base_version = {
  36         ORTE_ROUTED_BASE_VERSION_3_0_0,
  37 
  38         .mca_component_name = "direct",
  39         MCA_BASE_MAKE_VERSION(component, ORTE_MAJOR_VERSION, ORTE_MINOR_VERSION,
  40                               ORTE_RELEASE_VERSION),
  41         .mca_query_component = orte_routed_direct_component_query
  42     },
  43     .base_data = {
  44         /* This component can be checkpointed */
  45         MCA_BASE_METADATA_PARAM_CHECKPOINT
  46     },
  47 };
  48 
  49 static int orte_routed_direct_component_query(mca_base_module_t **module, int *priority)
  50 {
  51     /* if we are an app and no daemon URI has been provided, or
  52      * we are a singleton, then we must be chosen */
  53     if (ORTE_PROC_IS_APP && NULL == orte_process_info.my_daemon_uri) {
  54         /* we are direct launched, so set some arbitrary value
  55          * for the daemon name */
  56         ORTE_PROC_MY_DAEMON->jobid = 0;
  57         ORTE_PROC_MY_DAEMON->vpid = 0;
  58         *priority = 100;
  59     } else if (ORTE_PROC_IS_SINGLETON) {
  60         *priority = 100;
  61     } else {
  62         /* allow selection only when specifically requested */
  63         *priority = 0;
  64     }
  65     *module = (mca_base_module_t *) &orte_routed_direct_module;
  66     return ORTE_SUCCESS;
  67 }

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