[mpich2-commits] r7888 - in mpich2/trunk/src/pm/hydra: pm/pmiserv tools/bootstrap/include tools/bootstrap/src

balaji at mcs.anl.gov balaji at mcs.anl.gov
Tue Feb 1 18:38:06 CST 2011


Author: balaji
Date: 2011-02-01 18:38:06 -0600 (Tue, 01 Feb 2011)
New Revision: 7888

Removed:
   mpich2/trunk/src/pm/hydra/tools/bootstrap/src/bsci_usize.c
Modified:
   mpich2/trunk/src/pm/hydra/pm/pmiserv/pmip_pmi_v1.c
   mpich2/trunk/src/pm/hydra/tools/bootstrap/include/bsci.h
   mpich2/trunk/src/pm/hydra/tools/bootstrap/src/Makefile.mk
   mpich2/trunk/src/pm/hydra/tools/bootstrap/src/bsci_init.c.in
Log:
Improvements to the universe size detection. The proxy already has the
global core count, which we use as the universe size.

Modified: mpich2/trunk/src/pm/hydra/pm/pmiserv/pmip_pmi_v1.c
===================================================================
--- mpich2/trunk/src/pm/hydra/pm/pmiserv/pmip_pmi_v1.c	2011-02-02 00:38:01 UTC (rev 7887)
+++ mpich2/trunk/src/pm/hydra/pm/pmiserv/pmip_pmi_v1.c	2011-02-02 00:38:06 UTC (rev 7888)
@@ -289,18 +289,15 @@
 
 static HYD_status fn_get_usize(int fd, char *args[])
 {
-    int usize, i;
+    int i;
     char *tmp[HYD_NUM_TMP_STRINGS], *cmd;
     HYD_status status = HYD_SUCCESS;
 
     HYDU_FUNC_ENTER();
 
-    status = HYDT_bsci_query_usize(&usize);
-    HYDU_ERR_POP(status, "unable to get launcher universe size\n");
-
     i = 0;
     tmp[i++] = HYDU_strdup("cmd=universe_size size=");
-    tmp[i++] = HYDU_int_to_str(usize);
+    tmp[i++] = HYDU_int_to_str(HYD_pmcd_pmip.system_global.global_core_count);
     tmp[i++] = HYDU_strdup("\n");
     tmp[i++] = NULL;
 

Modified: mpich2/trunk/src/pm/hydra/tools/bootstrap/include/bsci.h
===================================================================
--- mpich2/trunk/src/pm/hydra/tools/bootstrap/include/bsci.h	2011-02-02 00:38:01 UTC (rev 7887)
+++ mpich2/trunk/src/pm/hydra/tools/bootstrap/include/bsci.h	2011-02-02 00:38:06 UTC (rev 7888)
@@ -62,9 +62,6 @@
     /** \brief Wait for launched processes to complete */
     HYD_status(*wait_for_completion) (int timeout);
 
-    /** \brief Query for the universe size */
-    HYD_status(*query_usize) (int *size);
-
     /** \brief Query the ID of a proxy */
     HYD_status(*query_proxy_id) (int *proxy_id);
 
@@ -164,19 +161,6 @@
 
 
 /**
- * \brief HYDT_bsci_query_usize - Query for the universe size
- *
- * \param[out]  size       Maximum number of processes that can be launched
- *
- * If the underlying system allows for multitasking many processes on
- * a single processing element, the launcher should return "-1"
- * (representing infinite). If not, it should specify the number of
- * processes that can be spawned.
- */
-HYD_status HYDT_bsci_query_usize(int *size);
-
-
-/**
  * \brief HYDT_bsci_query_proxy_id - Query the ID of a proxy
  *
  * \param[out]  proxy_id    My proxy ID

Modified: mpich2/trunk/src/pm/hydra/tools/bootstrap/src/Makefile.mk
===================================================================
--- mpich2/trunk/src/pm/hydra/tools/bootstrap/src/Makefile.mk	2011-02-02 00:38:01 UTC (rev 7887)
+++ mpich2/trunk/src/pm/hydra/tools/bootstrap/src/Makefile.mk	2011-02-02 00:38:06 UTC (rev 7888)
@@ -11,6 +11,5 @@
 	$(top_srcdir)/tools/bootstrap/src/bsci_query_job_id.c \
 	$(top_srcdir)/tools/bootstrap/src/bsci_query_proxy_id.c \
 	$(top_srcdir)/tools/bootstrap/src/bsci_query_native_int.c \
-	$(top_srcdir)/tools/bootstrap/src/bsci_usize.c \
 	$(top_srcdir)/tools/bootstrap/src/bsci_wait.c \
 	$(top_srcdir)/tools/bootstrap/src/bsci_env.c

Modified: mpich2/trunk/src/pm/hydra/tools/bootstrap/src/bsci_init.c.in
===================================================================
--- mpich2/trunk/src/pm/hydra/tools/bootstrap/src/bsci_init.c.in	2011-02-02 00:38:01 UTC (rev 7887)
+++ mpich2/trunk/src/pm/hydra/tools/bootstrap/src/bsci_init.c.in	2011-02-02 00:38:06 UTC (rev 7888)
@@ -29,7 +29,6 @@
     HYDT_bsci_fns.launch_procs = NULL;
     HYDT_bsci_fns.launcher_finalize = NULL;
     HYDT_bsci_fns.wait_for_completion = NULL;
-    HYDT_bsci_fns.query_usize = NULL;
     HYDT_bsci_fns.query_proxy_id = NULL;
     HYDT_bsci_fns.query_env_inherit = NULL;
 }

Deleted: mpich2/trunk/src/pm/hydra/tools/bootstrap/src/bsci_usize.c
===================================================================
--- mpich2/trunk/src/pm/hydra/tools/bootstrap/src/bsci_usize.c	2011-02-02 00:38:01 UTC (rev 7887)
+++ mpich2/trunk/src/pm/hydra/tools/bootstrap/src/bsci_usize.c	2011-02-02 00:38:06 UTC (rev 7888)
@@ -1,41 +0,0 @@
-/* -*- Mode: C; c-basic-offset:4 ; -*- */
-/*
- *  (C) 2008 by Argonne National Laboratory.
- *      See COPYRIGHT in top-level directory.
- */
-
-#include "hydra.h"
-#include "bsci.h"
-#include "bscu.h"
-
-HYD_status HYDT_bsci_query_usize(int *size)
-{
-    struct HYD_node *node_list, *tmp;
-    HYD_status status = HYD_SUCCESS;
-
-    HYDU_FUNC_ENTER();
-
-    if (HYDT_bsci_fns.query_usize)
-        return HYDT_bsci_fns.query_usize(size);
-
-    status = HYDT_bsci_query_node_list(&node_list);
-    HYDU_ERR_POP(status, "unable to query node list\n");
-
-    if (node_list) {
-        *size = 0;
-        for (tmp = node_list; tmp; tmp = tmp->next)
-            *size += tmp->core_count;
-    }
-    else {
-        *size = -1;
-    }
-
-    HYDU_free_node_list(node_list);
-
-  fn_exit:
-    HYDU_FUNC_EXIT();
-    return status;
-
-  fn_fail:
-    goto fn_exit;
-}



More information about the mpich2-commits mailing list