unimplemented routines
This commit was SVN r562.
Этот коммит содержится в:
родитель
cbe8bc5a78
Коммит
e47106e378
@ -35,20 +35,18 @@ mca_pml_teg_t mca_pml_teg = {
|
||||
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));
|
||||
if (0 == pml_comm) {
|
||||
mca_pml_comm_t* pml_comm = OBJ_CREATE(mca_pml_comm_t, &mca_pml_ptl_comm_cls);
|
||||
if (NULL == pml_comm) {
|
||||
return LAM_ERR_OUT_OF_RESOURCE;
|
||||
}
|
||||
#if TIM_HASNT_IMPLEMENTED_THIS_YET
|
||||
mca_pml_ptl_comm_init(pml_comm, comm->c_remote_group->g_proc_count);
|
||||
#endif
|
||||
mca_pml_ptl_comm_init_size(pml_comm, comm->c_remote_group->g_proc_count);
|
||||
comm->c_pml_comm = pml_comm;
|
||||
return LAM_SUCCESS;
|
||||
}
|
||||
|
||||
int mca_pml_teg_del_comm(lam_communicator_t* comm)
|
||||
{
|
||||
LAM_FREE(comm->c_pml_comm);
|
||||
OBJ_RELEASE(comm->c_pml_comm);
|
||||
comm->c_pml_comm = 0;
|
||||
return LAM_SUCCESS;
|
||||
}
|
||||
|
@ -9,8 +9,7 @@ int mca_pml_teg_irecv_init(
|
||||
int tag,
|
||||
bool persistent,
|
||||
struct lam_communicator_t* comm,
|
||||
struct lam_request_t **request
|
||||
)
|
||||
struct lam_request_t **request)
|
||||
{
|
||||
return LAM_ERROR;
|
||||
}
|
||||
@ -22,8 +21,7 @@ int mca_pml_teg_irecv(
|
||||
int src,
|
||||
int tag,
|
||||
struct lam_communicator_t* comm,
|
||||
struct lam_request_t **request
|
||||
)
|
||||
struct lam_request_t **request)
|
||||
{
|
||||
return LAM_ERROR;
|
||||
}
|
||||
|
@ -1,8 +1,8 @@
|
||||
#include "pml_teg.h"
|
||||
|
||||
|
||||
int mca_pml_teg_start(
|
||||
lam_request_t* request
|
||||
)
|
||||
lam_request_t* request)
|
||||
{
|
||||
return LAM_ERROR;
|
||||
}
|
||||
|
@ -1,12 +1,83 @@
|
||||
#include "ptl_base_comm.h"
|
||||
|
||||
|
||||
void mca_pml_ptl_comm_init(mca_pml_comm_t* comm, size_t size)
|
||||
{
|
||||
}
|
||||
lam_class_info_t mca_pml_ptl_comm_cls = {
|
||||
"mca_pml_comm_t",
|
||||
&lam_object_cls,
|
||||
(class_init_t)mca_pml_ptl_comm_init,
|
||||
(class_destroy_t)mca_pml_ptl_comm_destroy
|
||||
};
|
||||
|
||||
void mca_pml_ptl_comm_init(mca_pml_comm_t* comm)
|
||||
{
|
||||
SUPER_INIT(comm, &lam_object_cls);
|
||||
lam_list_init(&comm->wild_receives);
|
||||
}
|
||||
|
||||
void mca_pml_ptl_comm_destroy(mca_pml_comm_t* comm)
|
||||
{
|
||||
LAM_FREE(comm->c_msg_seq);
|
||||
LAM_FREE(comm->c_next_msg_seq);
|
||||
LAM_FREE(comm->c_matching_lock);
|
||||
LAM_FREE(comm->unexpected_frags);
|
||||
LAM_FREE(comm->unexpected_frags_lock);
|
||||
LAM_FREE(comm->frags_cant_match);
|
||||
LAM_FREE(comm->specific_receives);
|
||||
lam_list_destroy(&comm->wild_receives);
|
||||
SUPER_DESTROY(comm, &lam_object_cls);
|
||||
}
|
||||
|
||||
|
||||
int mca_pml_ptl_comm_init_size(mca_pml_comm_t* comm, size_t size)
|
||||
{
|
||||
size_t i;
|
||||
|
||||
/* send message sequence-number support - sender side */
|
||||
comm->c_msg_seq = (mca_ptl_base_sequence_t*)LAM_MALLOC(sizeof(mca_ptl_base_sequence_t) * size);
|
||||
if(NULL == comm->c_msg_seq)
|
||||
return LAM_ERR_OUT_OF_RESOURCE;
|
||||
|
||||
/* send message sequence-number support - receiver side */
|
||||
comm->c_next_msg_seq = (mca_ptl_base_sequence_t*)LAM_MALLOC(sizeof(mca_ptl_base_sequence_t) * size);
|
||||
if(NULL == comm->c_next_msg_seq)
|
||||
return LAM_ERR_OUT_OF_RESOURCE;
|
||||
|
||||
/* matching lock */
|
||||
comm->c_matching_lock = (lam_mutex_t*)LAM_MALLOC(sizeof(lam_mutex_t) * size);
|
||||
if(NULL == comm->c_matching_lock)
|
||||
return LAM_ERR_OUT_OF_RESOURCE;
|
||||
for(i=0; i<size; i++)
|
||||
lam_mutex_init(comm->c_matching_lock+i);
|
||||
|
||||
/* unexpected fragments queues */
|
||||
comm->unexpected_frags = (lam_list_t*)LAM_MALLOC(sizeof(lam_list_t) * size);
|
||||
if(NULL == comm->unexpected_frags)
|
||||
return LAM_ERR_OUT_OF_RESOURCE;
|
||||
for(i=0; i<size; i++)
|
||||
lam_list_init(comm->unexpected_frags+i);
|
||||
|
||||
/* these locks are needed to avoid a probe interfering with a match */
|
||||
comm->unexpected_frags_lock = (lam_mutex_t*)LAM_MALLOC(sizeof(lam_mutex_t) * size);
|
||||
if(NULL == comm->unexpected_frags_lock)
|
||||
return LAM_ERR_OUT_OF_RESOURCE;
|
||||
for(i=0; i<size; i++)
|
||||
lam_mutex_init(comm->unexpected_frags_lock+i);
|
||||
|
||||
/* out-of-order fragments queues */
|
||||
comm->frags_cant_match = (lam_list_t*)LAM_MALLOC(sizeof(lam_list_t) * size);
|
||||
if(NULL == comm->frags_cant_match)
|
||||
return LAM_ERR_OUT_OF_RESOURCE;
|
||||
for(i=0; i<size; i++)
|
||||
lam_list_init(comm->frags_cant_match+i);
|
||||
|
||||
/* queues of unmatched specific (source process specified) receives */
|
||||
comm->specific_receives = (lam_list_t*)LAM_MALLOC(sizeof(lam_list_t) * size);
|
||||
if(NULL == comm->specific_receives)
|
||||
return LAM_ERR_OUT_OF_RESOURCE;
|
||||
for(i=0; i<size; i++)
|
||||
lam_list_init(comm->specific_receives+i);
|
||||
|
||||
return LAM_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
|
@ -10,9 +10,10 @@
|
||||
* specific to the PML.
|
||||
*/
|
||||
|
||||
extern lam_class_info_t mca_ptl_comm_cls;
|
||||
extern lam_class_info_t mca_pml_ptl_comm_cls;
|
||||
|
||||
struct mca_pml_comm_t {
|
||||
lam_object_t super;
|
||||
|
||||
/* send message sequence-number support - sender side */
|
||||
mca_ptl_base_sequence_t *c_msg_seq;
|
||||
@ -43,7 +44,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*, size_t);
|
||||
extern void mca_pml_ptl_comm_init(struct mca_pml_comm_t*);
|
||||
extern int mca_pml_ptl_comm_init_size(struct mca_pml_comm_t*, size_t);
|
||||
extern void mca_pml_ptl_comm_destroy(struct mca_pml_comm_t*);
|
||||
|
||||
#endif
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user