From 0d447511a5291038b6b3ff50a86568f67377cdad Mon Sep 17 00:00:00 2001 From: Ralph Castain Date: Thu, 5 Feb 2009 06:05:28 +0000 Subject: [PATCH] Add a shellscript for daemon-less launch of local slave processes. No manpage as this is totally for internal use only. This commit was SVN r20436. --- configure.ac | 1 + orte/tools/Makefile.am | 2 ++ orte/tools/orte-bootproxy/Makefile.am | 38 +++++++++++++++++++++ orte/tools/orte-bootproxy/orte-bootproxy.sh | 26 ++++++++++++++ 4 files changed, 67 insertions(+) create mode 100644 orte/tools/orte-bootproxy/Makefile.am create mode 100755 orte/tools/orte-bootproxy/orte-bootproxy.sh diff --git a/configure.ac b/configure.ac index 224f5c49de..c9cdb27dea 100644 --- a/configure.ac +++ b/configure.ac @@ -1364,6 +1364,7 @@ AC_CONFIG_FILES([ orte/tools/orte-ps/Makefile orte/tools/orte-clean/Makefile orte/tools/orte-top/Makefile + orte/tools/orte-bootproxy/Makefile ompi/Makefile ompi/etc/Makefile diff --git a/orte/tools/Makefile.am b/orte/tools/Makefile.am index 2cd6b42f2c..e538840611 100644 --- a/orte/tools/Makefile.am +++ b/orte/tools/Makefile.am @@ -22,6 +22,7 @@ # orte/Makefile.am SUBDIRS += \ + tools/orte-bootproxy \ tools/orte-checkpoint \ tools/orte-clean \ tools/orte-iof \ @@ -33,6 +34,7 @@ SUBDIRS += \ tools/orte-top DIST_SUBDIRS += \ + tools/orte-bootproxy \ tools/orte-checkpoint \ tools/orte-clean \ tools/orte-iof \ diff --git a/orte/tools/orte-bootproxy/Makefile.am b/orte/tools/orte-bootproxy/Makefile.am new file mode 100644 index 0000000000..099bbfd1f6 --- /dev/null +++ b/orte/tools/orte-bootproxy/Makefile.am @@ -0,0 +1,38 @@ +# +# Copyright (c) 2004-2007 The Trustees of Indiana University and Indiana +# University Research and Technology +# Corporation. All rights reserved. +# Copyright (c) 2004-2005 The University of Tennessee and The University +# of Tennessee Research Foundation. All rights +# reserved. +# Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, +# University of Stuttgart. All rights reserved. +# Copyright (c) 2004-2005 The Regents of the University of California. +# All rights reserved. +# Copyright (c) 2008 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2008 Sun Microsystems, Inc. All rights reserved. +# $COPYRIGHT$ +# +# Additional copyrights may follow +# +# $HEADER$ +# + +include $(top_srcdir)/Makefile.man-page-rules + +if !ORTE_DISABLE_FULL_SUPPORT +if OMPI_INSTALL_BINARIES + +install-exec-hook: + test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)" + cp $(top_builddir)/orte/tools/orte-bootproxy/orte-bootproxy.sh $(DESTDIR)$(bindir) + chmod 755 $(DESTDIR)$(bindir)/orte-bootproxy.sh + +endif # OMPI_INSTALL_BINARIES + +uninstall-local: + rm -f $(DESTDIR)$(bindir)/orte-bootproxy.sh + +endif # !ORTE_DISABLE_FULL_SUPPORT + +distclean-local: diff --git a/orte/tools/orte-bootproxy/orte-bootproxy.sh b/orte/tools/orte-bootproxy/orte-bootproxy.sh new file mode 100755 index 0000000000..f795e1b828 --- /dev/null +++ b/orte/tools/orte-bootproxy/orte-bootproxy.sh @@ -0,0 +1,26 @@ +#! /bin/bash +# +# Copyright (c) 2009 Los Alamos National Security, LLC. All rights reserved +# + +if (( $# < 1 )) ; then + echo "orte-bootproxy.sh: for OMPI internal use only" + exit 1 +fi + +# take the first arg +var=$1 + +# push all MCA params to the environment +while [ "${var:0:5}" = "OMPI_" ]; do + export $var + shift 1 + var=$1 +done + +# extract the application to be executed +app=$1 +shift 1 + +#exec the app with the remaining args +exec "$app" "$@"