1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ 2 /* 3 * Copyright (c) 2004-2008 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) 2015 Los Alamos National Security, LLC. All rights 14 * reserved. 15 * Copyright (c) 2017 Intel, Inc. All rights reserved. 16 * $COPYRIGHT$ 17 * 18 * Additional copyrights may follow 19 * 20 * $HEADER$ 21 * 22 * These symbols are in a file by themselves to provide nice linker 23 * semantics. Since linkers generally pull in symbols by object 24 * files, keeping these symbols as the only symbols in this file 25 * prevents utility programs such as "ompi_info" from having to import 26 * entire components just to query their version and parameters. 27 */ 28 29 #include "orte_config.h" 30 #include "orte/constants.h" 31 32 #include <stdlib.h> 33 #ifdef HAVE_UNISTD_H 34 #include <unistd.h> 35 #endif 36 #include <ctype.h> 37 38 #include "orte/mca/mca.h" 39 #include "opal/mca/base/base.h" 40 41 #include "orte/mca/odls/odls.h" 42 #include "orte/mca/odls/base/odls_private.h" 43 #include "orte/mca/odls/default/odls_default.h" 44 45 /* 46 * Instantiate the public struct with all of our public information 47 * and pointers to our public functions in it 48 */ 49 50 orte_odls_base_component_t mca_odls_default_component = { 51 /* First, the mca_component_t struct containing meta information 52 about the component itself */ 53 .version = { 54 ORTE_ODLS_BASE_VERSION_2_0_0, 55 /* Component name and version */ 56 .mca_component_name = "default", 57 MCA_BASE_MAKE_VERSION(component, ORTE_MAJOR_VERSION, ORTE_MINOR_VERSION, 58 ORTE_RELEASE_VERSION), 59 60 /* Component open and close functions */ 61 .mca_open_component = orte_odls_default_component_open, 62 .mca_close_component = orte_odls_default_component_close, 63 .mca_query_component = orte_odls_default_component_query, 64 }, 65 .base_data = { 66 /* The component is checkpoint ready */ 67 MCA_BASE_METADATA_PARAM_CHECKPOINT 68 }, 69 }; 70 71 72 73 int orte_odls_default_component_open(void) 74 { 75 return ORTE_SUCCESS; 76 } 77 78 int orte_odls_default_component_query(mca_base_module_t **module, int *priority) 79 { 80 /* the base open/select logic protects us against operation when 81 * we are NOT in a daemon, so we don't have to check that here 82 */ 83 84 /* we have built some logic into the configure.m4 file that checks 85 * to see if we have "fork" support and only builds this component 86 * if we do. Hence, we only get here if we CAN build - in which 87 * case, we definitely should be considered for selection 88 */ 89 *priority = 10; /* let others override us - we are the default */ 90 *module = (mca_base_module_t *) &orte_odls_default_module; 91 return ORTE_SUCCESS; 92 } 93 94 95 int orte_odls_default_component_close(void) 96 { 97 return ORTE_SUCCESS; 98 }