[mpich2-commits] r7858 - in mpich2/trunk/src: include mpid/ch3/channels/nemesis/nemesis/src mpid/ch3/src mpid/ch3/util/ftb mpid/ch3/util/sock nameserv/pmi pmi/simple pmi/smpd

balaji at mcs.anl.gov balaji at mcs.anl.gov
Fri Jan 28 16:40:34 CST 2011


Author: balaji
Date: 2011-01-28 16:40:33 -0600 (Fri, 28 Jan 2011)
New Revision: 7858

Modified:
   mpich2/trunk/src/include/pmi.h
   mpich2/trunk/src/mpid/ch3/channels/nemesis/nemesis/src/mpid_nem_ckpt.c
   mpich2/trunk/src/mpid/ch3/src/mpid_init.c
   mpich2/trunk/src/mpid/ch3/src/mpidi_pg.c
   mpich2/trunk/src/mpid/ch3/util/ftb/ftb.c
   mpich2/trunk/src/mpid/ch3/util/sock/ch3u_connect_sock.c
   mpich2/trunk/src/nameserv/pmi/pmi_nameserv.c
   mpich2/trunk/src/pmi/simple/simple_pmi.c
   mpich2/trunk/src/pmi/smpd/ipmi.h
   mpich2/trunk/src/pmi/smpd/smpd_ipmi.c
   mpich2/trunk/src/pmi/smpd/smpd_pmi.c
Log:
Cleanup unused PMI functions. Note that this does not break PMI-1.x
compatibility with exiting process managers, as these functions are
unused. Even if other PMI client library implementations chose to
implement them, we still do not have to use them.

Reviewed by buntinas.

Modified: mpich2/trunk/src/include/pmi.h
===================================================================
--- mpich2/trunk/src/include/pmi.h	2011-01-27 18:57:30 UTC (rev 7857)
+++ mpich2/trunk/src/include/pmi.h	2011-01-28 22:40:33 UTC (rev 7858)
@@ -58,10 +58,6 @@
 #define PMI_ERR_INVALID_KEYVALP     12
 #define PMI_ERR_INVALID_SIZE        13
 
-typedef int PMI_BOOL;
-#define PMI_TRUE     1
-#define PMI_FALSE    0
-
 /* PMI Group functions */
 
 /*@
@@ -101,7 +97,7 @@
 - PMI_FALSE - initialize has not been called or previously failed.
 
 @*/
