Customize qsub/qsh settings with .sge_request
With the Open Grid Scheduler (an open source version of the Sun Grid Engine batch scheduler), a user may create a file .sge_request in the home directory to customize preferred or most frequently used qsub settings. Settings specified in this file will be used in all subsequent qsub batch submissions. In the following, while the focus will be on qsub, it is equally applicable to qsh. Here is what .sge_request may look like:
# .sge_request file must reside in home directory # # my default maximum walltime limit is 24 hours -l h_rt=24:00:00 # I want my jobs to always have a meaningful name of -N BrakeAnalysis # Most of the time (my default), I run MPI jobs on 2 entire nodes -pe mpi_16_tasks_per_node 32 # Send me mail when job gets aborted or ends normally -m ae # I want the email be sent to (instead of my default BU email address) -M firstname.lastname@example.org # I have multiple projects, I want this job charged to project: -P projectname
Your batch script, my_batch_script, need not include those options already defined in .sge_request. However, if you do, they will take precedence over those in .sge_request. Furthermore, any option that appears on the qsub command line input will supersede that which is in .sge_request and my_batch_script. Here is an example
scc1:~ % qsub -pe mpi_16_tasks_per_node 16 -l h_rt=48:00:00 my_batch_script
The above batch job will use 1 entire 16-core node, instead of the default of 2 nodes set by .sge_request, with a wallclock limit of 48 hours.