[mpich-commits] [mpich] MPICH primary repository branch, master, updated. v3.2-290-g50641f6
Service Account
noreply at mpich.org
Fri Apr 22 14:38:04 CDT 2016
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "MPICH primary repository".
The branch, master has been updated
via 50641f630389063aae7c14635791aa7c6cd9f953 (commit)
from 2ce01cab749661faa315b8d4a9eb0b392d41044c (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.mpich.org/mpich.git/commitdiff/50641f630389063aae7c14635791aa7c6cd9f953
commit 50641f630389063aae7c14635791aa7c6cd9f953
Author: Yanfei Guo <yguo at anl.gov>
Date: Wed Apr 20 15:31:21 2016 -0500
Use 64-bit int in MPIR_Group.
New LPID/GPID model uses 64-bit to store the combination of AV table id
and lpid in MPIR_Group. This patch changes MPI layer and make CH3
compatible with new model.
No reviewer.
diff --git a/src/include/mpiimpl.h b/src/include/mpiimpl.h
index 1cb8a12..3381dfb 100644
--- a/src/include/mpiimpl.h
+++ b/src/include/mpiimpl.h
@@ -1003,7 +1003,7 @@ typedef struct MPIR_Attribute {
/* This structure is used to implement the group operations such as
MPI_Group_translate_ranks */
typedef struct MPIR_Group_pmap_t {
- int lpid; /* local process id, from VCONN */
+ int64_t lpid; /* local process id, from VCONN */
int next_lpid; /* Index of next lpid (in lpid order) */
int flag; /* marker, used to implement group operations */
} MPIR_Group_pmap_t;
@@ -3795,7 +3795,7 @@ int MPID_Get_universe_size(int * universe_size);
to which it is connected. These are local process ids because different
processes may use different ids to identify the same target process
@*/
-int MPID_Comm_get_lpid(MPIR_Comm *comm_ptr, int idx, int * lpid_ptr, MPIU_BOOL is_remote);
+int MPID_Comm_get_lpid(MPIR_Comm *comm_ptr, int idx, int64_t * lpid_ptr, MPIU_BOOL is_remote);
/* prototypes and declarations for the MPID_Sched interface for nonblocking
* collectives */
diff --git a/src/mpi/comm/comm_create.c b/src/mpi/comm/comm_create.c
index f52467c..0aac5d8 100644
--- a/src/mpi/comm/comm_create.c
+++ b/src/mpi/comm/comm_create.c
@@ -122,7 +122,7 @@ int MPIR_Comm_create_calculate_mapping(MPIR_Group *group_ptr,
/* FIXME : BUBBLE SORT */
mapping[i] = -1;
for (j=0; j<comm_ptr->local_size; j++) {
- int comm_lpid;
+ int64_t comm_lpid;
MPID_Comm_get_lpid( comm_ptr, j, &comm_lpid, FALSE );
if (comm_lpid == group_ptr->lrank_to_lpid[i].lpid) {
mapping[i] = j;
diff --git a/src/mpi/comm/comm_group.c b/src/mpi/comm/comm_group.c
index 4af1e6d..437302c 100644
--- a/src/mpi/comm/comm_group.c
+++ b/src/mpi/comm/comm_group.c
@@ -33,7 +33,8 @@ int MPI_Comm_group(MPI_Comm comm, MPI_Group *group) __attribute__((weak,alias("P
int MPIR_Comm_group_impl(MPIR_Comm *comm_ptr, MPIR_Group **group_ptr)
{
int mpi_errno = MPI_SUCCESS;
- int i, lpid, n;
+ int i, n;
+ int64_t lpid;
int comm_world_size = MPIR_Process.comm_world->local_size;
MPID_MPI_STATE_DECL(MPID_STATE_MPIR_COMM_GROUP_IMPL);
@@ -48,7 +49,7 @@ int MPIR_Comm_group_impl(MPIR_Comm *comm_ptr, MPIR_Group **group_ptr)
(*group_ptr)->is_local_dense_monotonic = TRUE;
for (i=0; i<n; i++) {
(void) MPID_Comm_get_lpid( comm_ptr, i, &lpid, FALSE );
- (*group_ptr)->lrank_to_lpid[i].lpid = lpid;
+ (*group_ptr)->lrank_to_lpid[i].lpid = lpid;
if (lpid > comm_world_size ||
(i > 0 && (*group_ptr)->lrank_to_lpid[i-1].lpid != (lpid-1)))
{
diff --git a/src/mpi/comm/comm_remote_group.c b/src/mpi/comm/comm_remote_group.c
index bfb28ad..4dfaa5f 100644
--- a/src/mpi/comm/comm_remote_group.c
+++ b/src/mpi/comm/comm_remote_group.c
@@ -33,7 +33,8 @@ int MPI_Comm_remote_group(MPI_Comm comm, MPI_Group *group) __attribute__((weak,a
int MPIR_Comm_remote_group_impl(MPIR_Comm *comm_ptr, MPIR_Group **group_ptr)
{
int mpi_errno = MPI_SUCCESS;
- int i, lpid, n;
+ int i, n;
+ int64_t lpid;
MPID_MPI_STATE_DECL(MPID_STATE_MPIR_COMM_REMOTE_GROUP_IMPL);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPIR_COMM_REMOTE_GROUP_IMPL);
@@ -45,7 +46,7 @@ int MPIR_Comm_remote_group_impl(MPIR_Comm *comm_ptr, MPIR_Group **group_ptr)
for (i=0; i<n; i++) {
(void) MPID_Comm_get_lpid( comm_ptr, i, &lpid, TRUE );
- (*group_ptr)->lrank_to_lpid[i].lpid = lpid;
+ (*group_ptr)->lrank_to_lpid[i].lpid = lpid;
/* TODO calculate is_local_dense_monotonic */
}
(*group_ptr)->size = n;
diff --git a/src/mpi/comm/intercomm_create.c b/src/mpi/comm/intercomm_create.c
index 807b06a..fba778c 100644
--- a/src/mpi/comm/intercomm_create.c
+++ b/src/mpi/comm/intercomm_create.c
@@ -26,10 +26,10 @@ int MPI_Intercomm_create(MPI_Comm local_comm, int local_leader, MPI_Comm peer_co
/* Define MPICH_MPI_FROM_PMPI if weak symbols are not supported to build
the MPI routines */
#ifdef HAVE_ERROR_CHECKING
-PMPI_LOCAL int MPIR_CheckDisjointLpids( int [], int, int [], int );
+PMPI_LOCAL int MPIR_CheckDisjointLpids( int64_t [], int, int64_t [], int );
#endif /* HAVE_ERROR_CHECKING */
PMPI_LOCAL int MPID_LPID_GetAllInComm( MPIR_Comm *comm_ptr, int local_size,
- int local_lpids[] );
+ int64_t local_lpids[] );
#ifndef MPICH_MPI_FROM_PMPI
#undef MPI_Intercomm_create
@@ -42,8 +42,8 @@ PMPI_LOCAL int MPID_LPID_GetAllInComm( MPIR_Comm *comm_ptr, int local_size,
#define FUNCNAME MPIR_CheckDisjointLpids
#undef FCNAME
#define FCNAME MPL_QUOTE(FUNCNAME)
-PMPI_LOCAL int MPIR_CheckDisjointLpids( int lpids1[], int n1,
- int lpids2[], int n2 )
+PMPI_LOCAL int MPIR_CheckDisjointLpids( int64_t lpids1[], int n1,
+ int64_t lpids2[], int n2 )
{
int i, mask_size, idx, bit, maxlpid = -1;
int mpi_errno = MPI_SUCCESS;
@@ -103,7 +103,7 @@ PMPI_LOCAL int MPIR_CheckDisjointLpids( int lpids1[], int n1,
#endif /* HAVE_ERROR_CHECKING */
PMPI_LOCAL int MPID_LPID_GetAllInComm( MPIR_Comm *comm_ptr, int local_size,
- int local_lpids[] )
+ int64_t local_lpids[] )
{
int i;
@@ -125,8 +125,8 @@ int MPIR_Intercomm_create_impl(MPIR_Comm *local_comm_ptr, int local_leader,
{
int mpi_errno = MPI_SUCCESS;
MPIU_Context_id_t final_context_id, recvcontext_id;
- int remote_size, *remote_lpids=0, singlePG;
- int local_size,*local_lpids=0;
+ int remote_size, local_size, singlePG;
+ int64_t *remote_lpids = 0, *local_lpids = 0;
MPIR_Gpid *local_gpids=NULL, *remote_gpids=NULL;
int comm_info[3];
int is_low_group = 0;
@@ -178,9 +178,9 @@ int MPIR_Intercomm_create_impl(MPIR_Comm *local_comm_ptr, int local_leader,
/* With this information, we can now send and receive the
global process ids from the peer. */
MPIU_CHKLMEM_MALLOC(remote_gpids,MPIR_Gpid*,remote_size*sizeof(MPIR_Gpid), mpi_errno,"remote_gpids");
- MPIU_CHKLMEM_MALLOC(remote_lpids,int*,remote_size*sizeof(int), mpi_errno,"remote_lpids");
+ MPIU_CHKLMEM_MALLOC(remote_lpids,int64_t*,remote_size*sizeof(int64_t), mpi_errno,"remote_lpids");
MPIU_CHKLMEM_MALLOC(local_gpids,MPIR_Gpid*,local_size*sizeof(MPIR_Gpid), mpi_errno,"local_gpids");
- MPIU_CHKLMEM_MALLOC(local_lpids,int*,local_size*sizeof(int), mpi_errno,"local_lpids");
+ MPIU_CHKLMEM_MALLOC(local_lpids,int64_t*,local_size*sizeof(int64_t), mpi_errno,"local_lpids");
mpi_errno = MPID_GPID_GetAllInComm( local_comm_ptr, local_size, local_gpids, &singlePG );
if (mpi_errno) MPIR_ERR_POP(mpi_errno);
@@ -278,7 +278,7 @@ int MPIR_Intercomm_create_impl(MPIR_Comm *local_comm_ptr, int local_leader,
MPIR_ERR_CHKANDJUMP(errflag, mpi_errno, MPI_ERR_OTHER, "**coll_fail");
remote_size = comm_info[0];
MPIU_CHKLMEM_MALLOC(remote_gpids,MPIR_Gpid*,remote_size*sizeof(MPIR_Gpid), mpi_errno,"remote_gpids");
- MPIU_CHKLMEM_MALLOC(remote_lpids,int*,remote_size*sizeof(int), mpi_errno,"remote_lpids");
+ MPIU_CHKLMEM_MALLOC(remote_lpids,int64_t*,remote_size*sizeof(int64_t), mpi_errno,"remote_lpids");
mpi_errno = MPID_Bcast( remote_gpids, remote_size*sizeof(MPIR_Gpid), MPI_BYTE, local_leader,
local_comm_ptr, &errflag );
if (mpi_errno) MPIR_ERR_POP(mpi_errno);
diff --git a/src/mpi/group/grouputil.c b/src/mpi/group/grouputil.c
index 735c889..9e249dd 100644
--- a/src/mpi/group/grouputil.c
+++ b/src/mpi/group/grouputil.c
@@ -376,7 +376,8 @@ int MPIR_Group_check_valid_ranges( MPIR_Group *group_ptr,
int MPIR_Group_check_subset( MPIR_Group *group_ptr, MPIR_Comm *comm_ptr )
{
int mpi_errno = MPI_SUCCESS;
- int g1_idx, g2_idx, l1_pid, l2_pid, i;
+ int64_t l1_pid, l2_pid;
+ int g1_idx, g2_idx, i;
MPIR_Group_pmap_t *vmap=0;
int vsize = comm_ptr->comm_kind == MPIR_COMM_KIND__INTERCOMM ? comm_ptr->local_size :
comm_ptr->remote_size;
@@ -402,7 +403,7 @@ int MPIR_Group_check_subset( MPIR_Group *group_ptr, MPIR_Comm *comm_ptr )
l1_pid = group_ptr->lrank_to_lpid[g1_idx].lpid;
l2_pid = vmap[g2_idx].lpid;
MPL_DBG_MSG_FMT(MPIR_DBG_COMM,VERBOSE,(MPL_DBG_FDEST,
- "Lpids are %d, %d\n", l1_pid, l2_pid ));
+ "Lpids are %" PRId64 ", %" PRId64 "\n", l1_pid, l2_pid ));
if (l1_pid < l2_pid) {
/* If we have to advance g1, we didn't find a match, so
that's an error. */
diff --git a/src/mpid/ch3/include/mpidpost.h b/src/mpid/ch3/include/mpidpost.h
index cc3ecbe..119ef5a 100644
--- a/src/mpid/ch3/include/mpidpost.h
+++ b/src/mpid/ch3/include/mpidpost.h
@@ -178,10 +178,10 @@ int MPIDI_CH3_Comm_connect(char * port_name, int root, MPIR_Comm * comm_ptr,
int MPID_GPID_GetAllInComm( MPIR_Comm *comm_ptr, int local_size,
MPIR_Gpid local_gpids[], int *singlePG );
int MPID_GPID_Get( MPIR_Comm *comm_ptr, int rank, MPIR_Gpid *gpid );
-int MPID_GPID_ToLpidArray( int size, MPIR_Gpid gpid[], int lpid[] );
+int MPID_GPID_ToLpidArray( int size, MPIR_Gpid gpid[], int64_t lpid[] );
int MPID_Create_intercomm_from_lpids( MPIR_Comm *newcomm_ptr,
- int size, const int lpids[] );
-int MPID_PG_ForwardPGInfo( MPIR_Comm *peer_ptr, MPIR_Comm *comm_ptr,
+ int size, const int64_t lpids[] );
+int MPID_PG_ForwardPGInfo( MPIR_Comm *peer_ptr, MPID_Comm *comm_ptr,
int nPGids, const MPIR_Gpid gpids[],
int root );
/* PG_ForwardPGInfo is used as the implementation of the intercomm-create
diff --git a/src/mpid/ch3/src/mpid_vc.c b/src/mpid/ch3/src/mpid_vc.c
index 3541876..378a1c4 100644
--- a/src/mpid/ch3/src/mpid_vc.c
+++ b/src/mpid/ch3/src/mpid_vc.c
@@ -300,18 +300,18 @@ int MPIDI_VCR_Dup(MPIDI_VCR orig_vcr, MPIDI_VCR * new_vcr)
#define FUNCNAME MPID_Comm_get_lpid
#undef FCNAME
#define FCNAME MPL_QUOTE(FUNCNAME)
-int MPID_Comm_get_lpid(MPIR_Comm *comm_ptr, int idx, int * lpid_ptr, MPIU_BOOL is_remote)
+int MPID_Comm_get_lpid(MPIR_Comm *comm_ptr, int idx, int64_t * lpid_ptr, MPIU_BOOL is_remote)
{
MPIDI_STATE_DECL(MPID_STATE_MPID_VCR_GET_LPID);
MPIDI_FUNC_ENTER(MPID_STATE_MPID_VCR_GET_LPID);
if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM)
- *lpid_ptr = comm_ptr->dev.vcrt->vcr_table[idx]->lpid;
+ *lpid_ptr = (int64_t) comm_ptr->dev.vcrt->vcr_table[idx]->lpid;
else if (is_remote)
- *lpid_ptr = comm_ptr->dev.vcrt->vcr_table[idx]->lpid;
+ *lpid_ptr = (int64_t) comm_ptr->dev.vcrt->vcr_table[idx]->lpid;
else
- *lpid_ptr = comm_ptr->dev.local_vcrt->vcr_table[idx]->lpid;
+ *lpid_ptr = (int64_t) comm_ptr->dev.local_vcrt->vcr_table[idx]->lpid;
MPIDI_FUNC_EXIT(MPID_STATE_MPID_VCR_GET_LPID);
return MPI_SUCCESS;
@@ -394,7 +394,7 @@ int MPID_GPID_Get( MPIR_Comm *comm_ptr, int rank, MPIR_Gpid *in_gpid )
#define FUNCNAME MPID_GPID_ToLpidArray
#undef FCNAME
#define FCNAME MPL_QUOTE(FUNCNAME)
-int MPID_GPID_ToLpidArray( int size, MPIR_Gpid in_gpid[], int lpid[] )
+int MPID_GPID_ToLpidArray( int size, MPIR_Gpid in_gpid[], int64_t lpid[] )
{
int i, mpi_errno = MPI_SUCCESS;
int pgid;
@@ -428,7 +428,7 @@ int MPID_GPID_ToLpidArray( int size, MPIR_Gpid in_gpid[], int lpid[] )
this process group */
/* Sanity check on size */
if (pg->size > gpid[1]) {
- lpid[i] = pg->vct[gpid[1]].lpid;
+ lpid[i] = (int64_t) pg->vct[gpid[1]].lpid;
}
else {
/* --BEGIN ERROR HANDLING-- */
@@ -463,7 +463,7 @@ int MPID_GPID_ToLpidArray( int size, MPIR_Gpid in_gpid[], int lpid[] )
#undef FCNAME
#define FCNAME MPL_QUOTE(FUNCNAME)
int MPID_Create_intercomm_from_lpids( MPIR_Comm *newcomm_ptr,
- int size, const int lpids[] )
+ int size, const int64_t lpids[] )
{
int mpi_errno = MPI_SUCCESS;
MPIR_Comm *commworld_ptr;
@@ -504,7 +504,7 @@ int MPID_Create_intercomm_from_lpids( MPIR_Comm *newcomm_ptr,
/*printf( "Checking lpid %d against %d in pg %s\n",
lpids[i], pg->vct[j].lpid, (char *)pg->id );
fflush(stdout); */
- if (pg->vct[j].lpid == lpids[i]) {
+ if (pg->vct[j].lpid == (int) lpids[i]) {
vc = &pg->vct[j];
/*printf( "found vc %x for lpid = %d in another pg\n",
(int)vc, lpids[i] );*/
-----------------------------------------------------------------------
Summary of changes:
src/include/mpiimpl.h | 4 ++--
src/mpi/comm/comm_create.c | 2 +-
src/mpi/comm/comm_group.c | 5 +++--
src/mpi/comm/comm_remote_group.c | 5 +++--
src/mpi/comm/intercomm_create.c | 20 ++++++++++----------
src/mpi/group/grouputil.c | 5 +++--
src/mpid/ch3/include/mpidpost.h | 6 +++---
src/mpid/ch3/src/mpid_vc.c | 16 ++++++++--------
8 files changed, 33 insertions(+), 30 deletions(-)
hooks/post-receive
--
MPICH primary repository
More information about the commits
mailing list