-int PMI_Initialized( PMI_BOOL *initialized );
+int PMI_Initialized( int *initialized );
 
 /*@
 PMI_Finalize - finalize the Process Manager Interface
@@ -231,69 +227,6 @@
 int PMI_Lookup_name( const char service_name[], char port[] );
 
 /*@
-PMI_Get_id - obtain the id of the process group
-
-Input Parameter:
-. length - length of the id_str character array
-
-Output Parameter:
-. id_str - character array that receives the id of the process group
-
-Return values:
-+ PMI_SUCCESS - id successfully obtained
-. PMI_ERR_INVALID_ARG - invalid rank argument
-. PMI_ERR_INVALID_LENGTH - invalid length argument
-- PMI_FAIL - unable to return the id
-
-Notes:
-This function returns a string that uniquely identifies the process group
-that the local process belongs to.  The string passed in must be at least
-as long as the number returned by 'PMI_Get_id_length_max()'.
-
-@*/
-int PMI_Get_id( char id_str[], int length );
-
-/*@
-PMI_Get_kvs_domain_id - obtain the id of the PMI domain
-
-Input Parameter:
-. length - length of id_str character array
-
-Output Parameter:
-. id_str - character array that receives the id of the PMI domain
-
-Return values:
-+ PMI_SUCCESS - id successfully obtained
-. PMI_ERR_INVALID_ARG - invalid argument
-. PMI_ERR_INVALID_LENGTH - invalid length argument
-- PMI_FAIL - unable to return the id
-
-Notes:
-This function returns a string that uniquely identifies the PMI domain
-where keyval spaces can be shared.  The string passed in must be at least
-as long as the number returned by 'PMI_Get_id_length_max()'.
-
-@*/
-int PMI_Get_kvs_domain_id( char id_str[], int length );
-
-/*@
-PMI_Get_id_length_max - obtain the maximum length of an id string
-
-Output Parameters:
-. length - the maximum length of an id string
-
-Return values:
-+ PMI_SUCCESS - length successfully set
-. PMI_ERR_INVALID_ARG - invalid argument
-- PMI_FAIL - unable to return the maximum length
-
-Notes:
-This function returns the maximum length of a process group id string.
-
-@*/
-int PMI_Get_id_length_max( int *length );
-
-/*@
 PMI_Barrier - barrier across the process group
 
 Return values:
@@ -309,51 +242,6 @@
 int PMI_Barrier( void );
 
 /*@
-PMI_Get_clique_size - obtain the number of processes on the local node
-
-Output Parameters:
-. size - pointer to an integer that receives the size of the clique
-
-Return values:
-+ PMI_SUCCESS - size successfully obtained
-. PMI_ERR_INVALID_ARG - invalid argument
-- PMI_FAIL - unable to return the clique size
-
-Notes:
-This function returns the number of processes in the local process group that
-are on the local node along with the local process.  This is a simple topology
-function to distinguish between processes that can communicate through IPC
-mechanisms (e.g., shared memory) and other network mechanisms.
-
-@*/
-int PMI_Get_clique_size( int *size );
-
-/*@
-PMI_Get_clique_ranks - get the ranks of the local processes in the process group
-
-Input Parameters:
-. length - length of the ranks array
-
-Output Parameters:
-. ranks - pointer to an array of integers that receive the local ranks
-
-Return values:
-+ PMI_SUCCESS - ranks successfully obtained
-. PMI_ERR_INVALID_ARG - invalid argument
-. PMI_ERR_INVALID_LENGTH - invalid length argument
-- PMI_FAIL - unable to return the ranks
-
-Notes:
-This function returns the ranks of the processes on the local node.  The array
-must be at least as large as the size returned by 'PMI_Get_clique_size()'.  This
-is a simple topology function to distinguish between processes that can
-communicate through IPC mechanisms (e.g., shared memory) and other network
-mechanisms.
-
-@*/
-int PMI_Get_clique_ranks( int ranks[], int length );
-
-/*@
 PMI_Abort - abort the process group associated with this process
 
 Input Parameters:
@@ -448,48 +336,6 @@
 int PMI_KVS_Get_value_length_max( int *length );
 
 /*@
-PMI_KVS_Create - create a new keyval space
-
-Input Parameter:
-. length - length of the kvsname character array
-
-Output Parameters:
-. kvsname - a string that receives the keyval space name
-
-Return values:
-+ PMI_SUCCESS - keyval space successfully created
-. PMI_ERR_INVALID_ARG - invalid argument
-. PMI_ERR_INVALID_LENGTH - invalid length argument
-- PMI_FAIL - unable to create a new keyval space
-
-Notes:
-This function creates a new keyval space.  Everyone in the same process group
-can access this keyval space by the name returned by this function.  The
-function is not collective.  Only one process calls this function.  The output
-parameter, kvsname, must be at least as long as the value returned by
-'PMI_KVS_Get_name_length_max()'.
-
-@*/
-int PMI_KVS_Create( char kvsname[], int length );
-
-/*@
-PMI_KVS_Destroy - destroy keyval space
-
-Input Parameters:
-. kvsname - keyval space name
-
-Return values:
-+ PMI_SUCCESS - keyval space successfully destroyed
-. PMI_ERR_INVALID_ARG - invalid argument
-- PMI_FAIL - unable to destroy the keyval space
-
-Notes:
-This function destroys a keyval space created by 'PMI_KVS_Create()'.
-
-@*/
-int PMI_KVS_Destroy( const char kvsname[] );
-
-/*@
 PMI_KVS_Put - put a key/value pair in a keyval space
 
 Input Parameters:
@@ -558,68 +404,6 @@
 @*/
 int PMI_KVS_Get( const char kvsname[], const char key[], char value[], int length);
 
