pedantic indentation...
This commit was SVN r14251.
Этот коммит содержится в:
родитель
b304ae5fba
Коммит
f0e6a28a1f
@ -110,8 +110,7 @@ int ompi_comm_set ( ompi_communicator_t *newcomm,
|
|||||||
newcomm->c_flags |= OMPI_COMM_INTER;
|
newcomm->c_flags |= OMPI_COMM_INTER;
|
||||||
if ( OMPI_COMM_IS_INTRA(oldcomm) ) {
|
if ( OMPI_COMM_IS_INTRA(oldcomm) ) {
|
||||||
ompi_comm_dup(oldcomm, &newcomm->c_local_comm,1);
|
ompi_comm_dup(oldcomm, &newcomm->c_local_comm,1);
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
ompi_comm_dup(oldcomm->c_local_comm, &newcomm->c_local_comm,1);
|
ompi_comm_dup(oldcomm->c_local_comm, &newcomm->c_local_comm,1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -139,10 +138,12 @@ int ompi_comm_set ( ompi_communicator_t *newcomm,
|
|||||||
* another function in this file.
|
* another function in this file.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (OMPI_COMM_IS_CART ( oldcomm ) )
|
if (OMPI_COMM_IS_CART ( oldcomm ) ) {
|
||||||
newcomm->c_flags |= OMPI_COMM_CART;
|
newcomm->c_flags |= OMPI_COMM_CART;
|
||||||
if (OMPI_COMM_IS_GRAPH ( oldcomm ) )
|
}
|
||||||
|
if (OMPI_COMM_IS_GRAPH ( oldcomm ) ) {
|
||||||
newcomm->c_flags |= OMPI_COMM_GRAPH;
|
newcomm->c_flags |= OMPI_COMM_GRAPH;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Now I have to set the information on the topology from the previous
|
* Now I have to set the information on the topology from the previous
|
||||||
@ -279,8 +280,7 @@ int ompi_comm_create ( ompi_communicator_t *comm, ompi_group_t *group,
|
|||||||
}
|
}
|
||||||
mode = OMPI_COMM_CID_INTER;
|
mode = OMPI_COMM_CID_INTER;
|
||||||
|
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
rsize = 0;
|
rsize = 0;
|
||||||
rprocs = NULL;
|
rprocs = NULL;
|
||||||
mode = OMPI_COMM_CID_INTRA;
|
mode = OMPI_COMM_CID_INTRA;
|
||||||
@ -396,8 +396,7 @@ int ompi_comm_split ( ompi_communicator_t* comm, int color, int key,
|
|||||||
inter = OMPI_COMM_IS_INTER(comm);
|
inter = OMPI_COMM_IS_INTER(comm);
|
||||||
if ( inter ) {
|
if ( inter ) {
|
||||||
allgatherfct = (ompi_comm_allgatherfct *)ompi_comm_allgather_emulate_intra;
|
allgatherfct = (ompi_comm_allgatherfct *)ompi_comm_allgather_emulate_intra;
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
allgatherfct = (ompi_comm_allgatherfct *)comm->c_coll.coll_allgather;
|
allgatherfct = (ompi_comm_allgatherfct *)comm->c_coll.coll_allgather;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -413,7 +412,9 @@ int ompi_comm_split ( ompi_communicator_t* comm, int color, int key,
|
|||||||
|
|
||||||
/* how many have the same color like me */
|
/* how many have the same color like me */
|
||||||
for ( my_size = 0, i=0; i < size; i++) {
|
for ( my_size = 0, i=0; i < size; i++) {
|
||||||
if ( results[(2*i)+0] == color) my_size++;
|
if ( results[(2*i)+0] == color) {
|
||||||
|
my_size++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sorted = (int *) malloc ( sizeof( int ) * my_size * 2);
|
sorted = (int *) malloc ( sizeof( int ) * my_size * 2);
|
||||||
@ -466,7 +467,9 @@ int ompi_comm_split ( ompi_communicator_t* comm, int color, int key,
|
|||||||
|
|
||||||
/* how many have the same color like me */
|
/* how many have the same color like me */
|
||||||
for ( my_rsize = 0, i=0; i < rsize; i++) {
|
for ( my_rsize = 0, i=0; i < rsize; i++) {
|
||||||
if ( rresults[(2*i)+0] == color) my_rsize++;
|
if ( rresults[(2*i)+0] == color) {
|
||||||
|
my_rsize++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
rsorted = (int *) malloc ( sizeof( int ) * my_rsize * 2);
|
rsorted = (int *) malloc ( sizeof( int ) * my_rsize * 2);
|
||||||
if ( NULL == rsorted) {
|
if ( NULL == rsorted) {
|
||||||
@ -499,8 +502,7 @@ int ompi_comm_split ( ompi_communicator_t* comm, int color, int key,
|
|||||||
rprocs[i] = comm->c_remote_group->grp_proc_pointers[rsorted[i*2]];
|
rprocs[i] = comm->c_remote_group->grp_proc_pointers[rsorted[i*2]];
|
||||||
}
|
}
|
||||||
mode = OMPI_COMM_CID_INTER;
|
mode = OMPI_COMM_CID_INTER;
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
my_rsize = 0;
|
my_rsize = 0;
|
||||||
rprocs = NULL;
|
rprocs = NULL;
|
||||||
mode = OMPI_COMM_CID_INTRA;
|
mode = OMPI_COMM_CID_INTRA;
|
||||||
@ -610,8 +612,7 @@ int ompi_comm_dup ( ompi_communicator_t * comm, ompi_communicator_t **newcomm,
|
|||||||
rsize = comp->c_remote_group->grp_proc_count;
|
rsize = comp->c_remote_group->grp_proc_count;
|
||||||
rprocs = comp->c_remote_group->grp_proc_pointers;
|
rprocs = comp->c_remote_group->grp_proc_pointers;
|
||||||
mode = OMPI_COMM_CID_INTER;
|
mode = OMPI_COMM_CID_INTER;
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
rsize = 0;
|
rsize = 0;
|
||||||
rprocs = NULL;
|
rprocs = NULL;
|
||||||
mode = OMPI_COMM_CID_INTRA;
|
mode = OMPI_COMM_CID_INTRA;
|
||||||
@ -668,8 +669,7 @@ int ompi_comm_dup ( ompi_communicator_t * comm, ompi_communicator_t **newcomm,
|
|||||||
if ( MPI_SUCCESS != rc ) {
|
if ( MPI_SUCCESS != rc ) {
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
/* activate communicator and init coll-module without synchronizing processes*/
|
/* activate communicator and init coll-module without synchronizing processes*/
|
||||||
rc = ompi_comm_activate (newcomp, /* new communicator */
|
rc = ompi_comm_activate (newcomp, /* new communicator */
|
||||||
comp, /* old comm */
|
comp, /* old comm */
|
||||||
@ -1250,8 +1250,8 @@ int ompi_topo_create (ompi_communicator_t *old_comm,
|
|||||||
return OMPI_ERROR;
|
return OMPI_ERROR;
|
||||||
}
|
}
|
||||||
memcpy (new_comm->c_topo_comm->mtc_periods_or_edges,
|
memcpy (new_comm->c_topo_comm->mtc_periods_or_edges,
|
||||||
periods_or_edges, dims_or_index[ndims_or_nnodes - 1]
|
periods_or_edges,
|
||||||
* sizeof(int));
|
dims_or_index[ndims_or_nnodes - 1] * sizeof(int));
|
||||||
|
|
||||||
new_comm->c_topo_comm->mtc_coords = (int *)malloc (sizeof(int) * ndims_or_nnodes);
|
new_comm->c_topo_comm->mtc_coords = (int *)malloc (sizeof(int) * ndims_or_nnodes);
|
||||||
if (NULL == new_comm->c_topo_comm->mtc_coords) {
|
if (NULL == new_comm->c_topo_comm->mtc_coords) {
|
||||||
|
@ -313,8 +313,7 @@ int ompi_comm_get_rport(orte_process_name_t *port, int send_first,
|
|||||||
}
|
}
|
||||||
|
|
||||||
*rport_name = *port;
|
*rport_name = *port;
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
orte_buffer_t *rbuf;
|
orte_buffer_t *rbuf;
|
||||||
|
|
||||||
rbuf = OBJ_NEW(orte_buffer_t);
|
rbuf = OBJ_NEW(orte_buffer_t);
|
||||||
@ -406,7 +405,8 @@ ompi_comm_start_processes(int count, char **array_of_commands,
|
|||||||
* later override this value by providing an MPI_Info value. for now, though,
|
* later override this value by providing an MPI_Info value. for now, though,
|
||||||
* let's get the default value off the registry
|
* let's get the default value off the registry
|
||||||
*/
|
*/
|
||||||
if (ORTE_SUCCESS != (rc = orte_rmgr.get_app_context(orte_process_info.my_name->jobid, &apps, &num_apps))) {
|
rc = orte_rmgr.get_app_context(orte_process_info.my_name->jobid, &apps, &num_apps);
|
||||||
|
if (ORTE_SUCCESS != rc) {
|
||||||
ORTE_ERROR_LOG(rc);
|
ORTE_ERROR_LOG(rc);
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
@ -423,10 +423,12 @@ ompi_comm_start_processes(int count, char **array_of_commands,
|
|||||||
base_prefix = NULL;
|
base_prefix = NULL;
|
||||||
}
|
}
|
||||||
/* cleanup the memory we used */
|
/* cleanup the memory we used */
|
||||||
|
if(NULL != apps) {
|
||||||
for (ai = 0; ai < num_apps; ai++) {
|
for (ai = 0; ai < num_apps; ai++) {
|
||||||
OBJ_RELEASE(apps[ai]);
|
OBJ_RELEASE(apps[ai]);
|
||||||
}
|
}
|
||||||
if (NULL != apps) free(apps);
|
free(apps);
|
||||||
|
}
|
||||||
|
|
||||||
/* Convert the list of commands to an array of orte_app_context_t
|
/* Convert the list of commands to an array of orte_app_context_t
|
||||||
pointers */
|
pointers */
|
||||||
@ -566,7 +568,9 @@ ompi_comm_start_processes(int count, char **array_of_commands,
|
|||||||
} /* for (i = 0 ; i < count ; ++i) */
|
} /* for (i = 0 ; i < count ; ++i) */
|
||||||
|
|
||||||
/* cleanup */
|
/* cleanup */
|
||||||
if (NULL != base_prefix) free(base_prefix);
|
if (NULL != base_prefix) {
|
||||||
|
free(base_prefix);
|
||||||
|
}
|
||||||
|
|
||||||
/* tell the RTE that we want to be a child of this process' job */
|
/* tell the RTE that we want to be a child of this process' job */
|
||||||
if (ORTE_SUCCESS != (rc = orte_rmgr.add_attribute(&attributes, ORTE_NS_USE_PARENT,
|
if (ORTE_SUCCESS != (rc = orte_rmgr.add_attribute(&attributes, ORTE_NS_USE_PARENT,
|
||||||
@ -617,7 +621,9 @@ ompi_comm_start_processes(int count, char **array_of_commands,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* spawn procs */
|
/* spawn procs */
|
||||||
if (ORTE_SUCCESS != (rc = orte_rmgr.spawn_job(apps, count, &new_jobid, 0, NULL, NULL, ORTE_PROC_STATE_NONE, &attributes))) {
|
rc = orte_rmgr.spawn_job(apps, count, &new_jobid, 0, NULL, NULL,
|
||||||
|
ORTE_PROC_STATE_NONE, &attributes);
|
||||||
|
if (ORTE_SUCCESS != rc) {
|
||||||
ORTE_ERROR_LOG(rc);
|
ORTE_ERROR_LOG(rc);
|
||||||
opal_progress_event_users_decrement();
|
opal_progress_event_users_decrement();
|
||||||
return MPI_ERR_SPAWN;
|
return MPI_ERR_SPAWN;
|
||||||
@ -636,7 +642,9 @@ ompi_comm_start_processes(int count, char **array_of_commands,
|
|||||||
|
|
||||||
/* clean up */
|
/* clean up */
|
||||||
opal_progress_event_users_decrement();
|
opal_progress_event_users_decrement();
|
||||||
while (NULL != (item = opal_list_remove_first(&attributes))) OBJ_RELEASE(item);
|
while (NULL != (item = opal_list_remove_first(&attributes))) {
|
||||||
|
OBJ_RELEASE(item);
|
||||||
|
}
|
||||||
OBJ_DESTRUCT(&attributes);
|
OBJ_DESTRUCT(&attributes);
|
||||||
|
|
||||||
for ( i=0; i<count; i++) {
|
for ( i=0; i<count; i++) {
|
||||||
@ -673,7 +681,8 @@ int ompi_comm_dyn_init (void)
|
|||||||
/* split the content of the environment variable into
|
/* split the content of the environment variable into
|
||||||
its pieces, which are : port_name and tag */
|
its pieces, which are : port_name and tag */
|
||||||
oob_port = ompi_parse_port (port_name, &tag);
|
oob_port = ompi_parse_port (port_name, &tag);
|
||||||
if (ORTE_SUCCESS != (rc = orte_ns.convert_string_to_process_name(&port_proc_name, oob_port))) {
|
rc = orte_ns.convert_string_to_process_name(&port_proc_name, oob_port);
|
||||||
|
if (ORTE_SUCCESS != rc) {
|
||||||
ORTE_ERROR_LOG(rc);
|
ORTE_ERROR_LOG(rc);
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
@ -762,8 +771,7 @@ ompi_comm_disconnect_obj *ompi_comm_disconnect_init ( ompi_communicator_t *comm)
|
|||||||
|
|
||||||
if ( OMPI_COMM_IS_INTER(comm) ) {
|
if ( OMPI_COMM_IS_INTER(comm) ) {
|
||||||
obj->size = ompi_comm_remote_size (comm);
|
obj->size = ompi_comm_remote_size (comm);
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
obj->size = ompi_comm_size (comm);
|
obj->size = ompi_comm_size (comm);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -797,7 +805,6 @@ ompi_comm_disconnect_obj *ompi_comm_disconnect_init ( ompi_communicator_t *comm)
|
|||||||
free (obj);
|
free (obj);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* return handle */
|
/* return handle */
|
||||||
|
@ -112,8 +112,8 @@ struct ompi_communicator_t {
|
|||||||
ompi_group_t *c_remote_group;
|
ompi_group_t *c_remote_group;
|
||||||
|
|
||||||
struct ompi_communicator_t *c_local_comm; /* a duplicate of the local
|
struct ompi_communicator_t *c_local_comm; /* a duplicate of the local
|
||||||
communicator in case the comm is
|
communicator in case the comm
|
||||||
an inter-comm*/
|
is an inter-comm*/
|
||||||
|
|
||||||
/* Attributes */
|
/* Attributes */
|
||||||
struct opal_hash_table_t *c_keyhash;
|
struct opal_hash_table_t *c_keyhash;
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user