#!/bin/bash

CLIENT=/Home/p1/sameer/charm/net-sol/pgms/scheduler/client
HOST=localhost
PORT=7999
DIR=$(/bin/pwd)

if [ "x$1" = "x" ]  || [ "$1" = "-help" ] || [ "$1" = "-h" ];
	then echo "fsub <program_name> [<options>] [<arguments>]"
	echo "fsub submits a batch job to the Queuing System"	
	echo "program_name is the name of your compiled executable or script,"
	echo "you should not provide an mpirun or charmrun"
	echo "Options"
	echo "-stdout <filename>: The Std. Output file of the job, default /dev/null"
	echo "-stderr <filename>: The Std. Error file of the job, default /dev/null"
	echo "-stdin <filename>: The Std. Input file of the jo, default /dev/null"
	echo "-type [mpi/charm/mcharm/uni]: The type of the job"
	echo "-pwd <directory name>: Process Working Directory, default is current directory"
	echo "-minpe <value> : minimum number of processors used by the job"
	echo "-maxpe <value> : maximum number of processors used by the job"
	echo "#Processors allocated to the job varies between these bounds"
	echo "-time <hh:mm:ss> : time requested for the job";
else
   $CLIENT $HOST $PORT job -pwd $DIR -stdout null -stdin null -stderr null $*
fi
	