-/*@
-PMI_KVS_Iter_first - initialize the iterator and get the first value
-
-Input Parameters:
-+ kvsname - keyval space name
-. key_len - length of key character array
-- val_len - length of val character array
-
-Output Parameters:
-+ key - key
-- value - value
-
-Return values:
-+ PMI_SUCCESS - keyval pair successfully retrieved from the keyval space
-. PMI_ERR_INVALID_KVS - invalid kvsname argument
-. PMI_ERR_INVALID_KEY - invalid key argument
-. PMI_ERR_INVALID_KEY_LENGTH - invalid key length argument
-. PMI_ERR_INVALID_VAL - invalid val argument
-. PMI_ERR_INVALID_VAL_LENGTH - invalid val length argument
-- PMI_FAIL - failed to initialize the iterator and get the first keyval pair
-
-Notes:
-This function initializes the iterator for the specified keyval space and
-retrieves the first key/val pair.  The end of the keyval space is specified
-by returning an empty key string.  key and val must be at least as long as
-the values returned by 'PMI_KVS_Get_key_length_max()' and
-'PMI_KVS_Get_value_length_max()'.
-
-@*/
-int PMI_KVS_Iter_first(const char kvsname[], char key[], int key_len, char val[], int val_len);
-
-/*@
-PMI_KVS_Iter_next - get the next keyval pair from the keyval space
-
-Input Parameters:
-+ kvsname - keyval space name
-. key_len - length of key character array
-- val_len - length of val character array
-
-Output Parameters:
-+ key - key
-- value - value
-
-Return values:
-+ PMI_SUCCESS - keyval pair successfully retrieved from the keyval space
-. PMI_ERR_INVALID_KVS - invalid kvsname argument
-. PMI_ERR_INVALID_KEY - invalid key argument
-. PMI_ERR_INVALID_KEY_LENGTH - invalid key length argument
-. PMI_ERR_INVALID_VAL - invalid val argument
-. PMI_ERR_INVALID_VAL_LENGTH - invalid val length argument
-- PMI_FAIL - failed to get the next keyval pair
-
-Notes:
-This function retrieves the next keyval pair from the specified keyval space.  
-'PMI_KVS_Iter_first()' must have been previously called.  The end of the keyval
-space is specified by returning an empty key string.  The output parameters,
-key and val, must be at least as long as the values returned by
-'PMI_KVS_Get_key_length_max()' and 'PMI_KVS_Get_value_length_max()'.
-
-@*/
-int PMI_KVS_Iter_next(const char kvsname[], char key[], int key_len, char val[], int val_len);
-
 /* PMI Process Creation functions */
 
 /*S

Modified: mpich2/trunk/src/mpid/ch3/channels/nemesis/nemesis/src/mpid_nem_ckpt.c
===================================================================
--- mpich2/trunk/src/mpid/ch3/channels/nemesis/nemesis/src/mpid_nem_ckpt.c	2011-01-27 18:57:30 UTC (rev 7857)
+++ mpich2/trunk/src/mpid/ch3/channels/nemesis/nemesis/src/mpid_nem_ckpt.c	2011-01-28 22:40:33 UTC (rev 7858)
@@ -211,7 +211,7 @@
     CHECK_ERR(pg_rank != MPIDI_Process.my_pg_rank, "pg rank differs after restart");
 
     /* get new pg_id */
-    ret = PMI_Get_id_length_max(&pg_id_sz);
+    ret = PMI_KVS_Get_name_length_max(&pg_id_sz);
     CHECK_ERR(ret, "pmi_get_id_length_max");
     
     MPIU_Free(MPIDI_Process.my_pg->id);
@@ -219,7 +219,7 @@
     MPIDI_Process.my_pg->id = MPIU_Malloc(pg_id_sz + 1);
     CHECK_ERR(MPIDI_Process.my_pg->id == NULL, "malloc failed");
 
-    ret = PMI_Get_id(MPIDI_Process.my_pg->id, pg_id_sz);
+    ret = PMI_KVS_Get_name(MPIDI_Process.my_pg->id, pg_id_sz);
     CHECK_ERR(ret, "pmi_get_id");
 
     /* get new kvsname */
@@ -232,7 +232,7 @@
     CHECK_ERR(MPIDI_Process.my_pg->connData == NULL, "malloc failed");
 
     ret = PMI_KVS_Get_my_name(MPIDI_Process.my_pg->connData, kvs_name_sz);
-    CHECK_ERR(ret, "PMI_Get_id");
+    CHECK_ERR(ret, "PMI_Get_my_name");
 
     
     MPIDI_FUNC_EXIT(MPID_STATE_REINIT_PMI);

Modified: mpich2/trunk/src/mpid/ch3/src/mpid_init.c
===================================================================
--- mpich2/trunk/src/mpid/ch3/src/mpid_init.c	2011-01-27 18:57:30 UTC (rev 7857)
+++ mpich2/trunk/src/mpid/ch3/src/mpid_init.c	2011-01-28 22:40:33 UTC (rev 7858)
@@ -409,7 +409,7 @@
 	/*
 	 * Get the process group id
 	 */
