{"id":137966,"date":"2021-12-03T15:34:34","date_gmt":"2021-12-03T20:34:34","guid":{"rendered":"http:\/\/www.bu.edu\/tech\/?page_id=137966"},"modified":"2022-06-07T09:31:41","modified_gmt":"2022-06-07T13:31:41","slug":"interactive-jobs","status":"publish","type":"page","link":"https:\/\/www.bu.edu\/tech\/support\/research\/system-usage\/running-jobs\/interactive-jobs\/","title":{"rendered":"Running Interactive Jobs"},"content":{"rendered":"<p>Login nodes are most suitable for code development and debugging. Non-interactive batch processing is an environment for running jobs that take more than a few minutes and which require no interactions between the user and the application software. There are occasions where longer duration jobs that require user interaction may arise, hence a third category: <i>Interactive Batch Session<\/i>. With interactive batch, you can &#8220;checkout&#8221; one or more processors for hours of interactive use (think of that as your exclusive login shell). Use this judiciously as the interactive nature of the session often lends itself to lots of idling of the dedicated processors compared to non-interactive batch. Examples of interactive batch usages include:<\/p>\n<ul>\n<li style=\"margin-left: 20px;\">Running long-duration interactive MATLAB, R, IDL, etc. sessions<\/li>\n<li style=\"margin-left: 20px;\">GUI-based debugging requiring substantial run time<\/li>\n<li style=\"margin-left: 20px;\">Running timing benchmarks to study serial\/parallel code performance<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h3 style=\"padding-bottom: 0px; margin-bottom: .5em; margin-top: 1.5em;\">Interactive Job Using SCC Ondemand<\/h3>\n<p>The easiest way to run an interactive job on the SCC is through <a href=\"https:\/\/www.bu.edu\/tech\/support\/research\/system-usage\/connect-scc\/scc-ondemand\/\">SCC OnDemand<\/a> <\/p>\n<p>&#8220;My Interactive Jobs&#8221; menu allows to see all running interactive jobs and to connect to them if the previous connection was interrupted.<\/p>\n<p>&nbsp;<\/p>\n<h3 style=\"padding-bottom: 0px; margin-bottom: .5em; margin-top: 1.5em;\">Running Interactive Job From a Terminal<\/h3>\n<p>You can start an interactive job from a terminal (an application installed on your local computer and connected to the cluster using an <code><span class=\"command\">ssh<\/span><\/code> command). You can use one of the two methods: <code><span class=\"command\">qrsh<\/span><\/code> or <code><span class=\"command\">qsh<\/span><\/code>. The following table lists the major differences between them:<\/p>\n<table>\n<tbody>\n<tr>\n<th style=\"background-color: #97a1a4; color: #ffffff; text-align: center; box-shadow: none; border: 1px solid #bbbbbb;\" width=\"60%\"><\/th>\n<th style=\"background-color: #97a1a4; color: #ffffff; text-align: center; box-shadow: none; border: 1px solid #bbbbbb;\" width=\"20%\">qsh<\/th>\n<th style=\"background-color: #97a1a4; color: #ffffff; text-align: center; box-shadow: none; border: 1px solid #bbbbbb;\" width=\"20%\">qrsh<\/th>\n<\/tr>\n<\/tbody>\n<tbody>\n<tr>\n<td style=\"padding: 7px; background-color: #ecf4f7; text-align: left; border: 1px solid #97a1a4;\">X-forwarding is required<\/td>\n<td style=\"padding: 7px; background-color: #ffffff; text-align: center; border: 1px solid #97a1a4;\">\u2713<\/td>\n<td style=\"padding: 7px; background-color: #ffffff; text-align: center; border: 1px solid #97a1a4;\">\u2014<\/td>\n<\/tr>\n<tr>\n<td style=\"padding: 7px; background-color: #ecf4f7; text-align: left; border: 1px solid #97a1a4;\">Session is opened in a separate window<\/td>\n<td style=\"padding: 7px; background-color: #ffffff; text-align: center; border: 1px solid #97a1a4;\">\u2713<\/td>\n<td style=\"padding: 7px; background-color: #ffffff; text-align: center; border: 1px solid #97a1a4;\">\u2014<\/td>\n<\/tr>\n<tr>\n<td style=\"padding: 7px; background-color: #ecf4f7; text-align: left; border: 1px solid #97a1a4;\">Allows for a graphics window to be opened by a program<\/td>\n<td style=\"padding: 7px; background-color: #ffffff; text-align: center; border: 1px solid #97a1a4;\">\u2713<\/td>\n<td style=\"padding: 7px; background-color: #ffffff; text-align: center; border: 1px solid #97a1a4;\">\u2713<\/td>\n<\/tr>\n<tr>\n<td style=\"padding: 7px; background-color: #ecf4f7; text-align: left; border: 1px solid #97a1a4;\">Current environment variables can be passed to the session<\/td>\n<td style=\"padding: 7px; background-color: #ffffff; text-align: center; border: 1px solid #97a1a4;\">\u2713<\/td>\n<td style=\"padding: 7px; background-color: #ffffff; text-align: center; border: 1px solid #97a1a4;\">\u2014<\/td>\n<\/tr>\n<tr>\n<td style=\"padding: 7px; background-color: #ecf4f7; text-align: left; border: 1px solid #97a1a4;\">Batch-system environment variables ($NSLOTS, etc.) are set<\/td>\n<td style=\"padding: 7px; background-color: #ffffff; text-align: center; border: 1px solid #97a1a4;\">\u2713<\/td>\n<td style=\"padding: 7px; background-color: #ffffff; text-align: center; border: 1px solid #97a1a4;\">\u2713<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Both methods have a default wallclock limit of 12 hours which users may override. Many <a href=\"https:\/\/www.bu.edu\/tech\/support\/research\/system-usage\/running-jobs\/submitting-jobs\/#job-options\">options<\/a> available to the <code><span class=\"command\">qsub<\/span><\/code> command can be used with <code><span class=\"command\">qsh<\/span><\/code> and <code><span class=\"command\">qrsh<\/span><\/code> commands.<\/p>\n<p>For graphics and GUI-based applications, <code><span class=\"command\">qsh<\/span><\/code> delivers better performance than <code><span class=\"command\">qrsh<\/span><\/code>.<\/p>\n<h4 style=\"padding-bottom: 0px; margin-bottom: .5em; margin-top: 2.5em;\"><b>qrsh<\/b><\/h4>\n<p>The session invoked with <code><span class=\"command\">qrsh<\/span><\/code> command will start in your current window and, as such, does not require x-forwarding. However, if you want to start a graphics application within this session, you need to have x-forwarding enabled.<\/p>\n<pre class=\"code-block\"><code><span class=\"prompt\">scc % <\/span><span class=\"command\">qrsh<\/span><\/code><\/pre>\n<p>The above command requests exclusive access to <i>one<\/i> processor on one of the compute nodes with a default 12-hour wall time. This time allotment is more than adequate for most interactive batch jobs. If you need to request a longer time or other additional resources, you can add necessary <a href=\"https:\/\/www.bu.edu\/tech\/support\/research\/system-usage\/running-jobs\/submitting-jobs\/#job-options\">options<\/a>. For example, to request an interactive session with 4 processors for 24 hours:<\/p>\n<pre class=\"code-block\"><code><span class=\"prompt\">scc % <\/span><span class=\"command\">qrsh -l h_rt=24:00:00 -pe omp 4<\/span><\/code><\/pre>\n<p>To request an interactive session on a node with a GPU with the compute capability of 3.5:<\/p>\n<pre class=\"code-block\"><code><span class=\"prompt\">scc % <\/span><span class=\"command\">qrsh -P <i>project_name<\/i> -l gpus=1 -l gpu_c=3.5<\/span><\/code><\/pre>\n<p>By default, if an interactive batch request cannot be fulfilled immediately, you will see a message:<\/p>\n<pre class=\"code-block\"><code><span class=\"prompt\">scc % <\/span><span class=\"command\">qrsh <\/span>\r\nYour \"qrsh\" request could not be scheduled, try again later.<\/span><\/span><\/code><\/pre>\n<p>To wait until a slot on the compute node becomes available to schedule an interactive session, add the <code>-now n<\/code> option to the <code><span class=\"command\">qrsh<\/span><\/code> command line:<\/p>\n<pre class=\"code-block\"><code><span class=\"prompt\">scc % <\/span><span class=\"command\">qrsh -now n<\/span><\/code><\/pre>\n<p>To exit the interactive session, type <code><span class=\"command\">exit<\/span><\/code> at the prompt.<\/p>\n<h4 style=\"padding-bottom: 0px; margin-bottom: .5em; margin-top: 2.0em;\"><b>qsh<\/b><\/h4>\n<p>Interactive sessions invoked using <code><span class=\"command\">qsh<\/span><\/code> will start in a separate xterm window and therefore require <a href=\"https:\/\/www.bu.edu\/tech\/support\/research\/system-usage\/getting-started\/x-forwarding\/\">x-forwarding<\/a>. This method allows a user to start Graphics or GUI-based applications.<\/p>\n<pre class=\"code-block\"><code><span class=\"prompt\">scc % <\/span><span class=\"command\">qsh <\/span>\r\n<span class=\"output\">Your job <span class=\"placeholder\">jobID<\/span> (\"INTERACTIVE\") has been submitted\r\nwaiting for interactive job to be scheduled ...\r\nYour interactive job <span class=\"placeholder\">jobID<\/span> has been successfully scheduled.<\/span><\/code><\/pre>\n<p>The usage procedures for the <code><span class=\"command\">qrsh<\/span><\/code> commands are almost identical to those of <code><span class=\"command\">qsh<\/span><\/code>, although you cannot pass current environment variables (using the <code>-V<\/code> option).<\/p>\n<div class=\"highlight-yellow\"><b>Note:<\/b> When your interactive session is no longer needed, please log out promptly to free up the resources.<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Login nodes are most suitable for code development and debugging. Non-interactive batch processing is an environment for running jobs that take more than a few minutes and which require no interactions between the user and the application software. There are occasions where longer duration jobs that require user interaction may arise, hence a third category:&#8230;<\/p>\n","protected":false},"author":1692,"featured_media":0,"parent":137962,"menu_order":2,"comment_status":"closed","ping_status":"closed","template":"","meta":[],"_links":{"self":[{"href":"https:\/\/www.bu.edu\/tech\/wp-json\/wp\/v2\/pages\/137966"}],"collection":[{"href":"https:\/\/www.bu.edu\/tech\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.bu.edu\/tech\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.bu.edu\/tech\/wp-json\/wp\/v2\/users\/1692"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bu.edu\/tech\/wp-json\/wp\/v2\/comments?post=137966"}],"version-history":[{"count":6,"href":"https:\/\/www.bu.edu\/tech\/wp-json\/wp\/v2\/pages\/137966\/revisions"}],"predecessor-version":[{"id":140672,"href":"https:\/\/www.bu.edu\/tech\/wp-json\/wp\/v2\/pages\/137966\/revisions\/140672"}],"up":[{"embeddable":true,"href":"https:\/\/www.bu.edu\/tech\/wp-json\/wp\/v2\/pages\/137962"}],"wp:attachment":[{"href":"https:\/\/www.bu.edu\/tech\/wp-json\/wp\/v2\/media?parent=137966"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}