#!/bin/bash

CLIENT=/home/arch/skumar2/charm/net-linux/pgms/scheduler/client

if [ "x$SCHEDULER_PATH" != "x" ]
    then CLIENT=$SCHEDULER_PATH/client;
fi

HOST=localhost
PORT=1999
DIR=$(/bin/pwd)

if [ "x$1" = "x" ]  || [ "$1" = "-help" ] || [ "$1" = "-h" ];
	then echo "ufrun <program_name> <options> [<arguments>]"
	echo "ufrun interactively runs a single processor job on the parallel machine"
	echo "program_name is the name of your compiled executable or script,"
	echo "Options"
	echo "-stdout <filename>: The Std. Output file of the job"
	echo "-stderr <filename>: The Std. Error file of the job"
	echo "-stdin <filename>: The Std. Input file of the job"
	echo "-pwd <directory name>: Process Working Directory, default is current directory"
	echo "-time <hh:mm:ss> : time requested for the job";
	echo "For Example:
	ufrun /bin/ls"
else
   $CLIENT $HOST $PORT job -pwd $DIR -type uni $*
fi
	