-	pmi_errno = PMI_Get_id_length_max(&pg_id_sz);
+	pmi_errno = PMI_KVS_Get_name_length_max(&pg_id_sz);
 	if (pmi_errno != PMI_SUCCESS) {
 	    MPIU_ERR_SETANDJUMP1(mpi_errno,MPI_ERR_OTHER,
 				 "**pmi_get_id_length_max", 
@@ -426,7 +426,7 @@
 	/* Note in the singleton init case, the pg_id is a dummy.
 	   We'll want to replace this value if we join an 
 	   Process manager */
-	pmi_errno = PMI_Get_id(pg_id, pg_id_sz);
+	pmi_errno = PMI_KVS_Get_my_name(pg_id, pg_id_sz);
 	if (pmi_errno != PMI_SUCCESS) {
 	    MPIU_ERR_SETANDJUMP1(mpi_errno,MPI_ERR_OTHER, "**pmi_get_id",
 				 "**pmi_get_id %d", pmi_errno);

Modified: mpich2/trunk/src/mpid/ch3/src/mpidi_pg.c
===================================================================
--- mpich2/trunk/src/mpid/ch3/src/mpidi_pg.c	2011-01-27 18:57:30 UTC (rev 7857)
+++ mpich2/trunk/src/mpid/ch3/src/mpidi_pg.c	2011-01-28 22:40:33 UTC (rev 7858)
@@ -938,7 +938,7 @@
 #ifdef USE_PMI2_API
         MPIU_Assertp(0); /* don't know what to do here for pmi2 yet.  DARIUS */
 #else
-	PMI_Get_id( pg->id, 256 );
+	PMI_KVS_Get_my_name( pg->id, 256 );
 #endif
     }
     
@@ -1264,7 +1264,7 @@
 	char buf[256];
 	/* Force an enroll */
 	PMI_KVS_Get( "foobar", "foobar", buf, sizeof(buf) );
-	PMI_Get_id( pg_world->id, 256 );
+	PMI_KVS_Get_my_name( pg_world->id, 256 );
 	PMI_KVS_Get_my_name( pg_world->connData, 256 );
     }
 #endif

Modified: mpich2/trunk/src/mpid/ch3/util/ftb/ftb.c
===================================================================
--- mpich2/trunk/src/mpid/ch3/util/ftb/ftb.c	2011-01-27 18:57:30 UTC (rev 7857)
+++ mpich2/trunk/src/mpid/ch3/util/ftb/ftb.c	2011-01-28 22:40:33 UTC (rev 7858)
@@ -50,7 +50,7 @@
     ret = PMI2_Job_GetId(ci.client_jobid, sizeof(ci.client_jobid));
     MPIU_ERR_CHKANDJUMP(ret, mpi_errno, MPI_ERR_OTHER, "**pmi_jobgetid");
 #else
-    ret = PMI_Get_id(ci.client_jobid, sizeof(ci.client_jobid));
+    ret = PMI_KVS_Get_my_name(ci.client_jobid, sizeof(ci.client_jobid));
     MPIU_ERR_CHKANDJUMP(ret, mpi_errno, MPI_ERR_OTHER, "**pmi_get_id");
 #endif
     

Modified: mpich2/trunk/src/mpid/ch3/util/sock/ch3u_connect_sock.c
===================================================================
--- mpich2/trunk/src/mpid/ch3/util/sock/ch3u_connect_sock.c	2011-01-27 18:57:30 UTC (rev 7857)
+++ mpich2/trunk/src/mpid/ch3/util/sock/ch3u_connect_sock.c	2011-01-28 22:40:33 UTC (rev 7858)
@@ -179,7 +179,7 @@
 #ifdef USE_PMI2_API
     id_sz = MPID_MAX_JOBID_LEN;
 #else
-    pmi_errno = PMI_Get_id_length_max(&id_sz);
+    pmi_errno = PMI_KVS_Get_name_length_max(&id_sz);
     MPIU_ERR_CHKANDJUMP1(pmi_errno, mpi_errno,MPI_ERR_OTHER, 
 			     "**pmi_get_id_length_max",
 			     "**pmi_get_id_length_max %d", pmi_errno);

Modified: mpich2/trunk/src/nameserv/pmi/pmi_nameserv.c
===================================================================
--- mpich2/trunk/src/nameserv/pmi/pmi_nameserv.c	2011-01-27 18:57:30 UTC (rev 7857)
+++ mpich2/trunk/src/nameserv/pmi/pmi_nameserv.c	2011-01-28 22:40:33 UTC (rev 7858)
@@ -191,8 +191,7 @@
     }
     else
     {
-	/*err = PMI_KVS_Create((*handle_ptr)->kvsname, length);*/
-	err = PMI_Get_kvs_domain_id((*handle_ptr)->kvsname, length);
+	err = PMI_KVS_Get_my_name((*handle_ptr)->kvsname, length);
 	/* --BEGIN ERROR HANDLING-- */
 	if (err != PMI_SUCCESS)
 	{
@@ -296,16 +295,6 @@
     static const char FCNAME[] = "MPID_NS_Free";
     int err;
 
-    /*printf("free kvs: <%s>\n", (*handle_ptr)->kvsname);fflush(stdout);*/
-    err = PMI_KVS_Destroy((*handle_ptr)->kvsname);
-    /* --BEGIN ERROR HANDLING-- */
-    if (err != PMI_SUCCESS)
-    {
-	err = MPIR_Err_create_code( MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, "**pmi_kvs_destroy", 0 );
-	return err;
-    }
-    /* --END ERROR HANDLING-- */
-
     MPIU_Free( (*handle_ptr)->kvsname );
     MPIU_Free( *handle_ptr );
     *handle_ptr = 0;

Modified: mpich2/trunk/src/pmi/simple/simple_pmi.c
===================================================================
--- mpich2/trunk/src/pmi/simple/simple_pmi.c	2011-01-27 18:57:30 UTC (rev 7857)
+++ mpich2/trunk/src/pmi/simple/simple_pmi.c	2011-01-28 22:40:33 UTC (rev 7858)
@@ -85,7 +85,6 @@
 static int PMI_keylen_max = 0;
 static int PMI_vallen_max = 0;
 
-static int PMI_iter_next_idx = 0;
 static int PMI_debug = 0;
 static int PMI_debug_init = 0;    /* Set this to true to debug the init
 				     handshakes */
@@ -93,8 +92,6 @@
 
 /* Function prototypes for internal routines */
 static int PMII_getmaxes( int *kvsname_max, int *keylen_max, int *vallen_max );
-static int PMII_iter( const char *kvsname, const int idx, int *nextidx, 
-		      char *key, int key_len, char *val, int val_len );
 static int PMII_Set_from_port( int, int );
 static int PMII_Connect_to_pm( char *, int );
 
@@ -221,13 +218,13 @@
     return( 0 );
 }
 
-int PMI_Initialized( PMI_BOOL *initialized )
+int PMI_Initialized( int *initialized )
 {
     /* Turn this into a logical value (1 or 0) .  This allows us
        to use PMI_initialized to distinguish between initialized with
        an PMI service (e.g., via mpiexec) and the singleton init, 
        which has no PMI service */
-    *initialized = PMI_initialized != 0 ? PMI_TRUE : PMI_FALSE;
+    *initialized = (PMI_initialized != 0);
     return PMI_SUCCESS;
 }
 
@@ -309,85 +306,6 @@
     return err;
 }
 
