[ Skip to the content ]

Institute of Formal and Applied Linguistics Wiki


[ Back to the navigation ]

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
grid [2017/09/27 21:13]
popel
grid [2017/10/02 16:55]
popel [Basic usage]
Line 70: Line 70:
   # We have used two handy qsub parameters:   # We have used two handy qsub parameters:
   #  -cwd  ... the script is executed in the current directory (the default is your home)   #  -cwd  ... the script is executed in the current directory (the default is your home)
-  #  -j y  ... stdout and stderr outputs are merged and redirected to a file (''script.sh.o*'')+  #  -j y  ... stdout and stderr outputs are merged and redirected to a file (''script.sh.o$JOB_ID'')
   # We have also provided two parameters for our script "Hello" and "World".   # We have also provided two parameters for our script "Hello" and "World".
   # The qsub prints something like   # The qsub prints something like
Line 138: Line 138:
 ''qsub **-q** troja-all.q'' ''qsub **-q** troja-all.q''
 This way your job is submitted to the Troja queue. The default is ''ms-all.q''. You can also use e.g. This way your job is submitted to the Troja queue. The default is ''ms-all.q''. You can also use e.g.
-''-q "(troja*|ms*)"'' to submit on any machine in those two queues (but **don't use ''-q "*"''** as this includes also [[:gpu|gpu.q]]), +''-q '(troja*|ms*)''' to submit on any machine in those two queues (but **don't use ''-q '*'''** as this includes also [[:gpu|gpu.q]]), 
-''-q "*@hector[14]"'' to submit on hecor1 or hector4, +''-q '*@hector[14]''' to submit on hecor1 or hector4, 
-''-q "[tm]*@!(hector*|iridium)"'' to submit on any troja/ms machine except hectors and iridium.+''-q '[tm]*@!(hector*|iridium)''' to submit on any troja/ms machine except hectors and iridium.
 However, usually you should specify just the queue (troja-all.q vs. ms-all.q), not a particular machine, and instead use ''-l'' to specify the needed resources in a general way. However, usually you should specify just the queue (troja-all.q vs. ms-all.q), not a particular machine, and instead use ''-l'' to specify the needed resources in a general way.
  
Line 191: Line 191:
 You can change some properties of already submitted jobs, which are still waiting in the queue (//pending//). You can change some properties of already submitted jobs, which are still waiting in the queue (//pending//).
  
-''**man** qsub qstat qhold queue_conf sge_types complex''+''**man** qsub qstat qalter qhold queue_conf sge_types complex''
 Find out all the gory details which are missing here. You'll have to do it one day anyway:-). Find out all the gory details which are missing here. You'll have to do it one day anyway:-).
  
Line 200: Line 200:
 === qunhold === === qunhold ===
 ''~stepanek/bin/qunhold'' tries to keep the number of running SGE jobs under a given threshold: all jobs over the threshold are held. If the number of running jobs goes below the threshold (default: 100), 10 jobs (by default) are unheld. Beware: if your jobs submit new jobs, you can get far over the threshold! ''~stepanek/bin/qunhold'' tries to keep the number of running SGE jobs under a given threshold: all jobs over the threshold are held. If the number of running jobs goes below the threshold (default: 100), 10 jobs (by default) are unheld. Beware: if your jobs submit new jobs, you can get far over the threshold!
 +
 +=== sshcwd ===
 +This is useful not only when sshing to sol machines. Add the following lines to your ''~/.bashrc''.
 +
 +<code>
 +function sshcwd () {
 +  # save the current history so that it is available
 +  # immediately on the remote machine
 +  history -a;
 +  # setup the working directory by setting WD
 +  ssh -X -Y -C -t $@ "WD='$PWD' /bin/bash --login -i";
 +}
 +
 +# use WD to setup the working directory
 +if [ -n "$WD" ]; then
 +  echo "Autochanging dir to $WD" >&2
 +  cd $WD;
 +fi
 +
 +alias sol1="sshcwd sol1.ufal.hide.ms.mff.cuni.cz"
 +</code>
  
 === In-script options === === In-script options ===

[ Back to the navigation ] [ Back to the content ]