#! /bin/sh -f
#
# $Id$

program=gfarm-prun
MIN_ARGS=1

usage() {
	echo "usage: $program [ -h hostfile ] [ -stdin file ] [ -rsh rsh_command ] [ -p ] [ -a ] [ -n ]"
	echo "            cmd args ..."
	echo ""
	echo "options:"
	echo "        -a  execute on all nodes listed in the hostfile including myself."
	echo "        -h hostfile"
	echo "            specifies a hostfile.  '-' for the standard input"
	echo "            ($PRUN_DEFAULT_HOSTFILE)"
	echo "        -m max_jobs"
	echo "            specifies the maximum number of parallel jobs. ($PRUN_DEFAULT_MAX_JOBS)"
	echo "        -n  print the commands that would be executed, but do not execute them."
	echo "        -p  execute in the background in parallel."
	echo "        -rsh rsh_command"
	echo "            specifies a remote shell command. ($PRUN_DEFAULT_RSH)"
	echo "        -stdin file"
	echo "            specifies a stdin file.  It can be specified multiple times."
	echo "            '-' for the standard input"
	echo "        -v  print hostname before execution."
	exit 1
}

. gfarm-ptool

exit 0