-/* */
-static int clique_size=-2, *clique_ranks =0;
-
-/* pmiPrivateLocalRanks_<r> gets the local ranks for this process */
-int PMI_Get_clique_size( int *size )
-{
-#if 1
-    char buf[PMIU_MAXLINE];
-    char pmi_kvsname[1024];
-    int i, rc, err;
-
-    /* As the server for the information on the */
-    if (clique_size == -2 && PMI_initialized > SINGLETON_INIT_BUT_NO_PM)  {
-	PMI_KVS_Get_my_name( pmi_kvsname, sizeof(pmi_kvsname) );
-	rc = MPIU_Snprintf( buf, PMIU_MAXLINE, 
-			    "cmd=get kvsname=%s key=pmiPrivateLocalRanks_%d\n", 
-			    pmi_kvsname, PMI_rank );
-	if (rc < 0) return PMI_FAIL;
-
-	err = GetResponse( buf, "get_result", 0 );
-	if (err == PMI_SUCCESS) {
-	    PMIU_getval( "rc", buf, PMIU_MAXLINE );
-	    rc = atoi( buf );
-	    if ( rc == 0 ) {
-		char *p = buf, *p0;
-		/* Allocate clique_ranks and fill it in */
-		PMIU_getval( "value", buf, PMIU_MAXLINE );
-		/* Count the number of ranks and allocate the space for them */
-		clique_size = 1;
-		while (*p) {
-		    if (*p++ == ',') clique_size++;
-		}
-		clique_ranks = (int *)MPIU_Malloc( clique_size * sizeof(int) );
-		DBG_PRINTF( ("Clique_size = %d\n", clique_size) );
-		p0 = p = buf;
-		i  = 0;
-		while (*p) {
-		    while (*p && *p != ',') p++;
-		    if (*p == ',') *p++ = 0;
-		    clique_ranks[i++] = atoi(p0);
-		    p0 = p;
-		}
-	    }
-	    else {
-		/* Default case (PM did not understand request) */
-		clique_size = 1;
-	    }
-	}
-    }
-    if (clique_size < 0) *size = 1;
-    else                 *size = clique_size;
-#else
-    *size = 1;
-#endif
-    return PMI_SUCCESS;
-}
-
-int PMI_Get_clique_ranks( int ranks[], int length )
-{
-#if 1
-    int i;
-    if (length < 1) 
-	return PMI_ERR_INVALID_ARG;
-
-    if (clique_size > 0 && clique_ranks) {
-	for (i=0; i<length && i<clique_size; i++) 
-	    ranks[i] = clique_ranks[i];
-    }
-    else 
-	ranks[0] = PMI_rank;
-    return PMI_SUCCESS;
-#else
-    if ( length < 1 )
-	return PMI_ERR_INVALID_ARG;
-    else
-	return PMI_Get_rank( &ranks[0] );
-#endif
-}
-
 /* Inform the process manager that we're in finalize */
 int PMI_Finalize( void )
 {
@@ -398,8 +316,6 @@
 	shutdown( PMI_fd, SHUT_RDWR );
 	close( PMI_fd );
     }
