[mpich-commits] [mpich] MPICH primary repository branch, master, updated. v3.2b3-188-g8519d2b
Service Account
noreply at mpich.org
Wed Jul 8 11:36:07 CDT 2015
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 8519d2bb2866c72c32ce6efa202ee5c126e98716 (commit)
via f3d18ad548449d7d8104414a649f89c2fc475b23 (commit)
from cf631e1e71e8e1c6ea3aa1499331ddcdac78dd88 (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/8519d2bb2866c72c32ce6efa202ee5c126e98716
commit 8519d2bb2866c72c32ce6efa202ee5c126e98716
Author: Michael Blocksome <blocksom at us.ibm.com>
Date: Tue Jul 7 20:57:08 2015 +0000
Move the PAMID GPID routines from mpidpre.h to mpidpost.h
The 'MPID_Comm' struct, which is used by the PAMID GPID
routines, is not yet defined when mpidpre.h is included.
Signed-off-by: Antonio J. Pena <apenya at mcs.anl.gov>
diff --git a/src/mpid/pamid/include/mpidpost.h b/src/mpid/pamid/include/mpidpost.h
index 5d238fb..b0fdbfe 100644
--- a/src/mpid/pamid/include/mpidpost.h
+++ b/src/mpid/pamid/include/mpidpost.h
@@ -40,6 +40,65 @@
#ifdef DYNAMIC_TASKING
#define MPID_ICCREATE_REMOTECOMM_HOOK(_p,_c,_np,_gp,_r) \
MPID_PG_ForwardPGInfo(_p,_c,_np,_gp,_r)
-#endif
+#else /* ! DYNAMIC_TASKING */
+/* If DYNAMIC_TASKING is not defined, PAMID does not provide its own GPID routines,
+ so provide one here. **/
+
+/* FIXME: A temporary version for lpids within my comm world */
+static inline int MPID_GPID_GetAllInComm( MPID_Comm *comm_ptr, int local_size,
+ int local_gpids[], int *singlePG )
+{
+ int i;
+ int *gpid = local_gpids;
+
+ for (i=0; i<comm_ptr->local_size; i++) {
+ *gpid++ = 0;
+ (void)MPID_VCR_Get_lpid( comm_ptr->vcr[i], gpid );
+ gpid++;
+ }
+ *singlePG = 1;
+ return 0;
+}
+
+/* FIXME: A temp for lpids within my comm world */
+static inline int MPID_GPID_ToLpidArray( int size, int gpid[], int lpid[] )
+{
+ int i;
+
+ for (i=0; i<size; i++) {
+ lpid[i] = *++gpid; gpid++;
+ }
+ return 0;
+}
+/* FIXME: for MPI1, all process ids are relative to MPI_COMM_WORLD.
+ For MPI2, we'll need to do something more complex */
+static inline int MPID_VCR_CommFromLpids( MPID_Comm *newcomm_ptr,
+ int size, const int lpids[] )
+{
+ MPID_Comm *commworld_ptr;
+ int i;
+ commworld_ptr = MPIR_Process.comm_world;
+ /* Setup the communicator's vc table: remote group */
+ MPID_VCRT_Create( size, &newcomm_ptr->vcrt );
+ MPID_VCRT_Get_ptr( newcomm_ptr->vcrt, &newcomm_ptr->vcr );
+ for (i=0; i<size; i++) {
+ /* For rank i in the new communicator, find the corresponding
+ rank in the comm world (FIXME FOR MPI2) */
+ /* printf( "[%d] Remote rank %d has lpid %d\n",
+ MPIR_Process.comm_world->rank, i, lpids[i] ); */
+ if (lpids[i] < commworld_ptr->remote_size) {
+ MPID_VCR_Dup( commworld_ptr->vcr[lpids[i]],
+ &newcomm_ptr->vcr[i] );
+ }
+ else {
+ /* We must find the corresponding vcr for a given lpid */
+ /* FIXME: Error */
+ return 1;
+ /* MPID_VCR_Dup( ???, &newcomm_ptr->vcr[i] ); */
+ }
+ }
+ return 0;
+}
+#endif /* DYNAMIC_TASKING */
#endif
diff --git a/src/mpid/pamid/include/mpidpre.h b/src/mpid/pamid/include/mpidpre.h
index 687dca8..25e1bab 100644
--- a/src/mpid/pamid/include/mpidpre.h
+++ b/src/mpid/pamid/include/mpidpre.h
@@ -33,6 +33,7 @@
#include <pthread.h>
#include <unistd.h>
+#include "mpiimpl.h"
#include "mpid_dataloop.h"
#include <pami.h>
@@ -59,68 +60,6 @@
#include "mpidi_thread.h"
#include "mpidi_util.h"
-#ifndef DYNAMIC_TASKING
-/* If DYNAMIC_TASKING is not defined, PAMID does not provide its own GPID routines,
- so provide one here. **/
-
-/* FIXME: A temporary version for lpids within my comm world */
-static inline int MPID_GPID_GetAllInComm( MPID_Comm *comm_ptr, int local_size,
- int local_gpids[], int *singlePG )
-{
- int i;
- int *gpid = local_gpids;
-
- for (i=0; i<comm_ptr->local_size; i++) {
- *gpid++ = 0;
- (void)MPID_VCR_Get_lpid( comm_ptr->vcr[i], gpid );
- gpid++;
- }
- *singlePG = 1;
- return 0;
-}
-
-/* FIXME: A temp for lpids within my comm world */
-static inline int MPID_GPID_ToLpidArray( int size, int gpid[], int lpid[] )
-{
- int i;
-
- for (i=0; i<size; i++) {
- lpid[i] = *++gpid; gpid++;
- }
- return 0;
-}
-/* FIXME: for MPI1, all process ids are relative to MPI_COMM_WORLD.
- For MPI2, we'll need to do something more complex */
-static inline int MPID_VCR_CommFromLpids( MPID_Comm *newcomm_ptr,
- int size, const int lpids[] )
-{
- MPID_Comm *commworld_ptr;
- int i;
-
- commworld_ptr = MPIR_Process.comm_world;
- /* Setup the communicator's vc table: remote group */
- MPID_VCRT_Create( size, &newcomm_ptr->vcrt );
- MPID_VCRT_Get_ptr( newcomm_ptr->vcrt, &newcomm_ptr->vcr );
- for (i=0; i<size; i++) {
- /* For rank i in the new communicator, find the corresponding
- rank in the comm world (FIXME FOR MPI2) */
- /* printf( "[%d] Remote rank %d has lpid %d\n",
- MPIR_Process.comm_world->rank, i, lpids[i] ); */
- if (lpids[i] < commworld_ptr->remote_size) {
- MPID_VCR_Dup( commworld_ptr->vcr[lpids[i]],
- &newcomm_ptr->vcr[i] );
- }
- else {
- /* We must find the corresponding vcr for a given lpid */
- /* FIXME: Error */
- return 1;
- /* MPID_VCR_Dup( ???, &newcomm_ptr->vcr[i] ); */
- }
- }
- return 0;
-}
-#endif /* DYNAMIC_TASKING */
-
#ifdef __BGQ__
#define MPID_HANDLE_NUM_INDICES 256
#endif /* __BGQ__ */
http://git.mpich.org/mpich.git/commitdiff/f3d18ad548449d7d8104414a649f89c2fc475b23
commit f3d18ad548449d7d8104414a649f89c2fc475b23
Author: Hajime Fujita <hajime.fujita at intel.com>
Date: Tue Jul 7 10:51:27 2015 -0500
Remove HAVE_GPID_ROUTINES macro
This patch removes HAVE_GPID_ROUTINES, as it seems to be defined
most of the cases. Only PAMID lacks the GPID routines in some case,
so moved the default routines into the PAMID header file.
Signed-off-by: Antonio J. Pena <apenya at mcs.anl.gov>
diff --git a/src/mpi/comm/intercomm_create.c b/src/mpi/comm/intercomm_create.c
index 69ba0c4..b832624 100644
--- a/src/mpi/comm/intercomm_create.c
+++ b/src/mpi/comm/intercomm_create.c
@@ -102,66 +102,6 @@ PMPI_LOCAL int MPIR_CheckDisjointLpids( int lpids1[], int n1,
}
#endif /* HAVE_ERROR_CHECKING */
-#ifndef HAVE_GPID_ROUTINES
-/* FIXME: A temporary version for lpids within my comm world */
-PMPI_LOCAL int MPID_GPID_GetAllInComm( MPID_Comm *comm_ptr, int local_size,
- int local_gpids[], int *singlePG )
-{
- int i;
- int *gpid = local_gpids;
-
- for (i=0; i<comm_ptr->local_size; i++) {
- *gpid++ = 0;
- (void)MPID_VCR_Get_lpid( comm_ptr->vcr[i], gpid );
- gpid++;
- }
- *singlePG = 1;
- return 0;
-}
-
-/* FIXME: A temp for lpids within my comm world */
-PMPI_LOCAL int MPID_GPID_ToLpidArray( int size, int gpid[], int lpid[] )
-{
- int i;
-
- for (i=0; i<size; i++) {
- lpid[i] = *++gpid; gpid++;
- }
- return 0;
-}
-/* FIXME: for MPI1, all process ids are relative to MPI_COMM_WORLD.
- For MPI2, we'll need to do something more complex */
-PMPI_LOCAL int MPID_VCR_CommFromLpids( MPID_Comm *newcomm_ptr,
- int size, const int lpids[] )
-{
- MPID_Comm *commworld_ptr;
- int i;
-
- commworld_ptr = MPIR_Process.comm_world;
- /* Setup the communicator's vc table: remote group */
- MPID_VCRT_Create( size, &newcomm_ptr->vcrt );
- MPID_VCRT_Get_ptr( newcomm_ptr->vcrt, &newcomm_ptr->vcr );
- for (i=0; i<size; i++) {
- /* For rank i in the new communicator, find the corresponding
- rank in the comm world (FIXME FOR MPI2) */
- /* printf( "[%d] Remote rank %d has lpid %d\n",
- MPIR_Process.comm_world->rank, i, lpids[i] ); */
- if (lpids[i] < commworld_ptr->remote_size) {
- MPID_VCR_Dup( commworld_ptr->vcr[lpids[i]],
- &newcomm_ptr->vcr[i] );
- }
- else {
- /* We must find the corresponding vcr for a given lpid */
- /* FIXME: Error */
- return 1;
- /* MPID_VCR_Dup( ???, &newcomm_ptr->vcr[i] ); */
- }
- }
- return 0;
-}
-
-#endif /* HAVE_GPID_ROUTINES */
-
PMPI_LOCAL int MPID_LPID_GetAllInComm( MPID_Comm *comm_ptr, int local_size,
int local_lpids[] )
{
diff --git a/src/mpid/ch3/include/mpidpre.h b/src/mpid/ch3/include/mpidpre.h
index 7838e20..6dd0481 100644
--- a/src/mpid/ch3/include/mpidpre.h
+++ b/src/mpid/ch3/include/mpidpre.h
@@ -482,11 +482,6 @@ MPID_REQUEST_DECL
#endif
#endif
-
-/* Tell Intercomm create and friends that the GPID routines have been
- implemented */
-#define HAVE_GPID_ROUTINES
-
/* Tell initthread to prepare a private comm_world */
#define MPID_NEEDS_ICOMM_WORLD
diff --git a/src/mpid/pamid/include/mpidpre.h b/src/mpid/pamid/include/mpidpre.h
index a10e1ea..687dca8 100644
--- a/src/mpid/pamid/include/mpidpre.h
+++ b/src/mpid/pamid/include/mpidpre.h
@@ -59,9 +59,67 @@
#include "mpidi_thread.h"
#include "mpidi_util.h"
-#ifdef DYNAMIC_TASKING
-#define HAVE_GPID_ROUTINES
-#endif
+#ifndef DYNAMIC_TASKING
+/* If DYNAMIC_TASKING is not defined, PAMID does not provide its own GPID routines,
+ so provide one here. **/
+
+/* FIXME: A temporary version for lpids within my comm world */
+static inline int MPID_GPID_GetAllInComm( MPID_Comm *comm_ptr, int local_size,
+ int local_gpids[], int *singlePG )
+{
+ int i;
+ int *gpid = local_gpids;
+
+ for (i=0; i<comm_ptr->local_size; i++) {
+ *gpid++ = 0;
+ (void)MPID_VCR_Get_lpid( comm_ptr->vcr[i], gpid );
+ gpid++;
+ }
+ *singlePG = 1;
+ return 0;
+}
+
+/* FIXME: A temp for lpids within my comm world */
+static inline int MPID_GPID_ToLpidArray( int size, int gpid[], int lpid[] )
+{
+ int i;
+
+ for (i=0; i<size; i++) {
+ lpid[i] = *++gpid; gpid++;
+ }
+ return 0;
+}
+/* FIXME: for MPI1, all process ids are relative to MPI_COMM_WORLD.
+ For MPI2, we'll need to do something more complex */
+static inline int MPID_VCR_CommFromLpids( MPID_Comm *newcomm_ptr,
+ int size, const int lpids[] )
+{
+ MPID_Comm *commworld_ptr;
+ int i;
+
+ commworld_ptr = MPIR_Process.comm_world;
+ /* Setup the communicator's vc table: remote group */
+ MPID_VCRT_Create( size, &newcomm_ptr->vcrt );
+ MPID_VCRT_Get_ptr( newcomm_ptr->vcrt, &newcomm_ptr->vcr );
+ for (i=0; i<size; i++) {
+ /* For rank i in the new communicator, find the corresponding
+ rank in the comm world (FIXME FOR MPI2) */
+ /* printf( "[%d] Remote rank %d has lpid %d\n",
+ MPIR_Process.comm_world->rank, i, lpids[i] ); */
+ if (lpids[i] < commworld_ptr->remote_size) {
+ MPID_VCR_Dup( commworld_ptr->vcr[lpids[i]],
+ &newcomm_ptr->vcr[i] );
+ }
+ else {
+ /* We must find the corresponding vcr for a given lpid */
+ /* FIXME: Error */
+ return 1;
+ /* MPID_VCR_Dup( ???, &newcomm_ptr->vcr[i] ); */
+ }
+ }
+ return 0;
+}
+#endif /* DYNAMIC_TASKING */
#ifdef __BGQ__
#define MPID_HANDLE_NUM_INDICES 256
-----------------------------------------------------------------------
Summary of changes:
src/mpi/comm/intercomm_create.c | 60 ------------------------------------
src/mpid/ch3/include/mpidpre.h | 5 ---
src/mpid/pamid/include/mpidpost.h | 61 ++++++++++++++++++++++++++++++++++++-
src/mpid/pamid/include/mpidpre.h | 5 +--
4 files changed, 61 insertions(+), 70 deletions(-)
hooks/post-receive
--
MPICH primary repository
More information about the commits
mailing list