[mpich-commits] r10775 - in mpich2/trunk/src/pm/hydra/tools/bootstrap: external include src
balaji at mcs.anl.gov
balaji at mcs.anl.gov
Wed Dec 19 16:24:42 CST 2012
Author: balaji
Date: 2012-12-19 16:24:42 -0600 (Wed, 19 Dec 2012)
New Revision: 10775
Added:
mpich2/trunk/src/pm/hydra/tools/bootstrap/external/cobalt.h
mpich2/trunk/src/pm/hydra/tools/bootstrap/external/cobalt_init.c
mpich2/trunk/src/pm/hydra/tools/bootstrap/external/cobalt_query_native_int.c
mpich2/trunk/src/pm/hydra/tools/bootstrap/external/cobalt_query_node_list.c
Modified:
mpich2/trunk/src/pm/hydra/tools/bootstrap/external/Makefile.mk
mpich2/trunk/src/pm/hydra/tools/bootstrap/external/common.h
mpich2/trunk/src/pm/hydra/tools/bootstrap/include/bsci.h
mpich2/trunk/src/pm/hydra/tools/bootstrap/src/Makefile.mk
Log:
Initial commit for Cobalt RMK support.
No reviewer.
Modified: mpich2/trunk/src/pm/hydra/tools/bootstrap/external/Makefile.mk
===================================================================
--- mpich2/trunk/src/pm/hydra/tools/bootstrap/external/Makefile.mk 2012-12-19 22:24:41 UTC (rev 10774)
+++ mpich2/trunk/src/pm/hydra/tools/bootstrap/external/Makefile.mk 2012-12-19 22:24:42 UTC (rev 10775)
@@ -12,6 +12,7 @@
tools/bootstrap/external/rsh.h \
tools/bootstrap/external/sge.h \
tools/bootstrap/external/slurm.h \
+ tools/bootstrap/external/cobalt.h \
tools/bootstrap/external/ssh.h
libhydra_la_SOURCES += $(top_srcdir)/tools/bootstrap/external/external_common.c \
@@ -47,7 +48,9 @@
$(top_srcdir)/tools/bootstrap/external/sge_env.c \
$(top_srcdir)/tools/bootstrap/external/pbs_init.c \
$(top_srcdir)/tools/bootstrap/external/pbs_query_native_int.c \
- $(top_srcdir)/tools/bootstrap/external/pbs_query_node_list.c
+ $(top_srcdir)/tools/bootstrap/external/pbs_query_node_list.c \
+ $(top_srcdir)/tools/bootstrap/external/cobalt_query_native_int.c \
+ $(top_srcdir)/tools/bootstrap/external/cobalt_query_node_list.c
if hydra_pbs_launcher
libhydra_la_SOURCES += \
Added: mpich2/trunk/src/pm/hydra/tools/bootstrap/external/cobalt.h
===================================================================
--- mpich2/trunk/src/pm/hydra/tools/bootstrap/external/cobalt.h (rev 0)
+++ mpich2/trunk/src/pm/hydra/tools/bootstrap/external/cobalt.h 2012-12-19 22:24:42 UTC (rev 10775)
@@ -0,0 +1,15 @@
+/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
+/*
+ * (C) 2008 by Argonne National Laboratory.
+ * See COPYRIGHT in top-level directory.
+ */
+
+#ifndef COBALT_H_INCLUDED
+#define COBALT_H_INCLUDED
+
+#include "hydra.h"
+
+HYD_status HYDT_bscd_cobalt_query_native_int(int *ret);
+HYD_status HYDT_bscd_cobalt_query_node_list(struct HYD_node **node_list);
+
+#endif /* COBALT_H_INCLUDED */
Added: mpich2/trunk/src/pm/hydra/tools/bootstrap/external/cobalt_init.c
===================================================================
--- mpich2/trunk/src/pm/hydra/tools/bootstrap/external/cobalt_init.c (rev 0)
+++ mpich2/trunk/src/pm/hydra/tools/bootstrap/external/cobalt_init.c 2012-12-19 22:24:42 UTC (rev 10775)
@@ -0,0 +1,17 @@
+/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
+/*
+ * (C) 2008 by Argonne National Laboratory.
+ * See COPYRIGHT in top-level directory.
+ */
+
+#include "hydra.h"
+#include "bsci.h"
+#include "cobalt.h"
+
+HYD_status HYDT_bsci_rmk_cobalt_init(void)
+{
+ HYDT_bsci_fns.query_node_list = HYDT_bscd_cobalt_query_node_list;
+ HYDT_bsci_fns.query_native_int = HYDT_bscd_cobalt_query_native_int;
+
+ return HYD_SUCCESS;
+}
Added: mpich2/trunk/src/pm/hydra/tools/bootstrap/external/cobalt_query_native_int.c
===================================================================
--- mpich2/trunk/src/pm/hydra/tools/bootstrap/external/cobalt_query_native_int.c (rev 0)
+++ mpich2/trunk/src/pm/hydra/tools/bootstrap/external/cobalt_query_native_int.c 2012-12-19 22:24:42 UTC (rev 10775)
@@ -0,0 +1,28 @@
+/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
+/*
+ * (C) 2008 by Argonne National Laboratory.
+ * See COPYRIGHT in top-level directory.
+ */
+
+#include "hydra.h"
+#include "bsci.h"
+#include "common.h"
+
+HYD_status HYDT_bscd_cobalt_query_native_int(int *ret)
+{
+ HYD_status status = HYD_SUCCESS;
+
+ HYDU_FUNC_ENTER();
+
+ *ret = 1;
+
+ if (!HYDTI_bscd_env_is_avail("COBALT_NODEFILE"))
+ *ret = 0;
+
+ fn_exit:
+ HYDU_FUNC_EXIT();
+ return status;
+
+ fn_fail:
+ goto fn_exit;
+}
Added: mpich2/trunk/src/pm/hydra/tools/bootstrap/external/cobalt_query_node_list.c
===================================================================
--- mpich2/trunk/src/pm/hydra/tools/bootstrap/external/cobalt_query_node_list.c (rev 0)
+++ mpich2/trunk/src/pm/hydra/tools/bootstrap/external/cobalt_query_node_list.c 2012-12-19 22:24:42 UTC (rev 10775)
@@ -0,0 +1,36 @@
+/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
+/*
+ * (C) 2008 by Argonne National Laboratory.
+ * See COPYRIGHT in top-level directory.
+ */
+
+#include "hydra.h"
+#include "bsci.h"
+#include "cobalt.h"
+
+HYD_status HYDT_bscd_cobalt_query_node_list(struct HYD_node **node_list)
+{
+ char *hostfile;
+ HYD_status status = HYD_SUCCESS;
+
+ HYDU_FUNC_ENTER();
+
+ if (MPL_env2str("COBALT_NODEFILE", (const char **) &hostfile) == 0)
+ hostfile = NULL;
+
+ if (hostfile == NULL) {
+ *node_list = NULL;
+ HYDU_ERR_SETANDJUMP(status, HYD_INTERNAL_ERROR, "No COBALT nodefile found\n");
+ }
+ else {
+ status = HYDU_parse_hostfile(hostfile, node_list, HYDU_process_mfile_token);
+ HYDU_ERR_POP(status, "error parsing hostfile\n");
+ }
+
+ fn_exit:
+ HYDU_FUNC_EXIT();
+ return status;
+
+ fn_fail:
+ goto fn_exit;
+}
Modified: mpich2/trunk/src/pm/hydra/tools/bootstrap/external/common.h
===================================================================
--- mpich2/trunk/src/pm/hydra/tools/bootstrap/external/common.h 2012-12-19 22:24:41 UTC (rev 10774)
+++ mpich2/trunk/src/pm/hydra/tools/bootstrap/external/common.h 2012-12-19 22:24:42 UTC (rev 10775)
@@ -14,6 +14,7 @@
#include "ll.h"
#include "sge.h"
#include "pbs.h"
+#include "cobalt.h"
int HYDTI_bscd_env_is_avail(const char *env_name);
int HYDTI_bscd_in_env_list(const char *env_name, const char *env_list[]);
Modified: mpich2/trunk/src/pm/hydra/tools/bootstrap/include/bsci.h
===================================================================
--- mpich2/trunk/src/pm/hydra/tools/bootstrap/include/bsci.h 2012-12-19 22:24:41 UTC (rev 10774)
+++ mpich2/trunk/src/pm/hydra/tools/bootstrap/include/bsci.h 2012-12-19 22:24:42 UTC (rev 10775)
@@ -200,6 +200,7 @@
HYD_status HYDT_bsci_rmk_lsf_init(void);
HYD_status HYDT_bsci_rmk_sge_init(void);
HYD_status HYDT_bsci_rmk_pbs_init(void);
+HYD_status HYDT_bsci_rmk_cobalt_init(void);
HYD_status HYDT_bsci_rmk_user_init(void);
#endif /* HAVE_BSS_EXTERNAL */
Modified: mpich2/trunk/src/pm/hydra/tools/bootstrap/src/Makefile.mk
===================================================================
--- mpich2/trunk/src/pm/hydra/tools/bootstrap/src/Makefile.mk 2012-12-19 22:24:41 UTC (rev 10774)
+++ mpich2/trunk/src/pm/hydra/tools/bootstrap/src/Makefile.mk 2012-12-19 22:24:42 UTC (rev 10775)
@@ -8,7 +8,6 @@
$(top_srcdir)/tools/bootstrap/src/bsci_finalize.c \
$(top_srcdir)/tools/bootstrap/src/bsci_launch.c \
$(top_srcdir)/tools/bootstrap/src/bsci_query_node_list.c \
- $(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_wait.c \
More information about the commits
mailing list