-    /* Free any memory that we've allocated */
-    if (clique_ranks) MPIU_Free( clique_ranks );
 
     return err;
 }
@@ -459,64 +375,6 @@
     return PMI_SUCCESS;
 }
 
-/* We will use the default kvsname for both the kvs_domain_id and for the id */
-/* Hence the implementation of the following three functions */
-
-int PMI_Get_id_length_max( int *length )
-{
-    if (length == NULL)
-	return PMI_ERR_INVALID_ARG;
-    *length = PMI_kvsname_max;
-    return PMI_SUCCESS;
-}
-
-int PMI_Get_id( char id_str[], int length )
-{
-    int rc = PMI_KVS_Get_my_name( id_str, length );
-    return rc;
-}
-
-/* FIXME: What is this function?  How is it defined and used? */
-int PMI_Get_kvs_domain_id( char id_str[], int length )
-{
-    return PMI_KVS_Get_my_name( id_str, length );
-}
-
-/*FIXME: need to return an error if the value of the kvs name returned is 
-  truncated  because it is larger than length */
-int PMI_KVS_Create( char kvsname[], int length )
-{
-    int err = PMI_SUCCESS;
-    
-    if (PMI_initialized == SINGLETON_INIT_BUT_NO_PM) {
-	/* It is ok to pretend to *create* a kvs space */
-	return 0;
-    }
-
-    err = GetResponse( "cmd=create_kvs\n", "newkvs", 0 );
-    if (err == PMI_SUCCESS) {
-	PMIU_getval( "kvsname", kvsname, length );
-    }
-    return err;
-}
-
-int PMI_KVS_Destroy( const char kvsname[] )
-{
-    char buf[PMIU_MAXLINE];
-    int  err = PMI_SUCCESS;
-
-    if (PMI_initialized == SINGLETON_INIT_BUT_NO_PM) {
-	return 0;
-    }
-
-    /* FIXME: Check for tempbuf too short */
-    MPIU_Snprintf( buf, PMIU_MAXLINE, "cmd=destroy_kvs kvsname=%s\n", 
-		   kvsname );
-    err = GetResponse( buf, "kvs_destroyed", 1 );
-    return err;
-
-}
-
 int PMI_KVS_Put( const char kvsname[], const char key[], const char value[] )
 {
     char buf[PMIU_MAXLINE];
@@ -581,27 +439,6 @@
     return err;
 }
 
