User Tools

Site Tools


script_tricks

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
script_tricks [2013/02/07 11:08]
rdiazgar
script_tricks [2014/02/16 20:08] (current)
rdiazgar
Line 1: Line 1:
-====== ​Script Tricks ​======+====== ​Job Parameters ​======
  
 +Here's the meaning of useful parameters that we can add in the header of our job scripts. You can either add them on the header of a script or directly in the qsub command.
  
-Here's the meaning of useful parameters that we can add in the header of our job scripts. +<​code>​
 #$ -N NAME = Names our job in the cluster as specified in NAME #$ -N NAME = Names our job in the cluster as specified in NAME
- 
 #$ -q QUEUE = Automatically sends our job to the specified queue in QUEUE, so we don't need to specify it in the qsub command. #$ -q QUEUE = Automatically sends our job to the specified queue in QUEUE, so we don't need to specify it in the qsub command.
 +#$ -M EMAIL = Sends notifications of the job status to the specified address in EMAIL, according to criteria below.
 +#$ -m beas = Send you email of job status (b)egin, (e)rror, (a)bort, (s)suspend.
 +#$ -e DIRNAME = redirects error logs to DIRNAME. Default is home directory
 +#$ -o DIRNAME = redirects standard output to DIRNAME. Default is home directory.
 +#$ -l hostname=HNAME = forces queue to submit job in the specified HNAME (cronus, rhea, etc...).
 +</​code>​
  
-#$ -M EMAIL = Sends notifications of the job status to the specified address in EMAIL, according to criteria below +Sample header for hello_world.sh:
- +
-#$ -m beas = Send you email of job status (b)egin, (e)rror, (a)bort, (s)suspend +
- +
-Sample header for some script myscript.sh: +
- +
------------------------------------------- +
-#!/bin/csh+
  
 +<​code>​
 +#!/bin/bash
 # #
- +#$ -N hello_world
-#$ -N parsedisco +
 #$ -M someaddress@uci.edu #$ -M someaddress@uci.edu
- 
 #$ -m beas #$ -m beas
 +#$ -q ttn.q
  
-#$ -q ttn.q+echo "hello world"​ 
 +</​code>​
  
-------------------------------------------+Another way to do it is by removing the #$ parameters of the header and run:
  
-more info at http://​hpc.oit.uci.edu/running-jobs+<​code>​ 
 +qsub -N hello_world -M someaddress@uci.edu -m beas -q ttn.q hello_world.sh 
 +</​code>​
  
 ====== Log files ====== ====== Log files ======
  
-Another cool thing from SGE is that it automatically creates ​log file in the folder ​where you make the qsub call, and leaves two log files, JOBNAME.eJOBID and JOBNAME.oJOBID. '​e'​ is for error messages and '​o'​ is for standard output.+SGE automatically creates ​log files in the default/​specified ​folder, JOBNAME.eJOBID and JOBNAME.oJOBID. '​e'​ is for error messages and '​o'​ is for standard output.
  
script_tricks.1360264085.txt.gz · Last modified: 2013/02/07 11:08 by rdiazgar