1
1

- UNexport symbols that shouldn't be needed outside the libraries

- replace #if/#endif with BEGIN/END_C_DECLS
- reformating

This commit was SVN r14669.
Этот коммит содержится в:
Sven Stork 2007-05-16 15:46:52 +00:00
родитель bd29eb9bd1
Коммит 22af6d38e6
11 изменённых файлов: 386 добавлений и 408 удалений

Просмотреть файл

@ -27,9 +27,7 @@
#include "opal/mca/mca.h"
#include "ompi/mca/btl/btl.h"
#if defined(c_plusplus) || defined(__cplusplus)
extern "C" {
#endif
BEGIN_C_DECLS
struct mca_btl_base_selected_module_t {
opal_list_item_t super;
@ -69,13 +67,12 @@ OMPI_DECLSPEC void mca_btl_base_dump(
* Globals
*/
OMPI_DECLSPEC extern int mca_btl_base_output;
OMPI_DECLSPEC extern char* mca_btl_base_include;
OMPI_DECLSPEC extern char* mca_btl_base_exclude;
OMPI_DECLSPEC extern int mca_btl_base_warn_component_unused;
extern char* mca_btl_base_include;
extern char* mca_btl_base_exclude;
extern int mca_btl_base_warn_component_unused;
OMPI_DECLSPEC extern opal_list_t mca_btl_base_components_opened;
OMPI_DECLSPEC extern opal_list_t mca_btl_base_modules_initialized;
#if defined(c_plusplus) || defined(__cplusplus)
}
#endif
END_C_DECLS
#endif /* MCA_BTL_BASE_H */

Просмотреть файл

@ -42,161 +42,160 @@
* Global functions for MCA overall collective open and close
*/
#if defined(c_plusplus) || defined(__cplusplus)
extern "C" {
#endif
/**
* Initialize the coll MCA framework
*
* @retval OMPI_SUCCESS Upon success
* @retval OMPI_ERROR Upon failure
*
* This must be the first function invoked in the coll MCA
* framework. It initializes the coll MCA framework, finds and
* opens coll components, etc.
*
* This function is invoked during ompi_mpi_init() and during the
* initialization of the special case of the laminfo command.
*
* This function fills in the internal global variable
* mca_coll_base_components_opened, which is a list of all coll components
* that were successfully opened. This variable should \em only be
* used by other coll base functions -- it is not considered a
* public interface member -- and is only mentioned here for
* completeness.
*/
BEGIN_C_DECLS
/**
* Initialize the coll MCA framework
*
* @retval OMPI_SUCCESS Upon success
* @retval OMPI_ERROR Upon failure
*
* This must be the first function invoked in the coll MCA
* framework. It initializes the coll MCA framework, finds and
* opens coll components, etc.
*
* This function is invoked during ompi_mpi_init() and during the
* initialization of the special case of the laminfo command.
*
* This function fills in the internal global variable
* mca_coll_base_components_opened, which is a list of all coll components
* that were successfully opened. This variable should \em only be
* used by other coll base functions -- it is not considered a
* public interface member -- and is only mentioned here for
* completeness.
*/
OMPI_DECLSPEC int mca_coll_base_open(void);
/**
* Create list of available coll components.
*
* @param allow_multi_user_threads Will be set to true if any of the
* available components will allow multiple user threads
* @param have_hidden_threads Will be set to true if any of the
* available components have hidden threads.
*
* @retval OMPI_SUCCESS If one or more coll components are available.
* @retval OMPI_ERROR If no coll components are found to be available.
*
* This function is invoked during ompi_mpi_init() to query all
* successfully opened coll components and create a list of all
* available coll components.
*
* This function traverses the (internal global variable)
* mca_coll_base_components_opened list and queries each component to see
* if it ever might want to run during this MPI process. It creates
* another internal global variable list named
* mca_coll_base_components_available, consisting of a list of components
* that are available for selection when communicators are created.
* This variable should \em only be used by other coll base
* functions -- it is not considered a public interface member --
* and is only mentioned here for completeness.
*/
OMPI_DECLSPEC int mca_coll_base_find_available(bool enable_progress_threads,
bool enable_mpi_threads);
/**
* Create list of available coll components.
*
* @param allow_multi_user_threads Will be set to true if any of the
* available components will allow multiple user threads
* @param have_hidden_threads Will be set to true if any of the
* available components have hidden threads.
*
* @retval OMPI_SUCCESS If one or more coll components are available.
* @retval OMPI_ERROR If no coll components are found to be available.
*
* This function is invoked during ompi_mpi_init() to query all
* successfully opened coll components and create a list of all
* available coll components.
*
* This function traverses the (internal global variable)
* mca_coll_base_components_opened list and queries each component to see
* if it ever might want to run during this MPI process. It creates
* another internal global variable list named
* mca_coll_base_components_available, consisting of a list of components
* that are available for selection when communicators are created.
* This variable should \em only be used by other coll base
* functions -- it is not considered a public interface member --
* and is only mentioned here for completeness.
*/
int mca_coll_base_find_available(bool enable_progress_threads,
bool enable_mpi_threads);
/**
* Select an available component for a new communicator.
*
* @param comm Communicator that the component will be selected for.
* @param preferred The component that is preferred for this
* communicator (or NULL).
*
* @return OMPI_SUCCESS Upon success.
* @return OMPI_ERROR Upon failure.
*
* Note that the types of the parameters have "struct" in them
* (e.g., ompi_communicator_t" vs. a plain "ompi_communicator_t") to
* avoid an include file loop. All similar types (e.g., "struct
* ompi_communicator_t *", "ompi_communicator_t *", and "MPI_Comm")
* are all typedef'ed to be the same, so the fact that we use struct
* here in the prototype is ok.
*
* This function is invoked when a new communicator is created and a
* coll component needs to be selected for it. It should be invoked
* near the end of the communicator creation process such that
* almost everything else is functional on the communicator (e.g.,
* point-to-point communication).
*
* This function invokes the selection process for coll components,
* which works as follows:
*
* - If the \em preferred argument is NULL, the selection set is
* defined to be all the components found during
* mca_coll_base_find_available().
* - If \em preferred is not NULL, then the selection set is just
* that component. (However, in this mode, we may make 2 passes
* through the selection process -- more on this below).
* - All components in the selection set are queried to see if they
* want to run with that communicator. All components that want to
* run are ranked by their priority and the highest priority
* component is selected. All non-selected components have their
* "unquery" function invoked to let them know that they were not
* selected.
* - The selected component will have its "init" function invoked to
* let it know that it was selected.
* - If we fall through this entire process and no component is
* selected \em and the \em preferred argument is not NULL, then
* run the entire process again as if the \em preferred argument
* was NULL (i.e., use the entire available set of components).
*
* At the end of this process, we'll either have a single component
* that is selected and initialized for the communicator, or no
* component was selected and an error is returned up the stack.
*
* Note that new communicators may be created as a result of
* invoking this function. Specifically: this function is called in
* the depths of communicator creation, but during the execution of
* this function, new communicators may be created, and therefore
* communicator creation functions may be re-entered (albiet with
* different arguments).
*/
OMPI_DECLSPEC int mca_coll_base_comm_select(struct ompi_communicator_t *comm,
struct mca_base_component_t *preferred);
/**
* Select an available component for a new communicator.
*
* @param comm Communicator that the component will be selected for.
* @param preferred The component that is preferred for this
* communicator (or NULL).
*
* @return OMPI_SUCCESS Upon success.
* @return OMPI_ERROR Upon failure.
*
* Note that the types of the parameters have "struct" in them
* (e.g., ompi_communicator_t" vs. a plain "ompi_communicator_t") to
* avoid an include file loop. All similar types (e.g., "struct
* ompi_communicator_t *", "ompi_communicator_t *", and "MPI_Comm")
* are all typedef'ed to be the same, so the fact that we use struct
* here in the prototype is ok.
*
* This function is invoked when a new communicator is created and a
* coll component needs to be selected for it. It should be invoked
* near the end of the communicator creation process such that
* almost everything else is functional on the communicator (e.g.,
* point-to-point communication).
*
* This function invokes the selection process for coll components,
* which works as follows:
*
* - If the \em preferred argument is NULL, the selection set is
* defined to be all the components found during
* mca_coll_base_find_available().
* - If \em preferred is not NULL, then the selection set is just
* that component. (However, in this mode, we may make 2 passes
* through the selection process -- more on this below).
* - All components in the selection set are queried to see if they
* want to run with that communicator. All components that want to
* run are ranked by their priority and the highest priority
* component is selected. All non-selected components have their
* "unquery" function invoked to let them know that they were not
* selected.
* - The selected component will have its "init" function invoked to
* let it know that it was selected.
* - If we fall through this entire process and no component is
* selected \em and the \em preferred argument is not NULL, then
* run the entire process again as if the \em preferred argument
* was NULL (i.e., use the entire available set of components).
*
* At the end of this process, we'll either have a single component
* that is selected and initialized for the communicator, or no
* component was selected and an error is returned up the stack.
*
* Note that new communicators may be created as a result of
* invoking this function. Specifically: this function is called in
* the depths of communicator creation, but during the execution of
* this function, new communicators may be created, and therefore
* communicator creation functions may be re-entered (albiet with
* different arguments).
*/
int mca_coll_base_comm_select(struct ompi_communicator_t *comm,
struct mca_base_component_t *preferred);
/**
* Finalize a coll component on a specific communicator.
*
* @param comm The communicator that is being destroyed.
*
* @retval OMPI_SUCCESS Always.
*
* Note that the type of the parameter is only a "struct
* ompi_communicator_t" (vs. a plain "ompi_communicator_t") to avoid
* an include file loop. The types "struct ompi_communicator_t *",
* "ompi_communicator_t *", and "MPI_Comm" are all typedef'ed to be
* the same, so the fact that we use struct here in the prototype is
* ok.
*
* This function is invoked near the beginning of the destruction of
* a communicator. It finalizes the coll component associated with the
* communicator (e.g., allowing the component to clean up and free any
* resources allocated for that communicator). Note that similar to
* mca_coll_base_select(), as result of this function, other
* communicators may also be destroyed.
*/
OMPI_DECLSPEC int mca_coll_base_comm_unselect(struct ompi_communicator_t *comm);
/**
* Finalize a coll component on a specific communicator.
*
* @param comm The communicator that is being destroyed.
*
* @retval OMPI_SUCCESS Always.
*
* Note that the type of the parameter is only a "struct
* ompi_communicator_t" (vs. a plain "ompi_communicator_t") to avoid
* an include file loop. The types "struct ompi_communicator_t *",
* "ompi_communicator_t *", and "MPI_Comm" are all typedef'ed to be
* the same, so the fact that we use struct here in the prototype is
* ok.
*
* This function is invoked near the beginning of the destruction of
* a communicator. It finalizes the coll component associated with the
* communicator (e.g., allowing the component to clean up and free any
* resources allocated for that communicator). Note that similar to
* mca_coll_base_select(), as result of this function, other
* communicators may also be destroyed.
*/
int mca_coll_base_comm_unselect(struct ompi_communicator_t *comm);
/**
* Finalize the coll usage on a communicator.
*
* @param comm The communicator that is being destroyed.
*
* @retval OMPI_SUCCESS Always.
*/
OMPI_DECLSPEC int mca_coll_base_comm_finalize(struct ompi_communicator_t *comm);
/**
* Finalize the coll usage on a communicator.
*
* @param comm The communicator that is being destroyed.
*
* @retval OMPI_SUCCESS Always.
*/
int mca_coll_base_comm_finalize(struct ompi_communicator_t *comm);
/**
* Shut down the coll MCA framework.
*
* @retval OMPI_SUCCESS Always
*
* This function shuts down everything in the coll MCA framework,
* and is called during ompi_mpi_finalize() and the special case of
* the laminfo command.
*
* It must be the last function invoked on the coll MCA framework.
*/
/**
* Shut down the coll MCA framework.
*
* @retval OMPI_SUCCESS Always
*
* This function shuts down everything in the coll MCA framework,
* and is called during ompi_mpi_finalize() and the special case of
* the laminfo command.
*
* It must be the last function invoked on the coll MCA framework.
*/
OMPI_DECLSPEC int mca_coll_base_close(void);
@ -219,24 +218,27 @@ OMPI_DECLSPEC extern int mca_coll_base_output;
* Indicator as to whether the list of opened coll components is valid or
* not.
*/
OMPI_DECLSPEC extern bool mca_coll_base_components_opened_valid;
extern bool mca_coll_base_components_opened_valid;
/**
* List of all opened components; created when the coll framework is
* initialized and destroyed when we reduce the list to all available
* coll components.
*/
OMPI_DECLSPEC extern opal_list_t mca_coll_base_components_opened;
/**
* Indicator as to whether the list of available coll components is valid
* or not.
*/
OMPI_DECLSPEC extern bool mca_coll_base_components_available_valid;
extern bool mca_coll_base_components_available_valid;
/**
* List of all available components; created by reducing the list of open
* components to all those who indicate that they may run during this
* process.
*/
OMPI_DECLSPEC extern opal_list_t mca_coll_base_components_available;
extern opal_list_t mca_coll_base_components_available;
/**
* Pointer to the "basic" component so that it can be found easily
@ -246,7 +248,6 @@ OMPI_DECLSPEC extern opal_list_t mca_coll_base_components_available;
*/
OMPI_DECLSPEC extern const mca_coll_base_component_1_0_0_t *mca_coll_base_basic_component;
#if defined(c_plusplus) || defined(__cplusplus)
}
#endif
END_C_DECLS
#endif /* MCA_BASE_COLL_H */

Просмотреть файл

@ -92,7 +92,7 @@ OMPI_DECLSPEC int mca_mpool_base_module_destroy(mca_mpool_base_module_t *module)
*/
OMPI_DECLSPEC extern int mca_mpool_base_output;
OMPI_DECLSPEC extern opal_list_t mca_mpool_base_components;
OMPI_DECLSPEC extern opal_list_t mca_mpool_base_modules;
extern opal_list_t mca_mpool_base_modules;
OMPI_DECLSPEC extern uint32_t mca_mpool_base_page_size;
OMPI_DECLSPEC extern uint32_t mca_mpool_base_page_size_log;

Просмотреть файл

@ -28,29 +28,26 @@
/*
* Global functions for MCA overall collective open and close
*/
#if defined(c_plusplus) || defined(__cplusplus)
extern "C" {
#endif
BEGIN_C_DECLS
/*
* function definitions
*/
OMPI_DECLSPEC int ompi_osc_base_open(void);
OMPI_DECLSPEC int ompi_osc_base_find_available(bool enable_progress_threads,
bool enable_mpi_threads);
int ompi_osc_base_find_available(bool enable_progress_threads,
bool enable_mpi_threads);
OMPI_DECLSPEC int ompi_osc_base_select(ompi_win_t *win,
ompi_info_t *info,
ompi_communicator_t *comm);
int ompi_osc_base_select(ompi_win_t *win,
ompi_info_t *info,
ompi_communicator_t *comm);
OMPI_DECLSPEC int ompi_osc_base_finalize(void);
int ompi_osc_base_finalize(void);
OMPI_DECLSPEC int ompi_osc_base_close(void);
OMPI_DECLSPEC extern opal_list_t ompi_osc_base_open_components;
OMPI_DECLSPEC extern opal_list_t ompi_osc_base_avail_components;
extern opal_list_t ompi_osc_base_avail_components;
OMPI_DECLSPEC extern int ompi_osc_base_output;
#if defined(c_plusplus) || defined(__cplusplus)
}
#endif
END_C_DECLS
#endif

Просмотреть файл

@ -21,15 +21,14 @@
#include "ompi/mca/pml/pml.h"
#include "ompi/request/request.h"
#if defined(c_plusplus) || defined(__cplusplus)
extern "C" {
#endif
BEGIN_C_DECLS
OMPI_DECLSPEC int mca_pml_base_bsend_init(bool enable_mpi_threads);
OMPI_DECLSPEC int mca_pml_base_bsend_fini(void);
OMPI_DECLSPEC int mca_pml_base_bsend_attach(void* addr, int size);
OMPI_DECLSPEC int mca_pml_base_bsend_detach(void* addr, int* size);
int mca_pml_base_bsend_attach(void* addr, int size);
int mca_pml_base_bsend_detach(void* addr, int* size);
OMPI_DECLSPEC int mca_pml_base_bsend_request_alloc(ompi_request_t*);
OMPI_DECLSPEC int mca_pml_base_bsend_request_start(ompi_request_t*);
@ -37,10 +36,7 @@ OMPI_DECLSPEC int mca_pml_base_bsend_request_fini(ompi_request_t*);
OMPI_DECLSPEC void* mca_pml_base_bsend_request_alloc_buf( size_t length );
OMPI_DECLSPEC int mca_pml_base_bsend_request_free(void* addr);
#if defined(c_plusplus) || defined(__cplusplus)
}
#endif
END_C_DECLS
#endif

Просмотреть файл

@ -29,20 +29,20 @@
/*
* All stuff goes in here
*/
#if defined(c_plusplus) || defined(__cplusplus)
extern "C" {
#endif
BEGIN_C_DECLS
OMPI_DECLSPEC int mca_topo_base_open(void);
OMPI_DECLSPEC int mca_topo_base_close(void);
OMPI_DECLSPEC int mca_topo_base_comm_select(struct ompi_communicator_t *comm,
struct mca_base_component_t *preferred);
int mca_topo_base_comm_select(struct ompi_communicator_t *comm,
struct mca_base_component_t *preferred);
OMPI_DECLSPEC int mca_topo_base_comm_unselect(struct ompi_communicator_t *comm);
int mca_topo_base_comm_unselect(struct ompi_communicator_t *comm);
OMPI_DECLSPEC int mca_topo_base_find_available (bool enable_progress_threads,
bool enable_mpi_threads);
int mca_topo_base_find_available (bool enable_progress_threads,
bool enable_mpi_threads);
OMPI_DECLSPEC int mca_topo_base_init_comm (struct ompi_communicator_t *comm);
@ -126,15 +126,14 @@ OMPI_DECLSPEC int mca_topo_base_graph_neighbors_count (struct ompi_communicat
* Globals
*/
OMPI_DECLSPEC extern int mca_topo_base_output;
OMPI_DECLSPEC extern int mca_topo_base_param;
extern int mca_topo_base_param;
OMPI_DECLSPEC extern opal_list_t mca_topo_base_components_available;
OMPI_DECLSPEC extern opal_list_t mca_topo_base_components_opened;
OMPI_DECLSPEC extern bool mca_topo_base_components_opened_valid;
OMPI_DECLSPEC extern bool mca_topo_base_components_available_valid;
extern bool mca_topo_base_components_opened_valid;
extern bool mca_topo_base_components_available_valid;
END_C_DECLS
#if defined(c_plusplus) || defined(__cplusplus)
}
#endif
#endif /* MCA_BASE_TOPO_H */

Просмотреть файл

@ -30,9 +30,8 @@
#include "ompi/class/ompi_pointer_array.h"
#include "opal/threads/condition.h"
#if defined(c_plusplus) || defined(__cplusplus)
extern "C" {
#endif
BEGIN_C_DECLS
/**
* Request class
*/
@ -182,7 +181,7 @@ OMPI_DECLSPEC extern ompi_status_public_t ompi_status_empty;
* Initialize the MPI_Request subsystem; invoked during MPI_INIT.
*/
OMPI_DECLSPEC int ompi_request_init(void);
int ompi_request_init(void);
/**
* Free a persistent request to a MPI_PROC_NULL peer (there's no
@ -196,7 +195,7 @@ OMPI_DECLSPEC int ompi_request_persistent_proc_null_free(ompi_request_t **reques
* Shut down the MPI_Request subsystem; invoked during MPI_FINALIZE.
*/
OMPI_DECLSPEC int ompi_request_finalize(void);
int ompi_request_finalize(void);
/**
@ -375,9 +374,7 @@ OMPI_DECLSPEC int ompi_request_wait_some(
int * indices,
ompi_status_public_t * statuses);
END_C_DECLS
#if defined(c_plusplus) || defined(__cplusplus)
}
#endif
#endif

Просмотреть файл

@ -30,86 +30,83 @@
#include "ompi_config.h"
#if defined(c_plusplus) || defined(__cplusplus)
extern "C" {
#endif
/** forward type declaration */
struct ompi_communicator_t;
/** forward type declaration */
struct opal_thread_t;
BEGIN_C_DECLS
/* Global variables and symbols for the MPI layer */
/** forward type declaration */
struct ompi_communicator_t;
/** forward type declaration */
struct opal_thread_t;
/** Is mpi initialized? */
OMPI_DECLSPEC extern bool ompi_mpi_initialized;
/** Has mpi been finalized? */
OMPI_DECLSPEC extern bool ompi_mpi_finalized;
/* Global variables and symbols for the MPI layer */
/** Do we have multiple threads? */
OMPI_DECLSPEC extern bool ompi_mpi_thread_multiple;
/** Thread level requested to \c MPI_Init_thread() */
OMPI_DECLSPEC extern int ompi_mpi_thread_requested;
/** Thread level provided by Open MPI */
OMPI_DECLSPEC extern int ompi_mpi_thread_provided;
/** Identifier of the main thread */
OMPI_DECLSPEC extern struct opal_thread_t *ompi_mpi_main_thread;
/** Is mpi initialized? */
extern bool ompi_mpi_initialized;
/** Has mpi been finalized? */
extern bool ompi_mpi_finalized;
/** Did we setup maffinity in MPI_INIT (and therefore need to shut
it down during MPI_FINALIZE)? */
OMPI_DECLSPEC extern bool ompi_mpi_maffinity_setup;
/** Do we have multiple threads? */
OMPI_DECLSPEC extern bool ompi_mpi_thread_multiple;
/** Thread level requested to \c MPI_Init_thread() */
OMPI_DECLSPEC extern int ompi_mpi_thread_requested;
/** Thread level provided by Open MPI */
OMPI_DECLSPEC extern int ompi_mpi_thread_provided;
/** Identifier of the main thread */
OMPI_DECLSPEC extern struct opal_thread_t *ompi_mpi_main_thread;
/** Did we setup maffinity in MPI_INIT (and therefore need to shut
it down during MPI_FINALIZE)? */
OMPI_DECLSPEC extern bool ompi_mpi_maffinity_setup;
/**
* Initialize the Open MPI MPI environment
*
* @param argc argc, typically from main() (IN)
* @param argv argv, typically from main() (IN)
* @param requested Thread support that is requested (IN)
* @param provided Thread support that is provided (OUT)
*
* @returns MPI_SUCCESS if successful
* @returns Error code if unsuccessful
*
* Intialize all support code needed for MPI applications. This
* function should only be called by MPI applications (including
* singletons). If this function is called, ompi_init() and
* ompi_rte_init() should *not* be called.
*
* It is permissable to pass in (0, NULL) for (argc, argv).
*/
int ompi_mpi_init(int argc, char **argv, int requested, int *provided);
/**
* Initialize the Open MPI MPI environment
*
* @param argc argc, typically from main() (IN)
* @param argv argv, typically from main() (IN)
* @param requested Thread support that is requested (IN)
* @param provided Thread support that is provided (OUT)
*
* @returns MPI_SUCCESS if successful
* @returns Error code if unsuccessful
*
* Intialize all support code needed for MPI applications. This
* function should only be called by MPI applications (including
* singletons). If this function is called, ompi_init() and
* ompi_rte_init() should *not* be called.
*
* It is permissable to pass in (0, NULL) for (argc, argv).
*/
int ompi_mpi_init(int argc, char **argv, int requested, int *provided);
/**
* Finalize the Open MPI MPI environment
*
* @returns MPI_SUCCESS if successful
* @returns Error code if unsuccessful
*
* Should be called after all MPI functionality is complete (usually
* during MPI_FINALIZE).
*/
int ompi_mpi_finalize(void);
/**
* Finalize the Open MPI MPI environment
*
* @returns MPI_SUCCESS if successful
* @returns Error code if unsuccessful
*
* Should be called after all MPI functionality is complete (usually
* during MPI_FINALIZE).
*/
int ompi_mpi_finalize(void);
/**
* Abort the processes of comm
*/
int ompi_mpi_abort(struct ompi_communicator_t* comm,
int errcode, bool kill_remote_of_intercomm);
/**
* Abort the processes of comm
*/
int ompi_mpi_abort(struct ompi_communicator_t* comm,
int errcode, bool kill_remote_of_intercomm);
/**
* Wait for a TotalView-like debugger if asked.
*/
void ompi_mpi_wait_for_totalview(void);
/**
* Wait for a TotalView-like debugger if asked.
*/
void ompi_mpi_wait_for_totalview(void);
/**
* Do a preconnect of MPI connections (i.e., force connections to
* be made if they will be made).
*/
int ompi_init_preconnect_oob(void);
int ompi_init_preconnect_mpi(void);
/**
* Do a preconnect of MPI connections (i.e., force connections to
* be made if they will be made).
*/
int ompi_init_preconnect_oob(void);
int ompi_init_preconnect_mpi(void);
#if defined(c_plusplus) || defined(__cplusplus)
}
#endif
END_C_DECLS
#endif /* OMPI_MPI_MPIRUNTIME_H */

Просмотреть файл

@ -29,132 +29,129 @@
* Global functions for MCA overall maffinity open and close
*/
#if defined(c_plusplus) || defined(__cplusplus)
extern "C" {
#endif
BEGIN_C_DECLS
/**
* Initialize the maffinity MCA framework
*
* @retval OPAL_SUCCESS Upon success
* @retval OPAL_ERROR Upon failure
*
* This must be the first function invoked in the maffinity MCA
* framework. It initializes the maffinity MCA framework, finds
* and opens maffinity components, etc.
*
* This function fills in the internal global variable
* opal_maffinity_base_components_opened, which is a list of all
* maffinity components that were successfully opened. This
* variable should \em only be used by other maffinity base
* functions -- it is not considered a public interface member --
* and is only mentioned here for completeness.
*/
OPAL_DECLSPEC int opal_maffinity_base_open(void);
/**
* Initialize the maffinity MCA framework
*
* @retval OPAL_SUCCESS Upon success
* @retval OPAL_ERROR Upon failure
*
* This must be the first function invoked in the maffinity MCA
* framework. It initializes the maffinity MCA framework, finds
* and opens maffinity components, etc.
*
* This function fills in the internal global variable
* opal_maffinity_base_components_opened, which is a list of all
* maffinity components that were successfully opened. This
* variable should \em only be used by other maffinity base
* functions -- it is not considered a public interface member --
* and is only mentioned here for completeness.
*/
OPAL_DECLSPEC int opal_maffinity_base_open(void);
/**
* Select an available component.
*
* @return OPAL_SUCCESS Upon success.
* @return OPAL_NOT_FOUND If no component can be selected.
* @return OPAL_ERROR Upon other failure.
*
* This function invokes the selection process for maffinity
* components, which works as follows:
*
* - If the \em maffinity MCA parameter is not specified, the
* selection set is all available maffinity components.
* - If the \em maffinity MCA parameter is specified, the
* selection set is just that component.
* - All components in the selection set are queried to see if
* they want to run. All components that want to run are ranked
* by their priority and the highest priority component is
* selected. All non-selected components have their "close"
* function invoked to let them know that they were not selected.
* - The selected component will have its "init" function invoked to
* let it know that it was selected.
*
* If we fall through this entire process and no component is
* selected, then return OPAL_NOT_FOUND (this is not a fatal
* error).
*
* At the end of this process, we'll either have a single
* component that is selected and initialized, or no component was
* selected. If no component was selected, subsequent invocation
* of the maffinity wrapper functions will return an error.
*/
OPAL_DECLSPEC int opal_maffinity_base_select(void);
/**
* Select an available component.
*
* @return OPAL_SUCCESS Upon success.
* @return OPAL_NOT_FOUND If no component can be selected.
* @return OPAL_ERROR Upon other failure.
*
* This function invokes the selection process for maffinity
* components, which works as follows:
*
* - If the \em maffinity MCA parameter is not specified, the
* selection set is all available maffinity components.
* - If the \em maffinity MCA parameter is specified, the
* selection set is just that component.
* - All components in the selection set are queried to see if
* they want to run. All components that want to run are ranked
* by their priority and the highest priority component is
* selected. All non-selected components have their "close"
* function invoked to let them know that they were not selected.
* - The selected component will have its "init" function invoked to
* let it know that it was selected.
*
* If we fall through this entire process and no component is
* selected, then return OPAL_NOT_FOUND (this is not a fatal
* error).
*
* At the end of this process, we'll either have a single
* component that is selected and initialized, or no component was
* selected. If no component was selected, subsequent invocation
* of the maffinity wrapper functions will return an error.
*/
OPAL_DECLSPEC int opal_maffinity_base_select(void);
/**
* Set memory affinity.
*
* @param segments Array describing segments and what process they
* belong to
* @param num_segments Length of the segments array
* @param am_allocator True if this process created the shared
* memory block
*
* @retval OPAL_SUCCESS upon success
* @retval OPAL_NOT_FOUND if no maffinity components are available.
* @retval OPAL_ERROR upon other error.
*
* Set the affinity of the memory segments described in the \em
* segments array.
*
* If no maffinity components were available, or if the
* opal_maffinity_base_select() was never invoked, OPAL_NOT_FOUND
* is returned.
*/
OPAL_DECLSPEC int opal_maffinity_base_set(opal_maffinity_base_segment_t *segments, size_t num_segments);
/**
* Set memory affinity.
*
* @param segments Array describing segments and what process they
* belong to
* @param num_segments Length of the segments array
* @param am_allocator True if this process created the shared
* memory block
*
* @retval OPAL_SUCCESS upon success
* @retval OPAL_NOT_FOUND if no maffinity components are available.
* @retval OPAL_ERROR upon other error.
*
* Set the affinity of the memory segments described in the \em
* segments array.
*
* If no maffinity components were available, or if the
* opal_maffinity_base_select() was never invoked, OPAL_NOT_FOUND
* is returned.
*/
OPAL_DECLSPEC int opal_maffinity_base_set(opal_maffinity_base_segment_t *segments, size_t num_segments);
/**
* Shut down the maffinity MCA framework.
*
* @retval OPAL_SUCCESS Always
*
* This function shuts down everything in the maffinity MCA
* framework.
*
* It must be the last function invoked on the maffinity MCA
* framework.
*/
OPAL_DECLSPEC int opal_maffinity_base_close(void);
/**
* Shut down the maffinity MCA framework.
*
* @retval OPAL_SUCCESS Always
*
* This function shuts down everything in the maffinity MCA
* framework.
*
* It must be the last function invoked on the maffinity MCA
* framework.
*/
OPAL_DECLSPEC int opal_maffinity_base_close(void);
/**
* Indication of whether a component was successfully selected or
* not
*/
OPAL_DECLSPEC extern bool opal_maffinity_base_selected;
/**
* Indication of whether a component was successfully selected or
* not
*/
extern bool opal_maffinity_base_selected;
/**
* Global component struct for the selected component
*/
OPAL_DECLSPEC extern const opal_maffinity_base_component_1_0_0_t
*opal_maffinity_base_component;
/**
* Global module struct for the selected module
*/
OPAL_DECLSPEC extern const opal_maffinity_base_module_1_0_0_t
*opal_maffinity_base_module;
/**
* Global component struct for the selected component
*/
OPAL_DECLSPEC extern const opal_maffinity_base_component_1_0_0_t
*opal_maffinity_base_component;
/**
* Global module struct for the selected module
*/
OPAL_DECLSPEC extern const opal_maffinity_base_module_1_0_0_t
*opal_maffinity_base_module;
/**
* Indicator as to whether the list of opened maffinity components
* is valid or not.
*/
OPAL_DECLSPEC extern bool opal_maffinity_base_components_opened_valid;
/**
* List of all opened components; created when the maffinity
* framework is initialized and destroyed when we reduce the list
* to all available maffinity components.
*/
OPAL_DECLSPEC extern opal_list_t opal_maffinity_base_components_opened;
/**
* Indicator as to whether the list of opened maffinity components
* is valid or not.
*/
extern bool opal_maffinity_base_components_opened_valid;
/**
* List of all opened components; created when the maffinity
* framework is initialized and destroyed when we reduce the list
* to all available maffinity components.
*/
OPAL_DECLSPEC extern opal_list_t opal_maffinity_base_components_opened;
/**
* Debugging output stream
*/
extern int opal_maffinity_base_output;
/**
* Debugging output stream
*/
extern int opal_maffinity_base_output;
END_C_DECLS
#if defined(c_plusplus) || defined(__cplusplus)
}
#endif
#endif /* OPAL_BASE_MAFFINITY_H */

Просмотреть файл

@ -37,9 +37,7 @@
/*
* Global functions for MCA overall collective open and close
*/
#if defined(c_plusplus) || defined(__cplusplus)
extern "C" {
#endif
BEGIN_C_DECLS
/*
* Internal definitions
@ -56,8 +54,8 @@ ORTE_DECLSPEC int orte_errmgr_base_close(void);
*/
ORTE_DECLSPEC extern int orte_errmgr_base_output;
ORTE_DECLSPEC extern bool orte_errmgr_base_selected;
ORTE_DECLSPEC extern bool orte_errmgr_initialized;
extern bool orte_errmgr_base_selected;
extern bool orte_errmgr_initialized;
ORTE_DECLSPEC extern opal_list_t orte_errmgr_base_components_available;
ORTE_DECLSPEC extern mca_errmgr_base_component_t orte_errmgr_base_selected_component;
@ -67,7 +65,6 @@ ORTE_DECLSPEC extern orte_errmgr_base_module_t orte_errmgr_default;
* external API functions will be documented in the mca/errmgr/errmgr.h file
*/
#if defined(c_plusplus) || defined(__cplusplus)
}
#endif
END_C_DECLS
#endif

Просмотреть файл

@ -313,8 +313,8 @@ ORTE_DECLSPEC int mca_oob_base_close(void);
* Global struct holding the selected module's function pointers
*/
ORTE_DECLSPEC extern int mca_oob_base_output;
ORTE_DECLSPEC extern char* mca_oob_base_include;
ORTE_DECLSPEC extern char* mca_oob_base_exclude;
extern char* mca_oob_base_include;
extern char* mca_oob_base_exclude;
ORTE_DECLSPEC extern opal_list_t mca_oob_base_components;
ORTE_DECLSPEC extern opal_list_t mca_oob_base_modules;
ORTE_DECLSPEC extern opal_list_t mca_oob_base_exception_handlers;