1
1
openmpi/opal/mca/base/base.h
Rainer Keller 6f808d9b05 Preparation work for another commit (after RFC):
- This patch solely _adds_ required headers and is rather localized
   The next patch (after RFC) heavily removes headers (based on script)
 - ompi/communicator/communicator.h: For sources that use
   ompi_mpi_comm_world, don't require them to include "mpi.h"
 - ompi/debuggers/ompi_common_dll.c: mca_topo_base_comm_1_0_0_t needs
   #include "ompi/mca/topo/topo.h"
 - ompi/errhandler/errhandler_predefined.h:
   ompi/communicator/communicator.h depends on this header file!
   To prevent recursion just have fwd declarations.
   #include "ompi/types.h" for fwd declarations of the main structs.
 - ompi/mca/btl/btl.h: #include "opal/types.h" for ompi_ptr_t 
 - ompi/mca/mpool/base/mpool_base_tree.c: We use ompi_free_list_t and
   ompi_rb_tree_t, so have the proper classes
 - ompi/mca/op/op.h:
   Op is pretty self-contained: Nobody up to now has done
   #include "opal/class/opal_object.h"
 - ompi/mca/osc/pt2pt/osc_pt2pt_replyreq.h:
   #include "opal/types.h" for ompi_ptr_t 
 - ompi/mca/pml/base/base.h:
   We use opal_lists  
 - ompi/mca/pml/dr/pml_dr_vfrag.h:
   #include "opal/types.h" for ompi_ptr_t
 - ompi/mca/pml/ob1/pml_ob1_hdr.h:
   #include "ompi/mca/btl/btl.h" for mca_btl_base_segment_t
 - opal/dss/dss_unpack.c:
   #include "opal/types.h"
 - opal/mca/base/base.h:
   #include "opal/util/cmd_line.h" for opal_cmd_line_t
 - orte/mca/oob/tcp/oob_tcp.c:
   #include "opal/types.h" for opal_socklen_t
 - orte/mca/oob/tcp/oob_tcp.h:
   #include "opal/threads/threads.h" for opal_thread_t
 - orte/mca/oob/tcp/oob_tcp_msg.c:
   #include "opal/types.h" 
 - orte/mca/oob/tcp/oob_tcp_peer.c:
   #include "opal/types.h"  for opal_socklen_t
 - orte/mca/oob/tcp/oob_tcp_send.c:
   #include "opal/types.h" 
 - orte/mca/plm/base/plm_base_proxy.c:
   #include "orte/util/name_fns.h" for ORTE_NAME_PRINT
 - orte/mca/rml/base/rml_base_receive.c:
   #include "opal/util/output.h" for OPAL_OUTPUT_VERBOSE
 - orte/mca/rml/oob/rml_oob_recv.c:
   #include "opal/types.h" for ompi_iov_base_ptr_t
 - orte/mca/rml/oob/rml_oob_send.c:
   #include "opal/types.h" for ompi_iov_base_ptr_t
 - orte/runtime/orte_data_server.c
   #include "opal/util/output.h" for OPAL_OUTPUT_VERBOSE
 - orte/runtime/orte_globals.h:
   #include "orte/util/name_fns.h" for ORTE_NAME_PRINT

 Tested on Linux/x86-64

This commit was SVN r20817.
2009-03-17 21:34:30 +00:00

165 строки
5.6 KiB
C

