<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Lectures and Tutorials | MAVENs</title><link>https://mavens-group.github.io/lectures/</link><atom:link href="https://mavens-group.github.io/lectures/index.xml" rel="self" type="application/rss+xml"/><description>Lectures and Tutorials</description><generator>Hugo Blox Builder (https://hugoblox.com)</generator><language>en</language><lastBuildDate>Fri, 26 Jul 2024 00:00:00 +0000</lastBuildDate><image><url>https://mavens-group.github.io/media/logo.svg</url><title>Lectures and Tutorials</title><link>https://mavens-group.github.io/lectures/</link></image><item><title>PBS job submission in clusters and supercomputers</title><link>https://mavens-group.github.io/lectures/2024-07-pbs/</link><pubDate>Sun, 21 Jul 2024 00:00:00 +0000</pubDate><guid>https://mavens-group.github.io/lectures/2024-07-pbs/</guid><description>&lt;h2 id="introduction"&gt;Introduction&lt;/h2&gt;
&lt;p&gt;When you are using a cluster, irrespective of the scale of it - a local university cluster or EU&amp;rsquo;s
continental service like &lt;code&gt;prace&lt;/code&gt;, you are looking for your share of a limited resource. This is
why, there are a need to implement a &lt;em&gt;fairshare&lt;/em&gt; method. This &lt;em&gt;fairshare&lt;/em&gt; in turn, is used by a
&lt;em&gt;job scheduler&lt;/em&gt; to start a particular job that is already submitted by the users of the cluster.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Job scheduler&lt;/em&gt; is nothing exclusive to clusters only. Our day-to-day computers use them as well,
like &lt;code&gt;at&lt;/code&gt; or &lt;code&gt;cron&lt;/code&gt; for UNIX or &lt;code&gt;Windows Task Scheduler&lt;/code&gt; for windows. But, for clusters, there are
many dedicated schedulers, most famous of them are &lt;a href="https://slurm.schedmd.com/" target="_blank" rel="noopener"&gt;SLURM&lt;/a&gt; and
&lt;a href="https://www.openpbs.org/" target="_blank" rel="noopener"&gt;PBS&lt;/a&gt;. In this tutorial, I will discuss mostly about PBS. We will
follow-up with a similar tutorial with SLURM soon.&lt;/p&gt;
&lt;h2 id="what-is-pbs"&gt;What is PBS&lt;/h2&gt;
&lt;p&gt;PBS, and for that any job scheduler, makes user free from searching when a &lt;code&gt;queue&lt;/code&gt; of a cluster is
available. User specifies his requirements in a &lt;code&gt;bash script&lt;/code&gt; and PBS finds suitable queue for the
user, and submit the job when required resources are available in that queue. Let us understand PBS
a little bit, before going into submission mode.&lt;/p&gt;
&lt;h3 id="how-pbs-works"&gt;How PBS works&lt;/h3&gt;
&lt;figure id="figure-figimg1"&gt;
&lt;div class="d-flex justify-content-center"&gt;
&lt;div class="w-100" &gt;&lt;img src="./img1.webp" alt="Job of a job scheduler" loading="lazy" data-zoomable /&gt;&lt;/div&gt;
&lt;/div&gt;&lt;figcaption data-pre="Figure&amp;nbsp;" data-post=":&amp;nbsp;" class="numbered"&gt;
Job of a job scheduler
&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;PBS does 3 things for us, as shown diagrammatically in &lt;a href="#fig:img1"&gt;figure 1&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;When jobs are submitted to PBS server, the scheduler finds when and where to run the job. The
server sends the job to Machine Oriented Mini-server (MOM) on the local machine. The server,
scheduler, and communication daemons run on the server host. Their internal relation between them
is shown in &lt;a href="#fig:img2"&gt;figure 2&lt;/a&gt;.
&lt;figure id="figure-figimg2"&gt;
&lt;div class="d-flex justify-content-center"&gt;
&lt;div class="w-100" &gt;&lt;img src="./img2.webp" alt="How PBS works" loading="lazy" data-zoomable /&gt;&lt;/div&gt;
&lt;/div&gt;&lt;figcaption data-pre="Figure&amp;nbsp;" data-post=":&amp;nbsp;" class="numbered"&gt;
How PBS works
&lt;/figcaption&gt;&lt;/figure&gt;
&lt;/p&gt;
&lt;p&gt;As per availability of resources, PBS submits jobs &lt;em&gt;first come, first serve&lt;/em&gt; basis. But this may
not be same as &lt;em&gt;first user submission, first serve&lt;/em&gt;. The order that PBS see as &lt;em&gt;first come&lt;/em&gt; depends
on many factors, like resource availability in near future etc and also, the fairshare.&lt;/p&gt;
&lt;h2 id="job-management-in-cluster"&gt;Job management in cluster&lt;/h2&gt;
&lt;p&gt;The first thing first: to submit jobs in a cluster, you have to have access in the cluster. You
generally gain the cluster access by writing a mail to cluster admin. If you fulfill the criteria
as laid by the particular cluster&amp;rsquo;s parent body, you will get your login(say, &lt;em&gt;foo&lt;/em&gt;) and
password(say, &lt;em&gt;Foo-pass&lt;/em&gt;). It is strongly recommended to change your password in your very first
login. In a Linux terminal, you do something
like&lt;sup id="fnref:1"&gt;&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref"&gt;1&lt;/a&gt;&lt;/sup&gt;:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;$ssh foo@cluster:
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;$password:
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Since more often than not, we are interested in batch submission of jobs, we will discuss that user
case here. But don&amp;rsquo;t forger you can submit interactive jobs also.&lt;/p&gt;
&lt;h3 id="job-submission-and-pbs-script"&gt;Job submission and PBS Script&lt;/h3&gt;
&lt;p&gt;The first thing you need a proper &lt;em&gt;executable&lt;/em&gt;, lets say that is &lt;code&gt;hello.out&lt;/code&gt;. You can check if a
file is executable or not using the following command in terminal:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;-rw-rw-r--. 1 rudra rudra 174 Dec 30 09:51 hello.f90
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;-rwxrwxr-x. 1 rudra rudra 21K Dec 30 09:51 hello.out
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The presence of &lt;code&gt;x&lt;/code&gt; in 4th position of &lt;code&gt;hello.out&lt;/code&gt; shows you can execute the file. For more
details, check [@linperm].&lt;/p&gt;
&lt;p&gt;Here, you create a &lt;em&gt;PBS job submission script&lt;/em&gt;. A typical script looks like:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="cp"&gt;#!/bin/bash
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;#PBS -q default&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;#PBS -l nodes=2:ppn=24&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;#PBS -N trial&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;#PBS -e trial.err&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;#PBS -o trial.out&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;#PBS -l walltime=10:00:00&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; PBS JOB id is &lt;span class="nv"&gt;$PBS_JOBID&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; PBS_QUEUE is&lt;span class="nv"&gt;$PBS_QUEUE&lt;/span&gt; cat &lt;span class="nv"&gt;$PBS_NODEFILE&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;export&lt;/span&gt; &lt;span class="nv"&gt;I_MPI_FABRICS&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;shm:tmi
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;cd&lt;/span&gt; &lt;span class="nv"&gt;$PBS_O_WORKDIR&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;mpirun -np &lt;span class="m"&gt;48&lt;/span&gt; ./hello.out
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Let us check each line of this script in details&lt;sup id="fnref:2"&gt;&lt;a href="#fn:2" class="footnote-ref" role="doc-noteref"&gt;2&lt;/a&gt;&lt;/sup&gt;. #PBS in each line tells bash that it is a PBS
command, rather than a bash command like &lt;code&gt;echo&lt;/code&gt; or &lt;code&gt;mpirun&lt;/code&gt;.&lt;/p&gt;
&lt;h4 id="pbs-commands"&gt;PBS Commands&lt;/h4&gt;
&lt;p&gt;#!/bin/bash : tells the computer that it is a bash script and should always be
present.&lt;/p&gt;
&lt;p&gt;-q : destination&lt;/p&gt;
&lt;p&gt;defines the queue you have chosen. In each cluster, there are multiple queue and each queue has
some specific max node, processor and wall time. You can find the queue of a particular cluster
by using &lt;code&gt;qstat -q&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;In my institute&amp;rsquo;s cluster I get:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;qstat -q
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;server: hn1-srmhpc03
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Queue Memory CPU Time Walltime Node Run Que Lm State
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;---------------- ------ -------- -------- ---- ----- ----- ---- -----
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;short -- -- 240:00:0 14 15 4 -- E R
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;work-01 -- -- 480:00:0 -- 34 21 -- E R
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;res-3 -- -- 360:00:0 -- 1 1 -- E R
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;-l: resource list&lt;/p&gt;
&lt;p&gt;defines the resource list required for the job. Here the uesr has requested 2 nodes and 24
processors in each node for 10 hours (see &lt;code&gt; -l walltime&lt;/code&gt; below). How many nodes and processors you
can use depends on the queue you have chosen.&lt;/p&gt;
&lt;p&gt;-N: name&lt;/p&gt;
&lt;p&gt;Declares a name for the job.&lt;/p&gt;
&lt;p&gt;-e,-o: path&lt;/p&gt;
&lt;p&gt;defines the path (i.e. file) to be used for standard error and output.&lt;/p&gt;
&lt;p&gt;echo:&lt;/p&gt;
&lt;p&gt;is not a part of PBS, rather it is a normal shell command for printing some value in standard
output. Here, I have chosen to print my job&amp;rsquo;s ID, QUEUE and NODES.&lt;/p&gt;
&lt;p&gt;mpirun&amp;hellip;:&lt;/p&gt;
&lt;p&gt;This is where you are actually telling PBS which job you want to run. Here I have request PBS
to run my &lt;em&gt;hello.out&lt;/em&gt; on 48 processors (2 nodes$\times$&lt;code&gt;&amp;lt;!-- --&amp;gt;&lt;/code&gt;{=html}24 processor per node)
using mpirun.&lt;/p&gt;
&lt;h4 id="environment-variables"&gt;Environment Variables&lt;/h4&gt;
&lt;p&gt;The environment variables, that is in capital letter and preceeded with
$ has the following meannings (taken directly from the man page, for
ready reference)&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;PBS_O_HOST&lt;/strong&gt;: The name of the host upon which the qsub command is running.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;PBS_O_QUEUE&lt;/strong&gt;: The name of the original queue to which the job was submitted.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;PBS_O_WORKDIR&lt;/strong&gt;: The absolute path of the current working directory of the qsub
command.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;PBS_ENVIRONMENT&lt;/strong&gt;: Set to PBS_BATCH to indicate the job is a batch job, or to
PBS_INTERACTIVE to indicate the job is a PBS interactive job, see &lt;code&gt;-I&lt;/code&gt; option.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;PBS_JOBID&lt;/strong&gt;:The job identifier assigned to the job by the batch system.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;PBS_JOBNAME&lt;/strong&gt;: The job name supplied by the user.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;PBS_NODEFILE&lt;/strong&gt;: The name of the file contain the list of nodes assigned to the job
(for parallel and cluster systems).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;PBS_QUEUE&lt;/strong&gt;: The name of the queue from which the job is executed.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="job-monitoring"&gt;Job Monitoring&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;qstat&lt;/code&gt; command is used to display the status of jobs, queues, and
batch servers. The status information is written to standard output&lt;sup id="fnref:3"&gt;&lt;a href="#fn:3" class="footnote-ref" role="doc-noteref"&gt;3&lt;/a&gt;&lt;/sup&gt;.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;qstat&lt;/code&gt; without any argument shows all the jobs running in the given
cluster.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;$qstat
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; Job id Name User Time Use S Queue
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; ---------------- ---------------- ---------------- -------- - -----
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; 87733.hn1-srmhpc0 Step-na hpcuser1 1073:54: R work-01
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; 87796.hn1-srmhpc0 mmpmg hpcuser5 00:00:00 R work-01
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; 87835.hn1-srmhpc0 layers hpcuser2 7337:16: R work-01
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; 87915.hn1-srmhpc0 mmpmg hpcuser2 00:00:00 R short
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; 88397.hn1-srmhpc0 zgnr_isoleuZn22 hpcuser3 0 Q work-01
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; 88398.hn1-srmhpc0 trial hpcuser9 0 Q short
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; 88406.hn1-srmhpc0 PBE0-bkB hpcuser10 0 Q work-01
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; 88407.hn1-srmhpc0 PBE0-bkB hpcuser11 00:00:00 R short
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; .. .. ..
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;To monitor your own jobs only, run &lt;code&gt;qstat -u &amp;lt;username&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;qstat -u hpcuser
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;hn1-srmhpc03:                    
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;                                        Req &amp;#39;d Req&amp;#39;d Elap
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Job ID Username Queue Jobname SessID NDS TSK Memory Time S Time
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;--------------- -------- -------- ---------- ------ --- --- ------ ----- - -----
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;88303.hn1-srmhp hpcuser work-01 o-f-M5-srn 27033 1 14 -- 240:0 R 48:02
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;88306.hn1-srmhp hpcuser short o-f-M5-tbn 1580 1 14 -- 120:0 R 33:27
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;88358.hn1-srmhp hpcuser work-01 Na-E-VX-op 13364 1 14 -- 240:0 R 03:04
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;In both the output, you can see the job&amp;rsquo;s ID, NAME, the queue its
running and for how long it is running.&lt;/p&gt;
&lt;p&gt;The penultimate column, with heading &lt;code&gt;S&lt;/code&gt; shows the status of the job.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;R means its running,&lt;/li&gt;
&lt;li&gt;Q means its on queue, waiting for resources.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Also, as you can see, Anoopa&amp;rsquo;s job, even submitted later, has started running
before other jobs, as described in §&lt;a href="#sec:how"&gt;2.1&lt;/a&gt;{reference-type=&amp;ldquo;ref&amp;rdquo;
reference=&amp;ldquo;sec:how&amp;rdquo;}. The possible status are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;B Array job: at least one subjob has started.&lt;/li&gt;
&lt;li&gt;E Job is exiting after having run.&lt;/li&gt;
&lt;li&gt;F Job is finished.&lt;/li&gt;
&lt;li&gt;H Job is held.&lt;/li&gt;
&lt;li&gt;M Job was moved to another server.&lt;/li&gt;
&lt;li&gt;Q Job is queued.&lt;/li&gt;
&lt;li&gt;R Job is running.&lt;/li&gt;
&lt;li&gt;S Job is suspended.&lt;/li&gt;
&lt;li&gt;T Job is being moved to new location.&lt;/li&gt;
&lt;li&gt;U Cycle-harvesting job is suspended due to keyboard activity.&lt;/li&gt;
&lt;li&gt;W Job is waiting for its submitter-assigned start time to be reached.&lt;/li&gt;
&lt;li&gt;X Subjob has completed execution or has been deleted.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Another important command is &lt;code&gt;qstat -T&lt;/code&gt;, which gives estimeted start
time of the job, as:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;qstat -T hn1-srmhpc03:                                                 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;                  Req&amp;#39;d Req&amp;#39;d Start
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Job ID Username Queue Jobname SessID NDS TSK Memory Time S Time
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;--------------- -------- -------- -------- ------- --- --- ------ ----- - -----
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;88027.hn1-srmhp hpcuser work-01 Li2U7Li3Vp -- 1 28 -- 240:0 Q Su 08
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;88430.hn1-srmhp rudra short trial -- 4 48 -- 10:00 Q --
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="job-deleting"&gt;Job Deleting&lt;/h3&gt;
&lt;p&gt;For many reasons, you may want to kill a job after it is submitted. May
be its taking too long time to start or you want to try a different
queue, or simply you found some error in your code after it has started
running. The &lt;code&gt;qdel &amp;lt;job id&amp;gt;&lt;/code&gt; kills the &lt;code&gt;&amp;lt;job id\&amp;gt;&lt;/code&gt;.
You can only kill your jobs, not others. The sysadmin can kill anybody&amp;rsquo;s job.&lt;/p&gt;
&lt;p&gt;If you try to delete others job, you will get error (eg. I am not
other-user):&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;$qstat 88419
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; Job id Name User Time Use S Queue
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; ---------------- ---------------- ---------------- -------- - -----
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; 88419.hn1-srmhpc0 pmnb other-user 0 Q work-01
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;$qdel 88419
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; qdel: Unauthorized Request 88419
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;For your own job, it will be done without any prompt. For a big job,
&lt;code&gt;qstat&lt;/code&gt; may show &lt;code&gt;E&lt;/code&gt; status for some time.&lt;/p&gt;
&lt;h1 id="sources"&gt;Sources&lt;/h1&gt;
&lt;div class="footnotes" role="doc-endnotes"&gt;
&lt;hr&gt;
&lt;ol&gt;
&lt;li id="fn:1"&gt;
&lt;p&gt;If you are very new to Linux, I strongly recommend you to go
through &lt;code&gt;man ssh&lt;/code&gt;&amp;#160;&lt;a href="#fnref:1" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:2"&gt;
&lt;p&gt;Again, for more details, check &lt;code&gt;man pbs&lt;/code&gt; and &lt;code&gt;man qsub&lt;/code&gt;&amp;#160;&lt;a href="#fnref:2" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:3"&gt;
&lt;p&gt;I can&amp;rsquo;t overemphasize the importance of &lt;code&gt;man&lt;/code&gt; command. As always,
check &lt;code&gt;man qstat&lt;/code&gt;&amp;#160;&lt;a href="#fnref:3" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;</description></item></channel></rss>