2004-01-18 02:07:40 +03:00
|
|
|
/*
|
2005-11-05 22:57:48 +03:00
|
|
|
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
|
|
|
* University Research and Technology
|
|
|
|
* Corporation. All rights reserved.
|
|
|
|
* Copyright (c) 2004-2005 The University of Tennessee and The University
|
|
|
|
* of Tennessee Research Foundation. All rights
|
|
|
|
* reserved.
|
2004-11-28 23:09:25 +03:00
|
|
|
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
|
|
|
* University of Stuttgart. All rights reserved.
|
2005-03-24 15:43:37 +03:00
|
|
|
* Copyright (c) 2004-2005 The Regents of the University of California.
|
|
|
|
* All rights reserved.
|
2004-11-22 04:38:40 +03:00
|
|
|
* $COPYRIGHT$
|
|
|
|
*
|
|
|
|
* Additional copyrights may follow
|
|
|
|
*
|
2004-01-18 02:07:40 +03:00
|
|
|
* $HEADER$
|
|
|
|
*/
|
|
|
|
|
2004-03-17 22:03:26 +03:00
|
|
|
#ifndef MCA_BASE_H
|
|
|
|
#define MCA_BASE_H
|
2004-01-18 02:07:40 +03:00
|
|
|
|
2006-02-12 04:33:29 +03:00
|
|
|
#include "opal_config.h"
|
2005-03-14 23:57:21 +03:00
|
|
|
|
2005-07-03 20:06:07 +04:00
|
|
|
#include "opal/class/opal_object.h"
|
2004-03-17 22:27:02 +03:00
|
|
|
|
2004-01-18 02:07:40 +03:00
|
|
|
/*
|
|
|
|
* These units are large enough to warrant their own .h files
|
|
|
|
*/
|
2006-02-12 04:33:29 +03:00
|
|
|
#include "opal/mca/mca.h"
|
|
|
|
#include "opal/mca/base/mca_base_param.h"
|
|
|
|
#include "opal/mca/base/mca_base_msgbuf.h"
|
2004-01-18 02:07:40 +03:00
|
|
|
|
2004-10-21 02:31:03 +04:00
|
|
|
#if defined(c_plusplus) || defined(__cplusplus)
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
2004-01-18 02:07:40 +03:00
|
|
|
|
2004-01-22 03:37:58 +03:00
|
|
|
/*
|
2004-08-02 04:24:22 +04:00
|
|
|
* Structure for making plain lists of components
|
2004-01-22 03:37:58 +03:00
|
|
|
*/
|
2004-08-02 04:24:22 +04:00
|
|
|
struct mca_base_component_list_item_t {
|
2005-07-03 20:22:16 +04:00
|
|
|
opal_list_item_t super;
|
2004-08-02 04:24:22 +04:00
|
|
|
const mca_base_component_t *cli_component;
|
2004-01-22 03:37:58 +03:00
|
|
|
};
|
2004-08-02 04:24:22 +04:00
|
|
|
typedef struct mca_base_component_list_item_t mca_base_component_list_item_t;
|
|
|
|
OBJ_CLASS_DECLARATION(mca_base_component_list_item_t);
|
2004-01-22 03:37:58 +03:00
|
|
|
|
|
|
|
|
2004-03-17 22:27:02 +03:00
|
|
|
/*
|
2004-06-29 04:02:25 +04:00
|
|
|
* Structure for making priority lists of components
|
2004-03-17 22:27:02 +03:00
|
|
|
*/
|
2004-06-29 04:02:25 +04:00
|
|
|
struct mca_base_component_priority_list_item_t {
|
2004-11-12 19:55:41 +03:00
|
|
|
mca_base_component_list_item_t super;
|
2004-06-29 04:02:25 +04:00
|
|
|
|
|
|
|
int cpli_priority;
|
|
|
|
};
|
|
|
|
typedef struct mca_base_component_priority_list_item_t
|
|
|
|
mca_base_component_priority_list_item_t;
|
|
|
|
OBJ_CLASS_DECLARATION(mca_base_component_priority_list_item_t);
|
|
|
|
|
2004-03-17 22:27:02 +03:00
|
|
|
|
2004-01-18 02:07:40 +03:00
|
|
|
/*
|
|
|
|
* Public variables
|
|
|
|
*/
|
2004-10-22 20:06:05 +04:00
|
|
|
OMPI_DECLSPEC extern int mca_base_param_component_path;
|
2004-01-18 02:07:40 +03:00
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Public functions
|
|
|
|
*/
|
|
|
|
|
2004-06-29 04:02:25 +04:00
|
|
|
/**
|
|
|
|
* First function called in the MCA.
|
|
|
|
*
|
2006-02-12 04:33:29 +03:00
|
|
|
* @return OPAL_SUCCESS Upon success
|
|
|
|
* @return OPAL_ERROR Upon failure
|
2004-06-29 04:02:25 +04:00
|
|
|
*
|
|
|
|
* This function starts up the entire MCA. It initializes a bunch
|
2004-08-02 04:24:22 +04:00
|
|
|
* of built-in MCA parameters, and initialized the MCA component
|
2004-06-29 04:02:25 +04:00
|
|
|
* 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.
|
|
|
|
*/
|
2004-10-22 20:06:05 +04:00
|
|
|
OMPI_DECLSPEC int mca_base_open(void);
|
2004-06-29 04:02:25 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Last function called in the MCA
|
|
|
|
*
|
2006-02-12 04:33:29 +03:00
|
|
|
* @return OPAL_SUCCESS Upon success
|
|
|
|
* @return OPAL_ERROR Upon failure
|
2004-06-29 04:02:25 +04:00
|
|
|
*
|
|
|
|
* This function closes down the entire MCA. It clears all MCA
|
2004-08-02 04:24:22 +04:00
|
|
|
* parameters and closes down the MCA component respository.
|
2004-06-29 04:02:25 +04:00
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*/
|
2004-10-22 20:06:05 +04:00
|
|
|
OMPI_DECLSPEC int mca_base_close(void);
|
2004-06-29 04:02:25 +04:00
|
|
|
|
|
|
|
/* mca_base_cmd_line.c */
|
|
|
|
|
2005-07-04 04:13:44 +04:00
|
|
|
OMPI_DECLSPEC int mca_base_cmd_line_setup(opal_cmd_line_t *cmd);
|
|
|
|
OMPI_DECLSPEC int mca_base_cmd_line_process_args(opal_cmd_line_t *cmd,
|
2005-08-08 20:42:28 +04:00
|
|
|
char ***app_env,
|
|
|
|
char ***global_env);
|
2004-06-29 04:02:25 +04:00
|
|
|
|
2004-08-02 04:24:22 +04:00
|
|
|
/* mca_base_component_compare.c */
|
2004-06-29 04:02:25 +04:00
|
|
|
|
2004-10-22 20:06:05 +04:00
|
|
|
OMPI_DECLSPEC int mca_base_component_compare_priority(mca_base_component_priority_list_item_t *a,
|
2004-08-02 04:24:22 +04:00
|
|
|
mca_base_component_priority_list_item_t *b);
|
2004-10-22 20:06:05 +04:00
|
|
|
OMPI_DECLSPEC int mca_base_component_compare(const mca_base_component_t *a,
|
2004-08-02 04:24:22 +04:00
|
|
|
const mca_base_component_t *b);
|
2004-10-15 00:50:06 +04:00
|
|
|
int mca_base_component_compatible(const mca_base_component_t *a,
|
|
|
|
const mca_base_component_t *b);
|
2004-06-29 04:02:25 +04:00
|
|
|
|
2004-08-02 04:24:22 +04:00
|
|
|
/* mca_base_component_find.c */
|
2004-06-29 04:02:25 +04:00
|
|
|
|
2004-10-22 20:06:05 +04:00
|
|
|
OMPI_DECLSPEC int mca_base_component_find(const char *directory, const char *type,
|
2004-08-02 04:24:22 +04:00
|
|
|
const mca_base_component_t *static_components[],
|
2005-07-03 20:22:16 +04:00
|
|
|
opal_list_t *found_components,
|
2005-04-13 07:19:48 +04:00
|
|
|
bool open_dso_components);
|
2004-06-29 04:02:25 +04:00
|
|
|
|
2004-08-02 04:24:22 +04:00
|
|
|
/* mca_base_components_open.c */
|
2004-06-29 04:02:25 +04:00
|
|
|
|
2004-10-22 20:06:05 +04:00
|
|
|
OMPI_DECLSPEC int mca_base_components_open(const char *type_name, int output_id,
|
2004-08-02 04:24:22 +04:00
|
|
|
const mca_base_component_t **static_components,
|
2005-07-03 20:22:16 +04:00
|
|
|
opal_list_t *components_available,
|
2005-04-13 07:19:48 +04:00
|
|
|
bool open_dso_components);
|
2004-06-29 04:02:25 +04:00
|
|
|
|
2004-08-02 04:24:22 +04:00
|
|
|
/* mca_base_components_close.c */
|
2004-06-29 04:02:25 +04:00
|
|
|
|
2005-07-03 20:22:16 +04:00
|
|
|
OMPI_DECLSPEC int mca_base_components_close(int output_id, opal_list_t *components_available,
|
2004-08-02 04:24:22 +04:00
|
|
|
const mca_base_component_t *skip);
|
2004-06-29 04:02:25 +04:00
|
|
|
|
2004-03-17 22:03:26 +03:00
|
|
|
#if 0
|
2004-06-29 04:02:25 +04:00
|
|
|
/* JMS Not implemented yet */
|
|
|
|
int mca_base_init_callback(mca_base_init_cb_t func);
|
|
|
|
int mca_base_init_callbacks_invoke(void);
|
2004-08-02 04:24:22 +04:00
|
|
|
int mca_base_component_select(int requested);
|
2004-06-29 04:02:25 +04:00
|
|
|
|
|
|
|
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);
|
2004-03-17 22:03:26 +03:00
|
|
|
#endif
|
2004-01-22 03:37:58 +03:00
|
|
|
|
2004-01-18 02:07:40 +03:00
|
|
|
#if defined(c_plusplus) || defined(__cplusplus)
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2004-03-17 22:03:26 +03:00
|
|
|
#endif /* MCA_BASE_H */
|