/*
* Copyright (c) 2004-2008 The Trustees of Indiana University and Indiana
* University Research and Technology
* Corporation. All rights reserved.
* Copyright (c) 2004-2007 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* Copyright (c) 2009 Cisco Systems, Inc. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*/
#ifndef MCA_BASE_H
#define MCA_BASE_H
#include "opal_config.h"
#include "opal/class/opal_object.h"
#include "opal/class/opal_list.h"
/*
* These units are large enough to warrant their own .h files
*/
#include "opal/mca/mca.h"
#include "opal/mca/base/mca_base_param.h"
#include "opal/util/cmd_line.h"
BEGIN_C_DECLS
/*
* Structure for making plain lists of components
*/
struct mca_base_component_list_item_t {
opal_list_item_t super;
const mca_base_component_t *cli_component;
};
typedef struct mca_base_component_list_item_t mca_base_component_list_item_t;
OPAL_DECLSPEC OBJ_CLASS_DECLARATION(mca_base_component_list_item_t);
/*
* Structure for making priority lists of components
*/
struct mca_base_component_priority_list_item_t {
mca_base_component_list_item_t super;
int cpli_priority;
};
typedef struct mca_base_component_priority_list_item_t
mca_base_component_priority_list_item_t;
OPAL_DECLSPEC OBJ_CLASS_DECLARATION(mca_base_component_priority_list_item_t);
/*
* Public variables
*/
OPAL_DECLSPEC extern int mca_base_param_component_path;
/*
* Public functions
*/
/**
* First function called in the MCA.
*
* @return OPAL_SUCCESS Upon success
* @return OPAL_ERROR Upon failure
*
* This function starts up the entire MCA. It initializes a bunch
* of built-in MCA parameters, and initialized the MCA component
* repository.
*
* It must be the first MCA function invoked. It is normally
* invoked during ompi_mpi_init() and specifically invoked in the
* special case of the laminfo command.
*/
OPAL_DECLSPEC int mca_base_open(void);
/**
* Last function called in the MCA
*
* @return OPAL_SUCCESS Upon success
* @return OPAL_ERROR Upon failure
*
* This function closes down the entire MCA. It clears all MCA
* parameters and closes down the MCA component respository.
*
* It must be the last MCA function invoked. It is normally invoked
* during ompi_mpi_finalize() and specifically invoked during the
* special case of the laminfo command.
*/
OPAL_DECLSPEC int mca_base_close(void);
/**
* A generic select function
*
*/
OPAL_DECLSPEC int mca_base_select(const char *type_name, int output_id,
opal_list_t *components_available,
mca_base_module_t **best_module,
mca_base_component_t **best_component);
/* mca_base_cmd_line.c */
OPAL_DECLSPEC int mca_base_cmd_line_setup(opal_cmd_line_t *cmd);
OPAL_DECLSPEC int mca_base_cmd_line_process_args(opal_cmd_line_t *cmd,
char ***app_env,
char ***global_env);
/* mca_base_component_compare.c */
OPAL_DECLSPEC int mca_base_component_compare_priority(mca_base_component_priority_list_item_t *a,
mca_base_component_priority_list_item_t *b);
OPAL_DECLSPEC int mca_base_component_compare(const mca_base_component_t *a,
const mca_base_component_t *b);
OPAL_DECLSPEC int mca_base_component_compatible(const mca_base_component_t *a,
const mca_base_component_t *b);
OPAL_DECLSPEC char * mca_base_component_to_string(const mca_base_component_t *a);
/* mca_base_component_find.c */
OPAL_DECLSPEC int mca_base_component_find(const char *directory, const char *type,
const mca_base_component_t *static_components[],
char **requested_component_names,
bool include_mode,
opal_list_t *found_components,
bool open_dso_components);
/* Safely release some memory allocated by mca_base_component_find()
(i.e., is safe to call even if you never called
mca_base_component_find()). */
OPAL_DECLSPEC int mca_base_component_find_finalize(void);
/* mca_base_components_open.c */
OPAL_DECLSPEC int mca_base_components_open(const char *type_name, int output_id,
const mca_base_component_t **static_components,
opal_list_t *components_available,
bool open_dso_components);
/* mca_base_components_close.c */
OPAL_DECLSPEC int mca_base_components_close(int output_id, opal_list_t *components_available,
const mca_base_component_t *skip);
#if 0
/* JMS Not implemented yet */
int mca_base_init_callback(mca_base_init_cb_t func);
int mca_base_init_callbacks_invoke(void);
int mca_base_component_select(int requested);
int mca_base_param_associate(int index, int keyval);
int mca_base_param_lookup_int(int index, MPI_Comm comm);
char *mca_base_param_lookup_string(int index, MPI_Comm comm);
#endif
END_C_DECLS
#endif /* MCA_BASE_H */