[torqueusers] running jobs with stdout to terminal and stdin from a script file

Pete Wyckoff pw at osc.edu
Wed Aug 25 08:46:24 MDT 2004

csamuel at vpac.org wrote on Wed, 25 Aug 2004 11:40 +1000:
> On Wed, 25 Aug 2004 01:03 am, Wightman wrote:
> > So I believe the way to run a job where the output gets
> > printed to stdout and the input is a file would be (If I'm wrong I hope
> > someone on this list will correct me):
> >
> > qsub -I script
> Unfortunately that won't work, you'll just get a shell prompt on the node 
> you've been allocated and the script will be ignored. :-(
> Also:
> 	echo script | qsub -I
> won't work as it complains that:
> $ echo test.sh | qsub -q sque -I
> qsub:   standard input and output must be a terminal for
>         interactive job submission
> Is this related to the patch for the pbs_mom's that comes with mpiexec to 
> enable the mpiexec process to capture the output from the moms as it appears 
> rather than have it redirected to the pbs_mom ?

Not related to that unfortunately.  Redirecting input or output of qsub
itself is different than redirecting that of a task inside a PBS job.

We were fortunate enough to have a kind user submit this patch:


to have interactive jobs run the contents of their scripts, if
specified, allowing "qsub -I script" to work similarly to the
scenario described by the original poster.

Note that that patch may depend on an older one we had in place:


but you will have to do some configure hackery to adapt it to whatever
Torque is up to these days.  Both of these are against a heavily hacked
OpenPBS-2.3.12, as you can see in the vast sea of patches described up
a level from those URLs.

		-- Pete

More information about the torqueusers mailing list