290 likes | 489 Views
Using PBSpro. IS&T Advanced Campus Services. Syllabus. Introduction to PBS Submitting a job Job examples Checking job/system status Working with PBS jobs Some tips Summary. Introduction. PBS: Portable Batch System PBSpro: PBS Professional Enhanced commercial version
E N D
Using PBSpro IS&T Advanced Campus Services
Syllabus • Introduction to PBS • Submitting a job • Job examples • Checking job/system status • Working with PBS jobs • Some tips • Summary Using PBSpro, IS&T Advanced Campus Services
Introduction • PBS: Portable Batch System • PBSpro: PBS Professional • Enhanced commercial version • Originally developed for NASA • Altair Grid Technology • www.pbspro.com Using PBSpro, IS&T Advanced Campus Services
Why use PBS? • Features and benefits • Enterprise-wide resource sharing • Cross-system scheduling • Automatic load-leveling • Distributed clustering • Computational grid support • Parallel job support • Broad platform availability • … Using PBSpro, IS&T Advanced Campus Services
PBS components • Commands: command line & graphic interface • Server: job server daemon/service—central focus of PBS • Job executor (MOM): which actually places jobs into execution • Scheduler: implements the site’s policy controlling when each job is run and on which resources Using PBSpro, IS&T Advanced Campus Services
Submitting a job • To run a PBS job, we use the command: • qsub • Two ways of job submission • Job without a job script • Submitting with a job script Using PBSpro, IS&T Advanced Campus Services
Job without a job script • PBS reads input from the keyboard • Stop reading input and submit the job by “control-d” (UNIX) or “control-z”, then “enter” (Windows) • “control-c” (UNIX) or “control-break” (Windows) to terminate the qsub command qsub [directives] [tasks] ctrl-d Using PBSpro, IS&T Advanced Campus Services
Submitting a job script • Type “qsub script_name” • PBS returns a job identifier • sequence-number.servername.domain • Job identifier is needed for any actions involving the job, such as checking job status, deleting the job qsub myjob Using PBSpro, IS&T Advanced Campus Services
Script format • A PBS job script consists of: • An optional shell specification (UNIX) • The first line of the script • Bourne shell (sh) is the default • PBS directives • At the top the script • Begins with “#PBS” • Used to request resources or job control options • Tasks—programs or commands • Where the user specifies an application to be run Using PBSpro, IS&T Advanced Campus Services
Job submission options • Specify a job name • -N name • Resources related options • System resources request • -l resources_list • Single-node conditional request • -l resc=resc_spec • Multi-node jobs • -l nodes=node_sepc qsub –N counter myjob Using PBSpro, IS&T Advanced Campus Services
System resources • arch: system architecture • cput: max, aggregate CPU time • file: max disk space requirements • host: name of request host/node • mem: max amount of physical memory • ncpus: number of CPUs • nodes: number and/or type of nodes • resc: single-node resource specification • vmen: max, aggregate amount of virtual memory • walltime: max amount of real time • … Using PBSpro, IS&T Advanced Campus Services
Single-node conditional request • Use boolean logic in the specification of certain resources within a single node • -l resc=resc_spec • Provides more control over selecting nodes qsub –l resc=“(arch==‘UNIX’)&&(ncpus==4)” myjob Using PBSpro, IS&T Advanced Campus Services
Job submission options (cont) • Specify queue and/or server, where to submit • -q [queue[@host]] • Redirect output & error files • -o/-e path • Specify job checkpoint interval • -c interval (minutes) qsub –q queue@astcgridhead.gsu.edu myjob qsub –o MyOutputFile myjob qsub –c c=10 myjob Using PBSpro, IS&T Advanced Campus Services
Job submission options (cont) • Specify job user ID at different server • -u UserID@server • Specify email notification • -m MailOptions • Set email recipient list • -M user_list • Set a job’s priority • -p priority qsub -u astcxx@node1,cscxx@node2 myjob qsub –m abe myjob qsub –M astcxx@node1,cscxx@node2 myjob qsub –p 300 myjob Using PBSpro, IS&T Advanced Campus Services
Examples • Submitting a job through command line: qsub –l walltime=5 –l mem=100mb –j oe awk 'BEGIN {for(i=0;i<10000;i++)for(j=0;j<10000;j++);}‘ ctrl-d Using PBSpro, IS&T Advanced Campus Services
Examples (cont) • Submitting a using a job script • Below is the contents of script file myjob qsub myjob #!/bin/sh #PBS –l walltime=5 #PBS –l mem=100mb #PBS –j oe awk 'BEGIN {for(i=0;i<10000;i++)for(j=0;j<10000;j++);}' Using PBSpro, IS&T Advanced Campus Services
Check job status • Display job information • qstat Using PBSpro, IS&T Advanced Campus Services
Check server status • Display the status of the specified PBS server • qstat –Bf Using PBSpro, IS&T Advanced Campus Services
Check queue status • Display the status of all queues on the PBS server • qstat -Qf Using PBSpro, IS&T Advanced Campus Services
View job information • Print all information known about the job • qstat –f job_identifier Using PBSpro, IS&T Advanced Campus Services
List user-specific jobs • Display jobs owned by specified user name • qstat –u user_name Using PBSpro, IS&T Advanced Campus Services
Modify job attributes • Change an attribute on a job previously submitted • qalter job_resources job_list • If any of the specified attributes cannot be modified for a job for any reason, none of that job’s attributes will be modified qalter –l walltime=20:00 –N Example 56 Using PBSpro, IS&T Advanced Campus Services
Hold, release & delete jobs • Hold a job • qhold [-h hold_list] job_identifier • Release a job • qrls [-h hold_list] job_identifier • Delete jobs from the system • qdel job_identifier qhold –h u 56 qrls –h u 56 qdel 56 Using PBSpro, IS&T Advanced Campus Services
Change order of jobs in queue • Change the order (reorder) two jobs • qorder job_identifier1 job_identifier2 Using PBSpro, IS&T Advanced Campus Services
Move jobs between queues • Move jobs between different queues (even queues on different servers) • qmove destination job_identifier(s) qmove queue@node1 56 Using PBSpro, IS&T Advanced Campus Services
Some tips • Directives inputed in command lines override those in job scripts • Use “” to brace directive values which contains one or more blanks • Difference between “==”(comparison) and “=”(assignment) Using PBSpro, IS&T Advanced Campus Services
Summary • How to submit a job • Job examples • How to check job/system status • How to work with PBS jobs Using PBSpro, IS&T Advanced Campus Services
References • PBS Professional 7 Quick Start • PBS Professional 7 User Guide • PBS Professional 7 Administration Guide • www.pbspro.com Using PBSpro, IS&T Advanced Campus Services
Thank you! Contacts: Bill Xie cxie@cs.gsu.edu Victor Bolet vbolet@gsu.edu