1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ 2 /* 3 * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana 4 * University Research and Technology 5 * Corporation. All rights reserved. 6 * Copyright (c) 2004-2018 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-2015 Los Alamos National Security, LLC. All rights 14 * reserved. 15 * Copyright (c) 2006-2015 Cisco Systems, Inc. All rights reserved. 16 * Copyright (c) 2013 NVIDIA Corporation. All rights reserved. 17 * Copyright (c) 2013 Intel, Inc. All rights reserved 18 * $COPYRIGHT$ 19 * 20 * Additional copyrights may follow 21 * 22 * $HEADER$ 23 */ 24 25 #ifndef OMPI_RUNTIME_PARAMS_H 26 #define OMPI_RUNTIME_PARAMS_H 27 28 #include "ompi_config.h" 29 30 BEGIN_C_DECLS 31 32 /* 33 * Global variables 34 */ 35 36 /** 37 * Whether or not to check the parameters of top-level MPI API 38 * functions or not. 39 * 40 * This variable should never be checked directly; the macro 41 * MPI_PARAM_CHECK should be used instead. This allows multiple 42 * levels of MPI function parameter checking: 43 * 44 * #- Disable all parameter checking at configure/compile time 45 * #- Enable all parameter checking at configure/compile time 46 * #- Disable all parameter checking at run time 47 * #- Enable all parameter checking at run time 48 * 49 * Hence, the MPI_PARAM_CHECK macro will either be "0", "1", or 50 * "ompi_mpi_param_check". 51 */ 52 OMPI_DECLSPEC extern bool ompi_mpi_param_check; 53 54 /** 55 * Whether or not to check for MPI handle leaks during MPI_FINALIZE. 56 * If enabled, each MPI handle type will display a summary of the 57 * handles that are still allocated during MPI_FINALIZE. 58 * 59 * This is good debugging for user applications to find out if they 60 * are inadvertantly orphaning MPI handles. 61 */ 62 OMPI_DECLSPEC extern bool ompi_debug_show_handle_leaks; 63 64 /** 65 * If > 0, show that many MPI_ALLOC_MEM leaks during MPI_FINALIZE. If 66 * enabled, memory that was returned via MPI_ALLOC_MEM but was never 67 * freed via MPI_FREE_MEM will be displayed during MPI_FINALIZE. 68 * 69 * This is good debugging for user applications to find out if they 70 * are inadvertantly orphaning MPI "special" memory. 71 */ 72 OMPI_DECLSPEC extern int ompi_debug_show_mpi_alloc_mem_leaks; 73 74 /** 75 * Whether or not to actually free MPI handles when their 76 * corresponding destructor is invoked. If enabled, Open MPI will not 77 * free handles, but will rather simply mark them as "freed". Any 78 * attempt to use them will result in an MPI exception. 79 * 80 * This is good debugging for user applications to find out if they 81 * are inadvertantly using MPI handles after they have been freed. 82 */ 83 OMPI_DECLSPEC extern bool ompi_debug_no_free_handles; 84 85 /** 86 * Whether or not to print MCA parameters on MPI_INIT 87 * 88 * This is good debugging for user applications to see exactly which 89 * MCA parameters are being used in the current program execution. 90 */ 91 OMPI_DECLSPEC extern bool ompi_mpi_show_mca_params; 92 93 /** 94 * Whether or not to print the MCA parameters to a file or to stdout 95 * 96 * If this argument is set then it is used when parameters are dumped 97 * when the mpi_show_mca_params is set. 98 */ 99 OMPI_DECLSPEC extern char * ompi_mpi_show_mca_params_file; 100 101 /** 102 * Whether an MPI_ABORT should print out a stack trace or not. 103 */ 104 OMPI_DECLSPEC extern bool ompi_mpi_abort_print_stack; 105 106 /** 107 * Whether MPI_ABORT should print out an identifying message 108 * (e.g., hostname and PID) and loop waiting for a debugger to 109 * attach. The value of the integer is how many seconds to wait: 110 * 111 * 0 = do not print the message and do not loop 112 * negative value = print the message and loop forever 113 * positive value = print the message and delay for that many seconds 114 */ 115 OMPI_DECLSPEC extern int ompi_mpi_abort_delay; 116 117 /** 118 * Whether sparse MPI group storage formats are supported or not. 119 */ 120 OMPI_DECLSPEC extern bool ompi_have_sparse_group_storage; 121 122 /** 123 * Whether sparse MPI group storage formats should be used or not. 124 */ 125 OMPI_DECLSPEC extern bool ompi_use_sparse_group_storage; 126 127 /** 128 * Cutoff point for calling add_procs for all processes 129 */ 130 OMPI_DECLSPEC extern uint32_t ompi_add_procs_cutoff; 131 132 /** 133 * Whether anything in the code base has disabled MPI dynamic process 134 * functionality or not 135 */ 136 OMPI_DECLSPEC extern bool ompi_mpi_dynamics_enabled; 137 138 /* EXPERIMENTAL: do not perform an RTE barrier at the end of MPI_Init */ 139 OMPI_DECLSPEC extern bool ompi_async_mpi_init; 140 141 /* EXPERIMENTAL: do not perform an RTE barrier at the beginning of MPI_Finalize */ 142 OMPI_DECLSPEC extern bool ompi_async_mpi_finalize; 143 144 /** 145 * A comma delimited list of SPC counters to turn on or 'attach'. To turn 146 * all counters on, the string can be simply "all". An empty string will 147 * keep all counters turned off. 148 */ 149 OMPI_DECLSPEC extern char * ompi_mpi_spc_attach_string; 150 151 /** 152 * A boolean value that determines whether or not to dump the SPC counter 153 * values in MPI_Finalize. A value of true dumps the counters and false does not. 154 */ 155 OMPI_DECLSPEC extern bool ompi_mpi_spc_dump_enabled; 156 157 158 /** 159 * Register MCA parameters used by the MPI layer. 160 * 161 * @returns OMPI_SUCCESS 162 * 163 * Registers several MCA parameters and initializes corresponding 164 * global variables to the values obtained from the MCA system. 165 */ 166 OMPI_DECLSPEC int ompi_mpi_register_params(void); 167 168 /** 169 * Display all MCA parameters used 170 * 171 * @returns OMPI_SUCCESS 172 * 173 * Displays in key = value format 174 */ 175 int ompi_show_all_mca_params(int32_t, int, char *); 176 177 END_C_DECLS 178 179 #endif /* OMPI_RUNTIME_PARAMS_H */