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
|
|
|
|
2004-03-17 22:14:14 +03:00
|
|
|
#include "libltdl/ltdl.h"
|
2004-01-18 02:07:40 +03:00
|
|
|
|
2004-03-17 22:27:02 +03:00
|
|
|
#include "mpi.h"
|
|
|
|
|
2004-01-18 02:07:40 +03:00
|
|
|
/*
|
|
|
|
* These units are large enough to warrant their own .h files
|
|
|
|
*/
|
2004-03-17 21:45:16 +03:00
|
|
|
#include "mca/base/mca_base_param.h"
|
|
|
|
#include "mca/base/mca_base_module_exchange.h"
|
2004-01-18 02:07:40 +03:00
|
|
|
|
|
|
|
|
2004-01-22 03:37:58 +03:00
|
|
|
/*
|
|
|
|
* Structure for making plain lists of modules
|
|
|
|
*/
|
|
|
|
struct mca_base_module_list_item_t {
|
|
|
|
lam_list_item_t super;
|
|
|
|
const mca_base_module_t *mli_module;
|
|
|
|
};
|
|
|
|
typedef struct mca_base_module_list_item_t mca_base_module_list_item_t;
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Structure for making priority lists of modules
|
|
|
|
*/
|
|
|
|
struct mca_base_module_priority_list_item_t {
|
|
|
|
lam_list_item_t super;
|
|
|
|
|
|
|
|
int mpli_priority;
|
|
|
|
int mpli_thread_min, mpli_thread_max;
|
|
|
|
mca_base_module_t *mpli_module;
|
|
|
|
};
|
|
|
|
typedef struct mca_base_module_priority_list_item_t
|
|
|
|
mca_base_module_priority_list_item_t;
|
|
|
|
|
|
|
|
|
2004-03-17 22:27:02 +03:00
|
|
|
/*
|
|
|
|
* Alloc and free mem functions
|
|
|
|
*/
|
|
|
|
typedef int (*mca_base_alloc_mem_fn_t)(MPI_Aint size, MPI_Info info,
|
|
|
|
void **base);
|
|
|
|
typedef int (*mca_base_free_mem_fn_t)(void *base);
|
|
|
|
|
2004-01-18 02:07:40 +03:00
|
|
|
/*
|
|
|
|
* Public variables
|
|
|
|
*/
|
|
|
|
extern int mca_base_param_module_path;
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Public functions
|
|
|
|
*/
|
|
|
|
#if defined(c_plusplus) || defined(__cplusplus)
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2004-03-17 22:03:26 +03:00
|
|
|
/* mca_base_open.c */
|
2004-01-18 02:07:40 +03:00
|
|
|
|
2004-03-17 22:03:26 +03:00
|
|
|
int mca_base_open(void);
|
2004-01-18 02:07:40 +03:00
|
|
|
|
2004-03-17 22:03:26 +03:00
|
|
|
/* mca_base_close.c */
|
2004-01-18 02:07:40 +03:00
|
|
|
|
2004-03-17 22:03:26 +03:00
|
|
|
int mca_base_close(void);
|
2004-01-18 02:07:40 +03:00
|
|
|
|
2004-03-17 22:03:26 +03:00
|
|
|
/* mca_base_cmd_line.c */
|
2004-01-18 02:07:40 +03:00
|
|
|
|
2004-03-17 22:03:26 +03:00
|
|
|
int mca_base_cmd_line_setup(lam_cmd_line_t *cmd);
|
|
|
|
int mca_base_cmd_line_process_args(lam_cmd_line_t *cmd);
|
|
|
|
int mca_base_cmd_line_process_arg(const char *param, const char *value);
|
2004-01-18 02:07:40 +03:00
|
|
|
|
2004-03-17 22:03:26 +03:00
|
|
|
/* mca_base_module_compare.c */
|
2004-01-18 02:07:40 +03:00
|
|
|
|
2004-03-17 22:03:26 +03:00
|
|
|
int mca_base_module_compare_priority(mca_base_module_priority_list_item_t *a,
|
|
|
|
mca_base_module_priority_list_item_t *b);
|
|
|
|
int mca_base_module_compare(mca_base_module_t *a,
|
|
|
|
mca_base_module_t *b);
|
2004-01-18 02:07:40 +03:00
|
|
|
|
2004-03-17 22:03:26 +03:00
|
|
|
/* mca_base_module_find.c */
|
2004-01-18 02:07:40 +03:00
|
|
|
|
2004-03-17 22:03:26 +03:00
|
|
|
int mca_base_module_find(const char *directory, const char *type,
|
|
|
|
const mca_base_module_t *static_modules[],
|
|
|
|
lam_list_t *found_modules);
|
2004-01-18 02:07:40 +03:00
|
|
|
|
2004-03-17 22:03:26 +03:00
|
|
|
/* mca_base_module_register.c */
|
2004-01-18 02:07:40 +03:00
|
|
|
|
2004-03-19 06:24:46 +03:00
|
|
|
int mca_base_module_repository_construct(void);
|
|
|
|
int mca_base_module_repository_retain(char *type,
|
|
|
|
lt_dlhandle module_handle,
|
|
|
|
const mca_base_module_t *module_struct);
|
|
|
|
int mca_base_module_repository_link(const char *src_type,
|
|
|
|
const char *src_name,
|
|
|
|
const char *depend_type,
|
|
|
|
const char *depend_name);
|
|
|
|
void mca_base_module_repository_release(const mca_base_module_t *module);
|
|
|
|
void mca_base_module_repository_finalize(void);
|
2004-01-18 02:07:40 +03:00
|
|
|
|
2004-03-17 22:03:26 +03:00
|
|
|
/* mca_base_modules_open.c */
|
2004-01-22 03:37:58 +03:00
|
|
|
|
2004-03-17 22:03:26 +03:00
|
|
|
int mca_base_modules_open(const char *type_name, int output_id,
|
|
|
|
const mca_base_module_t **static_modules,
|
|
|
|
lam_list_t *modules_available);
|
2004-01-22 03:37:58 +03:00
|
|
|
|
2004-03-17 22:03:26 +03:00
|
|
|
/* mca_base_modules_close.c */
|
2004-01-22 03:37:58 +03:00
|
|
|
|
2004-03-17 22:03:26 +03:00
|
|
|
int mca_base_modules_close(int output_id, lam_list_t *modules_available,
|
|
|
|
const mca_base_module_t *skip);
|
|
|
|
|
|
|
|
|
|
|
|
/* mca_base_mem.c */
|
|
|
|
|
|
|
|
int mca_base_alloc_mem(MPI_Aint size, MPI_Info info, void *baseptr);
|
|
|
|
int mca_base_free_mem(void *baseptr);
|
|
|
|
|
|
|
|
/* mca_base_init_select_modules.c */
|
|
|
|
|
|
|
|
int mca_base_init_select_modules(int requested,
|
|
|
|
bool allow_multi_user_threads,
|
|
|
|
bool have_hidden_threads, int *provided);
|
|
|
|
|
|
|
|
#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_module_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
|
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 */
|