Submit a pbs job
Submit a PBS Job
A Sample PBs Job EXample PBs job iE!/bin/sh HPBS -I walltime=1: 00: 00 IPBS -I mem=400mb # - ncpus=4 #PBS丁0e /subrun
A Sample PBS Job • Example PBS job: #!/bin/sh #PBS -l walltime=1:00:00 #PBS -l mem=400mb #PBS -l ncpus=4 #PBS -j oe ./subrun
A Sample PBs Job In our example above, lines 2-4 specify the -Presource list option, followed by a specific resource request Specifically, lines 2-4 request 1 hour of wall-clock time, 400 megabytes(MB)of memory, and 4 CPUs Line 5 is not a resource directive. Instead it specifies how PBS should handle some aspect of this job. Specifically, the le joe requests that PBs join the stdout and stderr output streams of the job into a single stream. Finally line 7 is the command line for executing the program we wish to run
A Sample PBS Job • In our example above, lines 2-4 specify the “-l” resource list option, followed by a specific resource request. Specifically, lines 2-4 request 1 hour of wall-clock time, 400 megabytes (MB) of memory, and 4 CPUs. • Line 5 is not a resource directive. Instead it specifies how PBS should handle some aspect of this job. (Specifically, the “-j oe” requests that PBS join the stdout and stderr output streams of the job into a single stream.) • Finally line 7 is the command line for executing the program we wish to run
Submitting a PBS Job et's assume the above example script is in a file called mysubrun'.We submit this script using the gsub command gsub mysubrun 16387.cluster.pbspro.com You can also specify the option or directive on the gsub command line. This is particularly useful if you just want to submit a single instance of your job, but you don't want to edit the script. For example %o gsub-I ncpus=16-Iwalltime=4: 00: 00 mysubrun 16388 cluster. pbspro com In this example, the 16 CPUs and 4 hours of wallclock time will override the values specified in the job script
Submitting a PBS Job • Let’s assume the above example script is in a file called “mysubrun”.We submit this script using the qsub command: % qsub mysubrun 16387.cluster.pbspro.com • You can also specify the option or directive on the qsub command line. This is particularly useful if you just want to submit a single instance of your job, but you don’t want to edit the script. For example: % qsub -l ncpus=16 -l walltime=4:00:00 mysubrun 16388.cluster.pbspro.com • In this example, the 16 CPUs and 4 hours of wallclock time will override the values specified in the job script
Submitting a PBS Job Note that you are not required to use a separate - p for each resource you request. You can combine multiple requests by separating them with a comma, thusly qsub -I ncpus=16, walltime=4: 00: 00 mysubrun 16389.cluster.pbspro.com The same rule applies to the job script as well, as the next example shows i!/bin/sh HPBS- walltime=1: 00: 00. mem=400mb #PBS - ncpus=4 #PBS」oe /subrun
Submitting a PBS Job • Note that you are not required to use a separate “-l” for each resource you request. You can combine multiple requests by separating them with a comma, thusly: % qsub -l ncpus=16,walltime=4:00:00 mysubrun 16389.cluster.pbspro.com • The same rule applies to the job script as well, as the next example shows. #!/bin/sh #PBS -l walltime=1:00:00,mem=400mb #PBS -l ncpus=4 #PBS -j oe ./subrun