[torqueusers] Qsub interactively (-I),
Expect and standard output problem
charles.vejnar at isb-sib.ch
Tue Jul 1 09:31:32 MDT 2008
Thank for the reply.
Does it mean that in the case of qsub -I, we can't just print something from
$expect_out ? Can't expect just work silently (and print only in the case we
are using send_user command) ?
> You need a sequence of send and expect commands, and are missing the
> expect right after the spawn. The expect command is just to wait for
> my tcsh prompt which is just
> '> '
> You can get the same prompt by having set prompt='> '
> in your ~/.cshrc file.
> The following script works for me:
> # Submit interactive job
> spawn -noecho /usr/local/torque/bin/qsub -I
> # Give job some commands
> expect -re "\> \n"
> send "date; echo 'Hello' \r"
> expect -re ".*llo\n"
> and gives:
> time ./aae
> qsub: waiting for job 121288.hpc4 to start
> qsub: job 121288.hpc4 ready
> > date; echo 'Hello'
> Thu Jun 26 09:56:30 CDT 2008
> > 0.000u 0.001s 0:19.33 0.0% 0+0k 0+0io 0pf+0w
> There seems to be about a 20 second overhead on my system when
> using expect and qsub -I , 10 sec. on the way in and 10 sec.
> on the way out.
PhD student in Zdobnov's Computational Evolutionary Genomics Group
Université de Genève
CMU 9022 - Rue Michel-Servet 1
CH 1211 Genève 4
Phone: +41 (0) 22 37 95 990
Email: charles.vejnar at isb-sib.ch
More information about the torqueusers