reorg - filling in stubs
This commit was SVN r372.
Этот коммит содержится в:
родитель
ccc8df76f4
Коммит
4fb95e5edf
@ -28,11 +28,6 @@ typedef enum {
|
||||
MCA_PML_BASE_SEND_READY
|
||||
} mca_pml_base_send_mode_t;
|
||||
|
||||
|
||||
struct mca_pml_base_status_t {
|
||||
};
|
||||
typedef struct mca_pml_base_status_t mca_pml_base_status_t;
|
||||
|
||||
#define LAM_ANY_TAG MPI_ANY_TAG
|
||||
|
||||
/**
|
||||
@ -128,7 +123,7 @@ typedef int (*mca_pml_base_test_fn_t)(
|
||||
|
||||
typedef int (*mca_pml_base_wait_fn_t)(
|
||||
lam_request_t* request,
|
||||
mca_pml_base_status_t* status
|
||||
lam_status_public_t* status
|
||||
);
|
||||
|
||||
|
||||
|
@ -16,6 +16,7 @@ libmca_pml_teg_la_SOURCES = \
|
||||
pml_teg.h \
|
||||
pml_teg_comm.h \
|
||||
pml_teg_isend.c \
|
||||
pml_teg_module.c \
|
||||
pml_teg_proc.c \
|
||||
pml_teg_proc.h \
|
||||
pml_teg_progress.c \
|
||||
|
@ -1,45 +1,12 @@
|
||||
#include "lam/util/malloc.h"
|
||||
#include "mca/mpi/pml/pml.h"
|
||||
#include "mca/mpi/ptl/ptl.h"
|
||||
#include "mca/mpi/ptl/base/ptl_base_comm.h"
|
||||
#include "mca/mpi/ptl/base/ptl_base_sendreq.h"
|
||||
#include "mca/mpi/ptl/base/ptl_base_recvreq.h"
|
||||
#include "pml_teg.h"
|
||||
#include "pml_teg_proc.h"
|
||||
|
||||
#define mca_pml_teg_param_register_int(n,v) \
|
||||
mca_base_param_lookup_int( \
|
||||
mca_base_param_register_int("pml","teg",n,0,v))
|
||||
|
||||
|
||||
mca_pml_base_module_1_0_0_t mca_pml_teg_module = {
|
||||
/* First, the mca_base_module_t struct containing meta information
|
||||
about the module itself */
|
||||
|
||||
{
|
||||
/* Indicate that we are a pml v1.0.0 module (which also implies a
|
||||
specific MCA version) */
|
||||
|
||||
MCA_PML_BASE_VERSION_1_0_0,
|
||||
|
||||
"teg", /* MCA module name */
|
||||
1, /* MCA module major version */
|
||||
0, /* MCA module minor version */
|
||||
0, /* MCA module release version */
|
||||
mca_pml_teg_open, /* module open */
|
||||
mca_pml_teg_close /* module close */
|
||||
},
|
||||
|
||||
/* Next the MCA v1.0.0 module meta data */
|
||||
|
||||
{
|
||||
/* Whether the module is checkpointable or not */
|
||||
|
||||
false
|
||||
},
|
||||
|
||||
mca_pml_teg_init /* module init */
|
||||
};
|
||||
|
||||
|
||||
mca_pml_teg_t mca_pml_teg = {
|
||||
{
|
||||
@ -60,32 +27,21 @@ mca_pml_teg_t mca_pml_teg = {
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* some comment
|
||||
*
|
||||
* @param foo description
|
||||
* @return
|
||||
*
|
||||
* long description
|
||||
*/
|
||||
|
||||
int mca_pml_teg_open(void)
|
||||
int mca_pml_teg_add_comm(lam_communicator_t* comm)
|
||||
{
|
||||
/* allocate pml specific comm data */
|
||||
struct mca_pml_comm_t* pml_comm = (mca_pml_comm_t*)LAM_MALLOC(sizeof(mca_pml_comm_t));
|
||||
mca_pml_ptl_comm_init(pml_comm);
|
||||
comm->c_pml_comm = pml_comm;
|
||||
return LAM_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
mca_pml_t* mca_pml_teg_init(int* priority, int* min_thread, int* max_thread)
|
||||
int mca_pml_teg_del_comm(lam_communicator_t* comm)
|
||||
{
|
||||
*priority = 0;
|
||||
*min_thread = 0;
|
||||
*max_thread = 0;
|
||||
mca_pml_teg.teg_ptls = 0;
|
||||
mca_pml_teg.teg_num_ptls = 0;
|
||||
lam_list_init(&mca_pml_teg.teg_pending_acks);
|
||||
lam_list_init(&mca_pml_teg.teg_incomplete_sends);
|
||||
lam_mutex_init(&mca_pml_teg.teg_lock);
|
||||
return &mca_pml_teg.super;
|
||||
LAM_FREE(comm->c_pml_comm);
|
||||
comm->c_pml_comm = 0;
|
||||
return LAM_SUCCESS;
|
||||
}
|
||||
|
||||
int mca_pml_teg_add_ptls(struct mca_ptl_t** ptls, size_t nptls)
|
||||
@ -95,16 +51,6 @@ int mca_pml_teg_add_ptls(struct mca_ptl_t** ptls, size_t nptls)
|
||||
return LAM_SUCCESS;
|
||||
}
|
||||
|
||||
int mca_pml_teg_add_comm(lam_communicator_t* comm)
|
||||
{
|
||||
return LAM_SUCCESS;
|
||||
}
|
||||
|
||||
int mca_pml_teg_del_comm(lam_communicator_t* comm)
|
||||
{
|
||||
return LAM_SUCCESS;
|
||||
}
|
||||
|
||||
int mca_pml_teg_add_procs(lam_proc_t** procs, size_t nprocs)
|
||||
{
|
||||
size_t i;
|
||||
@ -112,9 +58,11 @@ int mca_pml_teg_add_procs(lam_proc_t** procs, size_t nprocs)
|
||||
for(i=0; i<nprocs; i++) {
|
||||
lam_proc_t *proc = procs[i];
|
||||
if(proc->proc_pml == 0) {
|
||||
|
||||
/* allocate pml specific proc data */
|
||||
mca_pml_proc_t* proc_pml = (mca_pml_proc_t*)LAM_MALLOC(sizeof(mca_pml_proc_t));
|
||||
mca_pml_teg_proc_init(proc_pml);
|
||||
|
||||
/* preallocate space in array for max number of ptls */
|
||||
mca_ptl_array_reserve(&proc_pml->proc_ptl_first, mca_pml_teg.teg_num_ptls);
|
||||
mca_ptl_array_reserve(&proc_pml->proc_ptl_first, mca_pml_teg.teg_num_ptls);
|
||||
@ -131,3 +79,8 @@ int mca_pml_teg_add_procs(lam_proc_t** procs, size_t nprocs)
|
||||
return LAM_SUCCESS;
|
||||
}
|
||||
|
||||
int mca_pml_teg_module_fini(void)
|
||||
{
|
||||
return LAM_SUCCESS;
|
||||
}
|
||||
|
||||
|
@ -31,7 +31,6 @@ struct mca_pml_teg_t {
|
||||
size_t teg_num_ptls;
|
||||
|
||||
lam_list_t teg_incomplete_sends;
|
||||
lam_list_t teg_pending_acks;
|
||||
lam_mutex_t teg_lock;
|
||||
};
|
||||
typedef struct mca_pml_teg_t mca_pml_teg_t;
|
||||
@ -46,16 +45,17 @@ extern mca_pml_teg_t mca_pml_teg;
|
||||
extern mca_pml_base_module_1_0_0_t mca_pml_teg_module_1_0_0_0;
|
||||
|
||||
|
||||
extern int mca_pml_teg_open(void);
|
||||
extern int mca_pml_teg_close(void);
|
||||
extern int mca_pml_teg_module_open(void);
|
||||
extern int mca_pml_teg_module_close(void);
|
||||
|
||||
extern mca_pml_t* mca_pml_teg_init(
|
||||
extern mca_pml_t* mca_pml_teg_module_init(
|
||||
int *priority,
|
||||
int *max_tag,
|
||||
int *max_cid
|
||||
);
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* PML interface functions.
|
||||
*/
|
||||
@ -143,7 +143,7 @@ extern int mca_pml_teg_test(
|
||||
|
||||
extern int mca_pml_teg_wait(
|
||||
lam_request_t* request,
|
||||
mca_pml_base_status_t* status
|
||||
lam_status_public_t* status
|
||||
);
|
||||
|
||||
|
||||
|
72
src/mca/mpi/pml/teg/src/pml_teg_module.c
Обычный файл
72
src/mca/mpi/pml/teg/src/pml_teg_module.c
Обычный файл
@ -0,0 +1,72 @@
|
||||
#include "mpi.h"
|
||||
#include "lam/util/malloc.h"
|
||||
#include "mca/mpi/pml/pml.h"
|
||||
#include "mca/mpi/ptl/ptl.h"
|
||||
#include "mca/mpi/ptl/base/ptl_base_sendreq.h"
|
||||
#include "mca/mpi/ptl/base/ptl_base_recvreq.h"
|
||||
#include "pml_teg.h"
|
||||
#include "pml_teg_proc.h"
|
||||
|
||||
#define mca_pml_teg_param_register_int(n,v) \
|
||||
mca_base_param_lookup_int( \
|
||||
mca_base_param_register_int("pml","teg",n,0,v))
|
||||
|
||||
|
||||
mca_pml_base_module_1_0_0_t mca_pml_teg_module = {
|
||||
/* First, the mca_base_module_t struct containing meta information
|
||||
about the module itself */
|
||||
|
||||
{
|
||||
/* Indicate that we are a pml v1.0.0 module (which also implies a
|
||||
specific MCA version) */
|
||||
|
||||
MCA_PML_BASE_VERSION_1_0_0,
|
||||
|
||||
"teg", /* MCA module name */
|
||||
1, /* MCA module major version */
|
||||
0, /* MCA module minor version */
|
||||
0, /* MCA module release version */
|
||||
mca_pml_teg_module_open, /* module open */
|
||||
mca_pml_teg_module_close /* module close */
|
||||
},
|
||||
|
||||
/* Next the MCA v1.0.0 module meta data */
|
||||
|
||||
{
|
||||
/* Whether the module is checkpointable or not */
|
||||
|
||||
false
|
||||
},
|
||||
|
||||
mca_pml_teg_module_init /* module init */
|
||||
};
|
||||
|
||||
|
||||
int mca_pml_teg_module_open(void)
|
||||
{
|
||||
return LAM_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
int mca_pml_teg_module_close(void)
|
||||
{
|
||||
return LAM_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
mca_pml_t* mca_pml_teg_module_init(int* priority, int* min_thread, int* max_thread)
|
||||
{
|
||||
*priority = 0;
|
||||
*min_thread = MPI_THREAD_SINGLE;
|
||||
*max_thread = MPI_THREAD_MULTIPLE;
|
||||
|
||||
mca_pml_teg.teg_ptl_modules = 0;
|
||||
mca_pml_teg.teg_num_ptl_modules = 0;
|
||||
mca_pml_teg.teg_ptls = 0;
|
||||
mca_pml_teg.teg_num_ptls = 0;
|
||||
|
||||
lam_list_init(&mca_pml_teg.teg_incomplete_sends);
|
||||
lam_mutex_init(&mca_pml_teg.teg_lock);
|
||||
return &mca_pml_teg.super;
|
||||
}
|
||||
|
@ -4,6 +4,18 @@
|
||||
|
||||
int mca_pml_teg_progress(void)
|
||||
{
|
||||
mca_ptl_base_tstamp_t tstamp;
|
||||
size_t i;
|
||||
|
||||
/*
|
||||
* Progress each of the PTL modules
|
||||
*/
|
||||
for(i=0; i<mca_pml_teg.teg_num_ptl_modules; i++)
|
||||
mca_pml_teg.teg_ptl_modules[i]->ptlm_progress(tstamp);
|
||||
|
||||
/*
|
||||
* Complete any pending send requests.
|
||||
*/
|
||||
THREAD_LOCK(&mca_pml_teg.teg_lock);
|
||||
mca_ptl_base_send_request_t* req;
|
||||
for(req = (mca_ptl_base_send_request_t*)lam_list_get_first(&mca_pml_teg.teg_incomplete_sends);
|
||||
@ -13,8 +25,7 @@ int mca_pml_teg_progress(void)
|
||||
bool complete;
|
||||
int rc = mca_pml_teg_send_request_schedule(req, &complete);
|
||||
if(rc != LAM_SUCCESS) {
|
||||
THREAD_UNLOCK(&mca_pml_teg.teg_lock);
|
||||
return rc;
|
||||
continue;
|
||||
}
|
||||
if(complete) {
|
||||
req = (mca_ptl_base_send_request_t*)lam_list_remove(
|
||||
|
@ -9,6 +9,7 @@ noinst_LTLIBRARIES = libmca_mpi_ptl_base.la
|
||||
# Source code files
|
||||
|
||||
headers = \
|
||||
ptl_base_comm.h \
|
||||
ptl_base_fragment.h \
|
||||
ptl_base_header.h \
|
||||
ptl_base_match.h \
|
||||
@ -18,6 +19,7 @@ headers = \
|
||||
|
||||
libmca_mpi_ptl_base_la_SOURCES = \
|
||||
$(headers) \
|
||||
ptl_base_comm.c \
|
||||
ptl_base_fragment.c \
|
||||
ptl_base_match.c \
|
||||
ptl_base_recvfrag.c \
|
||||
|
14
src/mca/mpi/ptl/base/ptl_base_comm.c
Обычный файл
14
src/mca/mpi/ptl/base/ptl_base_comm.c
Обычный файл
@ -0,0 +1,14 @@
|
||||
#include "ptl_base_comm.h"
|
||||
|
||||
|
||||
void mca_pml_ptl_comm_init(mca_pml_comm_t* comm)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
void mca_pml_ptl_comm_destroy(mca_pml_comm_t* comm)
|
||||
{
|
||||
|
||||
}
|
||||
|
@ -43,5 +43,8 @@ struct mca_pml_comm_t {
|
||||
typedef struct mca_pml_comm_t mca_pml_comm_t;
|
||||
|
||||
|
||||
extern void mca_pml_ptl_comm_init(struct mca_pml_comm_t*);
|
||||
extern void mca_pml_ptl_comm_destroy(struct mca_pml_comm_t*);
|
||||
|
||||
#endif
|
||||
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user