-int PMI_KVS_Iter_first(const char kvsname[], char key[], int key_len, 
-		       char val[], int val_len)
-{
-    int rc;
-
-    rc = PMII_iter( kvsname, 0, &PMI_iter_next_idx, key, key_len, val, val_len );
-    return( rc );
-}
-
-int PMI_KVS_Iter_next(const char kvsname[], char key[], int key_len, 
-		      char val[], int val_len)
-{
-    int rc;
-
-    rc = PMII_iter( kvsname, PMI_iter_next_idx, &PMI_iter_next_idx, 
-		    key, key_len, val, val_len );
-    if ( rc == -2 )
-	PMI_iter_next_idx = 0;
-    return( rc );
-}
-
 /*************************** Name Publishing functions **********************/
 
 int PMI_Publish_name( const char service_name[], const char port[] )
@@ -887,46 +724,6 @@
 
 /***************** Internal routines not part of PMI interface ***************/
 
-/* get a keyval pair by specific index */
-
-static int PMII_iter( const char *kvsname, const int idx, int *next_idx, 
-		      char *key, int key_len, char *val, int val_len)
-{
-    char buf[PMIU_MAXLINE], cmd[PMIU_MAXLINE];
-    int  rc, err;
-
-    /* FIXME: Check for tempbuf too short */
-    rc = MPIU_Snprintf( buf, PMIU_MAXLINE, "cmd=getbyidx kvsname=%s idx=%d\n", 
-			kvsname, idx  );
-    if (rc < 0) {
-	return PMI_FAIL;
-    }
-    err = GetResponse( cmd, "getbyidx_results", 0 );
-    if (err == PMI_SUCCESS) {
-	PMIU_getval( "rc", buf, PMIU_MAXLINE );
-	rc = atoi( buf );
-	if ( rc == 0 ) {
-	    PMIU_getval( "nextidx", buf, PMIU_MAXLINE );
-	    *next_idx = atoi( buf );
-	    PMIU_getval( "key", key, key_len );
-	    PMIU_getval( "val", val, val_len );
-	    return( PMI_SUCCESS );
-	}
-	else {
-	    PMIU_getval( "reason", buf, PMIU_MAXLINE );
-	    if ( strncmp( buf, "no_more_keyvals", PMIU_MAXLINE ) == 0 ) {
-		key[0] = '\0';
-		return( PMI_SUCCESS );
-	    }
-	    else {
-		PMIU_printf( 1, "iter failed; reason = %s\n", buf );
-		return( PMI_FAIL );
-	    }
-	}
-    }
-    return err;
-}
-
 /* to get all maxes in one message */
 /* FIXME: This mixes init with get maxes */
 static int PMII_getmaxes( int *kvsname_max, int *keylen_max, int *vallen_max )

Modified: mpich2/trunk/src/pmi/smpd/ipmi.h
===================================================================
--- mpich2/trunk/src/pmi/smpd/ipmi.h	2011-01-27 18:57:30 UTC (rev 7857)
+++ mpich2/trunk/src/pmi/smpd/ipmi.h	2011-01-28 22:40:33 UTC (rev 7858)
@@ -46,7 +46,7 @@
 int iPMI_Init( int *spawned );           /* initialize PMI for this process group
                                            The value of spawned indicates whether this process
                                            was created by PMI_Spawn_multiple. */
-int iPMI_Initialized( PMI_BOOL *initialized );            /* Return true if PMI has been initialized */
+int iPMI_Initialized( int *initialized );            /* Return true if PMI has been initialized */
 int iPMI_Finalize( void );               /* finalize PMI for this process group */
 int iPMI_Get_size( int *size );          /* get size of process group */
 int iPMI_Get_rank( int *rank );          /* get rank in process group */
@@ -106,7 +106,7 @@
 typedef struct ipmi_functions_t
 {
     int (*PMI_Init)( int * );
-    int (*PMI_Initialized)( PMI_BOOL *);
+    int (*PMI_Initialized)( int *);
     int (*PMI_Finalize)( void );
     int (*PMI_Get_size)( int * );
     int (*PMI_Get_rank)( int * );

Modified: mpich2/trunk/src/pmi/smpd/smpd_ipmi.c
===================================================================
--- mpich2/trunk/src/pmi/smpd/smpd_ipmi.c	2011-01-27 18:57:30 UTC (rev 7857)
+++ mpich2/trunk/src/pmi/smpd/smpd_ipmi.c	2011-01-28 22:40:33 UTC (rev 7858)
@@ -672,7 +672,7 @@
     goto fn_exit;
 }
 
