root/orte/mca/iof/tool/iof_tool_component.c

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

DEFINITIONS

This source file includes following definitions.
  1. orte_iof_tool_open
  2. orte_iof_tool_close
  3. orte_iof_tool_query

   1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
   2 /*
   3  * Copyright (c) 2004-2007 The Trustees of Indiana University and Indiana
   4  *                         University Research and Technology
   5  *                         Corporation.  All rights reserved.
   6  * Copyright (c) 2004-2006 The University of Tennessee and The University
   7  *                         of Tennessee Research Foundation.  All rights
   8  *                         reserved.
   9  * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
  10  *                         University of Stuttgart.  All rights reserved.
  11  * Copyright (c) 2004-2005 The Regents of the University of California.
  12  *                         All rights reserved.
  13  * Copyright (c) 2007      Cisco Systems, Inc.  All rights reserved.
  14  * Copyright (c) 2015      Los Alamos National Security, LLC. All rights
  15  *                         reserved.
  16  * Copyright (c) 2018      Intel, Inc. All rights reserved.
  17  * $COPYRIGHT$
  18  *
  19  * Additional copyrights may follow
  20  *
  21  * $HEADER$
  22  */
  23 
  24 #include "orte_config.h"
  25 
  26 #include "opal/mca/base/base.h"
  27 
  28 #include "orte/mca/rml/rml.h"
  29 #include "orte/mca/rml/rml_types.h"
  30 #include "orte/util/proc_info.h"
  31 #include "orte/mca/errmgr/errmgr.h"
  32 #include "orte/runtime/orte_globals.h"
  33 
  34 #include "iof_tool.h"
  35 
  36 /*
  37  * Local functions
  38  */
  39 static int orte_iof_tool_open(void);
  40 static int orte_iof_tool_close(void);
  41 static int orte_iof_tool_query(mca_base_module_t **module, int *priority);
  42 
  43 
  44 /*
  45  * Public string showing the iof tool component version number
  46  */
  47 const char *mca_iof_tool_component_version_string =
  48 "Open MPI tool iof MCA component version " ORTE_VERSION;
  49 
  50 
  51 orte_iof_tool_component_t mca_iof_tool_component = {
  52     {
  53         .iof_version = {
  54             ORTE_IOF_BASE_VERSION_2_0_0,
  55 
  56             .mca_component_name = "tool",
  57             MCA_BASE_MAKE_VERSION(component, ORTE_MAJOR_VERSION, ORTE_MINOR_VERSION,
  58                                   ORTE_RELEASE_VERSION),
  59 
  60             /* Component open, close, and query functions */
  61             .mca_open_component = orte_iof_tool_open,
  62             .mca_close_component = orte_iof_tool_close,
  63             .mca_query_component = orte_iof_tool_query,
  64         },
  65         .iof_data = {
  66             /* The component is checkpoint ready */
  67             MCA_BASE_METADATA_PARAM_CHECKPOINT
  68         },
  69     }
  70 };
  71 
  72 /**
  73   * component open/close/init function
  74   */
  75 static int orte_iof_tool_open(void)
  76 {
  77     /* Nothing to do */
  78     return ORTE_SUCCESS;
  79 }
  80 
  81 static int orte_iof_tool_close(void)
  82 {
  83     return ORTE_SUCCESS;
  84 }
  85 
  86 
  87 static int orte_iof_tool_query(mca_base_module_t **module, int *priority)
  88 {
  89     /* if we are not a tool, then don't use this module */
  90     if (!ORTE_PROC_IS_TOOL) {
  91         *module = NULL;
  92         *priority = -1;
  93         return ORTE_ERROR;
  94     }
  95 
  96     *priority = 100;
  97     *module = (mca_base_module_t *) &orte_iof_tool_module;
  98 
  99     return ORTE_SUCCESS;
 100 }

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