Last commit for TODAY ! At least the hello_world example work.
This commit was SVN r2111.
Этот коммит содержится в:
родитель
a74f35d76f
Коммит
11bca73ad4
@ -61,9 +61,6 @@ OBJ_CLASS_INSTANCE (mca_ptl_gm_send_request_t,
|
|||||||
|
|
||||||
OBJ_CLASS_INSTANCE (mca_ptl_gm_peer_t, ompi_list_item_t, NULL, NULL);
|
OBJ_CLASS_INSTANCE (mca_ptl_gm_peer_t, ompi_list_item_t, NULL, NULL);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@ -80,9 +77,11 @@ mca_ptl_gm_add_procs (struct mca_ptl_base_module_t *ptl,
|
|||||||
mca_ptl_gm_proc_t *ptl_proc;
|
mca_ptl_gm_proc_t *ptl_proc;
|
||||||
mca_ptl_gm_peer_t *ptl_peer;
|
mca_ptl_gm_peer_t *ptl_peer;
|
||||||
unsigned int lid;
|
unsigned int lid;
|
||||||
|
ompi_proc_t* local_proc = ompi_proc_local();
|
||||||
|
|
||||||
for (i = 0; i < nprocs; i++) {
|
for (i = 0; i < nprocs; i++) {
|
||||||
ompi_proc = ompi_procs[i];
|
ompi_proc = ompi_procs[i];
|
||||||
|
if( ompi_proc == local_proc ) continue;
|
||||||
ptl_proc =
|
ptl_proc =
|
||||||
mca_ptl_gm_proc_create ((mca_ptl_gm_module_t *) ptl,
|
mca_ptl_gm_proc_create ((mca_ptl_gm_module_t *) ptl,
|
||||||
ompi_proc);
|
ompi_proc);
|
||||||
@ -97,38 +96,37 @@ mca_ptl_gm_add_procs (struct mca_ptl_base_module_t *ptl,
|
|||||||
return OMPI_ERR_UNREACH;
|
return OMPI_ERR_UNREACH;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* TODO: make this extensible to multiple nics */
|
/* TODO: make this extensible to multiple nics */
|
||||||
/* XXX: */
|
/* XXX: */
|
||||||
/* FIXME: */
|
/* FIXME: */
|
||||||
|
|
||||||
for (j=0; j < num_peer_ptls; j++)
|
for (j=0; j < num_peer_ptls; j++) {
|
||||||
{
|
/*XXX: check for self */
|
||||||
/*XXX: check for self */
|
|
||||||
|
|
||||||
ptl_peer = OBJ_NEW (mca_ptl_gm_peer_t);
|
ptl_peer = OBJ_NEW (mca_ptl_gm_peer_t);
|
||||||
if (NULL == ptl_peer) {
|
if (NULL == ptl_peer) {
|
||||||
OMPI_THREAD_UNLOCK (&ptl_proc->proc_lock);
|
OMPI_THREAD_UNLOCK (&ptl_proc->proc_lock);
|
||||||
return OMPI_ERR_OUT_OF_RESOURCE;
|
return OMPI_ERR_OUT_OF_RESOURCE;
|
||||||
}
|
}
|
||||||
|
|
||||||
ptl_peer->peer_ptl = (mca_ptl_gm_module_t *) ptl;
|
ptl_peer->peer_ptl = (mca_ptl_gm_module_t *) ptl;
|
||||||
ptl_peer->peer_proc = ptl_proc;
|
ptl_peer->peer_proc = ptl_proc;
|
||||||
ptl_peer->global_id = ptl_proc->proc_addrs->global_id;
|
ptl_peer->global_id = ptl_proc->proc_addrs->global_id;
|
||||||
ptl_peer->port_number = ptl_proc->proc_addrs->port_id;
|
ptl_peer->port_number = ptl_proc->proc_addrs->port_id;
|
||||||
if (GM_SUCCESS !=
|
if (GM_SUCCESS !=
|
||||||
gm_global_id_to_node_id (((mca_ptl_gm_module_t *) ptl)->my_port,
|
gm_global_id_to_node_id (((mca_ptl_gm_module_t *) ptl)->my_port,
|
||||||
ptl_proc->proc_addrs[j].global_id,
|
ptl_proc->proc_addrs[j].global_id,
|
||||||
&lid)) {
|
&lid)) {
|
||||||
ompi_output (0,
|
ompi_output (0,
|
||||||
"[%s:%d] error in converting global to local id \n", __FILE__, __LINE__);
|
"[%s:%d] error in converting global to local id \n", __FILE__, __LINE__);
|
||||||
|
|
||||||
}
|
}
|
||||||
ptl_peer->local_id = lid;
|
ptl_peer->local_id = lid;
|
||||||
|
|
||||||
ptl_proc->peer_arr[0] = ptl_peer;
|
ptl_proc->peer_arr[ptl_proc->proc_peer_count] = ptl_peer;
|
||||||
ptl_proc->proc_peer_count++;
|
ptl_proc->proc_peer_count++;
|
||||||
ptl_peer->peer_addr = ptl_proc->proc_addrs + i;
|
ptl_peer->peer_addr = ptl_proc->proc_addrs + i;
|
||||||
}
|
}
|
||||||
ompi_bitmap_set_bit (reachable, i);
|
ompi_bitmap_set_bit (reachable, i);
|
||||||
OMPI_THREAD_UNLOCK (&ptl_proc->proc_lock);
|
OMPI_THREAD_UNLOCK (&ptl_proc->proc_lock);
|
||||||
|
|
||||||
@ -137,9 +135,9 @@ mca_ptl_gm_add_procs (struct mca_ptl_base_module_t *ptl,
|
|||||||
/*printf ("Global_id\t local_id\t port_number\t process name \n");*/
|
/*printf ("Global_id\t local_id\t port_number\t process name \n");*/
|
||||||
/*fflush (stdout);*/
|
/*fflush (stdout);*/
|
||||||
/*printf ("%u %d %d %d\n", ptl_proc->peer_arr[0]->global_id,*/
|
/*printf ("%u %d %d %d\n", ptl_proc->peer_arr[0]->global_id,*/
|
||||||
/*ptl_proc->peer_arr[0]->local_id,*/
|
/*ptl_proc->peer_arr[0]->local_id,*/
|
||||||
/*ptl_proc->peer_arr[0]->port_number,
|
/*ptl_proc->peer_arr[0]->port_number,
|
||||||
* ptl_proc->proc_guid);*/
|
* ptl_proc->proc_guid);*/
|
||||||
/*fflush (stdout);*/
|
/*fflush (stdout);*/
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -148,9 +146,6 @@ mca_ptl_gm_add_procs (struct mca_ptl_base_module_t *ptl,
|
|||||||
return OMPI_SUCCESS;
|
return OMPI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@ -167,9 +162,6 @@ mca_ptl_gm_del_procs (struct mca_ptl_base_module_t *ptl,
|
|||||||
return OMPI_SUCCESS;
|
return OMPI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@ -208,12 +200,6 @@ mca_ptl_gm_request_init(struct mca_ptl_base_module_t *ptl,
|
|||||||
return OMPI_SUCCESS;
|
return OMPI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@ -167,8 +167,6 @@ void ptl_gm_ctrl_frag(struct mca_ptl_gm_module_t *ptl,
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
mca_ptl_gm_recv_frag_t* ptl_gm_data_frag( struct mca_ptl_gm_module_t *ptl,
|
mca_ptl_gm_recv_frag_t* ptl_gm_data_frag( struct mca_ptl_gm_module_t *ptl,
|
||||||
gm_recv_event_t* event )
|
gm_recv_event_t* event )
|
||||||
{
|
{
|
||||||
@ -201,14 +199,12 @@ mca_ptl_gm_recv_frag_t* ptl_gm_data_frag( struct mca_ptl_gm_module_t *ptl,
|
|||||||
&recv_frag->frag_recv.frag_base.frag_header.hdr_match,
|
&recv_frag->frag_recv.frag_base.frag_header.hdr_match,
|
||||||
&(recv_frag->frag_recv),
|
&(recv_frag->frag_recv),
|
||||||
NULL );
|
NULL );
|
||||||
|
if( matched ) {
|
||||||
|
mca_ptl_gm_matched( &(ptl->super), &(recv_frag->frag_recv) );
|
||||||
if (!matched) {
|
return NULL;
|
||||||
ompi_output(0,"matching receive not yet posted\n");
|
|
||||||
return recv_frag;
|
|
||||||
}
|
}
|
||||||
/* this one was matched => nothing more to do */
|
ompi_output(0,"matching receive not yet posted\n");
|
||||||
return NULL;
|
return recv_frag;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -249,7 +245,6 @@ int mca_ptl_gm_incoming_recv (mca_ptl_gm_component_t * gm_comp)
|
|||||||
|
|
||||||
for( i = 0; i< gm_comp->gm_num_ptl_modules; i++) {
|
for( i = 0; i< gm_comp->gm_num_ptl_modules; i++) {
|
||||||
ptl = gm_comp->gm_ptl_modules[i];
|
ptl = gm_comp->gm_ptl_modules[i];
|
||||||
|
|
||||||
event = gm_receive(ptl->my_port);
|
event = gm_receive(ptl->my_port);
|
||||||
|
|
||||||
switch (gm_ntohc(event->recv.type)) {
|
switch (gm_ntohc(event->recv.type)) {
|
||||||
@ -269,6 +264,8 @@ int mca_ptl_gm_incoming_recv (mca_ptl_gm_component_t * gm_comp)
|
|||||||
/* mark the fragment as having pending buffers */
|
/* mark the fragment as having pending buffers */
|
||||||
frag->have_allocated_buffer = true;
|
frag->have_allocated_buffer = true;
|
||||||
}
|
}
|
||||||
|
gm_provide_receive_buffer( ptl->my_port, gm_ntohp(event->recv.message),
|
||||||
|
GM_SIZE, GM_LOW_PRIORITY );
|
||||||
break;
|
break;
|
||||||
case GM_NO_RECV_EVENT:
|
case GM_NO_RECV_EVENT:
|
||||||
break;
|
break;
|
||||||
@ -277,9 +274,6 @@ int mca_ptl_gm_incoming_recv (mca_ptl_gm_component_t * gm_comp)
|
|||||||
gm_unknown(ptl->my_port, event);
|
gm_unknown(ptl->my_port, event);
|
||||||
|
|
||||||
}
|
}
|
||||||
/* Alway repost the message */
|
|
||||||
gm_provide_receive_buffer( ptl->my_port, gm_ntohp(event->recv.message),
|
|
||||||
GM_SIZE, GM_LOW_PRIORITY );
|
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -84,9 +84,9 @@ mca_ptl_gm_proc_create (mca_ptl_gm_module_t * ptl, ompi_proc_t * ompi_proc)
|
|||||||
|
|
||||||
ptl_proc = mca_ptl_gm_proc_lookup_ompi (ompi_proc);
|
ptl_proc = mca_ptl_gm_proc_lookup_ompi (ompi_proc);
|
||||||
if (ptl_proc != NULL)
|
if (ptl_proc != NULL)
|
||||||
{
|
{
|
||||||
return ptl_proc;
|
return ptl_proc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* only gm ptl opened */
|
/* only gm ptl opened */
|
||||||
@ -126,8 +126,7 @@ mca_ptl_gm_proc_create (mca_ptl_gm_module_t * ptl, ompi_proc_t * ompi_proc)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(NULL == mca_ptl_gm_component.gm_local && ompi_proc ==
|
if(NULL == mca_ptl_gm_component.gm_local && ompi_proc == ompi_proc_local() )
|
||||||
ompi_proc_local() )
|
|
||||||
mca_ptl_gm_component.gm_local = ptl_proc;
|
mca_ptl_gm_component.gm_local = ptl_proc;
|
||||||
|
|
||||||
return ptl_proc;
|
return ptl_proc;
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user