I'm setting up a system which automatically generates computing jobs on a local (Linux) machine, copies them to a cluster and submits them to the queuing system.
I try to avoid the need for scripts which run on the cluster (this way, there's only one script, and it runs where I can debug it).
I've got my
authorized_keys set up, so after creating all the required files locally, I do this, from the local case directory:
ssh cluster 'mkdir /home/user/casedir' scp localdir/* cluster:/home/user/casedir/ ssh cluster 'qsub /home/user/casedir/run_script.sge'
...this creates the case directory on the cluster, copies over all the files I need but then fails in the third line, saying: qsub: command not found
However, if I interactively type
ssh cluster to get a shell on the cluster, then type the qsub command, it launches the job and runs just fine!
... what am I getting wrong here? The cluster is running a fairly old version of the Sun Grid Engine, in case that's relevant.
I guess I could locally produce and copy over a bash script which will execute the qsub command on the cluster but that seems like a very roundabout way of doing this.