1
1

- intra-comms tested, several minor bugs fixed

- cid allocation for intra-comms is now enabled and working

This commit was SVN r1750.
Этот коммит содержится в:
Edgar Gabriel 2004-07-15 20:55:15 +00:00
родитель 9e4f0fd9f9
Коммит e190c49722
3 изменённых файлов: 23 добавлений и 34 удалений

Просмотреть файл

@ -97,10 +97,6 @@ ompi_communicator_t * ompi_comm_set ( ompi_communicator_t* oldcomm,
snprintf(newcomm->c_name, MPI_MAX_OBJECT_NAME, "MPI COMMUNICATOR %d",
newcomm->c_contextid);
/* Determine cube_dim */
newcomm->c_cube_dim =
ompi_cube_dim(newcomm->c_local_group->grp_proc_count);
/* Set Topology, if required */
if ( NULL != topomodule ) {
@ -115,7 +111,7 @@ ompi_communicator_t * ompi_comm_set ( ompi_communicator_t* oldcomm,
/* Copy attributes and call according copy functions,
if required */
ompi_attr_hash_init(&newcomm->c_keyhash);
if ( attr != NULL ) {
if ( NULL != attr ) {
ompi_attr_copy_all (COMM_ATTR, oldcomm, newcomm, attr, newcomm->c_keyhash);
}
@ -260,7 +256,7 @@ int ompi_comm_create ( ompi_communicator_t *comm, ompi_group_t *group,
all processes of the original comm have to participate in
that function call. Additionally, all errhandler stuff etc.
has to be set to make ompi_comm_free happy */
if ( MPI_PROC_NULL == newcomp->c_local_group->grp_my_rank ) {
if ( MPI_UNDEFINED == newcomp->c_local_group->grp_my_rank ) {
ompi_comm_free ( &newcomp );
}

Просмотреть файл

@ -21,23 +21,6 @@
#define OMPI_COMM_CID_TAG 1011
#define OMPI_MAX_COMM 32768
#ifndef HAVE_COLLECTIVES
int ompi_comm_nextcid ( ompi_communicator_t* newcomm,
ompi_communicator_t* comm,
ompi_communicator_t* bridgecomm,
void* local_leader,
void* remote_leader,
int mode )
{
/* set the according values to the newcomm */
newcomm->c_contextid = comm->c_contextid + 10;
ompi_pointer_array_set_item (&ompi_mpi_communicators,
newcomm->c_contextid,
newcomm);
return ( MPI_SUCCESS );
}
#else
/**
* These functions make sure, that we determine the global result over
* an intra communicators (simple), an inter-communicator and a
@ -60,15 +43,15 @@ static int ompi_comm_allreduce_inter (int *inbuf, int *outbuf, int count,
ompi_communicator_t *bridgecomm,
void* local_leader, void* remote_leader );
static int ompi_comm_allreduce_intra_bridge ( int *inbuf, int* outbuf, int count,
ompi_op_t *op, ompi_communicator_t *intercomm,
ompi_communicator_t *bridgecomm,
void* local_leader, void* remote_leader );
static int ompi_comm_allreduce_intra_bridge(int *inbuf, int* outbuf, int count,
ompi_op_t *op, ompi_communicator_t *intercomm,
ompi_communicator_t *bridgecomm,
void* local_leader, void* remote_leader );
static int ompi_comm_allreduce_intra_oob ( int *inbuf, int* outbuf, int count,
ompi_op_t *op, ompi_communicator_t *intercomm,
ompi_communicator_t *bridgecomm,
void* local_leader, void* remote_leader );
static int ompi_comm_allreduce_intra_oob (int *inbuf, int* outbuf, int count,
ompi_op_t *op, ompi_communicator_t *intercomm,
ompi_communicator_t *bridgecomm,
void* local_leader, void* remote_leader );
int ompi_comm_nextcid ( ompi_communicator_t* newcomm,
@ -98,15 +81,19 @@ int ompi_comm_nextcid ( ompi_communicator_t* newcomm,
case OMPI_COMM_CID_INTRA:
allredfnct = (ompi_comm_cid_allredfct*)ompi_comm_allreduce_intra;
break;
#if 0
case OMPI_COMM_CID_INTER:
allredfnct = (ompi_comm_cid_allredfct*)ompi_comm_allreduce_inter;
break;
#endif
case OMPI_COMM_CID_INTRA_BRIDGE:
allredfnct = (ompi_comm_cid_allredfct*)ompi_comm_allreduce_intra_bridge;
break;
#if 0
case OMPI_COMM_CID_INTRA_OOB:
allredfnct = (ompi_comm_cid_allredfct*)ompi_comm_allreduce_intra_oob;
break;
#endif
default:
return MPI_UNDEFINED;
break;
@ -125,7 +112,7 @@ int ompi_comm_nextcid ( ompi_communicator_t* newcomm,
}
(allredfnct)(&nextlocal_cid, &nextcid, 1, MPI_MAX, comm, bridgecomm,
local_leader, remote_leader );
local_leader, remote_leader );
if (nextcid == nextlocal_cid) {
response = 1; /* fine with me */
}
@ -152,6 +139,7 @@ int ompi_comm_nextcid ( ompi_communicator_t* newcomm,
/* set the according values to the newcomm */
newcomm->c_contextid = nextcid;
newcomm->c_f_to_c_index = newcomm->c_contextid;
ompi_pointer_array_set_item (&ompi_mpi_communicators, nextcid, newcomm);
return (MPI_SUCCESS);
@ -174,6 +162,7 @@ static int ompi_comm_allreduce_intra ( int *inbuf, int *outbuf, int count,
comm );
}
#if 0
/* Arguments not used in this implementation:
* - bridgecomm
* - local_leader
@ -297,6 +286,7 @@ static int ompi_comm_allreduce_inter (int *inbuf, int *outbuf, int count,
}
return (rc);
}
#endif
/* Arguments not used in this implementation:
all arguments are in use.
@ -386,6 +376,7 @@ static int ompi_comm_allreduce_intra_bridge (int *inbuf, int *outbuf, int count,
return (rc);
}
#ifdef HAVE_OOB
/* Arguments not used in this implementation:
* - bridgecomm
*
@ -468,4 +459,5 @@ static int ompi_comm_allreduce_intra_oob (int *inbuf, int *outbuf, int count,
return (rc);
}
#endif

Просмотреть файл

@ -145,6 +145,7 @@ ompi_communicator_t *ompi_comm_allocate ( int local_size, int remote_size )
* we can always use the remote group
*/
new_comm->c_remote_group = new_comm->c_local_group;
OBJ_RETAIN(new_comm->c_remote_group);
}
/* fill in the inscribing hyper-cube dimensions */
@ -227,9 +228,9 @@ static void ompi_comm_destruct(ompi_communicator_t* comm)
/* reset the ompi_comm_f_to_c_table entry */
if ( NULL != ompi_pointer_array_get_item ( &ompi_mpi_communicators,
comm->c_f_to_c_index )) {
comm->c_f_to_c_index )) {
ompi_pointer_array_set_item ( &ompi_mpi_communicators,
comm->c_f_to_c_index, NULL);
comm->c_f_to_c_index, NULL);
}