{"id":6,"date":"2016-05-30T00:53:17","date_gmt":"2016-05-30T04:53:17","guid":{"rendered":"http:\/\/williamkennerly.com\/blog\/?p=6"},"modified":"2016-06-03T22:19:50","modified_gmt":"2016-06-04T02:19:50","slug":"running-a-job-on-comet-using-the-queue-manager-called-slurm","status":"publish","type":"post","link":"http:\/\/williamkennerly.com\/blog\/running-a-job-on-comet-using-the-queue-manager-called-slurm\/","title":{"rendered":"Running a job on Comet &#8211; using the queue manager called SLURM"},"content":{"rendered":"<p>You tell <a href=\"http:\/\/williamkennerly.com\/blog\/accessing-comet-at-sdsc\/\">comet<\/a> to run your calculation by submitting it to a queue. Your calculation waits in line with all the other jobs scientists want to run on comet. The software that controls this queue is called <strong>slurm<\/strong> (that&#8217;s a really dumb name, but so it is).<\/p>\n<p>The basics are that first you make (or edit) a bash script containing\u00a0all the slurm\u00a0settings and Linux commands you need. \u00a0Let&#8217;s say you call that file\u00a0<code>calculation.sh\u00a0<\/code>Then you can submit your job to the queue by typing:<img loading=\"lazy\" decoding=\"async\" class=\"alignright wp-image-18 size-medium\" src=\"http:\/\/williamkennerly.com\/blog\/wp-content\/uploads\/2016\/05\/Slurmlogo-300x217.png\" alt=\"This ain't no cartoon\" width=\"300\" height=\"217\" srcset=\"http:\/\/williamkennerly.com\/blog\/wp-content\/uploads\/2016\/05\/Slurmlogo-300x217.png 300w, http:\/\/williamkennerly.com\/blog\/wp-content\/uploads\/2016\/05\/Slurmlogo-768x554.png 768w, http:\/\/williamkennerly.com\/blog\/wp-content\/uploads\/2016\/05\/Slurmlogo-1024x739.png 1024w, http:\/\/williamkennerly.com\/blog\/wp-content\/uploads\/2016\/05\/Slurmlogo.png 1938w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/p>\n<p><code>sbatch calculation.sh<\/code><\/p>\n<p>If it works, you should see a short message with the job&#8217;s ID number. \u00a0 Your job might not start right away if there are a lot of either jobs ahead of yours in line.<\/p>\n<p>To view all the jobs in the queue, you can just type<\/p>\n<p><code>squeue<\/code><\/p>\n<p>To view only the jobs you&#8217;ve submitted, you can just type<\/p>\n<p><code>squeue -u yourusername<\/code><\/p>\n<p>If you realize &#8212; whoops! &#8212; you made a mistake and want to cancel the job you&#8217;ve just submitted, you can type<\/p>\n<p><code>scancel JobIDNumber<\/code><\/p>\n<p>When your job is done, it will silently disappear from the queue and your output files should be in your directory. \u00a0You can put a setting in your <code>calculation.sh<\/code> script to email you when your job finishes. \u00a0If something went wrong with the calculation, your output files should contain error messages to help you figure out what went wrong so you can fix it and resubmit the job.<\/p>\n<p>That&#8217;s it for the basics. \u00a0There are some more useful slurm commands you can read about on the <a href=\"http:\/\/slurm.schedmd.com\/quickstart.html\">slurm official documentation page<\/a>. \u00a0In another blog post, I&#8217;ll show you a simple slurm script you can copy, paste, and edit to get your own jobs running smoothly.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>You tell comet to run your calculation by submitting it to a queue. Your calculation waits in line with all the other jobs scientists want to run on comet. The software that controls this queue is called slurm (that&#8217;s a &hellip; <a href=\"http:\/\/williamkennerly.com\/blog\/running-a-job-on-comet-using-the-queue-manager-called-slurm\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[3,2],"class_list":["post-6","post","type-post","status-publish","format-standard","hentry","category-computing","tag-comet","tag-slurm"],"_links":{"self":[{"href":"http:\/\/williamkennerly.com\/blog\/wp-json\/wp\/v2\/posts\/6","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/williamkennerly.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/williamkennerly.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/williamkennerly.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/williamkennerly.com\/blog\/wp-json\/wp\/v2\/comments?post=6"}],"version-history":[{"count":7,"href":"http:\/\/williamkennerly.com\/blog\/wp-json\/wp\/v2\/posts\/6\/revisions"}],"predecessor-version":[{"id":57,"href":"http:\/\/williamkennerly.com\/blog\/wp-json\/wp\/v2\/posts\/6\/revisions\/57"}],"wp:attachment":[{"href":"http:\/\/williamkennerly.com\/blog\/wp-json\/wp\/v2\/media?parent=6"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/williamkennerly.com\/blog\/wp-json\/wp\/v2\/categories?post=6"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/williamkennerly.com\/blog\/wp-json\/wp\/v2\/tags?post=6"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}