Rename "index" parameters to "idx" so that picky compilers shut up
about "index" shadowing a global symbol name (i.e., the function index()). And remove an unused #define. This commit was SVN r25750.
Этот коммит содержится в:
родитель
1d15d39fb8
Коммит
5164d89815
@ -9,7 +9,7 @@
|
||||
* University of Stuttgart. All rights reserved.
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2007-2008 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2007-2012 Cisco Systems, Inc. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -37,7 +37,7 @@
|
||||
static const char FUNC_NAME[] = "MPI_Graph_create";
|
||||
|
||||
|
||||
int MPI_Graph_create(MPI_Comm old_comm, int nnodes, int *index,
|
||||
int MPI_Graph_create(MPI_Comm old_comm, int nnodes, int *indx,
|
||||
int *edges, int reorder, MPI_Comm *comm_graph)
|
||||
{
|
||||
|
||||
@ -62,7 +62,7 @@ int MPI_Graph_create(MPI_Comm old_comm, int nnodes, int *index,
|
||||
if (nnodes < 0) {
|
||||
return OMPI_ERRHANDLER_INVOKE (old_comm, MPI_ERR_ARG,
|
||||
FUNC_NAME);
|
||||
} else if (nnodes >= 1 && ((NULL == index) || (NULL == edges))) {
|
||||
} else if (nnodes >= 1 && ((NULL == indx) || (NULL == edges))) {
|
||||
return OMPI_ERRHANDLER_INVOKE (old_comm, MPI_ERR_ARG,
|
||||
FUNC_NAME);
|
||||
}
|
||||
@ -109,7 +109,7 @@ int MPI_Graph_create(MPI_Comm old_comm, int nnodes, int *index,
|
||||
|
||||
err = ompi_topo_create ((struct ompi_communicator_t *)old_comm,
|
||||
nnodes,
|
||||
index,
|
||||
indx,
|
||||
edges,
|
||||
re_order,
|
||||
(struct ompi_communicator_t **)comm_graph,
|
||||
|
@ -9,7 +9,7 @@
|
||||
* University of Stuttgart. All rights reserved.
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2007 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2007-2012 Cisco Systems, Inc. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -37,8 +37,8 @@
|
||||
static const char FUNC_NAME[] = "MPI_Graph_get";
|
||||
|
||||
|
||||
int MPI_Graph_get(MPI_Comm comm, int maxindex, int maxedges,
|
||||
int *index, int *edges)
|
||||
int MPI_Graph_get(MPI_Comm comm, int maxindx, int maxedges,
|
||||
int *indx, int *edges)
|
||||
{
|
||||
int err;
|
||||
mca_topo_base_module_graph_get_fn_t func;
|
||||
@ -61,7 +61,7 @@ int MPI_Graph_get(MPI_Comm comm, int maxindex, int maxedges,
|
||||
return OMPI_ERRHANDLER_INVOKE (comm, MPI_ERR_TOPOLOGY,
|
||||
FUNC_NAME);
|
||||
}
|
||||
if (0 > maxindex || 0 > maxedges || NULL == index || NULL == edges) {
|
||||
if (0 > maxindx || 0 > maxedges || NULL == indx || NULL == edges) {
|
||||
return OMPI_ERRHANDLER_INVOKE (comm, MPI_ERR_ARG,
|
||||
FUNC_NAME);
|
||||
}
|
||||
@ -73,7 +73,7 @@ int MPI_Graph_get(MPI_Comm comm, int maxindex, int maxedges,
|
||||
func = comm->c_topo->topo_graph_get;
|
||||
|
||||
/* call the function */
|
||||
err = func(comm, maxindex, maxedges, index, edges);
|
||||
err = func(comm, maxindx, maxedges, indx, edges);
|
||||
OPAL_CR_EXIT_LIBRARY();
|
||||
if ( MPI_SUCCESS != err ) {
|
||||
return OMPI_ERRHANDLER_INVOKE(comm, err, FUNC_NAME);
|
||||
|
@ -9,7 +9,7 @@
|
||||
* University of Stuttgart. All rights reserved.
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2007 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2007-2012 Cisco Systems, Inc. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -37,7 +37,7 @@
|
||||
static const char FUNC_NAME[] = "MPI_Graph_map";
|
||||
|
||||
|
||||
int MPI_Graph_map(MPI_Comm comm, int nnodes, int *index, int *edges,
|
||||
int MPI_Graph_map(MPI_Comm comm, int nnodes, int *indx, int *edges,
|
||||
int *newrank)
|
||||
{
|
||||
int err;
|
||||
@ -58,7 +58,7 @@ int MPI_Graph_map(MPI_Comm comm, int nnodes, int *index, int *edges,
|
||||
return OMPI_ERRHANDLER_INVOKE (comm, MPI_ERR_COMM,
|
||||
FUNC_NAME);
|
||||
}
|
||||
if (1 > nnodes || NULL == index || NULL == edges || NULL == newrank) {
|
||||
if (1 > nnodes || NULL == indx || NULL == edges || NULL == newrank) {
|
||||
return OMPI_ERRHANDLER_INVOKE (comm, MPI_ERR_ARG,
|
||||
FUNC_NAME);
|
||||
}
|
||||
@ -78,7 +78,7 @@ int MPI_Graph_map(MPI_Comm comm, int nnodes, int *index, int *edges,
|
||||
|
||||
/* call the function */
|
||||
if ( MPI_SUCCESS !=
|
||||
(err = func(comm, nnodes, index, edges, newrank))) {
|
||||
(err = func(comm, nnodes, indx, edges, newrank))) {
|
||||
OPAL_CR_EXIT_LIBRARY();
|
||||
return OMPI_ERRHANDLER_INVOKE(comm, err, FUNC_NAME);
|
||||
}
|
||||
|
@ -10,7 +10,7 @@
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2006 University of Houston. All rights reserved.
|
||||
* Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2006-2012 Cisco Systems, Inc. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -40,7 +40,7 @@ static const char FUNC_NAME[] = "MPI_Group_range_excl";
|
||||
int MPI_Group_range_excl(MPI_Group group, int n_triplets, int ranges[][3],
|
||||
MPI_Group *new_group)
|
||||
{
|
||||
int err, i, group_size, index;
|
||||
int err, i, group_size, indx;
|
||||
int * elements_int_list;
|
||||
|
||||
/* can't act on NULL group */
|
||||
@ -78,32 +78,32 @@ int MPI_Group_range_excl(MPI_Group group, int n_triplets, int ranges[][3],
|
||||
goto error_rank;
|
||||
}
|
||||
/* positive stride */
|
||||
for (index = ranges[i][0]; index <= ranges[i][1]; index += ranges[i][2]) {
|
||||
for (indx = ranges[i][0]; indx <= ranges[i][1]; indx += ranges[i][2]) {
|
||||
/* make sure rank has not already been selected */
|
||||
if (elements_int_list[index] != -1) {
|
||||
if (elements_int_list[indx] != -1) {
|
||||
goto error_rank;
|
||||
}
|
||||
elements_int_list[index] = i;
|
||||
elements_int_list[indx] = i;
|
||||
}
|
||||
} else if (ranges[i][0] > ranges[i][1]) {
|
||||
if (ranges[i][2] > 0) {
|
||||
goto error_rank;
|
||||
}
|
||||
/* negative stride */
|
||||
for (index = ranges[i][0]; index >= ranges[i][1]; index += ranges[i][2]) {
|
||||
for (indx = ranges[i][0]; indx >= ranges[i][1]; indx += ranges[i][2]) {
|
||||
/* make sure rank has not already been selected */
|
||||
if (elements_int_list[index] != -1) {
|
||||
if (elements_int_list[indx] != -1) {
|
||||
goto error_rank;
|
||||
}
|
||||
elements_int_list[index] = i;
|
||||
elements_int_list[indx] = i;
|
||||
}
|
||||
} else {
|
||||
/* first_rank == last_rank */
|
||||
index = ranges[i][0];
|
||||
if (elements_int_list[index] != -1) {
|
||||
indx = ranges[i][0];
|
||||
if (elements_int_list[indx] != -1) {
|
||||
goto error_rank;
|
||||
}
|
||||
elements_int_list[index] = i;
|
||||
elements_int_list[indx] = i;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -10,7 +10,7 @@
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2006 University of Houston. All rights reserved.
|
||||
* Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2006-2012 Cisco Systems, Inc. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -40,7 +40,7 @@ static const char FUNC_NAME[] = "MPI_Group_range_incl";
|
||||
int MPI_Group_range_incl(MPI_Group group, int n_triplets, int ranges[][3],
|
||||
MPI_Group *new_group)
|
||||
{
|
||||
int err, i,index;
|
||||
int err, i,indx;
|
||||
int group_size;
|
||||
int * elements_int_list;
|
||||
|
||||
@ -79,32 +79,32 @@ int MPI_Group_range_incl(MPI_Group group, int n_triplets, int ranges[][3],
|
||||
goto error_rank;
|
||||
}
|
||||
/* positive stride */
|
||||
for (index = ranges[i][0]; index <= ranges[i][1]; index += ranges[i][2]) {
|
||||
for (indx = ranges[i][0]; indx <= ranges[i][1]; indx += ranges[i][2]) {
|
||||
/* make sure rank has not already been selected */
|
||||
if (elements_int_list[index] != -1) {
|
||||
if (elements_int_list[indx] != -1) {
|
||||
goto error_rank;
|
||||
}
|
||||
elements_int_list[index] = i;
|
||||
elements_int_list[indx] = i;
|
||||
}
|
||||
} else if (ranges[i][0] > ranges[i][1]) {
|
||||
if (ranges[i][2] > 0) {
|
||||
goto error_rank;
|
||||
}
|
||||
/* negative stride */
|
||||
for (index = ranges[i][0]; index >= ranges[i][1]; index += ranges[i][2]) {
|
||||
for (indx = ranges[i][0]; indx >= ranges[i][1]; indx += ranges[i][2]) {
|
||||
/* make sure rank has not already been selected */
|
||||
if (elements_int_list[index] != -1) {
|
||||
if (elements_int_list[indx] != -1) {
|
||||
goto error_rank;
|
||||
}
|
||||
elements_int_list[index] = i;
|
||||
elements_int_list[indx] = i;
|
||||
}
|
||||
} else {
|
||||
/* first_rank == last_rank */
|
||||
index = ranges[i][0];
|
||||
if (elements_int_list[index] != -1) {
|
||||
indx = ranges[i][0];
|
||||
if (elements_int_list[indx] != -1) {
|
||||
goto error_rank;
|
||||
}
|
||||
elements_int_list[index] = i;
|
||||
elements_int_list[indx] = i;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
* University of Stuttgart. All rights reserved.
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2006-2009 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2006-2012 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2006-2009 University of Houston. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
@ -36,8 +36,6 @@
|
||||
#include "ompi/mpi/c/profile/defines.h"
|
||||
#endif
|
||||
|
||||
#define INTERCOMM_MERGE_TAG 1010
|
||||
|
||||
static const char FUNC_NAME[] = "MPI_Intercomm_merge";
|
||||
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
* University of Stuttgart. All rights reserved.
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2006-2012 Cisco Systems, Inc. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -37,7 +37,7 @@
|
||||
static const char FUNC_NAME[] = "MPI_Testany";
|
||||
|
||||
|
||||
int MPI_Testany(int count, MPI_Request requests[], int *index, int *completed, MPI_Status *status)
|
||||
int MPI_Testany(int count, MPI_Request requests[], int *indx, int *completed, MPI_Status *status)
|
||||
{
|
||||
MEMCHECKER(
|
||||
int j;
|
||||
@ -59,7 +59,7 @@ int MPI_Testany(int count, MPI_Request requests[], int *index, int *completed, M
|
||||
}
|
||||
}
|
||||
}
|
||||
if ((NULL == index) || (NULL == completed) || (0 > count)) {
|
||||
if ((NULL == indx) || (NULL == completed) || (0 > count)) {
|
||||
rc = MPI_ERR_ARG;
|
||||
}
|
||||
OMPI_ERRHANDLER_CHECK(rc, MPI_COMM_WORLD, rc, FUNC_NAME);
|
||||
@ -68,7 +68,7 @@ int MPI_Testany(int count, MPI_Request requests[], int *index, int *completed, M
|
||||
OPAL_CR_ENTER_LIBRARY();
|
||||
|
||||
if (OMPI_SUCCESS == ompi_request_test_any(count, requests,
|
||||
index, completed, status)) {
|
||||
indx, completed, status)) {
|
||||
OPAL_CR_EXIT_LIBRARY();
|
||||
return MPI_SUCCESS;
|
||||
}
|
||||
|
@ -9,7 +9,7 @@
|
||||
* University of Stuttgart. All rights reserved.
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2006-2012 Cisco Systems, Inc. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -49,13 +49,13 @@ int MPI_Testsome(int incount, MPI_Request *requests,
|
||||
);
|
||||
|
||||
if ( MPI_PARAM_CHECK ) {
|
||||
int index, rc = MPI_SUCCESS;
|
||||
int indx, rc = MPI_SUCCESS;
|
||||
OMPI_ERR_INIT_FINALIZE(FUNC_NAME);
|
||||
if ((NULL == requests) && (0 != incount)) {
|
||||
rc = MPI_ERR_REQUEST;
|
||||
} else {
|
||||
for (index = 0; index < incount; ++index) {
|
||||
if (NULL == requests[index]) {
|
||||
for (indx = 0; indx < incount; ++indx) {
|
||||
if (NULL == requests[indx]) {
|
||||
rc = MPI_ERR_REQUEST;
|
||||
break;
|
||||
}
|
||||
|
@ -1,5 +1,3 @@
|
||||
/* -*- Mode: C; c-basic-offset:4 ; -*- */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2004-2007 The Trustees of Indiana University and Indiana
|
||||
* University Research and Technology
|
||||
@ -39,7 +37,7 @@
|
||||
static const char FUNC_NAME[] = "MPI_Waitany";
|
||||
|
||||
|
||||
int MPI_Waitany(int count, MPI_Request *requests, int *index, MPI_Status *status)
|
||||
int MPI_Waitany(int count, MPI_Request *requests, int *indx, MPI_Status *status)
|
||||
{
|
||||
MEMCHECKER(
|
||||
int j;
|
||||
@ -61,7 +59,7 @@ int MPI_Waitany(int count, MPI_Request *requests, int *index, MPI_Status *status
|
||||
}
|
||||
}
|
||||
}
|
||||
if ((NULL == index) || (0 > count)) {
|
||||
if ((NULL == indx) || (0 > count)) {
|
||||
rc = MPI_ERR_ARG;
|
||||
}
|
||||
OMPI_ERRHANDLER_CHECK(rc, MPI_COMM_WORLD, rc, FUNC_NAME);
|
||||
@ -69,7 +67,7 @@ int MPI_Waitany(int count, MPI_Request *requests, int *index, MPI_Status *status
|
||||
|
||||
OPAL_CR_ENTER_LIBRARY();
|
||||
|
||||
if (OMPI_SUCCESS == ompi_request_wait_any(count, requests, index, status)) {
|
||||
if (OMPI_SUCCESS == ompi_request_wait_any(count, requests, indx, status)) {
|
||||
OPAL_CR_EXIT_LIBRARY();
|
||||
return MPI_SUCCESS;
|
||||
}
|
||||
|
@ -1,5 +1,3 @@
|
||||
/* -*- Mode: C; c-basic-offset:4 ; -*- */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2004-2007 The Trustees of Indiana University and Indiana
|
||||
* University Research and Technology
|
||||
@ -11,7 +9,7 @@
|
||||
* University of Stuttgart. All rights reserved.
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2006-2012 Cisco Systems, Inc. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -51,13 +49,13 @@ int MPI_Waitsome(int incount, MPI_Request *requests,
|
||||
);
|
||||
|
||||
if ( MPI_PARAM_CHECK ) {
|
||||
int index, rc = MPI_SUCCESS;
|
||||
int indx, rc = MPI_SUCCESS;
|
||||
OMPI_ERR_INIT_FINALIZE(FUNC_NAME);
|
||||
if ((NULL == requests) && (0 != incount)) {
|
||||
rc = MPI_ERR_REQUEST;
|
||||
} else {
|
||||
for (index = 0; index < incount; ++index) {
|
||||
if (NULL == requests[index]) {
|
||||
for (indx = 0; indx < incount; ++indx) {
|
||||
if (NULL == requests[indx]) {
|
||||
rc = MPI_ERR_REQUEST;
|
||||
break;
|
||||
}
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user