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", snprintf(newcomm->c_name, MPI_MAX_OBJECT_NAME, "MPI COMMUNICATOR %d",
newcomm->c_contextid); newcomm->c_contextid);
/* Determine cube_dim */
newcomm->c_cube_dim =
ompi_cube_dim(newcomm->c_local_group->grp_proc_count);
/* Set Topology, if required */ /* Set Topology, if required */
if ( NULL != topomodule ) { if ( NULL != topomodule ) {
@ -115,7 +111,7 @@ ompi_communicator_t * ompi_comm_set ( ompi_communicator_t* oldcomm,
/* Copy attributes and call according copy functions, /* Copy attributes and call according copy functions,
if required */ if required */
ompi_attr_hash_init(&newcomm->c_keyhash); 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); 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 all processes of the original comm have to participate in
that function call. Additionally, all errhandler stuff etc. that function call. Additionally, all errhandler stuff etc.
has to be set to make ompi_comm_free happy */ 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 ); ompi_comm_free ( &newcomp );
} }

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

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

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

@ -145,6 +145,7 @@ ompi_communicator_t *ompi_comm_allocate ( int local_size, int remote_size )
* we can always use the remote group * we can always use the remote group
*/ */
new_comm->c_remote_group = new_comm->c_local_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 */ /* fill in the inscribing hyper-cube dimensions */