!/bin/tcsh
set done=0
if ($1 == "-np") then
      	setenv MPI_NPROC $2
      	shift
      	shift
	if ($1 == "-b") then
		setenv MPI_SYSBUF $2
		shift
		shift
	endif
      	set cmd=$1
      	shift
      	$cmd $argv[*]
else
      echo "Usage: tmpirun -np %nproc [-b sys_buffer] <cmd> [<cmd args>]"
      exit -1
endif
