552216f9ba
Passed the below set of symbols into a script that added ompi_ to them all. Note that if processing a symbol named "foo" the script turns foo into ompi_foo but doesn't turn foobar into ompi_foobar But beyond that the script is blind to C syntax, so it hits strings and comments etc as well as vars/functions. coll_base_comm_get_reqs comm_allgather_pml comm_allreduce_pml comm_bcast_pml fcoll_base_coll_allgather_array fcoll_base_coll_allgatherv_array fcoll_base_coll_bcast_array fcoll_base_coll_gather_array fcoll_base_coll_gatherv_array fcoll_base_coll_scatterv_array fcoll_base_sort_iovec mpit_big_lock mpit_init_count mpit_lock mpit_unlock netpatterns_base_err netpatterns_base_verbose netpatterns_cleanup_narray_knomial_tree netpatterns_cleanup_recursive_doubling_tree_node netpatterns_cleanup_recursive_knomial_allgather_tree_node netpatterns_cleanup_recursive_knomial_tree_node netpatterns_init netpatterns_register_mca_params netpatterns_setup_multinomial_tree netpatterns_setup_narray_knomial_tree netpatterns_setup_narray_tree netpatterns_setup_narray_tree_contigous_ranks netpatterns_setup_recursive_doubling_n_tree_node netpatterns_setup_recursive_doubling_tree_node netpatterns_setup_recursive_knomial_allgather_tree_node netpatterns_setup_recursive_knomial_tree_node pml_v_output_close pml_v_output_open intercept_extra_state_t odls_base_default_wait_local_proc _event_debug_mode_on _evthread_cond_fns _evthread_id_fn _evthread_lock_debugging_enabled _evthread_lock_fns cmd_line_option_t cmd_line_param_t crs_base_self_checkpoint_fn crs_base_self_continue_fn crs_base_self_restart_fn event_enable_debug_output event_global_current_base_ event_module_include eventops sync_wait_mt trigger_user_inc_callback var_type_names var_type_sizes Signed-off-by: Mark Allen <markalle@us.ibm.com>
75 строки
1.7 KiB
C
75 строки
1.7 KiB
C
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
|
|
/*
|
|
* Copyright (c) 2011-2013 Los Alamos National Security, LLC. All rights
|
|
* reserved.
|
|
* Copyright (c) 2011 UT-Battelle, LLC. All rights reserved.
|
|
* Copyright (c) 2017 IBM Corporation. All rights reserved.
|
|
* $COPYRIGHT$
|
|
*
|
|
* Additional copyrights may follow
|
|
*
|
|
* $HEADER$
|
|
*/
|
|
|
|
#if !defined(MPIT_INTERNAL_H)
|
|
#define MPIT_INTERNAL_H
|
|
|
|
#include "ompi/include/ompi_config.h"
|
|
#include "opal/mca/base/mca_base_var.h"
|
|
#include "opal/mca/base/mca_base_pvar.h"
|
|
#include "ompi/runtime/params.h"
|
|
#include "ompi/communicator/communicator.h"
|
|
#include "ompi/constants.h"
|
|
#include "ompi/datatype/ompi_datatype.h"
|
|
|
|
#include "mpi.h"
|
|
|
|
#include <string.h>
|
|
|
|
typedef struct ompi_mpit_cvar_handle_t {
|
|
const mca_base_var_t *var;
|
|
/* XXX -- TODO -- allow binding objects */
|
|
void *bound_object;
|
|
} ompi_mpit_cvar_handle_t;
|
|
|
|
void ompi_mpit_lock (void);
|
|
void ompi_mpit_unlock (void);
|
|
|
|
extern volatile uint32_t ompi_mpit_init_count;
|
|
|
|
int ompit_var_type_to_datatype (mca_base_var_type_t type, MPI_Datatype *datatype);
|
|
int ompit_opal_to_mpit_error (int rc);
|
|
|
|
static inline int mpit_is_initialized (void)
|
|
{
|
|
return !!ompi_mpit_init_count;
|
|
}
|
|
|
|
static inline void mpit_copy_string (char *dest, int *len, const char *source)
|
|
{
|
|
if (NULL == len)
|
|
return;
|
|
|
|
if (NULL == source) {
|
|
*len = 0;
|
|
if (NULL != dest) {
|
|
dest[0] = '\0';
|
|
}
|
|
|
|
return;
|
|
}
|
|
|
|
if (0 != *len && NULL != dest) {
|
|
if ((int) strlen (source) < *len) {
|
|
*len = strlen (source) + 1;
|
|
}
|
|
|
|
strncpy (dest, source, *len);
|
|
dest[*len - 1] = '\0';
|
|
} else {
|
|
*len = strlen (source) + 1;
|
|
}
|
|
}
|
|
|
|
#endif /* !defined(MPIT_INTERNAL_H) */
|