-int iPMI_Initialized(PMI_BOOL *initialized)
+int iPMI_Initialized(int *initialized)
 {
     if (initialized == NULL)
 	return PMI_ERR_INVALID_ARG;

Modified: mpich2/trunk/src/pmi/smpd/smpd_pmi.c
===================================================================
--- mpich2/trunk/src/pmi/smpd/smpd_pmi.c	2011-01-27 18:57:30 UTC (rev 7857)
+++ mpich2/trunk/src/pmi/smpd/smpd_pmi.c	2011-01-28 22:40:33 UTC (rev 7858)
@@ -72,7 +72,7 @@
 	    {
 		return PMI_FAIL;
 	    }
-	    fn.PMI_Initialized = (int (*)(PMI_BOOL *))PMIGetProcAddress(hModule, "PMI_Initialized");
+	    fn.PMI_Initialized = (int (*)(int *))PMIGetProcAddress(hModule, "PMI_Initialized");
 	    fn.PMI_Finalize = (int (*)(void))PMIGetProcAddress(hModule, "PMI_Finalize");
 	    fn.PMI_Get_size = (int (*)(int *))PMIGetProcAddress(hModule, "PMI_Get_size");
 	    fn.PMI_Get_rank = (int (*)(int *))PMIGetProcAddress(hModule, "PMI_Get_rank");
@@ -178,41 +178,6 @@
     return fn.PMI_Get_appnum(appnum);
 }
 
-int PMI_Get_clique_size( int *size )
-{
-    if (fn.PMI_Get_clique_size == NULL)
-	return PMI_FAIL;
-    return fn.PMI_Get_clique_size(size);
-}
-
-int PMI_Get_clique_ranks( int ranks[], int length )
-{
-    if (fn.PMI_Get_clique_ranks == NULL)
-	return PMI_FAIL;
-    return fn.PMI_Get_clique_ranks(ranks, length);
-}
-
-int PMI_Get_id( char id_str[], int length )
-{
-    if (fn.PMI_Get_id == NULL)
-	return PMI_FAIL;
-    return fn.PMI_Get_id(id_str, length);
-}
-
-int PMI_Get_kvs_domain_id( char id_str[], int length )
-{
-    if (fn.PMI_Get_kvs_domain_id == NULL)
-	return PMI_FAIL;
-    return fn.PMI_Get_kvs_domain_id(id_str, length);
-}
-
-int PMI_Get_id_length_max(int *maxlen)
-{
-    if (fn.PMI_Get_id_length_max == NULL)
-	return PMI_FAIL;
-    return fn.PMI_Get_id_length_max(maxlen);
-}
-
 int PMI_Barrier()
 {
     if (fn.PMI_Barrier == NULL)
@@ -255,20 +220,6 @@
     return fn.PMI_KVS_Get_value_length_max(maxlen);
 }
 
-int PMI_KVS_Create(char kvsname[], int length)
-{
-    if (fn.PMI_KVS_Create == NULL)
-	return PMI_FAIL;
-    return fn.PMI_KVS_Create(kvsname, length);
-}
-
-int PMI_KVS_Destroy(const char kvsname[])
-{
-    if (fn.PMI_KVS_Destroy == NULL)
-	return PMI_FAIL;
-    return fn.PMI_KVS_Destroy(kvsname);
-}
-
 int PMI_KVS_Put(const char kvsname[], const char key[], const char value[])
 {
     if (fn.PMI_KVS_Put == NULL)
@@ -290,20 +241,6 @@
     return fn.PMI_KVS_Get(kvsname, key, value, length);
 }
 
-int PMI_KVS_Iter_first(const char kvsname[], char key[], int key_len, char value[], int val_len)
-{
-    if (fn.PMI_KVS_Iter_first == NULL)
-	return PMI_FAIL;
-    return fn.PMI_KVS_Iter_first(kvsname, key, key_len, value, val_len);
-}
-
-int PMI_KVS_Iter_next(const char kvsname[], char key[], int key_len, char value[], int val_len)
-{
-    if (fn.PMI_KVS_Iter_next == NULL)
-	return PMI_FAIL;
-    return fn.PMI_KVS_Iter_next(kvsname, key, key_len, value, val_len);
-}
-
 int PMI_Spawn_multiple(int count,
                        const char * cmds[],
                        const char ** argvs[],



More information about the mpich2-commits mailing list