root/opal/mca/btl/sm/btl_sm_component.c

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

DEFINITIONS

This source file includes following definitions.
  1. mca_btl_sm_component_register

   1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
   2 /*
   3  * Copyright (c) 2004-2011 The Trustees of Indiana University and Indiana
   4  *                         University Research and Technology
   5  *                         Corporation.  All rights reserved.
   6  * Copyright (c) 2004-2009 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) 2006-2007 Voltaire. All rights reserved.
  14  * Copyright (c) 2009-2018 Cisco Systems, Inc.  All rights reserved
  15  * Copyright (c) 2010-2015 Los Alamos National Security, LLC.
  16  *                         All rights reserved.
  17  * Copyright (c) 2011-2014 NVIDIA Corporation.  All rights reserved.
  18  * Copyright (c) 2010-2017 IBM Corporation.  All rights reserved.
  19  * Copyright (c) 2014-2016 Intel, Inc. All rights reserved.
  20  * Copyright (c) 2014-2017 Research Organization for Information Science
  21  *                         and Technology (RIST). All rights reserved.
  22  * $COPYRIGHT$
  23  *
  24  * Additional copyrights may follow
  25  *
  26  * $HEADER$
  27  */
  28 #include "opal_config.h"
  29 
  30 #include <string.h>
  31 
  32 #include "opal/mca/btl/btl.h"
  33 #include "opal/mca/btl/base/base.h"
  34 #include "opal/util/output.h"
  35 #include "opal/util/show_help.h"
  36 #include "opal/util/argv.h"
  37 #include "opal/constants.h"
  38 
  39 static int mca_btl_sm_component_register(void);
  40 
  41 /*
  42  * The "sm" BTL has been completely replaced by the "vader" BTL.
  43  *
  44  * The only purpose for this component is to print a show_help message
  45  * to inform the user that they should be using the vader BTL.
  46  */
  47 mca_btl_base_component_3_0_0_t mca_btl_sm_component = {
  48     /* First, the mca_base_component_t struct containing meta information
  49        about the component itself */
  50     .btl_version = {
  51         MCA_BTL_DEFAULT_VERSION("sm"),
  52         .mca_register_component_params = mca_btl_sm_component_register,
  53     },
  54     .btl_data = {
  55         /* The component is checkpoint ready */
  56         .param_field = MCA_BASE_METADATA_PARAM_CHECKPOINT
  57     }
  58 };
  59 
  60 
  61 static int mca_btl_sm_component_register(void)
  62 {
  63     // If the sm component was explicitly requested, print a show_help
  64     // message and return an error (which will cause the process to
  65     // abort).
  66     if (NULL != opal_btl_base_framework.framework_selection) {
  67         char **names;
  68         names = opal_argv_split(opal_btl_base_framework.framework_selection,
  69                                 ',');
  70         if (NULL != names) {
  71             for (int i = 0; NULL != names[i]; ++i) {
  72                 if (strcmp(names[i], "sm") == 0) {
  73                     opal_show_help("help-mpi-btl-sm.txt", "btl sm is dead",
  74                                    true);
  75                     opal_argv_free(names);
  76                     return OPAL_ERROR;
  77                 }
  78             }
  79         }
  80 
  81         opal_argv_free(names);
  82     }
  83 
  84     // Tell the framework that we don't want this component to be
  85     // considered.
  86     return OPAL_ERR_NOT_AVAILABLE;
  87 }

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