{"id":221,"date":"2019-06-07T09:12:46","date_gmt":"2019-06-07T13:12:46","guid":{"rendered":"https:\/\/psycomp.utsc.utoronto.ca\/support\/?p=221"},"modified":"2024-01-12T12:43:52","modified_gmt":"2024-01-12T17:43:52","slug":"slurm-examples","status":"publish","type":"post","link":"https:\/\/psycomp.utsc.utoronto.ca\/support\/index.php\/2019\/06\/07\/slurm-examples\/","title":{"rendered":"Slurm Examples"},"content":{"rendered":"<p><strong><u>Note:<\/u><\/strong> you need to sign into the Psychology cluster (<font color=red>neurocomp0<\/font>) to run the following commands.<\/p>\r\n<p><strong><u>Note:<\/u><\/strong> we&#8217;ll add more examples and adjust fairness rules after we add more resources to the &#8220;new&#8221; cluster.<\/p>\r\n<p>For SGE users, please have a quick look at <a href=\"https:\/\/psycomp.utsc.utoronto.ca\/support\/index.php\/resources\/sge-to-slurm-conversion\/\">SGE to SLURM conversion<\/a>.<\/p>\r\n<p>The following examples are for running interactive jobs.<\/p>\r\n<p><strong>1) Check cluster status<\/strong>\r\n<pre>\r\nsinfo\r\n<\/pre>\r\n<\/p>\r\n<p><strong>2) Check queue info<\/strong>\r\n<pre>\r\nsqueue\r\n<\/pre>\r\n<\/p>\r\n<p><strong>3) Run a job (for example, get the host name of the compute node when the job runs)<\/strong>\r\n<pre>\r\nsrun -N 1 -c 1 hostname\r\n<\/pre>\r\n<\/p>\r\n<p><strong>4) Cancel a job<\/strong>\r\n<pre>\r\nscancel JobID\r\n<\/pre>\r\n<\/p>\r\n<p><strong>5) Attach to a job step (for debugging)<\/strong>\r\n<pre>\r\nsattach JobID.StepID\r\n<\/pre>\r\n<\/p>\r\n<p><strong>6) Start an interactive section on the &#8220;cpu&#8221; partition without X \/ GUI<\/strong>\r\n<pre>\r\nsrun -N 1 -p cpu -c 8 --pty bash -i\r\n<\/pre>\r\n<\/p>\r\n<p><strong>7) Start an interactive section on the &#8220;cpu&#8221; partition with X \/ GUI (make sure your terminal is an X terminal, otherwise, you&#8217;ll get an error message: <i>srun: error: No DISPLAY variable set, cannot setup x11 forwarding.<\/i>)<\/strong>\r\n<pre>\r\nsrun -N 1 -c 8 -p cpu --x11 --pty bash -i\r\n<\/pre>\r\n<\/p>\r\n","protected":false},"excerpt":{"rendered":"<p>Note: you need to sign into the Psychology cluster (neurocomp0) to run the following commands. Note: we&#8217;ll add more examples and adjust fairness rules after we add more resources to the &#8220;new&#8221; cluster. For SGE users, please have a quick &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"\" href=\"https:\/\/psycomp.utsc.utoronto.ca\/support\/index.php\/2019\/06\/07\/slurm-examples\/\"> <span class=\"screen-reader-text\">Slurm Examples<\/span> Read More &raquo;<\/a><\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":"","_links_to":"","_links_to_target":""},"categories":[3,2,10],"tags":[],"class_list":["post-221","post","type-post","status-publish","format-standard","hentry","category-clusterinfo","category-quickstart","category-slurm"],"_links":{"self":[{"href":"https:\/\/psycomp.utsc.utoronto.ca\/support\/index.php\/wp-json\/wp\/v2\/posts\/221","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/psycomp.utsc.utoronto.ca\/support\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/psycomp.utsc.utoronto.ca\/support\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/psycomp.utsc.utoronto.ca\/support\/index.php\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/psycomp.utsc.utoronto.ca\/support\/index.php\/wp-json\/wp\/v2\/comments?post=221"}],"version-history":[{"count":13,"href":"https:\/\/psycomp.utsc.utoronto.ca\/support\/index.php\/wp-json\/wp\/v2\/posts\/221\/revisions"}],"predecessor-version":[{"id":667,"href":"https:\/\/psycomp.utsc.utoronto.ca\/support\/index.php\/wp-json\/wp\/v2\/posts\/221\/revisions\/667"}],"wp:attachment":[{"href":"https:\/\/psycomp.utsc.utoronto.ca\/support\/index.php\/wp-json\/wp\/v2\/media?parent=221"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/psycomp.utsc.utoronto.ca\/support\/index.php\/wp-json\/wp\/v2\/categories?post=221"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/psycomp.utsc.utoronto.ca\/support\/index.php\/wp-json\/wp\/v2\/tags?post=221"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}