First take at skeleton files for mca base, ptl, and pml.
This commit was SVN r141.
Этот коммит содержится в:
родитель
f269658f22
Коммит
38c1ffd036
@ -5,3 +5,22 @@
|
||||
include $(top_srcdir)/config/Makefile.options
|
||||
|
||||
SUBDIRS = lam mpi common
|
||||
|
||||
# Source code files
|
||||
|
||||
headers = \
|
||||
mca.h \
|
||||
mca_pml.h \
|
||||
mca_ptl.h
|
||||
|
||||
# Conditionally install the header files
|
||||
|
||||
if WANT_INSTALL_HEADERS
|
||||
lamdir = $(includedir)/lam/mca
|
||||
lam_HEADERS = $(headers)
|
||||
else
|
||||
lamdir = $(includedir)
|
||||
endif
|
||||
|
||||
|
||||
|
||||
|
183
src/mca/mca.h
Обычный файл
183
src/mca/mca.h
Обычный файл
@ -0,0 +1,183 @@
|
||||
/*
|
||||
* $HEADER$
|
||||
*/
|
||||
|
||||
#ifndef LAM_MCA_H
|
||||
#define LAM_MCA_H
|
||||
|
||||
#include "lam/util/cmd_line.h"
|
||||
#include "lam/lfc/array.h"
|
||||
|
||||
/*
|
||||
* Types for each function
|
||||
*/
|
||||
|
||||
typedef int (*mca_open_module_fn_t)(lam_cmd_lint_t *cmd);
|
||||
typedef int (*mca_close_module_fn_t)(void);
|
||||
typedef int (*mca_mpi_init_callback_fn_t)(void);
|
||||
|
||||
|
||||
/*
|
||||
* Struct of meta data necessary in every MCA module, regardless of
|
||||
* its type.
|
||||
*/
|
||||
|
||||
#define MCA_BASE_MAX_TYPE_NAME_LEN 32
|
||||
#define MCA_BASE_MAX_MODULE_NAME_LEN 64
|
||||
|
||||
typedef struct mca_1_0_0 {
|
||||
|
||||
/* Integer version numbers indicating which MCA API version this
|
||||
module conforms to. */
|
||||
|
||||
int mca_major_version;
|
||||
int mca_minor_version;
|
||||
int mca_release_version;
|
||||
|
||||
/* Information about the type */
|
||||
|
||||
char mca_type_name[MCA_BASE_MAX_TYPE_NAME_LEN];
|
||||
int mca_type_major_version;
|
||||
int mca_type_minor_version;
|
||||
int mca_type_release_version;
|
||||
|
||||
/* Information about the module itself */
|
||||
|
||||
char mca_module_name[MCA_BASE_MAX_MODULE_NAME_LEN];
|
||||
int mca_module_major_version;
|
||||
int mca_module_minor_version;
|
||||
int mca_module_release_version;
|
||||
|
||||
/* Functions for opening and closing the module */
|
||||
|
||||
mca_open_module_fn_t mca_open_module;
|
||||
mca_close_module_fn_t mca_close_module;
|
||||
} mca_1_0_0_t;
|
||||
|
||||
|
||||
/*
|
||||
* Set the default type to use version 1.0.0 of the MCA struct
|
||||
*/
|
||||
|
||||
typedef mca_1_0_0_t mca_t;
|
||||
|
||||
|
||||
/*
|
||||
* Structure for making priority lists of modules
|
||||
*/
|
||||
|
||||
typedef struct mca_module {
|
||||
int lsm_priority;
|
||||
int lsm_thread_min, lsm_thread_max;
|
||||
mca_t *lsm_module;
|
||||
} mca_module_t;
|
||||
|
||||
|
||||
/*
|
||||
* Types for MCA parameters
|
||||
*/
|
||||
|
||||
typedef enum {
|
||||
MCA_BASE_PARAM_TYPE_INT,
|
||||
MCA_BASE_PARAM_TYPE_STRING,
|
||||
|
||||
MCA_BASE_PARAM_TYPE_MAX
|
||||
} mca_base_param_type_t;
|
||||
|
||||
typedef union {
|
||||
int intval;
|
||||
char *stringval;
|
||||
} mca_base_param_storage_t;
|
||||
|
||||
#define MCA_BASE_PARAM_INFO ((void*) -1)
|
||||
|
||||
typedef struct {
|
||||
mca_base_param_type_t lsbp_type;
|
||||
char *lsbp_type_name;
|
||||
char *lsbp_module_name;
|
||||
char *lsbp_param_name;
|
||||
char *lsbp_full_name;
|
||||
|
||||
int lsbp_keyval;
|
||||
char *lsbp_env_var_name;
|
||||
|
||||
mca_base_param_storage_t lsbp_default_value;
|
||||
} mca_base_param_t;
|
||||
|
||||
|
||||
/*
|
||||
* Variable holding the array of registered MCA parameters
|
||||
*/
|
||||
|
||||
extern lam_array_t *mca_base_params;
|
||||
|
||||
|
||||
/*
|
||||
* Global functions for MCA
|
||||
*/
|
||||
|
||||
#if defined(c_plusplus) || defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
int mca_base_arg_setup(lam_cmd_line_t *cmd);
|
||||
int mca_base_arg_process(lam_cmd_line_t *cmd);
|
||||
int mca_base_arg_process_one(char *type, char *arg);
|
||||
|
||||
int mca_base_close(void);
|
||||
int mca_base_open(lam_cmd_line_t *cmd);
|
||||
|
||||
int mca_base_module_check(char *name, char *module, int is_default);
|
||||
int mca_base_module_compare(mca_module_t *a, mca_module_t *b);
|
||||
int mca_base_module_find(char *directory, char *type,
|
||||
mca_t *static_modules[],
|
||||
mca_t ***modules_out);
|
||||
#if 0
|
||||
/* JMS add after the lbltdl stuff is done */
|
||||
int mca_base_module_register(char *type, lt_dlhandle module_handle,
|
||||
mca_t *module_struct);
|
||||
#endif
|
||||
int mca_base_module_registry_init(void);
|
||||
int mca_base_module_registry_finalize(void);
|
||||
int mca_base_module_registry_link(const char *src_type,
|
||||
const char *src_name,
|
||||
const char *depend_type,
|
||||
const char *depend_name);
|
||||
void mca_base_module_registry_unuse(mca_t *module);
|
||||
int mca_base_module_registry_use(const char *type, const char *name);
|
||||
|
||||
int mca_base_mpi_init_callback(mca_mpi_init_callback_fn_t func);
|
||||
int mca_base_mpi_init_callbacks_invoke(void);
|
||||
int mca_base_mpi_module_select(int requested);
|
||||
|
||||
#if 0
|
||||
/* JMS Are these necessary in L8? */
|
||||
struct in_addr mca_base_hostmap(struct in_addr *addr, char *keyname);
|
||||
#endif
|
||||
void mca_base_hostmap_finalize(void);
|
||||
#if 0
|
||||
/* JMS Add after debug streams added */
|
||||
int mca_base_set_verbose(int index, lam_debug_stream_info_t *lds,
|
||||
int *level, int *did);
|
||||
#endif
|
||||
|
||||
int mca_base_param_register_int(char *type_name, char *module_name,
|
||||
char *param_name, char *mca_param_name,
|
||||
int default_value);
|
||||
int mca_base_param_register_string(char *type_name, char *module_name,
|
||||
char *param_name,
|
||||
char *mca_param_name,
|
||||
char *default_value);
|
||||
int mca_base_param_lookup_int(int index);
|
||||
char *mca_base_param_lookup_string(int index);
|
||||
int mca_base_param_find(char *type, char *module, char *param);
|
||||
int mca_base_param_finalize(void);
|
||||
|
||||
int mca_base_param_kv_associate(int index, int keyval);
|
||||
int mca_base_param_kv_lookup_int(int index, MPI_Comm comm);
|
||||
char *mca_base_param_kv_lookup_string(int index, MPI_Comm comm);
|
||||
|
||||
#if defined(c_plusplus) || defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* LAM_MCA_H */
|
99
src/mca/mpi/pml/pml.h
Обычный файл
99
src/mca/mpi/pml/pml.h
Обычный файл
@ -0,0 +1,99 @@
|
||||
/*
|
||||
* $HEADER$
|
||||
*/
|
||||
|
||||
#ifndef LAM_MCA_PML_H
|
||||
#define LAM_MCA_PML_H
|
||||
|
||||
#include "mca/mca.h"
|
||||
#include "proc.h"
|
||||
#include "lam.h"
|
||||
#include "lam/lfc/list.h"
|
||||
|
||||
|
||||
/*
|
||||
* Types for each API function pointer.
|
||||
*
|
||||
* JMS: This is an example -- there will need to be a query function,
|
||||
* but I have no idea what the arguments will be.
|
||||
*/
|
||||
|
||||
typedef int (*mca_pml_query_fn_t)(int *priority, int *thread_min,
|
||||
int *thread_max);
|
||||
|
||||
/*
|
||||
* Action functions
|
||||
*
|
||||
* JMS: Again, this is an example.
|
||||
*/
|
||||
|
||||
typedef int (*mci_pml_addprocs_fn_t)(lam_proc_t **procs, int nprocs);
|
||||
typedef const struct mca_pml_actions_1_0_0 *
|
||||
(*mca_pml_init_1_0_0_fn_t)(struct _proc **procs, int nprocs,
|
||||
int *max_tag, int *max_cid);
|
||||
|
||||
|
||||
/*
|
||||
* Struct used to pass pml MCA information from the each pml instance
|
||||
* back to the MCA framework.
|
||||
*/
|
||||
|
||||
typedef struct mca_pml_1_0_0 {
|
||||
mca_1_0_0_t mp_meta_info;
|
||||
|
||||
/* pml API function pointers */
|
||||
|
||||
mca_pml_query_fn_t mp_query;
|
||||
mca_pml_init_1_0_0_fn_t mp_init;
|
||||
} mca_pml_1_0_0_t;
|
||||
|
||||
typedef struct mca_pml_actions_1_0_0 {
|
||||
|
||||
/* pml API action function pointers */
|
||||
|
||||
mca_pml_addprocs_fn_t mpa_addprocs;
|
||||
|
||||
/* Flags */
|
||||
|
||||
bool mp_tv_queue_support;
|
||||
} mca_pml_actions_1_0_0_t;
|
||||
|
||||
|
||||
/*
|
||||
* Set the default type to use version 1.1.0 of the SSI RPI struct
|
||||
*/
|
||||
|
||||
typedef mca_pml_1_1_0_t mca_pml_t;
|
||||
typedef mca_pml_actions_1_1_0_t mca_pml_actions_t;
|
||||
|
||||
|
||||
/*
|
||||
* Global functions for MCA: overall pml open and close
|
||||
*/
|
||||
|
||||
#if defined(c_plusplus) || defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
int mca_pml_base_close(void);
|
||||
int mca_pml_base_open(lam_cmd_line_t *cmd);
|
||||
int mca_pml_base_query(void);
|
||||
int mca_pml_base_init(void);
|
||||
#if defined(c_plusplus) || defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Public variables
|
||||
*/
|
||||
|
||||
extern lam_list_t *lam_ssi_rpi_base_opened;
|
||||
extern lam_list_t *lam_ssi_rpi_base_available;
|
||||
|
||||
/*
|
||||
* Global instance of array of pointers to lam_ssi_rpi_t. Will
|
||||
* effectively be filled in by configure.
|
||||
*/
|
||||
|
||||
extern const mca_t **mca_pml_modules;
|
||||
|
||||
#endif /* LAM_MCA_PML_H */
|
99
src/mca/mpi/ptl/ptl.h
Обычный файл
99
src/mca/mpi/ptl/ptl.h
Обычный файл
@ -0,0 +1,99 @@
|
||||
/*
|
||||
* $HEADER$
|
||||
*/
|
||||
|
||||
#ifndef LAM_MCA_PTL_H
|
||||
#define LAM_MCA_PTL_H
|
||||
|
||||
#include "mca/mca.h"
|
||||
#include "proc.h"
|
||||
#include "lam.h"
|
||||
#include "lam/lfc/list.h"
|
||||
|
||||
|
||||
/*
|
||||
* Types for each API function pointer.
|
||||
*
|
||||
* JMS: This is an example -- there will need to be a query function,
|
||||
* but I have no idea what the arguments will be.
|
||||
*/
|
||||
|
||||
typedef int (*mca_ptl_query_fn_t)(int *priority, int *thread_min,
|
||||
int *thread_max);
|
||||
|
||||
/*
|
||||
* Action functions
|
||||
*
|
||||
* JMS: Again, this is an example.
|
||||
*/
|
||||
|
||||
typedef int (*mci_ptl_addprocs_fn_t)(lam_proc_t **procs, int nprocs);
|
||||
typedef const struct mca_ptl_actions_1_0_0 *
|
||||
(*mca_ptl_init_1_0_0_fn_t)(struct _proc **procs, int nprocs,
|
||||
int *max_tag, int *max_cid);
|
||||
|
||||
|
||||
/*
|
||||
* Struct used to pass ptl MCA information from the each ptl instance
|
||||
* back to the MCA framework.
|
||||
*/
|
||||
|
||||
typedef struct mca_ptl_1_0_0 {
|
||||
mca_1_0_0_t mp_meta_info;
|
||||
|
||||
/* ptl API function pointers */
|
||||
|
||||
mca_ptl_query_fn_t mp_query;
|
||||
mca_ptl_init_1_0_0_fn_t mp_init;
|
||||
} mca_ptl_1_0_0_t;
|
||||
|
||||
typedef struct mca_ptl_actions_1_0_0 {
|
||||
|
||||
/* ptl API action function pointers */
|
||||
|
||||
mca_ptl_addprocs_fn_t mpa_addprocs;
|
||||
|
||||
/* Flags */
|
||||
|
||||
bool mp_tv_queue_support;
|
||||
} mca_ptl_actions_1_0_0_t;
|
||||
|
||||
|
||||
/*
|
||||
* Set the default type to use version 1.1.0 of the SSI RPI struct
|
||||
*/
|
||||
|
||||
typedef mca_ptl_1_1_0_t mca_ptl_t;
|
||||
typedef mca_ptl_actions_1_1_0_t mca_ptl_actions_t;
|
||||
|
||||
|
||||
/*
|
||||
* Global functions for MCA: overall ptl open and close
|
||||
*/
|
||||
|
||||
#if defined(c_plusplus) || defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
int mca_ptl_base_close(void);
|
||||
int mca_ptl_base_open(lam_cmd_line_t *cmd);
|
||||
int mca_ptl_base_query(void);
|
||||
int mca_ptl_base_init(void);
|
||||
#if defined(c_plusplus) || defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Public variables
|
||||
*/
|
||||
|
||||
extern lam_list_t *lam_ssi_rpi_base_opened;
|
||||
extern lam_list_t *lam_ssi_rpi_base_available;
|
||||
|
||||
/*
|
||||
* Global instance of array of pointers to lam_ssi_rpi_t. Will
|
||||
* effectively be filled in by configure.
|
||||
*/
|
||||
|
||||
extern const mca_t **mca_ptl_modules;
|
||||
|
||||
#endif /* LAM_MCA_PTL_H */
|
Загрузка…
x
Ссылка в новой задаче
Block a user