<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.bwhpc.de/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=P+Schuhmacher</id>
	<title>bwHPC Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.bwhpc.de/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=P+Schuhmacher"/>
	<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/e/Special:Contributions/P_Schuhmacher"/>
	<updated>2026-05-24T08:58:09Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.17</generator>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=Registration/bwUniCluster/Entitlement&amp;diff=15760</id>
		<title>Registration/bwUniCluster/Entitlement</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=Registration/bwUniCluster/Entitlement&amp;diff=15760"/>
		<updated>2026-03-02T13:01:28Z</updated>

		<summary type="html">&lt;p&gt;P Schuhmacher: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;border: 3px solid #e2e3e5; padding: 15px; background-color: #ffffff; margin: 10px 0;&amp;quot;&amp;gt;&lt;br /&gt;
The bwUniCluster entitlement (see [https://www.bwidm.de/attribute.php#Berechtigung eduPersonEntitlement]) issued by a university assures the operator of the bwUniCluster that its university member&#039;s compute activities comply with the German Foreign Trade Act (Außenwirtschaftsgesetz - AWG) and German Foreign Trade Regulations (Außenwirtschaftsverordnung - AWV).&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Step A: bwUniCluster Entitlement =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 3px solid #0066cc; padding: 15px; background-color: #e7f3ff; margin: 10px 0;&amp;quot;&amp;gt;&lt;br /&gt;
The entitlement is called &#039;&#039;&#039;bwForCluster&#039;&#039;&#039; and each university assigns the entitlement &#039;&#039;&#039;only&#039;&#039;&#039; for its own members.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To register for a bwForCluster you need the  &#039;&#039;&#039;bwForCluster Entitlement&#039;&#039;&#039; issued by your university.&lt;br /&gt;
&lt;br /&gt;
If you are not sure if you already have an entitlement, please check it first with the [[#Check_your_Entitlements|&#039;&#039;&#039;Check your Entitlements&#039;&#039;&#039;]] guide below.&lt;br /&gt;
If you need the entitlement, please follow the link for your institution or contact your local service desk if no information is provided:&lt;br /&gt;
* [https://www.hs-esslingen.de/informatik-und-informationstechnik/forschung-labore/forschung/laufende-projekte/bwhpc-s5 Hochschule Esslingen]&lt;br /&gt;
* [[Registration/bwIDM-Entitlements-Uni-Freiburg|Universität Freiburg]]&lt;br /&gt;
* [https://heiservices.uni-heidelberg.de/entitlement Universität Heidelberg] (access only within Uni Heidelberg network)&lt;br /&gt;
* [https://kim.uni-hohenheim.de/bwhpc-account Universität Hohenheim]&lt;br /&gt;
* [https://www.scc.kit.edu/downloads/ISM/SD-HPC-Formulare/Accessform_bwUniCluster3_v1_DE_EN_2026.pdf Karlsruhe Institute of Technology (KIT)]&lt;br /&gt;
* [https://www.kim.uni-konstanz.de/en/services/research-and-teaching/high-performance-computing/access-to-bwunicluster Universität Konstanz]&lt;br /&gt;
* [[BWUniCluster_User_Access_Members_Uni_Mannheim|Universität Mannheim]]&lt;br /&gt;
* [https://www.hlrs.de/apply-for-computing-time/bw-uni-cluster Universität Stuttgart]&lt;br /&gt;
* [https://uni-tuebingen.de/de/155157 Universität Tübingen]&lt;br /&gt;
* [[BWUniCluster_User_Access_Members_Uni_Ulm|Universität Ulm]]&lt;br /&gt;
* [[Registration/HAW|HAW BW e.V.]] and Duale Hochschule Baden-Württemberg: Please contact your local service desk. In case of questions contact [mailto:hpc-at-haw@hs-esslingen.de hpc-at-haw@hs-esslingen.de]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 3px solid #ffc107; padding: 15px; background-color: #fff3cd; margin: 10px 0;&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Entitlement Synchronization:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
After your university assigns the entitlement, it takes some time for it to synchronize across the system.&lt;br /&gt;
* &#039;&#039;&#039;Check your entitlements first&#039;&#039;&#039; (see below) before contacting support&lt;br /&gt;
* &#039;&#039;&#039;If the entitlement does not appear within 24 hours,&#039;&#039;&#039; contact your local service desk&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Check your Entitlements ==&lt;br /&gt;
&lt;br /&gt;
To make sure you do not already have the entitlement, please log in to &#039;&#039;&#039;https://login.bwidm.de/user/index.xhtml&#039;&#039;&#039;.&lt;br /&gt;
To see the list of your entitlements, first select the &#039;&#039;&#039;Shibboleth&#039;&#039;&#039; tab at the top.&lt;br /&gt;
If the list below &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;urn:oid:1.3.6.1.4.1.5923.1.1.1.7&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; contains&lt;br /&gt;
&amp;lt;pre&amp;gt;http://bwidm.de/entitlement/bwUniCluster&amp;lt;/pre&amp;gt;&lt;br /&gt;
you already have the entitlement and can skip step A.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 3px solid #6c757d; padding: 15px; background-color: #e2e3e5; margin: 10px 0;&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;http://bwidm.de/entitlement/bwUniCluster&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; is an attribute and not a link!&lt;br /&gt;
&lt;br /&gt;
See [https://www.bwidm.de/dienste.php bwUniCluster und bwForCluster] for more information about needed attributes for this service.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:BwIDM-idp.png|center|600px|thumb|Verify Entitlement.]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p style=&amp;quot;text-align:right;&amp;quot;&amp;gt;[[Registration/bwUniCluster/Service | Go to step B]]&amp;lt;/p&amp;gt;&lt;/div&gt;</summary>
		<author><name>P Schuhmacher</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=Registration/bwUniCluster/Entitlement&amp;diff=15655</id>
		<title>Registration/bwUniCluster/Entitlement</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=Registration/bwUniCluster/Entitlement&amp;diff=15655"/>
		<updated>2025-12-17T09:01:17Z</updated>

		<summary type="html">&lt;p&gt;P Schuhmacher: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;border: 3px solid #e2e3e5; padding: 15px; background-color: #ffffff; margin: 10px 0;&amp;quot;&amp;gt;&lt;br /&gt;
The bwUniCluster entitlement (see [https://www.bwidm.de/attribute.php#Berechtigung eduPersonEntitlement]) issued by a university assures the operator of the bwUniCluster that its university member&#039;s compute activities comply with the German Foreign Trade Act (Außenwirtschaftsgesetz - AWG) and German Foreign Trade Regulations (Außenwirtschaftsverordnung - AWV).&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Step A: bwUniCluster Entitlement =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 3px solid #0066cc; padding: 15px; background-color: #e7f3ff; margin: 10px 0;&amp;quot;&amp;gt;&lt;br /&gt;
The entitlement is called &#039;&#039;&#039;bwForCluster&#039;&#039;&#039; and each university assigns the entitlement &#039;&#039;&#039;only&#039;&#039;&#039; for its own members.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To register for a bwForCluster you need the  &#039;&#039;&#039;bwForCluster Entitlement&#039;&#039;&#039; issued by your university.&lt;br /&gt;
&lt;br /&gt;
If you are not sure if you already have an entitlement, please check it first with the [[#Check_your_Entitlements|&#039;&#039;&#039;Check your Entitlements&#039;&#039;&#039;]] guide below.&lt;br /&gt;
If you need the entitlement, please follow the link for your institution or contact your local service desk if no information is provided:&lt;br /&gt;
* [https://www.hs-esslingen.de/informatik-und-informationstechnik/forschung-labore/forschung/laufende-projekte/bwhpc-s5 Hochschule Esslingen]&lt;br /&gt;
* [[Registration/bwIDM-Entitlements-Uni-Freiburg|Universität Freiburg]]&lt;br /&gt;
* [https://heiservices.uni-heidelberg.de/entitlement Universität Heidelberg] (access only within Uni Heidelberg network)&lt;br /&gt;
* [https://kim.uni-hohenheim.de/bwhpc-account Universität Hohenheim]&lt;br /&gt;
* [https://www.scc.kit.edu/downloads/ISM/SD-HPC-Formulare/Accessform_bwUniCluster3_v2_DE_EN_2025.pdf Karlsruhe Institute of Technology (KIT)]&lt;br /&gt;
* [https://www.kim.uni-konstanz.de/en/services/research-and-teaching/high-performance-computing/access-to-bwunicluster Universität Konstanz]&lt;br /&gt;
* [[BWUniCluster_User_Access_Members_Uni_Mannheim|Universität Mannheim]]&lt;br /&gt;
* [https://www.hlrs.de/apply-for-computing-time/bw-uni-cluster Universität Stuttgart]&lt;br /&gt;
* [https://uni-tuebingen.de/de/155157 Universität Tübingen]&lt;br /&gt;
* [[BWUniCluster_User_Access_Members_Uni_Ulm|Universität Ulm]]&lt;br /&gt;
* [[Registration/HAW|HAW BW e.V.]] and Duale Hochschule Baden-Württemberg: Please contact your local service desk. In case of questions contact [mailto:hpc-at-haw@hs-esslingen.de hpc-at-haw@hs-esslingen.de]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 3px solid #ffc107; padding: 15px; background-color: #fff3cd; margin: 10px 0;&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Entitlement Synchronization:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
After your university assigns the entitlement, it takes some time for it to synchronize across the system.&lt;br /&gt;
* &#039;&#039;&#039;Check your entitlements first&#039;&#039;&#039; (see below) before contacting support&lt;br /&gt;
* &#039;&#039;&#039;If the entitlement does not appear within 24 hours,&#039;&#039;&#039; contact your local service desk&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Check your Entitlements ==&lt;br /&gt;
&lt;br /&gt;
To make sure you do not already have the entitlement, please log in to &#039;&#039;&#039;https://login.bwidm.de/user/index.xhtml&#039;&#039;&#039;.&lt;br /&gt;
To see the list of your entitlements, first select the &#039;&#039;&#039;Shibboleth&#039;&#039;&#039; tab at the top.&lt;br /&gt;
If the list below &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;urn:oid:1.3.6.1.4.1.5923.1.1.1.7&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; contains&lt;br /&gt;
&amp;lt;pre&amp;gt;http://bwidm.de/entitlement/bwUniCluster&amp;lt;/pre&amp;gt;&lt;br /&gt;
you already have the entitlement and can skip step A.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 3px solid #6c757d; padding: 15px; background-color: #e2e3e5; margin: 10px 0;&amp;quot;&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;http://bwidm.de/entitlement/bwUniCluster&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; is an attribute and not a link!&lt;br /&gt;
&lt;br /&gt;
See [https://www.bwidm.de/dienste.php bwUniCluster und bwForCluster] for more information about needed attributes for this service.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:BwIDM-idp.png|center|600px|thumb|Verify Entitlement.]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p style=&amp;quot;text-align:right;&amp;quot;&amp;gt;[[Registration/bwUniCluster/Service | Go to step B]]&amp;lt;/p&amp;gt;&lt;/div&gt;</summary>
		<author><name>P Schuhmacher</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=Development/VS_Code&amp;diff=15367</id>
		<title>Development/VS Code</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=Development/VS_Code&amp;diff=15367"/>
		<updated>2025-10-29T14:14:44Z</updated>

		<summary type="html">&lt;p&gt;P Schuhmacher: /* Connect to code-server */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
&lt;br /&gt;
[[File:vscode.png|thumb|Visual Studio Code, Source: https://code.visualstudio.com/|450px]]&lt;br /&gt;
&lt;br /&gt;
[https://github.com/Microsoft/vscode Visual Studio Code] (VS Code) is an open source source-code editor from Microsoft. It has become one of the most popular IDEs according to a [https://survey.stackoverflow.co/2024/technology#1-integrated-development-environment stackoverflow survey]. The functionality of VS Code can easily be extended by installing extensions. These extensions allow for almost arbitrary &#039;&#039;&#039;language support&#039;&#039;&#039;, &#039;&#039;&#039;debugging&#039;&#039;&#039; or &#039;&#039;&#039;remote development&#039;&#039;&#039;. You can install VS Code locally and use it for remote development. From the following table you can see which instructions you need to follow to develop on a bwHPC cluster with VS Code.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;|Cluster&lt;br /&gt;
! Description&lt;br /&gt;
! Commands&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| bwUniCluster&lt;br /&gt;
| Setup with [[Development/VS_Code#code-server | Code Server]]&lt;br /&gt;
| &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;module load devel/code-server&amp;lt;/source&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Other&lt;br /&gt;
| Setup with [[Development/VS_Code#Connect_to_Remote_Jupyter_Kernel | Jupyter kernel]] or [[Development/VS_Code#Install_Code-Server | install Code-Server]]&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Remote - SSH ==&lt;br /&gt;
&lt;br /&gt;
In order to remotely develop and debug code at HPC facilities, you can use the [https://code.visualstudio.com/docs/remote/ssh &#039;&#039;&#039;Remote - SSH&#039;&#039;&#039; extension]. The extension allows you to connect your locally installed VS Code with the remote servers. So in contrast to using graphical IDEs within a remote desktop session (RDP, VNC), there are no negative effects like e.g. laggy reactions to your input or blurred display of fonts.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Installation and Configuration ===&lt;br /&gt;
&lt;br /&gt;
[[File:vscode-extensions-button.png|vscode-extensions-button.png|30px]]&amp;lt;br&amp;gt;&lt;br /&gt;
In order to install the Remote - SSH extension, just click on the Extensions (Erweiterungen) button in the left side bar and enter “remote ssh” in the search field. Choose &#039;&#039;&#039;Remote - SSH&#039;&#039;&#039; from the occurring list and click on &#039;&#039;&#039;Install&#039;&#039;&#039;.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:vscode-remoteexplorer-button.png|vscode-remoteexplorer-button.png|30px]]&amp;lt;br&amp;gt;&lt;br /&gt;
In order to configure remote connections, open the Remote-Explorer extension. On Linux Systems, the file &amp;lt;code&amp;gt;~/.ssh/config&amp;lt;/code&amp;gt; is automatically evaluated. The targets within this file already appear in the left side bar.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:vscode-remoteexplorer-add.png|vscode-remoteexplorer-add.png|350px]]&amp;lt;br&amp;gt;&lt;br /&gt;
If there are no remote ssh targets defined within this file, you can easily add one by clicking on the + symbol. Make sure that “SSH Targets” is active in the drop down menu of the Remote-Explorer. Enter the connection details &amp;lt;code&amp;gt;&amp;amp;lt;user&amp;amp;gt;@&amp;amp;lt;server&amp;amp;gt;&amp;lt;/code&amp;gt;. You will be asked, whether the file &amp;lt;code&amp;gt;~/.ssh/config&amp;lt;/code&amp;gt; should be modified or if another config file should be used or created.&lt;br /&gt;
&lt;br /&gt;
=== Connect to Login Nodes ===&lt;br /&gt;
&lt;br /&gt;
[[File:vscode-remoteexplorer-button.png|vscode-remoteexplorer-button.png|30px]]&amp;lt;br&amp;gt;&lt;br /&gt;
In order to connect to a remote SSH target, open the Remote-Explorer. Right-click a target and connect in the current or a new window. TOTP and password can be entered in the corresponding input fields that open.&lt;br /&gt;
&lt;br /&gt;
You are now logged in on the remote server. As usual, you can open a project directory with the standard key binding Ctrl+k Ctrl+o. You can now edit and debug code.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Attention&#039;&#039;&#039;: Please remember that you are running and debugging the code on a login node. Do not perform resource-intensive tasks. Furthermore, no GPU resources are available to you.&lt;br /&gt;
&lt;br /&gt;
Extensions, which are installed locally, are only usable on your local machine and are not automatically installed remotely. However, as soon as you open the Extensions-Explorer during a remote session, VS Code proposes to install the locally installed extensions remotely.&lt;br /&gt;
&lt;br /&gt;
=== Disconnect from Login Nodes ===&lt;br /&gt;
&lt;br /&gt;
[[File:vscode-remoteexplorer-indicator.png|images/vscode-remoteexplorer-indicator.png|200px]]&amp;lt;br&amp;gt;&lt;br /&gt;
If you want to end your remote session, click the green box in the lower left corner. In the input box that opens, select the “Close Remote Connection” option. If you simply close your VS Code window, some server-side components of VS Code will continue to run remotely.&lt;br /&gt;
&lt;br /&gt;
=== Access to Compute Nodes ===&lt;br /&gt;
&lt;br /&gt;
The workflow described above does not allow debugging on compute nodes that have been requested via an interactive Slurm job, for example. The security settings prevent the login node from being used as a proxy jump host. So there is no direct way to connect your locally installed VS code to the compute nodes. Debugging GPU codes is therefore also not possible, since this kind of resource is only accessible within Slurm jobs. Please have a look at the overview table in the first chapter to see which solution to follow.&lt;br /&gt;
&lt;br /&gt;
== Code-Server ==&lt;br /&gt;
&lt;br /&gt;
The application [https://github.com/cdr/code-server code-server] allows to run the server part of VS Code on any machine, it can be accessed in the web browser. This enables, for example, development and debugging on compute nodes.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:code-server.png|thumb|code-server.png|VS Code in web browser: code-server, Source: https://github.com/cdr/code-server&amp;quot;&amp;gt;https://github.com/cdr/code-server|400px]]&lt;br /&gt;
&lt;br /&gt;
=== Install Code-Server ===&lt;br /&gt;
&lt;br /&gt;
If no code-server module is provided, you can install it yourself. &lt;br /&gt;
# Download the latest release archive for your system from GitHub and unpack it.&lt;br /&gt;
#: &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
    # Look up the version that you want to install: https://github.com/coder/code-server/releases&lt;br /&gt;
    VERSION=4.101.2&lt;br /&gt;
    mkdir -p ~/.local/lib ~/.local/bin&lt;br /&gt;
    curl -fL https://github.com/coder/code-server/releases/download/v$VERSION/code-server-$VERSION-linux-amd64.tar.gz \&lt;br /&gt;
    | tar -C ~/.local/lib -xz&lt;br /&gt;
  &amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
# You can run code-server by executing &amp;quot;./bin/code-server&amp;quot; or add ./bin/code-server to your $PATH and run it with &amp;quot;code-server&amp;quot; &lt;br /&gt;
#: &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
    mv ~/.local/lib/code-server-$VERSION-linux-amd64 ~/.local/lib/code-server-$VERSION&lt;br /&gt;
    ln -s ~/.local/lib/code-server-$VERSION/bin/code-server ~/.local/bin/code-server&lt;br /&gt;
    # Add the following line in your ~/.bashrc&lt;br /&gt;
    export PATH=&amp;quot;~/.local/bin:$PATH&amp;quot;&lt;br /&gt;
  &amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Start Code-Server ===&lt;br /&gt;
&lt;br /&gt;
Code-server can be run on either login nodes or compute nodes. In the example shown, an interactive job is started on a GPU partition to run code-server there.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;$ salloc -p accelerated --gres=gpu:4 --time=30:00 # Start interactive job with 1 GPU&lt;br /&gt;
$ module load devel/code-server                   # Load code-server module&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
When code-server is started, it opens a web server listening on a certain port. The user has to &#039;&#039;&#039;specify the port&#039;&#039;&#039;. It can be chosen freely in the unprivileged range (above 1024). If a port is already assigned, e.g. because several users choose the same port, another port must be chosen.&lt;br /&gt;
&lt;br /&gt;
By starting code-server, you are running a web server that can be accessed by anyone logged in to the cluster. To prevent other people from gaining access to your account and data, this web server is &#039;&#039;&#039;password protected&#039;&#039;&#039;. If no variable &amp;lt;code&amp;gt;PASSWORD&amp;lt;/code&amp;gt; is defined, the password in the default config file &amp;lt;code&amp;gt;~/.config/code-server/config.yaml&amp;lt;/code&amp;gt; is used. If you want to define your own password, you can either change it in the config file or export the variable &amp;lt;code&amp;gt;PASSWORD&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;$ PASSWORD=&amp;lt;mySecret&amp;gt; \&lt;br /&gt;
    code-server \&lt;br /&gt;
      --bind-addr 0.0.0.0:8081 \&lt;br /&gt;
      --auth password  # Start code-server on port 8081&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;background:#FFCCCC; width:100%;&amp;quot;&lt;br /&gt;
| &#039;&#039;&#039;Security implications&#039;&#039;&#039;&lt;br /&gt;
Please note that by starting &amp;lt;code&amp;gt;code-server&amp;lt;/code&amp;gt; you are running a web server that can be accessed by everyone logged in on the cluster.&amp;lt;br&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;If password protection is disabled, anybody can access your account and your data.&#039;&#039;&#039;&lt;br /&gt;
* Choose a &#039;&#039;&#039;secure password&#039;&#039;&#039;!&lt;br /&gt;
* Do &#039;&#039;&#039;NOT&#039;&#039;&#039; use &amp;lt;code&amp;gt;code-server --link&amp;lt;/code&amp;gt;!&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Connect to code-server ===&lt;br /&gt;
[[File:code-server-hk.png|thumb|Code-server running on GPU node.|400px]]&lt;br /&gt;
&lt;br /&gt;
As soon as code-server is running, it can be accessed in the web browser. In order to establish the connection, a SSH tunnel from your local computer to the remote server has to be created via:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;$ ssh -L 8081:&amp;lt;computeNodeID&amp;gt;:8081 &amp;lt;userID&amp;gt;@uc3.scc.kit.edu&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
You need to enter the &amp;lt;code&amp;gt;computeNodeID&amp;lt;/code&amp;gt; of the node on which the interactive Slurm job is running. If you have started code server on a login node, just enter &amp;lt;code&amp;gt;localhost&amp;lt;/code&amp;gt;. Now you can open http://127.0.0.1:8081 in your web browser. Possibly, you have to allow your browser to open an insecure (non-https) site. The login site looks as follows:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:code-server-login.png|Code-server login page.|300px]]&lt;br /&gt;
&lt;br /&gt;
Enter the password from &amp;lt;code&amp;gt;~/.config/code-server/config.yaml&amp;lt;/code&amp;gt; or from the &amp;lt;code&amp;gt;PASSWORD&amp;lt;/code&amp;gt; variable. After clicking the “Submit” button, the familiar VS Code interface will open in your browser.&lt;br /&gt;
&lt;br /&gt;
=== End code-server session ===&lt;br /&gt;
&lt;br /&gt;
If you want to temporarily log out from your code-server session you can open the “Application Menu” in the left side bar and click on “Log out”. To &#039;&#039;&#039;terminate&#039;&#039;&#039; the code-server session, you have to cancel it in the interactive Slurm job by pressing ++ctrl+c++.&lt;br /&gt;
&lt;br /&gt;
== Connect to Remote Jupyter Kernel ==&lt;br /&gt;
To work with your python scripts and notebooks within VSCode while using the resources of a compute node, you can create a batch job that launches JupyterLab and connect to it via VS Code. To do so, please follow the instructions below. Any parts of the scripts that might need adjustments are marked with the keyword &amp;quot;@params&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Simple Use Case ===&lt;br /&gt;
The most basic steps are to set a password for JupyterLab, start a job which runs JupyterLab, get the connection details from the output log and connect to it locally. The following instructions explain these steps and provide an additional script that replaces the manual step of looking into the output file.&lt;br /&gt;
&lt;br /&gt;
# Load a python module and set a password on the cluster for JupyterLab:&lt;br /&gt;
#: &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
    module load devel/miniforge&lt;br /&gt;
    jupyter notebook --generate-config&lt;br /&gt;
    jupyter notebook password&lt;br /&gt;
  &amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
# Define a batch script to start a JupyterLab Job. Please adjust the first part according to your needs and your specific cluster.&lt;br /&gt;
#: &amp;lt;pre&amp;gt;~/jupyterlab.slurm&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
#SBATCH --partition=cpu-single&lt;br /&gt;
#SBATCH --job-name=jupyterlab&lt;br /&gt;
#SBATCH --time=00:10:00&lt;br /&gt;
#SBATCH --ntasks=1&lt;br /&gt;
#SBATCH --cpus-per-task 1&lt;br /&gt;
#SBATCH --mail-user=my_email_address #my_email_address # to use this generic version, add &amp;quot;alias my_email_address=&amp;lt;yourEmailAddress&amp;gt;&amp;quot; to the ~/.bashrc file&lt;br /&gt;
#SBATCH --mail-type=ALL&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# @param: change this to your preferred python or conda module&lt;br /&gt;
module load devel/miniforge&lt;br /&gt;
&lt;br /&gt;
# @param: cluster address for ssh connection&lt;br /&gt;
hostAddress=helix.bwservices.uni-heidelberg.de&lt;br /&gt;
&lt;br /&gt;
PORT=$(( ( RANDOM % 9999 )  + 1024 ))&lt;br /&gt;
jupyter lab --no-browser --ip=0.0.0.0 --port=${PORT}&lt;br /&gt;
HOSTID=$(squeue -h -o &amp;quot;%A %N %j&amp;quot; | grep jupyterlab | awk &#039;{print $2}&#039;)&lt;br /&gt;
echo &amp;quot;Connect&amp;quot;&lt;br /&gt;
echo &amp;quot;ssh -N -L ${PORT}:${HOSTID}:${PORT} ${USER}@$hostAddress&amp;quot;&lt;br /&gt;
echo &amp;quot;Job {$SLURM_JOB_ID} running on node {$SLURM_NODEID} on host {$HOSTID}.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
returned_code=$?&lt;br /&gt;
echo &amp;quot;&amp;gt; Script completed with exit code ${returned_code}&amp;quot;&lt;br /&gt;
exit ${returned_code}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
# Run a wrapper script to execute the batch script and extract needed information from the slurm output file. You could save it together with other utility scripts in a &amp;quot;bin&amp;quot; directory in your home folder.&lt;br /&gt;
#: &amp;lt;pre&amp;gt;./bin/run_jupyterlab_simple.sh&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# Define parameters&lt;br /&gt;
jobscript=~/jupyterlab.slurm&lt;br /&gt;
hostAddress=helix.bwservices.uni-heidelberg.de&lt;br /&gt;
&lt;br /&gt;
# Run job&lt;br /&gt;
job_id=$(sbatch $jobscript | awk &#039;{print $4}&#039;)&lt;br /&gt;
echo &amp;quot;jobid: $job_id&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Outfile name&lt;br /&gt;
slurm_out=slurm-${job_id}.out&lt;br /&gt;
&lt;br /&gt;
# Wait for output file&lt;br /&gt;
while [ ! -f $slurm_out ]; do   &lt;br /&gt;
    sleep 2; &lt;br /&gt;
done&lt;br /&gt;
&lt;br /&gt;
# Wait until url is written in output file&lt;br /&gt;
while [ -z ${url} ]; do   &lt;br /&gt;
    sleep 1; &lt;br /&gt;
    url=$(grep -o &#039;http[^ ]*&#039; $slurm_out | head -n 1); &lt;br /&gt;
    done&lt;br /&gt;
&lt;br /&gt;
# Extract hostID and port from output. The pattern assumes a node name with a length of 6 characters and a port with a length of 3, 4 or 5 numbers.&lt;br /&gt;
url_pattern=&amp;quot;http://([a-z0-9]{6}):([0-9]{3,5})/lab&amp;quot;&lt;br /&gt;
if [[ $url =~ $url_pattern ]]; then &lt;br /&gt;
    hostID=${BASH_REMATCH[1]}&lt;br /&gt;
    port=${BASH_REMATCH[2]}&lt;br /&gt;
    echo &amp;quot;To connect with the JupyterLab kernel, please enter the following into your local commandline: &amp;quot;&lt;br /&gt;
    echo &amp;quot;ssh -N -L $port:$hostID:$port ${USER}@$hostAddress&amp;quot;; &lt;br /&gt;
    echo &amp;quot;&amp;quot;&lt;br /&gt;
    echo &amp;quot;Note: It is normal that the ssh command doesn&#039;t end after providing the credentials. Ending the command would mean ending the local connection to the kernel.&amp;quot;&lt;br /&gt;
    echo &amp;quot;&amp;quot;&lt;br /&gt;
    echo &amp;quot;Afterwards, you can use the URL&amp;quot;&lt;br /&gt;
    echo &amp;quot;  http://127.0.0.1:${port}/lab &amp;quot;&lt;br /&gt;
    echo &amp;quot;&amp;quot;&lt;br /&gt;
    echo &amp;quot;to:&amp;quot;&lt;br /&gt;
    echo &amp;quot;- use the kernel in VSCode (&#039;Existing Jupyter Server...&#039;, enter URL, enter password, confirm &#039;127.0.0.1&#039;, choose kernel) or &amp;quot;&lt;br /&gt;
    echo &amp;quot;- open JupyterLab in your browser with the URL&amp;quot;&lt;br /&gt;
else&lt;br /&gt;
    echo &amp;quot;The needed information couldn&#039;t be found in the slurm output. Please contact your support unit if you need help with fixing this problem.&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
# rm $slurm_out&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
# Follow the instructions on the commandline to connect to the Jupyter kernel from your local machine or the Helix login node. More detailed instructions can be found below. &lt;br /&gt;
&lt;br /&gt;
==== Connect to a running job ====&lt;br /&gt;
&lt;br /&gt;
The job runs on a specific compute node and port. With this information, you can create a ssh connection to it. But first, you need to decide, in which way you want to work with your python code. The options are: &lt;br /&gt;
&lt;br /&gt;
# The code is placed locally on your computer. &lt;br /&gt;
# The code is placed on the cluster and you&#039;ve mounted the folder locally. (= The files on the cluster are accessible from within your local VS Code)&lt;br /&gt;
# The code is placed on the cluster and you work on the cluster via a remote connection in VS Code. &lt;br /&gt;
&lt;br /&gt;
Depending on the use case, you need to execute the ssh command in a different place: &lt;br /&gt;
&lt;br /&gt;
# Open VS Code on your computer. &lt;br /&gt;
# Open VS Code on your computer. &lt;br /&gt;
# Open VS Code on your computer and connect to the cluster.&lt;br /&gt;
&lt;br /&gt;
Then open a terminal and execute the ssh command, which is given in the commandline output of the wrapper script. If the terminal isn&#039;t already open, go to menu item &amp;quot;Terminal&amp;quot; at the top of the window and choose &amp;quot;New Terminal&amp;quot; (or &amp;quot;new -&amp;gt; command prompt&amp;quot; on Windows). &lt;br /&gt;
It is normal that the command doesn&#039;t end after you&#039;ve put in your credentials. Leave the terminal open and go on with the next step. &lt;br /&gt;
&lt;br /&gt;
To use the jupyter kernel that is running on the cluster node, you need to connect this kernel. This is similar to connecting any other kernel: &lt;br /&gt;
&lt;br /&gt;
# Open your code file.&lt;br /&gt;
# Click &amp;quot;Select Kernel&amp;quot; in the upper right corner. &lt;br /&gt;
# Choose &amp;quot;Existing Jupyter Server...&amp;quot;.&lt;br /&gt;
# Enter the URL that was given by the wrapper script. &lt;br /&gt;
# Enter your JupyterLab password that you set in the first step of these instructions.&lt;br /&gt;
# Confirm the prefilled value &amp;quot;127.0.0.1&amp;quot; by pressing Enter.&lt;br /&gt;
# Choose one of the virtual environments that you&#039;ve created on the cluster. You should see all python environments. To see the conda environments as well, you need to [[Helix/bwVisu/JupyterLab#Python_version | register them as ipykernel]] first. &lt;br /&gt;
&lt;br /&gt;
=== Complex Use Case ===&lt;br /&gt;
If you have different use cases for juypterlab, you could use a more flexible wrapper script, for example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;./bin/run_jupyterlab.sh&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
# Starts a jupyter kernel on a node and provides information on how to connect to it locally.&lt;br /&gt;
# If you have only one use case and therefore need only one combination of slurm settings for your jupyter jobs, then you can use the simpler script.&lt;br /&gt;
# This script supports explorative analyses by allowing to overwrite parameters via commandline.&lt;br /&gt;
# Different job configurations can be defined in advance and then used with a given short name (cpu, gpu,...).&lt;br /&gt;
&lt;br /&gt;
programname=$0&lt;br /&gt;
function help {&lt;br /&gt;
    &#039;&#039;&#039;help text&#039;&#039;&#039;&lt;br /&gt;
    echo &amp;quot;&amp;quot;&lt;br /&gt;
    echo &amp;quot;Starts a jupyterlab kernel&amp;quot;&lt;br /&gt;
    echo &amp;quot;&amp;quot;&lt;br /&gt;
    echo &amp;quot;usage example: $programname --param_set cpu&amp;quot;&lt;br /&gt;
    echo &amp;quot;&amp;quot;&lt;br /&gt;
    echo &amp;quot;  --param_set string   name of the parameter set&amp;quot;&lt;br /&gt;
    echo &amp;quot;                          (examples: cpu, gpu)&amp;quot;&lt;br /&gt;
    echo &amp;quot;  --jobscript string   optional, path of batch script&amp;quot;&lt;br /&gt;
    echo &amp;quot;                          (default: ~/jupyterlab.slurm)&amp;quot;&lt;br /&gt;
    echo &amp;quot;  --slurm_out string   optional, name of slurm output file&amp;quot;&lt;br /&gt;
    echo &amp;quot;                          (default: slurm-${job_id}.out)&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
# These parameters are set later in the script. Providing them via commandline, overwrites their values set in the script.&lt;br /&gt;
jobscript=None&lt;br /&gt;
slurm_out=None&lt;br /&gt;
&lt;br /&gt;
# Process parameters&lt;br /&gt;
while [ $# -gt 0 ]; do&lt;br /&gt;
    if [[ $1 == &amp;quot;--help&amp;quot; ]]; then&lt;br /&gt;
        help&lt;br /&gt;
        exit 0&lt;br /&gt;
    # when given -p as parameter, use its value for the variable param_set&lt;br /&gt;
    elif [[ $1 == &amp;quot;-p&amp;quot; ]]; then&lt;br /&gt;
        param_set=&amp;quot;$2&amp;quot;&lt;br /&gt;
        shift&lt;br /&gt;
    elif [[ $1 == &amp;quot;--&amp;quot;* ]]; then&lt;br /&gt;
        v=&amp;quot;${1/--/}&amp;quot;&lt;br /&gt;
        declare &amp;quot;$v&amp;quot;=&amp;quot;$2&amp;quot;&lt;br /&gt;
        shift&lt;br /&gt;
    fi&lt;br /&gt;
    shift&lt;br /&gt;
done&lt;br /&gt;
&lt;br /&gt;
function define_param_set(){&lt;br /&gt;
    &#039;&#039;&#039;Define parameter sets for sbatch&#039;&#039;&#039;&lt;br /&gt;
    # Define different sets&lt;br /&gt;
    cpu=(--partition=cpu-single --mem=2gb)&lt;br /&gt;
    gpu=(--partition=gpu-single --mem=3gb --gres=gpu:1)&lt;br /&gt;
&lt;br /&gt;
    param_set=${1}&lt;br /&gt;
    param_set=$param_set[@] &lt;br /&gt;
    param_set=(&amp;quot;${!param_set}&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
    # Add params that are the same for all sets&lt;br /&gt;
    param_set+=(--ntasks=1)&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
# @param: jobscript, name of the slurm batch script to execute&lt;br /&gt;
if  [ &amp;quot;$jobscript&amp;quot; = &amp;quot;None&amp;quot; ]; then&lt;br /&gt;
    jobscript=~/jupyterlab.slurm&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
# @param: cluster address for ssh connection&lt;br /&gt;
hostAddress=helix.bwservices.uni-heidelberg.de&lt;br /&gt;
&lt;br /&gt;
# Translate given param_set value to actual set of parameters &lt;br /&gt;
define_param_set $param_set&lt;br /&gt;
echo &amp;quot;param_set: ${param_set[*]}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Run job&lt;br /&gt;
job_id=$(sbatch ${param_set[@]} $jobscript | awk &#039;{print $4}&#039;)&lt;br /&gt;
echo &amp;quot;jobid: $job_id&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# @param: slurm_out, the filename for the slurm output file&lt;br /&gt;
if  [ &amp;quot;$slurm_out&amp;quot; = &amp;quot;None&amp;quot; ]; then&lt;br /&gt;
    slurm_out=slurm-${job_id}.out&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
# Wait for output file&lt;br /&gt;
while [ ! -f $slurm_out ]; do   &lt;br /&gt;
    sleep 1; &lt;br /&gt;
done&lt;br /&gt;
&lt;br /&gt;
# Wait until url is written in output file&lt;br /&gt;
while [ -z ${url} ]; do   &lt;br /&gt;
    sleep 1; &lt;br /&gt;
    url=$(grep -o &#039;http[^ ]*&#039; $slurm_out | head -n 1); &lt;br /&gt;
    done&lt;br /&gt;
&lt;br /&gt;
# Extract hostID and port from output.&lt;br /&gt;
url_pattern=&amp;quot;http://([a-z0-9]{6}):([0-9]{3,5})/lab&amp;quot;&lt;br /&gt;
if [[ $url =~ $url_pattern ]]; then &lt;br /&gt;
    hostID=${BASH_REMATCH[1]}&lt;br /&gt;
    port=${BASH_REMATCH[2]}&lt;br /&gt;
    echo &amp;quot;To connect with the JupyterLab kernel, please enter the following into your local commandline: &amp;quot;&lt;br /&gt;
    echo &amp;quot;ssh -N -L $port:$hostID:$port ${USER}@$hostAddress&amp;quot;; &lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Afterwards, you can either&amp;quot;&lt;br /&gt;
echo &amp;quot;- use the kernel in VSCode or &amp;quot;&lt;br /&gt;
echo &amp;quot;- open JupyterLab with this URL: &amp;quot;&lt;br /&gt;
echo &amp;quot;  http://127.0.0.1:${port}/lab &amp;quot;&lt;br /&gt;
echo &amp;quot;Note: It is normal that the ssh command doesn&#039;t end after providing the credentials. Ending the command would mean ending the local connection to the kernel.&amp;quot;&lt;br /&gt;
#rm $slurm_out&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>P Schuhmacher</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster3.0/Containers&amp;diff=15295</id>
		<title>BwUniCluster3.0/Containers</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster3.0/Containers&amp;diff=15295"/>
		<updated>2025-09-17T12:39:59Z</updated>

		<summary type="html">&lt;p&gt;P Schuhmacher: /* FAQ */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
To date, only few container runtime environments integrate well with HPC environments due to security concerns and differing assumptions in some areas.&lt;br /&gt;
&lt;br /&gt;
For example native Docker environments require elevated privileges, which is not an option on shared HPC resources. Docker&#039;s &amp;quot;rootless mode&amp;quot; is also currently not supported on our HPC systems because it does not support necessary features such as cgroups resource controls, security profiles, overlay networks, furthermore GPU passthrough is difficult. Necessary subuid (newuidmap) and subgid (newgidmap) settings may impose security issues.&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster the container runtimes &#039;&#039;&#039;Enroot&#039;&#039;&#039; and &#039;&#039;&#039;Singularity/Apptainer&#039;&#039;&#039; are supported.&lt;br /&gt;
&lt;br /&gt;
Further rootless container runtime environments (Podman, …) might be supported in the future, depending on how support for e.g. network interconnects, security features and HPC file systems develops.&lt;br /&gt;
&lt;br /&gt;
= ENROOT =&lt;br /&gt;
&lt;br /&gt;
Enroot enables you to run &#039;&#039;&#039;Docker containers&#039;&#039;&#039; on HPC systems. It is developed by NVIDIA. It is the &#039;&#039;&#039;recommended tool&#039;&#039;&#039; to use containers on bwUniCluster and integrates well with GPU usage and has basically no impact on performance.&lt;br /&gt;
Enroot is available to all users by default.&lt;br /&gt;
[[File:docker_logo.svg|center|100px]]&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
Excellent documentation is provided on [https://github.com/NVIDIA/enroot/blob/master/doc NVIDIA&#039;s github page]. This documentation here therefore confines itself to simple examples to get to know the essential functionalities.&lt;br /&gt;
&lt;br /&gt;
Using Docker containers with Enroot requires three steps:&lt;br /&gt;
&lt;br /&gt;
* Importing an image&lt;br /&gt;
* Creating a container&lt;br /&gt;
* Starting a container&lt;br /&gt;
&lt;br /&gt;
Optionally containers can also be exported and transferred.&lt;br /&gt;
&lt;br /&gt;
=== Importing a container image ===&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;enroot import docker://alpine&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;This pulls the latest alpine image from dockerhub (default registry). You will obtain the file alpine.sqsh.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;enroot import docker://nvcr.io#nvidia/pytorch:21.04-py3&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;This pulls the pytorch image version 21.04-py3 from [https://ngc.nvidia.com/catalog NVIDIA&#039;s NGC registry]. Please note that the NGC registry does not always contain the &amp;quot;latest&amp;quot; tag and instead requires the specification of a dedicated version. You will obtain the file nvidia+pytorch+21.04-py3.sqsh.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;enroot import docker://registry.scc.kit.edu#myProject/myImage:latest&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;This pulls your latest image from the KIT registry. You obtain the file myImage.sqsh.&lt;br /&gt;
&lt;br /&gt;
=== Creating a container ===&lt;br /&gt;
Create a container named &amp;quot;nvidia+pytorch+21.04-py3&amp;quot; by unpacking the .sqsh-file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;enroot create --name nvidia+pytorch+21.04-py3 nvidia+pytorch+21.04-py3.sqsh&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Creating&amp;quot; a container means that the squashed container image is unpacked inside &amp;lt;code&amp;gt;$ENROOT_DATA_PATH/&amp;lt;/code&amp;gt;. By default this variable points to &amp;lt;code&amp;gt;$HOME/.local/share/enroot/&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Starting a container ===&lt;br /&gt;
* Start the container nvidia+pytorch+21.04-py3 in read-write mode (&amp;lt;code&amp;gt;--rw&amp;lt;/code&amp;gt;) and run bash inside the container.&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;enroot start --rw nvidia+pytorch+21.04-py3 bash&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Start container in &amp;lt;code&amp;gt;--rw&amp;lt;/code&amp;gt;-mode and get root access (&amp;lt;code&amp;gt;--root&amp;lt;/code&amp;gt;) inside the container.&amp;lt;br /&amp;gt; &amp;lt;code&amp;gt;enroot start --root --rw nvidia+pytorch+21.04-py3 bash&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;You can now install software with root privileges, depending on the containerized Linux distribution e.g. with&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;apt-get install … &amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;apk add …&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;yum install …&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;pacman -S …&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Start container and mount (&amp;lt;code&amp;gt;-m&amp;lt;/code&amp;gt;) a local directory to &amp;lt;code&amp;gt;/work&amp;lt;/code&amp;gt; inside the container.&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;enroot start -m &amp;lt;localDir&amp;gt;:/work --rw nvidia+pytorch+21.04-py3 bash&amp;lt;/code&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
* Start container, mount a directory and start the application &amp;lt;code&amp;gt;jupyter lab&amp;lt;/code&amp;gt;.&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;enroot start -m &amp;lt;localDir&amp;gt;:/work --rw nvidia+pytorch+21.04-py3 jupyter lab&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Exporting and transfering containers ===&lt;br /&gt;
&lt;br /&gt;
If you intend to use Docker images which you built e.g. on your local desktop, and transfer them somewhere else, there are several possibilities to do so:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;enroot import --output myImage.sqsh dockerd://myImage&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;Import an image from the locally running Docker daemon. Copy the .sqsh-file to bwUniCluster and import it with &amp;lt;code&amp;gt;enroot import&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;enroot export --output myImage.sqsh myImage&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;Export an existing enroot container. Copy the .sqsh-file to bwUniCluster and import it with enroot import.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;enroot bundle --output myImage.run myImage.sqsh&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;Create a self extracting bundle from a container image. Copy the .run-file to bwUniCluster. You can run the self extracting image via ./myImage.run even if enroot is not installed!&lt;br /&gt;
&lt;br /&gt;
=== Container management ===&lt;br /&gt;
&lt;br /&gt;
You can list all containers on the system and additional information (&amp;lt;code&amp;gt;--fancy&amp;lt;/code&amp;gt; parameter) with the &amp;lt;code&amp;gt;enroot list&amp;lt;/code&amp;gt; command.&lt;br /&gt;
&lt;br /&gt;
The unpacked images can be removed with the enroot remove command.&lt;br /&gt;
&lt;br /&gt;
== SLURM Integration==&lt;br /&gt;
Enroot allows you to run containerized applications non-interactively, including MPI- and multi-node parallelism. The necessary Slurm integration is realized via the [https://github.com/NVIDIA/pyxis Pyxis plugin].&lt;br /&gt;
&lt;br /&gt;
=== Create Container via enroot === &lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;enroot import docker://ubuntu&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;enroot create -n pyxis_ubuntu ubuntu.sqsh&amp;lt;/code&amp;gt; &lt;br /&gt;
Adding pyxis_ is a must for the pyxis plugin to work&lt;br /&gt;
&lt;br /&gt;
=== Start via Slurm ===&lt;br /&gt;
Start existing Container:&lt;br /&gt;
*&amp;lt;code&amp;gt;salloc -p dev_single -t 00:10:00 --container-name=ubuntu --container-mounts=/etc/slurm/task_prolog:/etc/slurm/task_prolog,/scratch:/scratch,/usr/lib64/slurm:/usr/lib64/slurm,/usr/lib64/libhwloc.so:/usr/lib64/libhwloc.so,/usr/lib64/libhwloc.so.15:/usr/lib64/libhwloc.so.15&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Download and start Container via pyxis directly:&lt;br /&gt;
*&amp;lt;code&amp;gt;salloc -p dev_single -t 00:10:00 --container-image=ubuntu --container-name=ubuntu --container-mounts=/etc/slurm/task_prolog:/etc/slurm/task_prolog,/scratch:/scratch,/usr/lib64/slurm:/usr/lib64/slurm,/usr/lib64/libhwloc.so:/usr/lib64/libhwloc.so,/usr/lib64/libhwloc.so.15:/usr/lib64/libhwloc.so.15&amp;lt;/code&amp;gt;&lt;br /&gt;
In this case an enroot Container is created under ~./local/share/enroot/&lt;br /&gt;
&lt;br /&gt;
Note: &amp;lt;code&amp;gt;--container-mounts=/etc/slurm/task_prolog:/etc/slurm/task_prolog,/scratch:/scratch,/usr/lib64/slurm:/usr/lib64/slurm,/usr/lib64/libhwloc.so:/usr/lib64/libhwloc.so,/usr/lib64/libhwloc.so.15:/usr/lib64/libhwloc.so.15&amp;lt;/code&amp;gt; is needed for the plugin to work!! The Container name has to start with pyxis_ for the Plugin to work. When using the second Method this is done automatically. Furthermore when specifying the container name in your slurm Job the pyxis_ has to be omitted.&lt;br /&gt;
&lt;br /&gt;
All options usable for pyxis can be found via srun --help under &amp;quot;Options provided by plugins:&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Notable Options:&lt;br /&gt;
* &amp;lt;code&amp;gt;--container-mount-home&amp;lt;/code&amp;gt; Mounts the home directory into the container&lt;br /&gt;
* &amp;lt;code&amp;gt;--container-writable&amp;lt;/code&amp;gt; Makes the container filesystem writable (otherwise only the mounted home is writebale)&lt;br /&gt;
* &amp;lt;code&amp;gt;--container-remap-root&amp;lt;/code&amp;gt; Become root in your container. Allows installation of software via e.G apt (ubuntu)&lt;br /&gt;
&lt;br /&gt;
== FAQ ==&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;How can I run JupyterLab in a container and connect to it?&#039;&#039;&lt;br /&gt;
** Start an interactive session with or without GPUs. Notice the compute node ID the session is running on, and start a container with a running JupyterLab, e.g.:&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;salloc -p gpu_4 --time=01:00:00 --gres=gpu:1&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;enroot start -m &amp;lt;localDir&amp;gt;:/work --rw nvidia+pytorch+21.04-py3 jupyter lab&amp;lt;/code&amp;gt;&lt;br /&gt;
** Open a terminal on your desktop and create a SSH-tunnel to the running JupyterLab instance on the compute node. Insert the node ID, where the interactive session is running on:&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;ssh -L8888:&amp;lt;computeNodeID&amp;gt;:8888 &amp;lt;yourAccount&amp;gt;@uc3.scc.kit.edu&amp;lt;/code&amp;gt;&lt;br /&gt;
** Open a web browser and open the URL [http://localhost:8888 localhost:8888]&lt;br /&gt;
** Enter the token, which is visible in the output of the first terminal.&amp;lt;br /&amp;gt;Copy the string behind the &amp;lt;code&amp;gt;token=&amp;lt;/code&amp;gt; and paste it into the input field in the browser.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;Are GPUs accessible from within a running container?&#039;&#039;&amp;lt;br /&amp;gt;Yes.&amp;lt;br /&amp;gt;Unlike Docker, Enroot does not need further command line options to enable GPU passthrough like &amp;lt;code&amp;gt;--runtime=nvidia&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;--privileged&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;Is there something like &amp;lt;code&amp;gt;enroot-compose&amp;lt;/code&amp;gt;?&#039;&#039;&amp;lt;br /&amp;gt;AFAIK no.&amp;lt;br /&amp;gt; Enroot is mainly intended for HPC workloads, not for operating multi-container applications. However, starting and running these applications separately is possible.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;Can I use workspaces to store containers?&#039;&#039;&amp;lt;br /&amp;gt;Yes.&amp;lt;br /&amp;gt;You can define the location of configuration files and storage with environment variables. The &amp;lt;code&amp;gt;ENROOT_DATA_PATH&amp;lt;/code&amp;gt; variable should be set accordingly. Please refer to [https://github.com/NVIDIA/enroot/blob/master/doc/configuration.md#runtime-configuration NVIDIA&#039;s documentation] on runtime configuration. Unfortunately, using Pyxis and images stored on workspaces requires an ugly hack, because setting &amp;lt;code&amp;gt;ENROOT_DATA_PATH&amp;lt;/code&amp;gt; is ignored by Pyxis. The workaround consists in setting &amp;lt;code&amp;gt;XDG_DATA_HOME&amp;lt;/code&amp;gt; to the workspace directory (cf. https://github.com/NVIDIA/pyxis/issues/46).&amp;lt;br&amp;gt;For a workspace named &#039;&#039;enroottest&#039;&#039; this would be: &amp;lt;code&amp;gt;export XDG_DATA_HOME=$(ws_find enroottest)&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;export ENROOT_DATA_PATH=$(ws_find enroottest)/enroot&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Additional resources ==&lt;br /&gt;
&lt;br /&gt;
Source code: [https://github.com/NVIDIA/enroot https://github.com/NVIDIA/enroot]&lt;br /&gt;
&lt;br /&gt;
Documentation: [https://github.com/NVIDIA/enroot/blob/master/doc https://github.com/NVIDIA/enroot/blob/master/doc]&lt;br /&gt;
&lt;br /&gt;
Additional information: &lt;br /&gt;
* [https://archive.fosdem.org/2020/schedule/event/containers_hpc_unprivileged/ FOSDEM 2020 talk] + [https://archive.fosdem.org/2020/schedule/event/containers_hpc_unprivileged/attachments/slides/3711/export/events/attachments/containers_hpc_unprivileged/slides/3711/containers_hpc_unprivileged.pdf slides]&lt;br /&gt;
* [https://slurm.schedmd.com/SLUG19/NVIDIA_Containers.pdf Slurm User Group Meeting 2019 talk]&lt;br /&gt;
&lt;br /&gt;
= Singularity/Apptainer =&lt;br /&gt;
[[File:singularity_logo.svg|center|100px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
Excellent documentation is provided on the [https://sylabs.io/docs/ Documentation&amp;amp;Examples] page provided by Sylabs. This documentation here therefore confines itself to simple examples to get to know the essential functionalities.&lt;br /&gt;
&lt;br /&gt;
Using Singularity/Apptainer usually involves two steps:&lt;br /&gt;
&lt;br /&gt;
* Building a container image using singularity build&lt;br /&gt;
&lt;br /&gt;
* Running a container image using singularity run or singularity exec&lt;br /&gt;
&lt;br /&gt;
=== Building an image ===&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;singularity build ubuntu.sif library://ubuntu&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;This pulls the latest Ubuntu image from Singularity&#039;s [https://cloud.sylabs.io/library Container Library] and locally creates a container image file called ubuntu.sif.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;singularity build alpine.sif docker://alpine&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;This pulls the latest alpine image from Dockerhub and locally creates a container image file called alpine.sif.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;singularity build pytorch-21.04-p3.sif docker://nvcr.io#nvidia/pytorch:21.04-py3&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;This pulls the latest pytorch image from NVIDIA&#039;s NGC registry and locally creates a container image file called pytorch-21.04-p3.sif.&lt;br /&gt;
&lt;br /&gt;
=== Running an image ===&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;singularity shell ubuntu.sif&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;Start a shell in the Ubuntu container.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;singularity run alpine.sif&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;Start the container alpine.sif and run the default runscript provided by the image.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;singularity exec alpine.sif /bin/ls&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;Start the container alpine.sif and run the /bin/ls command.&lt;br /&gt;
&lt;br /&gt;
=== Container management ===&lt;br /&gt;
&lt;br /&gt;
You can use the &amp;lt;code&amp;gt;singularity search&amp;lt;/code&amp;gt; command to search for images on Singularity&#039;s [https://cloud.sylabs.io/library Container Library].&lt;/div&gt;</summary>
		<author><name>P Schuhmacher</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster3.0/Running_Jobs/Slurm&amp;diff=15215</id>
		<title>BwUniCluster3.0/Running Jobs/Slurm</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster3.0/Running_Jobs/Slurm&amp;diff=15215"/>
		<updated>2025-08-19T09:30:21Z</updated>

		<summary type="html">&lt;p&gt;P Schuhmacher: /* BeeOND (BeeGFS On-Demand) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| style=&amp;quot;background:#FFCCCC; width:100%; font-size:120%;&amp;quot;&lt;br /&gt;
| &#039;&#039;&#039;This page is work-in-progress&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
We will revise all examples and describe gold standard ways to use the resources efficiently: OpenMP, MPI and hybrid using MPI+OpenMP&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=  Slurm HPC Workload Manager = &lt;br /&gt;
== Specification == &lt;br /&gt;
Slurm is an open source, fault-tolerant, and highly scalable cluster management and job scheduling system for large and small Linux clusters. Slurm requires no kernel modifications for its operation and is relatively self-contained. As a cluster workload manager, Slurm has three key functions. First, it allocates exclusive and/or non-exclusive access to resources (compute nodes) to users for some duration of time so they can perform work. Second, it provides a framework for starting, executing, and monitoring work (normally a parallel job) on the set of allocated nodes. Finally, it arbitrates contention for resources by managing a queue of pending work.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Any kind of calculation on the compute nodes of bwUniCluster 3.0 requires the user to define calculations as a sequence of commands or single command together with required run time, number of CPU cores and main memory and submit all, i.e., the &#039;&#039;&#039;batch job&#039;&#039;&#039;, to a resource and workload managing software. bwUniCluster 3.0 has installed the workload managing software Slurm. Therefore any job submission by the user is to be executed by commands of the Slurm software. Slurm queues and runs user jobs based on fair sharing policies.  &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Slurm Commands (excerpt) ==&lt;br /&gt;
Important Slurm commands for non-administrators working on bwUniCluster 3.0.&lt;br /&gt;
{| width=850px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Slurm commands !! Brief explanation&lt;br /&gt;
|-&lt;br /&gt;
| [[#Job submission : sbatch|sbatch]] || Submits a job and puts it into the queue [[https://slurm.schedmd.com/sbatch.html sbatch]] &lt;br /&gt;
|-&lt;br /&gt;
| [[#Interactive job : salloc|salloc]] || Requests resources for an interactive Job [[https://slurm.schedmd.com/salloc.html salloc]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Detailed job information : scontrol show job|scontrol show job]] || Displays detailed job state information [[https://slurm.schedmd.com/scontrol.html scontrol]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#List of your submitted jo/bs : squeue|squeue]] || Displays information about active, eligible, blocked, and/or recently completed jobs [[https://slurm.schedmd.com/squeue.html squeue]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Start time of job or resources : squeue|squeue --start]] || Returns start time of submitted job [[https://slurm.schedmd.com/squeue.html squeue]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Shows free resources : sinfo_t_idle|sinfo_t_idle]] || Shows what resources are available for immediate use [[https://slurm.schedmd.com/sinfo.html sinfo]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Canceling own jobs : scancel|scancel]] || Cancels a job [[https://slurm.schedmd.com/scancel.html scancel]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* [https://slurm.schedmd.com/tutorials.html  Slurm Tutorials]&lt;br /&gt;
* [https://slurm.schedmd.com/pdfs/summary.pdf  Slurm command/option summary (2 pages)]&lt;br /&gt;
* [https://slurm.schedmd.com/man_index.html  Slurm Commands]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Job submission : sbatch ==&lt;br /&gt;
Batch jobs are submitted by using the command &#039;&#039;&#039;sbatch&#039;&#039;&#039;. The main purpose of the &#039;&#039;&#039;sbatch&#039;&#039;&#039; command is to specify the resources that are needed to run the job. &#039;&#039;&#039;sbatch&#039;&#039;&#039; will then queue the batch job. However, starting of batch job depends on the availability of the requested resources and the fair sharing value.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=== Command parameters sbatch ===&lt;br /&gt;
The syntax and use of &#039;&#039;&#039;sbatch&#039;&#039;&#039; can be displayed via:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ man sbatch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;sbatch&#039;&#039;&#039; options can be used from the command line or in your job script. Different defaults for some of these options are set based on the queue and can be found [https://wiki.bwhpc.de/e/BwUniCluster3.0/Batch_Queues#sbatch_-p_queue here]&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | sbatch Options&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width:8%&amp;quot;| Command line&lt;br /&gt;
! style=&amp;quot;width:9%&amp;quot;| Script&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Purpose&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -t, --time=&#039;&#039;time&#039;&#039;&lt;br /&gt;
| #SBATCH --time=&#039;&#039;time&#039;&#039;&lt;br /&gt;
| Wall clock time limit.&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -N, --nodes=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --nodes=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of nodes to be used.&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -n, --ntasks=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --ntasks=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of tasks to be launched.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --ntasks-per-node=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --ntasks-per-node=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Maximum count of tasks per node.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -c, --cpus-per-task=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --cpus-per-task=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of CPUs required per (MPI-)task.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mem=&#039;&#039;value_in_MB&#039;&#039;&lt;br /&gt;
| #SBATCH --mem=&#039;&#039;value_in_MB&#039;&#039; &lt;br /&gt;
| Memory in MegaByte per node. (You should omit the setting of this option.)&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mem-per-cpu=&#039;&#039;value_in_MB&#039;&#039;&lt;br /&gt;
| #SBATCH --mem-per-cpu=&#039;&#039;value_in_MB&#039;&#039; &lt;br /&gt;
| Minimum Memory required per allocated CPU. (You should omit the setting of this option.)&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mail-type=&#039;&#039;type&#039;&#039;&lt;br /&gt;
| #SBATCH --mail-type=&#039;&#039;type&#039;&#039;&lt;br /&gt;
| Notify user by email when certain event types occur.&amp;lt;br&amp;gt;Valid type values are NONE, BEGIN, END, FAIL, REQUEUE, ALL.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mail-user=&#039;&#039;mail-address&#039;&#039;&lt;br /&gt;
| #SBATCH --mail-user=&#039;&#039;mail-address&#039;&#039;&lt;br /&gt;
|  The specified mail-address receives email notification of state changes as defined by --mail-type.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --output=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --output=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| File in which job output is stored. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --error=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --error=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| File in which job error messages are stored. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -J, --job-name=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --job-name=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| Job name.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --export=[ALL,] &#039;&#039;env-variables&#039;&#039;&lt;br /&gt;
| #SBATCH --export=[ALL,] &#039;&#039;env-variables&#039;&#039;&lt;br /&gt;
| Identifies which environment variables from the submission environment are propagated to the launched application. Default is ALL.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -A, --account=&#039;&#039;group-name&#039;&#039;&lt;br /&gt;
| #SBATCH --account=&#039;&#039;group-name&#039;&#039;&lt;br /&gt;
| Change resources used by this job to specified group. You may need this option if your account is assigned to more than one group. By command &amp;quot;scontrol show job&amp;quot; the project group the job is accounted on can be seen behind &amp;quot;Account=&amp;quot;. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -p, --partition=&#039;&#039;queue-name&#039;&#039;&lt;br /&gt;
| #SBATCH --partition=&#039;&#039;queue-name&#039;&#039;&lt;br /&gt;
| Request a specific queue for the resource allocation.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --reservation=&#039;&#039;reservation-name&#039;&#039;&lt;br /&gt;
| #SBATCH --reservation=&#039;&#039;reservation-name&#039;&#039;&lt;br /&gt;
| Use a specific reservation for the resource allocation.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -C, --constraint=&#039;&#039;LSDF&#039;&#039;&lt;br /&gt;
| #SBATCH --constraint=LSDF&lt;br /&gt;
| Job constraint LSDF filesystems.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -C, --constraint=&#039;&#039;BEEOND (BEEOND_4MDS, BEEOND_MAXMDS)&#039;&#039;&lt;br /&gt;
| #SBATCH --constraint=BEEOND (BEEOND_4MDS, BEEOND_MAXMDS)&lt;br /&gt;
| Job constraint BeeOND filesystem.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Interactive job : salloc ==&lt;br /&gt;
&lt;br /&gt;
If you want to run an interactive job, you can do so via the command salloc on a login node.&amp;lt;br&amp;gt;Considering a serial application running on a compute node that requires 5000 MByte of memory and limiting the interactive run to 2 hours the following command has to be executed:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ salloc --partition=cpu --ntasks=1 --time=120 --mem=5000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then you will get one core on a compute node within the partition &amp;quot;cpu&amp;quot;. After execution of this command &#039;&#039;&#039;DO NOT CLOSE&#039;&#039;&#039; your current terminal session but wait until the queueing system Slurm has granted you the requested resources on the compute node. You will be logged in automatically on the granted core! To run a serial program on the granted core you only have to type the name of the executable.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./&amp;lt;my_serial_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please be aware that your serial job must run less than 2 hours in this example, else the job will be killed during runtime by the system. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can also start now a graphical X11-terminal connecting you to the dedicated resource that is available for 2 hours. You can start it by the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ xterm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that, once the walltime limit has been reached the resources - i.e. the compute node - will automatically be revoked.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
An interactive parallel application running on one compute node or on many compute nodes (e.g. here 5 nodes) with 40 cores each requires usually an amount of memory in GByte (e.g. 50 GByte) and a maximum time (e.g. 1 hour). E.g. 5 nodes can be allocated by the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ salloc --partition=cpu --nodes=5 --ntasks-per-node=40 --time=01:00:00  --mem=50gb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you can run parallel jobs on 200 cores requiring 50 GByte of memory per node. Please be aware that you will be logged in on core 0 of the first node.&lt;br /&gt;
If you want to have access to another node you have to open a new terminal, connect it also to BwUniCluster 2.0 and type the following commands to&lt;br /&gt;
connect to the running interactive job and then to a specific node:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ srun --jobid=XXXXXXXX --pty /bin/bash&lt;br /&gt;
$ srun --nodelist=uc3nXXX --pty /bin/bash&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ squeue&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the jobid and the nodelist can be shown.&lt;br /&gt;
&lt;br /&gt;
If you want to run MPI-programs, you can do it by simply typing mpirun &amp;lt;program_name&amp;gt;. Then your program will be run on 200 cores. A very simple example for starting a parallel job can be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mpirun &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also start the debugger ddt by the commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module add devel/ddt&lt;br /&gt;
$ ddt &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above commands will execute the parallel program &amp;lt;my_mpi_program&amp;gt; on all available cores. You can also start parallel programs on a subset of cores; an example for this can be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mpirun -n 50 &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are using Intel MPI you must start &amp;lt;my_mpi_program&amp;gt; by the command mpiexec.hydra (instead of mpirun).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;top&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
=  Slurm HPC Workload Manager = &lt;br /&gt;
== Specification == &lt;br /&gt;
Slurm is an open source, fault-tolerant, and highly scalable cluster management and job scheduling system for large and small Linux clusters. Slurm requires no kernel modifications for its operation and is relatively self-contained. As a cluster workload manager, Slurm has three key functions. First, it allocates exclusive and/or non-exclusive access to resources (compute nodes) to users for some duration of time so they can perform work. Second, it provides a framework for starting, executing, and monitoring work (normally a parallel job) on the set of allocated nodes. Finally, it arbitrates contention for resources by managing a queue of pending work.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Any kind of calculation on the compute nodes of [[bwUniCluster3.0|bwUniCluster 3.0]] requires the user to define calculations as a sequence of commands or single command together with required run time, number of CPU cores and main memory and submit all, i.e., the &#039;&#039;&#039;batch job&#039;&#039;&#039;, to a resource and workload managing software. bwUniCluster 3.0 has installed the workload managing software Slurm. Therefore any job submission by the user is to be executed by commands of the Slurm software. Slurm queues and runs user jobs based on fair sharing policies.  &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Slurm Commands (excerpt) ==&lt;br /&gt;
Some of the most used Slurm commands for non-administrators working on bwUniCluster 2.0.&lt;br /&gt;
{| width=750px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Slurm commands !! Brief explanation&lt;br /&gt;
|-&lt;br /&gt;
| [[#Job Submission : sbatch|sbatch]] || Submits a job and queues it in an input queue [[https://slurm.schedmd.com/sbatch.html sbatch]] &lt;br /&gt;
|-&lt;br /&gt;
| [[#Detailed job information : scontrol show job|scontrol show job]] || Displays detailed job state information [[https://slurm.schedmd.com/scontrol.html scontrol]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#List of your submitted jo/bs : squeue|squeue]] || Displays information about active, eligible, blocked, and/or recently completed jobs [[https://slurm.schedmd.com/squeue.html squeue]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Start time of job or resources : squeue|squeue --start]] || Returns start time of submitted job or requested resources [[https://slurm.schedmd.com/squeue.html squeue]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Shows free resources : sinfo_t_idle|sinfo_t_idle]] || Shows what resources are available for immediate use [[https://slurm.schedmd.com/sinfo.html sinfo]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Canceling own jobs : scancel|scancel]] || Cancels a job (obsoleted!) [[https://slurm.schedmd.com/scancel.html scancel]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* [https://slurm.schedmd.com/tutorials.html  Slurm Tutorials]&lt;br /&gt;
* [https://slurm.schedmd.com/pdfs/summary.pdf  Slurm command/option summary (2 pages)]&lt;br /&gt;
* [https://slurm.schedmd.com/man_index.html  Slurm Commands]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Job Submission : sbatch ==&lt;br /&gt;
Batch jobs are submitted by using the command &#039;&#039;&#039;sbatch&#039;&#039;&#039;. The main purpose of the &#039;&#039;&#039;sbatch&#039;&#039;&#039; command is to specify the resources that are needed to run the job. &#039;&#039;&#039;sbatch&#039;&#039;&#039; will then queue the batch job. However, starting of batch job depends on the availability of the requested resources and the fair sharing value.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=== sbatch Command Parameters ===&lt;br /&gt;
The syntax and use of &#039;&#039;&#039;sbatch&#039;&#039;&#039; can be displayed via:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ man sbatch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;sbatch&#039;&#039;&#039; options can be used from the command line or in your job script.&lt;br /&gt;
{| width=750px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | sbatch Options&lt;br /&gt;
|-&lt;br /&gt;
! Command line&lt;br /&gt;
! Script&lt;br /&gt;
! Purpose&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -t &#039;&#039;time&#039;&#039;  or  --time=&#039;&#039;time&#039;&#039;&lt;br /&gt;
| #SBATCH --time=&#039;&#039;time&#039;&#039;&lt;br /&gt;
| Wall clock time limit.&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -N &#039;&#039;count&#039;&#039;  or  --nodes=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --nodes=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of nodes to be used.&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -n &#039;&#039;count&#039;&#039;  or  --ntasks=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --ntasks=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of tasks to be launched.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --ntasks-per-node=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --ntasks-per-node=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Maximum count (&amp;lt;= 28 and &amp;lt;= 40 resp.) of tasks per node.&amp;lt;br&amp;gt;(Replaces the option ppn of MOAB.)&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -c &#039;&#039;count&#039;&#039; or --cpus-per-task=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --cpus-per-task=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of CPUs required per (MPI-)task.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mem=&#039;&#039;value_in_MB&#039;&#039;&lt;br /&gt;
| #SBATCH --mem=&#039;&#039;value_in_MB&#039;&#039; &lt;br /&gt;
| Memory in MegaByte per node.&amp;lt;br&amp;gt;(Default value is 128000 and 96000 MB resp., i.e. you should omit &amp;lt;br&amp;gt; the setting of this option.)&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mem-per-cpu=&#039;&#039;value_in_MB&#039;&#039;&lt;br /&gt;
| #SBATCH --mem-per-cpu=&#039;&#039;value_in_MB&#039;&#039; &lt;br /&gt;
| Minimum Memory required per allocated CPU.&amp;lt;br&amp;gt;(Replaces the option pmem of MOAB. You should omit &amp;lt;br&amp;gt; the setting of this option.)&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mail-type=&#039;&#039;type&#039;&#039;&lt;br /&gt;
| #SBATCH --mail-type=&#039;&#039;type&#039;&#039;&lt;br /&gt;
| Notify user by email when certain event types occur.&amp;lt;br&amp;gt;Valid type values are NONE, BEGIN, END, FAIL, REQUEUE, ALL.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mail-user=&#039;&#039;mail-address&#039;&#039;&lt;br /&gt;
| #SBATCH --mail-user=&#039;&#039;mail-address&#039;&#039;&lt;br /&gt;
|  The specified mail-address receives email notification of state&amp;lt;br&amp;gt;changes as defined by --mail-type.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --output=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --output=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| File in which job output is stored. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --error=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --error=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| File in which job error messages are stored. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -J &#039;&#039;name&#039;&#039; or --job-name=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --job-name=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| Job name.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --export=[ALL,] &#039;&#039;env-variables&#039;&#039;&lt;br /&gt;
| #SBATCH --export=[ALL,] &#039;&#039;env-variables&#039;&#039;&lt;br /&gt;
| Identifies which environment variables from the submission &amp;lt;br&amp;gt; environment are propagated to the launched application. Default &amp;lt;br&amp;gt; is ALL. If adding an environment variable to the submission&amp;lt;br&amp;gt; environment is intended, the argument ALL must be added.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -A &#039;&#039;group-name&#039;&#039; or --account=&#039;&#039;group-name&#039;&#039;&lt;br /&gt;
| #SBATCH --account=&#039;&#039;group-name&#039;&#039;&lt;br /&gt;
| Change resources used by this job to specified group. You may &amp;lt;br&amp;gt; need this option if your account is assigned to more &amp;lt;br&amp;gt; than one group. By command &amp;quot;scontrol show job&amp;quot; the project &amp;lt;br&amp;gt; group the job is accounted on can be seen behind &amp;quot;Account=&amp;quot;. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -p &#039;&#039;queue-name&#039;&#039; or --partition=&#039;&#039;queue-name&#039;&#039;&lt;br /&gt;
| #SBATCH --partition=&#039;&#039;queue-name&#039;&#039;&lt;br /&gt;
| Request a specific queue for the resource allocation.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --reservation=&#039;&#039;reservation-name&#039;&#039;&lt;br /&gt;
| #SBATCH --reservation=&#039;&#039;reservation-name&#039;&#039;&lt;br /&gt;
| Use a specific reservation for the resource allocation.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -C &#039;&#039;LSDF&#039;&#039; or --constraint=&#039;&#039;LSDF&#039;&#039;&lt;br /&gt;
| #SBATCH --constraint=LSDF&lt;br /&gt;
| Job constraint LSDF Filesystems.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -C &#039;&#039;BEEOND (BEEOND_4MDS, BEEOND_MAXMDS)&#039;&#039; or --constraint=&#039;&#039;BEEOND (BEEOND_4MDS, BEEOND_MAXMDS&#039;&#039;&lt;br /&gt;
| #SBATCH --constraint=BEEOND (BEEOND_4MDS, BEEOND_MAXMDS)&lt;br /&gt;
| Job constraint BeeOND file system.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== sbatch --partition  &#039;&#039;queues&#039;&#039; ====&lt;br /&gt;
Queue classes define maximum resources such as walltime, nodes and processes per node and queue of the compute system. Details can be found here:&lt;br /&gt;
* [[BwUniCluster3.0/Batch_Queues|bwUniCluster 3.0 queue settings]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== sbatch Examples ===&lt;br /&gt;
==== Serial Programs ====&lt;br /&gt;
To submit a serial job that runs the script &#039;&#039;&#039;job.sh&#039;&#039;&#039; and that requires 5000 MB of main memory and 10 minutes of wall clock time&lt;br /&gt;
&lt;br /&gt;
a) execute:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sbatch -p dev_cpu -n 1 -t 10:00 --mem=5000  job.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
or&lt;br /&gt;
b) add after the initial line of your script &#039;&#039;&#039;job.sh&#039;&#039;&#039; the lines (here with a high memory request):&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#SBATCH --ntasks=1&lt;br /&gt;
#SBATCH --time=10&lt;br /&gt;
#SBATCH --mem=180gb&lt;br /&gt;
#SBATCH --job-name=simple&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
and execute the modified script with the command line option &#039;&#039;--partition=highmem&#039;&#039;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sbatch --partition=highmem job.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note, that sbatch command line options overrule script options.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Multithreaded Programs ====&lt;br /&gt;
Multithreaded programs operate faster than serial programs on CPUs with multiple cores.&amp;lt;br&amp;gt;&lt;br /&gt;
Moreover, multiple threads of one process share resources such as memory.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
For multithreaded programs based on &#039;&#039;&#039;Open&#039;&#039;&#039; &#039;&#039;&#039;M&#039;&#039;&#039;ulti-&#039;&#039;&#039;P&#039;&#039;&#039;rocessing (OpenMP) a number of threads is defined by the environment variable OMP_NUM_THREADS. By default this variable is set to 1 (OMP_NUM_THREADS=1).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Hyperthreading is switched on on bwUniCluster 3.0, the option --threads-per-core must be set to 1, if you do not want to use it.&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
To submit a batch job called &#039;&#039;OpenMP_Test&#039;&#039; that runs a 96-fold threaded program &#039;&#039;omp_exe&#039;&#039; which requires 6000 MByte of total physical memory and total wall clock time of 40 minutes:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
a) execute:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sbatch -p cpu --export=ALL,OMP_NUM_THREADS=96 -J OpenMP_Test -N 1 -c 96 --threads-per-core=1 -t 40 --mem=6000 ./omp_exe&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
or&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
* generate the script &#039;&#039;&#039;job_omp.sh&#039;&#039;&#039; containing the following lines:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
#SBATCH --nodes=1&lt;br /&gt;
#SBATCH --cpus-per-task=96&lt;br /&gt;
#SBATCH --time=40:00&lt;br /&gt;
#SBATCH --threads-per-core=1&lt;br /&gt;
#SBATCH --mem=6000mb   &lt;br /&gt;
#SBATCH --export=ALL,EXECUTABLE=./omp_exe&lt;br /&gt;
#SBATCH -J OpenMP_Test&lt;br /&gt;
&lt;br /&gt;
#Usually you should set&lt;br /&gt;
export KMP_AFFINITY=compact,1,0&lt;br /&gt;
#export KMP_AFFINITY=verbose,compact,1,0 prints messages concerning the supported affinity&lt;br /&gt;
#KMP_AFFINITY Description: https://software.intel.com/en-us/node/524790#KMP_AFFINITY_ENVIRONMENT_VARIABLE&lt;br /&gt;
&lt;br /&gt;
export OMP_NUM_THREADS=${SLURM_JOB_CPUS_PER_NODE}&lt;br /&gt;
echo &amp;quot;Executable ${EXECUTABLE} running on ${SLURM_JOB_CPUS_PER_NODE} cores with ${OMP_NUM_THREADS} threads&amp;quot;&lt;br /&gt;
startexe=${EXECUTABLE}&lt;br /&gt;
echo $startexe&lt;br /&gt;
exec $startexe&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Using Intel compiler the environment variable KMP_AFFINITY switches on binding of threads to specific cores and, if necessary, replace &amp;lt;placeholder&amp;gt; with the required modulefile to enable the OpenMP environment and execute the script &#039;&#039;&#039;job_omp.sh&#039;&#039;&#039; adding the queue class &#039;&#039;cpu&#039;&#039; as sbatch option:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sbatch -p cpu job_omp.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note, that sbatch command line options overrule script options, e.g.,&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sbatch --partition=cpu --mem=200 job_omp.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
overwrites the script setting of 6000 MByte with 200 MByte.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== MPI Parallel Programs ====&lt;br /&gt;
MPI parallel programs run faster than serial programs on multi CPU and multi core systems. N-fold spawned processes of the MPI program, i.e., &#039;&#039;&#039;MPI tasks&#039;&#039;&#039;,  run simultaneously and communicate via the Message Passing Interface (MPI) paradigm. MPI tasks do not share memory but can be spawned over different nodes.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Multiple MPI tasks must be launched via &#039;&#039;&#039;mpirun&#039;&#039;&#039;, e.g. 4 MPI tasks of &#039;&#039;my_par_program&#039;&#039;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mpirun -n 4 my_par_program&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This command runs 4 MPI tasks of &#039;&#039;my_par_program&#039;&#039; on the node you are logged in.&lt;br /&gt;
To run this command with a loaded Intel MPI the environment variable I_MPI_HYDRA_BOOTSTRAP must be unset ( --&amp;gt; $ unset I_MPI_HYDRA_BOOTSTRAP).&lt;br /&gt;
&lt;br /&gt;
Running MPI parallel programs in a batch job the interactive environment - particularly the loaded modules - will also be set in the batch job. If you want to set a defined module environment in your batch job you have to purge all modules before setting the wished modules. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
===== OpenMPI =====&lt;br /&gt;
&lt;br /&gt;
If you want to run jobs on batch nodes, generate a wrapper script &#039;&#039;job_ompi.sh&#039;&#039; for &#039;&#039;&#039;OpenMPI&#039;&#039;&#039; containing the following lines:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
# Use when using the module environment for OpenMPI&lt;br /&gt;
module load compiler/&amp;lt;placeholder_for_compiler&amp;gt;/&amp;lt;placeholder_for_compiler_version&amp;gt;&lt;br /&gt;
module load mpi/openmpi/&amp;lt;placeholder_for_mpi_version&amp;gt;&lt;br /&gt;
mpirun --bind-to core --map-by core -report-bindings my_par_program&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Attention:&#039;&#039;&#039; Do &#039;&#039;&#039;NOT&#039;&#039;&#039; add mpirun options &#039;&#039;-n &amp;lt;number_of_processes&amp;gt;&#039;&#039; or any other option defining processes or nodes, since Slurm instructs mpirun about number of processes and node hostnames. Use &#039;&#039;&#039;ALWAYS&#039;&#039;&#039; the MPI options &#039;&#039;&#039;&#039;&#039;--bind-to core&#039;&#039;&#039;&#039;&#039; and &#039;&#039;&#039;&#039;&#039;--map-by core|socket|node&#039;&#039;&#039;&#039;&#039;. Please type &#039;&#039;mpirun --help&#039;&#039; for an explanation of the meaning of the different options of mpirun option &#039;&#039;--map-by&#039;&#039;.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Considering 4 OpenMPI tasks on a single node, each requiring 2000 MByte, and running for 1 hour, execute:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sbatch -p cpu -N 1 -n 4 --mem-per-cpu=2000 --time=01:00:00 ./job_ompi.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Intel MPI =====&lt;br /&gt;
&lt;br /&gt;
Generate a wrapper script for &#039;&#039;&#039;Intel MPI&#039;&#039;&#039;, &#039;&#039;job_impi.sh&#039;&#039; containing the following lines:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
# Use when a defined module environment related to Intel MPI is wished&lt;br /&gt;
module load compiler/&amp;lt;placeholder_for_compiler&amp;gt;/&amp;lt;placeholder_for_compiler_version&amp;gt;&lt;br /&gt;
module load mpi/impi/&amp;lt;placeholder_for_version&amp;gt;   &lt;br /&gt;
mpiexec.hydra -bootstrap slurm my_par_program&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;font color=red&amp;gt;&#039;&#039;&#039;Attention:&#039;&#039;&#039;&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Do &#039;&#039;&#039;NOT&#039;&#039;&#039; add mpirun options &#039;&#039;-n &amp;lt;number_of_processes&amp;gt;&#039;&#039; or any other option defining processes or nodes, since Slurm instructs mpirun about number of processes and node hostnames.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Launching and running 200 Intel MPI tasks on 5 nodes, each requiring 80 GByte, and running for 5 hours, execute:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sbatch --partition=cpu -N 5 --ntasks-per-node=40 --mem=80gb -t 300 ./job_impi.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
If you want to use 128 or more nodes, you must also set the environment variable as follows:           &amp;lt;BR&amp;gt;&lt;br /&gt;
export I_MPI_HYDRA_BRANCH_COUNT=-1&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
If you want to use the options perhost, ppn or rr, you must additionally set the environment variable I_MPI_JOB_RESPECT_PROCESS_PLACEMENT=off.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Multithreaded + MPI parallel Programs ====&lt;br /&gt;
Multithreaded + MPI parallel programs operate faster than serial programs on multi CPUs with multiple cores. All threads of one process share resources such as memory. On the contrary MPI tasks do not share memory but can be spawned over different nodes. &#039;&#039;&#039;Hyperthreading is switched on on bwUniCluster 3.0, the option --threads-per-core must be set to 1, if you do not want to use it.&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
===== OpenMPI with Multithreading =====&lt;br /&gt;
Multiple MPI tasks using &#039;&#039;&#039;OpenMPI&#039;&#039;&#039; must be launched by the MPI parallel program &#039;&#039;&#039;mpirun&#039;&#039;&#039;. For multithreaded programs based on &#039;&#039;&#039;Open&#039;&#039;&#039; &#039;&#039;&#039;M&#039;&#039;&#039;ulti-&#039;&#039;&#039;P&#039;&#039;&#039;rocessing (OpenMP) number of threads are defined by the environment variable OMP_NUM_THREADS. By default this variable is set to 1 (OMP_NUM_THREADS=1).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;For OpenMPI&#039;&#039;&#039; a job-script to submit a batch job called &#039;&#039;job_ompi_omp.sh&#039;&#039; that runs a MPI program with 4 tasks and a 28-fold threaded program &#039;&#039;ompi_omp_program&#039;&#039; requiring 3000 MByte of physical memory per thread (using 28 threads per MPI task you will get 28*3000 MByte = 84000 MByte per MPI task) and total wall clock time of 3 hours looks like:&lt;br /&gt;
&amp;lt;!--b)--&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
#SBATCH --ntasks=4&lt;br /&gt;
#SBATCH --cpus-per-task=28&lt;br /&gt;
#SBATCH --threads-per-core=1&lt;br /&gt;
#SBATCH --time=03:00:00&lt;br /&gt;
#SBATCH --mem=83gb    # 84000 MB = 84000/1024 GB = 82.1 GB&lt;br /&gt;
#SBATCH --export=ALL,MPI_MODULE=mpi/openmpi/3.1,EXECUTABLE=./ompi_omp_program&lt;br /&gt;
#SBATCH --output=&amp;quot;parprog_hybrid_%j.out&amp;quot;  &lt;br /&gt;
&lt;br /&gt;
# Use when a defined module environment related to OpenMPI is wished&lt;br /&gt;
module load ${MPI_MODULE}&lt;br /&gt;
export OMP_NUM_THREADS=${SLURM_CPUS_PER_TASK}&lt;br /&gt;
export MPIRUN_OPTIONS=&amp;quot;--bind-to core --map-by socket:PE=${OMP_NUM_THREADS} -report-bindings&amp;quot;&lt;br /&gt;
export NUM_CORES=${SLURM_NTASKS}*${OMP_NUM_THREADS}&lt;br /&gt;
echo &amp;quot;${EXECUTABLE} running on ${NUM_CORES} cores with ${SLURM_NTASKS} MPI-tasks and ${OMP_NUM_THREADS} threads&amp;quot;&lt;br /&gt;
startexe=&amp;quot;mpirun -n ${SLURM_NTASKS} ${MPIRUN_OPTIONS} ${EXECUTABLE}&amp;quot;&lt;br /&gt;
echo $startexe&lt;br /&gt;
exec $startexe&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Execute the script &#039;&#039;&#039;job_ompi_omp.sh&#039;&#039;&#039; by command sbatch:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sbatch -p cpu ./job_ompi_omp.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* With the mpirun option &#039;&#039;--bind-to core&#039;&#039; MPI tasks and OpenMP threads are bound to physical cores.&lt;br /&gt;
* With the option &#039;&#039;--map-by node:PE=&amp;lt;value&amp;gt;&#039;&#039; (neighbored) MPI tasks will be attached to different nodes and each MPI task is bound to the first core of a node. &amp;lt;value&amp;gt; must be set to ${OMP_NUM_THREADS}.&lt;br /&gt;
* The option &#039;&#039;-report-bindings&#039;&#039; shows the bindings between MPI tasks and physical cores.&lt;br /&gt;
* The mpirun-options &#039;&#039;&#039;--bind-to core&#039;&#039;&#039;, &#039;&#039;&#039;--map-by socket|...|node:PE=&amp;lt;value&amp;gt;&#039;&#039;&#039; should always be used when running a multithreaded MPI program.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Intel MPI with Multithreading =====&lt;br /&gt;
Multithreaded + MPI parallel programs operate faster than serial programs on multi CPUs with multiple cores. All threads of one process share resources such as memory. On the contrary MPI tasks do not share memory but can be spawned over different nodes.  &lt;br /&gt;
&lt;br /&gt;
Multiple Intel MPI tasks must be launched by the MPI parallel program &#039;&#039;&#039;mpiexec.hydra&#039;&#039;&#039;. For multithreaded programs based on &#039;&#039;&#039;Open&#039;&#039;&#039; &#039;&#039;&#039;M&#039;&#039;&#039;ulti-&#039;&#039;&#039;P&#039;&#039;&#039;rocessing (OpenMP) number of threads are defined by the environment variable OMP_NUM_THREADS. By default this variable is set to 1 (OMP_NUM_THREADS=1).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;For Intel MPI&#039;&#039;&#039; a job-script to submit a batch job called &#039;&#039;job_impi_omp.sh&#039;&#039; that runs a Intel MPI program with 10 tasks and a 96-fold threaded program &#039;&#039;impi_omp_program&#039;&#039; requiring 96000 MByte of total physical memory per task and total wall clock time of 1 hours looks like: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--b)--&amp;gt; &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
#SBATCH --ntasks=10&lt;br /&gt;
#SBATCH --cpus-per-task=96&lt;br /&gt;
#SBATCH --threads-per-core=1&lt;br /&gt;
#SBATCH --time=60&lt;br /&gt;
#SBATCH --mem=96000&lt;br /&gt;
#SBATCH --export=ALL,MPI_MODULE=mpi/impi,EXE=./impi_omp_program&lt;br /&gt;
#SBATCH --output=&amp;quot;parprog_impi_omp_%j.out&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#If using more than one MPI task per node please set&lt;br /&gt;
export KMP_AFFINITY=compact,1,0&lt;br /&gt;
#export KMP_AFFINITY=verbose,scatter  prints messages concerning the supported affinity &lt;br /&gt;
#KMP_AFFINITY Description: https://software.intel.com/en-us/node/524790#KMP_AFFINITY_ENVIRONMENT_VARIABLE&lt;br /&gt;
&lt;br /&gt;
# Use when a defined module environment related to Intel MPI is wished &lt;br /&gt;
module load ${MPI_MODULE}&lt;br /&gt;
export OMP_NUM_THREADS=${SLURM_CPUS_PER_TASK}&lt;br /&gt;
export MPIRUN_OPTIONS=&amp;quot;-binding &amp;quot;domain=omp:compact&amp;quot; -print-rank-map -envall&amp;quot;&lt;br /&gt;
export NUM_PROCS=eval(${SLURM_NTASKS}*${OMP_NUM_THREADS})&lt;br /&gt;
echo &amp;quot;${EXE} running on ${NUM_PROCS} cores with ${SLURM_NTASKS} MPI-tasks and ${OMP_NUM_THREADS} threads&amp;quot;&lt;br /&gt;
startexe=&amp;quot;mpiexec.hydra -bootstrap slurm ${MPIRUN_OPTIONS} -n ${SLURM_NTASKS} ${EXE}&amp;quot;&lt;br /&gt;
echo $startexe&lt;br /&gt;
exec $startexe&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Using Intel compiler the environment variable KMP_AFFINITY switches on binding of threads to specific cores. If you only run one MPI task per node please set KMP_AFFINITY=compact,1,0.&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
If you want to use 128 or more nodes, you must also set the environment variable as follows:           &amp;lt;BR&amp;gt;&lt;br /&gt;
export I_MPI_HYDRA_BRANCH_COUNT=-1&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
If you want to use the options perhost, ppn or rr, you must additionally set the environment variable I_MPI_JOB_RESPECT_PROCESS_PLACEMENT=off. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Execute the script &#039;&#039;&#039;job_impi_omp.sh&#039;&#039;&#039; by command sbatch:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sbatch -p cpu ./job_impi_omp.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The mpirun option &#039;&#039;-print-rank-map&#039;&#039; shows the bindings between MPI tasks and nodes (not very beneficial). The option &#039;&#039;-binding&#039;&#039; binds MPI tasks (processes) to a particular processor; &#039;&#039;domain=omp&#039;&#039; means that the domain size is determined by the number of threads. If you would choose 2 MPI tasks per node, you should choose &#039;&#039;-binding &amp;quot;cell=unit;map=bunch&amp;quot;&#039;&#039;; this binding maps one MPI process to each socket. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Chain jobs ====&lt;br /&gt;
The CPU time requirements of many applications exceed the limits of the job classes. In those situations it is recommended to solve the problem by a job chain. A job chain is a sequence of jobs where each job automatically starts its successor. &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
####################################&lt;br /&gt;
## simple Slurm submitter script to setup   ## &lt;br /&gt;
## a chain of jobs using Slurm                    ##&lt;br /&gt;
####################################&lt;br /&gt;
## ver.  : 2018-11-27, KIT, SCC&lt;br /&gt;
&lt;br /&gt;
## Define maximum number of jobs via positional parameter 1, default is 5&lt;br /&gt;
max_nojob=${1:-5}&lt;br /&gt;
&lt;br /&gt;
## Define your jobscript (e.g. &amp;quot;~/chain_job.sh&amp;quot;)&lt;br /&gt;
chain_link_job=${PWD}/chain_job.sh&lt;br /&gt;
&lt;br /&gt;
## Define type of dependency via positional parameter 2, default is &#039;afterok&#039;&lt;br /&gt;
dep_type=&amp;quot;${2:-afterok}&amp;quot;&lt;br /&gt;
## -&amp;gt; List of all dependencies:&lt;br /&gt;
## https://slurm.schedmd.com/sbatch.html&lt;br /&gt;
&lt;br /&gt;
myloop_counter=1&lt;br /&gt;
## Submit loop&lt;br /&gt;
while [ ${myloop_counter} -le ${max_nojob} ] ; do&lt;br /&gt;
   ##&lt;br /&gt;
   ## Differ slurm_opt depending on chain link number&lt;br /&gt;
   if [ ${myloop_counter} -eq 1 ] ; then&lt;br /&gt;
      slurm_opt=&amp;quot;&amp;quot;&lt;br /&gt;
   else&lt;br /&gt;
      slurm_opt=&amp;quot;-d ${dep_type}:${jobID}&amp;quot;&lt;br /&gt;
   fi&lt;br /&gt;
   ##&lt;br /&gt;
   ## Print current iteration number and sbatch command&lt;br /&gt;
   echo &amp;quot;Chain job iteration = ${myloop_counter}&amp;quot;&lt;br /&gt;
   echo &amp;quot;   sbatch --export=myloop_counter=${myloop_counter} ${slurm_opt} ${chain_link_job}&amp;quot;&lt;br /&gt;
   ## Store job ID for next iteration by storing output of sbatch command with empty lines&lt;br /&gt;
   jobID=$(sbatch -p &amp;lt;queue&amp;gt; --export=ALL,myloop_counter=${myloop_counter} ${slurm_opt} ${chain_link_job} 2&amp;gt;&amp;amp;1 | sed &#039;s/[S,a-z]* //g&#039;)&lt;br /&gt;
   ##   &lt;br /&gt;
   ## Check if ERROR occured&lt;br /&gt;
   if [[ &amp;quot;${jobID}&amp;quot; =~ &amp;quot;ERROR&amp;quot; ]] ; then&lt;br /&gt;
      echo &amp;quot;   -&amp;gt; submission failed!&amp;quot; ; exit 1&lt;br /&gt;
   else&lt;br /&gt;
      echo &amp;quot;   -&amp;gt; job number = ${jobID}&amp;quot;&lt;br /&gt;
   fi&lt;br /&gt;
   ##&lt;br /&gt;
   ## Increase counter&lt;br /&gt;
   let myloop_counter+=1&lt;br /&gt;
done&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== GPU jobs ====&lt;br /&gt;
&lt;br /&gt;
The nodes in the gpu_h100, gpu_mi300, gpu_a100_il and gpu_h100_il  queues have 4 NVIDIA Ampere A100 GPUs or 4 NVIDIA Hopper H100 GPUs. Just submitting a job to these queues is not enough to also allocate one or more GPUs, you have to do so using the &amp;quot;--gres=gpu&amp;quot; parameter. You have to specifiy how many GPUs your job needs, e.g. &amp;quot;--gres=gpu:2&amp;quot; will request two GPUs.&lt;br /&gt;
&lt;br /&gt;
The GPU nodes are shared between multiple jobs if the jobs don&#039;t request all the GPUs in a node and there are enough resources to run more than one job. The individual GPUs are always bound to a single job and will not be shared between different jobs.&lt;br /&gt;
&lt;br /&gt;
a) add after the initial line of your script job.sh the line including the&lt;br /&gt;
information about the GPU usage:&amp;lt;br&amp;gt;   #SBATCH --gres=gpu:2&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
#SBATCH --ntasks=40&lt;br /&gt;
#SBATCH --time=02:00:00&lt;br /&gt;
#SBATCH --mem=4000&lt;br /&gt;
#SBATCH --gres=gpu:2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or b) execute:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sbatch -p &amp;lt;queue&amp;gt; -n 40 -t 02:00:00 --mem 4000 --gres=gpu:2 job.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
If you start an interactive session on of the GPU nodes, you can use the &amp;quot;nvidia-smi&amp;quot; command to list the GPUs allocated to your job:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ nvidia-smi&lt;br /&gt;
Fri Apr  4 09:51:29 2025       &lt;br /&gt;
+-----------------------------------------------------------------------------------------+&lt;br /&gt;
| NVIDIA-SMI 570.86.15              Driver Version: 570.86.15      CUDA Version: 12.8     |&lt;br /&gt;
|-----------------------------------------+------------------------+----------------------+&lt;br /&gt;
| GPU  Name                 Persistence-M | Bus-Id          Disp.A | Volatile Uncorr. ECC |&lt;br /&gt;
| Fan  Temp   Perf          Pwr:Usage/Cap |           Memory-Usage | GPU-Util  Compute M. |&lt;br /&gt;
|                                         |                        |               MIG M. |&lt;br /&gt;
|=========================================+========================+======================|&lt;br /&gt;
|   0  NVIDIA H100                    On  |   00000000:06:00.0 Off |                    0 |&lt;br /&gt;
| N/A   45C    P0             70W /  415W |      27MiB /  95830MiB |      0%      Default |&lt;br /&gt;
|                                         |                        |             Disabled |&lt;br /&gt;
+-----------------------------------------+------------------------+----------------------+&lt;br /&gt;
|   1  NVIDIA H100                    On  |   00000000:26:00.0 Off |                    0 |&lt;br /&gt;
| N/A   45C    P0             69W /  415W |      27MiB /  95830MiB |      0%      Default |&lt;br /&gt;
|                                         |                        |             Disabled |&lt;br /&gt;
+-----------------------------------------+------------------------+----------------------+&lt;br /&gt;
                                                                                         &lt;br /&gt;
+-----------------------------------------------------------------------------------------+&lt;br /&gt;
| Processes:                                                                              |&lt;br /&gt;
|  GPU   GI   CI              PID   Type   Process name                        GPU Memory |&lt;br /&gt;
|        ID   ID                                                               Usage      |&lt;br /&gt;
|=========================================================================================|&lt;br /&gt;
|    0   N/A  N/A            3569      G   /usr/libexec/Xorg                        17MiB |&lt;br /&gt;
|    1   N/A  N/A            3569      G   /usr/libexec/Xorg                        17MiB |&lt;br /&gt;
+-----------------------------------------------------------------------------------------+&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
In case of using Open MPI, the underlying communication infrastructure (UCX and Open MPI&#039;s BTL) is CUDA-aware.&lt;br /&gt;
Please run Open MPI&#039;s mpirun using the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mpirun --mca pml ucx --mca btl_openib_warn_default_gid_prefix 0 -np 2 ./mpi_cuda_app&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
or disabling the (older) communication layer Bit-Transfer-Layer (short BTL) alltogether:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mpirun --mca pml ucx --mca btl ^openib -np 2 ./mpi_cuda_app&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== LSDF Online Storage ====&lt;br /&gt;
On bwUniCluster 3.0 you can use for special cases the LSDF Online Storage on the HPC cluster nodes. Please request for this service separately ([https://www.lsdf.kit.edu/os/storagerequest/: LSDF Storage Request]).&lt;br /&gt;
To mount the LSDF Online Storage on the compute nodes during the job runtime the&lt;br /&gt;
the constraint flag &amp;quot;LSDF&amp;quot; has to be set.  &lt;br /&gt;
&lt;br /&gt;
a) add after the initial line of your script job.sh the line including the&lt;br /&gt;
information about the LSDF Online Storage usage:&amp;lt;br&amp;gt;   #SBATCH --constraint=LSDF&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
#SBATCH --ntasks=1&lt;br /&gt;
#SBATCH --time=120&lt;br /&gt;
#SBATCH --mem=200&lt;br /&gt;
#SBATCH --constraint=LSDF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or b) execute:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sbatch -p &amp;lt;queue&amp;gt; -n 1 -t 2:00:00 --mem 200 job.sh -C LSDF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
For the usage of the LSDF Online Storage&lt;br /&gt;
the following environment variables are available: $LSDF, $LSDFPROJECTS, $LSDFHOME.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====BeeOND (BeeGFS On-Demand)====&lt;br /&gt;
&lt;br /&gt;
BeeOND instances are integrated into the prolog and epilog script of the cluster batch system Slurm. It can be used on the exclusive compute nodes during the job runtime with the constraint flag &amp;quot;BEEOND&amp;quot;, &amp;quot;BEEOND_4MDS&amp;quot; or &amp;quot;BEEOND_MAXMDS&amp;quot; ([[BwUniCluster_2.0_Slurm_common_Features#sbatch_Command_Parameters|Slurm Command Parameters]])&lt;br /&gt;
* BEEOND: one metadata server is started on the first node&lt;br /&gt;
* BEEOND_4MDS: 4 metadata servers are started within your job. If you have less than 4 nodes less metadata servers are started.&lt;br /&gt;
* BEEOND_MAXMDS: on every node of your job a metadata server for the on_demand file system is started&lt;br /&gt;
&lt;br /&gt;
BEEOND will only work if the node is allocated exclusively, meaning that no other jobs are running on the same node. To achieve this, use the batch option &amp;quot;--exclusive&amp;quot;. This is particularly important in shared partitions.&lt;br /&gt;
&lt;br /&gt;
As starting point we recommend using the &amp;quot;BEEOND&amp;quot; option. If you are unsure if this is sufficient for you feel free to contact the support team.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
#SBATCH ...&lt;br /&gt;
#SBATCH --constraint=BEEOND   # or BEEOND_4MDS or BEEOND_MAXMDS&lt;br /&gt;
#SBATCH --exclusive&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After your job has started you can find the private on-demand file system in &#039;&#039;&#039;/mnt/odfs/${SLURM_JOB_ID}&#039;&#039;&#039; directory. The mountpoint comes with five pre-configured directories:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# For small files (stripe count = 1)&lt;br /&gt;
/mnt/odfs/${SLURM_JOB_ID}/stripe_1&lt;br /&gt;
# Stripe count = 4&lt;br /&gt;
/mnt/odfs/${SLURM_JOB_ID}/stripe_default &lt;br /&gt;
# or &lt;br /&gt;
/mnt/odfs/${SLURM_JOB_ID}/stripe_4&lt;br /&gt;
# Stripe count = 8, 16 or 32, use this directories for medium sized and large files or when using MPI-IO&lt;br /&gt;
/mnt/odfs/${SLURM_JOB_ID}/stripe_8&lt;br /&gt;
/mnt/odfs/${SLURM_JOB_ID}/stripe_16 &lt;br /&gt;
# or &lt;br /&gt;
/mnt/odfs/${SLURM_JOB_ID}/stripe_32&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you request less nodes than stripe count, the stripe count will be the number of nodes. For example, if you only request 8 nodes the directory stripe_16 has only a stripe count 8.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;font color=red&amp;gt;&#039;&#039;&#039;Attention:&#039;&#039;&#039;&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
:Be careful when creating large files: use always the directory with the max stripe count for large files.&lt;br /&gt;
:If you create large files use a higher stripe count. For example, if your largest file is 1.1 Tb, then you have to use a stripe count larger than 2, &lt;br /&gt;
:otherwise the used disk space is exceeded.  &lt;br /&gt;
&lt;br /&gt;
The capacity of the private file system depends on the number of nodes. For each node you get 750 Gbyte.&lt;br /&gt;
If you request 100 nodes for your job, the private file system is 100 * 750 Gbyte ~ 75 Tbyte (approx) capacity.&lt;br /&gt;
&lt;br /&gt;
== Start time of job or resources : squeue --start ==&lt;br /&gt;
The command can be used by any user to displays the estimated start time of a job based a number of analysis types based on historical usage, earliest available reservable resources, and priority based backlog. The command squeue is explained in detail on the webpage https://slurm.schedmd.com/squeue.html or via manpage (man squeue). &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=== Access ===&lt;br /&gt;
By default, this command can be run by &#039;&#039;&#039;any user&#039;&#039;&#039;. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== List of your submitted jobs : squeue ==&lt;br /&gt;
Displays information about YOUR active, pending and/or recently completed jobs. The command displays all own active and pending jobs. The command squeue is explained in detail on the webpage https://slurm.schedmd.com/squeue.html or via manpage (man squeue).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=== Access ===&lt;br /&gt;
By default, this command can be run by any user.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Flags ===&lt;br /&gt;
{| width=750px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Flag !! Description&lt;br /&gt;
|-&lt;br /&gt;
| -l, --long&lt;br /&gt;
| Report more of the available information for the selected jobs or job steps, subject to any constraints specified.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
&#039;&#039;squeue&#039;&#039; example on bwUniCluster 3.0 &amp;lt;small&amp;gt;(Only your own jobs are displayed!)&amp;lt;/small&amp;gt;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ squeue &lt;br /&gt;
             JOBID PARTITION     NAME     USER ST       TIME  NODES NODELIST(REASON)&lt;br /&gt;
              1262       cpu     wrap ka_ab123  R       8:15      1 uc3n002&lt;br /&gt;
              1267 dev_gpu_h     wrap ka_ab123 PD       0:00      1 (Resources)&lt;br /&gt;
              1265   highmem     wrap ka_ab123  R       2:41      1 uc3n084&lt;br /&gt;
$ squeue -l&lt;br /&gt;
             JOBID PARTITION     NAME     USER    STATE       TIME TIME_LIMI  NODES NODELIST(REASON)&lt;br /&gt;
              1262       cpu     wrap ka_ab123  RUNNING       8:55     20:00      1 uc3n002&lt;br /&gt;
              1267 dev_gpu_h     wrap ka_ab123  PENDING       0:00     20:00      1 (Resources)&lt;br /&gt;
              1265   highmem     wrap ka_ab123  RUNNING       3:21     20:00      1 uc3n084&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* The output of &#039;&#039;squeue&#039;&#039; shows how many jobs of yours are running or pending and how many nodes are in use by your jobs.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Shows free resources : sinfo_t_idle ==&lt;br /&gt;
The Slurm command sinfo is used to view partition and node information for a system running Slurm. It incorporates down time, reservations, and node state information in determining the available backfill window. The sinfo command can only be used by the administrator.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
SCC has prepared a special script (sinfo_t_idle) to find out how many processors are available for immediate use on the system. It is anticipated that users will use this information to submit jobs that meet these criteria and thus obtain quick job turnaround times. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=== Example ===&lt;br /&gt;
* The following command displays what resources are available for immediate use for the whole partition.&lt;br /&gt;
&amp;lt;pre&amp;gt;$ sinfo_t_idle&lt;br /&gt;
Partition dev_cpu                 :      2 nodes idle&lt;br /&gt;
Partition cpu                     :     68 nodes idle&lt;br /&gt;
Partition highmem                 :      4 nodes idle&lt;br /&gt;
Partition dev_gpu_h100            :      0 nodes idle&lt;br /&gt;
Partition gpu_h100                :     11 nodes idle&lt;br /&gt;
Partition gpu_mi300               :      1 nodes idle&lt;br /&gt;
Partition dev_cpu_il              :      0 nodes idle&lt;br /&gt;
Partition cpu_il                  :      0 nodes idle&lt;br /&gt;
Partition dev_gpu_a100_il         :      0 nodes idle&lt;br /&gt;
Partition gpu_a100_il             :      0 nodes idle&lt;br /&gt;
Partition gpu_h100_il             :      0 nodes idle&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Detailed job information : scontrol show job ==&lt;br /&gt;
scontrol show job displays detailed job state information and diagnostic output for all or a specified job of yours. Detailed information is available for active, pending and recently completed jobs. The command scontrol is explained in detail on the webpage https://slurm.schedmd.com/scontrol.html or via manpage (man scontrol). &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Display the state of all your jobs in normal mode: scontrol show job&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Display the state of a job with &amp;lt;jobid&amp;gt; in normal mode: scontrol show job &amp;lt;jobid&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=== Access ===&lt;br /&gt;
* End users can use scontrol show job to view the status of their &#039;&#039;&#039;own jobs&#039;&#039;&#039; only. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Arguments ===&lt;br /&gt;
{| width=750px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Option !! Default !! Description !! Example&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;width:12%;&amp;quot; &lt;br /&gt;
| -d&lt;br /&gt;
| (n/a)&lt;br /&gt;
| Detailed mode&lt;br /&gt;
| Example: Display the state with jobid 18089884 in detailed mode. &amp;lt;br&amp;gt; &amp;lt;pre&amp;gt;scontrol -d show job 18089884&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Scontrol show job Example ===&lt;br /&gt;
Here is an example from bwUniCluster 3.0.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
squeue    # show my own jobs (here the userid is replaced!)&lt;br /&gt;
             JOBID PARTITION     NAME     USER ST       TIME  NODES NODELIST(REASON)&lt;br /&gt;
              1262       cpu     wrap ka_zs040  R       1:12      1 uc3n002&lt;br /&gt;
&lt;br /&gt;
$&lt;br /&gt;
$ # now, see what&#039;s up with my pending job with jobid 18089884&lt;br /&gt;
$ &lt;br /&gt;
$ scontrol show job 1262&lt;br /&gt;
&lt;br /&gt;
JobId=1262 JobName=wrap&lt;br /&gt;
   UserId=ka_zs0402(241992) GroupId=ka_scc(12345) MCS_label=N/A&lt;br /&gt;
   Priority=4246 Nice=0 Account=ka QOS=normal&lt;br /&gt;
   JobState=RUNNING Reason=None Dependency=(null)&lt;br /&gt;
   Requeue=1 Restarts=0 BatchFlag=1 Reboot=0 ExitCode=0:0&lt;br /&gt;
   RunTime=00:00:37 TimeLimit=00:20:00 TimeMin=N/A&lt;br /&gt;
   SubmitTime=2025-04-04T10:01:30 EligibleTime=2025-04-04T10:01:30&lt;br /&gt;
   AccrueTime=2025-04-04T10:01:30&lt;br /&gt;
   StartTime=2025-04-04T10:01:31 EndTime=2025-04-04T10:21:31 Deadline=N/A&lt;br /&gt;
   SuspendTime=None SecsPreSuspend=0 LastSchedEval=2025-04-04T10:01:31 Scheduler=Main&lt;br /&gt;
   Partition=cpu AllocNode:Sid=uc3n999:2819841&lt;br /&gt;
   ReqNodeList=(null) ExcNodeList=(null)&lt;br /&gt;
   NodeList=uc3n002&lt;br /&gt;
   BatchHost=uc3n002&lt;br /&gt;
   NumNodes=1 NumCPUs=2 NumTasks=1 CPUs/Task=1 ReqB:S:C:T=0:0:*:*&lt;br /&gt;
   ReqTRES=cpu=1,mem=2000M,node=1,billing=1&lt;br /&gt;
   AllocTRES=cpu=2,mem=4000M,node=1,billing=2&lt;br /&gt;
   Socks/Node=* NtasksPerN:B:S:C=0:0:*:1 CoreSpec=*&lt;br /&gt;
   MinCPUsNode=1 MinMemoryCPU=2000M MinTmpDiskNode=0&lt;br /&gt;
   Features=(null) DelayBoot=00:00:00&lt;br /&gt;
   OverSubscribe=OK Contiguous=0 Licenses=(null) Network=(null)&lt;br /&gt;
   Command=(null)&lt;br /&gt;
   WorkDir=/pfs/data6/home/ka/ka_scc/ka_zs0402&lt;br /&gt;
   StdErr=/pfs/data6/home/ka/ka_scc/ka_zs0402/slurm-1262.out&lt;br /&gt;
   StdIn=/dev/null&lt;br /&gt;
   StdOut=/pfs/data6/home/ka/ka_scc/ka_zs0402/slurm-1262.out&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
You can use standard Linux pipe commands to filter the very detailed scontrol show job output.&lt;br /&gt;
* In which state the job is?&lt;br /&gt;
&amp;lt;pre&amp;gt;$ scontrol show job 1262 | grep -i State&lt;br /&gt;
   JobState=RUNNING Reason=None Dependency=(null)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Cancel Slurm Jobs ==&lt;br /&gt;
The scancel command is used to cancel jobs. The command scancel is explained in detail on the webpage https://slurm.schedmd.com/scancel.html or via manpage (man scancel).   &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=== Canceling own jobs : scancel ===&lt;br /&gt;
scancel is used to signal or cancel jobs, job arrays or job steps. The command is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ scancel [-i] &amp;lt;job-id&amp;gt;&lt;br /&gt;
$ scancel -t &amp;lt;job_state_name&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Flag !! Default !! Description !! Example&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -i, --interactive&lt;br /&gt;
| (n/a)&lt;br /&gt;
| Interactive mode.&lt;br /&gt;
| Cancel the job 987654 interactively. &amp;lt;br&amp;gt; &amp;lt;pre&amp;gt; scancel -i 987654 &amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| -t, --state&lt;br /&gt;
| (n/a)&lt;br /&gt;
| Restrict the scancel operation to jobs in a certain state. &amp;lt;br&amp;gt; &amp;quot;job_state_name&amp;quot; may have a value of either &amp;quot;PENDING&amp;quot;, &amp;quot;RUNNING&amp;quot; or &amp;quot;SUSPENDED&amp;quot;.&lt;br /&gt;
| Cancel all jobs in state &amp;quot;PENDING&amp;quot;. &amp;lt;br&amp;gt; &amp;lt;pre&amp;gt; scancel -t &amp;quot;PENDING&amp;quot; &amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Resource Managers =&lt;br /&gt;
=== Batch Job (Slurm) Variables ===&lt;br /&gt;
The following environment variables of Slurm are added to your environment once your job has started&lt;br /&gt;
&amp;lt;small&amp;gt;(only an excerpt of the most important ones)&amp;lt;/small&amp;gt;.&lt;br /&gt;
{| width=750px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Environment !! Brief explanation&lt;br /&gt;
|- &lt;br /&gt;
| SLURM_JOB_CPUS_PER_NODE &lt;br /&gt;
| Number of processes per node dedicated to the job&lt;br /&gt;
|- &lt;br /&gt;
| SLURM_JOB_NODELIST &lt;br /&gt;
| List of nodes dedicated to the job&lt;br /&gt;
|- &lt;br /&gt;
| SLURM_JOB_NUM_NODES &lt;br /&gt;
| Number of nodes dedicated to the job&lt;br /&gt;
|- &lt;br /&gt;
| SLURM_MEM_PER_NODE &lt;br /&gt;
| Memory per node dedicated to the job &lt;br /&gt;
|- &lt;br /&gt;
| SLURM_NPROCS&lt;br /&gt;
| Total number of processes dedicated to the job &lt;br /&gt;
|-&lt;br /&gt;
| SLURM_CLUSTER_NAME&lt;br /&gt;
| Name of the cluster executing the job&lt;br /&gt;
|-&lt;br /&gt;
| SLURM_CPUS_PER_TASK &lt;br /&gt;
| Number of CPUs requested per task&lt;br /&gt;
|-&lt;br /&gt;
| SLURM_JOB_ACCOUNT&lt;br /&gt;
| Account name &lt;br /&gt;
|-&lt;br /&gt;
| SLURM_JOB_ID&lt;br /&gt;
| Job ID&lt;br /&gt;
|-&lt;br /&gt;
| SLURM_JOB_NAME&lt;br /&gt;
| Job Name&lt;br /&gt;
|-&lt;br /&gt;
| SLURM_JOB_PARTITION&lt;br /&gt;
| Partition/queue running the job&lt;br /&gt;
|-&lt;br /&gt;
| SLURM_JOB_UID&lt;br /&gt;
| User ID of the job&#039;s owner&lt;br /&gt;
|-&lt;br /&gt;
| SLURM_SUBMIT_DIR&lt;br /&gt;
| Job submit folder.  The directory from which sbatch was invoked. &lt;br /&gt;
|-&lt;br /&gt;
| SLURM_JOB_USER&lt;br /&gt;
| User name of the job&#039;s owner&lt;br /&gt;
|-&lt;br /&gt;
| SLURM_RESTART_COUNT&lt;br /&gt;
| Number of times job has restarted&lt;br /&gt;
|-&lt;br /&gt;
| SLURM_PROCID&lt;br /&gt;
| Task ID (MPI rank)&lt;br /&gt;
|-&lt;br /&gt;
| SLURM_NTASKS&lt;br /&gt;
| The total number of tasks available for the job&lt;br /&gt;
|-&lt;br /&gt;
| SLURM_STEP_ID&lt;br /&gt;
| Job step ID&lt;br /&gt;
|-&lt;br /&gt;
| SLURM_STEP_NUM_TASKS&lt;br /&gt;
| Task count (number of MPI ranks)&lt;br /&gt;
|-&lt;br /&gt;
| SLURM_JOB_CONSTRAINT&lt;br /&gt;
| Job constraints&lt;br /&gt;
|}&lt;br /&gt;
See also:&lt;br /&gt;
* [https://slurm.schedmd.com/sbatch.html#SECTION_INPUT-ENVIRONMENT-VARIABLES Slurm input and output environment variables]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Job Exit Codes ===&lt;br /&gt;
A job&#039;s exit code (also known as exit status, return code and completion code) is captured by SLURM and saved as part of the job record. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Any non-zero exit code will be assumed to be a job failure and will result in a Job State of FAILED with a reason of &amp;quot;NonZeroExitCode&amp;quot;.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The exit code is an 8 bit unsigned number ranging between 0 and 255. While it is possible for a job to return a negative exit code, SLURM will display it as an unsigned value in the 0 - 255 range.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
==== Displaying Exit Codes and Signals ====&lt;br /&gt;
SLURM displays a job&#039;s exit code in the output of the &#039;&#039;&#039;scontrol show job&#039;&#039;&#039; and the sview utility.&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
When a signal was responsible for a job or step&#039;s termination, the signal number will be displayed after the exit code, delineated by a colon(:).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
==== Submitting Termination Signal ====&lt;br /&gt;
Here is an example, how to &#039;save&#039; a Slurm termination signal in a typical jobscript.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
[...]&lt;br /&gt;
exit_code=$?&lt;br /&gt;
mpirun  -np &amp;lt;#cores&amp;gt;  &amp;lt;EXE_BIN_DIR&amp;gt;/&amp;lt;executable&amp;gt; ... (options)  2&amp;gt;&amp;amp;1&lt;br /&gt;
[ &amp;quot;$exit_code&amp;quot; -eq 0 ] &amp;amp;&amp;amp; echo &amp;quot;all clean...&amp;quot; || \&lt;br /&gt;
   echo &amp;quot;Executable &amp;lt;EXE_BIN_DIR&amp;gt;/&amp;lt;executable&amp;gt; finished with exit code ${$exit_code}&amp;quot;&lt;br /&gt;
[...]&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
* Do not use &#039;&#039;&#039;&#039;time&#039;&#039;&#039;&#039; mpirun! The exit code will be the one submitted by the first (time) program.&lt;br /&gt;
* You do not need an &#039;&#039;&#039;exit $exit_code&#039;&#039;&#039; in the scripts.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
[[#top|Back to top]]&lt;/div&gt;</summary>
		<author><name>P Schuhmacher</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster3.0/Running_Jobs/Slurm&amp;diff=15214</id>
		<title>BwUniCluster3.0/Running Jobs/Slurm</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster3.0/Running_Jobs/Slurm&amp;diff=15214"/>
		<updated>2025-08-19T09:29:54Z</updated>

		<summary type="html">&lt;p&gt;P Schuhmacher: /* BeeOND (BeeGFS On-Demand) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| style=&amp;quot;background:#FFCCCC; width:100%; font-size:120%;&amp;quot;&lt;br /&gt;
| &#039;&#039;&#039;This page is work-in-progress&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
We will revise all examples and describe gold standard ways to use the resources efficiently: OpenMP, MPI and hybrid using MPI+OpenMP&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=  Slurm HPC Workload Manager = &lt;br /&gt;
== Specification == &lt;br /&gt;
Slurm is an open source, fault-tolerant, and highly scalable cluster management and job scheduling system for large and small Linux clusters. Slurm requires no kernel modifications for its operation and is relatively self-contained. As a cluster workload manager, Slurm has three key functions. First, it allocates exclusive and/or non-exclusive access to resources (compute nodes) to users for some duration of time so they can perform work. Second, it provides a framework for starting, executing, and monitoring work (normally a parallel job) on the set of allocated nodes. Finally, it arbitrates contention for resources by managing a queue of pending work.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Any kind of calculation on the compute nodes of bwUniCluster 3.0 requires the user to define calculations as a sequence of commands or single command together with required run time, number of CPU cores and main memory and submit all, i.e., the &#039;&#039;&#039;batch job&#039;&#039;&#039;, to a resource and workload managing software. bwUniCluster 3.0 has installed the workload managing software Slurm. Therefore any job submission by the user is to be executed by commands of the Slurm software. Slurm queues and runs user jobs based on fair sharing policies.  &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Slurm Commands (excerpt) ==&lt;br /&gt;
Important Slurm commands for non-administrators working on bwUniCluster 3.0.&lt;br /&gt;
{| width=850px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Slurm commands !! Brief explanation&lt;br /&gt;
|-&lt;br /&gt;
| [[#Job submission : sbatch|sbatch]] || Submits a job and puts it into the queue [[https://slurm.schedmd.com/sbatch.html sbatch]] &lt;br /&gt;
|-&lt;br /&gt;
| [[#Interactive job : salloc|salloc]] || Requests resources for an interactive Job [[https://slurm.schedmd.com/salloc.html salloc]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Detailed job information : scontrol show job|scontrol show job]] || Displays detailed job state information [[https://slurm.schedmd.com/scontrol.html scontrol]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#List of your submitted jo/bs : squeue|squeue]] || Displays information about active, eligible, blocked, and/or recently completed jobs [[https://slurm.schedmd.com/squeue.html squeue]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Start time of job or resources : squeue|squeue --start]] || Returns start time of submitted job [[https://slurm.schedmd.com/squeue.html squeue]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Shows free resources : sinfo_t_idle|sinfo_t_idle]] || Shows what resources are available for immediate use [[https://slurm.schedmd.com/sinfo.html sinfo]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Canceling own jobs : scancel|scancel]] || Cancels a job [[https://slurm.schedmd.com/scancel.html scancel]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* [https://slurm.schedmd.com/tutorials.html  Slurm Tutorials]&lt;br /&gt;
* [https://slurm.schedmd.com/pdfs/summary.pdf  Slurm command/option summary (2 pages)]&lt;br /&gt;
* [https://slurm.schedmd.com/man_index.html  Slurm Commands]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Job submission : sbatch ==&lt;br /&gt;
Batch jobs are submitted by using the command &#039;&#039;&#039;sbatch&#039;&#039;&#039;. The main purpose of the &#039;&#039;&#039;sbatch&#039;&#039;&#039; command is to specify the resources that are needed to run the job. &#039;&#039;&#039;sbatch&#039;&#039;&#039; will then queue the batch job. However, starting of batch job depends on the availability of the requested resources and the fair sharing value.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=== Command parameters sbatch ===&lt;br /&gt;
The syntax and use of &#039;&#039;&#039;sbatch&#039;&#039;&#039; can be displayed via:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ man sbatch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;sbatch&#039;&#039;&#039; options can be used from the command line or in your job script. Different defaults for some of these options are set based on the queue and can be found [https://wiki.bwhpc.de/e/BwUniCluster3.0/Batch_Queues#sbatch_-p_queue here]&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | sbatch Options&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width:8%&amp;quot;| Command line&lt;br /&gt;
! style=&amp;quot;width:9%&amp;quot;| Script&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Purpose&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -t, --time=&#039;&#039;time&#039;&#039;&lt;br /&gt;
| #SBATCH --time=&#039;&#039;time&#039;&#039;&lt;br /&gt;
| Wall clock time limit.&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -N, --nodes=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --nodes=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of nodes to be used.&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -n, --ntasks=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --ntasks=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of tasks to be launched.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --ntasks-per-node=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --ntasks-per-node=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Maximum count of tasks per node.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -c, --cpus-per-task=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --cpus-per-task=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of CPUs required per (MPI-)task.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mem=&#039;&#039;value_in_MB&#039;&#039;&lt;br /&gt;
| #SBATCH --mem=&#039;&#039;value_in_MB&#039;&#039; &lt;br /&gt;
| Memory in MegaByte per node. (You should omit the setting of this option.)&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mem-per-cpu=&#039;&#039;value_in_MB&#039;&#039;&lt;br /&gt;
| #SBATCH --mem-per-cpu=&#039;&#039;value_in_MB&#039;&#039; &lt;br /&gt;
| Minimum Memory required per allocated CPU. (You should omit the setting of this option.)&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mail-type=&#039;&#039;type&#039;&#039;&lt;br /&gt;
| #SBATCH --mail-type=&#039;&#039;type&#039;&#039;&lt;br /&gt;
| Notify user by email when certain event types occur.&amp;lt;br&amp;gt;Valid type values are NONE, BEGIN, END, FAIL, REQUEUE, ALL.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mail-user=&#039;&#039;mail-address&#039;&#039;&lt;br /&gt;
| #SBATCH --mail-user=&#039;&#039;mail-address&#039;&#039;&lt;br /&gt;
|  The specified mail-address receives email notification of state changes as defined by --mail-type.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --output=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --output=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| File in which job output is stored. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --error=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --error=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| File in which job error messages are stored. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -J, --job-name=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --job-name=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| Job name.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --export=[ALL,] &#039;&#039;env-variables&#039;&#039;&lt;br /&gt;
| #SBATCH --export=[ALL,] &#039;&#039;env-variables&#039;&#039;&lt;br /&gt;
| Identifies which environment variables from the submission environment are propagated to the launched application. Default is ALL.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -A, --account=&#039;&#039;group-name&#039;&#039;&lt;br /&gt;
| #SBATCH --account=&#039;&#039;group-name&#039;&#039;&lt;br /&gt;
| Change resources used by this job to specified group. You may need this option if your account is assigned to more than one group. By command &amp;quot;scontrol show job&amp;quot; the project group the job is accounted on can be seen behind &amp;quot;Account=&amp;quot;. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -p, --partition=&#039;&#039;queue-name&#039;&#039;&lt;br /&gt;
| #SBATCH --partition=&#039;&#039;queue-name&#039;&#039;&lt;br /&gt;
| Request a specific queue for the resource allocation.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --reservation=&#039;&#039;reservation-name&#039;&#039;&lt;br /&gt;
| #SBATCH --reservation=&#039;&#039;reservation-name&#039;&#039;&lt;br /&gt;
| Use a specific reservation for the resource allocation.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -C, --constraint=&#039;&#039;LSDF&#039;&#039;&lt;br /&gt;
| #SBATCH --constraint=LSDF&lt;br /&gt;
| Job constraint LSDF filesystems.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -C, --constraint=&#039;&#039;BEEOND (BEEOND_4MDS, BEEOND_MAXMDS)&#039;&#039;&lt;br /&gt;
| #SBATCH --constraint=BEEOND (BEEOND_4MDS, BEEOND_MAXMDS)&lt;br /&gt;
| Job constraint BeeOND filesystem.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Interactive job : salloc ==&lt;br /&gt;
&lt;br /&gt;
If you want to run an interactive job, you can do so via the command salloc on a login node.&amp;lt;br&amp;gt;Considering a serial application running on a compute node that requires 5000 MByte of memory and limiting the interactive run to 2 hours the following command has to be executed:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ salloc --partition=cpu --ntasks=1 --time=120 --mem=5000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then you will get one core on a compute node within the partition &amp;quot;cpu&amp;quot;. After execution of this command &#039;&#039;&#039;DO NOT CLOSE&#039;&#039;&#039; your current terminal session but wait until the queueing system Slurm has granted you the requested resources on the compute node. You will be logged in automatically on the granted core! To run a serial program on the granted core you only have to type the name of the executable.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./&amp;lt;my_serial_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please be aware that your serial job must run less than 2 hours in this example, else the job will be killed during runtime by the system. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can also start now a graphical X11-terminal connecting you to the dedicated resource that is available for 2 hours. You can start it by the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ xterm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that, once the walltime limit has been reached the resources - i.e. the compute node - will automatically be revoked.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
An interactive parallel application running on one compute node or on many compute nodes (e.g. here 5 nodes) with 40 cores each requires usually an amount of memory in GByte (e.g. 50 GByte) and a maximum time (e.g. 1 hour). E.g. 5 nodes can be allocated by the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ salloc --partition=cpu --nodes=5 --ntasks-per-node=40 --time=01:00:00  --mem=50gb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you can run parallel jobs on 200 cores requiring 50 GByte of memory per node. Please be aware that you will be logged in on core 0 of the first node.&lt;br /&gt;
If you want to have access to another node you have to open a new terminal, connect it also to BwUniCluster 2.0 and type the following commands to&lt;br /&gt;
connect to the running interactive job and then to a specific node:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ srun --jobid=XXXXXXXX --pty /bin/bash&lt;br /&gt;
$ srun --nodelist=uc3nXXX --pty /bin/bash&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ squeue&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the jobid and the nodelist can be shown.&lt;br /&gt;
&lt;br /&gt;
If you want to run MPI-programs, you can do it by simply typing mpirun &amp;lt;program_name&amp;gt;. Then your program will be run on 200 cores. A very simple example for starting a parallel job can be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mpirun &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also start the debugger ddt by the commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module add devel/ddt&lt;br /&gt;
$ ddt &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above commands will execute the parallel program &amp;lt;my_mpi_program&amp;gt; on all available cores. You can also start parallel programs on a subset of cores; an example for this can be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mpirun -n 50 &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are using Intel MPI you must start &amp;lt;my_mpi_program&amp;gt; by the command mpiexec.hydra (instead of mpirun).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;top&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
=  Slurm HPC Workload Manager = &lt;br /&gt;
== Specification == &lt;br /&gt;
Slurm is an open source, fault-tolerant, and highly scalable cluster management and job scheduling system for large and small Linux clusters. Slurm requires no kernel modifications for its operation and is relatively self-contained. As a cluster workload manager, Slurm has three key functions. First, it allocates exclusive and/or non-exclusive access to resources (compute nodes) to users for some duration of time so they can perform work. Second, it provides a framework for starting, executing, and monitoring work (normally a parallel job) on the set of allocated nodes. Finally, it arbitrates contention for resources by managing a queue of pending work.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Any kind of calculation on the compute nodes of [[bwUniCluster3.0|bwUniCluster 3.0]] requires the user to define calculations as a sequence of commands or single command together with required run time, number of CPU cores and main memory and submit all, i.e., the &#039;&#039;&#039;batch job&#039;&#039;&#039;, to a resource and workload managing software. bwUniCluster 3.0 has installed the workload managing software Slurm. Therefore any job submission by the user is to be executed by commands of the Slurm software. Slurm queues and runs user jobs based on fair sharing policies.  &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Slurm Commands (excerpt) ==&lt;br /&gt;
Some of the most used Slurm commands for non-administrators working on bwUniCluster 2.0.&lt;br /&gt;
{| width=750px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Slurm commands !! Brief explanation&lt;br /&gt;
|-&lt;br /&gt;
| [[#Job Submission : sbatch|sbatch]] || Submits a job and queues it in an input queue [[https://slurm.schedmd.com/sbatch.html sbatch]] &lt;br /&gt;
|-&lt;br /&gt;
| [[#Detailed job information : scontrol show job|scontrol show job]] || Displays detailed job state information [[https://slurm.schedmd.com/scontrol.html scontrol]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#List of your submitted jo/bs : squeue|squeue]] || Displays information about active, eligible, blocked, and/or recently completed jobs [[https://slurm.schedmd.com/squeue.html squeue]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Start time of job or resources : squeue|squeue --start]] || Returns start time of submitted job or requested resources [[https://slurm.schedmd.com/squeue.html squeue]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Shows free resources : sinfo_t_idle|sinfo_t_idle]] || Shows what resources are available for immediate use [[https://slurm.schedmd.com/sinfo.html sinfo]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Canceling own jobs : scancel|scancel]] || Cancels a job (obsoleted!) [[https://slurm.schedmd.com/scancel.html scancel]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* [https://slurm.schedmd.com/tutorials.html  Slurm Tutorials]&lt;br /&gt;
* [https://slurm.schedmd.com/pdfs/summary.pdf  Slurm command/option summary (2 pages)]&lt;br /&gt;
* [https://slurm.schedmd.com/man_index.html  Slurm Commands]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Job Submission : sbatch ==&lt;br /&gt;
Batch jobs are submitted by using the command &#039;&#039;&#039;sbatch&#039;&#039;&#039;. The main purpose of the &#039;&#039;&#039;sbatch&#039;&#039;&#039; command is to specify the resources that are needed to run the job. &#039;&#039;&#039;sbatch&#039;&#039;&#039; will then queue the batch job. However, starting of batch job depends on the availability of the requested resources and the fair sharing value.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=== sbatch Command Parameters ===&lt;br /&gt;
The syntax and use of &#039;&#039;&#039;sbatch&#039;&#039;&#039; can be displayed via:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ man sbatch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;sbatch&#039;&#039;&#039; options can be used from the command line or in your job script.&lt;br /&gt;
{| width=750px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | sbatch Options&lt;br /&gt;
|-&lt;br /&gt;
! Command line&lt;br /&gt;
! Script&lt;br /&gt;
! Purpose&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -t &#039;&#039;time&#039;&#039;  or  --time=&#039;&#039;time&#039;&#039;&lt;br /&gt;
| #SBATCH --time=&#039;&#039;time&#039;&#039;&lt;br /&gt;
| Wall clock time limit.&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -N &#039;&#039;count&#039;&#039;  or  --nodes=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --nodes=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of nodes to be used.&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -n &#039;&#039;count&#039;&#039;  or  --ntasks=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --ntasks=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of tasks to be launched.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --ntasks-per-node=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --ntasks-per-node=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Maximum count (&amp;lt;= 28 and &amp;lt;= 40 resp.) of tasks per node.&amp;lt;br&amp;gt;(Replaces the option ppn of MOAB.)&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -c &#039;&#039;count&#039;&#039; or --cpus-per-task=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --cpus-per-task=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of CPUs required per (MPI-)task.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mem=&#039;&#039;value_in_MB&#039;&#039;&lt;br /&gt;
| #SBATCH --mem=&#039;&#039;value_in_MB&#039;&#039; &lt;br /&gt;
| Memory in MegaByte per node.&amp;lt;br&amp;gt;(Default value is 128000 and 96000 MB resp., i.e. you should omit &amp;lt;br&amp;gt; the setting of this option.)&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mem-per-cpu=&#039;&#039;value_in_MB&#039;&#039;&lt;br /&gt;
| #SBATCH --mem-per-cpu=&#039;&#039;value_in_MB&#039;&#039; &lt;br /&gt;
| Minimum Memory required per allocated CPU.&amp;lt;br&amp;gt;(Replaces the option pmem of MOAB. You should omit &amp;lt;br&amp;gt; the setting of this option.)&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mail-type=&#039;&#039;type&#039;&#039;&lt;br /&gt;
| #SBATCH --mail-type=&#039;&#039;type&#039;&#039;&lt;br /&gt;
| Notify user by email when certain event types occur.&amp;lt;br&amp;gt;Valid type values are NONE, BEGIN, END, FAIL, REQUEUE, ALL.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mail-user=&#039;&#039;mail-address&#039;&#039;&lt;br /&gt;
| #SBATCH --mail-user=&#039;&#039;mail-address&#039;&#039;&lt;br /&gt;
|  The specified mail-address receives email notification of state&amp;lt;br&amp;gt;changes as defined by --mail-type.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --output=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --output=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| File in which job output is stored. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --error=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --error=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| File in which job error messages are stored. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -J &#039;&#039;name&#039;&#039; or --job-name=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --job-name=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| Job name.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --export=[ALL,] &#039;&#039;env-variables&#039;&#039;&lt;br /&gt;
| #SBATCH --export=[ALL,] &#039;&#039;env-variables&#039;&#039;&lt;br /&gt;
| Identifies which environment variables from the submission &amp;lt;br&amp;gt; environment are propagated to the launched application. Default &amp;lt;br&amp;gt; is ALL. If adding an environment variable to the submission&amp;lt;br&amp;gt; environment is intended, the argument ALL must be added.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -A &#039;&#039;group-name&#039;&#039; or --account=&#039;&#039;group-name&#039;&#039;&lt;br /&gt;
| #SBATCH --account=&#039;&#039;group-name&#039;&#039;&lt;br /&gt;
| Change resources used by this job to specified group. You may &amp;lt;br&amp;gt; need this option if your account is assigned to more &amp;lt;br&amp;gt; than one group. By command &amp;quot;scontrol show job&amp;quot; the project &amp;lt;br&amp;gt; group the job is accounted on can be seen behind &amp;quot;Account=&amp;quot;. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -p &#039;&#039;queue-name&#039;&#039; or --partition=&#039;&#039;queue-name&#039;&#039;&lt;br /&gt;
| #SBATCH --partition=&#039;&#039;queue-name&#039;&#039;&lt;br /&gt;
| Request a specific queue for the resource allocation.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --reservation=&#039;&#039;reservation-name&#039;&#039;&lt;br /&gt;
| #SBATCH --reservation=&#039;&#039;reservation-name&#039;&#039;&lt;br /&gt;
| Use a specific reservation for the resource allocation.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -C &#039;&#039;LSDF&#039;&#039; or --constraint=&#039;&#039;LSDF&#039;&#039;&lt;br /&gt;
| #SBATCH --constraint=LSDF&lt;br /&gt;
| Job constraint LSDF Filesystems.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -C &#039;&#039;BEEOND (BEEOND_4MDS, BEEOND_MAXMDS)&#039;&#039; or --constraint=&#039;&#039;BEEOND (BEEOND_4MDS, BEEOND_MAXMDS&#039;&#039;&lt;br /&gt;
| #SBATCH --constraint=BEEOND (BEEOND_4MDS, BEEOND_MAXMDS)&lt;br /&gt;
| Job constraint BeeOND file system.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== sbatch --partition  &#039;&#039;queues&#039;&#039; ====&lt;br /&gt;
Queue classes define maximum resources such as walltime, nodes and processes per node and queue of the compute system. Details can be found here:&lt;br /&gt;
* [[BwUniCluster3.0/Batch_Queues|bwUniCluster 3.0 queue settings]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== sbatch Examples ===&lt;br /&gt;
==== Serial Programs ====&lt;br /&gt;
To submit a serial job that runs the script &#039;&#039;&#039;job.sh&#039;&#039;&#039; and that requires 5000 MB of main memory and 10 minutes of wall clock time&lt;br /&gt;
&lt;br /&gt;
a) execute:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sbatch -p dev_cpu -n 1 -t 10:00 --mem=5000  job.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
or&lt;br /&gt;
b) add after the initial line of your script &#039;&#039;&#039;job.sh&#039;&#039;&#039; the lines (here with a high memory request):&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#SBATCH --ntasks=1&lt;br /&gt;
#SBATCH --time=10&lt;br /&gt;
#SBATCH --mem=180gb&lt;br /&gt;
#SBATCH --job-name=simple&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
and execute the modified script with the command line option &#039;&#039;--partition=highmem&#039;&#039;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sbatch --partition=highmem job.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note, that sbatch command line options overrule script options.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Multithreaded Programs ====&lt;br /&gt;
Multithreaded programs operate faster than serial programs on CPUs with multiple cores.&amp;lt;br&amp;gt;&lt;br /&gt;
Moreover, multiple threads of one process share resources such as memory.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
For multithreaded programs based on &#039;&#039;&#039;Open&#039;&#039;&#039; &#039;&#039;&#039;M&#039;&#039;&#039;ulti-&#039;&#039;&#039;P&#039;&#039;&#039;rocessing (OpenMP) a number of threads is defined by the environment variable OMP_NUM_THREADS. By default this variable is set to 1 (OMP_NUM_THREADS=1).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Hyperthreading is switched on on bwUniCluster 3.0, the option --threads-per-core must be set to 1, if you do not want to use it.&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
To submit a batch job called &#039;&#039;OpenMP_Test&#039;&#039; that runs a 96-fold threaded program &#039;&#039;omp_exe&#039;&#039; which requires 6000 MByte of total physical memory and total wall clock time of 40 minutes:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
a) execute:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sbatch -p cpu --export=ALL,OMP_NUM_THREADS=96 -J OpenMP_Test -N 1 -c 96 --threads-per-core=1 -t 40 --mem=6000 ./omp_exe&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
or&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
* generate the script &#039;&#039;&#039;job_omp.sh&#039;&#039;&#039; containing the following lines:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
#SBATCH --nodes=1&lt;br /&gt;
#SBATCH --cpus-per-task=96&lt;br /&gt;
#SBATCH --time=40:00&lt;br /&gt;
#SBATCH --threads-per-core=1&lt;br /&gt;
#SBATCH --mem=6000mb   &lt;br /&gt;
#SBATCH --export=ALL,EXECUTABLE=./omp_exe&lt;br /&gt;
#SBATCH -J OpenMP_Test&lt;br /&gt;
&lt;br /&gt;
#Usually you should set&lt;br /&gt;
export KMP_AFFINITY=compact,1,0&lt;br /&gt;
#export KMP_AFFINITY=verbose,compact,1,0 prints messages concerning the supported affinity&lt;br /&gt;
#KMP_AFFINITY Description: https://software.intel.com/en-us/node/524790#KMP_AFFINITY_ENVIRONMENT_VARIABLE&lt;br /&gt;
&lt;br /&gt;
export OMP_NUM_THREADS=${SLURM_JOB_CPUS_PER_NODE}&lt;br /&gt;
echo &amp;quot;Executable ${EXECUTABLE} running on ${SLURM_JOB_CPUS_PER_NODE} cores with ${OMP_NUM_THREADS} threads&amp;quot;&lt;br /&gt;
startexe=${EXECUTABLE}&lt;br /&gt;
echo $startexe&lt;br /&gt;
exec $startexe&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Using Intel compiler the environment variable KMP_AFFINITY switches on binding of threads to specific cores and, if necessary, replace &amp;lt;placeholder&amp;gt; with the required modulefile to enable the OpenMP environment and execute the script &#039;&#039;&#039;job_omp.sh&#039;&#039;&#039; adding the queue class &#039;&#039;cpu&#039;&#039; as sbatch option:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sbatch -p cpu job_omp.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note, that sbatch command line options overrule script options, e.g.,&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sbatch --partition=cpu --mem=200 job_omp.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
overwrites the script setting of 6000 MByte with 200 MByte.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== MPI Parallel Programs ====&lt;br /&gt;
MPI parallel programs run faster than serial programs on multi CPU and multi core systems. N-fold spawned processes of the MPI program, i.e., &#039;&#039;&#039;MPI tasks&#039;&#039;&#039;,  run simultaneously and communicate via the Message Passing Interface (MPI) paradigm. MPI tasks do not share memory but can be spawned over different nodes.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Multiple MPI tasks must be launched via &#039;&#039;&#039;mpirun&#039;&#039;&#039;, e.g. 4 MPI tasks of &#039;&#039;my_par_program&#039;&#039;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mpirun -n 4 my_par_program&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This command runs 4 MPI tasks of &#039;&#039;my_par_program&#039;&#039; on the node you are logged in.&lt;br /&gt;
To run this command with a loaded Intel MPI the environment variable I_MPI_HYDRA_BOOTSTRAP must be unset ( --&amp;gt; $ unset I_MPI_HYDRA_BOOTSTRAP).&lt;br /&gt;
&lt;br /&gt;
Running MPI parallel programs in a batch job the interactive environment - particularly the loaded modules - will also be set in the batch job. If you want to set a defined module environment in your batch job you have to purge all modules before setting the wished modules. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
===== OpenMPI =====&lt;br /&gt;
&lt;br /&gt;
If you want to run jobs on batch nodes, generate a wrapper script &#039;&#039;job_ompi.sh&#039;&#039; for &#039;&#039;&#039;OpenMPI&#039;&#039;&#039; containing the following lines:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
# Use when using the module environment for OpenMPI&lt;br /&gt;
module load compiler/&amp;lt;placeholder_for_compiler&amp;gt;/&amp;lt;placeholder_for_compiler_version&amp;gt;&lt;br /&gt;
module load mpi/openmpi/&amp;lt;placeholder_for_mpi_version&amp;gt;&lt;br /&gt;
mpirun --bind-to core --map-by core -report-bindings my_par_program&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Attention:&#039;&#039;&#039; Do &#039;&#039;&#039;NOT&#039;&#039;&#039; add mpirun options &#039;&#039;-n &amp;lt;number_of_processes&amp;gt;&#039;&#039; or any other option defining processes or nodes, since Slurm instructs mpirun about number of processes and node hostnames. Use &#039;&#039;&#039;ALWAYS&#039;&#039;&#039; the MPI options &#039;&#039;&#039;&#039;&#039;--bind-to core&#039;&#039;&#039;&#039;&#039; and &#039;&#039;&#039;&#039;&#039;--map-by core|socket|node&#039;&#039;&#039;&#039;&#039;. Please type &#039;&#039;mpirun --help&#039;&#039; for an explanation of the meaning of the different options of mpirun option &#039;&#039;--map-by&#039;&#039;.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Considering 4 OpenMPI tasks on a single node, each requiring 2000 MByte, and running for 1 hour, execute:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sbatch -p cpu -N 1 -n 4 --mem-per-cpu=2000 --time=01:00:00 ./job_ompi.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Intel MPI =====&lt;br /&gt;
&lt;br /&gt;
Generate a wrapper script for &#039;&#039;&#039;Intel MPI&#039;&#039;&#039;, &#039;&#039;job_impi.sh&#039;&#039; containing the following lines:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
# Use when a defined module environment related to Intel MPI is wished&lt;br /&gt;
module load compiler/&amp;lt;placeholder_for_compiler&amp;gt;/&amp;lt;placeholder_for_compiler_version&amp;gt;&lt;br /&gt;
module load mpi/impi/&amp;lt;placeholder_for_version&amp;gt;   &lt;br /&gt;
mpiexec.hydra -bootstrap slurm my_par_program&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;font color=red&amp;gt;&#039;&#039;&#039;Attention:&#039;&#039;&#039;&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Do &#039;&#039;&#039;NOT&#039;&#039;&#039; add mpirun options &#039;&#039;-n &amp;lt;number_of_processes&amp;gt;&#039;&#039; or any other option defining processes or nodes, since Slurm instructs mpirun about number of processes and node hostnames.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Launching and running 200 Intel MPI tasks on 5 nodes, each requiring 80 GByte, and running for 5 hours, execute:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sbatch --partition=cpu -N 5 --ntasks-per-node=40 --mem=80gb -t 300 ./job_impi.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
If you want to use 128 or more nodes, you must also set the environment variable as follows:           &amp;lt;BR&amp;gt;&lt;br /&gt;
export I_MPI_HYDRA_BRANCH_COUNT=-1&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
If you want to use the options perhost, ppn or rr, you must additionally set the environment variable I_MPI_JOB_RESPECT_PROCESS_PLACEMENT=off.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Multithreaded + MPI parallel Programs ====&lt;br /&gt;
Multithreaded + MPI parallel programs operate faster than serial programs on multi CPUs with multiple cores. All threads of one process share resources such as memory. On the contrary MPI tasks do not share memory but can be spawned over different nodes. &#039;&#039;&#039;Hyperthreading is switched on on bwUniCluster 3.0, the option --threads-per-core must be set to 1, if you do not want to use it.&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
===== OpenMPI with Multithreading =====&lt;br /&gt;
Multiple MPI tasks using &#039;&#039;&#039;OpenMPI&#039;&#039;&#039; must be launched by the MPI parallel program &#039;&#039;&#039;mpirun&#039;&#039;&#039;. For multithreaded programs based on &#039;&#039;&#039;Open&#039;&#039;&#039; &#039;&#039;&#039;M&#039;&#039;&#039;ulti-&#039;&#039;&#039;P&#039;&#039;&#039;rocessing (OpenMP) number of threads are defined by the environment variable OMP_NUM_THREADS. By default this variable is set to 1 (OMP_NUM_THREADS=1).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;For OpenMPI&#039;&#039;&#039; a job-script to submit a batch job called &#039;&#039;job_ompi_omp.sh&#039;&#039; that runs a MPI program with 4 tasks and a 28-fold threaded program &#039;&#039;ompi_omp_program&#039;&#039; requiring 3000 MByte of physical memory per thread (using 28 threads per MPI task you will get 28*3000 MByte = 84000 MByte per MPI task) and total wall clock time of 3 hours looks like:&lt;br /&gt;
&amp;lt;!--b)--&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
#SBATCH --ntasks=4&lt;br /&gt;
#SBATCH --cpus-per-task=28&lt;br /&gt;
#SBATCH --threads-per-core=1&lt;br /&gt;
#SBATCH --time=03:00:00&lt;br /&gt;
#SBATCH --mem=83gb    # 84000 MB = 84000/1024 GB = 82.1 GB&lt;br /&gt;
#SBATCH --export=ALL,MPI_MODULE=mpi/openmpi/3.1,EXECUTABLE=./ompi_omp_program&lt;br /&gt;
#SBATCH --output=&amp;quot;parprog_hybrid_%j.out&amp;quot;  &lt;br /&gt;
&lt;br /&gt;
# Use when a defined module environment related to OpenMPI is wished&lt;br /&gt;
module load ${MPI_MODULE}&lt;br /&gt;
export OMP_NUM_THREADS=${SLURM_CPUS_PER_TASK}&lt;br /&gt;
export MPIRUN_OPTIONS=&amp;quot;--bind-to core --map-by socket:PE=${OMP_NUM_THREADS} -report-bindings&amp;quot;&lt;br /&gt;
export NUM_CORES=${SLURM_NTASKS}*${OMP_NUM_THREADS}&lt;br /&gt;
echo &amp;quot;${EXECUTABLE} running on ${NUM_CORES} cores with ${SLURM_NTASKS} MPI-tasks and ${OMP_NUM_THREADS} threads&amp;quot;&lt;br /&gt;
startexe=&amp;quot;mpirun -n ${SLURM_NTASKS} ${MPIRUN_OPTIONS} ${EXECUTABLE}&amp;quot;&lt;br /&gt;
echo $startexe&lt;br /&gt;
exec $startexe&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Execute the script &#039;&#039;&#039;job_ompi_omp.sh&#039;&#039;&#039; by command sbatch:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sbatch -p cpu ./job_ompi_omp.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* With the mpirun option &#039;&#039;--bind-to core&#039;&#039; MPI tasks and OpenMP threads are bound to physical cores.&lt;br /&gt;
* With the option &#039;&#039;--map-by node:PE=&amp;lt;value&amp;gt;&#039;&#039; (neighbored) MPI tasks will be attached to different nodes and each MPI task is bound to the first core of a node. &amp;lt;value&amp;gt; must be set to ${OMP_NUM_THREADS}.&lt;br /&gt;
* The option &#039;&#039;-report-bindings&#039;&#039; shows the bindings between MPI tasks and physical cores.&lt;br /&gt;
* The mpirun-options &#039;&#039;&#039;--bind-to core&#039;&#039;&#039;, &#039;&#039;&#039;--map-by socket|...|node:PE=&amp;lt;value&amp;gt;&#039;&#039;&#039; should always be used when running a multithreaded MPI program.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Intel MPI with Multithreading =====&lt;br /&gt;
Multithreaded + MPI parallel programs operate faster than serial programs on multi CPUs with multiple cores. All threads of one process share resources such as memory. On the contrary MPI tasks do not share memory but can be spawned over different nodes.  &lt;br /&gt;
&lt;br /&gt;
Multiple Intel MPI tasks must be launched by the MPI parallel program &#039;&#039;&#039;mpiexec.hydra&#039;&#039;&#039;. For multithreaded programs based on &#039;&#039;&#039;Open&#039;&#039;&#039; &#039;&#039;&#039;M&#039;&#039;&#039;ulti-&#039;&#039;&#039;P&#039;&#039;&#039;rocessing (OpenMP) number of threads are defined by the environment variable OMP_NUM_THREADS. By default this variable is set to 1 (OMP_NUM_THREADS=1).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;For Intel MPI&#039;&#039;&#039; a job-script to submit a batch job called &#039;&#039;job_impi_omp.sh&#039;&#039; that runs a Intel MPI program with 10 tasks and a 96-fold threaded program &#039;&#039;impi_omp_program&#039;&#039; requiring 96000 MByte of total physical memory per task and total wall clock time of 1 hours looks like: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--b)--&amp;gt; &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
#SBATCH --ntasks=10&lt;br /&gt;
#SBATCH --cpus-per-task=96&lt;br /&gt;
#SBATCH --threads-per-core=1&lt;br /&gt;
#SBATCH --time=60&lt;br /&gt;
#SBATCH --mem=96000&lt;br /&gt;
#SBATCH --export=ALL,MPI_MODULE=mpi/impi,EXE=./impi_omp_program&lt;br /&gt;
#SBATCH --output=&amp;quot;parprog_impi_omp_%j.out&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#If using more than one MPI task per node please set&lt;br /&gt;
export KMP_AFFINITY=compact,1,0&lt;br /&gt;
#export KMP_AFFINITY=verbose,scatter  prints messages concerning the supported affinity &lt;br /&gt;
#KMP_AFFINITY Description: https://software.intel.com/en-us/node/524790#KMP_AFFINITY_ENVIRONMENT_VARIABLE&lt;br /&gt;
&lt;br /&gt;
# Use when a defined module environment related to Intel MPI is wished &lt;br /&gt;
module load ${MPI_MODULE}&lt;br /&gt;
export OMP_NUM_THREADS=${SLURM_CPUS_PER_TASK}&lt;br /&gt;
export MPIRUN_OPTIONS=&amp;quot;-binding &amp;quot;domain=omp:compact&amp;quot; -print-rank-map -envall&amp;quot;&lt;br /&gt;
export NUM_PROCS=eval(${SLURM_NTASKS}*${OMP_NUM_THREADS})&lt;br /&gt;
echo &amp;quot;${EXE} running on ${NUM_PROCS} cores with ${SLURM_NTASKS} MPI-tasks and ${OMP_NUM_THREADS} threads&amp;quot;&lt;br /&gt;
startexe=&amp;quot;mpiexec.hydra -bootstrap slurm ${MPIRUN_OPTIONS} -n ${SLURM_NTASKS} ${EXE}&amp;quot;&lt;br /&gt;
echo $startexe&lt;br /&gt;
exec $startexe&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Using Intel compiler the environment variable KMP_AFFINITY switches on binding of threads to specific cores. If you only run one MPI task per node please set KMP_AFFINITY=compact,1,0.&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
If you want to use 128 or more nodes, you must also set the environment variable as follows:           &amp;lt;BR&amp;gt;&lt;br /&gt;
export I_MPI_HYDRA_BRANCH_COUNT=-1&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
If you want to use the options perhost, ppn or rr, you must additionally set the environment variable I_MPI_JOB_RESPECT_PROCESS_PLACEMENT=off. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Execute the script &#039;&#039;&#039;job_impi_omp.sh&#039;&#039;&#039; by command sbatch:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sbatch -p cpu ./job_impi_omp.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The mpirun option &#039;&#039;-print-rank-map&#039;&#039; shows the bindings between MPI tasks and nodes (not very beneficial). The option &#039;&#039;-binding&#039;&#039; binds MPI tasks (processes) to a particular processor; &#039;&#039;domain=omp&#039;&#039; means that the domain size is determined by the number of threads. If you would choose 2 MPI tasks per node, you should choose &#039;&#039;-binding &amp;quot;cell=unit;map=bunch&amp;quot;&#039;&#039;; this binding maps one MPI process to each socket. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Chain jobs ====&lt;br /&gt;
The CPU time requirements of many applications exceed the limits of the job classes. In those situations it is recommended to solve the problem by a job chain. A job chain is a sequence of jobs where each job automatically starts its successor. &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
####################################&lt;br /&gt;
## simple Slurm submitter script to setup   ## &lt;br /&gt;
## a chain of jobs using Slurm                    ##&lt;br /&gt;
####################################&lt;br /&gt;
## ver.  : 2018-11-27, KIT, SCC&lt;br /&gt;
&lt;br /&gt;
## Define maximum number of jobs via positional parameter 1, default is 5&lt;br /&gt;
max_nojob=${1:-5}&lt;br /&gt;
&lt;br /&gt;
## Define your jobscript (e.g. &amp;quot;~/chain_job.sh&amp;quot;)&lt;br /&gt;
chain_link_job=${PWD}/chain_job.sh&lt;br /&gt;
&lt;br /&gt;
## Define type of dependency via positional parameter 2, default is &#039;afterok&#039;&lt;br /&gt;
dep_type=&amp;quot;${2:-afterok}&amp;quot;&lt;br /&gt;
## -&amp;gt; List of all dependencies:&lt;br /&gt;
## https://slurm.schedmd.com/sbatch.html&lt;br /&gt;
&lt;br /&gt;
myloop_counter=1&lt;br /&gt;
## Submit loop&lt;br /&gt;
while [ ${myloop_counter} -le ${max_nojob} ] ; do&lt;br /&gt;
   ##&lt;br /&gt;
   ## Differ slurm_opt depending on chain link number&lt;br /&gt;
   if [ ${myloop_counter} -eq 1 ] ; then&lt;br /&gt;
      slurm_opt=&amp;quot;&amp;quot;&lt;br /&gt;
   else&lt;br /&gt;
      slurm_opt=&amp;quot;-d ${dep_type}:${jobID}&amp;quot;&lt;br /&gt;
   fi&lt;br /&gt;
   ##&lt;br /&gt;
   ## Print current iteration number and sbatch command&lt;br /&gt;
   echo &amp;quot;Chain job iteration = ${myloop_counter}&amp;quot;&lt;br /&gt;
   echo &amp;quot;   sbatch --export=myloop_counter=${myloop_counter} ${slurm_opt} ${chain_link_job}&amp;quot;&lt;br /&gt;
   ## Store job ID for next iteration by storing output of sbatch command with empty lines&lt;br /&gt;
   jobID=$(sbatch -p &amp;lt;queue&amp;gt; --export=ALL,myloop_counter=${myloop_counter} ${slurm_opt} ${chain_link_job} 2&amp;gt;&amp;amp;1 | sed &#039;s/[S,a-z]* //g&#039;)&lt;br /&gt;
   ##   &lt;br /&gt;
   ## Check if ERROR occured&lt;br /&gt;
   if [[ &amp;quot;${jobID}&amp;quot; =~ &amp;quot;ERROR&amp;quot; ]] ; then&lt;br /&gt;
      echo &amp;quot;   -&amp;gt; submission failed!&amp;quot; ; exit 1&lt;br /&gt;
   else&lt;br /&gt;
      echo &amp;quot;   -&amp;gt; job number = ${jobID}&amp;quot;&lt;br /&gt;
   fi&lt;br /&gt;
   ##&lt;br /&gt;
   ## Increase counter&lt;br /&gt;
   let myloop_counter+=1&lt;br /&gt;
done&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== GPU jobs ====&lt;br /&gt;
&lt;br /&gt;
The nodes in the gpu_h100, gpu_mi300, gpu_a100_il and gpu_h100_il  queues have 4 NVIDIA Ampere A100 GPUs or 4 NVIDIA Hopper H100 GPUs. Just submitting a job to these queues is not enough to also allocate one or more GPUs, you have to do so using the &amp;quot;--gres=gpu&amp;quot; parameter. You have to specifiy how many GPUs your job needs, e.g. &amp;quot;--gres=gpu:2&amp;quot; will request two GPUs.&lt;br /&gt;
&lt;br /&gt;
The GPU nodes are shared between multiple jobs if the jobs don&#039;t request all the GPUs in a node and there are enough resources to run more than one job. The individual GPUs are always bound to a single job and will not be shared between different jobs.&lt;br /&gt;
&lt;br /&gt;
a) add after the initial line of your script job.sh the line including the&lt;br /&gt;
information about the GPU usage:&amp;lt;br&amp;gt;   #SBATCH --gres=gpu:2&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
#SBATCH --ntasks=40&lt;br /&gt;
#SBATCH --time=02:00:00&lt;br /&gt;
#SBATCH --mem=4000&lt;br /&gt;
#SBATCH --gres=gpu:2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or b) execute:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sbatch -p &amp;lt;queue&amp;gt; -n 40 -t 02:00:00 --mem 4000 --gres=gpu:2 job.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
If you start an interactive session on of the GPU nodes, you can use the &amp;quot;nvidia-smi&amp;quot; command to list the GPUs allocated to your job:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ nvidia-smi&lt;br /&gt;
Fri Apr  4 09:51:29 2025       &lt;br /&gt;
+-----------------------------------------------------------------------------------------+&lt;br /&gt;
| NVIDIA-SMI 570.86.15              Driver Version: 570.86.15      CUDA Version: 12.8     |&lt;br /&gt;
|-----------------------------------------+------------------------+----------------------+&lt;br /&gt;
| GPU  Name                 Persistence-M | Bus-Id          Disp.A | Volatile Uncorr. ECC |&lt;br /&gt;
| Fan  Temp   Perf          Pwr:Usage/Cap |           Memory-Usage | GPU-Util  Compute M. |&lt;br /&gt;
|                                         |                        |               MIG M. |&lt;br /&gt;
|=========================================+========================+======================|&lt;br /&gt;
|   0  NVIDIA H100                    On  |   00000000:06:00.0 Off |                    0 |&lt;br /&gt;
| N/A   45C    P0             70W /  415W |      27MiB /  95830MiB |      0%      Default |&lt;br /&gt;
|                                         |                        |             Disabled |&lt;br /&gt;
+-----------------------------------------+------------------------+----------------------+&lt;br /&gt;
|   1  NVIDIA H100                    On  |   00000000:26:00.0 Off |                    0 |&lt;br /&gt;
| N/A   45C    P0             69W /  415W |      27MiB /  95830MiB |      0%      Default |&lt;br /&gt;
|                                         |                        |             Disabled |&lt;br /&gt;
+-----------------------------------------+------------------------+----------------------+&lt;br /&gt;
                                                                                         &lt;br /&gt;
+-----------------------------------------------------------------------------------------+&lt;br /&gt;
| Processes:                                                                              |&lt;br /&gt;
|  GPU   GI   CI              PID   Type   Process name                        GPU Memory |&lt;br /&gt;
|        ID   ID                                                               Usage      |&lt;br /&gt;
|=========================================================================================|&lt;br /&gt;
|    0   N/A  N/A            3569      G   /usr/libexec/Xorg                        17MiB |&lt;br /&gt;
|    1   N/A  N/A            3569      G   /usr/libexec/Xorg                        17MiB |&lt;br /&gt;
+-----------------------------------------------------------------------------------------+&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
In case of using Open MPI, the underlying communication infrastructure (UCX and Open MPI&#039;s BTL) is CUDA-aware.&lt;br /&gt;
Please run Open MPI&#039;s mpirun using the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mpirun --mca pml ucx --mca btl_openib_warn_default_gid_prefix 0 -np 2 ./mpi_cuda_app&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
or disabling the (older) communication layer Bit-Transfer-Layer (short BTL) alltogether:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mpirun --mca pml ucx --mca btl ^openib -np 2 ./mpi_cuda_app&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== LSDF Online Storage ====&lt;br /&gt;
On bwUniCluster 3.0 you can use for special cases the LSDF Online Storage on the HPC cluster nodes. Please request for this service separately ([https://www.lsdf.kit.edu/os/storagerequest/: LSDF Storage Request]).&lt;br /&gt;
To mount the LSDF Online Storage on the compute nodes during the job runtime the&lt;br /&gt;
the constraint flag &amp;quot;LSDF&amp;quot; has to be set.  &lt;br /&gt;
&lt;br /&gt;
a) add after the initial line of your script job.sh the line including the&lt;br /&gt;
information about the LSDF Online Storage usage:&amp;lt;br&amp;gt;   #SBATCH --constraint=LSDF&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
#SBATCH --ntasks=1&lt;br /&gt;
#SBATCH --time=120&lt;br /&gt;
#SBATCH --mem=200&lt;br /&gt;
#SBATCH --constraint=LSDF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or b) execute:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sbatch -p &amp;lt;queue&amp;gt; -n 1 -t 2:00:00 --mem 200 job.sh -C LSDF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
For the usage of the LSDF Online Storage&lt;br /&gt;
the following environment variables are available: $LSDF, $LSDFPROJECTS, $LSDFHOME.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====BeeOND (BeeGFS On-Demand)====&lt;br /&gt;
&lt;br /&gt;
BeeOND instances are integrated into the prolog and epilog script of the cluster batch system Slurm. It can be used on the exclusive compute nodes during the job runtime with the constraint flag &amp;quot;BEEOND&amp;quot;, &amp;quot;BEEOND_4MDS&amp;quot; or &amp;quot;BEEOND_MAXMDS&amp;quot; ([[BwUniCluster_2.0_Slurm_common_Features#sbatch_Command_Parameters|Slurm Command Parameters]])&lt;br /&gt;
* BEEOND: one metadata server is started on the first node&lt;br /&gt;
* BEEOND_4MDS: 4 metadata servers are started within your job. If you have less than 4 nodes less metadata servers are started.&lt;br /&gt;
* BEEOND_MAXMDS: on every node of your job a metadata server for the on_demand file system is started&lt;br /&gt;
&lt;br /&gt;
BEEOND will only work if the node is allocated exclusively, meaning that no other jobs are running on the same node. To achieve this, use the batch option &amp;quot;--exclusive&amp;quot;. This is particularly important in the in shared partitions.&lt;br /&gt;
&lt;br /&gt;
As starting point we recommend using the &amp;quot;BEEOND&amp;quot; option. If you are unsure if this is sufficient for you feel free to contact the support team.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
#SBATCH ...&lt;br /&gt;
#SBATCH --constraint=BEEOND   # or BEEOND_4MDS or BEEOND_MAXMDS&lt;br /&gt;
#SBATCH --exclusive&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After your job has started you can find the private on-demand file system in &#039;&#039;&#039;/mnt/odfs/${SLURM_JOB_ID}&#039;&#039;&#039; directory. The mountpoint comes with five pre-configured directories:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# For small files (stripe count = 1)&lt;br /&gt;
/mnt/odfs/${SLURM_JOB_ID}/stripe_1&lt;br /&gt;
# Stripe count = 4&lt;br /&gt;
/mnt/odfs/${SLURM_JOB_ID}/stripe_default &lt;br /&gt;
# or &lt;br /&gt;
/mnt/odfs/${SLURM_JOB_ID}/stripe_4&lt;br /&gt;
# Stripe count = 8, 16 or 32, use this directories for medium sized and large files or when using MPI-IO&lt;br /&gt;
/mnt/odfs/${SLURM_JOB_ID}/stripe_8&lt;br /&gt;
/mnt/odfs/${SLURM_JOB_ID}/stripe_16 &lt;br /&gt;
# or &lt;br /&gt;
/mnt/odfs/${SLURM_JOB_ID}/stripe_32&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you request less nodes than stripe count, the stripe count will be the number of nodes. For example, if you only request 8 nodes the directory stripe_16 has only a stripe count 8.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;font color=red&amp;gt;&#039;&#039;&#039;Attention:&#039;&#039;&#039;&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
:Be careful when creating large files: use always the directory with the max stripe count for large files.&lt;br /&gt;
:If you create large files use a higher stripe count. For example, if your largest file is 1.1 Tb, then you have to use a stripe count larger than 2, &lt;br /&gt;
:otherwise the used disk space is exceeded.  &lt;br /&gt;
&lt;br /&gt;
The capacity of the private file system depends on the number of nodes. For each node you get 750 Gbyte.&lt;br /&gt;
If you request 100 nodes for your job, the private file system is 100 * 750 Gbyte ~ 75 Tbyte (approx) capacity.&lt;br /&gt;
&lt;br /&gt;
== Start time of job or resources : squeue --start ==&lt;br /&gt;
The command can be used by any user to displays the estimated start time of a job based a number of analysis types based on historical usage, earliest available reservable resources, and priority based backlog. The command squeue is explained in detail on the webpage https://slurm.schedmd.com/squeue.html or via manpage (man squeue). &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=== Access ===&lt;br /&gt;
By default, this command can be run by &#039;&#039;&#039;any user&#039;&#039;&#039;. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== List of your submitted jobs : squeue ==&lt;br /&gt;
Displays information about YOUR active, pending and/or recently completed jobs. The command displays all own active and pending jobs. The command squeue is explained in detail on the webpage https://slurm.schedmd.com/squeue.html or via manpage (man squeue).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=== Access ===&lt;br /&gt;
By default, this command can be run by any user.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Flags ===&lt;br /&gt;
{| width=750px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Flag !! Description&lt;br /&gt;
|-&lt;br /&gt;
| -l, --long&lt;br /&gt;
| Report more of the available information for the selected jobs or job steps, subject to any constraints specified.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
&#039;&#039;squeue&#039;&#039; example on bwUniCluster 3.0 &amp;lt;small&amp;gt;(Only your own jobs are displayed!)&amp;lt;/small&amp;gt;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ squeue &lt;br /&gt;
             JOBID PARTITION     NAME     USER ST       TIME  NODES NODELIST(REASON)&lt;br /&gt;
              1262       cpu     wrap ka_ab123  R       8:15      1 uc3n002&lt;br /&gt;
              1267 dev_gpu_h     wrap ka_ab123 PD       0:00      1 (Resources)&lt;br /&gt;
              1265   highmem     wrap ka_ab123  R       2:41      1 uc3n084&lt;br /&gt;
$ squeue -l&lt;br /&gt;
             JOBID PARTITION     NAME     USER    STATE       TIME TIME_LIMI  NODES NODELIST(REASON)&lt;br /&gt;
              1262       cpu     wrap ka_ab123  RUNNING       8:55     20:00      1 uc3n002&lt;br /&gt;
              1267 dev_gpu_h     wrap ka_ab123  PENDING       0:00     20:00      1 (Resources)&lt;br /&gt;
              1265   highmem     wrap ka_ab123  RUNNING       3:21     20:00      1 uc3n084&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* The output of &#039;&#039;squeue&#039;&#039; shows how many jobs of yours are running or pending and how many nodes are in use by your jobs.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Shows free resources : sinfo_t_idle ==&lt;br /&gt;
The Slurm command sinfo is used to view partition and node information for a system running Slurm. It incorporates down time, reservations, and node state information in determining the available backfill window. The sinfo command can only be used by the administrator.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
SCC has prepared a special script (sinfo_t_idle) to find out how many processors are available for immediate use on the system. It is anticipated that users will use this information to submit jobs that meet these criteria and thus obtain quick job turnaround times. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=== Example ===&lt;br /&gt;
* The following command displays what resources are available for immediate use for the whole partition.&lt;br /&gt;
&amp;lt;pre&amp;gt;$ sinfo_t_idle&lt;br /&gt;
Partition dev_cpu                 :      2 nodes idle&lt;br /&gt;
Partition cpu                     :     68 nodes idle&lt;br /&gt;
Partition highmem                 :      4 nodes idle&lt;br /&gt;
Partition dev_gpu_h100            :      0 nodes idle&lt;br /&gt;
Partition gpu_h100                :     11 nodes idle&lt;br /&gt;
Partition gpu_mi300               :      1 nodes idle&lt;br /&gt;
Partition dev_cpu_il              :      0 nodes idle&lt;br /&gt;
Partition cpu_il                  :      0 nodes idle&lt;br /&gt;
Partition dev_gpu_a100_il         :      0 nodes idle&lt;br /&gt;
Partition gpu_a100_il             :      0 nodes idle&lt;br /&gt;
Partition gpu_h100_il             :      0 nodes idle&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Detailed job information : scontrol show job ==&lt;br /&gt;
scontrol show job displays detailed job state information and diagnostic output for all or a specified job of yours. Detailed information is available for active, pending and recently completed jobs. The command scontrol is explained in detail on the webpage https://slurm.schedmd.com/scontrol.html or via manpage (man scontrol). &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Display the state of all your jobs in normal mode: scontrol show job&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Display the state of a job with &amp;lt;jobid&amp;gt; in normal mode: scontrol show job &amp;lt;jobid&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=== Access ===&lt;br /&gt;
* End users can use scontrol show job to view the status of their &#039;&#039;&#039;own jobs&#039;&#039;&#039; only. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Arguments ===&lt;br /&gt;
{| width=750px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Option !! Default !! Description !! Example&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;width:12%;&amp;quot; &lt;br /&gt;
| -d&lt;br /&gt;
| (n/a)&lt;br /&gt;
| Detailed mode&lt;br /&gt;
| Example: Display the state with jobid 18089884 in detailed mode. &amp;lt;br&amp;gt; &amp;lt;pre&amp;gt;scontrol -d show job 18089884&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Scontrol show job Example ===&lt;br /&gt;
Here is an example from bwUniCluster 3.0.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
squeue    # show my own jobs (here the userid is replaced!)&lt;br /&gt;
             JOBID PARTITION     NAME     USER ST       TIME  NODES NODELIST(REASON)&lt;br /&gt;
              1262       cpu     wrap ka_zs040  R       1:12      1 uc3n002&lt;br /&gt;
&lt;br /&gt;
$&lt;br /&gt;
$ # now, see what&#039;s up with my pending job with jobid 18089884&lt;br /&gt;
$ &lt;br /&gt;
$ scontrol show job 1262&lt;br /&gt;
&lt;br /&gt;
JobId=1262 JobName=wrap&lt;br /&gt;
   UserId=ka_zs0402(241992) GroupId=ka_scc(12345) MCS_label=N/A&lt;br /&gt;
   Priority=4246 Nice=0 Account=ka QOS=normal&lt;br /&gt;
   JobState=RUNNING Reason=None Dependency=(null)&lt;br /&gt;
   Requeue=1 Restarts=0 BatchFlag=1 Reboot=0 ExitCode=0:0&lt;br /&gt;
   RunTime=00:00:37 TimeLimit=00:20:00 TimeMin=N/A&lt;br /&gt;
   SubmitTime=2025-04-04T10:01:30 EligibleTime=2025-04-04T10:01:30&lt;br /&gt;
   AccrueTime=2025-04-04T10:01:30&lt;br /&gt;
   StartTime=2025-04-04T10:01:31 EndTime=2025-04-04T10:21:31 Deadline=N/A&lt;br /&gt;
   SuspendTime=None SecsPreSuspend=0 LastSchedEval=2025-04-04T10:01:31 Scheduler=Main&lt;br /&gt;
   Partition=cpu AllocNode:Sid=uc3n999:2819841&lt;br /&gt;
   ReqNodeList=(null) ExcNodeList=(null)&lt;br /&gt;
   NodeList=uc3n002&lt;br /&gt;
   BatchHost=uc3n002&lt;br /&gt;
   NumNodes=1 NumCPUs=2 NumTasks=1 CPUs/Task=1 ReqB:S:C:T=0:0:*:*&lt;br /&gt;
   ReqTRES=cpu=1,mem=2000M,node=1,billing=1&lt;br /&gt;
   AllocTRES=cpu=2,mem=4000M,node=1,billing=2&lt;br /&gt;
   Socks/Node=* NtasksPerN:B:S:C=0:0:*:1 CoreSpec=*&lt;br /&gt;
   MinCPUsNode=1 MinMemoryCPU=2000M MinTmpDiskNode=0&lt;br /&gt;
   Features=(null) DelayBoot=00:00:00&lt;br /&gt;
   OverSubscribe=OK Contiguous=0 Licenses=(null) Network=(null)&lt;br /&gt;
   Command=(null)&lt;br /&gt;
   WorkDir=/pfs/data6/home/ka/ka_scc/ka_zs0402&lt;br /&gt;
   StdErr=/pfs/data6/home/ka/ka_scc/ka_zs0402/slurm-1262.out&lt;br /&gt;
   StdIn=/dev/null&lt;br /&gt;
   StdOut=/pfs/data6/home/ka/ka_scc/ka_zs0402/slurm-1262.out&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
You can use standard Linux pipe commands to filter the very detailed scontrol show job output.&lt;br /&gt;
* In which state the job is?&lt;br /&gt;
&amp;lt;pre&amp;gt;$ scontrol show job 1262 | grep -i State&lt;br /&gt;
   JobState=RUNNING Reason=None Dependency=(null)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Cancel Slurm Jobs ==&lt;br /&gt;
The scancel command is used to cancel jobs. The command scancel is explained in detail on the webpage https://slurm.schedmd.com/scancel.html or via manpage (man scancel).   &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=== Canceling own jobs : scancel ===&lt;br /&gt;
scancel is used to signal or cancel jobs, job arrays or job steps. The command is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ scancel [-i] &amp;lt;job-id&amp;gt;&lt;br /&gt;
$ scancel -t &amp;lt;job_state_name&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Flag !! Default !! Description !! Example&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -i, --interactive&lt;br /&gt;
| (n/a)&lt;br /&gt;
| Interactive mode.&lt;br /&gt;
| Cancel the job 987654 interactively. &amp;lt;br&amp;gt; &amp;lt;pre&amp;gt; scancel -i 987654 &amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| -t, --state&lt;br /&gt;
| (n/a)&lt;br /&gt;
| Restrict the scancel operation to jobs in a certain state. &amp;lt;br&amp;gt; &amp;quot;job_state_name&amp;quot; may have a value of either &amp;quot;PENDING&amp;quot;, &amp;quot;RUNNING&amp;quot; or &amp;quot;SUSPENDED&amp;quot;.&lt;br /&gt;
| Cancel all jobs in state &amp;quot;PENDING&amp;quot;. &amp;lt;br&amp;gt; &amp;lt;pre&amp;gt; scancel -t &amp;quot;PENDING&amp;quot; &amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Resource Managers =&lt;br /&gt;
=== Batch Job (Slurm) Variables ===&lt;br /&gt;
The following environment variables of Slurm are added to your environment once your job has started&lt;br /&gt;
&amp;lt;small&amp;gt;(only an excerpt of the most important ones)&amp;lt;/small&amp;gt;.&lt;br /&gt;
{| width=750px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Environment !! Brief explanation&lt;br /&gt;
|- &lt;br /&gt;
| SLURM_JOB_CPUS_PER_NODE &lt;br /&gt;
| Number of processes per node dedicated to the job&lt;br /&gt;
|- &lt;br /&gt;
| SLURM_JOB_NODELIST &lt;br /&gt;
| List of nodes dedicated to the job&lt;br /&gt;
|- &lt;br /&gt;
| SLURM_JOB_NUM_NODES &lt;br /&gt;
| Number of nodes dedicated to the job&lt;br /&gt;
|- &lt;br /&gt;
| SLURM_MEM_PER_NODE &lt;br /&gt;
| Memory per node dedicated to the job &lt;br /&gt;
|- &lt;br /&gt;
| SLURM_NPROCS&lt;br /&gt;
| Total number of processes dedicated to the job &lt;br /&gt;
|-&lt;br /&gt;
| SLURM_CLUSTER_NAME&lt;br /&gt;
| Name of the cluster executing the job&lt;br /&gt;
|-&lt;br /&gt;
| SLURM_CPUS_PER_TASK &lt;br /&gt;
| Number of CPUs requested per task&lt;br /&gt;
|-&lt;br /&gt;
| SLURM_JOB_ACCOUNT&lt;br /&gt;
| Account name &lt;br /&gt;
|-&lt;br /&gt;
| SLURM_JOB_ID&lt;br /&gt;
| Job ID&lt;br /&gt;
|-&lt;br /&gt;
| SLURM_JOB_NAME&lt;br /&gt;
| Job Name&lt;br /&gt;
|-&lt;br /&gt;
| SLURM_JOB_PARTITION&lt;br /&gt;
| Partition/queue running the job&lt;br /&gt;
|-&lt;br /&gt;
| SLURM_JOB_UID&lt;br /&gt;
| User ID of the job&#039;s owner&lt;br /&gt;
|-&lt;br /&gt;
| SLURM_SUBMIT_DIR&lt;br /&gt;
| Job submit folder.  The directory from which sbatch was invoked. &lt;br /&gt;
|-&lt;br /&gt;
| SLURM_JOB_USER&lt;br /&gt;
| User name of the job&#039;s owner&lt;br /&gt;
|-&lt;br /&gt;
| SLURM_RESTART_COUNT&lt;br /&gt;
| Number of times job has restarted&lt;br /&gt;
|-&lt;br /&gt;
| SLURM_PROCID&lt;br /&gt;
| Task ID (MPI rank)&lt;br /&gt;
|-&lt;br /&gt;
| SLURM_NTASKS&lt;br /&gt;
| The total number of tasks available for the job&lt;br /&gt;
|-&lt;br /&gt;
| SLURM_STEP_ID&lt;br /&gt;
| Job step ID&lt;br /&gt;
|-&lt;br /&gt;
| SLURM_STEP_NUM_TASKS&lt;br /&gt;
| Task count (number of MPI ranks)&lt;br /&gt;
|-&lt;br /&gt;
| SLURM_JOB_CONSTRAINT&lt;br /&gt;
| Job constraints&lt;br /&gt;
|}&lt;br /&gt;
See also:&lt;br /&gt;
* [https://slurm.schedmd.com/sbatch.html#SECTION_INPUT-ENVIRONMENT-VARIABLES Slurm input and output environment variables]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Job Exit Codes ===&lt;br /&gt;
A job&#039;s exit code (also known as exit status, return code and completion code) is captured by SLURM and saved as part of the job record. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Any non-zero exit code will be assumed to be a job failure and will result in a Job State of FAILED with a reason of &amp;quot;NonZeroExitCode&amp;quot;.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The exit code is an 8 bit unsigned number ranging between 0 and 255. While it is possible for a job to return a negative exit code, SLURM will display it as an unsigned value in the 0 - 255 range.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
==== Displaying Exit Codes and Signals ====&lt;br /&gt;
SLURM displays a job&#039;s exit code in the output of the &#039;&#039;&#039;scontrol show job&#039;&#039;&#039; and the sview utility.&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
When a signal was responsible for a job or step&#039;s termination, the signal number will be displayed after the exit code, delineated by a colon(:).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
==== Submitting Termination Signal ====&lt;br /&gt;
Here is an example, how to &#039;save&#039; a Slurm termination signal in a typical jobscript.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
[...]&lt;br /&gt;
exit_code=$?&lt;br /&gt;
mpirun  -np &amp;lt;#cores&amp;gt;  &amp;lt;EXE_BIN_DIR&amp;gt;/&amp;lt;executable&amp;gt; ... (options)  2&amp;gt;&amp;amp;1&lt;br /&gt;
[ &amp;quot;$exit_code&amp;quot; -eq 0 ] &amp;amp;&amp;amp; echo &amp;quot;all clean...&amp;quot; || \&lt;br /&gt;
   echo &amp;quot;Executable &amp;lt;EXE_BIN_DIR&amp;gt;/&amp;lt;executable&amp;gt; finished with exit code ${$exit_code}&amp;quot;&lt;br /&gt;
[...]&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
* Do not use &#039;&#039;&#039;&#039;time&#039;&#039;&#039;&#039; mpirun! The exit code will be the one submitted by the first (time) program.&lt;br /&gt;
* You do not need an &#039;&#039;&#039;exit $exit_code&#039;&#039;&#039; in the scripts.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
[[#top|Back to top]]&lt;/div&gt;</summary>
		<author><name>P Schuhmacher</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster3.0/Running_Jobs&amp;diff=15213</id>
		<title>BwUniCluster3.0/Running Jobs</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster3.0/Running_Jobs&amp;diff=15213"/>
		<updated>2025-08-19T09:21:20Z</updated>

		<summary type="html">&lt;p&gt;P Schuhmacher: /* Batch Jobs: sbatch */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
= Purpose and function of a queuing system =&lt;br /&gt;
&lt;br /&gt;
All compute activities on bwUniCluster 3.0 have to be performed on the compute nodes. Compute nodes are only available by requesting the corresponding resources via the queuing system. As soon as the requested resources are available, automated tasks are executed via a batch script or they can be accessed interactively.&amp;lt;br&amp;gt;&lt;br /&gt;
General procedure: Hint to [[Running_Calculations | Running Calculations]]&lt;br /&gt;
&lt;br /&gt;
== Job submission process ==&lt;br /&gt;
&lt;br /&gt;
bwUniCluster 3.0 has installed the workload managing software Slurm. Therefore any job submission by the user is to be executed by commands of the Slurm software. Slurm queues and runs user jobs based on fair sharing policies.&lt;br /&gt;
&lt;br /&gt;
== Slurm ==&lt;br /&gt;
&lt;br /&gt;
HPC Workload Manager on bwUniCluster 3.0 is Slurm.&lt;br /&gt;
Slurm is a cluster management and job scheduling system. Slurm has three key functions. &lt;br /&gt;
* It allocates access to resources (compute cores on nodes) to users for some duration of time so they can perform work. &lt;br /&gt;
* It provides a framework for starting, executing, and monitoring work (normally a parallel job) on the set of allocated nodes. &lt;br /&gt;
* It arbitrates contention for resources by managing a queue of pending work.&lt;br /&gt;
&lt;br /&gt;
Any kind of calculation on the compute nodes of bwUniCluster 3.0 requires the user to define calculations as a sequence of commands together with required run time, number of CPU cores and main memory and submit all, i.e., the &#039;&#039;&#039;batch job&#039;&#039;&#039;, to a resource and workload managing software.&lt;br /&gt;
&lt;br /&gt;
== Terms and definitions ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Partitions &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Slurm manages job queues for different &#039;&#039;&#039;partitions&#039;&#039;&#039;. Partitions are used to group similar node types (e.g. nodes with and without accelerators) and to enforce different access policies and resource limits.&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 3.0 there are different partitions:&lt;br /&gt;
&lt;br /&gt;
* CPU-only nodes&lt;br /&gt;
** 2-socket nodes, consisting of 2 Intel Ice Lake processors with 32 cores each or 2 AMD processors with 48 cores each&lt;br /&gt;
** 2-socket nodes with very high RAM capacity, consisting of 2 AMD processors with 48 cores each&lt;br /&gt;
* GPU-accelerated nodes&lt;br /&gt;
** 2-socket nodes with 4x NVIDIA A100 or 4x NVIDIA H100 GPUs&lt;br /&gt;
** 4-socket node with 4x AMD Instinct accelerator&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Queues &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Job &#039;&#039;&#039;queues&#039;&#039;&#039; are used to manage jobs that request access to shared but limited computing resources of a certain kind (partition).&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 3.0 there are different main types of queues:&lt;br /&gt;
* Regular queues&lt;br /&gt;
** cpu: Jobs that request CPU-only nodes.&lt;br /&gt;
** gpu: Jobs that request GPU-accelerated nodes.&lt;br /&gt;
* Development queues (dev)&lt;br /&gt;
** Short, usually interactive jobs that are used for developing, compiling and testing code and workflows. The intention behind development queues is to provide users with immediate access to computer resources without having to wait. This is the place to realize instantaneous heavy compute without affecting other users, as would be the case on the login nodes.&lt;br /&gt;
&lt;br /&gt;
Requested compute resources such as (wall-)time, number of nodes and amount of memory are restricted and must fit into the boundaries imposed by the queues. The request for compute resources on the bwUniCluster 3.0 &amp;lt;font color=red&amp;gt;requires at least the specification of the &#039;&#039;&#039;queue&#039;&#039;&#039; and the &#039;&#039;&#039;time&#039;&#039;&#039;&amp;lt;/font&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Jobs &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Jobs can be run non-interactively as &#039;&#039;&#039;batch jobs&#039;&#039;&#039; or as &#039;&#039;&#039;interactive jobs&#039;&#039;&#039;.&amp;lt;br&amp;gt;&lt;br /&gt;
Submitting a batch job means, that all steps of a compute project are defined in a Bash script. This Bash script is queued and executed as soon as the compute resources are available and allocated. Jobs are enqueued with the &amp;lt;code&amp;gt;sbatch&amp;lt;/code&amp;gt; command.&lt;br /&gt;
For interactive jobs, the resources are requested with the &amp;lt;code&amp;gt;salloc&amp;lt;/code&amp;gt; command. As soon as the computing resources are available and allocated, a command line prompt is returned on a computing node and the user can freely dispose of the resources now available to him.&lt;br /&gt;
{|style=&amp;quot;background:#deffee; width:100%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;padding:5px; background:#cef2e0; text-align:left&amp;quot;|&lt;br /&gt;
[[Image:Attention.svg|center|25px]]&lt;br /&gt;
|style=&amp;quot;padding:5px; background:#cef2e0; text-align:left&amp;quot;|&lt;br /&gt;
&#039;&#039;&#039;Please remember:&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Heavy computations are not allowed on the login nodes&#039;&#039;&#039;.&amp;lt;br&amp;gt;Use a developement or a regular job queue instead! Please refer to [[BwUniCluster3.0/Login#Allowed_Activities_on_Login_Nodes|Allowed Activities on Login Nodes]].&lt;br /&gt;
* &#039;&#039;&#039;Development queues&#039;&#039;&#039; are meant for &#039;&#039;&#039;development tasks&#039;&#039;&#039;.&amp;lt;br&amp;gt;Do not misuse this queue for regular, short-running jobs or chain jobs! Only one running job at a time is enabled. Maximum queue length is reduced to 3.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Queues on bwUniCluster 3.0 = &lt;br /&gt;
== Policy ==&lt;br /&gt;
&lt;br /&gt;
The computing time is provided in accordance with the &#039;&#039;&#039;fair share policy&#039;&#039;&#039;. The individual investment shares of the respective university and the resources already used by its members are taken into account. Furthermore, the following throttling policy is also active: The &#039;&#039;&#039;maximum amount of physical cores&#039;&#039;&#039; used at any given time from jobs running is &#039;&#039;&#039;1920 per user&#039;&#039;&#039; (aggregated over all running jobs). This number corresponds to 30 nodes on the Ice Lake partition or 20 nodes on the standard partition. The aim is to minimize waiting times and maximize the number of users who can access computing time at the same time.&lt;br /&gt;
&lt;br /&gt;
== Regular Queues ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
! style=&amp;quot;width:5%&amp;quot;| Queue&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Node-Type&lt;br /&gt;
! style=&amp;quot;width:23%&amp;quot;| Default Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Minimal Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Maximum Resources&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;cpu_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Ice Lake&lt;br /&gt;
| mem-per-cpu=2000mb&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=30, mem=249600mb, ntasks-per-node=64, (threads-per-core=2) &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;cpu&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Standard&lt;br /&gt;
| mem-per-cpu=2000mb&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=20, mem=380000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;highmem&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;High Memory&lt;br /&gt;
| mem-per-cpu=12090mb&lt;br /&gt;
| mem=380001mb&lt;br /&gt;
| time=72:00:00, nodes=4, mem=2300000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;gpu_h100&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;NVIDIA GPU x4&lt;br /&gt;
| mem-per-gpu=193300mb&amp;lt;br/&amp;gt;cpus-per-gpu=24&lt;br /&gt;
| gres=gpu:1&lt;br /&gt;
| time=72:00:00, nodes=12, mem=760000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;gpu_mi300&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU node&amp;lt;br/&amp;gt;AMD GPU x4&lt;br /&gt;
| mem-per-gpu=128200mb&amp;lt;br/&amp;gt;cpus-per-gpu=24&lt;br /&gt;
| gres=gpu:1&lt;br /&gt;
| time=72:00:00, nodes=1, mem=510000mb, ntasks-per-node=40, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;gpu_a100_il&amp;lt;/code&amp;gt;/&amp;lt;code&amp;gt;gpu_h100_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;Ice Lake&amp;lt;br/&amp;gt;NVIDIA GPU x4&lt;br /&gt;
| mem-per-gpu=127500mb&amp;lt;br/&amp;gt;cpus-per-gpu=16&lt;br /&gt;
| gres=gpu:1&lt;br /&gt;
| time=48:00:00, nodes=9(A100)/nodes=5(H100) , mem=510000mb, ntasks-per-node=64, (threads-per-core=2) &lt;br /&gt;
|}&lt;br /&gt;
Table 1: Regular Queues&lt;br /&gt;
&lt;br /&gt;
== Short Queues ==&lt;br /&gt;
&amp;lt;p style=&amp;quot;color:red; &amp;quot;&amp;gt;&amp;lt;b&amp;gt;Queues with a short runtime of 30 minutes.&amp;lt;/b&amp;gt;&amp;lt;/p&amp;gt; &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
! style=&amp;quot;width:5%&amp;quot;| Queue&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Node Type&lt;br /&gt;
! style=&amp;quot;width:23%&amp;quot;| Default Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Minimal Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Maximum Resources&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;gpu_a100_short&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;Ice Lake&amp;lt;br/&amp;gt;NVIDIA GPU x4&lt;br /&gt;
| mem-per-gpu=94000mb&amp;lt;br/&amp;gt;cpus-per-gpu=12&lt;br /&gt;
| gres=gpu:1&lt;br /&gt;
| time=30, nodes=12, mem=376000mb, ntasks-per-node=48, (threads-per-core=2)&lt;br /&gt;
|}&lt;br /&gt;
Table 2: Short Queues&lt;br /&gt;
&lt;br /&gt;
== Development Queues ==&lt;br /&gt;
Only for development, i.e. debugging or performance optimization ...&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
! style=&amp;quot;width:5%&amp;quot;| Queue&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Node Type&lt;br /&gt;
! style=&amp;quot;width:23%&amp;quot;| Default Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Minimal Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Maximum Resources&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_cpu_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Ice Lake&lt;br /&gt;
| mem-per-cpu=2000mb&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=8, mem=249600mb, ntasks-per-node=64, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_cpu&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Standard&lt;br /&gt;
| mem-per-cpu=2000mb&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=380000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_gpu_h100&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;NVIDIA GPU x4&lt;br /&gt;
| mem-per-gpu=193300mb&amp;lt;br/&amp;gt;cpus-per-gpu=24&lt;br /&gt;
| gres=gpu:1&lt;br /&gt;
| time=30, nodes=1, mem=760000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_gpu_a100_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;NVIDIA GPU x4&amp;lt;br/&amp;gt;&lt;br /&gt;
| mem-per-gpu=127500mb&amp;lt;br/&amp;gt;cpus-per-gpu=16 &lt;br /&gt;
| gres=gpu:1&lt;br /&gt;
| time=30, nodes=1, mem=510000mb, ntasks-per-node=64, (threads-per-core=2) &lt;br /&gt;
|}&lt;br /&gt;
Table 3: Development Queues&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Default resources of a queue class define number of tasks and memory if not explicitly given with sbatch command. Resource list acronyms &#039;&#039;--time&#039;&#039;, &#039;&#039;--ntasks&#039;&#039;, &#039;&#039;--nodes&#039;&#039;, &#039;&#039;--mem&#039;&#039; and &#039;&#039;--mem-per-cpu&#039;&#039; are described [[BwUniCluster3.0/Running_Jobs/Slurm|here]].&lt;br /&gt;
&lt;br /&gt;
== Check available resources: sinfo_t_idle ==&lt;br /&gt;
The Slurm command sinfo is used to view partition and node information for a system running Slurm. It incorporates down time, reservations, and node state information in determining the available backfill window. The sinfo command can only be used by the administrator.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
SCC has prepared a special script (sinfo_t_idle) to find out how many processors are available for immediate use on the system. It is anticipated that users will use this information to submit jobs that meet these criteria and thus obtain quick job turnaround times. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The following command displays what resources are available for immediate use for the whole partition.&lt;br /&gt;
&amp;lt;pre&amp;gt;$ sinfo_t_idle &lt;br /&gt;
Partition dev_cpu                 :      1 nodes idle&lt;br /&gt;
Partition cpu                     :      1 nodes idle&lt;br /&gt;
Partition highmem                 :      2 nodes idle&lt;br /&gt;
Partition dev_gpu_h100            :      0 nodes idle&lt;br /&gt;
Partition gpu_h100                :      0 nodes idle&lt;br /&gt;
Partition gpu_mi300               :      0 nodes idle&lt;br /&gt;
Partition dev_cpu_il              :      7 nodes idle&lt;br /&gt;
Partition cpu_il                  :      2 nodes idle&lt;br /&gt;
Partition dev_gpu_a100_il         :      1 nodes idle&lt;br /&gt;
Partition gpu_a100_il             :      0 nodes idle&lt;br /&gt;
Partition gpu_h100_il             :      1 nodes idle&lt;br /&gt;
Partition gpu_a100_short          :      0 nodes idle&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Running Jobs =&lt;br /&gt;
&lt;br /&gt;
== Slurm Commands (excerpt) ==&lt;br /&gt;
Important Slurm commands for non-administrators working on bwUniCluster 3.0.&lt;br /&gt;
{| width=850px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Slurm commands !! Brief explanation&lt;br /&gt;
|-&lt;br /&gt;
| [[#Batch Jobs: sbatch|sbatch]] || Submits a job and puts it into the queue [[https://slurm.schedmd.com/sbatch.html sbatch]] &lt;br /&gt;
|-&lt;br /&gt;
| [[#Interactive Jobs: salloc|salloc]] || Requests resources for an interactive Job [[https://slurm.schedmd.com/salloc.html salloc]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Monitor and manage jobs |scontrol show job]] || Displays detailed job state information [[https://slurm.schedmd.com/scontrol.html scontrol]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#List of your submitted jobs : squeue|squeue]] || Displays information about active, eligible, blocked, and/or recently completed jobs [[https://slurm.schedmd.com/squeue.html squeue]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#List of your submitted jobs : squeue|squeue --start]] || Returns start time of submitted job [[https://slurm.schedmd.com/squeue.html squeue]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Check available resources: sinfo_t_idle|sinfo_t_idle]] || Shows what resources are available for immediate use [[https://slurm.schedmd.com/sinfo.html sinfo]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Canceling own jobs : scancel|scancel]] || Cancels a job [[https://slurm.schedmd.com/scancel.html scancel]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* [https://slurm.schedmd.com/tutorials.html  Slurm Tutorials]&lt;br /&gt;
* [https://slurm.schedmd.com/pdfs/summary.pdf  Slurm command/option summary (2 pages)]&lt;br /&gt;
* [https://slurm.schedmd.com/man_index.html  Slurm Commands]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Batch Jobs: sbatch ==&lt;br /&gt;
&lt;br /&gt;
Batch jobs are submitted by using the command &#039;&#039;&#039;sbatch&#039;&#039;&#039;. The main purpose of the &#039;&#039;&#039;sbatch&#039;&#039;&#039; command is to specify the resources that are needed to run the job. &#039;&#039;&#039;sbatch&#039;&#039;&#039; will then queue the batch job. However, starting of batch job depends on the availability of the requested resources and the fair sharing value.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The syntax and use of &#039;&#039;&#039;sbatch&#039;&#039;&#039; can be displayed via:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ man sbatch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;sbatch&#039;&#039;&#039; options can be used from the command line or in your job script. Different defaults for some of these options are set based on the queue and can be found [[BwUniCluster3.0/Slurm | here]]&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | sbatch Options&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width:8%&amp;quot;| Command line&lt;br /&gt;
! style=&amp;quot;width:9%&amp;quot;| Script&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Purpose&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -t, --time=&#039;&#039;time&#039;&#039;&lt;br /&gt;
| #SBATCH --time=&#039;&#039;time&#039;&#039;&lt;br /&gt;
| Wall clock time limit.&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -N, --nodes=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --nodes=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of nodes to be used.&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -n, --ntasks=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --ntasks=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of tasks to be launched.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --ntasks-per-node=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --ntasks-per-node=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Maximum count of tasks per node.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -c, --cpus-per-task=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --cpus-per-task=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of CPUs required per (MPI-)task.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mem=&#039;&#039;value_in_MB&#039;&#039;&lt;br /&gt;
| #SBATCH --mem=&#039;&#039;value_in_MB&#039;&#039; &lt;br /&gt;
| Memory in MegaByte per node. (You should omit the setting of this option.)&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mem-per-cpu=&#039;&#039;value_in_MB&#039;&#039;&lt;br /&gt;
| #SBATCH --mem-per-cpu=&#039;&#039;value_in_MB&#039;&#039; &lt;br /&gt;
| Minimum Memory required per allocated CPU. (You should omit the setting of this option.)&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --exclusive&lt;br /&gt;
| #SBATCH --exclusive &lt;br /&gt;
| The job allocates all CPUs and GPUs on the nodes. It will not share the node with other running jobs&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mail-type=&#039;&#039;type&#039;&#039;&lt;br /&gt;
| #SBATCH --mail-type=&#039;&#039;type&#039;&#039;&lt;br /&gt;
| Notify user by email when certain event types occur.&amp;lt;br&amp;gt;Valid type values are NONE, BEGIN, END, FAIL, REQUEUE, ALL.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mail-user=&#039;&#039;mail-address&#039;&#039;&lt;br /&gt;
| #SBATCH --mail-user=&#039;&#039;mail-address&#039;&#039;&lt;br /&gt;
|  The specified mail-address receives email notification of state changes as defined by --mail-type.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --output=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --output=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| File in which job output is stored. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --error=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --error=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| File in which job error messages are stored. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -J, --job-name=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --job-name=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| Job name.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --export=[ALL,] &#039;&#039;env-variables&#039;&#039;&lt;br /&gt;
| #SBATCH --export=[ALL,] &#039;&#039;env-variables&#039;&#039;&lt;br /&gt;
| Identifies which environment variables from the submission environment are propagated to the launched application. Default is ALL.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -A, --account=&#039;&#039;group-name&#039;&#039;&lt;br /&gt;
| #SBATCH --account=&#039;&#039;group-name&#039;&#039;&lt;br /&gt;
| Change resources used by this job to specified group. You may need this option if your account is assigned to more than one group. By command &amp;quot;scontrol show job&amp;quot; the project group the job is accounted on can be seen behind &amp;quot;Account=&amp;quot;. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -p, --partition=&#039;&#039;queue-name&#039;&#039;&lt;br /&gt;
| #SBATCH --partition=&#039;&#039;queue-name&#039;&#039;&lt;br /&gt;
| Request a specific queue for the resource allocation.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --reservation=&#039;&#039;reservation-name&#039;&#039;&lt;br /&gt;
| #SBATCH --reservation=&#039;&#039;reservation-name&#039;&#039;&lt;br /&gt;
| Use a specific reservation for the resource allocation.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -C, --constraint=&#039;&#039;LSDF&#039;&#039;&lt;br /&gt;
| #SBATCH --constraint=LSDF&lt;br /&gt;
| Job constraint LSDF filesystems.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -C, --constraint=&#039;&#039;BEEOND (BEEOND_4MDS, BEEOND_MAXMDS)&#039;&#039;&lt;br /&gt;
| #SBATCH --constraint=BEEOND (BEEOND_4MDS, BEEOND_MAXMDS)&lt;br /&gt;
| Job constraint BeeOND filesystem.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Interactive Jobs: salloc ==&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 3.0 you are only allowed to run short jobs (&amp;lt;&amp;lt; 1 hour) with little memory requirements (&amp;lt;&amp;lt; 8 GByte) on the logins nodes. If you want to run longer jobs and/or jobs with a request of more than 8 GByte of memory, you must allocate resources for so-called interactive jobs by usage of the command salloc on a login node. Considering a serial application running on a compute node that requires 5000 MByte of memory and limiting the interactive run to 2 hours the following command has to be executed:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ salloc -p cpu -n 1 -t 120 --mem=5000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then you will get one core on a compute node within the partition &amp;quot;cpu&amp;quot;. After execution of this command &#039;&#039;&#039;DO NOT CLOSE&#039;&#039;&#039; your current terminal session but wait until the queueing system Slurm has granted you the requested resources on the compute system. You will be logged in automatically on the granted core! To run a serial program on the granted core you only have to type the name of the executable.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./&amp;lt;my_serial_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please be aware that your serial job must run less than 2 hours in this example, else the job will be killed during runtime by the system. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can also start now a graphical X11-terminal connecting you to the dedicated resource that is available for 2 hours. You can start it by the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ xterm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that, once the walltime limit has been reached the resources - i.e. the compute node - will automatically be revoked.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
An interactive parallel application running on one compute node or on many compute nodes (e.g. here 5 nodes) with 96 cores each requires usually an amount of memory in GByte (e.g. 50 GByte) and a maximum time (e.g. 1 hour). E.g. 5 nodes can be allocated by the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ salloc -p cpu -N 5 --ntasks-per-node=96 -t 01:00:00  --mem=50gb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you can run parallel jobs on 480 cores requiring 50 GByte of memory per node. Please be aware that you will be logged in on core 0 of the first node.&lt;br /&gt;
If you want to have access to another node you have to open a new terminal, connect it also to bwUniCluster 3.0 and type the following commands to&lt;br /&gt;
connect to the running interactive job and then to a specific node:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ srun --jobid=XXXXXXXX --pty /bin/bash&lt;br /&gt;
$ srun --nodelist=uc3nXXX --pty /bin/bash&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ squeue&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the jobid and the nodelist can be shown.&lt;br /&gt;
&lt;br /&gt;
If you want to run MPI-programs, you can do it by simply typing mpirun &amp;lt;program_name&amp;gt;. Then your program will be run on 480 cores. A very simple example for starting a parallel job can be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mpirun &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also start the debugger ddt by the commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module add devel/ddt&lt;br /&gt;
$ ddt &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above commands will execute the parallel program &amp;lt;my_mpi_program&amp;gt; on all available cores. You can also start parallel programs on a subset of cores; an example for this can be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mpirun -n 50 &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are using Intel MPI you must start &amp;lt;my_mpi_program&amp;gt; by the command mpiexec.hydra (instead of mpirun).&lt;br /&gt;
&lt;br /&gt;
== Interactive Computing with Jupyter ==&lt;br /&gt;
&lt;br /&gt;
== Monitor and manage jobs ==&lt;br /&gt;
&lt;br /&gt;
=== List of your submitted jobs : squeue ===&lt;br /&gt;
Displays information about YOUR active, pending and/or recently completed jobs. The command displays all own active and pending jobs. The command squeue is explained in detail on the webpage https://slurm.schedmd.com/squeue.html or via manpage (man squeue).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;squeue&#039;&#039; example on bwUniCluster 3.0 &amp;lt;small&amp;gt;(Only your own jobs are displayed!)&amp;lt;/small&amp;gt;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ squeue &lt;br /&gt;
             JOBID PARTITION     NAME     USER ST       TIME  NODES NODELIST(REASON)&lt;br /&gt;
              1262       cpu     wrap ka_ab123  R       8:15      1 uc3n002&lt;br /&gt;
              1267 dev_gpu_h     wrap ka_ab123 PD       0:00      1 (Resources)&lt;br /&gt;
              1265   highmem     wrap ka_ab123  R       2:41      1 uc3n084&lt;br /&gt;
$ squeue -l&lt;br /&gt;
             JOBID PARTITION     NAME     USER    STATE       TIME TIME_LIMI  NODES NODELIST(REASON)&lt;br /&gt;
              1262       cpu     wrap ka_ab123  RUNNING       8:55     20:00      1 uc3n002&lt;br /&gt;
              1267 dev_gpu_h     wrap ka_ab123  PENDING       0:00     20:00      1 (Resources)&lt;br /&gt;
              1265   highmem     wrap ka_ab123  RUNNING       3:21     20:00      1 uc3n084&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Detailed job information : scontrol show job ===&lt;br /&gt;
scontrol show job displays detailed job state information and diagnostic output for all or a specified job of yours. Detailed information is available for active, pending and recently completed jobs. The command scontrol is explained in detail on the webpage https://slurm.schedmd.com/scontrol.html or via manpage (man scontrol). &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Display the state of all your jobs in normal mode: scontrol show job&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Display the state of a job with &amp;lt;jobid&amp;gt; in normal mode: scontrol show job &amp;lt;jobid&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Here is an example from bwUniCluster 3.0.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ squeue&lt;br /&gt;
JOBID PARTITION     NAME     USER ST       TIME  NODES NODELIST(REASON)&lt;br /&gt;
1262       cpu     wrap ka_zs040  R       1:12      1 uc3n002&lt;br /&gt;
&lt;br /&gt;
$&lt;br /&gt;
$ # now, see what&#039;s up with my pending job with jobid 1262&lt;br /&gt;
$ &lt;br /&gt;
$ scontrol show job 1262&lt;br /&gt;
&lt;br /&gt;
JobId=1262 JobName=wrap&lt;br /&gt;
   UserId=ka_zs0402(241992) GroupId=ka_scc(12345) MCS_label=N/A&lt;br /&gt;
   Priority=4246 Nice=0 Account=ka QOS=normal&lt;br /&gt;
   JobState=RUNNING Reason=None Dependency=(null)&lt;br /&gt;
   Requeue=1 Restarts=0 BatchFlag=1 Reboot=0 ExitCode=0:0&lt;br /&gt;
   RunTime=00:00:37 TimeLimit=00:20:00 TimeMin=N/A&lt;br /&gt;
   SubmitTime=2025-04-04T10:01:30 EligibleTime=2025-04-04T10:01:30&lt;br /&gt;
   AccrueTime=2025-04-04T10:01:30&lt;br /&gt;
   StartTime=2025-04-04T10:01:31 EndTime=2025-04-04T10:21:31 Deadline=N/A&lt;br /&gt;
   SuspendTime=None SecsPreSuspend=0 LastSchedEval=2025-04-04T10:01:31 Scheduler=Main&lt;br /&gt;
   Partition=cpu AllocNode:Sid=uc3n999:2819841&lt;br /&gt;
   ReqNodeList=(null) ExcNodeList=(null)&lt;br /&gt;
   NodeList=uc3n002&lt;br /&gt;
   BatchHost=uc3n002&lt;br /&gt;
   NumNodes=1 NumCPUs=2 NumTasks=1 CPUs/Task=1 ReqB:S:C:T=0:0:*:*&lt;br /&gt;
   ReqTRES=cpu=1,mem=2000M,node=1,billing=1&lt;br /&gt;
   AllocTRES=cpu=2,mem=4000M,node=1,billing=2&lt;br /&gt;
   Socks/Node=* NtasksPerN:B:S:C=0:0:*:1 CoreSpec=*&lt;br /&gt;
   MinCPUsNode=1 MinMemoryCPU=2000M MinTmpDiskNode=0&lt;br /&gt;
   Features=(null) DelayBoot=00:00:00&lt;br /&gt;
   OverSubscribe=OK Contiguous=0 Licenses=(null) Network=(null)&lt;br /&gt;
   Command=(null)&lt;br /&gt;
   WorkDir=/pfs/data6/home/ka/ka_scc/ka_zs0402&lt;br /&gt;
   StdErr=/pfs/data6/home/ka/ka_scc/ka_zs0402/slurm-1262.out&lt;br /&gt;
   StdIn=/dev/null&lt;br /&gt;
   StdOut=/pfs/data6/home/ka/ka_scc/ka_zs0402/slurm-1262.out&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=== Canceling own jobs : scancel ===&lt;br /&gt;
The scancel command is used to cancel jobs. The command scancel is explained in detail on the webpage https://slurm.schedmd.com/scancel.html or via manpage (man scancel). The command is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ scancel [-i] &amp;lt;job-id&amp;gt;&lt;br /&gt;
$ scancel -t &amp;lt;job_state_name&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Slurm Options =&lt;br /&gt;
[[BwUniCluster3.0/Running_Jobs/Slurm | Detailed Slurm usage]]&lt;br /&gt;
&lt;br /&gt;
= Best Practices =&lt;br /&gt;
&lt;br /&gt;
== Step-by-Step example==&lt;br /&gt;
&lt;br /&gt;
== Dos and Don&#039;ts ==&lt;/div&gt;</summary>
		<author><name>P Schuhmacher</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster3.0/Batch_Queues&amp;diff=15198</id>
		<title>BwUniCluster3.0/Batch Queues</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster3.0/Batch_Queues&amp;diff=15198"/>
		<updated>2025-08-13T12:37:00Z</updated>

		<summary type="html">&lt;p&gt;P Schuhmacher: /* Regular Queues */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{|style=&amp;quot;background:#FEF4AB; width:100%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;padding:5px; background:#FEF4AB; text-align:left&amp;quot;|&lt;br /&gt;
This page is work in progress.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Partitions, Queues and Jobs==&lt;br /&gt;
&lt;br /&gt;
=== Partitions ===&lt;br /&gt;
Slurm manages job queues for different &#039;&#039;&#039;partitions&#039;&#039;&#039;. Partitions are used to group similar node types (e.g. nodes with and without accelerators) and to enforce different access policies and resource limits.&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 3.0 there are different partitions:&lt;br /&gt;
&lt;br /&gt;
* CPU-only nodes&lt;br /&gt;
** 2-socket nodes, consisting of 2 Intel Ice Lake processors with 32 cores each or 2 AMD processors with 48 cores each&lt;br /&gt;
** 2-socket nodes with very high RAM capacity, consisting of 2 AMD processors with 48 cores each&lt;br /&gt;
* GPU-accelerated nodes&lt;br /&gt;
** 2-socket nodes with 4x NVIDIA A100 or 4x NVIDIA H100 GPUs&lt;br /&gt;
** 4-socket node with 4x AMD Instinct accelerator&lt;br /&gt;
&lt;br /&gt;
=== Queues ===&lt;br /&gt;
&lt;br /&gt;
Job &#039;&#039;&#039;queues&#039;&#039;&#039; are used to manage jobs that request access to shared but limited computing resources of a certain kind (partition).&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 3.0 there are different main types of queues:&lt;br /&gt;
* Regular queues&lt;br /&gt;
** cpu: Jobs that request nodes without GPUs. Normal or very high memory capacity.&lt;br /&gt;
** gpu: Jobs that request GPU accelerators on one or more than one node.&lt;br /&gt;
* Development queues (dev)&lt;br /&gt;
** Short, usually interactive jobs that are used for developing, compiling and testing code and workflows. The intention behind development queues is to provide users with immediate access to computer resources without having to wait. This is the place to realize instantaneous heavy compute without affecting other users, as would be the case on the login nodes.&lt;br /&gt;
&lt;br /&gt;
Requested compute resources such as (wall-)time, number of nodes and amount of memory are restricted and must fit into the boundaries imposed by the queues. The request for compute resources on the bwUniCluster 3.0 &amp;lt;font color=red&amp;gt;requires at least the specification of the &#039;&#039;&#039;queue&#039;&#039;&#039; and the &#039;&#039;&#039;time&#039;&#039;&#039;&amp;lt;/font&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Jobs ===&lt;br /&gt;
&lt;br /&gt;
Jobs can be run non-interactively as &#039;&#039;&#039;batch jobs&#039;&#039;&#039; or as &#039;&#039;&#039;interactive jobs&#039;&#039;&#039;.&lt;br /&gt;
Submitting a batch job means, that all steps of a compute project are defined in a Bash script. This Bash script is queued and executed as soon as the compute resources are available and allocated. Jobs are enqueued with the &#039;&#039;sbatch&#039;&#039; command.&lt;br /&gt;
&lt;br /&gt;
For interactive jobs, the resources are requested with the &#039;&#039;salloc&#039;&#039; command. As soon as the computing resources are available and allocated, a command line prompt is returned on a computing node and the user can freely dispose of the resources now available to him.&lt;br /&gt;
{|style=&amp;quot;background:#deffee; width:100%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;padding:5px; background:#cef2e0; text-align:left&amp;quot;|&lt;br /&gt;
[[Image:Attention.svg|center|25px]]&lt;br /&gt;
|style=&amp;quot;padding:5px; background:#cef2e0; text-align:left&amp;quot;|&lt;br /&gt;
&#039;&#039;&#039;Please remember:&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Heavy computations are not allowed on the login nodes&#039;&#039;&#039;.&amp;lt;br&amp;gt;Use a developement or a regular job queue instead! Please refer to [[BwUniCluster2.0/Login#Allowed_Activities_on_Login_Nodes|Allowed Activities on Login Nodes]].&lt;br /&gt;
* &#039;&#039;&#039;Development queues&#039;&#039;&#039; are meant for &#039;&#039;&#039;development tasks&#039;&#039;&#039;.&amp;lt;br&amp;gt;Do not misuse this queue for regular, short-running jobs or chain jobs! Only one running job at a time is enabled. Maximum queue length is reduced to 3.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Batch Jobs: sbatch ==&lt;br /&gt;
&lt;br /&gt;
=== Regular Queues ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
! style=&amp;quot;width:5%&amp;quot;| queue&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| node&lt;br /&gt;
! style=&amp;quot;width:23%&amp;quot;| default resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| minimal resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| maximum resources&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;cpu_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Ice Lake&lt;br /&gt;
| mem-per-cpu=1950mb&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=80, mem=249600mb, ntasks-per-node=64, (threads-per-core=2) &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;cpu&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Standard&lt;br /&gt;
| mem-per-cpu=1125mb&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=70, mem=380000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;highmem&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;High Memory&lt;br /&gt;
| mem-per-cpu=1125mb&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=4, mem=2300000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;gpu_h100&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;NVIDIA GPU x4&lt;br /&gt;
| mem-per-cpu=1125mb&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=12, mem=760000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;gpu_mi300&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU node&amp;lt;br/&amp;gt;AMD GPU x4&lt;br /&gt;
| mem-per-cpu=1125mb&amp;lt;br/&amp;gt;cpus-per-gpu=24&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=1, mem=510000mb, ntasks-per-node=40, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;gpu_a100_il&amp;lt;/code&amp;gt;/&amp;lt;code&amp;gt;gpu_h100_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;Ice Lake&amp;lt;br/&amp;gt;NVIDIA GPU x4&lt;br /&gt;
| mem-per-gpu=127500mb&amp;lt;br/&amp;gt;cpus-per-gpu=16&lt;br /&gt;
| &lt;br /&gt;
| time=48:00:00, nodes=9(A100)/nodes=5(H100), mem=510000mb, ntasks-per-node=64, (threads-per-core=2) &lt;br /&gt;
|}&lt;br /&gt;
Table 1: Regular Queues&lt;br /&gt;
&lt;br /&gt;
=== Development Queues ===&lt;br /&gt;
Only for development, i.e. debugging or performance optimization ...&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
! style=&amp;quot;width:5%&amp;quot;| queue&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| node&lt;br /&gt;
! style=&amp;quot;width:23%&amp;quot;| default resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| minimal resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| maximum resources&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_cpu_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Ice Lake&lt;br /&gt;
| mem-per-cpu=1950mb&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=8, mem=249600mb, ntasks-per-node=64, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_cpu&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Standard&lt;br /&gt;
| mem-per-cpu=1125mb&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=180000mb, ntasks-per-node=40, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_highmem&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;High Memory&lt;br /&gt;
| mem-per-cpu=1125mb&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=180000mb, ntasks-per-node=40, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_gpu_h100&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;NVIDIA GPU x4&lt;br /&gt;
| mem-per-cpu=1125mb&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=180000mb, ntasks-per-node=40, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_gpu_a100_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;NVIDIA GPU x4&amp;lt;br/&amp;gt;&lt;br /&gt;
| mem-per-gpu=127500mb&amp;lt;br/&amp;gt;cpus-per-gpu=16 &lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=510000mb, ntasks-per-node=64, (threads-per-core=2) &lt;br /&gt;
|}&lt;br /&gt;
Table 2: Development Queues&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Default resources of a queue class defines time, #tasks and memory if not explicitly given with sbatch command. Resource list acronyms &#039;&#039;--time&#039;&#039;, &#039;&#039;--ntasks&#039;&#039;, &#039;&#039;--nodes&#039;&#039;, &#039;&#039;--mem&#039;&#039; and &#039;&#039;--mem-per-cpu&#039;&#039; are described [[BwUniCluster_2.0_Slurm_common_Features|here]].&lt;br /&gt;
&lt;br /&gt;
=== Queue class examples ===&lt;br /&gt;
&lt;br /&gt;
To run your batch job on one of the cpu nodes, please use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sbatch --partition=dev_cpu&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Interactive Jobs: salloc ==&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 3.0 you are only allowed to run short jobs (&amp;lt;&amp;lt; 1 hour) with little memory requirements (&amp;lt;&amp;lt; 8 GByte) on the logins nodes. If you want to run longer jobs and/or jobs with a request of more than 8 GByte of memory, you must allocate resources for so-called interactive jobs by usage of the command salloc on a login node. Considering a serial application running on a compute node that requires 5000 MByte of memory and limiting the interactive run to 2 hours the following command has to be executed:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ salloc -p cpu -n 1 -t 120 --mem=5000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then you will get one core on a compute node within the partition &amp;quot;single&amp;quot;. After execution of this command &#039;&#039;&#039;DO NOT CLOSE&#039;&#039;&#039; your current terminal session but wait until the queueing system Slurm has granted you the requested resources on the compute system. You will be logged in automatically on the granted core! To run a serial program on the granted core you only have to type the name of the executable.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./&amp;lt;my_serial_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please be aware that your serial job must run less than 2 hours in this example, else the job will be killed during runtime by the system. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can also start now a graphical X11-terminal connecting you to the dedicated resource that is available for 2 hours. You can start it by the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ xterm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that, once the walltime limit has been reached the resources - i.e. the compute node - will automatically be revoked.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
An interactive parallel application running on one compute node or on many compute nodes (e.g. here 5 nodes) with 40 cores each requires usually an amount of memory in GByte (e.g. 50 GByte) and a maximum time (e.g. 1 hour). E.g. 5 nodes can be allocated by the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ salloc -p cpu -N 5 --ntasks-per-node=40 -t 01:00:00  --mem=50gb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you can run parallel jobs on 200 cores requiring 50 GByte of memory per node. Please be aware that you will be logged in on core 0 of the first node.&lt;br /&gt;
If you want to have access to another node you have to open a new terminal, connect it also to bwUniCluster 3.0 and type the following commands to&lt;br /&gt;
connect to the running interactive job and then to a specific node:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ srun --jobid=XXXXXXXX --pty /bin/bash&lt;br /&gt;
$ srun --nodelist=uc2nXXX --pty /bin/bash&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ squeue&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the jobid and the nodelist can be shown.&lt;br /&gt;
&lt;br /&gt;
If you want to run MPI-programs, you can do it by simply typing mpirun &amp;lt;program_name&amp;gt;. Then your program will be run on 200 cores. A very simple example for starting a parallel job can be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mpirun &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also start the debugger ddt by the commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module add devel/ddt&lt;br /&gt;
$ ddt &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above commands will execute the parallel program &amp;lt;my_mpi_program&amp;gt; on all available cores. You can also start parallel programs on a subset of cores; an example for this can be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mpirun -n 50 &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are using Intel MPI you must start &amp;lt;my_mpi_program&amp;gt; by the command mpiexec.hydra (instead of mpirun).&lt;/div&gt;</summary>
		<author><name>P Schuhmacher</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster3.0/Batch_Queues&amp;diff=15197</id>
		<title>BwUniCluster3.0/Batch Queues</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster3.0/Batch_Queues&amp;diff=15197"/>
		<updated>2025-08-13T12:36:25Z</updated>

		<summary type="html">&lt;p&gt;P Schuhmacher: /* Regular Queues */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{|style=&amp;quot;background:#FEF4AB; width:100%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;padding:5px; background:#FEF4AB; text-align:left&amp;quot;|&lt;br /&gt;
This page is work in progress.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Partitions, Queues and Jobs==&lt;br /&gt;
&lt;br /&gt;
=== Partitions ===&lt;br /&gt;
Slurm manages job queues for different &#039;&#039;&#039;partitions&#039;&#039;&#039;. Partitions are used to group similar node types (e.g. nodes with and without accelerators) and to enforce different access policies and resource limits.&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 3.0 there are different partitions:&lt;br /&gt;
&lt;br /&gt;
* CPU-only nodes&lt;br /&gt;
** 2-socket nodes, consisting of 2 Intel Ice Lake processors with 32 cores each or 2 AMD processors with 48 cores each&lt;br /&gt;
** 2-socket nodes with very high RAM capacity, consisting of 2 AMD processors with 48 cores each&lt;br /&gt;
* GPU-accelerated nodes&lt;br /&gt;
** 2-socket nodes with 4x NVIDIA A100 or 4x NVIDIA H100 GPUs&lt;br /&gt;
** 4-socket node with 4x AMD Instinct accelerator&lt;br /&gt;
&lt;br /&gt;
=== Queues ===&lt;br /&gt;
&lt;br /&gt;
Job &#039;&#039;&#039;queues&#039;&#039;&#039; are used to manage jobs that request access to shared but limited computing resources of a certain kind (partition).&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 3.0 there are different main types of queues:&lt;br /&gt;
* Regular queues&lt;br /&gt;
** cpu: Jobs that request nodes without GPUs. Normal or very high memory capacity.&lt;br /&gt;
** gpu: Jobs that request GPU accelerators on one or more than one node.&lt;br /&gt;
* Development queues (dev)&lt;br /&gt;
** Short, usually interactive jobs that are used for developing, compiling and testing code and workflows. The intention behind development queues is to provide users with immediate access to computer resources without having to wait. This is the place to realize instantaneous heavy compute without affecting other users, as would be the case on the login nodes.&lt;br /&gt;
&lt;br /&gt;
Requested compute resources such as (wall-)time, number of nodes and amount of memory are restricted and must fit into the boundaries imposed by the queues. The request for compute resources on the bwUniCluster 3.0 &amp;lt;font color=red&amp;gt;requires at least the specification of the &#039;&#039;&#039;queue&#039;&#039;&#039; and the &#039;&#039;&#039;time&#039;&#039;&#039;&amp;lt;/font&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Jobs ===&lt;br /&gt;
&lt;br /&gt;
Jobs can be run non-interactively as &#039;&#039;&#039;batch jobs&#039;&#039;&#039; or as &#039;&#039;&#039;interactive jobs&#039;&#039;&#039;.&lt;br /&gt;
Submitting a batch job means, that all steps of a compute project are defined in a Bash script. This Bash script is queued and executed as soon as the compute resources are available and allocated. Jobs are enqueued with the &#039;&#039;sbatch&#039;&#039; command.&lt;br /&gt;
&lt;br /&gt;
For interactive jobs, the resources are requested with the &#039;&#039;salloc&#039;&#039; command. As soon as the computing resources are available and allocated, a command line prompt is returned on a computing node and the user can freely dispose of the resources now available to him.&lt;br /&gt;
{|style=&amp;quot;background:#deffee; width:100%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;padding:5px; background:#cef2e0; text-align:left&amp;quot;|&lt;br /&gt;
[[Image:Attention.svg|center|25px]]&lt;br /&gt;
|style=&amp;quot;padding:5px; background:#cef2e0; text-align:left&amp;quot;|&lt;br /&gt;
&#039;&#039;&#039;Please remember:&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Heavy computations are not allowed on the login nodes&#039;&#039;&#039;.&amp;lt;br&amp;gt;Use a developement or a regular job queue instead! Please refer to [[BwUniCluster2.0/Login#Allowed_Activities_on_Login_Nodes|Allowed Activities on Login Nodes]].&lt;br /&gt;
* &#039;&#039;&#039;Development queues&#039;&#039;&#039; are meant for &#039;&#039;&#039;development tasks&#039;&#039;&#039;.&amp;lt;br&amp;gt;Do not misuse this queue for regular, short-running jobs or chain jobs! Only one running job at a time is enabled. Maximum queue length is reduced to 3.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Batch Jobs: sbatch ==&lt;br /&gt;
&lt;br /&gt;
=== Regular Queues ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
! style=&amp;quot;width:5%&amp;quot;| queue&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| node&lt;br /&gt;
! style=&amp;quot;width:23%&amp;quot;| default resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| minimal resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| maximum resources&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;cpu_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Ice Lake&lt;br /&gt;
| mem-per-cpu=1950mb&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=80, mem=249600mb, ntasks-per-node=64, (threads-per-core=2) &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;cpu&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Standard&lt;br /&gt;
| mem-per-cpu=1125mb&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=70, mem=380000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;highmem&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;High Memory&lt;br /&gt;
| mem-per-cpu=1125mb&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=4, mem=2300000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;gpu_h100&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;NVIDIA GPU x4&lt;br /&gt;
| mem-per-cpu=1125mb&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=12, mem=760000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;gpu_mi300&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU node&amp;lt;br/&amp;gt;AMD GPU x4&lt;br /&gt;
| mem-per-cpu=1125mb&amp;lt;br/&amp;gt;cpus-per-gpu=24&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=1, mem=510000mb, ntasks-per-node=40, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;gpu_a100_il&amp;lt;/code&amp;gt;/&amp;lt;code&amp;gt;gpu_h100_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;Ice Lake&amp;lt;br/&amp;gt;NVIDIA GPU x4&lt;br /&gt;
| mem-per-gpu=127500mb&amp;lt;br/&amp;gt;cpus-per-gpu=16&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=9(A100)/nodes=5(H100), mem=510000mb, ntasks-per-node=64, (threads-per-core=2) &lt;br /&gt;
|}&lt;br /&gt;
Table 1: Regular Queues&lt;br /&gt;
&lt;br /&gt;
=== Development Queues ===&lt;br /&gt;
Only for development, i.e. debugging or performance optimization ...&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
! style=&amp;quot;width:5%&amp;quot;| queue&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| node&lt;br /&gt;
! style=&amp;quot;width:23%&amp;quot;| default resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| minimal resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| maximum resources&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_cpu_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Ice Lake&lt;br /&gt;
| mem-per-cpu=1950mb&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=8, mem=249600mb, ntasks-per-node=64, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_cpu&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Standard&lt;br /&gt;
| mem-per-cpu=1125mb&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=180000mb, ntasks-per-node=40, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_highmem&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;High Memory&lt;br /&gt;
| mem-per-cpu=1125mb&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=180000mb, ntasks-per-node=40, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_gpu_h100&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;NVIDIA GPU x4&lt;br /&gt;
| mem-per-cpu=1125mb&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=180000mb, ntasks-per-node=40, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_gpu_a100_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;NVIDIA GPU x4&amp;lt;br/&amp;gt;&lt;br /&gt;
| mem-per-gpu=127500mb&amp;lt;br/&amp;gt;cpus-per-gpu=16 &lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=510000mb, ntasks-per-node=64, (threads-per-core=2) &lt;br /&gt;
|}&lt;br /&gt;
Table 2: Development Queues&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Default resources of a queue class defines time, #tasks and memory if not explicitly given with sbatch command. Resource list acronyms &#039;&#039;--time&#039;&#039;, &#039;&#039;--ntasks&#039;&#039;, &#039;&#039;--nodes&#039;&#039;, &#039;&#039;--mem&#039;&#039; and &#039;&#039;--mem-per-cpu&#039;&#039; are described [[BwUniCluster_2.0_Slurm_common_Features|here]].&lt;br /&gt;
&lt;br /&gt;
=== Queue class examples ===&lt;br /&gt;
&lt;br /&gt;
To run your batch job on one of the cpu nodes, please use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sbatch --partition=dev_cpu&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Interactive Jobs: salloc ==&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 3.0 you are only allowed to run short jobs (&amp;lt;&amp;lt; 1 hour) with little memory requirements (&amp;lt;&amp;lt; 8 GByte) on the logins nodes. If you want to run longer jobs and/or jobs with a request of more than 8 GByte of memory, you must allocate resources for so-called interactive jobs by usage of the command salloc on a login node. Considering a serial application running on a compute node that requires 5000 MByte of memory and limiting the interactive run to 2 hours the following command has to be executed:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ salloc -p cpu -n 1 -t 120 --mem=5000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then you will get one core on a compute node within the partition &amp;quot;single&amp;quot;. After execution of this command &#039;&#039;&#039;DO NOT CLOSE&#039;&#039;&#039; your current terminal session but wait until the queueing system Slurm has granted you the requested resources on the compute system. You will be logged in automatically on the granted core! To run a serial program on the granted core you only have to type the name of the executable.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./&amp;lt;my_serial_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please be aware that your serial job must run less than 2 hours in this example, else the job will be killed during runtime by the system. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can also start now a graphical X11-terminal connecting you to the dedicated resource that is available for 2 hours. You can start it by the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ xterm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that, once the walltime limit has been reached the resources - i.e. the compute node - will automatically be revoked.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
An interactive parallel application running on one compute node or on many compute nodes (e.g. here 5 nodes) with 40 cores each requires usually an amount of memory in GByte (e.g. 50 GByte) and a maximum time (e.g. 1 hour). E.g. 5 nodes can be allocated by the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ salloc -p cpu -N 5 --ntasks-per-node=40 -t 01:00:00  --mem=50gb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you can run parallel jobs on 200 cores requiring 50 GByte of memory per node. Please be aware that you will be logged in on core 0 of the first node.&lt;br /&gt;
If you want to have access to another node you have to open a new terminal, connect it also to bwUniCluster 3.0 and type the following commands to&lt;br /&gt;
connect to the running interactive job and then to a specific node:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ srun --jobid=XXXXXXXX --pty /bin/bash&lt;br /&gt;
$ srun --nodelist=uc2nXXX --pty /bin/bash&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ squeue&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the jobid and the nodelist can be shown.&lt;br /&gt;
&lt;br /&gt;
If you want to run MPI-programs, you can do it by simply typing mpirun &amp;lt;program_name&amp;gt;. Then your program will be run on 200 cores. A very simple example for starting a parallel job can be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mpirun &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also start the debugger ddt by the commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module add devel/ddt&lt;br /&gt;
$ ddt &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above commands will execute the parallel program &amp;lt;my_mpi_program&amp;gt; on all available cores. You can also start parallel programs on a subset of cores; an example for this can be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mpirun -n 50 &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are using Intel MPI you must start &amp;lt;my_mpi_program&amp;gt; by the command mpiexec.hydra (instead of mpirun).&lt;/div&gt;</summary>
		<author><name>P Schuhmacher</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster3.0/Running_Jobs&amp;diff=15196</id>
		<title>BwUniCluster3.0/Running Jobs</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster3.0/Running_Jobs&amp;diff=15196"/>
		<updated>2025-08-13T12:35:24Z</updated>

		<summary type="html">&lt;p&gt;P Schuhmacher: /* Regular Queues */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
= Purpose and function of a queuing system =&lt;br /&gt;
&lt;br /&gt;
All compute activities on bwUniCluster 3.0 have to be performed on the compute nodes. Compute nodes are only available by requesting the corresponding resources via the queuing system. As soon as the requested resources are available, automated tasks are executed via a batch script or they can be accessed interactively.&amp;lt;br&amp;gt;&lt;br /&gt;
General procedure: Hint to [[Running_Calculations | Running Calculations]]&lt;br /&gt;
&lt;br /&gt;
== Job submission process ==&lt;br /&gt;
&lt;br /&gt;
bwUniCluster 3.0 has installed the workload managing software Slurm. Therefore any job submission by the user is to be executed by commands of the Slurm software. Slurm queues and runs user jobs based on fair sharing policies.&lt;br /&gt;
&lt;br /&gt;
== Slurm ==&lt;br /&gt;
&lt;br /&gt;
HPC Workload Manager on bwUniCluster 3.0 is Slurm.&lt;br /&gt;
Slurm is a cluster management and job scheduling system. Slurm has three key functions. &lt;br /&gt;
* It allocates access to resources (compute cores on nodes) to users for some duration of time so they can perform work. &lt;br /&gt;
* It provides a framework for starting, executing, and monitoring work (normally a parallel job) on the set of allocated nodes. &lt;br /&gt;
* It arbitrates contention for resources by managing a queue of pending work.&lt;br /&gt;
&lt;br /&gt;
Any kind of calculation on the compute nodes of bwUniCluster 3.0 requires the user to define calculations as a sequence of commands together with required run time, number of CPU cores and main memory and submit all, i.e., the &#039;&#039;&#039;batch job&#039;&#039;&#039;, to a resource and workload managing software.&lt;br /&gt;
&lt;br /&gt;
== Terms and definitions ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Partitions &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Slurm manages job queues for different &#039;&#039;&#039;partitions&#039;&#039;&#039;. Partitions are used to group similar node types (e.g. nodes with and without accelerators) and to enforce different access policies and resource limits.&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 3.0 there are different partitions:&lt;br /&gt;
&lt;br /&gt;
* CPU-only nodes&lt;br /&gt;
** 2-socket nodes, consisting of 2 Intel Ice Lake processors with 32 cores each or 2 AMD processors with 48 cores each&lt;br /&gt;
** 2-socket nodes with very high RAM capacity, consisting of 2 AMD processors with 48 cores each&lt;br /&gt;
* GPU-accelerated nodes&lt;br /&gt;
** 2-socket nodes with 4x NVIDIA A100 or 4x NVIDIA H100 GPUs&lt;br /&gt;
** 4-socket node with 4x AMD Instinct accelerator&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Queues &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Job &#039;&#039;&#039;queues&#039;&#039;&#039; are used to manage jobs that request access to shared but limited computing resources of a certain kind (partition).&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 3.0 there are different main types of queues:&lt;br /&gt;
* Regular queues&lt;br /&gt;
** cpu: Jobs that request CPU-only nodes.&lt;br /&gt;
** gpu: Jobs that request GPU-accelerated nodes.&lt;br /&gt;
* Development queues (dev)&lt;br /&gt;
** Short, usually interactive jobs that are used for developing, compiling and testing code and workflows. The intention behind development queues is to provide users with immediate access to computer resources without having to wait. This is the place to realize instantaneous heavy compute without affecting other users, as would be the case on the login nodes.&lt;br /&gt;
&lt;br /&gt;
Requested compute resources such as (wall-)time, number of nodes and amount of memory are restricted and must fit into the boundaries imposed by the queues. The request for compute resources on the bwUniCluster 3.0 &amp;lt;font color=red&amp;gt;requires at least the specification of the &#039;&#039;&#039;queue&#039;&#039;&#039; and the &#039;&#039;&#039;time&#039;&#039;&#039;&amp;lt;/font&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Jobs &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Jobs can be run non-interactively as &#039;&#039;&#039;batch jobs&#039;&#039;&#039; or as &#039;&#039;&#039;interactive jobs&#039;&#039;&#039;.&amp;lt;br&amp;gt;&lt;br /&gt;
Submitting a batch job means, that all steps of a compute project are defined in a Bash script. This Bash script is queued and executed as soon as the compute resources are available and allocated. Jobs are enqueued with the &amp;lt;code&amp;gt;sbatch&amp;lt;/code&amp;gt; command.&lt;br /&gt;
For interactive jobs, the resources are requested with the &amp;lt;code&amp;gt;salloc&amp;lt;/code&amp;gt; command. As soon as the computing resources are available and allocated, a command line prompt is returned on a computing node and the user can freely dispose of the resources now available to him.&lt;br /&gt;
{|style=&amp;quot;background:#deffee; width:100%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;padding:5px; background:#cef2e0; text-align:left&amp;quot;|&lt;br /&gt;
[[Image:Attention.svg|center|25px]]&lt;br /&gt;
|style=&amp;quot;padding:5px; background:#cef2e0; text-align:left&amp;quot;|&lt;br /&gt;
&#039;&#039;&#039;Please remember:&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Heavy computations are not allowed on the login nodes&#039;&#039;&#039;.&amp;lt;br&amp;gt;Use a developement or a regular job queue instead! Please refer to [[BwUniCluster3.0/Login#Allowed_Activities_on_Login_Nodes|Allowed Activities on Login Nodes]].&lt;br /&gt;
* &#039;&#039;&#039;Development queues&#039;&#039;&#039; are meant for &#039;&#039;&#039;development tasks&#039;&#039;&#039;.&amp;lt;br&amp;gt;Do not misuse this queue for regular, short-running jobs or chain jobs! Only one running job at a time is enabled. Maximum queue length is reduced to 3.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Queues on bwUniCluster 3.0 = &lt;br /&gt;
== Policy ==&lt;br /&gt;
&lt;br /&gt;
The computing time is provided in accordance with the &#039;&#039;&#039;fair share policy&#039;&#039;&#039;. The individual investment shares of the respective university and the resources already used by its members are taken into account. Furthermore, the following throttling policy is also active: The &#039;&#039;&#039;maximum amount of physical cores&#039;&#039;&#039; used at any given time from jobs running is &#039;&#039;&#039;1920 per user&#039;&#039;&#039; (aggregated over all running jobs). This number corresponds to 30 nodes on the Ice Lake partition or 20 nodes on the standard partition. The aim is to minimize waiting times and maximize the number of users who can access computing time at the same time.&lt;br /&gt;
&lt;br /&gt;
== Regular Queues ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
! style=&amp;quot;width:5%&amp;quot;| Queue&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Node-Type&lt;br /&gt;
! style=&amp;quot;width:23%&amp;quot;| Default Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Minimal Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Maximum Resources&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;cpu_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Ice Lake&lt;br /&gt;
| mem-per-cpu=2000mb&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=30, mem=249600mb, ntasks-per-node=64, (threads-per-core=2) &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;cpu&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Standard&lt;br /&gt;
| mem-per-cpu=2000mb&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=20, mem=380000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;highmem&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;High Memory&lt;br /&gt;
| mem-per-cpu=12090mb&lt;br /&gt;
| mem=380001mb&lt;br /&gt;
| time=72:00:00, nodes=4, mem=2300000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;gpu_h100&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;NVIDIA GPU x4&lt;br /&gt;
| mem-per-gpu=193300mb&amp;lt;br/&amp;gt;cpus-per-gpu=24&lt;br /&gt;
| gres=gpu:1&lt;br /&gt;
| time=72:00:00, nodes=12, mem=760000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;gpu_mi300&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU node&amp;lt;br/&amp;gt;AMD GPU x4&lt;br /&gt;
| mem-per-gpu=128200mb&amp;lt;br/&amp;gt;cpus-per-gpu=24&lt;br /&gt;
| gres=gpu:1&lt;br /&gt;
| time=72:00:00, nodes=1, mem=510000mb, ntasks-per-node=40, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;gpu_a100_il&amp;lt;/code&amp;gt;/&amp;lt;code&amp;gt;gpu_h100_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;Ice Lake&amp;lt;br/&amp;gt;NVIDIA GPU x4&lt;br /&gt;
| mem-per-gpu=127500mb&amp;lt;br/&amp;gt;cpus-per-gpu=16&lt;br /&gt;
| gres=gpu:1&lt;br /&gt;
| time=48:00:00, nodes=9(A100)/nodes=5(H100) , mem=510000mb, ntasks-per-node=64, (threads-per-core=2) &lt;br /&gt;
|}&lt;br /&gt;
Table 1: Regular Queues&lt;br /&gt;
&lt;br /&gt;
== Short Queues ==&lt;br /&gt;
&amp;lt;p style=&amp;quot;color:red; &amp;quot;&amp;gt;&amp;lt;b&amp;gt;Queues with a short runtime of 30 minutes.&amp;lt;/b&amp;gt;&amp;lt;/p&amp;gt; &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
! style=&amp;quot;width:5%&amp;quot;| Queue&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Node Type&lt;br /&gt;
! style=&amp;quot;width:23%&amp;quot;| Default Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Minimal Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Maximum Resources&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;gpu_a100_short&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;Ice Lake&amp;lt;br/&amp;gt;NVIDIA GPU x4&lt;br /&gt;
| mem-per-gpu=94000mb&amp;lt;br/&amp;gt;cpus-per-gpu=12&lt;br /&gt;
| gres=gpu:1&lt;br /&gt;
| time=30, nodes=12, mem=376000mb, ntasks-per-node=48, (threads-per-core=2)&lt;br /&gt;
|}&lt;br /&gt;
Table 2: Short Queues&lt;br /&gt;
&lt;br /&gt;
== Development Queues ==&lt;br /&gt;
Only for development, i.e. debugging or performance optimization ...&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
! style=&amp;quot;width:5%&amp;quot;| Queue&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Node Type&lt;br /&gt;
! style=&amp;quot;width:23%&amp;quot;| Default Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Minimal Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Maximum Resources&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_cpu_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Ice Lake&lt;br /&gt;
| mem-per-cpu=2000mb&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=8, mem=249600mb, ntasks-per-node=64, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_cpu&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Standard&lt;br /&gt;
| mem-per-cpu=2000mb&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=380000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_gpu_h100&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;NVIDIA GPU x4&lt;br /&gt;
| mem-per-gpu=193300mb&amp;lt;br/&amp;gt;cpus-per-gpu=24&lt;br /&gt;
| gres=gpu:1&lt;br /&gt;
| time=30, nodes=1, mem=760000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_gpu_a100_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;NVIDIA GPU x4&amp;lt;br/&amp;gt;&lt;br /&gt;
| mem-per-gpu=127500mb&amp;lt;br/&amp;gt;cpus-per-gpu=16 &lt;br /&gt;
| gres=gpu:1&lt;br /&gt;
| time=30, nodes=1, mem=510000mb, ntasks-per-node=64, (threads-per-core=2) &lt;br /&gt;
|}&lt;br /&gt;
Table 3: Development Queues&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Default resources of a queue class define number of tasks and memory if not explicitly given with sbatch command. Resource list acronyms &#039;&#039;--time&#039;&#039;, &#039;&#039;--ntasks&#039;&#039;, &#039;&#039;--nodes&#039;&#039;, &#039;&#039;--mem&#039;&#039; and &#039;&#039;--mem-per-cpu&#039;&#039; are described [[BwUniCluster3.0/Running_Jobs/Slurm|here]].&lt;br /&gt;
&lt;br /&gt;
== Check available resources: sinfo_t_idle ==&lt;br /&gt;
The Slurm command sinfo is used to view partition and node information for a system running Slurm. It incorporates down time, reservations, and node state information in determining the available backfill window. The sinfo command can only be used by the administrator.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
SCC has prepared a special script (sinfo_t_idle) to find out how many processors are available for immediate use on the system. It is anticipated that users will use this information to submit jobs that meet these criteria and thus obtain quick job turnaround times. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The following command displays what resources are available for immediate use for the whole partition.&lt;br /&gt;
&amp;lt;pre&amp;gt;$ sinfo_t_idle &lt;br /&gt;
Partition dev_cpu                 :      1 nodes idle&lt;br /&gt;
Partition cpu                     :      1 nodes idle&lt;br /&gt;
Partition highmem                 :      2 nodes idle&lt;br /&gt;
Partition dev_gpu_h100            :      0 nodes idle&lt;br /&gt;
Partition gpu_h100                :      0 nodes idle&lt;br /&gt;
Partition gpu_mi300               :      0 nodes idle&lt;br /&gt;
Partition dev_cpu_il              :      7 nodes idle&lt;br /&gt;
Partition cpu_il                  :      2 nodes idle&lt;br /&gt;
Partition dev_gpu_a100_il         :      1 nodes idle&lt;br /&gt;
Partition gpu_a100_il             :      0 nodes idle&lt;br /&gt;
Partition gpu_h100_il             :      1 nodes idle&lt;br /&gt;
Partition gpu_a100_short          :      0 nodes idle&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Running Jobs =&lt;br /&gt;
&lt;br /&gt;
== Slurm Commands (excerpt) ==&lt;br /&gt;
Important Slurm commands for non-administrators working on bwUniCluster 3.0.&lt;br /&gt;
{| width=850px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Slurm commands !! Brief explanation&lt;br /&gt;
|-&lt;br /&gt;
| [[#Batch Jobs: sbatch|sbatch]] || Submits a job and puts it into the queue [[https://slurm.schedmd.com/sbatch.html sbatch]] &lt;br /&gt;
|-&lt;br /&gt;
| [[#Interactive Jobs: salloc|salloc]] || Requests resources for an interactive Job [[https://slurm.schedmd.com/salloc.html salloc]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Monitor and manage jobs |scontrol show job]] || Displays detailed job state information [[https://slurm.schedmd.com/scontrol.html scontrol]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#List of your submitted jobs : squeue|squeue]] || Displays information about active, eligible, blocked, and/or recently completed jobs [[https://slurm.schedmd.com/squeue.html squeue]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#List of your submitted jobs : squeue|squeue --start]] || Returns start time of submitted job [[https://slurm.schedmd.com/squeue.html squeue]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Check available resources: sinfo_t_idle|sinfo_t_idle]] || Shows what resources are available for immediate use [[https://slurm.schedmd.com/sinfo.html sinfo]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Canceling own jobs : scancel|scancel]] || Cancels a job [[https://slurm.schedmd.com/scancel.html scancel]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* [https://slurm.schedmd.com/tutorials.html  Slurm Tutorials]&lt;br /&gt;
* [https://slurm.schedmd.com/pdfs/summary.pdf  Slurm command/option summary (2 pages)]&lt;br /&gt;
* [https://slurm.schedmd.com/man_index.html  Slurm Commands]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Batch Jobs: sbatch ==&lt;br /&gt;
&lt;br /&gt;
Batch jobs are submitted by using the command &#039;&#039;&#039;sbatch&#039;&#039;&#039;. The main purpose of the &#039;&#039;&#039;sbatch&#039;&#039;&#039; command is to specify the resources that are needed to run the job. &#039;&#039;&#039;sbatch&#039;&#039;&#039; will then queue the batch job. However, starting of batch job depends on the availability of the requested resources and the fair sharing value.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The syntax and use of &#039;&#039;&#039;sbatch&#039;&#039;&#039; can be displayed via:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ man sbatch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;sbatch&#039;&#039;&#039; options can be used from the command line or in your job script. Different defaults for some of these options are set based on the queue and can be found [[BwUniCluster3.0/Slurm | here]]&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | sbatch Options&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width:8%&amp;quot;| Command line&lt;br /&gt;
! style=&amp;quot;width:9%&amp;quot;| Script&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Purpose&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -t, --time=&#039;&#039;time&#039;&#039;&lt;br /&gt;
| #SBATCH --time=&#039;&#039;time&#039;&#039;&lt;br /&gt;
| Wall clock time limit.&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -N, --nodes=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --nodes=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of nodes to be used.&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -n, --ntasks=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --ntasks=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of tasks to be launched.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --ntasks-per-node=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --ntasks-per-node=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Maximum count of tasks per node.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -c, --cpus-per-task=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --cpus-per-task=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of CPUs required per (MPI-)task.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mem=&#039;&#039;value_in_MB&#039;&#039;&lt;br /&gt;
| #SBATCH --mem=&#039;&#039;value_in_MB&#039;&#039; &lt;br /&gt;
| Memory in MegaByte per node. (You should omit the setting of this option.)&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mem-per-cpu=&#039;&#039;value_in_MB&#039;&#039;&lt;br /&gt;
| #SBATCH --mem-per-cpu=&#039;&#039;value_in_MB&#039;&#039; &lt;br /&gt;
| Minimum Memory required per allocated CPU. (You should omit the setting of this option.)&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mail-type=&#039;&#039;type&#039;&#039;&lt;br /&gt;
| #SBATCH --mail-type=&#039;&#039;type&#039;&#039;&lt;br /&gt;
| Notify user by email when certain event types occur.&amp;lt;br&amp;gt;Valid type values are NONE, BEGIN, END, FAIL, REQUEUE, ALL.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mail-user=&#039;&#039;mail-address&#039;&#039;&lt;br /&gt;
| #SBATCH --mail-user=&#039;&#039;mail-address&#039;&#039;&lt;br /&gt;
|  The specified mail-address receives email notification of state changes as defined by --mail-type.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --output=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --output=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| File in which job output is stored. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --error=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --error=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| File in which job error messages are stored. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -J, --job-name=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --job-name=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| Job name.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --export=[ALL,] &#039;&#039;env-variables&#039;&#039;&lt;br /&gt;
| #SBATCH --export=[ALL,] &#039;&#039;env-variables&#039;&#039;&lt;br /&gt;
| Identifies which environment variables from the submission environment are propagated to the launched application. Default is ALL.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -A, --account=&#039;&#039;group-name&#039;&#039;&lt;br /&gt;
| #SBATCH --account=&#039;&#039;group-name&#039;&#039;&lt;br /&gt;
| Change resources used by this job to specified group. You may need this option if your account is assigned to more than one group. By command &amp;quot;scontrol show job&amp;quot; the project group the job is accounted on can be seen behind &amp;quot;Account=&amp;quot;. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -p, --partition=&#039;&#039;queue-name&#039;&#039;&lt;br /&gt;
| #SBATCH --partition=&#039;&#039;queue-name&#039;&#039;&lt;br /&gt;
| Request a specific queue for the resource allocation.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --reservation=&#039;&#039;reservation-name&#039;&#039;&lt;br /&gt;
| #SBATCH --reservation=&#039;&#039;reservation-name&#039;&#039;&lt;br /&gt;
| Use a specific reservation for the resource allocation.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -C, --constraint=&#039;&#039;LSDF&#039;&#039;&lt;br /&gt;
| #SBATCH --constraint=LSDF&lt;br /&gt;
| Job constraint LSDF filesystems.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -C, --constraint=&#039;&#039;BEEOND (BEEOND_4MDS, BEEOND_MAXMDS)&#039;&#039;&lt;br /&gt;
| #SBATCH --constraint=BEEOND (BEEOND_4MDS, BEEOND_MAXMDS)&lt;br /&gt;
| Job constraint BeeOND filesystem.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Interactive Jobs: salloc ==&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 3.0 you are only allowed to run short jobs (&amp;lt;&amp;lt; 1 hour) with little memory requirements (&amp;lt;&amp;lt; 8 GByte) on the logins nodes. If you want to run longer jobs and/or jobs with a request of more than 8 GByte of memory, you must allocate resources for so-called interactive jobs by usage of the command salloc on a login node. Considering a serial application running on a compute node that requires 5000 MByte of memory and limiting the interactive run to 2 hours the following command has to be executed:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ salloc -p cpu -n 1 -t 120 --mem=5000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then you will get one core on a compute node within the partition &amp;quot;cpu&amp;quot;. After execution of this command &#039;&#039;&#039;DO NOT CLOSE&#039;&#039;&#039; your current terminal session but wait until the queueing system Slurm has granted you the requested resources on the compute system. You will be logged in automatically on the granted core! To run a serial program on the granted core you only have to type the name of the executable.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./&amp;lt;my_serial_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please be aware that your serial job must run less than 2 hours in this example, else the job will be killed during runtime by the system. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can also start now a graphical X11-terminal connecting you to the dedicated resource that is available for 2 hours. You can start it by the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ xterm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that, once the walltime limit has been reached the resources - i.e. the compute node - will automatically be revoked.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
An interactive parallel application running on one compute node or on many compute nodes (e.g. here 5 nodes) with 96 cores each requires usually an amount of memory in GByte (e.g. 50 GByte) and a maximum time (e.g. 1 hour). E.g. 5 nodes can be allocated by the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ salloc -p cpu -N 5 --ntasks-per-node=96 -t 01:00:00  --mem=50gb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you can run parallel jobs on 480 cores requiring 50 GByte of memory per node. Please be aware that you will be logged in on core 0 of the first node.&lt;br /&gt;
If you want to have access to another node you have to open a new terminal, connect it also to bwUniCluster 3.0 and type the following commands to&lt;br /&gt;
connect to the running interactive job and then to a specific node:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ srun --jobid=XXXXXXXX --pty /bin/bash&lt;br /&gt;
$ srun --nodelist=uc3nXXX --pty /bin/bash&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ squeue&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the jobid and the nodelist can be shown.&lt;br /&gt;
&lt;br /&gt;
If you want to run MPI-programs, you can do it by simply typing mpirun &amp;lt;program_name&amp;gt;. Then your program will be run on 480 cores. A very simple example for starting a parallel job can be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mpirun &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also start the debugger ddt by the commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module add devel/ddt&lt;br /&gt;
$ ddt &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above commands will execute the parallel program &amp;lt;my_mpi_program&amp;gt; on all available cores. You can also start parallel programs on a subset of cores; an example for this can be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mpirun -n 50 &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are using Intel MPI you must start &amp;lt;my_mpi_program&amp;gt; by the command mpiexec.hydra (instead of mpirun).&lt;br /&gt;
&lt;br /&gt;
== Interactive Computing with Jupyter ==&lt;br /&gt;
&lt;br /&gt;
== Monitor and manage jobs ==&lt;br /&gt;
&lt;br /&gt;
=== List of your submitted jobs : squeue ===&lt;br /&gt;
Displays information about YOUR active, pending and/or recently completed jobs. The command displays all own active and pending jobs. The command squeue is explained in detail on the webpage https://slurm.schedmd.com/squeue.html or via manpage (man squeue).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;squeue&#039;&#039; example on bwUniCluster 3.0 &amp;lt;small&amp;gt;(Only your own jobs are displayed!)&amp;lt;/small&amp;gt;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ squeue &lt;br /&gt;
             JOBID PARTITION     NAME     USER ST       TIME  NODES NODELIST(REASON)&lt;br /&gt;
              1262       cpu     wrap ka_ab123  R       8:15      1 uc3n002&lt;br /&gt;
              1267 dev_gpu_h     wrap ka_ab123 PD       0:00      1 (Resources)&lt;br /&gt;
              1265   highmem     wrap ka_ab123  R       2:41      1 uc3n084&lt;br /&gt;
$ squeue -l&lt;br /&gt;
             JOBID PARTITION     NAME     USER    STATE       TIME TIME_LIMI  NODES NODELIST(REASON)&lt;br /&gt;
              1262       cpu     wrap ka_ab123  RUNNING       8:55     20:00      1 uc3n002&lt;br /&gt;
              1267 dev_gpu_h     wrap ka_ab123  PENDING       0:00     20:00      1 (Resources)&lt;br /&gt;
              1265   highmem     wrap ka_ab123  RUNNING       3:21     20:00      1 uc3n084&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Detailed job information : scontrol show job ===&lt;br /&gt;
scontrol show job displays detailed job state information and diagnostic output for all or a specified job of yours. Detailed information is available for active, pending and recently completed jobs. The command scontrol is explained in detail on the webpage https://slurm.schedmd.com/scontrol.html or via manpage (man scontrol). &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Display the state of all your jobs in normal mode: scontrol show job&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Display the state of a job with &amp;lt;jobid&amp;gt; in normal mode: scontrol show job &amp;lt;jobid&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Here is an example from bwUniCluster 3.0.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ squeue&lt;br /&gt;
JOBID PARTITION     NAME     USER ST       TIME  NODES NODELIST(REASON)&lt;br /&gt;
1262       cpu     wrap ka_zs040  R       1:12      1 uc3n002&lt;br /&gt;
&lt;br /&gt;
$&lt;br /&gt;
$ # now, see what&#039;s up with my pending job with jobid 1262&lt;br /&gt;
$ &lt;br /&gt;
$ scontrol show job 1262&lt;br /&gt;
&lt;br /&gt;
JobId=1262 JobName=wrap&lt;br /&gt;
   UserId=ka_zs0402(241992) GroupId=ka_scc(12345) MCS_label=N/A&lt;br /&gt;
   Priority=4246 Nice=0 Account=ka QOS=normal&lt;br /&gt;
   JobState=RUNNING Reason=None Dependency=(null)&lt;br /&gt;
   Requeue=1 Restarts=0 BatchFlag=1 Reboot=0 ExitCode=0:0&lt;br /&gt;
   RunTime=00:00:37 TimeLimit=00:20:00 TimeMin=N/A&lt;br /&gt;
   SubmitTime=2025-04-04T10:01:30 EligibleTime=2025-04-04T10:01:30&lt;br /&gt;
   AccrueTime=2025-04-04T10:01:30&lt;br /&gt;
   StartTime=2025-04-04T10:01:31 EndTime=2025-04-04T10:21:31 Deadline=N/A&lt;br /&gt;
   SuspendTime=None SecsPreSuspend=0 LastSchedEval=2025-04-04T10:01:31 Scheduler=Main&lt;br /&gt;
   Partition=cpu AllocNode:Sid=uc3n999:2819841&lt;br /&gt;
   ReqNodeList=(null) ExcNodeList=(null)&lt;br /&gt;
   NodeList=uc3n002&lt;br /&gt;
   BatchHost=uc3n002&lt;br /&gt;
   NumNodes=1 NumCPUs=2 NumTasks=1 CPUs/Task=1 ReqB:S:C:T=0:0:*:*&lt;br /&gt;
   ReqTRES=cpu=1,mem=2000M,node=1,billing=1&lt;br /&gt;
   AllocTRES=cpu=2,mem=4000M,node=1,billing=2&lt;br /&gt;
   Socks/Node=* NtasksPerN:B:S:C=0:0:*:1 CoreSpec=*&lt;br /&gt;
   MinCPUsNode=1 MinMemoryCPU=2000M MinTmpDiskNode=0&lt;br /&gt;
   Features=(null) DelayBoot=00:00:00&lt;br /&gt;
   OverSubscribe=OK Contiguous=0 Licenses=(null) Network=(null)&lt;br /&gt;
   Command=(null)&lt;br /&gt;
   WorkDir=/pfs/data6/home/ka/ka_scc/ka_zs0402&lt;br /&gt;
   StdErr=/pfs/data6/home/ka/ka_scc/ka_zs0402/slurm-1262.out&lt;br /&gt;
   StdIn=/dev/null&lt;br /&gt;
   StdOut=/pfs/data6/home/ka/ka_scc/ka_zs0402/slurm-1262.out&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=== Canceling own jobs : scancel ===&lt;br /&gt;
The scancel command is used to cancel jobs. The command scancel is explained in detail on the webpage https://slurm.schedmd.com/scancel.html or via manpage (man scancel). The command is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ scancel [-i] &amp;lt;job-id&amp;gt;&lt;br /&gt;
$ scancel -t &amp;lt;job_state_name&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Slurm Options =&lt;br /&gt;
[[BwUniCluster3.0/Running_Jobs/Slurm | Detailed Slurm usage]]&lt;br /&gt;
&lt;br /&gt;
= Best Practices =&lt;br /&gt;
&lt;br /&gt;
== Step-by-Step example==&lt;br /&gt;
&lt;br /&gt;
== Dos and Don&#039;ts ==&lt;/div&gt;</summary>
		<author><name>P Schuhmacher</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster3.0/Running_Jobs&amp;diff=15195</id>
		<title>BwUniCluster3.0/Running Jobs</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster3.0/Running_Jobs&amp;diff=15195"/>
		<updated>2025-08-13T12:35:08Z</updated>

		<summary type="html">&lt;p&gt;P Schuhmacher: /* Regular Queues */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
= Purpose and function of a queuing system =&lt;br /&gt;
&lt;br /&gt;
All compute activities on bwUniCluster 3.0 have to be performed on the compute nodes. Compute nodes are only available by requesting the corresponding resources via the queuing system. As soon as the requested resources are available, automated tasks are executed via a batch script or they can be accessed interactively.&amp;lt;br&amp;gt;&lt;br /&gt;
General procedure: Hint to [[Running_Calculations | Running Calculations]]&lt;br /&gt;
&lt;br /&gt;
== Job submission process ==&lt;br /&gt;
&lt;br /&gt;
bwUniCluster 3.0 has installed the workload managing software Slurm. Therefore any job submission by the user is to be executed by commands of the Slurm software. Slurm queues and runs user jobs based on fair sharing policies.&lt;br /&gt;
&lt;br /&gt;
== Slurm ==&lt;br /&gt;
&lt;br /&gt;
HPC Workload Manager on bwUniCluster 3.0 is Slurm.&lt;br /&gt;
Slurm is a cluster management and job scheduling system. Slurm has three key functions. &lt;br /&gt;
* It allocates access to resources (compute cores on nodes) to users for some duration of time so they can perform work. &lt;br /&gt;
* It provides a framework for starting, executing, and monitoring work (normally a parallel job) on the set of allocated nodes. &lt;br /&gt;
* It arbitrates contention for resources by managing a queue of pending work.&lt;br /&gt;
&lt;br /&gt;
Any kind of calculation on the compute nodes of bwUniCluster 3.0 requires the user to define calculations as a sequence of commands together with required run time, number of CPU cores and main memory and submit all, i.e., the &#039;&#039;&#039;batch job&#039;&#039;&#039;, to a resource and workload managing software.&lt;br /&gt;
&lt;br /&gt;
== Terms and definitions ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Partitions &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Slurm manages job queues for different &#039;&#039;&#039;partitions&#039;&#039;&#039;. Partitions are used to group similar node types (e.g. nodes with and without accelerators) and to enforce different access policies and resource limits.&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 3.0 there are different partitions:&lt;br /&gt;
&lt;br /&gt;
* CPU-only nodes&lt;br /&gt;
** 2-socket nodes, consisting of 2 Intel Ice Lake processors with 32 cores each or 2 AMD processors with 48 cores each&lt;br /&gt;
** 2-socket nodes with very high RAM capacity, consisting of 2 AMD processors with 48 cores each&lt;br /&gt;
* GPU-accelerated nodes&lt;br /&gt;
** 2-socket nodes with 4x NVIDIA A100 or 4x NVIDIA H100 GPUs&lt;br /&gt;
** 4-socket node with 4x AMD Instinct accelerator&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Queues &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Job &#039;&#039;&#039;queues&#039;&#039;&#039; are used to manage jobs that request access to shared but limited computing resources of a certain kind (partition).&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 3.0 there are different main types of queues:&lt;br /&gt;
* Regular queues&lt;br /&gt;
** cpu: Jobs that request CPU-only nodes.&lt;br /&gt;
** gpu: Jobs that request GPU-accelerated nodes.&lt;br /&gt;
* Development queues (dev)&lt;br /&gt;
** Short, usually interactive jobs that are used for developing, compiling and testing code and workflows. The intention behind development queues is to provide users with immediate access to computer resources without having to wait. This is the place to realize instantaneous heavy compute without affecting other users, as would be the case on the login nodes.&lt;br /&gt;
&lt;br /&gt;
Requested compute resources such as (wall-)time, number of nodes and amount of memory are restricted and must fit into the boundaries imposed by the queues. The request for compute resources on the bwUniCluster 3.0 &amp;lt;font color=red&amp;gt;requires at least the specification of the &#039;&#039;&#039;queue&#039;&#039;&#039; and the &#039;&#039;&#039;time&#039;&#039;&#039;&amp;lt;/font&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Jobs &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Jobs can be run non-interactively as &#039;&#039;&#039;batch jobs&#039;&#039;&#039; or as &#039;&#039;&#039;interactive jobs&#039;&#039;&#039;.&amp;lt;br&amp;gt;&lt;br /&gt;
Submitting a batch job means, that all steps of a compute project are defined in a Bash script. This Bash script is queued and executed as soon as the compute resources are available and allocated. Jobs are enqueued with the &amp;lt;code&amp;gt;sbatch&amp;lt;/code&amp;gt; command.&lt;br /&gt;
For interactive jobs, the resources are requested with the &amp;lt;code&amp;gt;salloc&amp;lt;/code&amp;gt; command. As soon as the computing resources are available and allocated, a command line prompt is returned on a computing node and the user can freely dispose of the resources now available to him.&lt;br /&gt;
{|style=&amp;quot;background:#deffee; width:100%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;padding:5px; background:#cef2e0; text-align:left&amp;quot;|&lt;br /&gt;
[[Image:Attention.svg|center|25px]]&lt;br /&gt;
|style=&amp;quot;padding:5px; background:#cef2e0; text-align:left&amp;quot;|&lt;br /&gt;
&#039;&#039;&#039;Please remember:&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Heavy computations are not allowed on the login nodes&#039;&#039;&#039;.&amp;lt;br&amp;gt;Use a developement or a regular job queue instead! Please refer to [[BwUniCluster3.0/Login#Allowed_Activities_on_Login_Nodes|Allowed Activities on Login Nodes]].&lt;br /&gt;
* &#039;&#039;&#039;Development queues&#039;&#039;&#039; are meant for &#039;&#039;&#039;development tasks&#039;&#039;&#039;.&amp;lt;br&amp;gt;Do not misuse this queue for regular, short-running jobs or chain jobs! Only one running job at a time is enabled. Maximum queue length is reduced to 3.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Queues on bwUniCluster 3.0 = &lt;br /&gt;
== Policy ==&lt;br /&gt;
&lt;br /&gt;
The computing time is provided in accordance with the &#039;&#039;&#039;fair share policy&#039;&#039;&#039;. The individual investment shares of the respective university and the resources already used by its members are taken into account. Furthermore, the following throttling policy is also active: The &#039;&#039;&#039;maximum amount of physical cores&#039;&#039;&#039; used at any given time from jobs running is &#039;&#039;&#039;1920 per user&#039;&#039;&#039; (aggregated over all running jobs). This number corresponds to 30 nodes on the Ice Lake partition or 20 nodes on the standard partition. The aim is to minimize waiting times and maximize the number of users who can access computing time at the same time.&lt;br /&gt;
&lt;br /&gt;
== Regular Queues ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
! style=&amp;quot;width:5%&amp;quot;| Queue&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Node-Type&lt;br /&gt;
! style=&amp;quot;width:23%&amp;quot;| Default Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Minimal Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Maximum Resources&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;cpu_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Ice Lake&lt;br /&gt;
| mem-per-cpu=2000mb&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=30, mem=249600mb, ntasks-per-node=64, (threads-per-core=2) &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;cpu&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Standard&lt;br /&gt;
| mem-per-cpu=2000mb&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=20, mem=380000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;highmem&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;High Memory&lt;br /&gt;
| mem-per-cpu=12090mb&lt;br /&gt;
| mem=380001mb&lt;br /&gt;
| time=72:00:00, nodes=4, mem=2300000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;gpu_h100&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;NVIDIA GPU x4&lt;br /&gt;
| mem-per-gpu=193300mb&amp;lt;br/&amp;gt;cpus-per-gpu=24&lt;br /&gt;
| gres=gpu:1&lt;br /&gt;
| time=72:00:00, nodes=12, mem=760000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;gpu_mi300&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU node&amp;lt;br/&amp;gt;AMD GPU x4&lt;br /&gt;
| mem-per-gpu=128200mb&amp;lt;br/&amp;gt;cpus-per-gpu=24&lt;br /&gt;
| gres=gpu:1&lt;br /&gt;
| time=72:00:00, nodes=1, mem=510000mb, ntasks-per-node=40, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;gpu_a100_il&amp;lt;/code&amp;gt;/&amp;lt;code&amp;gt;gpu_h100_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;Ice Lake&amp;lt;br/&amp;gt;NVIDIA GPU x4&lt;br /&gt;
| mem-per-gpu=127500mb&amp;lt;br/&amp;gt;cpus-per-gpu=16&lt;br /&gt;
| gres=gpu:1&lt;br /&gt;
| time=48:00:00, nodes=9(A100)|nodes=5(H100) , mem=510000mb, ntasks-per-node=64, (threads-per-core=2) &lt;br /&gt;
|}&lt;br /&gt;
Table 1: Regular Queues&lt;br /&gt;
&lt;br /&gt;
== Short Queues ==&lt;br /&gt;
&amp;lt;p style=&amp;quot;color:red; &amp;quot;&amp;gt;&amp;lt;b&amp;gt;Queues with a short runtime of 30 minutes.&amp;lt;/b&amp;gt;&amp;lt;/p&amp;gt; &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
! style=&amp;quot;width:5%&amp;quot;| Queue&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Node Type&lt;br /&gt;
! style=&amp;quot;width:23%&amp;quot;| Default Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Minimal Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Maximum Resources&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;gpu_a100_short&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;Ice Lake&amp;lt;br/&amp;gt;NVIDIA GPU x4&lt;br /&gt;
| mem-per-gpu=94000mb&amp;lt;br/&amp;gt;cpus-per-gpu=12&lt;br /&gt;
| gres=gpu:1&lt;br /&gt;
| time=30, nodes=12, mem=376000mb, ntasks-per-node=48, (threads-per-core=2)&lt;br /&gt;
|}&lt;br /&gt;
Table 2: Short Queues&lt;br /&gt;
&lt;br /&gt;
== Development Queues ==&lt;br /&gt;
Only for development, i.e. debugging or performance optimization ...&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
! style=&amp;quot;width:5%&amp;quot;| Queue&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Node Type&lt;br /&gt;
! style=&amp;quot;width:23%&amp;quot;| Default Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Minimal Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Maximum Resources&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_cpu_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Ice Lake&lt;br /&gt;
| mem-per-cpu=2000mb&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=8, mem=249600mb, ntasks-per-node=64, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_cpu&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Standard&lt;br /&gt;
| mem-per-cpu=2000mb&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=380000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_gpu_h100&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;NVIDIA GPU x4&lt;br /&gt;
| mem-per-gpu=193300mb&amp;lt;br/&amp;gt;cpus-per-gpu=24&lt;br /&gt;
| gres=gpu:1&lt;br /&gt;
| time=30, nodes=1, mem=760000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_gpu_a100_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;NVIDIA GPU x4&amp;lt;br/&amp;gt;&lt;br /&gt;
| mem-per-gpu=127500mb&amp;lt;br/&amp;gt;cpus-per-gpu=16 &lt;br /&gt;
| gres=gpu:1&lt;br /&gt;
| time=30, nodes=1, mem=510000mb, ntasks-per-node=64, (threads-per-core=2) &lt;br /&gt;
|}&lt;br /&gt;
Table 3: Development Queues&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Default resources of a queue class define number of tasks and memory if not explicitly given with sbatch command. Resource list acronyms &#039;&#039;--time&#039;&#039;, &#039;&#039;--ntasks&#039;&#039;, &#039;&#039;--nodes&#039;&#039;, &#039;&#039;--mem&#039;&#039; and &#039;&#039;--mem-per-cpu&#039;&#039; are described [[BwUniCluster3.0/Running_Jobs/Slurm|here]].&lt;br /&gt;
&lt;br /&gt;
== Check available resources: sinfo_t_idle ==&lt;br /&gt;
The Slurm command sinfo is used to view partition and node information for a system running Slurm. It incorporates down time, reservations, and node state information in determining the available backfill window. The sinfo command can only be used by the administrator.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
SCC has prepared a special script (sinfo_t_idle) to find out how many processors are available for immediate use on the system. It is anticipated that users will use this information to submit jobs that meet these criteria and thus obtain quick job turnaround times. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The following command displays what resources are available for immediate use for the whole partition.&lt;br /&gt;
&amp;lt;pre&amp;gt;$ sinfo_t_idle &lt;br /&gt;
Partition dev_cpu                 :      1 nodes idle&lt;br /&gt;
Partition cpu                     :      1 nodes idle&lt;br /&gt;
Partition highmem                 :      2 nodes idle&lt;br /&gt;
Partition dev_gpu_h100            :      0 nodes idle&lt;br /&gt;
Partition gpu_h100                :      0 nodes idle&lt;br /&gt;
Partition gpu_mi300               :      0 nodes idle&lt;br /&gt;
Partition dev_cpu_il              :      7 nodes idle&lt;br /&gt;
Partition cpu_il                  :      2 nodes idle&lt;br /&gt;
Partition dev_gpu_a100_il         :      1 nodes idle&lt;br /&gt;
Partition gpu_a100_il             :      0 nodes idle&lt;br /&gt;
Partition gpu_h100_il             :      1 nodes idle&lt;br /&gt;
Partition gpu_a100_short          :      0 nodes idle&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Running Jobs =&lt;br /&gt;
&lt;br /&gt;
== Slurm Commands (excerpt) ==&lt;br /&gt;
Important Slurm commands for non-administrators working on bwUniCluster 3.0.&lt;br /&gt;
{| width=850px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Slurm commands !! Brief explanation&lt;br /&gt;
|-&lt;br /&gt;
| [[#Batch Jobs: sbatch|sbatch]] || Submits a job and puts it into the queue [[https://slurm.schedmd.com/sbatch.html sbatch]] &lt;br /&gt;
|-&lt;br /&gt;
| [[#Interactive Jobs: salloc|salloc]] || Requests resources for an interactive Job [[https://slurm.schedmd.com/salloc.html salloc]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Monitor and manage jobs |scontrol show job]] || Displays detailed job state information [[https://slurm.schedmd.com/scontrol.html scontrol]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#List of your submitted jobs : squeue|squeue]] || Displays information about active, eligible, blocked, and/or recently completed jobs [[https://slurm.schedmd.com/squeue.html squeue]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#List of your submitted jobs : squeue|squeue --start]] || Returns start time of submitted job [[https://slurm.schedmd.com/squeue.html squeue]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Check available resources: sinfo_t_idle|sinfo_t_idle]] || Shows what resources are available for immediate use [[https://slurm.schedmd.com/sinfo.html sinfo]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Canceling own jobs : scancel|scancel]] || Cancels a job [[https://slurm.schedmd.com/scancel.html scancel]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* [https://slurm.schedmd.com/tutorials.html  Slurm Tutorials]&lt;br /&gt;
* [https://slurm.schedmd.com/pdfs/summary.pdf  Slurm command/option summary (2 pages)]&lt;br /&gt;
* [https://slurm.schedmd.com/man_index.html  Slurm Commands]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Batch Jobs: sbatch ==&lt;br /&gt;
&lt;br /&gt;
Batch jobs are submitted by using the command &#039;&#039;&#039;sbatch&#039;&#039;&#039;. The main purpose of the &#039;&#039;&#039;sbatch&#039;&#039;&#039; command is to specify the resources that are needed to run the job. &#039;&#039;&#039;sbatch&#039;&#039;&#039; will then queue the batch job. However, starting of batch job depends on the availability of the requested resources and the fair sharing value.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The syntax and use of &#039;&#039;&#039;sbatch&#039;&#039;&#039; can be displayed via:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ man sbatch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;sbatch&#039;&#039;&#039; options can be used from the command line or in your job script. Different defaults for some of these options are set based on the queue and can be found [[BwUniCluster3.0/Slurm | here]]&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | sbatch Options&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width:8%&amp;quot;| Command line&lt;br /&gt;
! style=&amp;quot;width:9%&amp;quot;| Script&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Purpose&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -t, --time=&#039;&#039;time&#039;&#039;&lt;br /&gt;
| #SBATCH --time=&#039;&#039;time&#039;&#039;&lt;br /&gt;
| Wall clock time limit.&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -N, --nodes=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --nodes=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of nodes to be used.&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -n, --ntasks=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --ntasks=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of tasks to be launched.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --ntasks-per-node=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --ntasks-per-node=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Maximum count of tasks per node.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -c, --cpus-per-task=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --cpus-per-task=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of CPUs required per (MPI-)task.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mem=&#039;&#039;value_in_MB&#039;&#039;&lt;br /&gt;
| #SBATCH --mem=&#039;&#039;value_in_MB&#039;&#039; &lt;br /&gt;
| Memory in MegaByte per node. (You should omit the setting of this option.)&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mem-per-cpu=&#039;&#039;value_in_MB&#039;&#039;&lt;br /&gt;
| #SBATCH --mem-per-cpu=&#039;&#039;value_in_MB&#039;&#039; &lt;br /&gt;
| Minimum Memory required per allocated CPU. (You should omit the setting of this option.)&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mail-type=&#039;&#039;type&#039;&#039;&lt;br /&gt;
| #SBATCH --mail-type=&#039;&#039;type&#039;&#039;&lt;br /&gt;
| Notify user by email when certain event types occur.&amp;lt;br&amp;gt;Valid type values are NONE, BEGIN, END, FAIL, REQUEUE, ALL.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mail-user=&#039;&#039;mail-address&#039;&#039;&lt;br /&gt;
| #SBATCH --mail-user=&#039;&#039;mail-address&#039;&#039;&lt;br /&gt;
|  The specified mail-address receives email notification of state changes as defined by --mail-type.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --output=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --output=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| File in which job output is stored. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --error=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --error=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| File in which job error messages are stored. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -J, --job-name=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --job-name=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| Job name.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --export=[ALL,] &#039;&#039;env-variables&#039;&#039;&lt;br /&gt;
| #SBATCH --export=[ALL,] &#039;&#039;env-variables&#039;&#039;&lt;br /&gt;
| Identifies which environment variables from the submission environment are propagated to the launched application. Default is ALL.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -A, --account=&#039;&#039;group-name&#039;&#039;&lt;br /&gt;
| #SBATCH --account=&#039;&#039;group-name&#039;&#039;&lt;br /&gt;
| Change resources used by this job to specified group. You may need this option if your account is assigned to more than one group. By command &amp;quot;scontrol show job&amp;quot; the project group the job is accounted on can be seen behind &amp;quot;Account=&amp;quot;. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -p, --partition=&#039;&#039;queue-name&#039;&#039;&lt;br /&gt;
| #SBATCH --partition=&#039;&#039;queue-name&#039;&#039;&lt;br /&gt;
| Request a specific queue for the resource allocation.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --reservation=&#039;&#039;reservation-name&#039;&#039;&lt;br /&gt;
| #SBATCH --reservation=&#039;&#039;reservation-name&#039;&#039;&lt;br /&gt;
| Use a specific reservation for the resource allocation.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -C, --constraint=&#039;&#039;LSDF&#039;&#039;&lt;br /&gt;
| #SBATCH --constraint=LSDF&lt;br /&gt;
| Job constraint LSDF filesystems.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -C, --constraint=&#039;&#039;BEEOND (BEEOND_4MDS, BEEOND_MAXMDS)&#039;&#039;&lt;br /&gt;
| #SBATCH --constraint=BEEOND (BEEOND_4MDS, BEEOND_MAXMDS)&lt;br /&gt;
| Job constraint BeeOND filesystem.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Interactive Jobs: salloc ==&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 3.0 you are only allowed to run short jobs (&amp;lt;&amp;lt; 1 hour) with little memory requirements (&amp;lt;&amp;lt; 8 GByte) on the logins nodes. If you want to run longer jobs and/or jobs with a request of more than 8 GByte of memory, you must allocate resources for so-called interactive jobs by usage of the command salloc on a login node. Considering a serial application running on a compute node that requires 5000 MByte of memory and limiting the interactive run to 2 hours the following command has to be executed:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ salloc -p cpu -n 1 -t 120 --mem=5000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then you will get one core on a compute node within the partition &amp;quot;cpu&amp;quot;. After execution of this command &#039;&#039;&#039;DO NOT CLOSE&#039;&#039;&#039; your current terminal session but wait until the queueing system Slurm has granted you the requested resources on the compute system. You will be logged in automatically on the granted core! To run a serial program on the granted core you only have to type the name of the executable.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./&amp;lt;my_serial_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please be aware that your serial job must run less than 2 hours in this example, else the job will be killed during runtime by the system. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can also start now a graphical X11-terminal connecting you to the dedicated resource that is available for 2 hours. You can start it by the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ xterm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that, once the walltime limit has been reached the resources - i.e. the compute node - will automatically be revoked.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
An interactive parallel application running on one compute node or on many compute nodes (e.g. here 5 nodes) with 96 cores each requires usually an amount of memory in GByte (e.g. 50 GByte) and a maximum time (e.g. 1 hour). E.g. 5 nodes can be allocated by the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ salloc -p cpu -N 5 --ntasks-per-node=96 -t 01:00:00  --mem=50gb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you can run parallel jobs on 480 cores requiring 50 GByte of memory per node. Please be aware that you will be logged in on core 0 of the first node.&lt;br /&gt;
If you want to have access to another node you have to open a new terminal, connect it also to bwUniCluster 3.0 and type the following commands to&lt;br /&gt;
connect to the running interactive job and then to a specific node:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ srun --jobid=XXXXXXXX --pty /bin/bash&lt;br /&gt;
$ srun --nodelist=uc3nXXX --pty /bin/bash&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ squeue&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the jobid and the nodelist can be shown.&lt;br /&gt;
&lt;br /&gt;
If you want to run MPI-programs, you can do it by simply typing mpirun &amp;lt;program_name&amp;gt;. Then your program will be run on 480 cores. A very simple example for starting a parallel job can be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mpirun &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also start the debugger ddt by the commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module add devel/ddt&lt;br /&gt;
$ ddt &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above commands will execute the parallel program &amp;lt;my_mpi_program&amp;gt; on all available cores. You can also start parallel programs on a subset of cores; an example for this can be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mpirun -n 50 &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are using Intel MPI you must start &amp;lt;my_mpi_program&amp;gt; by the command mpiexec.hydra (instead of mpirun).&lt;br /&gt;
&lt;br /&gt;
== Interactive Computing with Jupyter ==&lt;br /&gt;
&lt;br /&gt;
== Monitor and manage jobs ==&lt;br /&gt;
&lt;br /&gt;
=== List of your submitted jobs : squeue ===&lt;br /&gt;
Displays information about YOUR active, pending and/or recently completed jobs. The command displays all own active and pending jobs. The command squeue is explained in detail on the webpage https://slurm.schedmd.com/squeue.html or via manpage (man squeue).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;squeue&#039;&#039; example on bwUniCluster 3.0 &amp;lt;small&amp;gt;(Only your own jobs are displayed!)&amp;lt;/small&amp;gt;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ squeue &lt;br /&gt;
             JOBID PARTITION     NAME     USER ST       TIME  NODES NODELIST(REASON)&lt;br /&gt;
              1262       cpu     wrap ka_ab123  R       8:15      1 uc3n002&lt;br /&gt;
              1267 dev_gpu_h     wrap ka_ab123 PD       0:00      1 (Resources)&lt;br /&gt;
              1265   highmem     wrap ka_ab123  R       2:41      1 uc3n084&lt;br /&gt;
$ squeue -l&lt;br /&gt;
             JOBID PARTITION     NAME     USER    STATE       TIME TIME_LIMI  NODES NODELIST(REASON)&lt;br /&gt;
              1262       cpu     wrap ka_ab123  RUNNING       8:55     20:00      1 uc3n002&lt;br /&gt;
              1267 dev_gpu_h     wrap ka_ab123  PENDING       0:00     20:00      1 (Resources)&lt;br /&gt;
              1265   highmem     wrap ka_ab123  RUNNING       3:21     20:00      1 uc3n084&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Detailed job information : scontrol show job ===&lt;br /&gt;
scontrol show job displays detailed job state information and diagnostic output for all or a specified job of yours. Detailed information is available for active, pending and recently completed jobs. The command scontrol is explained in detail on the webpage https://slurm.schedmd.com/scontrol.html or via manpage (man scontrol). &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Display the state of all your jobs in normal mode: scontrol show job&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Display the state of a job with &amp;lt;jobid&amp;gt; in normal mode: scontrol show job &amp;lt;jobid&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Here is an example from bwUniCluster 3.0.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ squeue&lt;br /&gt;
JOBID PARTITION     NAME     USER ST       TIME  NODES NODELIST(REASON)&lt;br /&gt;
1262       cpu     wrap ka_zs040  R       1:12      1 uc3n002&lt;br /&gt;
&lt;br /&gt;
$&lt;br /&gt;
$ # now, see what&#039;s up with my pending job with jobid 1262&lt;br /&gt;
$ &lt;br /&gt;
$ scontrol show job 1262&lt;br /&gt;
&lt;br /&gt;
JobId=1262 JobName=wrap&lt;br /&gt;
   UserId=ka_zs0402(241992) GroupId=ka_scc(12345) MCS_label=N/A&lt;br /&gt;
   Priority=4246 Nice=0 Account=ka QOS=normal&lt;br /&gt;
   JobState=RUNNING Reason=None Dependency=(null)&lt;br /&gt;
   Requeue=1 Restarts=0 BatchFlag=1 Reboot=0 ExitCode=0:0&lt;br /&gt;
   RunTime=00:00:37 TimeLimit=00:20:00 TimeMin=N/A&lt;br /&gt;
   SubmitTime=2025-04-04T10:01:30 EligibleTime=2025-04-04T10:01:30&lt;br /&gt;
   AccrueTime=2025-04-04T10:01:30&lt;br /&gt;
   StartTime=2025-04-04T10:01:31 EndTime=2025-04-04T10:21:31 Deadline=N/A&lt;br /&gt;
   SuspendTime=None SecsPreSuspend=0 LastSchedEval=2025-04-04T10:01:31 Scheduler=Main&lt;br /&gt;
   Partition=cpu AllocNode:Sid=uc3n999:2819841&lt;br /&gt;
   ReqNodeList=(null) ExcNodeList=(null)&lt;br /&gt;
   NodeList=uc3n002&lt;br /&gt;
   BatchHost=uc3n002&lt;br /&gt;
   NumNodes=1 NumCPUs=2 NumTasks=1 CPUs/Task=1 ReqB:S:C:T=0:0:*:*&lt;br /&gt;
   ReqTRES=cpu=1,mem=2000M,node=1,billing=1&lt;br /&gt;
   AllocTRES=cpu=2,mem=4000M,node=1,billing=2&lt;br /&gt;
   Socks/Node=* NtasksPerN:B:S:C=0:0:*:1 CoreSpec=*&lt;br /&gt;
   MinCPUsNode=1 MinMemoryCPU=2000M MinTmpDiskNode=0&lt;br /&gt;
   Features=(null) DelayBoot=00:00:00&lt;br /&gt;
   OverSubscribe=OK Contiguous=0 Licenses=(null) Network=(null)&lt;br /&gt;
   Command=(null)&lt;br /&gt;
   WorkDir=/pfs/data6/home/ka/ka_scc/ka_zs0402&lt;br /&gt;
   StdErr=/pfs/data6/home/ka/ka_scc/ka_zs0402/slurm-1262.out&lt;br /&gt;
   StdIn=/dev/null&lt;br /&gt;
   StdOut=/pfs/data6/home/ka/ka_scc/ka_zs0402/slurm-1262.out&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=== Canceling own jobs : scancel ===&lt;br /&gt;
The scancel command is used to cancel jobs. The command scancel is explained in detail on the webpage https://slurm.schedmd.com/scancel.html or via manpage (man scancel). The command is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ scancel [-i] &amp;lt;job-id&amp;gt;&lt;br /&gt;
$ scancel -t &amp;lt;job_state_name&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Slurm Options =&lt;br /&gt;
[[BwUniCluster3.0/Running_Jobs/Slurm | Detailed Slurm usage]]&lt;br /&gt;
&lt;br /&gt;
= Best Practices =&lt;br /&gt;
&lt;br /&gt;
== Step-by-Step example==&lt;br /&gt;
&lt;br /&gt;
== Dos and Don&#039;ts ==&lt;/div&gt;</summary>
		<author><name>P Schuhmacher</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster3.0/Running_Jobs&amp;diff=15194</id>
		<title>BwUniCluster3.0/Running Jobs</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster3.0/Running_Jobs&amp;diff=15194"/>
		<updated>2025-08-13T12:34:33Z</updated>

		<summary type="html">&lt;p&gt;P Schuhmacher: /* Regular Queues */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
= Purpose and function of a queuing system =&lt;br /&gt;
&lt;br /&gt;
All compute activities on bwUniCluster 3.0 have to be performed on the compute nodes. Compute nodes are only available by requesting the corresponding resources via the queuing system. As soon as the requested resources are available, automated tasks are executed via a batch script or they can be accessed interactively.&amp;lt;br&amp;gt;&lt;br /&gt;
General procedure: Hint to [[Running_Calculations | Running Calculations]]&lt;br /&gt;
&lt;br /&gt;
== Job submission process ==&lt;br /&gt;
&lt;br /&gt;
bwUniCluster 3.0 has installed the workload managing software Slurm. Therefore any job submission by the user is to be executed by commands of the Slurm software. Slurm queues and runs user jobs based on fair sharing policies.&lt;br /&gt;
&lt;br /&gt;
== Slurm ==&lt;br /&gt;
&lt;br /&gt;
HPC Workload Manager on bwUniCluster 3.0 is Slurm.&lt;br /&gt;
Slurm is a cluster management and job scheduling system. Slurm has three key functions. &lt;br /&gt;
* It allocates access to resources (compute cores on nodes) to users for some duration of time so they can perform work. &lt;br /&gt;
* It provides a framework for starting, executing, and monitoring work (normally a parallel job) on the set of allocated nodes. &lt;br /&gt;
* It arbitrates contention for resources by managing a queue of pending work.&lt;br /&gt;
&lt;br /&gt;
Any kind of calculation on the compute nodes of bwUniCluster 3.0 requires the user to define calculations as a sequence of commands together with required run time, number of CPU cores and main memory and submit all, i.e., the &#039;&#039;&#039;batch job&#039;&#039;&#039;, to a resource and workload managing software.&lt;br /&gt;
&lt;br /&gt;
== Terms and definitions ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Partitions &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Slurm manages job queues for different &#039;&#039;&#039;partitions&#039;&#039;&#039;. Partitions are used to group similar node types (e.g. nodes with and without accelerators) and to enforce different access policies and resource limits.&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 3.0 there are different partitions:&lt;br /&gt;
&lt;br /&gt;
* CPU-only nodes&lt;br /&gt;
** 2-socket nodes, consisting of 2 Intel Ice Lake processors with 32 cores each or 2 AMD processors with 48 cores each&lt;br /&gt;
** 2-socket nodes with very high RAM capacity, consisting of 2 AMD processors with 48 cores each&lt;br /&gt;
* GPU-accelerated nodes&lt;br /&gt;
** 2-socket nodes with 4x NVIDIA A100 or 4x NVIDIA H100 GPUs&lt;br /&gt;
** 4-socket node with 4x AMD Instinct accelerator&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Queues &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Job &#039;&#039;&#039;queues&#039;&#039;&#039; are used to manage jobs that request access to shared but limited computing resources of a certain kind (partition).&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 3.0 there are different main types of queues:&lt;br /&gt;
* Regular queues&lt;br /&gt;
** cpu: Jobs that request CPU-only nodes.&lt;br /&gt;
** gpu: Jobs that request GPU-accelerated nodes.&lt;br /&gt;
* Development queues (dev)&lt;br /&gt;
** Short, usually interactive jobs that are used for developing, compiling and testing code and workflows. The intention behind development queues is to provide users with immediate access to computer resources without having to wait. This is the place to realize instantaneous heavy compute without affecting other users, as would be the case on the login nodes.&lt;br /&gt;
&lt;br /&gt;
Requested compute resources such as (wall-)time, number of nodes and amount of memory are restricted and must fit into the boundaries imposed by the queues. The request for compute resources on the bwUniCluster 3.0 &amp;lt;font color=red&amp;gt;requires at least the specification of the &#039;&#039;&#039;queue&#039;&#039;&#039; and the &#039;&#039;&#039;time&#039;&#039;&#039;&amp;lt;/font&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Jobs &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Jobs can be run non-interactively as &#039;&#039;&#039;batch jobs&#039;&#039;&#039; or as &#039;&#039;&#039;interactive jobs&#039;&#039;&#039;.&amp;lt;br&amp;gt;&lt;br /&gt;
Submitting a batch job means, that all steps of a compute project are defined in a Bash script. This Bash script is queued and executed as soon as the compute resources are available and allocated. Jobs are enqueued with the &amp;lt;code&amp;gt;sbatch&amp;lt;/code&amp;gt; command.&lt;br /&gt;
For interactive jobs, the resources are requested with the &amp;lt;code&amp;gt;salloc&amp;lt;/code&amp;gt; command. As soon as the computing resources are available and allocated, a command line prompt is returned on a computing node and the user can freely dispose of the resources now available to him.&lt;br /&gt;
{|style=&amp;quot;background:#deffee; width:100%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;padding:5px; background:#cef2e0; text-align:left&amp;quot;|&lt;br /&gt;
[[Image:Attention.svg|center|25px]]&lt;br /&gt;
|style=&amp;quot;padding:5px; background:#cef2e0; text-align:left&amp;quot;|&lt;br /&gt;
&#039;&#039;&#039;Please remember:&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Heavy computations are not allowed on the login nodes&#039;&#039;&#039;.&amp;lt;br&amp;gt;Use a developement or a regular job queue instead! Please refer to [[BwUniCluster3.0/Login#Allowed_Activities_on_Login_Nodes|Allowed Activities on Login Nodes]].&lt;br /&gt;
* &#039;&#039;&#039;Development queues&#039;&#039;&#039; are meant for &#039;&#039;&#039;development tasks&#039;&#039;&#039;.&amp;lt;br&amp;gt;Do not misuse this queue for regular, short-running jobs or chain jobs! Only one running job at a time is enabled. Maximum queue length is reduced to 3.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Queues on bwUniCluster 3.0 = &lt;br /&gt;
== Policy ==&lt;br /&gt;
&lt;br /&gt;
The computing time is provided in accordance with the &#039;&#039;&#039;fair share policy&#039;&#039;&#039;. The individual investment shares of the respective university and the resources already used by its members are taken into account. Furthermore, the following throttling policy is also active: The &#039;&#039;&#039;maximum amount of physical cores&#039;&#039;&#039; used at any given time from jobs running is &#039;&#039;&#039;1920 per user&#039;&#039;&#039; (aggregated over all running jobs). This number corresponds to 30 nodes on the Ice Lake partition or 20 nodes on the standard partition. The aim is to minimize waiting times and maximize the number of users who can access computing time at the same time.&lt;br /&gt;
&lt;br /&gt;
== Regular Queues ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
! style=&amp;quot;width:5%&amp;quot;| Queue&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Node-Type&lt;br /&gt;
! style=&amp;quot;width:23%&amp;quot;| Default Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Minimal Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Maximum Resources&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;cpu_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Ice Lake&lt;br /&gt;
| mem-per-cpu=2000mb&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=30, mem=249600mb, ntasks-per-node=64, (threads-per-core=2) &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;cpu&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Standard&lt;br /&gt;
| mem-per-cpu=2000mb&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=20, mem=380000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;highmem&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;High Memory&lt;br /&gt;
| mem-per-cpu=12090mb&lt;br /&gt;
| mem=380001mb&lt;br /&gt;
| time=72:00:00, nodes=4, mem=2300000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;gpu_h100&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;NVIDIA GPU x4&lt;br /&gt;
| mem-per-gpu=193300mb&amp;lt;br/&amp;gt;cpus-per-gpu=24&lt;br /&gt;
| gres=gpu:1&lt;br /&gt;
| time=72:00:00, nodes=12, mem=760000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;gpu_mi300&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU node&amp;lt;br/&amp;gt;AMD GPU x4&lt;br /&gt;
| mem-per-gpu=128200mb&amp;lt;br/&amp;gt;cpus-per-gpu=24&lt;br /&gt;
| gres=gpu:1&lt;br /&gt;
| time=72:00:00, nodes=1, mem=510000mb, ntasks-per-node=40, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;gpu_a100_il&amp;lt;/code&amp;gt;/&amp;lt;code&amp;gt;gpu_h100_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;Ice Lake&amp;lt;br/&amp;gt;NVIDIA GPU x4&lt;br /&gt;
| mem-per-gpu=127500mb&amp;lt;br/&amp;gt;cpus-per-gpu=16&lt;br /&gt;
| gres=gpu:1&lt;br /&gt;
| time=48:00:00, nodes=9(A100) nodes=5(H100) , mem=510000mb, ntasks-per-node=64, (threads-per-core=2) &lt;br /&gt;
|}&lt;br /&gt;
Table 1: Regular Queues&lt;br /&gt;
&lt;br /&gt;
== Short Queues ==&lt;br /&gt;
&amp;lt;p style=&amp;quot;color:red; &amp;quot;&amp;gt;&amp;lt;b&amp;gt;Queues with a short runtime of 30 minutes.&amp;lt;/b&amp;gt;&amp;lt;/p&amp;gt; &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
! style=&amp;quot;width:5%&amp;quot;| Queue&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Node Type&lt;br /&gt;
! style=&amp;quot;width:23%&amp;quot;| Default Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Minimal Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Maximum Resources&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;gpu_a100_short&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;Ice Lake&amp;lt;br/&amp;gt;NVIDIA GPU x4&lt;br /&gt;
| mem-per-gpu=94000mb&amp;lt;br/&amp;gt;cpus-per-gpu=12&lt;br /&gt;
| gres=gpu:1&lt;br /&gt;
| time=30, nodes=12, mem=376000mb, ntasks-per-node=48, (threads-per-core=2)&lt;br /&gt;
|}&lt;br /&gt;
Table 2: Short Queues&lt;br /&gt;
&lt;br /&gt;
== Development Queues ==&lt;br /&gt;
Only for development, i.e. debugging or performance optimization ...&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
! style=&amp;quot;width:5%&amp;quot;| Queue&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Node Type&lt;br /&gt;
! style=&amp;quot;width:23%&amp;quot;| Default Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Minimal Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Maximum Resources&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_cpu_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Ice Lake&lt;br /&gt;
| mem-per-cpu=2000mb&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=8, mem=249600mb, ntasks-per-node=64, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_cpu&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Standard&lt;br /&gt;
| mem-per-cpu=2000mb&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=380000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_gpu_h100&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;NVIDIA GPU x4&lt;br /&gt;
| mem-per-gpu=193300mb&amp;lt;br/&amp;gt;cpus-per-gpu=24&lt;br /&gt;
| gres=gpu:1&lt;br /&gt;
| time=30, nodes=1, mem=760000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_gpu_a100_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;NVIDIA GPU x4&amp;lt;br/&amp;gt;&lt;br /&gt;
| mem-per-gpu=127500mb&amp;lt;br/&amp;gt;cpus-per-gpu=16 &lt;br /&gt;
| gres=gpu:1&lt;br /&gt;
| time=30, nodes=1, mem=510000mb, ntasks-per-node=64, (threads-per-core=2) &lt;br /&gt;
|}&lt;br /&gt;
Table 3: Development Queues&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Default resources of a queue class define number of tasks and memory if not explicitly given with sbatch command. Resource list acronyms &#039;&#039;--time&#039;&#039;, &#039;&#039;--ntasks&#039;&#039;, &#039;&#039;--nodes&#039;&#039;, &#039;&#039;--mem&#039;&#039; and &#039;&#039;--mem-per-cpu&#039;&#039; are described [[BwUniCluster3.0/Running_Jobs/Slurm|here]].&lt;br /&gt;
&lt;br /&gt;
== Check available resources: sinfo_t_idle ==&lt;br /&gt;
The Slurm command sinfo is used to view partition and node information for a system running Slurm. It incorporates down time, reservations, and node state information in determining the available backfill window. The sinfo command can only be used by the administrator.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
SCC has prepared a special script (sinfo_t_idle) to find out how many processors are available for immediate use on the system. It is anticipated that users will use this information to submit jobs that meet these criteria and thus obtain quick job turnaround times. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The following command displays what resources are available for immediate use for the whole partition.&lt;br /&gt;
&amp;lt;pre&amp;gt;$ sinfo_t_idle &lt;br /&gt;
Partition dev_cpu                 :      1 nodes idle&lt;br /&gt;
Partition cpu                     :      1 nodes idle&lt;br /&gt;
Partition highmem                 :      2 nodes idle&lt;br /&gt;
Partition dev_gpu_h100            :      0 nodes idle&lt;br /&gt;
Partition gpu_h100                :      0 nodes idle&lt;br /&gt;
Partition gpu_mi300               :      0 nodes idle&lt;br /&gt;
Partition dev_cpu_il              :      7 nodes idle&lt;br /&gt;
Partition cpu_il                  :      2 nodes idle&lt;br /&gt;
Partition dev_gpu_a100_il         :      1 nodes idle&lt;br /&gt;
Partition gpu_a100_il             :      0 nodes idle&lt;br /&gt;
Partition gpu_h100_il             :      1 nodes idle&lt;br /&gt;
Partition gpu_a100_short          :      0 nodes idle&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Running Jobs =&lt;br /&gt;
&lt;br /&gt;
== Slurm Commands (excerpt) ==&lt;br /&gt;
Important Slurm commands for non-administrators working on bwUniCluster 3.0.&lt;br /&gt;
{| width=850px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Slurm commands !! Brief explanation&lt;br /&gt;
|-&lt;br /&gt;
| [[#Batch Jobs: sbatch|sbatch]] || Submits a job and puts it into the queue [[https://slurm.schedmd.com/sbatch.html sbatch]] &lt;br /&gt;
|-&lt;br /&gt;
| [[#Interactive Jobs: salloc|salloc]] || Requests resources for an interactive Job [[https://slurm.schedmd.com/salloc.html salloc]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Monitor and manage jobs |scontrol show job]] || Displays detailed job state information [[https://slurm.schedmd.com/scontrol.html scontrol]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#List of your submitted jobs : squeue|squeue]] || Displays information about active, eligible, blocked, and/or recently completed jobs [[https://slurm.schedmd.com/squeue.html squeue]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#List of your submitted jobs : squeue|squeue --start]] || Returns start time of submitted job [[https://slurm.schedmd.com/squeue.html squeue]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Check available resources: sinfo_t_idle|sinfo_t_idle]] || Shows what resources are available for immediate use [[https://slurm.schedmd.com/sinfo.html sinfo]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Canceling own jobs : scancel|scancel]] || Cancels a job [[https://slurm.schedmd.com/scancel.html scancel]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* [https://slurm.schedmd.com/tutorials.html  Slurm Tutorials]&lt;br /&gt;
* [https://slurm.schedmd.com/pdfs/summary.pdf  Slurm command/option summary (2 pages)]&lt;br /&gt;
* [https://slurm.schedmd.com/man_index.html  Slurm Commands]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Batch Jobs: sbatch ==&lt;br /&gt;
&lt;br /&gt;
Batch jobs are submitted by using the command &#039;&#039;&#039;sbatch&#039;&#039;&#039;. The main purpose of the &#039;&#039;&#039;sbatch&#039;&#039;&#039; command is to specify the resources that are needed to run the job. &#039;&#039;&#039;sbatch&#039;&#039;&#039; will then queue the batch job. However, starting of batch job depends on the availability of the requested resources and the fair sharing value.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The syntax and use of &#039;&#039;&#039;sbatch&#039;&#039;&#039; can be displayed via:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ man sbatch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;sbatch&#039;&#039;&#039; options can be used from the command line or in your job script. Different defaults for some of these options are set based on the queue and can be found [[BwUniCluster3.0/Slurm | here]]&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | sbatch Options&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width:8%&amp;quot;| Command line&lt;br /&gt;
! style=&amp;quot;width:9%&amp;quot;| Script&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Purpose&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -t, --time=&#039;&#039;time&#039;&#039;&lt;br /&gt;
| #SBATCH --time=&#039;&#039;time&#039;&#039;&lt;br /&gt;
| Wall clock time limit.&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -N, --nodes=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --nodes=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of nodes to be used.&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -n, --ntasks=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --ntasks=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of tasks to be launched.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --ntasks-per-node=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --ntasks-per-node=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Maximum count of tasks per node.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -c, --cpus-per-task=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --cpus-per-task=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of CPUs required per (MPI-)task.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mem=&#039;&#039;value_in_MB&#039;&#039;&lt;br /&gt;
| #SBATCH --mem=&#039;&#039;value_in_MB&#039;&#039; &lt;br /&gt;
| Memory in MegaByte per node. (You should omit the setting of this option.)&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mem-per-cpu=&#039;&#039;value_in_MB&#039;&#039;&lt;br /&gt;
| #SBATCH --mem-per-cpu=&#039;&#039;value_in_MB&#039;&#039; &lt;br /&gt;
| Minimum Memory required per allocated CPU. (You should omit the setting of this option.)&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mail-type=&#039;&#039;type&#039;&#039;&lt;br /&gt;
| #SBATCH --mail-type=&#039;&#039;type&#039;&#039;&lt;br /&gt;
| Notify user by email when certain event types occur.&amp;lt;br&amp;gt;Valid type values are NONE, BEGIN, END, FAIL, REQUEUE, ALL.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mail-user=&#039;&#039;mail-address&#039;&#039;&lt;br /&gt;
| #SBATCH --mail-user=&#039;&#039;mail-address&#039;&#039;&lt;br /&gt;
|  The specified mail-address receives email notification of state changes as defined by --mail-type.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --output=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --output=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| File in which job output is stored. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --error=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --error=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| File in which job error messages are stored. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -J, --job-name=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --job-name=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| Job name.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --export=[ALL,] &#039;&#039;env-variables&#039;&#039;&lt;br /&gt;
| #SBATCH --export=[ALL,] &#039;&#039;env-variables&#039;&#039;&lt;br /&gt;
| Identifies which environment variables from the submission environment are propagated to the launched application. Default is ALL.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -A, --account=&#039;&#039;group-name&#039;&#039;&lt;br /&gt;
| #SBATCH --account=&#039;&#039;group-name&#039;&#039;&lt;br /&gt;
| Change resources used by this job to specified group. You may need this option if your account is assigned to more than one group. By command &amp;quot;scontrol show job&amp;quot; the project group the job is accounted on can be seen behind &amp;quot;Account=&amp;quot;. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -p, --partition=&#039;&#039;queue-name&#039;&#039;&lt;br /&gt;
| #SBATCH --partition=&#039;&#039;queue-name&#039;&#039;&lt;br /&gt;
| Request a specific queue for the resource allocation.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --reservation=&#039;&#039;reservation-name&#039;&#039;&lt;br /&gt;
| #SBATCH --reservation=&#039;&#039;reservation-name&#039;&#039;&lt;br /&gt;
| Use a specific reservation for the resource allocation.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -C, --constraint=&#039;&#039;LSDF&#039;&#039;&lt;br /&gt;
| #SBATCH --constraint=LSDF&lt;br /&gt;
| Job constraint LSDF filesystems.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -C, --constraint=&#039;&#039;BEEOND (BEEOND_4MDS, BEEOND_MAXMDS)&#039;&#039;&lt;br /&gt;
| #SBATCH --constraint=BEEOND (BEEOND_4MDS, BEEOND_MAXMDS)&lt;br /&gt;
| Job constraint BeeOND filesystem.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Interactive Jobs: salloc ==&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 3.0 you are only allowed to run short jobs (&amp;lt;&amp;lt; 1 hour) with little memory requirements (&amp;lt;&amp;lt; 8 GByte) on the logins nodes. If you want to run longer jobs and/or jobs with a request of more than 8 GByte of memory, you must allocate resources for so-called interactive jobs by usage of the command salloc on a login node. Considering a serial application running on a compute node that requires 5000 MByte of memory and limiting the interactive run to 2 hours the following command has to be executed:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ salloc -p cpu -n 1 -t 120 --mem=5000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then you will get one core on a compute node within the partition &amp;quot;cpu&amp;quot;. After execution of this command &#039;&#039;&#039;DO NOT CLOSE&#039;&#039;&#039; your current terminal session but wait until the queueing system Slurm has granted you the requested resources on the compute system. You will be logged in automatically on the granted core! To run a serial program on the granted core you only have to type the name of the executable.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./&amp;lt;my_serial_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please be aware that your serial job must run less than 2 hours in this example, else the job will be killed during runtime by the system. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can also start now a graphical X11-terminal connecting you to the dedicated resource that is available for 2 hours. You can start it by the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ xterm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that, once the walltime limit has been reached the resources - i.e. the compute node - will automatically be revoked.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
An interactive parallel application running on one compute node or on many compute nodes (e.g. here 5 nodes) with 96 cores each requires usually an amount of memory in GByte (e.g. 50 GByte) and a maximum time (e.g. 1 hour). E.g. 5 nodes can be allocated by the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ salloc -p cpu -N 5 --ntasks-per-node=96 -t 01:00:00  --mem=50gb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you can run parallel jobs on 480 cores requiring 50 GByte of memory per node. Please be aware that you will be logged in on core 0 of the first node.&lt;br /&gt;
If you want to have access to another node you have to open a new terminal, connect it also to bwUniCluster 3.0 and type the following commands to&lt;br /&gt;
connect to the running interactive job and then to a specific node:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ srun --jobid=XXXXXXXX --pty /bin/bash&lt;br /&gt;
$ srun --nodelist=uc3nXXX --pty /bin/bash&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ squeue&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the jobid and the nodelist can be shown.&lt;br /&gt;
&lt;br /&gt;
If you want to run MPI-programs, you can do it by simply typing mpirun &amp;lt;program_name&amp;gt;. Then your program will be run on 480 cores. A very simple example for starting a parallel job can be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mpirun &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also start the debugger ddt by the commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module add devel/ddt&lt;br /&gt;
$ ddt &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above commands will execute the parallel program &amp;lt;my_mpi_program&amp;gt; on all available cores. You can also start parallel programs on a subset of cores; an example for this can be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mpirun -n 50 &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are using Intel MPI you must start &amp;lt;my_mpi_program&amp;gt; by the command mpiexec.hydra (instead of mpirun).&lt;br /&gt;
&lt;br /&gt;
== Interactive Computing with Jupyter ==&lt;br /&gt;
&lt;br /&gt;
== Monitor and manage jobs ==&lt;br /&gt;
&lt;br /&gt;
=== List of your submitted jobs : squeue ===&lt;br /&gt;
Displays information about YOUR active, pending and/or recently completed jobs. The command displays all own active and pending jobs. The command squeue is explained in detail on the webpage https://slurm.schedmd.com/squeue.html or via manpage (man squeue).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;squeue&#039;&#039; example on bwUniCluster 3.0 &amp;lt;small&amp;gt;(Only your own jobs are displayed!)&amp;lt;/small&amp;gt;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ squeue &lt;br /&gt;
             JOBID PARTITION     NAME     USER ST       TIME  NODES NODELIST(REASON)&lt;br /&gt;
              1262       cpu     wrap ka_ab123  R       8:15      1 uc3n002&lt;br /&gt;
              1267 dev_gpu_h     wrap ka_ab123 PD       0:00      1 (Resources)&lt;br /&gt;
              1265   highmem     wrap ka_ab123  R       2:41      1 uc3n084&lt;br /&gt;
$ squeue -l&lt;br /&gt;
             JOBID PARTITION     NAME     USER    STATE       TIME TIME_LIMI  NODES NODELIST(REASON)&lt;br /&gt;
              1262       cpu     wrap ka_ab123  RUNNING       8:55     20:00      1 uc3n002&lt;br /&gt;
              1267 dev_gpu_h     wrap ka_ab123  PENDING       0:00     20:00      1 (Resources)&lt;br /&gt;
              1265   highmem     wrap ka_ab123  RUNNING       3:21     20:00      1 uc3n084&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Detailed job information : scontrol show job ===&lt;br /&gt;
scontrol show job displays detailed job state information and diagnostic output for all or a specified job of yours. Detailed information is available for active, pending and recently completed jobs. The command scontrol is explained in detail on the webpage https://slurm.schedmd.com/scontrol.html or via manpage (man scontrol). &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Display the state of all your jobs in normal mode: scontrol show job&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Display the state of a job with &amp;lt;jobid&amp;gt; in normal mode: scontrol show job &amp;lt;jobid&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Here is an example from bwUniCluster 3.0.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ squeue&lt;br /&gt;
JOBID PARTITION     NAME     USER ST       TIME  NODES NODELIST(REASON)&lt;br /&gt;
1262       cpu     wrap ka_zs040  R       1:12      1 uc3n002&lt;br /&gt;
&lt;br /&gt;
$&lt;br /&gt;
$ # now, see what&#039;s up with my pending job with jobid 1262&lt;br /&gt;
$ &lt;br /&gt;
$ scontrol show job 1262&lt;br /&gt;
&lt;br /&gt;
JobId=1262 JobName=wrap&lt;br /&gt;
   UserId=ka_zs0402(241992) GroupId=ka_scc(12345) MCS_label=N/A&lt;br /&gt;
   Priority=4246 Nice=0 Account=ka QOS=normal&lt;br /&gt;
   JobState=RUNNING Reason=None Dependency=(null)&lt;br /&gt;
   Requeue=1 Restarts=0 BatchFlag=1 Reboot=0 ExitCode=0:0&lt;br /&gt;
   RunTime=00:00:37 TimeLimit=00:20:00 TimeMin=N/A&lt;br /&gt;
   SubmitTime=2025-04-04T10:01:30 EligibleTime=2025-04-04T10:01:30&lt;br /&gt;
   AccrueTime=2025-04-04T10:01:30&lt;br /&gt;
   StartTime=2025-04-04T10:01:31 EndTime=2025-04-04T10:21:31 Deadline=N/A&lt;br /&gt;
   SuspendTime=None SecsPreSuspend=0 LastSchedEval=2025-04-04T10:01:31 Scheduler=Main&lt;br /&gt;
   Partition=cpu AllocNode:Sid=uc3n999:2819841&lt;br /&gt;
   ReqNodeList=(null) ExcNodeList=(null)&lt;br /&gt;
   NodeList=uc3n002&lt;br /&gt;
   BatchHost=uc3n002&lt;br /&gt;
   NumNodes=1 NumCPUs=2 NumTasks=1 CPUs/Task=1 ReqB:S:C:T=0:0:*:*&lt;br /&gt;
   ReqTRES=cpu=1,mem=2000M,node=1,billing=1&lt;br /&gt;
   AllocTRES=cpu=2,mem=4000M,node=1,billing=2&lt;br /&gt;
   Socks/Node=* NtasksPerN:B:S:C=0:0:*:1 CoreSpec=*&lt;br /&gt;
   MinCPUsNode=1 MinMemoryCPU=2000M MinTmpDiskNode=0&lt;br /&gt;
   Features=(null) DelayBoot=00:00:00&lt;br /&gt;
   OverSubscribe=OK Contiguous=0 Licenses=(null) Network=(null)&lt;br /&gt;
   Command=(null)&lt;br /&gt;
   WorkDir=/pfs/data6/home/ka/ka_scc/ka_zs0402&lt;br /&gt;
   StdErr=/pfs/data6/home/ka/ka_scc/ka_zs0402/slurm-1262.out&lt;br /&gt;
   StdIn=/dev/null&lt;br /&gt;
   StdOut=/pfs/data6/home/ka/ka_scc/ka_zs0402/slurm-1262.out&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=== Canceling own jobs : scancel ===&lt;br /&gt;
The scancel command is used to cancel jobs. The command scancel is explained in detail on the webpage https://slurm.schedmd.com/scancel.html or via manpage (man scancel). The command is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ scancel [-i] &amp;lt;job-id&amp;gt;&lt;br /&gt;
$ scancel -t &amp;lt;job_state_name&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Slurm Options =&lt;br /&gt;
[[BwUniCluster3.0/Running_Jobs/Slurm | Detailed Slurm usage]]&lt;br /&gt;
&lt;br /&gt;
= Best Practices =&lt;br /&gt;
&lt;br /&gt;
== Step-by-Step example==&lt;br /&gt;
&lt;br /&gt;
== Dos and Don&#039;ts ==&lt;/div&gt;</summary>
		<author><name>P Schuhmacher</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster3.0/Running_Jobs&amp;diff=15193</id>
		<title>BwUniCluster3.0/Running Jobs</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster3.0/Running_Jobs&amp;diff=15193"/>
		<updated>2025-08-13T12:33:22Z</updated>

		<summary type="html">&lt;p&gt;P Schuhmacher: /* Regular Queues */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
= Purpose and function of a queuing system =&lt;br /&gt;
&lt;br /&gt;
All compute activities on bwUniCluster 3.0 have to be performed on the compute nodes. Compute nodes are only available by requesting the corresponding resources via the queuing system. As soon as the requested resources are available, automated tasks are executed via a batch script or they can be accessed interactively.&amp;lt;br&amp;gt;&lt;br /&gt;
General procedure: Hint to [[Running_Calculations | Running Calculations]]&lt;br /&gt;
&lt;br /&gt;
== Job submission process ==&lt;br /&gt;
&lt;br /&gt;
bwUniCluster 3.0 has installed the workload managing software Slurm. Therefore any job submission by the user is to be executed by commands of the Slurm software. Slurm queues and runs user jobs based on fair sharing policies.&lt;br /&gt;
&lt;br /&gt;
== Slurm ==&lt;br /&gt;
&lt;br /&gt;
HPC Workload Manager on bwUniCluster 3.0 is Slurm.&lt;br /&gt;
Slurm is a cluster management and job scheduling system. Slurm has three key functions. &lt;br /&gt;
* It allocates access to resources (compute cores on nodes) to users for some duration of time so they can perform work. &lt;br /&gt;
* It provides a framework for starting, executing, and monitoring work (normally a parallel job) on the set of allocated nodes. &lt;br /&gt;
* It arbitrates contention for resources by managing a queue of pending work.&lt;br /&gt;
&lt;br /&gt;
Any kind of calculation on the compute nodes of bwUniCluster 3.0 requires the user to define calculations as a sequence of commands together with required run time, number of CPU cores and main memory and submit all, i.e., the &#039;&#039;&#039;batch job&#039;&#039;&#039;, to a resource and workload managing software.&lt;br /&gt;
&lt;br /&gt;
== Terms and definitions ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Partitions &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Slurm manages job queues for different &#039;&#039;&#039;partitions&#039;&#039;&#039;. Partitions are used to group similar node types (e.g. nodes with and without accelerators) and to enforce different access policies and resource limits.&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 3.0 there are different partitions:&lt;br /&gt;
&lt;br /&gt;
* CPU-only nodes&lt;br /&gt;
** 2-socket nodes, consisting of 2 Intel Ice Lake processors with 32 cores each or 2 AMD processors with 48 cores each&lt;br /&gt;
** 2-socket nodes with very high RAM capacity, consisting of 2 AMD processors with 48 cores each&lt;br /&gt;
* GPU-accelerated nodes&lt;br /&gt;
** 2-socket nodes with 4x NVIDIA A100 or 4x NVIDIA H100 GPUs&lt;br /&gt;
** 4-socket node with 4x AMD Instinct accelerator&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Queues &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Job &#039;&#039;&#039;queues&#039;&#039;&#039; are used to manage jobs that request access to shared but limited computing resources of a certain kind (partition).&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 3.0 there are different main types of queues:&lt;br /&gt;
* Regular queues&lt;br /&gt;
** cpu: Jobs that request CPU-only nodes.&lt;br /&gt;
** gpu: Jobs that request GPU-accelerated nodes.&lt;br /&gt;
* Development queues (dev)&lt;br /&gt;
** Short, usually interactive jobs that are used for developing, compiling and testing code and workflows. The intention behind development queues is to provide users with immediate access to computer resources without having to wait. This is the place to realize instantaneous heavy compute without affecting other users, as would be the case on the login nodes.&lt;br /&gt;
&lt;br /&gt;
Requested compute resources such as (wall-)time, number of nodes and amount of memory are restricted and must fit into the boundaries imposed by the queues. The request for compute resources on the bwUniCluster 3.0 &amp;lt;font color=red&amp;gt;requires at least the specification of the &#039;&#039;&#039;queue&#039;&#039;&#039; and the &#039;&#039;&#039;time&#039;&#039;&#039;&amp;lt;/font&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Jobs &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Jobs can be run non-interactively as &#039;&#039;&#039;batch jobs&#039;&#039;&#039; or as &#039;&#039;&#039;interactive jobs&#039;&#039;&#039;.&amp;lt;br&amp;gt;&lt;br /&gt;
Submitting a batch job means, that all steps of a compute project are defined in a Bash script. This Bash script is queued and executed as soon as the compute resources are available and allocated. Jobs are enqueued with the &amp;lt;code&amp;gt;sbatch&amp;lt;/code&amp;gt; command.&lt;br /&gt;
For interactive jobs, the resources are requested with the &amp;lt;code&amp;gt;salloc&amp;lt;/code&amp;gt; command. As soon as the computing resources are available and allocated, a command line prompt is returned on a computing node and the user can freely dispose of the resources now available to him.&lt;br /&gt;
{|style=&amp;quot;background:#deffee; width:100%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;padding:5px; background:#cef2e0; text-align:left&amp;quot;|&lt;br /&gt;
[[Image:Attention.svg|center|25px]]&lt;br /&gt;
|style=&amp;quot;padding:5px; background:#cef2e0; text-align:left&amp;quot;|&lt;br /&gt;
&#039;&#039;&#039;Please remember:&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Heavy computations are not allowed on the login nodes&#039;&#039;&#039;.&amp;lt;br&amp;gt;Use a developement or a regular job queue instead! Please refer to [[BwUniCluster3.0/Login#Allowed_Activities_on_Login_Nodes|Allowed Activities on Login Nodes]].&lt;br /&gt;
* &#039;&#039;&#039;Development queues&#039;&#039;&#039; are meant for &#039;&#039;&#039;development tasks&#039;&#039;&#039;.&amp;lt;br&amp;gt;Do not misuse this queue for regular, short-running jobs or chain jobs! Only one running job at a time is enabled. Maximum queue length is reduced to 3.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Queues on bwUniCluster 3.0 = &lt;br /&gt;
== Policy ==&lt;br /&gt;
&lt;br /&gt;
The computing time is provided in accordance with the &#039;&#039;&#039;fair share policy&#039;&#039;&#039;. The individual investment shares of the respective university and the resources already used by its members are taken into account. Furthermore, the following throttling policy is also active: The &#039;&#039;&#039;maximum amount of physical cores&#039;&#039;&#039; used at any given time from jobs running is &#039;&#039;&#039;1920 per user&#039;&#039;&#039; (aggregated over all running jobs). This number corresponds to 30 nodes on the Ice Lake partition or 20 nodes on the standard partition. The aim is to minimize waiting times and maximize the number of users who can access computing time at the same time.&lt;br /&gt;
&lt;br /&gt;
== Regular Queues ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
! style=&amp;quot;width:5%&amp;quot;| Queue&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Node-Type&lt;br /&gt;
! style=&amp;quot;width:23%&amp;quot;| Default Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Minimal Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Maximum Resources&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;cpu_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Ice Lake&lt;br /&gt;
| mem-per-cpu=2000mb&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=30, mem=249600mb, ntasks-per-node=64, (threads-per-core=2) &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;cpu&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Standard&lt;br /&gt;
| mem-per-cpu=2000mb&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=20, mem=380000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;highmem&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;High Memory&lt;br /&gt;
| mem-per-cpu=12090mb&lt;br /&gt;
| mem=380001mb&lt;br /&gt;
| time=72:00:00, nodes=4, mem=2300000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;gpu_h100&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;NVIDIA GPU x4&lt;br /&gt;
| mem-per-gpu=193300mb&amp;lt;br/&amp;gt;cpus-per-gpu=24&lt;br /&gt;
| gres=gpu:1&lt;br /&gt;
| time=72:00:00, nodes=12, mem=760000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;gpu_mi300&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU node&amp;lt;br/&amp;gt;AMD GPU x4&lt;br /&gt;
| mem-per-gpu=128200mb&amp;lt;br/&amp;gt;cpus-per-gpu=24&lt;br /&gt;
| gres=gpu:1&lt;br /&gt;
| time=72:00:00, nodes=1, mem=510000mb, ntasks-per-node=40, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;gpu_a100_il&amp;lt;/code&amp;gt;/&amp;lt;code&amp;gt;gpu_h100_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;Ice Lake&amp;lt;br/&amp;gt;NVIDIA GPU x4&lt;br /&gt;
| mem-per-gpu=127500mb&amp;lt;br/&amp;gt;cpus-per-gpu=16&lt;br /&gt;
| gres=gpu:1&lt;br /&gt;
| time=48:00:00, nodes=5, mem=510000mb, ntasks-per-node=64, (threads-per-core=2) &lt;br /&gt;
|}&lt;br /&gt;
Table 1: Regular Queues&lt;br /&gt;
&lt;br /&gt;
== Short Queues ==&lt;br /&gt;
&amp;lt;p style=&amp;quot;color:red; &amp;quot;&amp;gt;&amp;lt;b&amp;gt;Queues with a short runtime of 30 minutes.&amp;lt;/b&amp;gt;&amp;lt;/p&amp;gt; &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
! style=&amp;quot;width:5%&amp;quot;| Queue&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Node Type&lt;br /&gt;
! style=&amp;quot;width:23%&amp;quot;| Default Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Minimal Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Maximum Resources&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;gpu_a100_short&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;Ice Lake&amp;lt;br/&amp;gt;NVIDIA GPU x4&lt;br /&gt;
| mem-per-gpu=94000mb&amp;lt;br/&amp;gt;cpus-per-gpu=12&lt;br /&gt;
| gres=gpu:1&lt;br /&gt;
| time=30, nodes=12, mem=376000mb, ntasks-per-node=48, (threads-per-core=2)&lt;br /&gt;
|}&lt;br /&gt;
Table 2: Short Queues&lt;br /&gt;
&lt;br /&gt;
== Development Queues ==&lt;br /&gt;
Only for development, i.e. debugging or performance optimization ...&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
! style=&amp;quot;width:5%&amp;quot;| Queue&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Node Type&lt;br /&gt;
! style=&amp;quot;width:23%&amp;quot;| Default Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Minimal Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Maximum Resources&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_cpu_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Ice Lake&lt;br /&gt;
| mem-per-cpu=2000mb&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=8, mem=249600mb, ntasks-per-node=64, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_cpu&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Standard&lt;br /&gt;
| mem-per-cpu=2000mb&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=380000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_gpu_h100&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;NVIDIA GPU x4&lt;br /&gt;
| mem-per-gpu=193300mb&amp;lt;br/&amp;gt;cpus-per-gpu=24&lt;br /&gt;
| gres=gpu:1&lt;br /&gt;
| time=30, nodes=1, mem=760000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_gpu_a100_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;NVIDIA GPU x4&amp;lt;br/&amp;gt;&lt;br /&gt;
| mem-per-gpu=127500mb&amp;lt;br/&amp;gt;cpus-per-gpu=16 &lt;br /&gt;
| gres=gpu:1&lt;br /&gt;
| time=30, nodes=1, mem=510000mb, ntasks-per-node=64, (threads-per-core=2) &lt;br /&gt;
|}&lt;br /&gt;
Table 3: Development Queues&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Default resources of a queue class define number of tasks and memory if not explicitly given with sbatch command. Resource list acronyms &#039;&#039;--time&#039;&#039;, &#039;&#039;--ntasks&#039;&#039;, &#039;&#039;--nodes&#039;&#039;, &#039;&#039;--mem&#039;&#039; and &#039;&#039;--mem-per-cpu&#039;&#039; are described [[BwUniCluster3.0/Running_Jobs/Slurm|here]].&lt;br /&gt;
&lt;br /&gt;
== Check available resources: sinfo_t_idle ==&lt;br /&gt;
The Slurm command sinfo is used to view partition and node information for a system running Slurm. It incorporates down time, reservations, and node state information in determining the available backfill window. The sinfo command can only be used by the administrator.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
SCC has prepared a special script (sinfo_t_idle) to find out how many processors are available for immediate use on the system. It is anticipated that users will use this information to submit jobs that meet these criteria and thus obtain quick job turnaround times. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The following command displays what resources are available for immediate use for the whole partition.&lt;br /&gt;
&amp;lt;pre&amp;gt;$ sinfo_t_idle &lt;br /&gt;
Partition dev_cpu                 :      1 nodes idle&lt;br /&gt;
Partition cpu                     :      1 nodes idle&lt;br /&gt;
Partition highmem                 :      2 nodes idle&lt;br /&gt;
Partition dev_gpu_h100            :      0 nodes idle&lt;br /&gt;
Partition gpu_h100                :      0 nodes idle&lt;br /&gt;
Partition gpu_mi300               :      0 nodes idle&lt;br /&gt;
Partition dev_cpu_il              :      7 nodes idle&lt;br /&gt;
Partition cpu_il                  :      2 nodes idle&lt;br /&gt;
Partition dev_gpu_a100_il         :      1 nodes idle&lt;br /&gt;
Partition gpu_a100_il             :      0 nodes idle&lt;br /&gt;
Partition gpu_h100_il             :      1 nodes idle&lt;br /&gt;
Partition gpu_a100_short          :      0 nodes idle&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Running Jobs =&lt;br /&gt;
&lt;br /&gt;
== Slurm Commands (excerpt) ==&lt;br /&gt;
Important Slurm commands for non-administrators working on bwUniCluster 3.0.&lt;br /&gt;
{| width=850px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Slurm commands !! Brief explanation&lt;br /&gt;
|-&lt;br /&gt;
| [[#Batch Jobs: sbatch|sbatch]] || Submits a job and puts it into the queue [[https://slurm.schedmd.com/sbatch.html sbatch]] &lt;br /&gt;
|-&lt;br /&gt;
| [[#Interactive Jobs: salloc|salloc]] || Requests resources for an interactive Job [[https://slurm.schedmd.com/salloc.html salloc]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Monitor and manage jobs |scontrol show job]] || Displays detailed job state information [[https://slurm.schedmd.com/scontrol.html scontrol]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#List of your submitted jobs : squeue|squeue]] || Displays information about active, eligible, blocked, and/or recently completed jobs [[https://slurm.schedmd.com/squeue.html squeue]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#List of your submitted jobs : squeue|squeue --start]] || Returns start time of submitted job [[https://slurm.schedmd.com/squeue.html squeue]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Check available resources: sinfo_t_idle|sinfo_t_idle]] || Shows what resources are available for immediate use [[https://slurm.schedmd.com/sinfo.html sinfo]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Canceling own jobs : scancel|scancel]] || Cancels a job [[https://slurm.schedmd.com/scancel.html scancel]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* [https://slurm.schedmd.com/tutorials.html  Slurm Tutorials]&lt;br /&gt;
* [https://slurm.schedmd.com/pdfs/summary.pdf  Slurm command/option summary (2 pages)]&lt;br /&gt;
* [https://slurm.schedmd.com/man_index.html  Slurm Commands]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Batch Jobs: sbatch ==&lt;br /&gt;
&lt;br /&gt;
Batch jobs are submitted by using the command &#039;&#039;&#039;sbatch&#039;&#039;&#039;. The main purpose of the &#039;&#039;&#039;sbatch&#039;&#039;&#039; command is to specify the resources that are needed to run the job. &#039;&#039;&#039;sbatch&#039;&#039;&#039; will then queue the batch job. However, starting of batch job depends on the availability of the requested resources and the fair sharing value.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The syntax and use of &#039;&#039;&#039;sbatch&#039;&#039;&#039; can be displayed via:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ man sbatch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;sbatch&#039;&#039;&#039; options can be used from the command line or in your job script. Different defaults for some of these options are set based on the queue and can be found [[BwUniCluster3.0/Slurm | here]]&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | sbatch Options&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width:8%&amp;quot;| Command line&lt;br /&gt;
! style=&amp;quot;width:9%&amp;quot;| Script&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Purpose&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -t, --time=&#039;&#039;time&#039;&#039;&lt;br /&gt;
| #SBATCH --time=&#039;&#039;time&#039;&#039;&lt;br /&gt;
| Wall clock time limit.&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -N, --nodes=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --nodes=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of nodes to be used.&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -n, --ntasks=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --ntasks=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of tasks to be launched.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --ntasks-per-node=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --ntasks-per-node=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Maximum count of tasks per node.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -c, --cpus-per-task=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --cpus-per-task=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of CPUs required per (MPI-)task.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mem=&#039;&#039;value_in_MB&#039;&#039;&lt;br /&gt;
| #SBATCH --mem=&#039;&#039;value_in_MB&#039;&#039; &lt;br /&gt;
| Memory in MegaByte per node. (You should omit the setting of this option.)&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mem-per-cpu=&#039;&#039;value_in_MB&#039;&#039;&lt;br /&gt;
| #SBATCH --mem-per-cpu=&#039;&#039;value_in_MB&#039;&#039; &lt;br /&gt;
| Minimum Memory required per allocated CPU. (You should omit the setting of this option.)&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mail-type=&#039;&#039;type&#039;&#039;&lt;br /&gt;
| #SBATCH --mail-type=&#039;&#039;type&#039;&#039;&lt;br /&gt;
| Notify user by email when certain event types occur.&amp;lt;br&amp;gt;Valid type values are NONE, BEGIN, END, FAIL, REQUEUE, ALL.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mail-user=&#039;&#039;mail-address&#039;&#039;&lt;br /&gt;
| #SBATCH --mail-user=&#039;&#039;mail-address&#039;&#039;&lt;br /&gt;
|  The specified mail-address receives email notification of state changes as defined by --mail-type.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --output=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --output=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| File in which job output is stored. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --error=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --error=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| File in which job error messages are stored. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -J, --job-name=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --job-name=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| Job name.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --export=[ALL,] &#039;&#039;env-variables&#039;&#039;&lt;br /&gt;
| #SBATCH --export=[ALL,] &#039;&#039;env-variables&#039;&#039;&lt;br /&gt;
| Identifies which environment variables from the submission environment are propagated to the launched application. Default is ALL.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -A, --account=&#039;&#039;group-name&#039;&#039;&lt;br /&gt;
| #SBATCH --account=&#039;&#039;group-name&#039;&#039;&lt;br /&gt;
| Change resources used by this job to specified group. You may need this option if your account is assigned to more than one group. By command &amp;quot;scontrol show job&amp;quot; the project group the job is accounted on can be seen behind &amp;quot;Account=&amp;quot;. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -p, --partition=&#039;&#039;queue-name&#039;&#039;&lt;br /&gt;
| #SBATCH --partition=&#039;&#039;queue-name&#039;&#039;&lt;br /&gt;
| Request a specific queue for the resource allocation.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --reservation=&#039;&#039;reservation-name&#039;&#039;&lt;br /&gt;
| #SBATCH --reservation=&#039;&#039;reservation-name&#039;&#039;&lt;br /&gt;
| Use a specific reservation for the resource allocation.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -C, --constraint=&#039;&#039;LSDF&#039;&#039;&lt;br /&gt;
| #SBATCH --constraint=LSDF&lt;br /&gt;
| Job constraint LSDF filesystems.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -C, --constraint=&#039;&#039;BEEOND (BEEOND_4MDS, BEEOND_MAXMDS)&#039;&#039;&lt;br /&gt;
| #SBATCH --constraint=BEEOND (BEEOND_4MDS, BEEOND_MAXMDS)&lt;br /&gt;
| Job constraint BeeOND filesystem.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Interactive Jobs: salloc ==&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 3.0 you are only allowed to run short jobs (&amp;lt;&amp;lt; 1 hour) with little memory requirements (&amp;lt;&amp;lt; 8 GByte) on the logins nodes. If you want to run longer jobs and/or jobs with a request of more than 8 GByte of memory, you must allocate resources for so-called interactive jobs by usage of the command salloc on a login node. Considering a serial application running on a compute node that requires 5000 MByte of memory and limiting the interactive run to 2 hours the following command has to be executed:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ salloc -p cpu -n 1 -t 120 --mem=5000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then you will get one core on a compute node within the partition &amp;quot;cpu&amp;quot;. After execution of this command &#039;&#039;&#039;DO NOT CLOSE&#039;&#039;&#039; your current terminal session but wait until the queueing system Slurm has granted you the requested resources on the compute system. You will be logged in automatically on the granted core! To run a serial program on the granted core you only have to type the name of the executable.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./&amp;lt;my_serial_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please be aware that your serial job must run less than 2 hours in this example, else the job will be killed during runtime by the system. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can also start now a graphical X11-terminal connecting you to the dedicated resource that is available for 2 hours. You can start it by the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ xterm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that, once the walltime limit has been reached the resources - i.e. the compute node - will automatically be revoked.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
An interactive parallel application running on one compute node or on many compute nodes (e.g. here 5 nodes) with 96 cores each requires usually an amount of memory in GByte (e.g. 50 GByte) and a maximum time (e.g. 1 hour). E.g. 5 nodes can be allocated by the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ salloc -p cpu -N 5 --ntasks-per-node=96 -t 01:00:00  --mem=50gb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you can run parallel jobs on 480 cores requiring 50 GByte of memory per node. Please be aware that you will be logged in on core 0 of the first node.&lt;br /&gt;
If you want to have access to another node you have to open a new terminal, connect it also to bwUniCluster 3.0 and type the following commands to&lt;br /&gt;
connect to the running interactive job and then to a specific node:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ srun --jobid=XXXXXXXX --pty /bin/bash&lt;br /&gt;
$ srun --nodelist=uc3nXXX --pty /bin/bash&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ squeue&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the jobid and the nodelist can be shown.&lt;br /&gt;
&lt;br /&gt;
If you want to run MPI-programs, you can do it by simply typing mpirun &amp;lt;program_name&amp;gt;. Then your program will be run on 480 cores. A very simple example for starting a parallel job can be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mpirun &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also start the debugger ddt by the commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module add devel/ddt&lt;br /&gt;
$ ddt &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above commands will execute the parallel program &amp;lt;my_mpi_program&amp;gt; on all available cores. You can also start parallel programs on a subset of cores; an example for this can be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mpirun -n 50 &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are using Intel MPI you must start &amp;lt;my_mpi_program&amp;gt; by the command mpiexec.hydra (instead of mpirun).&lt;br /&gt;
&lt;br /&gt;
== Interactive Computing with Jupyter ==&lt;br /&gt;
&lt;br /&gt;
== Monitor and manage jobs ==&lt;br /&gt;
&lt;br /&gt;
=== List of your submitted jobs : squeue ===&lt;br /&gt;
Displays information about YOUR active, pending and/or recently completed jobs. The command displays all own active and pending jobs. The command squeue is explained in detail on the webpage https://slurm.schedmd.com/squeue.html or via manpage (man squeue).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;squeue&#039;&#039; example on bwUniCluster 3.0 &amp;lt;small&amp;gt;(Only your own jobs are displayed!)&amp;lt;/small&amp;gt;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ squeue &lt;br /&gt;
             JOBID PARTITION     NAME     USER ST       TIME  NODES NODELIST(REASON)&lt;br /&gt;
              1262       cpu     wrap ka_ab123  R       8:15      1 uc3n002&lt;br /&gt;
              1267 dev_gpu_h     wrap ka_ab123 PD       0:00      1 (Resources)&lt;br /&gt;
              1265   highmem     wrap ka_ab123  R       2:41      1 uc3n084&lt;br /&gt;
$ squeue -l&lt;br /&gt;
             JOBID PARTITION     NAME     USER    STATE       TIME TIME_LIMI  NODES NODELIST(REASON)&lt;br /&gt;
              1262       cpu     wrap ka_ab123  RUNNING       8:55     20:00      1 uc3n002&lt;br /&gt;
              1267 dev_gpu_h     wrap ka_ab123  PENDING       0:00     20:00      1 (Resources)&lt;br /&gt;
              1265   highmem     wrap ka_ab123  RUNNING       3:21     20:00      1 uc3n084&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Detailed job information : scontrol show job ===&lt;br /&gt;
scontrol show job displays detailed job state information and diagnostic output for all or a specified job of yours. Detailed information is available for active, pending and recently completed jobs. The command scontrol is explained in detail on the webpage https://slurm.schedmd.com/scontrol.html or via manpage (man scontrol). &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Display the state of all your jobs in normal mode: scontrol show job&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Display the state of a job with &amp;lt;jobid&amp;gt; in normal mode: scontrol show job &amp;lt;jobid&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Here is an example from bwUniCluster 3.0.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ squeue&lt;br /&gt;
JOBID PARTITION     NAME     USER ST       TIME  NODES NODELIST(REASON)&lt;br /&gt;
1262       cpu     wrap ka_zs040  R       1:12      1 uc3n002&lt;br /&gt;
&lt;br /&gt;
$&lt;br /&gt;
$ # now, see what&#039;s up with my pending job with jobid 1262&lt;br /&gt;
$ &lt;br /&gt;
$ scontrol show job 1262&lt;br /&gt;
&lt;br /&gt;
JobId=1262 JobName=wrap&lt;br /&gt;
   UserId=ka_zs0402(241992) GroupId=ka_scc(12345) MCS_label=N/A&lt;br /&gt;
   Priority=4246 Nice=0 Account=ka QOS=normal&lt;br /&gt;
   JobState=RUNNING Reason=None Dependency=(null)&lt;br /&gt;
   Requeue=1 Restarts=0 BatchFlag=1 Reboot=0 ExitCode=0:0&lt;br /&gt;
   RunTime=00:00:37 TimeLimit=00:20:00 TimeMin=N/A&lt;br /&gt;
   SubmitTime=2025-04-04T10:01:30 EligibleTime=2025-04-04T10:01:30&lt;br /&gt;
   AccrueTime=2025-04-04T10:01:30&lt;br /&gt;
   StartTime=2025-04-04T10:01:31 EndTime=2025-04-04T10:21:31 Deadline=N/A&lt;br /&gt;
   SuspendTime=None SecsPreSuspend=0 LastSchedEval=2025-04-04T10:01:31 Scheduler=Main&lt;br /&gt;
   Partition=cpu AllocNode:Sid=uc3n999:2819841&lt;br /&gt;
   ReqNodeList=(null) ExcNodeList=(null)&lt;br /&gt;
   NodeList=uc3n002&lt;br /&gt;
   BatchHost=uc3n002&lt;br /&gt;
   NumNodes=1 NumCPUs=2 NumTasks=1 CPUs/Task=1 ReqB:S:C:T=0:0:*:*&lt;br /&gt;
   ReqTRES=cpu=1,mem=2000M,node=1,billing=1&lt;br /&gt;
   AllocTRES=cpu=2,mem=4000M,node=1,billing=2&lt;br /&gt;
   Socks/Node=* NtasksPerN:B:S:C=0:0:*:1 CoreSpec=*&lt;br /&gt;
   MinCPUsNode=1 MinMemoryCPU=2000M MinTmpDiskNode=0&lt;br /&gt;
   Features=(null) DelayBoot=00:00:00&lt;br /&gt;
   OverSubscribe=OK Contiguous=0 Licenses=(null) Network=(null)&lt;br /&gt;
   Command=(null)&lt;br /&gt;
   WorkDir=/pfs/data6/home/ka/ka_scc/ka_zs0402&lt;br /&gt;
   StdErr=/pfs/data6/home/ka/ka_scc/ka_zs0402/slurm-1262.out&lt;br /&gt;
   StdIn=/dev/null&lt;br /&gt;
   StdOut=/pfs/data6/home/ka/ka_scc/ka_zs0402/slurm-1262.out&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=== Canceling own jobs : scancel ===&lt;br /&gt;
The scancel command is used to cancel jobs. The command scancel is explained in detail on the webpage https://slurm.schedmd.com/scancel.html or via manpage (man scancel). The command is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ scancel [-i] &amp;lt;job-id&amp;gt;&lt;br /&gt;
$ scancel -t &amp;lt;job_state_name&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Slurm Options =&lt;br /&gt;
[[BwUniCluster3.0/Running_Jobs/Slurm | Detailed Slurm usage]]&lt;br /&gt;
&lt;br /&gt;
= Best Practices =&lt;br /&gt;
&lt;br /&gt;
== Step-by-Step example==&lt;br /&gt;
&lt;br /&gt;
== Dos and Don&#039;ts ==&lt;/div&gt;</summary>
		<author><name>P Schuhmacher</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster3.0/Running_Jobs&amp;diff=15164</id>
		<title>BwUniCluster3.0/Running Jobs</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster3.0/Running_Jobs&amp;diff=15164"/>
		<updated>2025-07-22T06:57:56Z</updated>

		<summary type="html">&lt;p&gt;P Schuhmacher: /* Short Queues */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
= Purpose and function of a queuing system =&lt;br /&gt;
&lt;br /&gt;
All compute activities on bwUniCluster 3.0 have to be performed on the compute nodes. Compute nodes are only available by requesting the corresponding resources via the queuing system. As soon as the requested resources are available, automated tasks are executed via a batch script or they can be accessed interactively.&amp;lt;br&amp;gt;&lt;br /&gt;
General procedure: Hint to [[Running_Calculations | Running Calculations]]&lt;br /&gt;
&lt;br /&gt;
== Job submission process ==&lt;br /&gt;
&lt;br /&gt;
bwUniCluster 3.0 has installed the workload managing software Slurm. Therefore any job submission by the user is to be executed by commands of the Slurm software. Slurm queues and runs user jobs based on fair sharing policies.&lt;br /&gt;
&lt;br /&gt;
== Slurm ==&lt;br /&gt;
&lt;br /&gt;
HPC Workload Manager on bwUniCluster 3.0 is Slurm.&lt;br /&gt;
Slurm is a cluster management and job scheduling system. Slurm has three key functions. &lt;br /&gt;
* It allocates access to resources (compute cores on nodes) to users for some duration of time so they can perform work. &lt;br /&gt;
* It provides a framework for starting, executing, and monitoring work (normally a parallel job) on the set of allocated nodes. &lt;br /&gt;
* It arbitrates contention for resources by managing a queue of pending work.&lt;br /&gt;
&lt;br /&gt;
Any kind of calculation on the compute nodes of bwUniCluster 3.0 requires the user to define calculations as a sequence of commands together with required run time, number of CPU cores and main memory and submit all, i.e., the &#039;&#039;&#039;batch job&#039;&#039;&#039;, to a resource and workload managing software.&lt;br /&gt;
&lt;br /&gt;
== Terms and definitions ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Partitions &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Slurm manages job queues for different &#039;&#039;&#039;partitions&#039;&#039;&#039;. Partitions are used to group similar node types (e.g. nodes with and without accelerators) and to enforce different access policies and resource limits.&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 3.0 there are different partitions:&lt;br /&gt;
&lt;br /&gt;
* CPU-only nodes&lt;br /&gt;
** 2-socket nodes, consisting of 2 Intel Ice Lake processors with 32 cores each or 2 AMD processors with 48 cores each&lt;br /&gt;
** 2-socket nodes with very high RAM capacity, consisting of 2 AMD processors with 48 cores each&lt;br /&gt;
* GPU-accelerated nodes&lt;br /&gt;
** 2-socket nodes with 4x NVIDIA A100 or 4x NVIDIA H100 GPUs&lt;br /&gt;
** 4-socket node with 4x AMD Instinct accelerator&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Queues &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Job &#039;&#039;&#039;queues&#039;&#039;&#039; are used to manage jobs that request access to shared but limited computing resources of a certain kind (partition).&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 3.0 there are different main types of queues:&lt;br /&gt;
* Regular queues&lt;br /&gt;
** cpu: Jobs that request CPU-only nodes.&lt;br /&gt;
** gpu: Jobs that request GPU-accelerated nodes.&lt;br /&gt;
* Development queues (dev)&lt;br /&gt;
** Short, usually interactive jobs that are used for developing, compiling and testing code and workflows. The intention behind development queues is to provide users with immediate access to computer resources without having to wait. This is the place to realize instantaneous heavy compute without affecting other users, as would be the case on the login nodes.&lt;br /&gt;
&lt;br /&gt;
Requested compute resources such as (wall-)time, number of nodes and amount of memory are restricted and must fit into the boundaries imposed by the queues. The request for compute resources on the bwUniCluster 3.0 &amp;lt;font color=red&amp;gt;requires at least the specification of the &#039;&#039;&#039;queue&#039;&#039;&#039; and the &#039;&#039;&#039;time&#039;&#039;&#039;&amp;lt;/font&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Jobs &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Jobs can be run non-interactively as &#039;&#039;&#039;batch jobs&#039;&#039;&#039; or as &#039;&#039;&#039;interactive jobs&#039;&#039;&#039;.&amp;lt;br&amp;gt;&lt;br /&gt;
Submitting a batch job means, that all steps of a compute project are defined in a Bash script. This Bash script is queued and executed as soon as the compute resources are available and allocated. Jobs are enqueued with the &amp;lt;code&amp;gt;sbatch&amp;lt;/code&amp;gt; command.&lt;br /&gt;
For interactive jobs, the resources are requested with the &amp;lt;code&amp;gt;salloc&amp;lt;/code&amp;gt; command. As soon as the computing resources are available and allocated, a command line prompt is returned on a computing node and the user can freely dispose of the resources now available to him.&lt;br /&gt;
{|style=&amp;quot;background:#deffee; width:100%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;padding:5px; background:#cef2e0; text-align:left&amp;quot;|&lt;br /&gt;
[[Image:Attention.svg|center|25px]]&lt;br /&gt;
|style=&amp;quot;padding:5px; background:#cef2e0; text-align:left&amp;quot;|&lt;br /&gt;
&#039;&#039;&#039;Please remember:&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Heavy computations are not allowed on the login nodes&#039;&#039;&#039;.&amp;lt;br&amp;gt;Use a developement or a regular job queue instead! Please refer to [[BwUniCluster3.0/Login#Allowed_Activities_on_Login_Nodes|Allowed Activities on Login Nodes]].&lt;br /&gt;
* &#039;&#039;&#039;Development queues&#039;&#039;&#039; are meant for &#039;&#039;&#039;development tasks&#039;&#039;&#039;.&amp;lt;br&amp;gt;Do not misuse this queue for regular, short-running jobs or chain jobs! Only one running job at a time is enabled. Maximum queue length is reduced to 3.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Queues on bwUniCluster 3.0 = &lt;br /&gt;
== Policy ==&lt;br /&gt;
&lt;br /&gt;
The computing time is provided in accordance with the &#039;&#039;&#039;fair share policy&#039;&#039;&#039;. The individual investment shares of the respective university and the resources already used by its members are taken into account. Furthermore, the following throttling policy is also active: The &#039;&#039;&#039;maximum amount of physical cores&#039;&#039;&#039; used at any given time from jobs running is &#039;&#039;&#039;1920 per user&#039;&#039;&#039; (aggregated over all running jobs). This number corresponds to 30 nodes on the Ice Lake partition or 20 nodes on the standard partition. The aim is to minimize waiting times and maximize the number of users who can access computing time at the same time.&lt;br /&gt;
&lt;br /&gt;
== Regular Queues ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
! style=&amp;quot;width:5%&amp;quot;| Queue&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Node-Type&lt;br /&gt;
! style=&amp;quot;width:23%&amp;quot;| Default Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Minimal Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Maximum Resources&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;cpu_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Ice Lake&lt;br /&gt;
| mem-per-cpu=2000mb&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=30, mem=249600mb, ntasks-per-node=64, (threads-per-core=2) &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;cpu&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Standard&lt;br /&gt;
| mem-per-cpu=2000mb&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=20, mem=380000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;highmem&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;High Memory&lt;br /&gt;
| mem-per-cpu=12090mb&lt;br /&gt;
| mem=380001mb&lt;br /&gt;
| time=72:00:00, nodes=4, mem=2300000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;gpu_h100&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;NVIDIA GPU x4&lt;br /&gt;
| mem-per-gpu=193300mb&amp;lt;br/&amp;gt;cpus-per-gpu=24&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=12, mem=760000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;gpu_mi300&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU node&amp;lt;br/&amp;gt;AMD GPU x4&lt;br /&gt;
| mem-per-gpu=128200mb&amp;lt;br/&amp;gt;cpus-per-gpu=24&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=1, mem=510000mb, ntasks-per-node=40, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;gpu_a100_il&amp;lt;/code&amp;gt;/&amp;lt;code&amp;gt;gpu_h100_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;Ice Lake&amp;lt;br/&amp;gt;NVIDIA GPU x4&lt;br /&gt;
| mem-per-gpu=127500mb&amp;lt;br/&amp;gt;cpus-per-gpu=16&lt;br /&gt;
| &lt;br /&gt;
| time=48:00:00, nodes=9, mem=510000mb, ntasks-per-node=64, (threads-per-core=2) &lt;br /&gt;
|}&lt;br /&gt;
Table 1: Regular Queues&lt;br /&gt;
&lt;br /&gt;
== Short Queues ==&lt;br /&gt;
Queues with a short runtime of 30 minutes.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
! style=&amp;quot;width:5%&amp;quot;| Queue&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Node Type&lt;br /&gt;
! style=&amp;quot;width:23%&amp;quot;| Default Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Minimal Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Maximum Resources&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;gpu_a100_short&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;Ice Lake&amp;lt;br/&amp;gt;NVIDIA GPU x4&lt;br /&gt;
| mem-per-gpu=94000mb&amp;lt;br/&amp;gt;cpus-per-gpu=12&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=12, mem=376000mb, ntasks-per-node=48, (threads-per-core=2)&lt;br /&gt;
|}&lt;br /&gt;
Table 2: Short Queues&lt;br /&gt;
&lt;br /&gt;
== Development Queues ==&lt;br /&gt;
Only for development, i.e. debugging or performance optimization ...&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
! style=&amp;quot;width:5%&amp;quot;| Queue&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Node Type&lt;br /&gt;
! style=&amp;quot;width:23%&amp;quot;| Default Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Minimal Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Maximum Resources&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_cpu_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Ice Lake&lt;br /&gt;
| mem-per-cpu=2000mb&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=8, mem=249600mb, ntasks-per-node=64, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_cpu&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Standard&lt;br /&gt;
| mem-per-cpu=2000mb&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=380000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_gpu_h100&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;NVIDIA GPU x4&lt;br /&gt;
| mem-per-gpu=193300mb&amp;lt;br/&amp;gt;cpus-per-gpu=24&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=760000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_gpu_a100_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;NVIDIA GPU x4&amp;lt;br/&amp;gt;&lt;br /&gt;
| mem-per-gpu=127500mb&amp;lt;br/&amp;gt;cpus-per-gpu=16 &lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=510000mb, ntasks-per-node=64, (threads-per-core=2) &lt;br /&gt;
|}&lt;br /&gt;
Table 3: Development Queues&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Default resources of a queue class define number of tasks and memory if not explicitly given with sbatch command. Resource list acronyms &#039;&#039;--time&#039;&#039;, &#039;&#039;--ntasks&#039;&#039;, &#039;&#039;--nodes&#039;&#039;, &#039;&#039;--mem&#039;&#039; and &#039;&#039;--mem-per-cpu&#039;&#039; are described [[BwUniCluster3.0/Running_Jobs/Slurm|here]].&lt;br /&gt;
&lt;br /&gt;
== Check available resources: sinfo_t_idle ==&lt;br /&gt;
The Slurm command sinfo is used to view partition and node information for a system running Slurm. It incorporates down time, reservations, and node state information in determining the available backfill window. The sinfo command can only be used by the administrator.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
SCC has prepared a special script (sinfo_t_idle) to find out how many processors are available for immediate use on the system. It is anticipated that users will use this information to submit jobs that meet these criteria and thus obtain quick job turnaround times. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The following command displays what resources are available for immediate use for the whole partition.&lt;br /&gt;
&amp;lt;pre&amp;gt;$ sinfo_t_idle&lt;br /&gt;
Partition dev_cpu                 :      2 nodes idle&lt;br /&gt;
Partition cpu                     :     68 nodes idle&lt;br /&gt;
Partition highmem                 :      4 nodes idle&lt;br /&gt;
Partition dev_gpu_h100            :      0 nodes idle&lt;br /&gt;
Partition gpu_h100                :     11 nodes idle&lt;br /&gt;
Partition gpu_mi300               :      1 nodes idle&lt;br /&gt;
Partition dev_cpu_il              :      0 nodes idle&lt;br /&gt;
Partition cpu_il                  :      0 nodes idle&lt;br /&gt;
Partition dev_gpu_a100_il         :      0 nodes idle&lt;br /&gt;
Partition gpu_a100_il             :      0 nodes idle&lt;br /&gt;
Partition gpu_h100_il             :      0 nodes idle&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Running Jobs =&lt;br /&gt;
&lt;br /&gt;
== Slurm Commands (excerpt) ==&lt;br /&gt;
Important Slurm commands for non-administrators working on bwUniCluster 3.0.&lt;br /&gt;
{| width=850px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Slurm commands !! Brief explanation&lt;br /&gt;
|-&lt;br /&gt;
| [[#Batch Jobs: sbatch|sbatch]] || Submits a job and puts it into the queue [[https://slurm.schedmd.com/sbatch.html sbatch]] &lt;br /&gt;
|-&lt;br /&gt;
| [[#Interactive Jobs: salloc|salloc]] || Requests resources for an interactive Job [[https://slurm.schedmd.com/salloc.html salloc]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Monitor and manage jobs |scontrol show job]] || Displays detailed job state information [[https://slurm.schedmd.com/scontrol.html scontrol]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#List of your submitted jobs : squeue|squeue]] || Displays information about active, eligible, blocked, and/or recently completed jobs [[https://slurm.schedmd.com/squeue.html squeue]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#List of your submitted jobs : squeue|squeue --start]] || Returns start time of submitted job [[https://slurm.schedmd.com/squeue.html squeue]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Check available resources: sinfo_t_idle|sinfo_t_idle]] || Shows what resources are available for immediate use [[https://slurm.schedmd.com/sinfo.html sinfo]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Canceling own jobs : scancel|scancel]] || Cancels a job [[https://slurm.schedmd.com/scancel.html scancel]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* [https://slurm.schedmd.com/tutorials.html  Slurm Tutorials]&lt;br /&gt;
* [https://slurm.schedmd.com/pdfs/summary.pdf  Slurm command/option summary (2 pages)]&lt;br /&gt;
* [https://slurm.schedmd.com/man_index.html  Slurm Commands]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Batch Jobs: sbatch ==&lt;br /&gt;
&lt;br /&gt;
Batch jobs are submitted by using the command &#039;&#039;&#039;sbatch&#039;&#039;&#039;. The main purpose of the &#039;&#039;&#039;sbatch&#039;&#039;&#039; command is to specify the resources that are needed to run the job. &#039;&#039;&#039;sbatch&#039;&#039;&#039; will then queue the batch job. However, starting of batch job depends on the availability of the requested resources and the fair sharing value.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The syntax and use of &#039;&#039;&#039;sbatch&#039;&#039;&#039; can be displayed via:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ man sbatch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;sbatch&#039;&#039;&#039; options can be used from the command line or in your job script. Different defaults for some of these options are set based on the queue and can be found [[BwUniCluster3.0/Slurm | here]]&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | sbatch Options&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width:8%&amp;quot;| Command line&lt;br /&gt;
! style=&amp;quot;width:9%&amp;quot;| Script&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Purpose&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -t, --time=&#039;&#039;time&#039;&#039;&lt;br /&gt;
| #SBATCH --time=&#039;&#039;time&#039;&#039;&lt;br /&gt;
| Wall clock time limit.&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -N, --nodes=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --nodes=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of nodes to be used.&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -n, --ntasks=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --ntasks=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of tasks to be launched.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --ntasks-per-node=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --ntasks-per-node=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Maximum count of tasks per node.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -c, --cpus-per-task=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --cpus-per-task=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of CPUs required per (MPI-)task.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mem=&#039;&#039;value_in_MB&#039;&#039;&lt;br /&gt;
| #SBATCH --mem=&#039;&#039;value_in_MB&#039;&#039; &lt;br /&gt;
| Memory in MegaByte per node. (You should omit the setting of this option.)&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mem-per-cpu=&#039;&#039;value_in_MB&#039;&#039;&lt;br /&gt;
| #SBATCH --mem-per-cpu=&#039;&#039;value_in_MB&#039;&#039; &lt;br /&gt;
| Minimum Memory required per allocated CPU. (You should omit the setting of this option.)&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mail-type=&#039;&#039;type&#039;&#039;&lt;br /&gt;
| #SBATCH --mail-type=&#039;&#039;type&#039;&#039;&lt;br /&gt;
| Notify user by email when certain event types occur.&amp;lt;br&amp;gt;Valid type values are NONE, BEGIN, END, FAIL, REQUEUE, ALL.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mail-user=&#039;&#039;mail-address&#039;&#039;&lt;br /&gt;
| #SBATCH --mail-user=&#039;&#039;mail-address&#039;&#039;&lt;br /&gt;
|  The specified mail-address receives email notification of state changes as defined by --mail-type.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --output=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --output=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| File in which job output is stored. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --error=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --error=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| File in which job error messages are stored. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -J, --job-name=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --job-name=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| Job name.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --export=[ALL,] &#039;&#039;env-variables&#039;&#039;&lt;br /&gt;
| #SBATCH --export=[ALL,] &#039;&#039;env-variables&#039;&#039;&lt;br /&gt;
| Identifies which environment variables from the submission environment are propagated to the launched application. Default is ALL.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -A, --account=&#039;&#039;group-name&#039;&#039;&lt;br /&gt;
| #SBATCH --account=&#039;&#039;group-name&#039;&#039;&lt;br /&gt;
| Change resources used by this job to specified group. You may need this option if your account is assigned to more than one group. By command &amp;quot;scontrol show job&amp;quot; the project group the job is accounted on can be seen behind &amp;quot;Account=&amp;quot;. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -p, --partition=&#039;&#039;queue-name&#039;&#039;&lt;br /&gt;
| #SBATCH --partition=&#039;&#039;queue-name&#039;&#039;&lt;br /&gt;
| Request a specific queue for the resource allocation.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --reservation=&#039;&#039;reservation-name&#039;&#039;&lt;br /&gt;
| #SBATCH --reservation=&#039;&#039;reservation-name&#039;&#039;&lt;br /&gt;
| Use a specific reservation for the resource allocation.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -C, --constraint=&#039;&#039;LSDF&#039;&#039;&lt;br /&gt;
| #SBATCH --constraint=LSDF&lt;br /&gt;
| Job constraint LSDF filesystems.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -C, --constraint=&#039;&#039;BEEOND (BEEOND_4MDS, BEEOND_MAXMDS)&#039;&#039;&lt;br /&gt;
| #SBATCH --constraint=BEEOND (BEEOND_4MDS, BEEOND_MAXMDS)&lt;br /&gt;
| Job constraint BeeOND filesystem.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Interactive Jobs: salloc ==&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 3.0 you are only allowed to run short jobs (&amp;lt;&amp;lt; 1 hour) with little memory requirements (&amp;lt;&amp;lt; 8 GByte) on the logins nodes. If you want to run longer jobs and/or jobs with a request of more than 8 GByte of memory, you must allocate resources for so-called interactive jobs by usage of the command salloc on a login node. Considering a serial application running on a compute node that requires 5000 MByte of memory and limiting the interactive run to 2 hours the following command has to be executed:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ salloc -p cpu -n 1 -t 120 --mem=5000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then you will get one core on a compute node within the partition &amp;quot;cpu&amp;quot;. After execution of this command &#039;&#039;&#039;DO NOT CLOSE&#039;&#039;&#039; your current terminal session but wait until the queueing system Slurm has granted you the requested resources on the compute system. You will be logged in automatically on the granted core! To run a serial program on the granted core you only have to type the name of the executable.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./&amp;lt;my_serial_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please be aware that your serial job must run less than 2 hours in this example, else the job will be killed during runtime by the system. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can also start now a graphical X11-terminal connecting you to the dedicated resource that is available for 2 hours. You can start it by the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ xterm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that, once the walltime limit has been reached the resources - i.e. the compute node - will automatically be revoked.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
An interactive parallel application running on one compute node or on many compute nodes (e.g. here 5 nodes) with 96 cores each requires usually an amount of memory in GByte (e.g. 50 GByte) and a maximum time (e.g. 1 hour). E.g. 5 nodes can be allocated by the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ salloc -p cpu -N 5 --ntasks-per-node=96 -t 01:00:00  --mem=50gb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you can run parallel jobs on 480 cores requiring 50 GByte of memory per node. Please be aware that you will be logged in on core 0 of the first node.&lt;br /&gt;
If you want to have access to another node you have to open a new terminal, connect it also to bwUniCluster 3.0 and type the following commands to&lt;br /&gt;
connect to the running interactive job and then to a specific node:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ srun --jobid=XXXXXXXX --pty /bin/bash&lt;br /&gt;
$ srun --nodelist=uc3nXXX --pty /bin/bash&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ squeue&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the jobid and the nodelist can be shown.&lt;br /&gt;
&lt;br /&gt;
If you want to run MPI-programs, you can do it by simply typing mpirun &amp;lt;program_name&amp;gt;. Then your program will be run on 480 cores. A very simple example for starting a parallel job can be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mpirun &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also start the debugger ddt by the commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module add devel/ddt&lt;br /&gt;
$ ddt &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above commands will execute the parallel program &amp;lt;my_mpi_program&amp;gt; on all available cores. You can also start parallel programs on a subset of cores; an example for this can be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mpirun -n 50 &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are using Intel MPI you must start &amp;lt;my_mpi_program&amp;gt; by the command mpiexec.hydra (instead of mpirun).&lt;br /&gt;
&lt;br /&gt;
== Interactive Computing with Jupyter ==&lt;br /&gt;
&lt;br /&gt;
== Monitor and manage jobs ==&lt;br /&gt;
&lt;br /&gt;
=== List of your submitted jobs : squeue ===&lt;br /&gt;
Displays information about YOUR active, pending and/or recently completed jobs. The command displays all own active and pending jobs. The command squeue is explained in detail on the webpage https://slurm.schedmd.com/squeue.html or via manpage (man squeue).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;squeue&#039;&#039; example on bwUniCluster 3.0 &amp;lt;small&amp;gt;(Only your own jobs are displayed!)&amp;lt;/small&amp;gt;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ squeue &lt;br /&gt;
             JOBID PARTITION     NAME     USER ST       TIME  NODES NODELIST(REASON)&lt;br /&gt;
              1262       cpu     wrap ka_ab123  R       8:15      1 uc3n002&lt;br /&gt;
              1267 dev_gpu_h     wrap ka_ab123 PD       0:00      1 (Resources)&lt;br /&gt;
              1265   highmem     wrap ka_ab123  R       2:41      1 uc3n084&lt;br /&gt;
$ squeue -l&lt;br /&gt;
             JOBID PARTITION     NAME     USER    STATE       TIME TIME_LIMI  NODES NODELIST(REASON)&lt;br /&gt;
              1262       cpu     wrap ka_ab123  RUNNING       8:55     20:00      1 uc3n002&lt;br /&gt;
              1267 dev_gpu_h     wrap ka_ab123  PENDING       0:00     20:00      1 (Resources)&lt;br /&gt;
              1265   highmem     wrap ka_ab123  RUNNING       3:21     20:00      1 uc3n084&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Detailed job information : scontrol show job ===&lt;br /&gt;
scontrol show job displays detailed job state information and diagnostic output for all or a specified job of yours. Detailed information is available for active, pending and recently completed jobs. The command scontrol is explained in detail on the webpage https://slurm.schedmd.com/scontrol.html or via manpage (man scontrol). &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Display the state of all your jobs in normal mode: scontrol show job&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Display the state of a job with &amp;lt;jobid&amp;gt; in normal mode: scontrol show job &amp;lt;jobid&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Here is an example from bwUniCluster 3.0.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ squeue&lt;br /&gt;
JOBID PARTITION     NAME     USER ST       TIME  NODES NODELIST(REASON)&lt;br /&gt;
1262       cpu     wrap ka_zs040  R       1:12      1 uc3n002&lt;br /&gt;
&lt;br /&gt;
$&lt;br /&gt;
$ # now, see what&#039;s up with my pending job with jobid 1262&lt;br /&gt;
$ &lt;br /&gt;
$ scontrol show job 1262&lt;br /&gt;
&lt;br /&gt;
JobId=1262 JobName=wrap&lt;br /&gt;
   UserId=ka_zs0402(241992) GroupId=ka_scc(12345) MCS_label=N/A&lt;br /&gt;
   Priority=4246 Nice=0 Account=ka QOS=normal&lt;br /&gt;
   JobState=RUNNING Reason=None Dependency=(null)&lt;br /&gt;
   Requeue=1 Restarts=0 BatchFlag=1 Reboot=0 ExitCode=0:0&lt;br /&gt;
   RunTime=00:00:37 TimeLimit=00:20:00 TimeMin=N/A&lt;br /&gt;
   SubmitTime=2025-04-04T10:01:30 EligibleTime=2025-04-04T10:01:30&lt;br /&gt;
   AccrueTime=2025-04-04T10:01:30&lt;br /&gt;
   StartTime=2025-04-04T10:01:31 EndTime=2025-04-04T10:21:31 Deadline=N/A&lt;br /&gt;
   SuspendTime=None SecsPreSuspend=0 LastSchedEval=2025-04-04T10:01:31 Scheduler=Main&lt;br /&gt;
   Partition=cpu AllocNode:Sid=uc3n999:2819841&lt;br /&gt;
   ReqNodeList=(null) ExcNodeList=(null)&lt;br /&gt;
   NodeList=uc3n002&lt;br /&gt;
   BatchHost=uc3n002&lt;br /&gt;
   NumNodes=1 NumCPUs=2 NumTasks=1 CPUs/Task=1 ReqB:S:C:T=0:0:*:*&lt;br /&gt;
   ReqTRES=cpu=1,mem=2000M,node=1,billing=1&lt;br /&gt;
   AllocTRES=cpu=2,mem=4000M,node=1,billing=2&lt;br /&gt;
   Socks/Node=* NtasksPerN:B:S:C=0:0:*:1 CoreSpec=*&lt;br /&gt;
   MinCPUsNode=1 MinMemoryCPU=2000M MinTmpDiskNode=0&lt;br /&gt;
   Features=(null) DelayBoot=00:00:00&lt;br /&gt;
   OverSubscribe=OK Contiguous=0 Licenses=(null) Network=(null)&lt;br /&gt;
   Command=(null)&lt;br /&gt;
   WorkDir=/pfs/data6/home/ka/ka_scc/ka_zs0402&lt;br /&gt;
   StdErr=/pfs/data6/home/ka/ka_scc/ka_zs0402/slurm-1262.out&lt;br /&gt;
   StdIn=/dev/null&lt;br /&gt;
   StdOut=/pfs/data6/home/ka/ka_scc/ka_zs0402/slurm-1262.out&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=== Canceling own jobs : scancel ===&lt;br /&gt;
The scancel command is used to cancel jobs. The command scancel is explained in detail on the webpage https://slurm.schedmd.com/scancel.html or via manpage (man scancel). The command is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ scancel [-i] &amp;lt;job-id&amp;gt;&lt;br /&gt;
$ scancel -t &amp;lt;job_state_name&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Slurm Options =&lt;br /&gt;
[[BwUniCluster3.0/Running_Jobs/Slurm | Detailed Slurm usage]]&lt;br /&gt;
&lt;br /&gt;
= Best Practices =&lt;br /&gt;
&lt;br /&gt;
== Step-by-Step example==&lt;br /&gt;
&lt;br /&gt;
== Dos and Don&#039;ts ==&lt;/div&gt;</summary>
		<author><name>P Schuhmacher</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster3.0/Running_Jobs&amp;diff=15011</id>
		<title>BwUniCluster3.0/Running Jobs</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster3.0/Running_Jobs&amp;diff=15011"/>
		<updated>2025-06-26T06:54:30Z</updated>

		<summary type="html">&lt;p&gt;P Schuhmacher: /* Regular Queues */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
= Purpose and function of a queuing system =&lt;br /&gt;
&lt;br /&gt;
All compute activities on bwUniCluster 3.0 have to be performed on the compute nodes. Compute nodes are only available by requesting the corresponding resources via the queuing system. As soon as the requested resources are available, automated tasks are executed via a batch script or they can be accessed interactively.&amp;lt;br&amp;gt;&lt;br /&gt;
General procedure: Hint to [[Running_Calculations | Running Calculations]]&lt;br /&gt;
&lt;br /&gt;
== Job submission process ==&lt;br /&gt;
&lt;br /&gt;
bwUniCluster 3.0 has installed the workload managing software Slurm. Therefore any job submission by the user is to be executed by commands of the Slurm software. Slurm queues and runs user jobs based on fair sharing policies.&lt;br /&gt;
&lt;br /&gt;
== Slurm ==&lt;br /&gt;
&lt;br /&gt;
HPC Workload Manager on bwUniCluster 3.0 is Slurm.&lt;br /&gt;
Slurm is a cluster management and job scheduling system. Slurm has three key functions. &lt;br /&gt;
* It allocates access to resources (compute cores on nodes) to users for some duration of time so they can perform work. &lt;br /&gt;
* It provides a framework for starting, executing, and monitoring work (normally a parallel job) on the set of allocated nodes. &lt;br /&gt;
* It arbitrates contention for resources by managing a queue of pending work.&lt;br /&gt;
&lt;br /&gt;
Any kind of calculation on the compute nodes of bwUniCluster 3.0 requires the user to define calculations as a sequence of commands together with required run time, number of CPU cores and main memory and submit all, i.e., the &#039;&#039;&#039;batch job&#039;&#039;&#039;, to a resource and workload managing software.&lt;br /&gt;
&lt;br /&gt;
== Terms and definitions ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Partitions &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Slurm manages job queues for different &#039;&#039;&#039;partitions&#039;&#039;&#039;. Partitions are used to group similar node types (e.g. nodes with and without accelerators) and to enforce different access policies and resource limits.&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 3.0 there are different partitions:&lt;br /&gt;
&lt;br /&gt;
* CPU-only nodes&lt;br /&gt;
** 2-socket nodes, consisting of 2 Intel Ice Lake processors with 32 cores each or 2 AMD processors with 48 cores each&lt;br /&gt;
** 2-socket nodes with very high RAM capacity, consisting of 2 AMD processors with 48 cores each&lt;br /&gt;
* GPU-accelerated nodes&lt;br /&gt;
** 2-socket nodes with 4x NVIDIA A100 or 4x NVIDIA H100 GPUs&lt;br /&gt;
** 4-socket node with 4x AMD Instinct accelerator&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Queues &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Job &#039;&#039;&#039;queues&#039;&#039;&#039; are used to manage jobs that request access to shared but limited computing resources of a certain kind (partition).&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 3.0 there are different main types of queues:&lt;br /&gt;
* Regular queues&lt;br /&gt;
** cpu: Jobs that request CPU-only nodes.&lt;br /&gt;
** gpu: Jobs that request GPU-accelerated nodes.&lt;br /&gt;
* Development queues (dev)&lt;br /&gt;
** Short, usually interactive jobs that are used for developing, compiling and testing code and workflows. The intention behind development queues is to provide users with immediate access to computer resources without having to wait. This is the place to realize instantaneous heavy compute without affecting other users, as would be the case on the login nodes.&lt;br /&gt;
&lt;br /&gt;
Requested compute resources such as (wall-)time, number of nodes and amount of memory are restricted and must fit into the boundaries imposed by the queues. The request for compute resources on the bwUniCluster 3.0 &amp;lt;font color=red&amp;gt;requires at least the specification of the &#039;&#039;&#039;queue&#039;&#039;&#039; and the &#039;&#039;&#039;time&#039;&#039;&#039;&amp;lt;/font&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Jobs &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Jobs can be run non-interactively as &#039;&#039;&#039;batch jobs&#039;&#039;&#039; or as &#039;&#039;&#039;interactive jobs&#039;&#039;&#039;.&amp;lt;br&amp;gt;&lt;br /&gt;
Submitting a batch job means, that all steps of a compute project are defined in a Bash script. This Bash script is queued and executed as soon as the compute resources are available and allocated. Jobs are enqueued with the &amp;lt;code&amp;gt;sbatch&amp;lt;/code&amp;gt; command.&lt;br /&gt;
For interactive jobs, the resources are requested with the &amp;lt;code&amp;gt;salloc&amp;lt;/code&amp;gt; command. As soon as the computing resources are available and allocated, a command line prompt is returned on a computing node and the user can freely dispose of the resources now available to him.&lt;br /&gt;
{|style=&amp;quot;background:#deffee; width:100%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;padding:5px; background:#cef2e0; text-align:left&amp;quot;|&lt;br /&gt;
[[Image:Attention.svg|center|25px]]&lt;br /&gt;
|style=&amp;quot;padding:5px; background:#cef2e0; text-align:left&amp;quot;|&lt;br /&gt;
&#039;&#039;&#039;Please remember:&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Heavy computations are not allowed on the login nodes&#039;&#039;&#039;.&amp;lt;br&amp;gt;Use a developement or a regular job queue instead! Please refer to [[BwUniCluster3.0/Login#Allowed_Activities_on_Login_Nodes|Allowed Activities on Login Nodes]].&lt;br /&gt;
* &#039;&#039;&#039;Development queues&#039;&#039;&#039; are meant for &#039;&#039;&#039;development tasks&#039;&#039;&#039;.&amp;lt;br&amp;gt;Do not misuse this queue for regular, short-running jobs or chain jobs! Only one running job at a time is enabled. Maximum queue length is reduced to 3.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Queues on bwUniCluster 3.0 = &lt;br /&gt;
== Policy ==&lt;br /&gt;
&lt;br /&gt;
The computing time is provided in accordance with the &#039;&#039;&#039;fair share policy&#039;&#039;&#039;. The individual investment shares of the respective university and the resources already used by its members are taken into account. Furthermore, the following throttling policy is also active: The &#039;&#039;&#039;maximum amount of physical cores&#039;&#039;&#039; used at any given time from jobs running is &#039;&#039;&#039;1920 per user&#039;&#039;&#039; (aggregated over all running jobs). This number corresponds to 30 nodes on the Ice Lake partition or 20 nodes on the standard partition. The aim is to minimize waiting times and maximize the number of users who can access computing time at the same time.&lt;br /&gt;
&lt;br /&gt;
== Regular Queues ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
! style=&amp;quot;width:5%&amp;quot;| Queue&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Node-Type&lt;br /&gt;
! style=&amp;quot;width:23%&amp;quot;| Default Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Minimal Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Maximum Resources&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;cpu_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Ice Lake&lt;br /&gt;
| mem-per-cpu=2000mb&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=30, mem=249600mb, ntasks-per-node=64, (threads-per-core=2) &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;cpu&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Standard&lt;br /&gt;
| mem-per-cpu=2000mb&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=20, mem=380000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;highmem&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;High Memory&lt;br /&gt;
| mem-per-cpu=12090mb&lt;br /&gt;
| mem=380001mb&lt;br /&gt;
| time=72:00:00, nodes=4, mem=2300000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;gpu_h100&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;NVIDIA GPU x4&lt;br /&gt;
| mem-per-gpu=193300mb&amp;lt;br/&amp;gt;cpus-per-gpu=24&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=12, mem=760000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;gpu_mi300&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU node&amp;lt;br/&amp;gt;AMD GPU x4&lt;br /&gt;
| mem-per-gpu=128200mb&amp;lt;br/&amp;gt;cpus-per-gpu=24&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=1, mem=510000mb, ntasks-per-node=40, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;gpu_a100_il&amp;lt;/code&amp;gt;/&amp;lt;code&amp;gt;gpu_h100_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;Ice Lake&amp;lt;br/&amp;gt;NVIDIA GPU x4&lt;br /&gt;
| mem-per-gpu=127500mb&amp;lt;br/&amp;gt;cpus-per-gpu=16&lt;br /&gt;
| &lt;br /&gt;
| time=48:00:00, nodes=9, mem=510000mb, ntasks-per-node=64, (threads-per-core=2) &lt;br /&gt;
|}&lt;br /&gt;
Table 1: Regular Queues&lt;br /&gt;
&lt;br /&gt;
== Development Queues ==&lt;br /&gt;
Only for development, i.e. debugging or performance optimization ...&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
! style=&amp;quot;width:5%&amp;quot;| Queue&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Node Type&lt;br /&gt;
! style=&amp;quot;width:23%&amp;quot;| Default Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Minimal Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Maximum Resources&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_cpu_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Ice Lake&lt;br /&gt;
| mem-per-cpu=2000mb&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=8, mem=249600mb, ntasks-per-node=64, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_cpu&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Standard&lt;br /&gt;
| mem-per-cpu=2000mb&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=380000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_gpu_h100&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;NVIDIA GPU x4&lt;br /&gt;
| mem-per-gpu=193300mb&amp;lt;br/&amp;gt;cpus-per-gpu=24&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=760000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_gpu_a100_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;NVIDIA GPU x4&amp;lt;br/&amp;gt;&lt;br /&gt;
| mem-per-gpu=127500mb&amp;lt;br/&amp;gt;cpus-per-gpu=16 &lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=510000mb, ntasks-per-node=64, (threads-per-core=2) &lt;br /&gt;
|}&lt;br /&gt;
Table 2: Development Queues&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Default resources of a queue class define number of tasks and memory if not explicitly given with sbatch command. Resource list acronyms &#039;&#039;--time&#039;&#039;, &#039;&#039;--ntasks&#039;&#039;, &#039;&#039;--nodes&#039;&#039;, &#039;&#039;--mem&#039;&#039; and &#039;&#039;--mem-per-cpu&#039;&#039; are described [[BwUniCluster3.0/Running_Jobs/Slurm|here]].&lt;br /&gt;
&lt;br /&gt;
== Check available resources: sinfo_t_idle ==&lt;br /&gt;
The Slurm command sinfo is used to view partition and node information for a system running Slurm. It incorporates down time, reservations, and node state information in determining the available backfill window. The sinfo command can only be used by the administrator.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
SCC has prepared a special script (sinfo_t_idle) to find out how many processors are available for immediate use on the system. It is anticipated that users will use this information to submit jobs that meet these criteria and thus obtain quick job turnaround times. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The following command displays what resources are available for immediate use for the whole partition.&lt;br /&gt;
&amp;lt;pre&amp;gt;$ sinfo_t_idle&lt;br /&gt;
Partition dev_cpu                 :      2 nodes idle&lt;br /&gt;
Partition cpu                     :     68 nodes idle&lt;br /&gt;
Partition highmem                 :      4 nodes idle&lt;br /&gt;
Partition dev_gpu_h100            :      0 nodes idle&lt;br /&gt;
Partition gpu_h100                :     11 nodes idle&lt;br /&gt;
Partition gpu_mi300               :      1 nodes idle&lt;br /&gt;
Partition dev_cpu_il              :      0 nodes idle&lt;br /&gt;
Partition cpu_il                  :      0 nodes idle&lt;br /&gt;
Partition dev_gpu_a100_il         :      0 nodes idle&lt;br /&gt;
Partition gpu_a100_il             :      0 nodes idle&lt;br /&gt;
Partition gpu_h100_il             :      0 nodes idle&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Running Jobs =&lt;br /&gt;
&lt;br /&gt;
== Slurm Commands (excerpt) ==&lt;br /&gt;
Important Slurm commands for non-administrators working on bwUniCluster 3.0.&lt;br /&gt;
{| width=850px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Slurm commands !! Brief explanation&lt;br /&gt;
|-&lt;br /&gt;
| [[#Batch Jobs: sbatch|sbatch]] || Submits a job and puts it into the queue [[https://slurm.schedmd.com/sbatch.html sbatch]] &lt;br /&gt;
|-&lt;br /&gt;
| [[#Interactive Jobs: salloc|salloc]] || Requests resources for an interactive Job [[https://slurm.schedmd.com/salloc.html salloc]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Monitor and manage jobs |scontrol show job]] || Displays detailed job state information [[https://slurm.schedmd.com/scontrol.html scontrol]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#List of your submitted jobs : squeue|squeue]] || Displays information about active, eligible, blocked, and/or recently completed jobs [[https://slurm.schedmd.com/squeue.html squeue]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#List of your submitted jobs : squeue|squeue --start]] || Returns start time of submitted job [[https://slurm.schedmd.com/squeue.html squeue]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Check available resources: sinfo_t_idle|sinfo_t_idle]] || Shows what resources are available for immediate use [[https://slurm.schedmd.com/sinfo.html sinfo]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Canceling own jobs : scancel|scancel]] || Cancels a job [[https://slurm.schedmd.com/scancel.html scancel]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* [https://slurm.schedmd.com/tutorials.html  Slurm Tutorials]&lt;br /&gt;
* [https://slurm.schedmd.com/pdfs/summary.pdf  Slurm command/option summary (2 pages)]&lt;br /&gt;
* [https://slurm.schedmd.com/man_index.html  Slurm Commands]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Batch Jobs: sbatch ==&lt;br /&gt;
&lt;br /&gt;
Batch jobs are submitted by using the command &#039;&#039;&#039;sbatch&#039;&#039;&#039;. The main purpose of the &#039;&#039;&#039;sbatch&#039;&#039;&#039; command is to specify the resources that are needed to run the job. &#039;&#039;&#039;sbatch&#039;&#039;&#039; will then queue the batch job. However, starting of batch job depends on the availability of the requested resources and the fair sharing value.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The syntax and use of &#039;&#039;&#039;sbatch&#039;&#039;&#039; can be displayed via:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ man sbatch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;sbatch&#039;&#039;&#039; options can be used from the command line or in your job script. Different defaults for some of these options are set based on the queue and can be found [[BwUniCluster3.0/Slurm | here]]&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | sbatch Options&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width:8%&amp;quot;| Command line&lt;br /&gt;
! style=&amp;quot;width:9%&amp;quot;| Script&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Purpose&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -t, --time=&#039;&#039;time&#039;&#039;&lt;br /&gt;
| #SBATCH --time=&#039;&#039;time&#039;&#039;&lt;br /&gt;
| Wall clock time limit.&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -N, --nodes=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --nodes=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of nodes to be used.&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -n, --ntasks=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --ntasks=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of tasks to be launched.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --ntasks-per-node=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --ntasks-per-node=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Maximum count of tasks per node.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -c, --cpus-per-task=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --cpus-per-task=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of CPUs required per (MPI-)task.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mem=&#039;&#039;value_in_MB&#039;&#039;&lt;br /&gt;
| #SBATCH --mem=&#039;&#039;value_in_MB&#039;&#039; &lt;br /&gt;
| Memory in MegaByte per node. (You should omit the setting of this option.)&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mem-per-cpu=&#039;&#039;value_in_MB&#039;&#039;&lt;br /&gt;
| #SBATCH --mem-per-cpu=&#039;&#039;value_in_MB&#039;&#039; &lt;br /&gt;
| Minimum Memory required per allocated CPU. (You should omit the setting of this option.)&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mail-type=&#039;&#039;type&#039;&#039;&lt;br /&gt;
| #SBATCH --mail-type=&#039;&#039;type&#039;&#039;&lt;br /&gt;
| Notify user by email when certain event types occur.&amp;lt;br&amp;gt;Valid type values are NONE, BEGIN, END, FAIL, REQUEUE, ALL.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mail-user=&#039;&#039;mail-address&#039;&#039;&lt;br /&gt;
| #SBATCH --mail-user=&#039;&#039;mail-address&#039;&#039;&lt;br /&gt;
|  The specified mail-address receives email notification of state changes as defined by --mail-type.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --output=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --output=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| File in which job output is stored. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --error=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --error=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| File in which job error messages are stored. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -J, --job-name=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --job-name=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| Job name.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --export=[ALL,] &#039;&#039;env-variables&#039;&#039;&lt;br /&gt;
| #SBATCH --export=[ALL,] &#039;&#039;env-variables&#039;&#039;&lt;br /&gt;
| Identifies which environment variables from the submission environment are propagated to the launched application. Default is ALL.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -A, --account=&#039;&#039;group-name&#039;&#039;&lt;br /&gt;
| #SBATCH --account=&#039;&#039;group-name&#039;&#039;&lt;br /&gt;
| Change resources used by this job to specified group. You may need this option if your account is assigned to more than one group. By command &amp;quot;scontrol show job&amp;quot; the project group the job is accounted on can be seen behind &amp;quot;Account=&amp;quot;. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -p, --partition=&#039;&#039;queue-name&#039;&#039;&lt;br /&gt;
| #SBATCH --partition=&#039;&#039;queue-name&#039;&#039;&lt;br /&gt;
| Request a specific queue for the resource allocation.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --reservation=&#039;&#039;reservation-name&#039;&#039;&lt;br /&gt;
| #SBATCH --reservation=&#039;&#039;reservation-name&#039;&#039;&lt;br /&gt;
| Use a specific reservation for the resource allocation.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -C, --constraint=&#039;&#039;LSDF&#039;&#039;&lt;br /&gt;
| #SBATCH --constraint=LSDF&lt;br /&gt;
| Job constraint LSDF filesystems.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -C, --constraint=&#039;&#039;BEEOND (BEEOND_4MDS, BEEOND_MAXMDS)&#039;&#039;&lt;br /&gt;
| #SBATCH --constraint=BEEOND (BEEOND_4MDS, BEEOND_MAXMDS)&lt;br /&gt;
| Job constraint BeeOND filesystem.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Interactive Jobs: salloc ==&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 3.0 you are only allowed to run short jobs (&amp;lt;&amp;lt; 1 hour) with little memory requirements (&amp;lt;&amp;lt; 8 GByte) on the logins nodes. If you want to run longer jobs and/or jobs with a request of more than 8 GByte of memory, you must allocate resources for so-called interactive jobs by usage of the command salloc on a login node. Considering a serial application running on a compute node that requires 5000 MByte of memory and limiting the interactive run to 2 hours the following command has to be executed:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ salloc -p cpu -n 1 -t 120 --mem=5000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then you will get one core on a compute node within the partition &amp;quot;cpu&amp;quot;. After execution of this command &#039;&#039;&#039;DO NOT CLOSE&#039;&#039;&#039; your current terminal session but wait until the queueing system Slurm has granted you the requested resources on the compute system. You will be logged in automatically on the granted core! To run a serial program on the granted core you only have to type the name of the executable.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./&amp;lt;my_serial_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please be aware that your serial job must run less than 2 hours in this example, else the job will be killed during runtime by the system. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can also start now a graphical X11-terminal connecting you to the dedicated resource that is available for 2 hours. You can start it by the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ xterm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that, once the walltime limit has been reached the resources - i.e. the compute node - will automatically be revoked.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
An interactive parallel application running on one compute node or on many compute nodes (e.g. here 5 nodes) with 96 cores each requires usually an amount of memory in GByte (e.g. 50 GByte) and a maximum time (e.g. 1 hour). E.g. 5 nodes can be allocated by the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ salloc -p cpu -N 5 --ntasks-per-node=96 -t 01:00:00  --mem=50gb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you can run parallel jobs on 480 cores requiring 50 GByte of memory per node. Please be aware that you will be logged in on core 0 of the first node.&lt;br /&gt;
If you want to have access to another node you have to open a new terminal, connect it also to bwUniCluster 3.0 and type the following commands to&lt;br /&gt;
connect to the running interactive job and then to a specific node:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ srun --jobid=XXXXXXXX --pty /bin/bash&lt;br /&gt;
$ srun --nodelist=uc3nXXX --pty /bin/bash&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ squeue&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the jobid and the nodelist can be shown.&lt;br /&gt;
&lt;br /&gt;
If you want to run MPI-programs, you can do it by simply typing mpirun &amp;lt;program_name&amp;gt;. Then your program will be run on 480 cores. A very simple example for starting a parallel job can be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mpirun &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also start the debugger ddt by the commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module add devel/ddt&lt;br /&gt;
$ ddt &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above commands will execute the parallel program &amp;lt;my_mpi_program&amp;gt; on all available cores. You can also start parallel programs on a subset of cores; an example for this can be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mpirun -n 50 &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are using Intel MPI you must start &amp;lt;my_mpi_program&amp;gt; by the command mpiexec.hydra (instead of mpirun).&lt;br /&gt;
&lt;br /&gt;
== Interactive Computing with Jupyter ==&lt;br /&gt;
&lt;br /&gt;
== Monitor and manage jobs ==&lt;br /&gt;
&lt;br /&gt;
=== List of your submitted jobs : squeue ===&lt;br /&gt;
Displays information about YOUR active, pending and/or recently completed jobs. The command displays all own active and pending jobs. The command squeue is explained in detail on the webpage https://slurm.schedmd.com/squeue.html or via manpage (man squeue).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;squeue&#039;&#039; example on bwUniCluster 3.0 &amp;lt;small&amp;gt;(Only your own jobs are displayed!)&amp;lt;/small&amp;gt;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ squeue &lt;br /&gt;
             JOBID PARTITION     NAME     USER ST       TIME  NODES NODELIST(REASON)&lt;br /&gt;
              1262       cpu     wrap ka_ab123  R       8:15      1 uc3n002&lt;br /&gt;
              1267 dev_gpu_h     wrap ka_ab123 PD       0:00      1 (Resources)&lt;br /&gt;
              1265   highmem     wrap ka_ab123  R       2:41      1 uc3n084&lt;br /&gt;
$ squeue -l&lt;br /&gt;
             JOBID PARTITION     NAME     USER    STATE       TIME TIME_LIMI  NODES NODELIST(REASON)&lt;br /&gt;
              1262       cpu     wrap ka_ab123  RUNNING       8:55     20:00      1 uc3n002&lt;br /&gt;
              1267 dev_gpu_h     wrap ka_ab123  PENDING       0:00     20:00      1 (Resources)&lt;br /&gt;
              1265   highmem     wrap ka_ab123  RUNNING       3:21     20:00      1 uc3n084&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Detailed job information : scontrol show job ===&lt;br /&gt;
scontrol show job displays detailed job state information and diagnostic output for all or a specified job of yours. Detailed information is available for active, pending and recently completed jobs. The command scontrol is explained in detail on the webpage https://slurm.schedmd.com/scontrol.html or via manpage (man scontrol). &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Display the state of all your jobs in normal mode: scontrol show job&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Display the state of a job with &amp;lt;jobid&amp;gt; in normal mode: scontrol show job &amp;lt;jobid&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Here is an example from bwUniCluster 3.0.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ squeue&lt;br /&gt;
JOBID PARTITION     NAME     USER ST       TIME  NODES NODELIST(REASON)&lt;br /&gt;
1262       cpu     wrap ka_zs040  R       1:12      1 uc3n002&lt;br /&gt;
&lt;br /&gt;
$&lt;br /&gt;
$ # now, see what&#039;s up with my pending job with jobid 1262&lt;br /&gt;
$ &lt;br /&gt;
$ scontrol show job 1262&lt;br /&gt;
&lt;br /&gt;
JobId=1262 JobName=wrap&lt;br /&gt;
   UserId=ka_zs0402(241992) GroupId=ka_scc(12345) MCS_label=N/A&lt;br /&gt;
   Priority=4246 Nice=0 Account=ka QOS=normal&lt;br /&gt;
   JobState=RUNNING Reason=None Dependency=(null)&lt;br /&gt;
   Requeue=1 Restarts=0 BatchFlag=1 Reboot=0 ExitCode=0:0&lt;br /&gt;
   RunTime=00:00:37 TimeLimit=00:20:00 TimeMin=N/A&lt;br /&gt;
   SubmitTime=2025-04-04T10:01:30 EligibleTime=2025-04-04T10:01:30&lt;br /&gt;
   AccrueTime=2025-04-04T10:01:30&lt;br /&gt;
   StartTime=2025-04-04T10:01:31 EndTime=2025-04-04T10:21:31 Deadline=N/A&lt;br /&gt;
   SuspendTime=None SecsPreSuspend=0 LastSchedEval=2025-04-04T10:01:31 Scheduler=Main&lt;br /&gt;
   Partition=cpu AllocNode:Sid=uc3n999:2819841&lt;br /&gt;
   ReqNodeList=(null) ExcNodeList=(null)&lt;br /&gt;
   NodeList=uc3n002&lt;br /&gt;
   BatchHost=uc3n002&lt;br /&gt;
   NumNodes=1 NumCPUs=2 NumTasks=1 CPUs/Task=1 ReqB:S:C:T=0:0:*:*&lt;br /&gt;
   ReqTRES=cpu=1,mem=2000M,node=1,billing=1&lt;br /&gt;
   AllocTRES=cpu=2,mem=4000M,node=1,billing=2&lt;br /&gt;
   Socks/Node=* NtasksPerN:B:S:C=0:0:*:1 CoreSpec=*&lt;br /&gt;
   MinCPUsNode=1 MinMemoryCPU=2000M MinTmpDiskNode=0&lt;br /&gt;
   Features=(null) DelayBoot=00:00:00&lt;br /&gt;
   OverSubscribe=OK Contiguous=0 Licenses=(null) Network=(null)&lt;br /&gt;
   Command=(null)&lt;br /&gt;
   WorkDir=/pfs/data6/home/ka/ka_scc/ka_zs0402&lt;br /&gt;
   StdErr=/pfs/data6/home/ka/ka_scc/ka_zs0402/slurm-1262.out&lt;br /&gt;
   StdIn=/dev/null&lt;br /&gt;
   StdOut=/pfs/data6/home/ka/ka_scc/ka_zs0402/slurm-1262.out&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=== Canceling own jobs : scancel ===&lt;br /&gt;
The scancel command is used to cancel jobs. The command scancel is explained in detail on the webpage https://slurm.schedmd.com/scancel.html or via manpage (man scancel). The command is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ scancel [-i] &amp;lt;job-id&amp;gt;&lt;br /&gt;
$ scancel -t &amp;lt;job_state_name&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Slurm Options =&lt;br /&gt;
[[BwUniCluster3.0/Running_Jobs/Slurm | Detailed Slurm usage]]&lt;br /&gt;
&lt;br /&gt;
= Best Practices =&lt;br /&gt;
&lt;br /&gt;
== Step-by-Step example==&lt;br /&gt;
&lt;br /&gt;
== Dos and Don&#039;ts ==&lt;/div&gt;</summary>
		<author><name>P Schuhmacher</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster3.0/Login&amp;diff=14705</id>
		<title>BwUniCluster3.0/Login</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster3.0/Login&amp;diff=14705"/>
		<updated>2025-04-09T11:08:50Z</updated>

		<summary type="html">&lt;p&gt;P Schuhmacher: /* Login with SSH command (Linux, Mac, Windows) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{|style=&amp;quot;background:#deffee; width:100%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;padding:5px; background:#cef2e0; text-align:left&amp;quot;|&lt;br /&gt;
[[Image:Attention.svg|center|25px]]&lt;br /&gt;
|style=&amp;quot;padding:5px; background:#cef2e0; text-align:left&amp;quot;|&lt;br /&gt;
Access to bwUniCluster 3.0 is &#039;&#039;&#039;limited to IP addresses from the BelWü network&#039;&#039;&#039;.&lt;br /&gt;
All home institutions of our current users are connected to BelWü, so if you are on your campus network (e.g. in your office or on the Campus WiFi) you should be able to connect to bwUniCluster 3.0 without restrictions.&lt;br /&gt;
If you are outside one of the BelWü networks (e.g. at home), a VPN connection to the home institution or a connection to an SSH jump host at the home institution must be established first.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The login nodes of the bwHPC clusters are the access point to the compute system, your &amp;lt;code&amp;gt;$HOME&amp;lt;/code&amp;gt; directory and your workspaces.&lt;br /&gt;
All users must log in through these nodes to submit jobs to the cluster.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Prerequisites for successful login:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You need to have&lt;br /&gt;
# Completed the 3-step [[registration|&#039;&#039;&#039;registration&#039;&#039;&#039;]] procedure.&lt;br /&gt;
# Set a [[Registration/Password|&#039;&#039;&#039;service password&#039;&#039;&#039;]] for bwUniCluster 3.0.&lt;br /&gt;
# Set up a [[Registration/2FA|&#039;&#039;&#039;second factor&#039;&#039;&#039;]] for the time-based one-time password (TOTP).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Login to the bwUniCluster =&lt;br /&gt;
&lt;br /&gt;
Login to the bwUniCluster 3.0 is only possible with a Secure Shell (SSH) client for which you must know your username on the cluster and the hostname of the login nodes.&lt;br /&gt;
For more general information on SSH clients, visit the [[BwUniCluster3.0/Login/Client|SSH Clients Guide]].&lt;br /&gt;
&lt;br /&gt;
== Username ==&lt;br /&gt;
&lt;br /&gt;
If you want to use the bwUniCluster 3.0 you need to add a prefix to your local username.&lt;br /&gt;
&lt;br /&gt;
For prefixes please refer to the [[Registration/Login/Username#Prefix_for_Universities|prefix table]].&lt;br /&gt;
&lt;br /&gt;
Examples:&amp;lt;br/&amp;gt;&lt;br /&gt;
* If your local username for the University is &amp;lt;code&amp;gt;ab123&amp;lt;/code&amp;gt; and you are a user from the University of Freiburg this would combine to: &amp;lt;code&amp;gt;fr_ab123&amp;lt;/code&amp;gt;.&lt;br /&gt;
* If your KIT username is &amp;lt;code&amp;gt;ab1234&amp;lt;/code&amp;gt; and you are a user from KIT this would combine to: &amp;lt;code&amp;gt;ka_ab1234&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Hostnames ==&lt;br /&gt;
&lt;br /&gt;
The system has two login nodes.&lt;br /&gt;
The selection of the login node is done automatically.&lt;br /&gt;
If you are logging in multiple times, different sessions might run on different login nodes.&lt;br /&gt;
&lt;br /&gt;
Login to bwUniCluster 3.0:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Hostname !! Node type&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;bwunicluster.scc.kit.edu&#039;&#039;&#039; || login to one of the two login nodes&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;uc3.scc.kit.edu&#039;&#039;&#039;          || login to one of the two login nodes&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In general, you should use automatic selection to allow us to balance the load over the three login nodes.&lt;br /&gt;
If you need to connect to specific login nodes, you can use the following hostnames:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Hostname !! Node type&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;uc3-login1.scc.kit.edu&#039;&#039;&#039; || bwUniCluster 3.0 first login node&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;uc3-login2.scc.kit.edu&#039;&#039;&#039; || bwUniCluster 3.0 second login node&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Host Keys ==&lt;br /&gt;
&lt;br /&gt;
When you log in, you may receive the message &amp;lt;code&amp;gt;The authenticity of host &#039;&amp;lt;host address&amp;gt;&#039; can&#039;t be established.&amp;lt;/code&amp;gt; along with the host key fingerprint. This is intended so you can verify the authenticity of the host you are connecting to. Before you continue you should verify, if this fingerprint matches one of the following:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Algorithm !! Fingerprint (SHA256)&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;RSA&#039;&#039;&#039; || SHA256:RaE0/tqQMMBmJuDCIo3WZ38YJsz0godVyt6aUOk/E0M&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;ECDSA&#039;&#039;&#039; || SHA256:LjBYL/x86ZAlL0JdlXrCmPYXvS3DaSiMuvycojBMdwQ&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;ED25519&#039;&#039;&#039; || SHA256:5mZYEpKigwK5ibBMHRrh3WIkOtCqomJW6H7OMbPk3ec&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Login with SSH command (Linux, Mac, Windows) ==&lt;br /&gt;
&lt;br /&gt;
Linux, Mac OS, other Unix-like operating systems and Microsoft Windows come with a built-in SSH client, most likely provided by the OpenSSH project.&lt;br /&gt;
&lt;br /&gt;
For login use one of the following ssh commands:&lt;br /&gt;
&lt;br /&gt;
 ssh &amp;lt;username&amp;gt; uc3.scc.kit.edu&lt;br /&gt;
 ssh &amp;lt;username&amp;gt;@bwunicluster.scc.kit.edu&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
To run graphical applications, you can use the &amp;lt;code&amp;gt;-X&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;-Y&amp;lt;/code&amp;gt; flag to &amp;lt;code&amp;gt;ssh&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 ssh -Y -l &amp;lt;username&amp;gt; bwunicluster.scc.kit.edu&lt;br /&gt;
&lt;br /&gt;
For better performance, we recommend using [[VNC]].&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Login with graphical SSH client (Windows) ==&lt;br /&gt;
&lt;br /&gt;
For Windows we suggest using  [[Data_Transfer/Graphical_Clients#MobaXterm|MobaXterm]] for login and file transfer.&lt;br /&gt;
 &lt;br /&gt;
Start &#039;&#039;MobaXterm&#039;&#039;, fill in the following fields:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Remote name              : uc3.scc.kit.edu    # or bwunicluster.scc.kit.edu&lt;br /&gt;
Specify user name        : &amp;lt;username&amp;gt;&lt;br /&gt;
Port                     : 22&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After that click on &#039;ok&#039;. Then a terminal will be opened and there you can enter your credentials.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; When using File transfer with MobaXterm version 23.6 the following configuration change has to be made:&lt;br /&gt;
In the settings in the tab &amp;quot;SSH&amp;quot;, change the option &amp;quot;SSH engine&amp;quot; from &amp;quot;&amp;lt;new&amp;gt;&amp;quot; to &amp;quot;&amp;lt;legacy&amp;gt;&amp;quot;. Then restart MobaXterm&lt;br /&gt;
&lt;br /&gt;
== Login with Jupyterhub ==&lt;br /&gt;
&lt;br /&gt;
Login takes place at:&lt;br /&gt;
* bwUniCluster 3.0: [https://uc3-jupyter.scc.kit.edu uc3-jupyter.scc.kit.edu]&lt;br /&gt;
* SDIL: [https://sdil-jupyter.scc.kit.edu sdil-jupyter.scc.kit.edu]&lt;br /&gt;
&lt;br /&gt;
More Information can be found [[BwUniCluster3.0/Jupyter#Login_process|here]].&lt;br /&gt;
&lt;br /&gt;
== Login Example ==&lt;br /&gt;
&lt;br /&gt;
To log in to bwUniCluster 3.0, you must provide your [[Registration/Password|service password]].&lt;br /&gt;
Proceed as follows:&lt;br /&gt;
# Use SSH for a login node.&lt;br /&gt;
# The system will ask for a one-time password &amp;lt;code&amp;gt;Your OTP:&amp;lt;/code&amp;gt;. Please enter your OTP and confirm it with Enter/Return. If you do not have a second factor yet, please create one (see [[Registration/2FA]]).&lt;br /&gt;
# The system will ask you for your service password &amp;lt;code&amp;gt;Password:&amp;lt;/code&amp;gt;. Please enter it and confirm it with Enter/Return. If you do not have a service password yet or have forgotten it, please create one (see [[Registration/Password]]).&lt;br /&gt;
# You will be greeted by the cluster, followed by a shell.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[user@client ~]$ ssh ka_ab1234@uc3.scc.kit.edu&lt;br /&gt;
(ka_ab1234@uc3.scc.kit.edu) Your OTP: cccccctlljdbrjdleujigivvfnkjbucudugjjlutfbrk&lt;br /&gt;
(ka_ab1234@uc3.scc.kit.edu) Password: &lt;br /&gt;
********************************************************************************&lt;br /&gt;
*                                                                              *&lt;br /&gt;
*                   Karlsruher Institut für Technologie (KIT)                  *&lt;br /&gt;
*                                                                              *&lt;br /&gt;
*                       Scientific Computing Center (SCC)                      *&lt;br /&gt;
*                                                                              *&lt;br /&gt;
*                            _    _    _____   ____                            *&lt;br /&gt;
*                           | |  | |  / ____| |___ \                           *&lt;br /&gt;
*                           | |  | | | |        __) |                          *&lt;br /&gt;
*                           | |  | | | |       |__ &amp;lt;                           *&lt;br /&gt;
*                           | |__| | | |____   ___) |                          *&lt;br /&gt;
*                            \____/   \_____| |____/                           *&lt;br /&gt;
*                                                                              *&lt;br /&gt;
*                                                                              *&lt;br /&gt;
*                  (KITE 2.0, RHEL 9.4, Lustre 2.14.0_ddn154)                  *&lt;br /&gt;
*                                                                              *&lt;br /&gt;
*                                                                              *&lt;br /&gt;
********************************************************************************&lt;br /&gt;
Last login: Wed Feb 26 11:08:20 2025 from 2a00:1398:4:181c:2be1:437b:1c36:1337&lt;br /&gt;
&lt;br /&gt;
[ka_ab1234@uc3n990 ~]$&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
See [[BwUniCluster3.0/FAQ#Login|bwUniCluster FAQ]].&lt;br /&gt;
&lt;br /&gt;
= Allowed Activities on Login Nodes =&lt;br /&gt;
&lt;br /&gt;
{|style=&amp;quot;background:#deffee; width:100%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;padding:5px; background:#ffa500; text-align:left&amp;quot;|&lt;br /&gt;
[[Image:Attention.svg|center|25px]]&lt;br /&gt;
|style=&amp;quot;padding:5px; background:#ffa500; text-align:left&amp;quot;|&lt;br /&gt;
To guarantee usability for all the users of clusters you must not run your compute jobs on the login nodes.&lt;br /&gt;
Compute jobs must be submitted to the queuing system.&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Any compute job running on the login nodes will be terminated without any notice.&#039;&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
Any long-running compilation or any long-running pre- or post-processing of batch jobs must also be submitted to the queuing system.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The login nodes of the bwHPC clusters are the access point to the compute system, your &amp;lt;code&amp;gt;$HOME&amp;lt;/code&amp;gt; directory and your workspaces.&lt;br /&gt;
These nodes are shared with all the users therefore, your activities on the login nodes are limited to primarily set up your batch jobs.&lt;br /&gt;
Your activities may also be:&lt;br /&gt;
* &#039;&#039;&#039;short&#039;&#039;&#039; compilation of your program code and&lt;br /&gt;
* &#039;&#039;&#039;light weight&#039;&#039;&#039; pre- and post-processing of your batch jobs.&lt;br /&gt;
&lt;br /&gt;
We advise users to use [[BwUniCluster3.0/Batch_Queues#Interactive_Jobs|interactive jobs]] for compute and memory intensive tasks like compiling.&lt;br /&gt;
&lt;br /&gt;
= Related Information =&lt;br /&gt;
&lt;br /&gt;
* If you want to reset your service password, consult the [[Registration/Password|Password Guide]].&lt;br /&gt;
* If you want to register a new token for the two factor authentication (2FA), consult the [[Registration/2FA|2FA Guide]].&lt;br /&gt;
* If you want to de-register, consult the [[Registration/Deregistration|De-registration Guide]].&lt;br /&gt;
* If you need an SSH key for your workflow, read [[Registration/SSH|Registering SSH Keys with your Cluster]].&lt;br /&gt;
* Configuring your shell: [[.bashrc Do&#039;s and Don&#039;ts]]&lt;/div&gt;</summary>
		<author><name>P Schuhmacher</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster3.0/Login&amp;diff=14704</id>
		<title>BwUniCluster3.0/Login</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster3.0/Login&amp;diff=14704"/>
		<updated>2025-04-09T11:08:42Z</updated>

		<summary type="html">&lt;p&gt;P Schuhmacher: /* Hostnames */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{|style=&amp;quot;background:#deffee; width:100%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;padding:5px; background:#cef2e0; text-align:left&amp;quot;|&lt;br /&gt;
[[Image:Attention.svg|center|25px]]&lt;br /&gt;
|style=&amp;quot;padding:5px; background:#cef2e0; text-align:left&amp;quot;|&lt;br /&gt;
Access to bwUniCluster 3.0 is &#039;&#039;&#039;limited to IP addresses from the BelWü network&#039;&#039;&#039;.&lt;br /&gt;
All home institutions of our current users are connected to BelWü, so if you are on your campus network (e.g. in your office or on the Campus WiFi) you should be able to connect to bwUniCluster 3.0 without restrictions.&lt;br /&gt;
If you are outside one of the BelWü networks (e.g. at home), a VPN connection to the home institution or a connection to an SSH jump host at the home institution must be established first.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The login nodes of the bwHPC clusters are the access point to the compute system, your &amp;lt;code&amp;gt;$HOME&amp;lt;/code&amp;gt; directory and your workspaces.&lt;br /&gt;
All users must log in through these nodes to submit jobs to the cluster.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Prerequisites for successful login:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You need to have&lt;br /&gt;
# Completed the 3-step [[registration|&#039;&#039;&#039;registration&#039;&#039;&#039;]] procedure.&lt;br /&gt;
# Set a [[Registration/Password|&#039;&#039;&#039;service password&#039;&#039;&#039;]] for bwUniCluster 3.0.&lt;br /&gt;
# Set up a [[Registration/2FA|&#039;&#039;&#039;second factor&#039;&#039;&#039;]] for the time-based one-time password (TOTP).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Login to the bwUniCluster =&lt;br /&gt;
&lt;br /&gt;
Login to the bwUniCluster 3.0 is only possible with a Secure Shell (SSH) client for which you must know your username on the cluster and the hostname of the login nodes.&lt;br /&gt;
For more general information on SSH clients, visit the [[BwUniCluster3.0/Login/Client|SSH Clients Guide]].&lt;br /&gt;
&lt;br /&gt;
== Username ==&lt;br /&gt;
&lt;br /&gt;
If you want to use the bwUniCluster 3.0 you need to add a prefix to your local username.&lt;br /&gt;
&lt;br /&gt;
For prefixes please refer to the [[Registration/Login/Username#Prefix_for_Universities|prefix table]].&lt;br /&gt;
&lt;br /&gt;
Examples:&amp;lt;br/&amp;gt;&lt;br /&gt;
* If your local username for the University is &amp;lt;code&amp;gt;ab123&amp;lt;/code&amp;gt; and you are a user from the University of Freiburg this would combine to: &amp;lt;code&amp;gt;fr_ab123&amp;lt;/code&amp;gt;.&lt;br /&gt;
* If your KIT username is &amp;lt;code&amp;gt;ab1234&amp;lt;/code&amp;gt; and you are a user from KIT this would combine to: &amp;lt;code&amp;gt;ka_ab1234&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Hostnames ==&lt;br /&gt;
&lt;br /&gt;
The system has two login nodes.&lt;br /&gt;
The selection of the login node is done automatically.&lt;br /&gt;
If you are logging in multiple times, different sessions might run on different login nodes.&lt;br /&gt;
&lt;br /&gt;
Login to bwUniCluster 3.0:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Hostname !! Node type&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;bwunicluster.scc.kit.edu&#039;&#039;&#039; || login to one of the two login nodes&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;uc3.scc.kit.edu&#039;&#039;&#039;          || login to one of the two login nodes&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In general, you should use automatic selection to allow us to balance the load over the three login nodes.&lt;br /&gt;
If you need to connect to specific login nodes, you can use the following hostnames:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Hostname !! Node type&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;uc3-login1.scc.kit.edu&#039;&#039;&#039; || bwUniCluster 3.0 first login node&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;uc3-login2.scc.kit.edu&#039;&#039;&#039; || bwUniCluster 3.0 second login node&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Host Keys ==&lt;br /&gt;
&lt;br /&gt;
When you log in, you may receive the message &amp;lt;code&amp;gt;The authenticity of host &#039;&amp;lt;host address&amp;gt;&#039; can&#039;t be established.&amp;lt;/code&amp;gt; along with the host key fingerprint. This is intended so you can verify the authenticity of the host you are connecting to. Before you continue you should verify, if this fingerprint matches one of the following:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Algorithm !! Fingerprint (SHA256)&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;RSA&#039;&#039;&#039; || SHA256:RaE0/tqQMMBmJuDCIo3WZ38YJsz0godVyt6aUOk/E0M&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;ECDSA&#039;&#039;&#039; || SHA256:LjBYL/x86ZAlL0JdlXrCmPYXvS3DaSiMuvycojBMdwQ&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;ED25519&#039;&#039;&#039; || SHA256:5mZYEpKigwK5ibBMHRrh3WIkOtCqomJW6H7OMbPk3ec&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Login with SSH command (Linux, Mac, Windows) ==&lt;br /&gt;
&lt;br /&gt;
Linux, Mac OS, other Unix-like operating systems and Microsoft Windows come with a built-in SSH client, most likely provided by the OpenSSH project.&lt;br /&gt;
&lt;br /&gt;
For login use one of the following ssh commands:&lt;br /&gt;
&lt;br /&gt;
 ssh &amp;lt;username&amp;gt; uc3.scc.kit.edu&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
 ssh &amp;lt;username&amp;gt;@bwunicluster.scc.kit.edu&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
To run graphical applications, you can use the &amp;lt;code&amp;gt;-X&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;-Y&amp;lt;/code&amp;gt; flag to &amp;lt;code&amp;gt;ssh&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 ssh -Y -l &amp;lt;username&amp;gt; bwunicluster.scc.kit.edu&lt;br /&gt;
&lt;br /&gt;
For better performance, we recommend using [[VNC]].&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Login with graphical SSH client (Windows) ==&lt;br /&gt;
&lt;br /&gt;
For Windows we suggest using  [[Data_Transfer/Graphical_Clients#MobaXterm|MobaXterm]] for login and file transfer.&lt;br /&gt;
 &lt;br /&gt;
Start &#039;&#039;MobaXterm&#039;&#039;, fill in the following fields:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Remote name              : uc3.scc.kit.edu    # or bwunicluster.scc.kit.edu&lt;br /&gt;
Specify user name        : &amp;lt;username&amp;gt;&lt;br /&gt;
Port                     : 22&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After that click on &#039;ok&#039;. Then a terminal will be opened and there you can enter your credentials.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; When using File transfer with MobaXterm version 23.6 the following configuration change has to be made:&lt;br /&gt;
In the settings in the tab &amp;quot;SSH&amp;quot;, change the option &amp;quot;SSH engine&amp;quot; from &amp;quot;&amp;lt;new&amp;gt;&amp;quot; to &amp;quot;&amp;lt;legacy&amp;gt;&amp;quot;. Then restart MobaXterm&lt;br /&gt;
&lt;br /&gt;
== Login with Jupyterhub ==&lt;br /&gt;
&lt;br /&gt;
Login takes place at:&lt;br /&gt;
* bwUniCluster 3.0: [https://uc3-jupyter.scc.kit.edu uc3-jupyter.scc.kit.edu]&lt;br /&gt;
* SDIL: [https://sdil-jupyter.scc.kit.edu sdil-jupyter.scc.kit.edu]&lt;br /&gt;
&lt;br /&gt;
More Information can be found [[BwUniCluster3.0/Jupyter#Login_process|here]].&lt;br /&gt;
&lt;br /&gt;
== Login Example ==&lt;br /&gt;
&lt;br /&gt;
To log in to bwUniCluster 3.0, you must provide your [[Registration/Password|service password]].&lt;br /&gt;
Proceed as follows:&lt;br /&gt;
# Use SSH for a login node.&lt;br /&gt;
# The system will ask for a one-time password &amp;lt;code&amp;gt;Your OTP:&amp;lt;/code&amp;gt;. Please enter your OTP and confirm it with Enter/Return. If you do not have a second factor yet, please create one (see [[Registration/2FA]]).&lt;br /&gt;
# The system will ask you for your service password &amp;lt;code&amp;gt;Password:&amp;lt;/code&amp;gt;. Please enter it and confirm it with Enter/Return. If you do not have a service password yet or have forgotten it, please create one (see [[Registration/Password]]).&lt;br /&gt;
# You will be greeted by the cluster, followed by a shell.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[user@client ~]$ ssh ka_ab1234@uc3.scc.kit.edu&lt;br /&gt;
(ka_ab1234@uc3.scc.kit.edu) Your OTP: cccccctlljdbrjdleujigivvfnkjbucudugjjlutfbrk&lt;br /&gt;
(ka_ab1234@uc3.scc.kit.edu) Password: &lt;br /&gt;
********************************************************************************&lt;br /&gt;
*                                                                              *&lt;br /&gt;
*                   Karlsruher Institut für Technologie (KIT)                  *&lt;br /&gt;
*                                                                              *&lt;br /&gt;
*                       Scientific Computing Center (SCC)                      *&lt;br /&gt;
*                                                                              *&lt;br /&gt;
*                            _    _    _____   ____                            *&lt;br /&gt;
*                           | |  | |  / ____| |___ \                           *&lt;br /&gt;
*                           | |  | | | |        __) |                          *&lt;br /&gt;
*                           | |  | | | |       |__ &amp;lt;                           *&lt;br /&gt;
*                           | |__| | | |____   ___) |                          *&lt;br /&gt;
*                            \____/   \_____| |____/                           *&lt;br /&gt;
*                                                                              *&lt;br /&gt;
*                                                                              *&lt;br /&gt;
*                  (KITE 2.0, RHEL 9.4, Lustre 2.14.0_ddn154)                  *&lt;br /&gt;
*                                                                              *&lt;br /&gt;
*                                                                              *&lt;br /&gt;
********************************************************************************&lt;br /&gt;
Last login: Wed Feb 26 11:08:20 2025 from 2a00:1398:4:181c:2be1:437b:1c36:1337&lt;br /&gt;
&lt;br /&gt;
[ka_ab1234@uc3n990 ~]$&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
See [[BwUniCluster3.0/FAQ#Login|bwUniCluster FAQ]].&lt;br /&gt;
&lt;br /&gt;
= Allowed Activities on Login Nodes =&lt;br /&gt;
&lt;br /&gt;
{|style=&amp;quot;background:#deffee; width:100%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;padding:5px; background:#ffa500; text-align:left&amp;quot;|&lt;br /&gt;
[[Image:Attention.svg|center|25px]]&lt;br /&gt;
|style=&amp;quot;padding:5px; background:#ffa500; text-align:left&amp;quot;|&lt;br /&gt;
To guarantee usability for all the users of clusters you must not run your compute jobs on the login nodes.&lt;br /&gt;
Compute jobs must be submitted to the queuing system.&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Any compute job running on the login nodes will be terminated without any notice.&#039;&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
Any long-running compilation or any long-running pre- or post-processing of batch jobs must also be submitted to the queuing system.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The login nodes of the bwHPC clusters are the access point to the compute system, your &amp;lt;code&amp;gt;$HOME&amp;lt;/code&amp;gt; directory and your workspaces.&lt;br /&gt;
These nodes are shared with all the users therefore, your activities on the login nodes are limited to primarily set up your batch jobs.&lt;br /&gt;
Your activities may also be:&lt;br /&gt;
* &#039;&#039;&#039;short&#039;&#039;&#039; compilation of your program code and&lt;br /&gt;
* &#039;&#039;&#039;light weight&#039;&#039;&#039; pre- and post-processing of your batch jobs.&lt;br /&gt;
&lt;br /&gt;
We advise users to use [[BwUniCluster3.0/Batch_Queues#Interactive_Jobs|interactive jobs]] for compute and memory intensive tasks like compiling.&lt;br /&gt;
&lt;br /&gt;
= Related Information =&lt;br /&gt;
&lt;br /&gt;
* If you want to reset your service password, consult the [[Registration/Password|Password Guide]].&lt;br /&gt;
* If you want to register a new token for the two factor authentication (2FA), consult the [[Registration/2FA|2FA Guide]].&lt;br /&gt;
* If you want to de-register, consult the [[Registration/Deregistration|De-registration Guide]].&lt;br /&gt;
* If you need an SSH key for your workflow, read [[Registration/SSH|Registering SSH Keys with your Cluster]].&lt;br /&gt;
* Configuring your shell: [[.bashrc Do&#039;s and Don&#039;ts]]&lt;/div&gt;</summary>
		<author><name>P Schuhmacher</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster3.0/Running_Jobs&amp;diff=14703</id>
		<title>BwUniCluster3.0/Running Jobs</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster3.0/Running_Jobs&amp;diff=14703"/>
		<updated>2025-04-08T10:54:23Z</updated>

		<summary type="html">&lt;p&gt;P Schuhmacher: /* Policy */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
= Purpose and function of a queuing system =&lt;br /&gt;
&lt;br /&gt;
All compute activities on bwUniCluster 3.0 have to be performed on the compute nodes. Compute nodes are only available by requesting the corresponding resources via the queuing system. As soon as the requested resources are available, automated tasks are executed via a batch script or they can be accessed interactively.&amp;lt;br&amp;gt;&lt;br /&gt;
General procedure: Hint to [[Running_Calculations | Running Calculations]]&lt;br /&gt;
&lt;br /&gt;
== Job submission process ==&lt;br /&gt;
&lt;br /&gt;
bwUniCluster 3.0 has installed the workload managing software Slurm. Therefore any job submission by the user is to be executed by commands of the Slurm software. Slurm queues and runs user jobs based on fair sharing policies.&lt;br /&gt;
&lt;br /&gt;
== Slurm ==&lt;br /&gt;
&lt;br /&gt;
HPC Workload Manager on bwUniCluster 3.0 is Slurm.&lt;br /&gt;
Slurm is a cluster management and job scheduling system. Slurm has three key functions. &lt;br /&gt;
* It allocates access to resources (compute cores on nodes) to users for some duration of time so they can perform work. &lt;br /&gt;
* It provides a framework for starting, executing, and monitoring work (normally a parallel job) on the set of allocated nodes. &lt;br /&gt;
* It arbitrates contention for resources by managing a queue of pending work.&lt;br /&gt;
&lt;br /&gt;
Any kind of calculation on the compute nodes of bwUniCluster 3.0 requires the user to define calculations as a sequence of commands together with required run time, number of CPU cores and main memory and submit all, i.e., the &#039;&#039;&#039;batch job&#039;&#039;&#039;, to a resource and workload managing software.&lt;br /&gt;
&lt;br /&gt;
== Terms and definitions ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Partitions &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Slurm manages job queues for different &#039;&#039;&#039;partitions&#039;&#039;&#039;. Partitions are used to group similar node types (e.g. nodes with and without accelerators) and to enforce different access policies and resource limits.&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 3.0 there are different partitions:&lt;br /&gt;
&lt;br /&gt;
* CPU-only nodes&lt;br /&gt;
** 2-socket nodes, consisting of 2 Intel Ice Lake processors with 32 cores each or 2 AMD processors with 48 cores each&lt;br /&gt;
** 2-socket nodes with very high RAM capacity, consisting of 2 AMD processors with 48 cores each&lt;br /&gt;
* GPU-accelerated nodes&lt;br /&gt;
** 2-socket nodes with 4x NVIDIA A100 or 4x NVIDIA H100 GPUs&lt;br /&gt;
** 4-socket node with 4x AMD Instinct accelerator&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Queues &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Job &#039;&#039;&#039;queues&#039;&#039;&#039; are used to manage jobs that request access to shared but limited computing resources of a certain kind (partition).&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 3.0 there are different main types of queues:&lt;br /&gt;
* Regular queues&lt;br /&gt;
** cpu: Jobs that request CPU-only nodes.&lt;br /&gt;
** gpu: Jobs that request GPU-accelerated nodes.&lt;br /&gt;
* Development queues (dev)&lt;br /&gt;
** Short, usually interactive jobs that are used for developing, compiling and testing code and workflows. The intention behind development queues is to provide users with immediate access to computer resources without having to wait. This is the place to realize instantaneous heavy compute without affecting other users, as would be the case on the login nodes.&lt;br /&gt;
&lt;br /&gt;
Requested compute resources such as (wall-)time, number of nodes and amount of memory are restricted and must fit into the boundaries imposed by the queues. The request for compute resources on the bwUniCluster 3.0 &amp;lt;font color=red&amp;gt;requires at least the specification of the &#039;&#039;&#039;queue&#039;&#039;&#039; and the &#039;&#039;&#039;time&#039;&#039;&#039;&amp;lt;/font&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Jobs &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Jobs can be run non-interactively as &#039;&#039;&#039;batch jobs&#039;&#039;&#039; or as &#039;&#039;&#039;interactive jobs&#039;&#039;&#039;.&amp;lt;br&amp;gt;&lt;br /&gt;
Submitting a batch job means, that all steps of a compute project are defined in a Bash script. This Bash script is queued and executed as soon as the compute resources are available and allocated. Jobs are enqueued with the &amp;lt;code&amp;gt;sbatch&amp;lt;/code&amp;gt; command.&lt;br /&gt;
For interactive jobs, the resources are requested with the &amp;lt;code&amp;gt;salloc&amp;lt;/code&amp;gt; command. As soon as the computing resources are available and allocated, a command line prompt is returned on a computing node and the user can freely dispose of the resources now available to him.&lt;br /&gt;
{|style=&amp;quot;background:#deffee; width:100%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;padding:5px; background:#cef2e0; text-align:left&amp;quot;|&lt;br /&gt;
[[Image:Attention.svg|center|25px]]&lt;br /&gt;
|style=&amp;quot;padding:5px; background:#cef2e0; text-align:left&amp;quot;|&lt;br /&gt;
&#039;&#039;&#039;Please remember:&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Heavy computations are not allowed on the login nodes&#039;&#039;&#039;.&amp;lt;br&amp;gt;Use a developement or a regular job queue instead! Please refer to [[BwUniCluster3.0/Login#Allowed_Activities_on_Login_Nodes|Allowed Activities on Login Nodes]].&lt;br /&gt;
* &#039;&#039;&#039;Development queues&#039;&#039;&#039; are meant for &#039;&#039;&#039;development tasks&#039;&#039;&#039;.&amp;lt;br&amp;gt;Do not misuse this queue for regular, short-running jobs or chain jobs! Only one running job at a time is enabled. Maximum queue length is reduced to 3.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Queues on bwUniCluster 3.0 = &lt;br /&gt;
== Policy ==&lt;br /&gt;
&lt;br /&gt;
The computing time is provided in accordance with the &#039;&#039;&#039;fair share policy&#039;&#039;&#039;. The individual investment shares of the respective university and the resources already used by its members are taken into account. Furthermore, the following throttling policy is also active: The &#039;&#039;&#039;maximum amount of physical cores&#039;&#039;&#039; used at any given time from jobs running is &#039;&#039;&#039;1920 per user&#039;&#039;&#039; (aggregated over all running jobs). This number corresponds to 30 nodes on the Ice Lake partition or 20 nodes on the standard partition. The aim is to minimize waiting times and maximize the number of users who can access computing time at the same time.&lt;br /&gt;
&lt;br /&gt;
== Regular Queues ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
! style=&amp;quot;width:5%&amp;quot;| Queue&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Node-Type&lt;br /&gt;
! style=&amp;quot;width:23%&amp;quot;| Default Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Minimal Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Maximum Resources&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;cpu_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Ice Lake&lt;br /&gt;
| mem-per-cpu=2000mb&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=30, mem=249600mb, ntasks-per-node=64, (threads-per-core=2) &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;cpu&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Standard&lt;br /&gt;
| mem-per-cpu=2000mb&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=20, mem=380000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;highmem&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;High Memory&lt;br /&gt;
| mem-per-cpu=12090mb&lt;br /&gt;
| mem=380001mb&lt;br /&gt;
| time=72:00:00, nodes=4, mem=2300000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;gpu_h100&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;NVIDIA GPU x4&lt;br /&gt;
| mem-per-gpu=193300mb&amp;lt;br/&amp;gt;cpus-per-gpu=24&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=12, mem=760000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;gpu_mi300&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU node&amp;lt;br/&amp;gt;AMD GPU x4&lt;br /&gt;
| mem-per-gpu=128200mb&amp;lt;br/&amp;gt;cpus-per-gpu=24&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=1, mem=510000mb, ntasks-per-node=40, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;gpu_a100_il&amp;lt;/code&amp;gt;/&amp;lt;code&amp;gt;gpu_h100_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;Ice Lake&amp;lt;br/&amp;gt;NVIDIA GPU x4&lt;br /&gt;
| mem-per-gpu=127500mb&amp;lt;br/&amp;gt;cpus-per-gpu=16&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=9, mem=510000mb, ntasks-per-node=64, (threads-per-core=2) &lt;br /&gt;
|}&lt;br /&gt;
Table 1: Regular Queues&lt;br /&gt;
&lt;br /&gt;
== Development Queues ==&lt;br /&gt;
Only for development, i.e. debugging or performance optimization ...&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
! style=&amp;quot;width:5%&amp;quot;| Queue&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Node Type&lt;br /&gt;
! style=&amp;quot;width:23%&amp;quot;| Default Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Minimal Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Maximum Resources&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_cpu_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Ice Lake&lt;br /&gt;
| mem-per-cpu=2000mb&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=8, mem=249600mb, ntasks-per-node=64, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_cpu&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Standard&lt;br /&gt;
| mem-per-cpu=2000mb&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=380000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_gpu_h100&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;NVIDIA GPU x4&lt;br /&gt;
| mem-per-gpu=193300mb&amp;lt;br/&amp;gt;cpus-per-gpu=24&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=760000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_gpu_a100_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;NVIDIA GPU x4&amp;lt;br/&amp;gt;&lt;br /&gt;
| mem-per-gpu=127500mb&amp;lt;br/&amp;gt;cpus-per-gpu=16 &lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=510000mb, ntasks-per-node=64, (threads-per-core=2) &lt;br /&gt;
|}&lt;br /&gt;
Table 2: Development Queues&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Default resources of a queue class define number of tasks and memory if not explicitly given with sbatch command. Resource list acronyms &#039;&#039;--time&#039;&#039;, &#039;&#039;--ntasks&#039;&#039;, &#039;&#039;--nodes&#039;&#039;, &#039;&#039;--mem&#039;&#039; and &#039;&#039;--mem-per-cpu&#039;&#039; are described [[BwUniCluster3.0/Running_Jobs/Slurm|here]].&lt;br /&gt;
&lt;br /&gt;
== Check available resources: sinfo_t_idle ==&lt;br /&gt;
The Slurm command sinfo is used to view partition and node information for a system running Slurm. It incorporates down time, reservations, and node state information in determining the available backfill window. The sinfo command can only be used by the administrator.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
SCC has prepared a special script (sinfo_t_idle) to find out how many processors are available for immediate use on the system. It is anticipated that users will use this information to submit jobs that meet these criteria and thus obtain quick job turnaround times. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The following command displays what resources are available for immediate use for the whole partition.&lt;br /&gt;
&amp;lt;pre&amp;gt;$ sinfo_t_idle&lt;br /&gt;
Partition dev_cpu                 :      2 nodes idle&lt;br /&gt;
Partition cpu                     :     68 nodes idle&lt;br /&gt;
Partition highmem                 :      4 nodes idle&lt;br /&gt;
Partition dev_gpu_h100            :      0 nodes idle&lt;br /&gt;
Partition gpu_h100                :     11 nodes idle&lt;br /&gt;
Partition gpu_mi300               :      1 nodes idle&lt;br /&gt;
Partition dev_cpu_il              :      0 nodes idle&lt;br /&gt;
Partition cpu_il                  :      0 nodes idle&lt;br /&gt;
Partition dev_gpu_a100_il         :      0 nodes idle&lt;br /&gt;
Partition gpu_a100_il             :      0 nodes idle&lt;br /&gt;
Partition gpu_h100_il             :      0 nodes idle&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Running Jobs =&lt;br /&gt;
&lt;br /&gt;
== Slurm Commands (excerpt) ==&lt;br /&gt;
Important Slurm commands for non-administrators working on bwUniCluster 3.0.&lt;br /&gt;
{| width=850px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Slurm commands !! Brief explanation&lt;br /&gt;
|-&lt;br /&gt;
| [[#Batch Jobs: sbatch|sbatch]] || Submits a job and puts it into the queue [[https://slurm.schedmd.com/sbatch.html sbatch]] &lt;br /&gt;
|-&lt;br /&gt;
| [[#Interactive Jobs: salloc|salloc]] || Requests resources for an interactive Job [[https://slurm.schedmd.com/salloc.html salloc]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Monitor and manage jobs |scontrol show job]] || Displays detailed job state information [[https://slurm.schedmd.com/scontrol.html scontrol]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#List of your submitted jobs : squeue|squeue]] || Displays information about active, eligible, blocked, and/or recently completed jobs [[https://slurm.schedmd.com/squeue.html squeue]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#List of your submitted jobs : squeue|squeue --start]] || Returns start time of submitted job [[https://slurm.schedmd.com/squeue.html squeue]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Check available resources: sinfo_t_idle|sinfo_t_idle]] || Shows what resources are available for immediate use [[https://slurm.schedmd.com/sinfo.html sinfo]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Canceling own jobs : scancel|scancel]] || Cancels a job [[https://slurm.schedmd.com/scancel.html scancel]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* [https://slurm.schedmd.com/tutorials.html  Slurm Tutorials]&lt;br /&gt;
* [https://slurm.schedmd.com/pdfs/summary.pdf  Slurm command/option summary (2 pages)]&lt;br /&gt;
* [https://slurm.schedmd.com/man_index.html  Slurm Commands]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Batch Jobs: sbatch ==&lt;br /&gt;
&lt;br /&gt;
Batch jobs are submitted by using the command &#039;&#039;&#039;sbatch&#039;&#039;&#039;. The main purpose of the &#039;&#039;&#039;sbatch&#039;&#039;&#039; command is to specify the resources that are needed to run the job. &#039;&#039;&#039;sbatch&#039;&#039;&#039; will then queue the batch job. However, starting of batch job depends on the availability of the requested resources and the fair sharing value.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The syntax and use of &#039;&#039;&#039;sbatch&#039;&#039;&#039; can be displayed via:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ man sbatch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;sbatch&#039;&#039;&#039; options can be used from the command line or in your job script. Different defaults for some of these options are set based on the queue and can be found [[BwUniCluster3.0/Slurm | here]]&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | sbatch Options&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width:8%&amp;quot;| Command line&lt;br /&gt;
! style=&amp;quot;width:9%&amp;quot;| Script&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Purpose&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -t, --time=&#039;&#039;time&#039;&#039;&lt;br /&gt;
| #SBATCH --time=&#039;&#039;time&#039;&#039;&lt;br /&gt;
| Wall clock time limit.&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -N, --nodes=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --nodes=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of nodes to be used.&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -n, --ntasks=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --ntasks=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of tasks to be launched.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --ntasks-per-node=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --ntasks-per-node=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Maximum count of tasks per node.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -c, --cpus-per-task=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --cpus-per-task=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of CPUs required per (MPI-)task.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mem=&#039;&#039;value_in_MB&#039;&#039;&lt;br /&gt;
| #SBATCH --mem=&#039;&#039;value_in_MB&#039;&#039; &lt;br /&gt;
| Memory in MegaByte per node. (You should omit the setting of this option.)&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mem-per-cpu=&#039;&#039;value_in_MB&#039;&#039;&lt;br /&gt;
| #SBATCH --mem-per-cpu=&#039;&#039;value_in_MB&#039;&#039; &lt;br /&gt;
| Minimum Memory required per allocated CPU. (You should omit the setting of this option.)&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mail-type=&#039;&#039;type&#039;&#039;&lt;br /&gt;
| #SBATCH --mail-type=&#039;&#039;type&#039;&#039;&lt;br /&gt;
| Notify user by email when certain event types occur.&amp;lt;br&amp;gt;Valid type values are NONE, BEGIN, END, FAIL, REQUEUE, ALL.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mail-user=&#039;&#039;mail-address&#039;&#039;&lt;br /&gt;
| #SBATCH --mail-user=&#039;&#039;mail-address&#039;&#039;&lt;br /&gt;
|  The specified mail-address receives email notification of state changes as defined by --mail-type.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --output=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --output=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| File in which job output is stored. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --error=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --error=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| File in which job error messages are stored. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -J, --job-name=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --job-name=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| Job name.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --export=[ALL,] &#039;&#039;env-variables&#039;&#039;&lt;br /&gt;
| #SBATCH --export=[ALL,] &#039;&#039;env-variables&#039;&#039;&lt;br /&gt;
| Identifies which environment variables from the submission environment are propagated to the launched application. Default is ALL.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -A, --account=&#039;&#039;group-name&#039;&#039;&lt;br /&gt;
| #SBATCH --account=&#039;&#039;group-name&#039;&#039;&lt;br /&gt;
| Change resources used by this job to specified group. You may need this option if your account is assigned to more than one group. By command &amp;quot;scontrol show job&amp;quot; the project group the job is accounted on can be seen behind &amp;quot;Account=&amp;quot;. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -p, --partition=&#039;&#039;queue-name&#039;&#039;&lt;br /&gt;
| #SBATCH --partition=&#039;&#039;queue-name&#039;&#039;&lt;br /&gt;
| Request a specific queue for the resource allocation.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --reservation=&#039;&#039;reservation-name&#039;&#039;&lt;br /&gt;
| #SBATCH --reservation=&#039;&#039;reservation-name&#039;&#039;&lt;br /&gt;
| Use a specific reservation for the resource allocation.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -C, --constraint=&#039;&#039;LSDF&#039;&#039;&lt;br /&gt;
| #SBATCH --constraint=LSDF&lt;br /&gt;
| Job constraint LSDF filesystems.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -C, --constraint=&#039;&#039;BEEOND (BEEOND_4MDS, BEEOND_MAXMDS)&#039;&#039;&lt;br /&gt;
| #SBATCH --constraint=BEEOND (BEEOND_4MDS, BEEOND_MAXMDS)&lt;br /&gt;
| Job constraint BeeOND filesystem.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Interactive Jobs: salloc ==&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 3.0 you are only allowed to run short jobs (&amp;lt;&amp;lt; 1 hour) with little memory requirements (&amp;lt;&amp;lt; 8 GByte) on the logins nodes. If you want to run longer jobs and/or jobs with a request of more than 8 GByte of memory, you must allocate resources for so-called interactive jobs by usage of the command salloc on a login node. Considering a serial application running on a compute node that requires 5000 MByte of memory and limiting the interactive run to 2 hours the following command has to be executed:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ salloc -p cpu -n 1 -t 120 --mem=5000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then you will get one core on a compute node within the partition &amp;quot;cpu&amp;quot;. After execution of this command &#039;&#039;&#039;DO NOT CLOSE&#039;&#039;&#039; your current terminal session but wait until the queueing system Slurm has granted you the requested resources on the compute system. You will be logged in automatically on the granted core! To run a serial program on the granted core you only have to type the name of the executable.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./&amp;lt;my_serial_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please be aware that your serial job must run less than 2 hours in this example, else the job will be killed during runtime by the system. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can also start now a graphical X11-terminal connecting you to the dedicated resource that is available for 2 hours. You can start it by the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ xterm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that, once the walltime limit has been reached the resources - i.e. the compute node - will automatically be revoked.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
An interactive parallel application running on one compute node or on many compute nodes (e.g. here 5 nodes) with 96 cores each requires usually an amount of memory in GByte (e.g. 50 GByte) and a maximum time (e.g. 1 hour). E.g. 5 nodes can be allocated by the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ salloc -p cpu -N 5 --ntasks-per-node=96 -t 01:00:00  --mem=50gb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you can run parallel jobs on 480 cores requiring 50 GByte of memory per node. Please be aware that you will be logged in on core 0 of the first node.&lt;br /&gt;
If you want to have access to another node you have to open a new terminal, connect it also to bwUniCluster 3.0 and type the following commands to&lt;br /&gt;
connect to the running interactive job and then to a specific node:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ srun --jobid=XXXXXXXX --pty /bin/bash&lt;br /&gt;
$ srun --nodelist=uc3nXXX --pty /bin/bash&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ squeue&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the jobid and the nodelist can be shown.&lt;br /&gt;
&lt;br /&gt;
If you want to run MPI-programs, you can do it by simply typing mpirun &amp;lt;program_name&amp;gt;. Then your program will be run on 480 cores. A very simple example for starting a parallel job can be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mpirun &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also start the debugger ddt by the commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module add devel/ddt&lt;br /&gt;
$ ddt &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above commands will execute the parallel program &amp;lt;my_mpi_program&amp;gt; on all available cores. You can also start parallel programs on a subset of cores; an example for this can be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mpirun -n 50 &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are using Intel MPI you must start &amp;lt;my_mpi_program&amp;gt; by the command mpiexec.hydra (instead of mpirun).&lt;br /&gt;
&lt;br /&gt;
== Interactive Computing with Jupyter ==&lt;br /&gt;
&lt;br /&gt;
== Monitor and manage jobs ==&lt;br /&gt;
&lt;br /&gt;
=== List of your submitted jobs : squeue ===&lt;br /&gt;
Displays information about YOUR active, pending and/or recently completed jobs. The command displays all own active and pending jobs. The command squeue is explained in detail on the webpage https://slurm.schedmd.com/squeue.html or via manpage (man squeue).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;squeue&#039;&#039; example on bwUniCluster 3.0 &amp;lt;small&amp;gt;(Only your own jobs are displayed!)&amp;lt;/small&amp;gt;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ squeue &lt;br /&gt;
             JOBID PARTITION     NAME     USER ST       TIME  NODES NODELIST(REASON)&lt;br /&gt;
              1262       cpu     wrap ka_ab123  R       8:15      1 uc3n002&lt;br /&gt;
              1267 dev_gpu_h     wrap ka_ab123 PD       0:00      1 (Resources)&lt;br /&gt;
              1265   highmem     wrap ka_ab123  R       2:41      1 uc3n084&lt;br /&gt;
$ squeue -l&lt;br /&gt;
             JOBID PARTITION     NAME     USER    STATE       TIME TIME_LIMI  NODES NODELIST(REASON)&lt;br /&gt;
              1262       cpu     wrap ka_ab123  RUNNING       8:55     20:00      1 uc3n002&lt;br /&gt;
              1267 dev_gpu_h     wrap ka_ab123  PENDING       0:00     20:00      1 (Resources)&lt;br /&gt;
              1265   highmem     wrap ka_ab123  RUNNING       3:21     20:00      1 uc3n084&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Detailed job information : scontrol show job ===&lt;br /&gt;
scontrol show job displays detailed job state information and diagnostic output for all or a specified job of yours. Detailed information is available for active, pending and recently completed jobs. The command scontrol is explained in detail on the webpage https://slurm.schedmd.com/scontrol.html or via manpage (man scontrol). &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Display the state of all your jobs in normal mode: scontrol show job&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Display the state of a job with &amp;lt;jobid&amp;gt; in normal mode: scontrol show job &amp;lt;jobid&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Here is an example from bwUniCluster 3.0.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ squeue&lt;br /&gt;
JOBID PARTITION     NAME     USER ST       TIME  NODES NODELIST(REASON)&lt;br /&gt;
1262       cpu     wrap ka_zs040  R       1:12      1 uc3n002&lt;br /&gt;
&lt;br /&gt;
$&lt;br /&gt;
$ # now, see what&#039;s up with my pending job with jobid 1262&lt;br /&gt;
$ &lt;br /&gt;
$ scontrol show job 1262&lt;br /&gt;
&lt;br /&gt;
JobId=1262 JobName=wrap&lt;br /&gt;
   UserId=ka_zs0402(241992) GroupId=ka_scc(12345) MCS_label=N/A&lt;br /&gt;
   Priority=4246 Nice=0 Account=ka QOS=normal&lt;br /&gt;
   JobState=RUNNING Reason=None Dependency=(null)&lt;br /&gt;
   Requeue=1 Restarts=0 BatchFlag=1 Reboot=0 ExitCode=0:0&lt;br /&gt;
   RunTime=00:00:37 TimeLimit=00:20:00 TimeMin=N/A&lt;br /&gt;
   SubmitTime=2025-04-04T10:01:30 EligibleTime=2025-04-04T10:01:30&lt;br /&gt;
   AccrueTime=2025-04-04T10:01:30&lt;br /&gt;
   StartTime=2025-04-04T10:01:31 EndTime=2025-04-04T10:21:31 Deadline=N/A&lt;br /&gt;
   SuspendTime=None SecsPreSuspend=0 LastSchedEval=2025-04-04T10:01:31 Scheduler=Main&lt;br /&gt;
   Partition=cpu AllocNode:Sid=uc3n999:2819841&lt;br /&gt;
   ReqNodeList=(null) ExcNodeList=(null)&lt;br /&gt;
   NodeList=uc3n002&lt;br /&gt;
   BatchHost=uc3n002&lt;br /&gt;
   NumNodes=1 NumCPUs=2 NumTasks=1 CPUs/Task=1 ReqB:S:C:T=0:0:*:*&lt;br /&gt;
   ReqTRES=cpu=1,mem=2000M,node=1,billing=1&lt;br /&gt;
   AllocTRES=cpu=2,mem=4000M,node=1,billing=2&lt;br /&gt;
   Socks/Node=* NtasksPerN:B:S:C=0:0:*:1 CoreSpec=*&lt;br /&gt;
   MinCPUsNode=1 MinMemoryCPU=2000M MinTmpDiskNode=0&lt;br /&gt;
   Features=(null) DelayBoot=00:00:00&lt;br /&gt;
   OverSubscribe=OK Contiguous=0 Licenses=(null) Network=(null)&lt;br /&gt;
   Command=(null)&lt;br /&gt;
   WorkDir=/pfs/data6/home/ka/ka_scc/ka_zs0402&lt;br /&gt;
   StdErr=/pfs/data6/home/ka/ka_scc/ka_zs0402/slurm-1262.out&lt;br /&gt;
   StdIn=/dev/null&lt;br /&gt;
   StdOut=/pfs/data6/home/ka/ka_scc/ka_zs0402/slurm-1262.out&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=== Canceling own jobs : scancel ===&lt;br /&gt;
The scancel command is used to cancel jobs. The command scancel is explained in detail on the webpage https://slurm.schedmd.com/scancel.html or via manpage (man scancel). The command is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ scancel [-i] &amp;lt;job-id&amp;gt;&lt;br /&gt;
$ scancel -t &amp;lt;job_state_name&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Slurm Options =&lt;br /&gt;
[[BwUniCluster3.0/Running_Jobs/Slurm | Detailed Slurm usage]]&lt;br /&gt;
&lt;br /&gt;
= Best Practices =&lt;br /&gt;
&lt;br /&gt;
== Step-by-Step example==&lt;br /&gt;
&lt;br /&gt;
== Dos and Don&#039;ts ==&lt;/div&gt;</summary>
		<author><name>P Schuhmacher</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster3.0/Running_Jobs&amp;diff=14702</id>
		<title>BwUniCluster3.0/Running Jobs</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster3.0/Running_Jobs&amp;diff=14702"/>
		<updated>2025-04-08T10:53:15Z</updated>

		<summary type="html">&lt;p&gt;P Schuhmacher: /* Development Queues */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
= Purpose and function of a queuing system =&lt;br /&gt;
&lt;br /&gt;
All compute activities on bwUniCluster 3.0 have to be performed on the compute nodes. Compute nodes are only available by requesting the corresponding resources via the queuing system. As soon as the requested resources are available, automated tasks are executed via a batch script or they can be accessed interactively.&amp;lt;br&amp;gt;&lt;br /&gt;
General procedure: Hint to [[Running_Calculations | Running Calculations]]&lt;br /&gt;
&lt;br /&gt;
== Job submission process ==&lt;br /&gt;
&lt;br /&gt;
bwUniCluster 3.0 has installed the workload managing software Slurm. Therefore any job submission by the user is to be executed by commands of the Slurm software. Slurm queues and runs user jobs based on fair sharing policies.&lt;br /&gt;
&lt;br /&gt;
== Slurm ==&lt;br /&gt;
&lt;br /&gt;
HPC Workload Manager on bwUniCluster 3.0 is Slurm.&lt;br /&gt;
Slurm is a cluster management and job scheduling system. Slurm has three key functions. &lt;br /&gt;
* It allocates access to resources (compute cores on nodes) to users for some duration of time so they can perform work. &lt;br /&gt;
* It provides a framework for starting, executing, and monitoring work (normally a parallel job) on the set of allocated nodes. &lt;br /&gt;
* It arbitrates contention for resources by managing a queue of pending work.&lt;br /&gt;
&lt;br /&gt;
Any kind of calculation on the compute nodes of bwUniCluster 3.0 requires the user to define calculations as a sequence of commands together with required run time, number of CPU cores and main memory and submit all, i.e., the &#039;&#039;&#039;batch job&#039;&#039;&#039;, to a resource and workload managing software.&lt;br /&gt;
&lt;br /&gt;
== Terms and definitions ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Partitions &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Slurm manages job queues for different &#039;&#039;&#039;partitions&#039;&#039;&#039;. Partitions are used to group similar node types (e.g. nodes with and without accelerators) and to enforce different access policies and resource limits.&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 3.0 there are different partitions:&lt;br /&gt;
&lt;br /&gt;
* CPU-only nodes&lt;br /&gt;
** 2-socket nodes, consisting of 2 Intel Ice Lake processors with 32 cores each or 2 AMD processors with 48 cores each&lt;br /&gt;
** 2-socket nodes with very high RAM capacity, consisting of 2 AMD processors with 48 cores each&lt;br /&gt;
* GPU-accelerated nodes&lt;br /&gt;
** 2-socket nodes with 4x NVIDIA A100 or 4x NVIDIA H100 GPUs&lt;br /&gt;
** 4-socket node with 4x AMD Instinct accelerator&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Queues &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Job &#039;&#039;&#039;queues&#039;&#039;&#039; are used to manage jobs that request access to shared but limited computing resources of a certain kind (partition).&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 3.0 there are different main types of queues:&lt;br /&gt;
* Regular queues&lt;br /&gt;
** cpu: Jobs that request CPU-only nodes.&lt;br /&gt;
** gpu: Jobs that request GPU-accelerated nodes.&lt;br /&gt;
* Development queues (dev)&lt;br /&gt;
** Short, usually interactive jobs that are used for developing, compiling and testing code and workflows. The intention behind development queues is to provide users with immediate access to computer resources without having to wait. This is the place to realize instantaneous heavy compute without affecting other users, as would be the case on the login nodes.&lt;br /&gt;
&lt;br /&gt;
Requested compute resources such as (wall-)time, number of nodes and amount of memory are restricted and must fit into the boundaries imposed by the queues. The request for compute resources on the bwUniCluster 3.0 &amp;lt;font color=red&amp;gt;requires at least the specification of the &#039;&#039;&#039;queue&#039;&#039;&#039; and the &#039;&#039;&#039;time&#039;&#039;&#039;&amp;lt;/font&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Jobs &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Jobs can be run non-interactively as &#039;&#039;&#039;batch jobs&#039;&#039;&#039; or as &#039;&#039;&#039;interactive jobs&#039;&#039;&#039;.&amp;lt;br&amp;gt;&lt;br /&gt;
Submitting a batch job means, that all steps of a compute project are defined in a Bash script. This Bash script is queued and executed as soon as the compute resources are available and allocated. Jobs are enqueued with the &amp;lt;code&amp;gt;sbatch&amp;lt;/code&amp;gt; command.&lt;br /&gt;
For interactive jobs, the resources are requested with the &amp;lt;code&amp;gt;salloc&amp;lt;/code&amp;gt; command. As soon as the computing resources are available and allocated, a command line prompt is returned on a computing node and the user can freely dispose of the resources now available to him.&lt;br /&gt;
{|style=&amp;quot;background:#deffee; width:100%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;padding:5px; background:#cef2e0; text-align:left&amp;quot;|&lt;br /&gt;
[[Image:Attention.svg|center|25px]]&lt;br /&gt;
|style=&amp;quot;padding:5px; background:#cef2e0; text-align:left&amp;quot;|&lt;br /&gt;
&#039;&#039;&#039;Please remember:&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Heavy computations are not allowed on the login nodes&#039;&#039;&#039;.&amp;lt;br&amp;gt;Use a developement or a regular job queue instead! Please refer to [[BwUniCluster3.0/Login#Allowed_Activities_on_Login_Nodes|Allowed Activities on Login Nodes]].&lt;br /&gt;
* &#039;&#039;&#039;Development queues&#039;&#039;&#039; are meant for &#039;&#039;&#039;development tasks&#039;&#039;&#039;.&amp;lt;br&amp;gt;Do not misuse this queue for regular, short-running jobs or chain jobs! Only one running job at a time is enabled. Maximum queue length is reduced to 3.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Queues on bwUniCluster 3.0 = &lt;br /&gt;
== Policy ==&lt;br /&gt;
&lt;br /&gt;
The computing time is provided in accordance with the &#039;&#039;&#039;fair share policy&#039;&#039;&#039;. The individual investment shares of the respective university and the resources already used by its members are taken into account. Furthermore, the following throttling policy is also active: The &#039;&#039;&#039;maximum amount of cores&#039;&#039;&#039; used at any given time from jobs running is &#039;&#039;&#039;1920 per user&#039;&#039;&#039; (aggregated over all running jobs). This number corresponds to 30 nodes on the Ice Lake partition or 20 nodes on the standard partition. The aim is to minimize waiting times and maximize the number of users who can access computing time at the same time.&lt;br /&gt;
&lt;br /&gt;
== Regular Queues ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
! style=&amp;quot;width:5%&amp;quot;| Queue&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Node-Type&lt;br /&gt;
! style=&amp;quot;width:23%&amp;quot;| Default Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Minimal Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Maximum Resources&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;cpu_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Ice Lake&lt;br /&gt;
| mem-per-cpu=2000mb&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=30, mem=249600mb, ntasks-per-node=64, (threads-per-core=2) &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;cpu&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Standard&lt;br /&gt;
| mem-per-cpu=2000mb&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=20, mem=380000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;highmem&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;High Memory&lt;br /&gt;
| mem-per-cpu=12090mb&lt;br /&gt;
| mem=380001mb&lt;br /&gt;
| time=72:00:00, nodes=4, mem=2300000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;gpu_h100&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;NVIDIA GPU x4&lt;br /&gt;
| mem-per-gpu=193300mb&amp;lt;br/&amp;gt;cpus-per-gpu=24&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=12, mem=760000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;gpu_mi300&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU node&amp;lt;br/&amp;gt;AMD GPU x4&lt;br /&gt;
| mem-per-gpu=128200mb&amp;lt;br/&amp;gt;cpus-per-gpu=24&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=1, mem=510000mb, ntasks-per-node=40, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;gpu_a100_il&amp;lt;/code&amp;gt;/&amp;lt;code&amp;gt;gpu_h100_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;Ice Lake&amp;lt;br/&amp;gt;NVIDIA GPU x4&lt;br /&gt;
| mem-per-gpu=127500mb&amp;lt;br/&amp;gt;cpus-per-gpu=16&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=9, mem=510000mb, ntasks-per-node=64, (threads-per-core=2) &lt;br /&gt;
|}&lt;br /&gt;
Table 1: Regular Queues&lt;br /&gt;
&lt;br /&gt;
== Development Queues ==&lt;br /&gt;
Only for development, i.e. debugging or performance optimization ...&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
! style=&amp;quot;width:5%&amp;quot;| Queue&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Node Type&lt;br /&gt;
! style=&amp;quot;width:23%&amp;quot;| Default Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Minimal Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Maximum Resources&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_cpu_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Ice Lake&lt;br /&gt;
| mem-per-cpu=2000mb&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=8, mem=249600mb, ntasks-per-node=64, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_cpu&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Standard&lt;br /&gt;
| mem-per-cpu=2000mb&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=380000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_gpu_h100&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;NVIDIA GPU x4&lt;br /&gt;
| mem-per-gpu=193300mb&amp;lt;br/&amp;gt;cpus-per-gpu=24&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=760000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_gpu_a100_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;NVIDIA GPU x4&amp;lt;br/&amp;gt;&lt;br /&gt;
| mem-per-gpu=127500mb&amp;lt;br/&amp;gt;cpus-per-gpu=16 &lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=510000mb, ntasks-per-node=64, (threads-per-core=2) &lt;br /&gt;
|}&lt;br /&gt;
Table 2: Development Queues&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Default resources of a queue class define number of tasks and memory if not explicitly given with sbatch command. Resource list acronyms &#039;&#039;--time&#039;&#039;, &#039;&#039;--ntasks&#039;&#039;, &#039;&#039;--nodes&#039;&#039;, &#039;&#039;--mem&#039;&#039; and &#039;&#039;--mem-per-cpu&#039;&#039; are described [[BwUniCluster3.0/Running_Jobs/Slurm|here]].&lt;br /&gt;
&lt;br /&gt;
== Check available resources: sinfo_t_idle ==&lt;br /&gt;
The Slurm command sinfo is used to view partition and node information for a system running Slurm. It incorporates down time, reservations, and node state information in determining the available backfill window. The sinfo command can only be used by the administrator.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
SCC has prepared a special script (sinfo_t_idle) to find out how many processors are available for immediate use on the system. It is anticipated that users will use this information to submit jobs that meet these criteria and thus obtain quick job turnaround times. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The following command displays what resources are available for immediate use for the whole partition.&lt;br /&gt;
&amp;lt;pre&amp;gt;$ sinfo_t_idle&lt;br /&gt;
Partition dev_cpu                 :      2 nodes idle&lt;br /&gt;
Partition cpu                     :     68 nodes idle&lt;br /&gt;
Partition highmem                 :      4 nodes idle&lt;br /&gt;
Partition dev_gpu_h100            :      0 nodes idle&lt;br /&gt;
Partition gpu_h100                :     11 nodes idle&lt;br /&gt;
Partition gpu_mi300               :      1 nodes idle&lt;br /&gt;
Partition dev_cpu_il              :      0 nodes idle&lt;br /&gt;
Partition cpu_il                  :      0 nodes idle&lt;br /&gt;
Partition dev_gpu_a100_il         :      0 nodes idle&lt;br /&gt;
Partition gpu_a100_il             :      0 nodes idle&lt;br /&gt;
Partition gpu_h100_il             :      0 nodes idle&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Running Jobs =&lt;br /&gt;
&lt;br /&gt;
== Slurm Commands (excerpt) ==&lt;br /&gt;
Important Slurm commands for non-administrators working on bwUniCluster 3.0.&lt;br /&gt;
{| width=850px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Slurm commands !! Brief explanation&lt;br /&gt;
|-&lt;br /&gt;
| [[#Batch Jobs: sbatch|sbatch]] || Submits a job and puts it into the queue [[https://slurm.schedmd.com/sbatch.html sbatch]] &lt;br /&gt;
|-&lt;br /&gt;
| [[#Interactive Jobs: salloc|salloc]] || Requests resources for an interactive Job [[https://slurm.schedmd.com/salloc.html salloc]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Monitor and manage jobs |scontrol show job]] || Displays detailed job state information [[https://slurm.schedmd.com/scontrol.html scontrol]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#List of your submitted jobs : squeue|squeue]] || Displays information about active, eligible, blocked, and/or recently completed jobs [[https://slurm.schedmd.com/squeue.html squeue]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#List of your submitted jobs : squeue|squeue --start]] || Returns start time of submitted job [[https://slurm.schedmd.com/squeue.html squeue]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Check available resources: sinfo_t_idle|sinfo_t_idle]] || Shows what resources are available for immediate use [[https://slurm.schedmd.com/sinfo.html sinfo]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Canceling own jobs : scancel|scancel]] || Cancels a job [[https://slurm.schedmd.com/scancel.html scancel]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* [https://slurm.schedmd.com/tutorials.html  Slurm Tutorials]&lt;br /&gt;
* [https://slurm.schedmd.com/pdfs/summary.pdf  Slurm command/option summary (2 pages)]&lt;br /&gt;
* [https://slurm.schedmd.com/man_index.html  Slurm Commands]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Batch Jobs: sbatch ==&lt;br /&gt;
&lt;br /&gt;
Batch jobs are submitted by using the command &#039;&#039;&#039;sbatch&#039;&#039;&#039;. The main purpose of the &#039;&#039;&#039;sbatch&#039;&#039;&#039; command is to specify the resources that are needed to run the job. &#039;&#039;&#039;sbatch&#039;&#039;&#039; will then queue the batch job. However, starting of batch job depends on the availability of the requested resources and the fair sharing value.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The syntax and use of &#039;&#039;&#039;sbatch&#039;&#039;&#039; can be displayed via:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ man sbatch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;sbatch&#039;&#039;&#039; options can be used from the command line or in your job script. Different defaults for some of these options are set based on the queue and can be found [[BwUniCluster3.0/Slurm | here]]&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | sbatch Options&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width:8%&amp;quot;| Command line&lt;br /&gt;
! style=&amp;quot;width:9%&amp;quot;| Script&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Purpose&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -t, --time=&#039;&#039;time&#039;&#039;&lt;br /&gt;
| #SBATCH --time=&#039;&#039;time&#039;&#039;&lt;br /&gt;
| Wall clock time limit.&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -N, --nodes=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --nodes=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of nodes to be used.&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -n, --ntasks=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --ntasks=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of tasks to be launched.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --ntasks-per-node=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --ntasks-per-node=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Maximum count of tasks per node.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -c, --cpus-per-task=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --cpus-per-task=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of CPUs required per (MPI-)task.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mem=&#039;&#039;value_in_MB&#039;&#039;&lt;br /&gt;
| #SBATCH --mem=&#039;&#039;value_in_MB&#039;&#039; &lt;br /&gt;
| Memory in MegaByte per node. (You should omit the setting of this option.)&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mem-per-cpu=&#039;&#039;value_in_MB&#039;&#039;&lt;br /&gt;
| #SBATCH --mem-per-cpu=&#039;&#039;value_in_MB&#039;&#039; &lt;br /&gt;
| Minimum Memory required per allocated CPU. (You should omit the setting of this option.)&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mail-type=&#039;&#039;type&#039;&#039;&lt;br /&gt;
| #SBATCH --mail-type=&#039;&#039;type&#039;&#039;&lt;br /&gt;
| Notify user by email when certain event types occur.&amp;lt;br&amp;gt;Valid type values are NONE, BEGIN, END, FAIL, REQUEUE, ALL.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mail-user=&#039;&#039;mail-address&#039;&#039;&lt;br /&gt;
| #SBATCH --mail-user=&#039;&#039;mail-address&#039;&#039;&lt;br /&gt;
|  The specified mail-address receives email notification of state changes as defined by --mail-type.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --output=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --output=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| File in which job output is stored. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --error=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --error=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| File in which job error messages are stored. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -J, --job-name=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --job-name=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| Job name.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --export=[ALL,] &#039;&#039;env-variables&#039;&#039;&lt;br /&gt;
| #SBATCH --export=[ALL,] &#039;&#039;env-variables&#039;&#039;&lt;br /&gt;
| Identifies which environment variables from the submission environment are propagated to the launched application. Default is ALL.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -A, --account=&#039;&#039;group-name&#039;&#039;&lt;br /&gt;
| #SBATCH --account=&#039;&#039;group-name&#039;&#039;&lt;br /&gt;
| Change resources used by this job to specified group. You may need this option if your account is assigned to more than one group. By command &amp;quot;scontrol show job&amp;quot; the project group the job is accounted on can be seen behind &amp;quot;Account=&amp;quot;. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -p, --partition=&#039;&#039;queue-name&#039;&#039;&lt;br /&gt;
| #SBATCH --partition=&#039;&#039;queue-name&#039;&#039;&lt;br /&gt;
| Request a specific queue for the resource allocation.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --reservation=&#039;&#039;reservation-name&#039;&#039;&lt;br /&gt;
| #SBATCH --reservation=&#039;&#039;reservation-name&#039;&#039;&lt;br /&gt;
| Use a specific reservation for the resource allocation.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -C, --constraint=&#039;&#039;LSDF&#039;&#039;&lt;br /&gt;
| #SBATCH --constraint=LSDF&lt;br /&gt;
| Job constraint LSDF filesystems.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -C, --constraint=&#039;&#039;BEEOND (BEEOND_4MDS, BEEOND_MAXMDS)&#039;&#039;&lt;br /&gt;
| #SBATCH --constraint=BEEOND (BEEOND_4MDS, BEEOND_MAXMDS)&lt;br /&gt;
| Job constraint BeeOND filesystem.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Interactive Jobs: salloc ==&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 3.0 you are only allowed to run short jobs (&amp;lt;&amp;lt; 1 hour) with little memory requirements (&amp;lt;&amp;lt; 8 GByte) on the logins nodes. If you want to run longer jobs and/or jobs with a request of more than 8 GByte of memory, you must allocate resources for so-called interactive jobs by usage of the command salloc on a login node. Considering a serial application running on a compute node that requires 5000 MByte of memory and limiting the interactive run to 2 hours the following command has to be executed:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ salloc -p cpu -n 1 -t 120 --mem=5000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then you will get one core on a compute node within the partition &amp;quot;cpu&amp;quot;. After execution of this command &#039;&#039;&#039;DO NOT CLOSE&#039;&#039;&#039; your current terminal session but wait until the queueing system Slurm has granted you the requested resources on the compute system. You will be logged in automatically on the granted core! To run a serial program on the granted core you only have to type the name of the executable.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./&amp;lt;my_serial_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please be aware that your serial job must run less than 2 hours in this example, else the job will be killed during runtime by the system. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can also start now a graphical X11-terminal connecting you to the dedicated resource that is available for 2 hours. You can start it by the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ xterm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that, once the walltime limit has been reached the resources - i.e. the compute node - will automatically be revoked.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
An interactive parallel application running on one compute node or on many compute nodes (e.g. here 5 nodes) with 96 cores each requires usually an amount of memory in GByte (e.g. 50 GByte) and a maximum time (e.g. 1 hour). E.g. 5 nodes can be allocated by the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ salloc -p cpu -N 5 --ntasks-per-node=96 -t 01:00:00  --mem=50gb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you can run parallel jobs on 480 cores requiring 50 GByte of memory per node. Please be aware that you will be logged in on core 0 of the first node.&lt;br /&gt;
If you want to have access to another node you have to open a new terminal, connect it also to bwUniCluster 3.0 and type the following commands to&lt;br /&gt;
connect to the running interactive job and then to a specific node:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ srun --jobid=XXXXXXXX --pty /bin/bash&lt;br /&gt;
$ srun --nodelist=uc3nXXX --pty /bin/bash&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ squeue&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the jobid and the nodelist can be shown.&lt;br /&gt;
&lt;br /&gt;
If you want to run MPI-programs, you can do it by simply typing mpirun &amp;lt;program_name&amp;gt;. Then your program will be run on 480 cores. A very simple example for starting a parallel job can be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mpirun &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also start the debugger ddt by the commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module add devel/ddt&lt;br /&gt;
$ ddt &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above commands will execute the parallel program &amp;lt;my_mpi_program&amp;gt; on all available cores. You can also start parallel programs on a subset of cores; an example for this can be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mpirun -n 50 &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are using Intel MPI you must start &amp;lt;my_mpi_program&amp;gt; by the command mpiexec.hydra (instead of mpirun).&lt;br /&gt;
&lt;br /&gt;
== Interactive Computing with Jupyter ==&lt;br /&gt;
&lt;br /&gt;
== Monitor and manage jobs ==&lt;br /&gt;
&lt;br /&gt;
=== List of your submitted jobs : squeue ===&lt;br /&gt;
Displays information about YOUR active, pending and/or recently completed jobs. The command displays all own active and pending jobs. The command squeue is explained in detail on the webpage https://slurm.schedmd.com/squeue.html or via manpage (man squeue).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;squeue&#039;&#039; example on bwUniCluster 3.0 &amp;lt;small&amp;gt;(Only your own jobs are displayed!)&amp;lt;/small&amp;gt;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ squeue &lt;br /&gt;
             JOBID PARTITION     NAME     USER ST       TIME  NODES NODELIST(REASON)&lt;br /&gt;
              1262       cpu     wrap ka_ab123  R       8:15      1 uc3n002&lt;br /&gt;
              1267 dev_gpu_h     wrap ka_ab123 PD       0:00      1 (Resources)&lt;br /&gt;
              1265   highmem     wrap ka_ab123  R       2:41      1 uc3n084&lt;br /&gt;
$ squeue -l&lt;br /&gt;
             JOBID PARTITION     NAME     USER    STATE       TIME TIME_LIMI  NODES NODELIST(REASON)&lt;br /&gt;
              1262       cpu     wrap ka_ab123  RUNNING       8:55     20:00      1 uc3n002&lt;br /&gt;
              1267 dev_gpu_h     wrap ka_ab123  PENDING       0:00     20:00      1 (Resources)&lt;br /&gt;
              1265   highmem     wrap ka_ab123  RUNNING       3:21     20:00      1 uc3n084&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Detailed job information : scontrol show job ===&lt;br /&gt;
scontrol show job displays detailed job state information and diagnostic output for all or a specified job of yours. Detailed information is available for active, pending and recently completed jobs. The command scontrol is explained in detail on the webpage https://slurm.schedmd.com/scontrol.html or via manpage (man scontrol). &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Display the state of all your jobs in normal mode: scontrol show job&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Display the state of a job with &amp;lt;jobid&amp;gt; in normal mode: scontrol show job &amp;lt;jobid&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Here is an example from bwUniCluster 3.0.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ squeue&lt;br /&gt;
JOBID PARTITION     NAME     USER ST       TIME  NODES NODELIST(REASON)&lt;br /&gt;
1262       cpu     wrap ka_zs040  R       1:12      1 uc3n002&lt;br /&gt;
&lt;br /&gt;
$&lt;br /&gt;
$ # now, see what&#039;s up with my pending job with jobid 1262&lt;br /&gt;
$ &lt;br /&gt;
$ scontrol show job 1262&lt;br /&gt;
&lt;br /&gt;
JobId=1262 JobName=wrap&lt;br /&gt;
   UserId=ka_zs0402(241992) GroupId=ka_scc(12345) MCS_label=N/A&lt;br /&gt;
   Priority=4246 Nice=0 Account=ka QOS=normal&lt;br /&gt;
   JobState=RUNNING Reason=None Dependency=(null)&lt;br /&gt;
   Requeue=1 Restarts=0 BatchFlag=1 Reboot=0 ExitCode=0:0&lt;br /&gt;
   RunTime=00:00:37 TimeLimit=00:20:00 TimeMin=N/A&lt;br /&gt;
   SubmitTime=2025-04-04T10:01:30 EligibleTime=2025-04-04T10:01:30&lt;br /&gt;
   AccrueTime=2025-04-04T10:01:30&lt;br /&gt;
   StartTime=2025-04-04T10:01:31 EndTime=2025-04-04T10:21:31 Deadline=N/A&lt;br /&gt;
   SuspendTime=None SecsPreSuspend=0 LastSchedEval=2025-04-04T10:01:31 Scheduler=Main&lt;br /&gt;
   Partition=cpu AllocNode:Sid=uc3n999:2819841&lt;br /&gt;
   ReqNodeList=(null) ExcNodeList=(null)&lt;br /&gt;
   NodeList=uc3n002&lt;br /&gt;
   BatchHost=uc3n002&lt;br /&gt;
   NumNodes=1 NumCPUs=2 NumTasks=1 CPUs/Task=1 ReqB:S:C:T=0:0:*:*&lt;br /&gt;
   ReqTRES=cpu=1,mem=2000M,node=1,billing=1&lt;br /&gt;
   AllocTRES=cpu=2,mem=4000M,node=1,billing=2&lt;br /&gt;
   Socks/Node=* NtasksPerN:B:S:C=0:0:*:1 CoreSpec=*&lt;br /&gt;
   MinCPUsNode=1 MinMemoryCPU=2000M MinTmpDiskNode=0&lt;br /&gt;
   Features=(null) DelayBoot=00:00:00&lt;br /&gt;
   OverSubscribe=OK Contiguous=0 Licenses=(null) Network=(null)&lt;br /&gt;
   Command=(null)&lt;br /&gt;
   WorkDir=/pfs/data6/home/ka/ka_scc/ka_zs0402&lt;br /&gt;
   StdErr=/pfs/data6/home/ka/ka_scc/ka_zs0402/slurm-1262.out&lt;br /&gt;
   StdIn=/dev/null&lt;br /&gt;
   StdOut=/pfs/data6/home/ka/ka_scc/ka_zs0402/slurm-1262.out&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=== Canceling own jobs : scancel ===&lt;br /&gt;
The scancel command is used to cancel jobs. The command scancel is explained in detail on the webpage https://slurm.schedmd.com/scancel.html or via manpage (man scancel). The command is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ scancel [-i] &amp;lt;job-id&amp;gt;&lt;br /&gt;
$ scancel -t &amp;lt;job_state_name&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Slurm Options =&lt;br /&gt;
[[BwUniCluster3.0/Running_Jobs/Slurm | Detailed Slurm usage]]&lt;br /&gt;
&lt;br /&gt;
= Best Practices =&lt;br /&gt;
&lt;br /&gt;
== Step-by-Step example==&lt;br /&gt;
&lt;br /&gt;
== Dos and Don&#039;ts ==&lt;/div&gt;</summary>
		<author><name>P Schuhmacher</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster3.0/Running_Jobs&amp;diff=14701</id>
		<title>BwUniCluster3.0/Running Jobs</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster3.0/Running_Jobs&amp;diff=14701"/>
		<updated>2025-04-08T10:52:17Z</updated>

		<summary type="html">&lt;p&gt;P Schuhmacher: /* Regular Queues */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
= Purpose and function of a queuing system =&lt;br /&gt;
&lt;br /&gt;
All compute activities on bwUniCluster 3.0 have to be performed on the compute nodes. Compute nodes are only available by requesting the corresponding resources via the queuing system. As soon as the requested resources are available, automated tasks are executed via a batch script or they can be accessed interactively.&amp;lt;br&amp;gt;&lt;br /&gt;
General procedure: Hint to [[Running_Calculations | Running Calculations]]&lt;br /&gt;
&lt;br /&gt;
== Job submission process ==&lt;br /&gt;
&lt;br /&gt;
bwUniCluster 3.0 has installed the workload managing software Slurm. Therefore any job submission by the user is to be executed by commands of the Slurm software. Slurm queues and runs user jobs based on fair sharing policies.&lt;br /&gt;
&lt;br /&gt;
== Slurm ==&lt;br /&gt;
&lt;br /&gt;
HPC Workload Manager on bwUniCluster 3.0 is Slurm.&lt;br /&gt;
Slurm is a cluster management and job scheduling system. Slurm has three key functions. &lt;br /&gt;
* It allocates access to resources (compute cores on nodes) to users for some duration of time so they can perform work. &lt;br /&gt;
* It provides a framework for starting, executing, and monitoring work (normally a parallel job) on the set of allocated nodes. &lt;br /&gt;
* It arbitrates contention for resources by managing a queue of pending work.&lt;br /&gt;
&lt;br /&gt;
Any kind of calculation on the compute nodes of bwUniCluster 3.0 requires the user to define calculations as a sequence of commands together with required run time, number of CPU cores and main memory and submit all, i.e., the &#039;&#039;&#039;batch job&#039;&#039;&#039;, to a resource and workload managing software.&lt;br /&gt;
&lt;br /&gt;
== Terms and definitions ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Partitions &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Slurm manages job queues for different &#039;&#039;&#039;partitions&#039;&#039;&#039;. Partitions are used to group similar node types (e.g. nodes with and without accelerators) and to enforce different access policies and resource limits.&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 3.0 there are different partitions:&lt;br /&gt;
&lt;br /&gt;
* CPU-only nodes&lt;br /&gt;
** 2-socket nodes, consisting of 2 Intel Ice Lake processors with 32 cores each or 2 AMD processors with 48 cores each&lt;br /&gt;
** 2-socket nodes with very high RAM capacity, consisting of 2 AMD processors with 48 cores each&lt;br /&gt;
* GPU-accelerated nodes&lt;br /&gt;
** 2-socket nodes with 4x NVIDIA A100 or 4x NVIDIA H100 GPUs&lt;br /&gt;
** 4-socket node with 4x AMD Instinct accelerator&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Queues &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Job &#039;&#039;&#039;queues&#039;&#039;&#039; are used to manage jobs that request access to shared but limited computing resources of a certain kind (partition).&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 3.0 there are different main types of queues:&lt;br /&gt;
* Regular queues&lt;br /&gt;
** cpu: Jobs that request CPU-only nodes.&lt;br /&gt;
** gpu: Jobs that request GPU-accelerated nodes.&lt;br /&gt;
* Development queues (dev)&lt;br /&gt;
** Short, usually interactive jobs that are used for developing, compiling and testing code and workflows. The intention behind development queues is to provide users with immediate access to computer resources without having to wait. This is the place to realize instantaneous heavy compute without affecting other users, as would be the case on the login nodes.&lt;br /&gt;
&lt;br /&gt;
Requested compute resources such as (wall-)time, number of nodes and amount of memory are restricted and must fit into the boundaries imposed by the queues. The request for compute resources on the bwUniCluster 3.0 &amp;lt;font color=red&amp;gt;requires at least the specification of the &#039;&#039;&#039;queue&#039;&#039;&#039; and the &#039;&#039;&#039;time&#039;&#039;&#039;&amp;lt;/font&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Jobs &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Jobs can be run non-interactively as &#039;&#039;&#039;batch jobs&#039;&#039;&#039; or as &#039;&#039;&#039;interactive jobs&#039;&#039;&#039;.&amp;lt;br&amp;gt;&lt;br /&gt;
Submitting a batch job means, that all steps of a compute project are defined in a Bash script. This Bash script is queued and executed as soon as the compute resources are available and allocated. Jobs are enqueued with the &amp;lt;code&amp;gt;sbatch&amp;lt;/code&amp;gt; command.&lt;br /&gt;
For interactive jobs, the resources are requested with the &amp;lt;code&amp;gt;salloc&amp;lt;/code&amp;gt; command. As soon as the computing resources are available and allocated, a command line prompt is returned on a computing node and the user can freely dispose of the resources now available to him.&lt;br /&gt;
{|style=&amp;quot;background:#deffee; width:100%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;padding:5px; background:#cef2e0; text-align:left&amp;quot;|&lt;br /&gt;
[[Image:Attention.svg|center|25px]]&lt;br /&gt;
|style=&amp;quot;padding:5px; background:#cef2e0; text-align:left&amp;quot;|&lt;br /&gt;
&#039;&#039;&#039;Please remember:&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Heavy computations are not allowed on the login nodes&#039;&#039;&#039;.&amp;lt;br&amp;gt;Use a developement or a regular job queue instead! Please refer to [[BwUniCluster3.0/Login#Allowed_Activities_on_Login_Nodes|Allowed Activities on Login Nodes]].&lt;br /&gt;
* &#039;&#039;&#039;Development queues&#039;&#039;&#039; are meant for &#039;&#039;&#039;development tasks&#039;&#039;&#039;.&amp;lt;br&amp;gt;Do not misuse this queue for regular, short-running jobs or chain jobs! Only one running job at a time is enabled. Maximum queue length is reduced to 3.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Queues on bwUniCluster 3.0 = &lt;br /&gt;
== Policy ==&lt;br /&gt;
&lt;br /&gt;
The computing time is provided in accordance with the &#039;&#039;&#039;fair share policy&#039;&#039;&#039;. The individual investment shares of the respective university and the resources already used by its members are taken into account. Furthermore, the following throttling policy is also active: The &#039;&#039;&#039;maximum amount of cores&#039;&#039;&#039; used at any given time from jobs running is &#039;&#039;&#039;1920 per user&#039;&#039;&#039; (aggregated over all running jobs). This number corresponds to 30 nodes on the Ice Lake partition or 20 nodes on the standard partition. The aim is to minimize waiting times and maximize the number of users who can access computing time at the same time.&lt;br /&gt;
&lt;br /&gt;
== Regular Queues ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
! style=&amp;quot;width:5%&amp;quot;| Queue&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Node-Type&lt;br /&gt;
! style=&amp;quot;width:23%&amp;quot;| Default Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Minimal Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Maximum Resources&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;cpu_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Ice Lake&lt;br /&gt;
| mem-per-cpu=2000mb&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=30, mem=249600mb, ntasks-per-node=64, (threads-per-core=2) &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;cpu&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Standard&lt;br /&gt;
| mem-per-cpu=2000mb&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=20, mem=380000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;highmem&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;High Memory&lt;br /&gt;
| mem-per-cpu=12090mb&lt;br /&gt;
| mem=380001mb&lt;br /&gt;
| time=72:00:00, nodes=4, mem=2300000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;gpu_h100&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;NVIDIA GPU x4&lt;br /&gt;
| mem-per-gpu=193300mb&amp;lt;br/&amp;gt;cpus-per-gpu=24&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=12, mem=760000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;gpu_mi300&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU node&amp;lt;br/&amp;gt;AMD GPU x4&lt;br /&gt;
| mem-per-gpu=128200mb&amp;lt;br/&amp;gt;cpus-per-gpu=24&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=1, mem=510000mb, ntasks-per-node=40, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;gpu_a100_il&amp;lt;/code&amp;gt;/&amp;lt;code&amp;gt;gpu_h100_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;Ice Lake&amp;lt;br/&amp;gt;NVIDIA GPU x4&lt;br /&gt;
| mem-per-gpu=127500mb&amp;lt;br/&amp;gt;cpus-per-gpu=16&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=9, mem=510000mb, ntasks-per-node=64, (threads-per-core=2) &lt;br /&gt;
|}&lt;br /&gt;
Table 1: Regular Queues&lt;br /&gt;
&lt;br /&gt;
== Development Queues ==&lt;br /&gt;
Only for development, i.e. debugging or performance optimization ...&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
! style=&amp;quot;width:5%&amp;quot;| Queue&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Node Type&lt;br /&gt;
! style=&amp;quot;width:23%&amp;quot;| Default Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Minimal Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Maximum Resources&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_cpu_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Ice Lake&lt;br /&gt;
| mem-per-cpu=1950mb&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=8, mem=249600mb, ntasks-per-node=64, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_cpu&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Standard&lt;br /&gt;
| mem-per-cpu=1125mb&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=380000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_gpu_h100&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;NVIDIA GPU x4&lt;br /&gt;
| mem-per-cpu=1125mb&amp;lt;br/&amp;gt;cpus-per-gpu=24&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=760000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_gpu_a100_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;NVIDIA GPU x4&amp;lt;br/&amp;gt;&lt;br /&gt;
| mem-per-gpu=127500mb&amp;lt;br/&amp;gt;cpus-per-gpu=16 &lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=510000mb, ntasks-per-node=64, (threads-per-core=2) &lt;br /&gt;
|}&lt;br /&gt;
Table 2: Development Queues&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Default resources of a queue class define number of tasks and memory if not explicitly given with sbatch command. Resource list acronyms &#039;&#039;--time&#039;&#039;, &#039;&#039;--ntasks&#039;&#039;, &#039;&#039;--nodes&#039;&#039;, &#039;&#039;--mem&#039;&#039; and &#039;&#039;--mem-per-cpu&#039;&#039; are described [[BwUniCluster3.0/Running_Jobs/Slurm|here]].&lt;br /&gt;
&lt;br /&gt;
== Check available resources: sinfo_t_idle ==&lt;br /&gt;
The Slurm command sinfo is used to view partition and node information for a system running Slurm. It incorporates down time, reservations, and node state information in determining the available backfill window. The sinfo command can only be used by the administrator.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
SCC has prepared a special script (sinfo_t_idle) to find out how many processors are available for immediate use on the system. It is anticipated that users will use this information to submit jobs that meet these criteria and thus obtain quick job turnaround times. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The following command displays what resources are available for immediate use for the whole partition.&lt;br /&gt;
&amp;lt;pre&amp;gt;$ sinfo_t_idle&lt;br /&gt;
Partition dev_cpu                 :      2 nodes idle&lt;br /&gt;
Partition cpu                     :     68 nodes idle&lt;br /&gt;
Partition highmem                 :      4 nodes idle&lt;br /&gt;
Partition dev_gpu_h100            :      0 nodes idle&lt;br /&gt;
Partition gpu_h100                :     11 nodes idle&lt;br /&gt;
Partition gpu_mi300               :      1 nodes idle&lt;br /&gt;
Partition dev_cpu_il              :      0 nodes idle&lt;br /&gt;
Partition cpu_il                  :      0 nodes idle&lt;br /&gt;
Partition dev_gpu_a100_il         :      0 nodes idle&lt;br /&gt;
Partition gpu_a100_il             :      0 nodes idle&lt;br /&gt;
Partition gpu_h100_il             :      0 nodes idle&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Running Jobs =&lt;br /&gt;
&lt;br /&gt;
== Slurm Commands (excerpt) ==&lt;br /&gt;
Important Slurm commands for non-administrators working on bwUniCluster 3.0.&lt;br /&gt;
{| width=850px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Slurm commands !! Brief explanation&lt;br /&gt;
|-&lt;br /&gt;
| [[#Batch Jobs: sbatch|sbatch]] || Submits a job and puts it into the queue [[https://slurm.schedmd.com/sbatch.html sbatch]] &lt;br /&gt;
|-&lt;br /&gt;
| [[#Interactive Jobs: salloc|salloc]] || Requests resources for an interactive Job [[https://slurm.schedmd.com/salloc.html salloc]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Monitor and manage jobs |scontrol show job]] || Displays detailed job state information [[https://slurm.schedmd.com/scontrol.html scontrol]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#List of your submitted jobs : squeue|squeue]] || Displays information about active, eligible, blocked, and/or recently completed jobs [[https://slurm.schedmd.com/squeue.html squeue]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#List of your submitted jobs : squeue|squeue --start]] || Returns start time of submitted job [[https://slurm.schedmd.com/squeue.html squeue]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Check available resources: sinfo_t_idle|sinfo_t_idle]] || Shows what resources are available for immediate use [[https://slurm.schedmd.com/sinfo.html sinfo]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Canceling own jobs : scancel|scancel]] || Cancels a job [[https://slurm.schedmd.com/scancel.html scancel]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* [https://slurm.schedmd.com/tutorials.html  Slurm Tutorials]&lt;br /&gt;
* [https://slurm.schedmd.com/pdfs/summary.pdf  Slurm command/option summary (2 pages)]&lt;br /&gt;
* [https://slurm.schedmd.com/man_index.html  Slurm Commands]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Batch Jobs: sbatch ==&lt;br /&gt;
&lt;br /&gt;
Batch jobs are submitted by using the command &#039;&#039;&#039;sbatch&#039;&#039;&#039;. The main purpose of the &#039;&#039;&#039;sbatch&#039;&#039;&#039; command is to specify the resources that are needed to run the job. &#039;&#039;&#039;sbatch&#039;&#039;&#039; will then queue the batch job. However, starting of batch job depends on the availability of the requested resources and the fair sharing value.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The syntax and use of &#039;&#039;&#039;sbatch&#039;&#039;&#039; can be displayed via:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ man sbatch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;sbatch&#039;&#039;&#039; options can be used from the command line or in your job script. Different defaults for some of these options are set based on the queue and can be found [[BwUniCluster3.0/Slurm | here]]&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | sbatch Options&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width:8%&amp;quot;| Command line&lt;br /&gt;
! style=&amp;quot;width:9%&amp;quot;| Script&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Purpose&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -t, --time=&#039;&#039;time&#039;&#039;&lt;br /&gt;
| #SBATCH --time=&#039;&#039;time&#039;&#039;&lt;br /&gt;
| Wall clock time limit.&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -N, --nodes=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --nodes=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of nodes to be used.&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -n, --ntasks=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --ntasks=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of tasks to be launched.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --ntasks-per-node=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --ntasks-per-node=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Maximum count of tasks per node.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -c, --cpus-per-task=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --cpus-per-task=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of CPUs required per (MPI-)task.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mem=&#039;&#039;value_in_MB&#039;&#039;&lt;br /&gt;
| #SBATCH --mem=&#039;&#039;value_in_MB&#039;&#039; &lt;br /&gt;
| Memory in MegaByte per node. (You should omit the setting of this option.)&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mem-per-cpu=&#039;&#039;value_in_MB&#039;&#039;&lt;br /&gt;
| #SBATCH --mem-per-cpu=&#039;&#039;value_in_MB&#039;&#039; &lt;br /&gt;
| Minimum Memory required per allocated CPU. (You should omit the setting of this option.)&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mail-type=&#039;&#039;type&#039;&#039;&lt;br /&gt;
| #SBATCH --mail-type=&#039;&#039;type&#039;&#039;&lt;br /&gt;
| Notify user by email when certain event types occur.&amp;lt;br&amp;gt;Valid type values are NONE, BEGIN, END, FAIL, REQUEUE, ALL.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mail-user=&#039;&#039;mail-address&#039;&#039;&lt;br /&gt;
| #SBATCH --mail-user=&#039;&#039;mail-address&#039;&#039;&lt;br /&gt;
|  The specified mail-address receives email notification of state changes as defined by --mail-type.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --output=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --output=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| File in which job output is stored. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --error=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --error=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| File in which job error messages are stored. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -J, --job-name=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --job-name=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| Job name.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --export=[ALL,] &#039;&#039;env-variables&#039;&#039;&lt;br /&gt;
| #SBATCH --export=[ALL,] &#039;&#039;env-variables&#039;&#039;&lt;br /&gt;
| Identifies which environment variables from the submission environment are propagated to the launched application. Default is ALL.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -A, --account=&#039;&#039;group-name&#039;&#039;&lt;br /&gt;
| #SBATCH --account=&#039;&#039;group-name&#039;&#039;&lt;br /&gt;
| Change resources used by this job to specified group. You may need this option if your account is assigned to more than one group. By command &amp;quot;scontrol show job&amp;quot; the project group the job is accounted on can be seen behind &amp;quot;Account=&amp;quot;. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -p, --partition=&#039;&#039;queue-name&#039;&#039;&lt;br /&gt;
| #SBATCH --partition=&#039;&#039;queue-name&#039;&#039;&lt;br /&gt;
| Request a specific queue for the resource allocation.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --reservation=&#039;&#039;reservation-name&#039;&#039;&lt;br /&gt;
| #SBATCH --reservation=&#039;&#039;reservation-name&#039;&#039;&lt;br /&gt;
| Use a specific reservation for the resource allocation.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -C, --constraint=&#039;&#039;LSDF&#039;&#039;&lt;br /&gt;
| #SBATCH --constraint=LSDF&lt;br /&gt;
| Job constraint LSDF filesystems.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -C, --constraint=&#039;&#039;BEEOND (BEEOND_4MDS, BEEOND_MAXMDS)&#039;&#039;&lt;br /&gt;
| #SBATCH --constraint=BEEOND (BEEOND_4MDS, BEEOND_MAXMDS)&lt;br /&gt;
| Job constraint BeeOND filesystem.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Interactive Jobs: salloc ==&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 3.0 you are only allowed to run short jobs (&amp;lt;&amp;lt; 1 hour) with little memory requirements (&amp;lt;&amp;lt; 8 GByte) on the logins nodes. If you want to run longer jobs and/or jobs with a request of more than 8 GByte of memory, you must allocate resources for so-called interactive jobs by usage of the command salloc on a login node. Considering a serial application running on a compute node that requires 5000 MByte of memory and limiting the interactive run to 2 hours the following command has to be executed:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ salloc -p cpu -n 1 -t 120 --mem=5000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then you will get one core on a compute node within the partition &amp;quot;cpu&amp;quot;. After execution of this command &#039;&#039;&#039;DO NOT CLOSE&#039;&#039;&#039; your current terminal session but wait until the queueing system Slurm has granted you the requested resources on the compute system. You will be logged in automatically on the granted core! To run a serial program on the granted core you only have to type the name of the executable.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./&amp;lt;my_serial_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please be aware that your serial job must run less than 2 hours in this example, else the job will be killed during runtime by the system. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can also start now a graphical X11-terminal connecting you to the dedicated resource that is available for 2 hours. You can start it by the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ xterm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that, once the walltime limit has been reached the resources - i.e. the compute node - will automatically be revoked.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
An interactive parallel application running on one compute node or on many compute nodes (e.g. here 5 nodes) with 96 cores each requires usually an amount of memory in GByte (e.g. 50 GByte) and a maximum time (e.g. 1 hour). E.g. 5 nodes can be allocated by the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ salloc -p cpu -N 5 --ntasks-per-node=96 -t 01:00:00  --mem=50gb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you can run parallel jobs on 480 cores requiring 50 GByte of memory per node. Please be aware that you will be logged in on core 0 of the first node.&lt;br /&gt;
If you want to have access to another node you have to open a new terminal, connect it also to bwUniCluster 3.0 and type the following commands to&lt;br /&gt;
connect to the running interactive job and then to a specific node:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ srun --jobid=XXXXXXXX --pty /bin/bash&lt;br /&gt;
$ srun --nodelist=uc3nXXX --pty /bin/bash&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ squeue&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the jobid and the nodelist can be shown.&lt;br /&gt;
&lt;br /&gt;
If you want to run MPI-programs, you can do it by simply typing mpirun &amp;lt;program_name&amp;gt;. Then your program will be run on 480 cores. A very simple example for starting a parallel job can be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mpirun &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also start the debugger ddt by the commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module add devel/ddt&lt;br /&gt;
$ ddt &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above commands will execute the parallel program &amp;lt;my_mpi_program&amp;gt; on all available cores. You can also start parallel programs on a subset of cores; an example for this can be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mpirun -n 50 &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are using Intel MPI you must start &amp;lt;my_mpi_program&amp;gt; by the command mpiexec.hydra (instead of mpirun).&lt;br /&gt;
&lt;br /&gt;
== Interactive Computing with Jupyter ==&lt;br /&gt;
&lt;br /&gt;
== Monitor and manage jobs ==&lt;br /&gt;
&lt;br /&gt;
=== List of your submitted jobs : squeue ===&lt;br /&gt;
Displays information about YOUR active, pending and/or recently completed jobs. The command displays all own active and pending jobs. The command squeue is explained in detail on the webpage https://slurm.schedmd.com/squeue.html or via manpage (man squeue).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;squeue&#039;&#039; example on bwUniCluster 3.0 &amp;lt;small&amp;gt;(Only your own jobs are displayed!)&amp;lt;/small&amp;gt;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ squeue &lt;br /&gt;
             JOBID PARTITION     NAME     USER ST       TIME  NODES NODELIST(REASON)&lt;br /&gt;
              1262       cpu     wrap ka_ab123  R       8:15      1 uc3n002&lt;br /&gt;
              1267 dev_gpu_h     wrap ka_ab123 PD       0:00      1 (Resources)&lt;br /&gt;
              1265   highmem     wrap ka_ab123  R       2:41      1 uc3n084&lt;br /&gt;
$ squeue -l&lt;br /&gt;
             JOBID PARTITION     NAME     USER    STATE       TIME TIME_LIMI  NODES NODELIST(REASON)&lt;br /&gt;
              1262       cpu     wrap ka_ab123  RUNNING       8:55     20:00      1 uc3n002&lt;br /&gt;
              1267 dev_gpu_h     wrap ka_ab123  PENDING       0:00     20:00      1 (Resources)&lt;br /&gt;
              1265   highmem     wrap ka_ab123  RUNNING       3:21     20:00      1 uc3n084&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Detailed job information : scontrol show job ===&lt;br /&gt;
scontrol show job displays detailed job state information and diagnostic output for all or a specified job of yours. Detailed information is available for active, pending and recently completed jobs. The command scontrol is explained in detail on the webpage https://slurm.schedmd.com/scontrol.html or via manpage (man scontrol). &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Display the state of all your jobs in normal mode: scontrol show job&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Display the state of a job with &amp;lt;jobid&amp;gt; in normal mode: scontrol show job &amp;lt;jobid&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Here is an example from bwUniCluster 3.0.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ squeue&lt;br /&gt;
JOBID PARTITION     NAME     USER ST       TIME  NODES NODELIST(REASON)&lt;br /&gt;
1262       cpu     wrap ka_zs040  R       1:12      1 uc3n002&lt;br /&gt;
&lt;br /&gt;
$&lt;br /&gt;
$ # now, see what&#039;s up with my pending job with jobid 1262&lt;br /&gt;
$ &lt;br /&gt;
$ scontrol show job 1262&lt;br /&gt;
&lt;br /&gt;
JobId=1262 JobName=wrap&lt;br /&gt;
   UserId=ka_zs0402(241992) GroupId=ka_scc(12345) MCS_label=N/A&lt;br /&gt;
   Priority=4246 Nice=0 Account=ka QOS=normal&lt;br /&gt;
   JobState=RUNNING Reason=None Dependency=(null)&lt;br /&gt;
   Requeue=1 Restarts=0 BatchFlag=1 Reboot=0 ExitCode=0:0&lt;br /&gt;
   RunTime=00:00:37 TimeLimit=00:20:00 TimeMin=N/A&lt;br /&gt;
   SubmitTime=2025-04-04T10:01:30 EligibleTime=2025-04-04T10:01:30&lt;br /&gt;
   AccrueTime=2025-04-04T10:01:30&lt;br /&gt;
   StartTime=2025-04-04T10:01:31 EndTime=2025-04-04T10:21:31 Deadline=N/A&lt;br /&gt;
   SuspendTime=None SecsPreSuspend=0 LastSchedEval=2025-04-04T10:01:31 Scheduler=Main&lt;br /&gt;
   Partition=cpu AllocNode:Sid=uc3n999:2819841&lt;br /&gt;
   ReqNodeList=(null) ExcNodeList=(null)&lt;br /&gt;
   NodeList=uc3n002&lt;br /&gt;
   BatchHost=uc3n002&lt;br /&gt;
   NumNodes=1 NumCPUs=2 NumTasks=1 CPUs/Task=1 ReqB:S:C:T=0:0:*:*&lt;br /&gt;
   ReqTRES=cpu=1,mem=2000M,node=1,billing=1&lt;br /&gt;
   AllocTRES=cpu=2,mem=4000M,node=1,billing=2&lt;br /&gt;
   Socks/Node=* NtasksPerN:B:S:C=0:0:*:1 CoreSpec=*&lt;br /&gt;
   MinCPUsNode=1 MinMemoryCPU=2000M MinTmpDiskNode=0&lt;br /&gt;
   Features=(null) DelayBoot=00:00:00&lt;br /&gt;
   OverSubscribe=OK Contiguous=0 Licenses=(null) Network=(null)&lt;br /&gt;
   Command=(null)&lt;br /&gt;
   WorkDir=/pfs/data6/home/ka/ka_scc/ka_zs0402&lt;br /&gt;
   StdErr=/pfs/data6/home/ka/ka_scc/ka_zs0402/slurm-1262.out&lt;br /&gt;
   StdIn=/dev/null&lt;br /&gt;
   StdOut=/pfs/data6/home/ka/ka_scc/ka_zs0402/slurm-1262.out&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=== Canceling own jobs : scancel ===&lt;br /&gt;
The scancel command is used to cancel jobs. The command scancel is explained in detail on the webpage https://slurm.schedmd.com/scancel.html or via manpage (man scancel). The command is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ scancel [-i] &amp;lt;job-id&amp;gt;&lt;br /&gt;
$ scancel -t &amp;lt;job_state_name&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Slurm Options =&lt;br /&gt;
[[BwUniCluster3.0/Running_Jobs/Slurm | Detailed Slurm usage]]&lt;br /&gt;
&lt;br /&gt;
= Best Practices =&lt;br /&gt;
&lt;br /&gt;
== Step-by-Step example==&lt;br /&gt;
&lt;br /&gt;
== Dos and Don&#039;ts ==&lt;/div&gt;</summary>
		<author><name>P Schuhmacher</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster3.0/Running_Jobs&amp;diff=14700</id>
		<title>BwUniCluster3.0/Running Jobs</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster3.0/Running_Jobs&amp;diff=14700"/>
		<updated>2025-04-08T10:48:30Z</updated>

		<summary type="html">&lt;p&gt;P Schuhmacher: /* Development Queues */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
= Purpose and function of a queuing system =&lt;br /&gt;
&lt;br /&gt;
All compute activities on bwUniCluster 3.0 have to be performed on the compute nodes. Compute nodes are only available by requesting the corresponding resources via the queuing system. As soon as the requested resources are available, automated tasks are executed via a batch script or they can be accessed interactively.&amp;lt;br&amp;gt;&lt;br /&gt;
General procedure: Hint to [[Running_Calculations | Running Calculations]]&lt;br /&gt;
&lt;br /&gt;
== Job submission process ==&lt;br /&gt;
&lt;br /&gt;
bwUniCluster 3.0 has installed the workload managing software Slurm. Therefore any job submission by the user is to be executed by commands of the Slurm software. Slurm queues and runs user jobs based on fair sharing policies.&lt;br /&gt;
&lt;br /&gt;
== Slurm ==&lt;br /&gt;
&lt;br /&gt;
HPC Workload Manager on bwUniCluster 3.0 is Slurm.&lt;br /&gt;
Slurm is a cluster management and job scheduling system. Slurm has three key functions. &lt;br /&gt;
* It allocates access to resources (compute cores on nodes) to users for some duration of time so they can perform work. &lt;br /&gt;
* It provides a framework for starting, executing, and monitoring work (normally a parallel job) on the set of allocated nodes. &lt;br /&gt;
* It arbitrates contention for resources by managing a queue of pending work.&lt;br /&gt;
&lt;br /&gt;
Any kind of calculation on the compute nodes of bwUniCluster 3.0 requires the user to define calculations as a sequence of commands together with required run time, number of CPU cores and main memory and submit all, i.e., the &#039;&#039;&#039;batch job&#039;&#039;&#039;, to a resource and workload managing software.&lt;br /&gt;
&lt;br /&gt;
== Terms and definitions ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Partitions &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Slurm manages job queues for different &#039;&#039;&#039;partitions&#039;&#039;&#039;. Partitions are used to group similar node types (e.g. nodes with and without accelerators) and to enforce different access policies and resource limits.&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 3.0 there are different partitions:&lt;br /&gt;
&lt;br /&gt;
* CPU-only nodes&lt;br /&gt;
** 2-socket nodes, consisting of 2 Intel Ice Lake processors with 32 cores each or 2 AMD processors with 48 cores each&lt;br /&gt;
** 2-socket nodes with very high RAM capacity, consisting of 2 AMD processors with 48 cores each&lt;br /&gt;
* GPU-accelerated nodes&lt;br /&gt;
** 2-socket nodes with 4x NVIDIA A100 or 4x NVIDIA H100 GPUs&lt;br /&gt;
** 4-socket node with 4x AMD Instinct accelerator&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Queues &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Job &#039;&#039;&#039;queues&#039;&#039;&#039; are used to manage jobs that request access to shared but limited computing resources of a certain kind (partition).&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 3.0 there are different main types of queues:&lt;br /&gt;
* Regular queues&lt;br /&gt;
** cpu: Jobs that request CPU-only nodes.&lt;br /&gt;
** gpu: Jobs that request GPU-accelerated nodes.&lt;br /&gt;
* Development queues (dev)&lt;br /&gt;
** Short, usually interactive jobs that are used for developing, compiling and testing code and workflows. The intention behind development queues is to provide users with immediate access to computer resources without having to wait. This is the place to realize instantaneous heavy compute without affecting other users, as would be the case on the login nodes.&lt;br /&gt;
&lt;br /&gt;
Requested compute resources such as (wall-)time, number of nodes and amount of memory are restricted and must fit into the boundaries imposed by the queues. The request for compute resources on the bwUniCluster 3.0 &amp;lt;font color=red&amp;gt;requires at least the specification of the &#039;&#039;&#039;queue&#039;&#039;&#039; and the &#039;&#039;&#039;time&#039;&#039;&#039;&amp;lt;/font&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Jobs &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Jobs can be run non-interactively as &#039;&#039;&#039;batch jobs&#039;&#039;&#039; or as &#039;&#039;&#039;interactive jobs&#039;&#039;&#039;.&amp;lt;br&amp;gt;&lt;br /&gt;
Submitting a batch job means, that all steps of a compute project are defined in a Bash script. This Bash script is queued and executed as soon as the compute resources are available and allocated. Jobs are enqueued with the &amp;lt;code&amp;gt;sbatch&amp;lt;/code&amp;gt; command.&lt;br /&gt;
For interactive jobs, the resources are requested with the &amp;lt;code&amp;gt;salloc&amp;lt;/code&amp;gt; command. As soon as the computing resources are available and allocated, a command line prompt is returned on a computing node and the user can freely dispose of the resources now available to him.&lt;br /&gt;
{|style=&amp;quot;background:#deffee; width:100%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;padding:5px; background:#cef2e0; text-align:left&amp;quot;|&lt;br /&gt;
[[Image:Attention.svg|center|25px]]&lt;br /&gt;
|style=&amp;quot;padding:5px; background:#cef2e0; text-align:left&amp;quot;|&lt;br /&gt;
&#039;&#039;&#039;Please remember:&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Heavy computations are not allowed on the login nodes&#039;&#039;&#039;.&amp;lt;br&amp;gt;Use a developement or a regular job queue instead! Please refer to [[BwUniCluster3.0/Login#Allowed_Activities_on_Login_Nodes|Allowed Activities on Login Nodes]].&lt;br /&gt;
* &#039;&#039;&#039;Development queues&#039;&#039;&#039; are meant for &#039;&#039;&#039;development tasks&#039;&#039;&#039;.&amp;lt;br&amp;gt;Do not misuse this queue for regular, short-running jobs or chain jobs! Only one running job at a time is enabled. Maximum queue length is reduced to 3.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Queues on bwUniCluster 3.0 = &lt;br /&gt;
== Policy ==&lt;br /&gt;
&lt;br /&gt;
The computing time is provided in accordance with the &#039;&#039;&#039;fair share policy&#039;&#039;&#039;. The individual investment shares of the respective university and the resources already used by its members are taken into account. Furthermore, the following throttling policy is also active: The &#039;&#039;&#039;maximum amount of cores&#039;&#039;&#039; used at any given time from jobs running is &#039;&#039;&#039;1920 per user&#039;&#039;&#039; (aggregated over all running jobs). This number corresponds to 30 nodes on the Ice Lake partition or 20 nodes on the standard partition. The aim is to minimize waiting times and maximize the number of users who can access computing time at the same time.&lt;br /&gt;
&lt;br /&gt;
== Regular Queues ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
! style=&amp;quot;width:5%&amp;quot;| Queue&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Node-Type&lt;br /&gt;
! style=&amp;quot;width:23%&amp;quot;| Default Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Minimal Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Maximum Resources&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;cpu_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Ice Lake&lt;br /&gt;
| mem-per-cpu=1950mb&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=30, mem=249600mb, ntasks-per-node=64, (threads-per-core=2) &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;cpu&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Standard&lt;br /&gt;
| mem-per-cpu=1125mb&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=20, mem=380000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;highmem&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;High Memory&lt;br /&gt;
| mem-per-cpu=1125mb&lt;br /&gt;
| mem=380001mb&lt;br /&gt;
| time=72:00:00, nodes=4, mem=2300000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;gpu_h100&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;NVIDIA GPU x4&lt;br /&gt;
| mem-per-cpu=1125mb&amp;lt;br/&amp;gt;cpus-per-gpu=24&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=12, mem=760000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;gpu_mi300&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU node&amp;lt;br/&amp;gt;AMD GPU x4&lt;br /&gt;
| mem-per-cpu=1125mb&amp;lt;br/&amp;gt;cpus-per-gpu=24&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=1, mem=510000mb, ntasks-per-node=40, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;gpu_a100_il&amp;lt;/code&amp;gt;/&amp;lt;code&amp;gt;gpu_h100_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;Ice Lake&amp;lt;br/&amp;gt;NVIDIA GPU x4&lt;br /&gt;
| mem-per-gpu=127500mb&amp;lt;br/&amp;gt;cpus-per-gpu=16&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=9, mem=510000mb, ntasks-per-node=64, (threads-per-core=2) &lt;br /&gt;
|}&lt;br /&gt;
Table 1: Regular Queues&lt;br /&gt;
&lt;br /&gt;
== Development Queues ==&lt;br /&gt;
Only for development, i.e. debugging or performance optimization ...&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
! style=&amp;quot;width:5%&amp;quot;| Queue&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Node Type&lt;br /&gt;
! style=&amp;quot;width:23%&amp;quot;| Default Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Minimal Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Maximum Resources&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_cpu_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Ice Lake&lt;br /&gt;
| mem-per-cpu=1950mb&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=8, mem=249600mb, ntasks-per-node=64, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_cpu&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Standard&lt;br /&gt;
| mem-per-cpu=1125mb&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=380000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_gpu_h100&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;NVIDIA GPU x4&lt;br /&gt;
| mem-per-cpu=1125mb&amp;lt;br/&amp;gt;cpus-per-gpu=24&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=760000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_gpu_a100_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;NVIDIA GPU x4&amp;lt;br/&amp;gt;&lt;br /&gt;
| mem-per-gpu=127500mb&amp;lt;br/&amp;gt;cpus-per-gpu=16 &lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=510000mb, ntasks-per-node=64, (threads-per-core=2) &lt;br /&gt;
|}&lt;br /&gt;
Table 2: Development Queues&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Default resources of a queue class define number of tasks and memory if not explicitly given with sbatch command. Resource list acronyms &#039;&#039;--time&#039;&#039;, &#039;&#039;--ntasks&#039;&#039;, &#039;&#039;--nodes&#039;&#039;, &#039;&#039;--mem&#039;&#039; and &#039;&#039;--mem-per-cpu&#039;&#039; are described [[BwUniCluster3.0/Running_Jobs/Slurm|here]].&lt;br /&gt;
&lt;br /&gt;
== Check available resources: sinfo_t_idle ==&lt;br /&gt;
The Slurm command sinfo is used to view partition and node information for a system running Slurm. It incorporates down time, reservations, and node state information in determining the available backfill window. The sinfo command can only be used by the administrator.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
SCC has prepared a special script (sinfo_t_idle) to find out how many processors are available for immediate use on the system. It is anticipated that users will use this information to submit jobs that meet these criteria and thus obtain quick job turnaround times. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The following command displays what resources are available for immediate use for the whole partition.&lt;br /&gt;
&amp;lt;pre&amp;gt;$ sinfo_t_idle&lt;br /&gt;
Partition dev_cpu                 :      2 nodes idle&lt;br /&gt;
Partition cpu                     :     68 nodes idle&lt;br /&gt;
Partition highmem                 :      4 nodes idle&lt;br /&gt;
Partition dev_gpu_h100            :      0 nodes idle&lt;br /&gt;
Partition gpu_h100                :     11 nodes idle&lt;br /&gt;
Partition gpu_mi300               :      1 nodes idle&lt;br /&gt;
Partition dev_cpu_il              :      0 nodes idle&lt;br /&gt;
Partition cpu_il                  :      0 nodes idle&lt;br /&gt;
Partition dev_gpu_a100_il         :      0 nodes idle&lt;br /&gt;
Partition gpu_a100_il             :      0 nodes idle&lt;br /&gt;
Partition gpu_h100_il             :      0 nodes idle&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Running Jobs =&lt;br /&gt;
&lt;br /&gt;
== Slurm Commands (excerpt) ==&lt;br /&gt;
Important Slurm commands for non-administrators working on bwUniCluster 3.0.&lt;br /&gt;
{| width=850px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Slurm commands !! Brief explanation&lt;br /&gt;
|-&lt;br /&gt;
| [[#Batch Jobs: sbatch|sbatch]] || Submits a job and puts it into the queue [[https://slurm.schedmd.com/sbatch.html sbatch]] &lt;br /&gt;
|-&lt;br /&gt;
| [[#Interactive Jobs: salloc|salloc]] || Requests resources for an interactive Job [[https://slurm.schedmd.com/salloc.html salloc]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Monitor and manage jobs |scontrol show job]] || Displays detailed job state information [[https://slurm.schedmd.com/scontrol.html scontrol]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#List of your submitted jobs : squeue|squeue]] || Displays information about active, eligible, blocked, and/or recently completed jobs [[https://slurm.schedmd.com/squeue.html squeue]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#List of your submitted jobs : squeue|squeue --start]] || Returns start time of submitted job [[https://slurm.schedmd.com/squeue.html squeue]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Check available resources: sinfo_t_idle|sinfo_t_idle]] || Shows what resources are available for immediate use [[https://slurm.schedmd.com/sinfo.html sinfo]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Canceling own jobs : scancel|scancel]] || Cancels a job [[https://slurm.schedmd.com/scancel.html scancel]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* [https://slurm.schedmd.com/tutorials.html  Slurm Tutorials]&lt;br /&gt;
* [https://slurm.schedmd.com/pdfs/summary.pdf  Slurm command/option summary (2 pages)]&lt;br /&gt;
* [https://slurm.schedmd.com/man_index.html  Slurm Commands]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Batch Jobs: sbatch ==&lt;br /&gt;
&lt;br /&gt;
Batch jobs are submitted by using the command &#039;&#039;&#039;sbatch&#039;&#039;&#039;. The main purpose of the &#039;&#039;&#039;sbatch&#039;&#039;&#039; command is to specify the resources that are needed to run the job. &#039;&#039;&#039;sbatch&#039;&#039;&#039; will then queue the batch job. However, starting of batch job depends on the availability of the requested resources and the fair sharing value.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The syntax and use of &#039;&#039;&#039;sbatch&#039;&#039;&#039; can be displayed via:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ man sbatch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;sbatch&#039;&#039;&#039; options can be used from the command line or in your job script. Different defaults for some of these options are set based on the queue and can be found [[BwUniCluster3.0/Slurm | here]]&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | sbatch Options&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width:8%&amp;quot;| Command line&lt;br /&gt;
! style=&amp;quot;width:9%&amp;quot;| Script&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Purpose&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -t, --time=&#039;&#039;time&#039;&#039;&lt;br /&gt;
| #SBATCH --time=&#039;&#039;time&#039;&#039;&lt;br /&gt;
| Wall clock time limit.&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -N, --nodes=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --nodes=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of nodes to be used.&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -n, --ntasks=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --ntasks=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of tasks to be launched.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --ntasks-per-node=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --ntasks-per-node=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Maximum count of tasks per node.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -c, --cpus-per-task=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --cpus-per-task=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of CPUs required per (MPI-)task.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mem=&#039;&#039;value_in_MB&#039;&#039;&lt;br /&gt;
| #SBATCH --mem=&#039;&#039;value_in_MB&#039;&#039; &lt;br /&gt;
| Memory in MegaByte per node. (You should omit the setting of this option.)&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mem-per-cpu=&#039;&#039;value_in_MB&#039;&#039;&lt;br /&gt;
| #SBATCH --mem-per-cpu=&#039;&#039;value_in_MB&#039;&#039; &lt;br /&gt;
| Minimum Memory required per allocated CPU. (You should omit the setting of this option.)&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mail-type=&#039;&#039;type&#039;&#039;&lt;br /&gt;
| #SBATCH --mail-type=&#039;&#039;type&#039;&#039;&lt;br /&gt;
| Notify user by email when certain event types occur.&amp;lt;br&amp;gt;Valid type values are NONE, BEGIN, END, FAIL, REQUEUE, ALL.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mail-user=&#039;&#039;mail-address&#039;&#039;&lt;br /&gt;
| #SBATCH --mail-user=&#039;&#039;mail-address&#039;&#039;&lt;br /&gt;
|  The specified mail-address receives email notification of state changes as defined by --mail-type.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --output=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --output=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| File in which job output is stored. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --error=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --error=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| File in which job error messages are stored. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -J, --job-name=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --job-name=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| Job name.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --export=[ALL,] &#039;&#039;env-variables&#039;&#039;&lt;br /&gt;
| #SBATCH --export=[ALL,] &#039;&#039;env-variables&#039;&#039;&lt;br /&gt;
| Identifies which environment variables from the submission environment are propagated to the launched application. Default is ALL.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -A, --account=&#039;&#039;group-name&#039;&#039;&lt;br /&gt;
| #SBATCH --account=&#039;&#039;group-name&#039;&#039;&lt;br /&gt;
| Change resources used by this job to specified group. You may need this option if your account is assigned to more than one group. By command &amp;quot;scontrol show job&amp;quot; the project group the job is accounted on can be seen behind &amp;quot;Account=&amp;quot;. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -p, --partition=&#039;&#039;queue-name&#039;&#039;&lt;br /&gt;
| #SBATCH --partition=&#039;&#039;queue-name&#039;&#039;&lt;br /&gt;
| Request a specific queue for the resource allocation.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --reservation=&#039;&#039;reservation-name&#039;&#039;&lt;br /&gt;
| #SBATCH --reservation=&#039;&#039;reservation-name&#039;&#039;&lt;br /&gt;
| Use a specific reservation for the resource allocation.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -C, --constraint=&#039;&#039;LSDF&#039;&#039;&lt;br /&gt;
| #SBATCH --constraint=LSDF&lt;br /&gt;
| Job constraint LSDF filesystems.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -C, --constraint=&#039;&#039;BEEOND (BEEOND_4MDS, BEEOND_MAXMDS)&#039;&#039;&lt;br /&gt;
| #SBATCH --constraint=BEEOND (BEEOND_4MDS, BEEOND_MAXMDS)&lt;br /&gt;
| Job constraint BeeOND filesystem.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Interactive Jobs: salloc ==&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 3.0 you are only allowed to run short jobs (&amp;lt;&amp;lt; 1 hour) with little memory requirements (&amp;lt;&amp;lt; 8 GByte) on the logins nodes. If you want to run longer jobs and/or jobs with a request of more than 8 GByte of memory, you must allocate resources for so-called interactive jobs by usage of the command salloc on a login node. Considering a serial application running on a compute node that requires 5000 MByte of memory and limiting the interactive run to 2 hours the following command has to be executed:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ salloc -p cpu -n 1 -t 120 --mem=5000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then you will get one core on a compute node within the partition &amp;quot;cpu&amp;quot;. After execution of this command &#039;&#039;&#039;DO NOT CLOSE&#039;&#039;&#039; your current terminal session but wait until the queueing system Slurm has granted you the requested resources on the compute system. You will be logged in automatically on the granted core! To run a serial program on the granted core you only have to type the name of the executable.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./&amp;lt;my_serial_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please be aware that your serial job must run less than 2 hours in this example, else the job will be killed during runtime by the system. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can also start now a graphical X11-terminal connecting you to the dedicated resource that is available for 2 hours. You can start it by the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ xterm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that, once the walltime limit has been reached the resources - i.e. the compute node - will automatically be revoked.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
An interactive parallel application running on one compute node or on many compute nodes (e.g. here 5 nodes) with 96 cores each requires usually an amount of memory in GByte (e.g. 50 GByte) and a maximum time (e.g. 1 hour). E.g. 5 nodes can be allocated by the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ salloc -p cpu -N 5 --ntasks-per-node=96 -t 01:00:00  --mem=50gb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you can run parallel jobs on 480 cores requiring 50 GByte of memory per node. Please be aware that you will be logged in on core 0 of the first node.&lt;br /&gt;
If you want to have access to another node you have to open a new terminal, connect it also to bwUniCluster 3.0 and type the following commands to&lt;br /&gt;
connect to the running interactive job and then to a specific node:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ srun --jobid=XXXXXXXX --pty /bin/bash&lt;br /&gt;
$ srun --nodelist=uc3nXXX --pty /bin/bash&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ squeue&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the jobid and the nodelist can be shown.&lt;br /&gt;
&lt;br /&gt;
If you want to run MPI-programs, you can do it by simply typing mpirun &amp;lt;program_name&amp;gt;. Then your program will be run on 480 cores. A very simple example for starting a parallel job can be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mpirun &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also start the debugger ddt by the commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module add devel/ddt&lt;br /&gt;
$ ddt &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above commands will execute the parallel program &amp;lt;my_mpi_program&amp;gt; on all available cores. You can also start parallel programs on a subset of cores; an example for this can be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mpirun -n 50 &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are using Intel MPI you must start &amp;lt;my_mpi_program&amp;gt; by the command mpiexec.hydra (instead of mpirun).&lt;br /&gt;
&lt;br /&gt;
== Interactive Computing with Jupyter ==&lt;br /&gt;
&lt;br /&gt;
== Monitor and manage jobs ==&lt;br /&gt;
&lt;br /&gt;
=== List of your submitted jobs : squeue ===&lt;br /&gt;
Displays information about YOUR active, pending and/or recently completed jobs. The command displays all own active and pending jobs. The command squeue is explained in detail on the webpage https://slurm.schedmd.com/squeue.html or via manpage (man squeue).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;squeue&#039;&#039; example on bwUniCluster 3.0 &amp;lt;small&amp;gt;(Only your own jobs are displayed!)&amp;lt;/small&amp;gt;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ squeue &lt;br /&gt;
             JOBID PARTITION     NAME     USER ST       TIME  NODES NODELIST(REASON)&lt;br /&gt;
              1262       cpu     wrap ka_ab123  R       8:15      1 uc3n002&lt;br /&gt;
              1267 dev_gpu_h     wrap ka_ab123 PD       0:00      1 (Resources)&lt;br /&gt;
              1265   highmem     wrap ka_ab123  R       2:41      1 uc3n084&lt;br /&gt;
$ squeue -l&lt;br /&gt;
             JOBID PARTITION     NAME     USER    STATE       TIME TIME_LIMI  NODES NODELIST(REASON)&lt;br /&gt;
              1262       cpu     wrap ka_ab123  RUNNING       8:55     20:00      1 uc3n002&lt;br /&gt;
              1267 dev_gpu_h     wrap ka_ab123  PENDING       0:00     20:00      1 (Resources)&lt;br /&gt;
              1265   highmem     wrap ka_ab123  RUNNING       3:21     20:00      1 uc3n084&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Detailed job information : scontrol show job ===&lt;br /&gt;
scontrol show job displays detailed job state information and diagnostic output for all or a specified job of yours. Detailed information is available for active, pending and recently completed jobs. The command scontrol is explained in detail on the webpage https://slurm.schedmd.com/scontrol.html or via manpage (man scontrol). &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Display the state of all your jobs in normal mode: scontrol show job&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Display the state of a job with &amp;lt;jobid&amp;gt; in normal mode: scontrol show job &amp;lt;jobid&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Here is an example from bwUniCluster 3.0.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ squeue&lt;br /&gt;
JOBID PARTITION     NAME     USER ST       TIME  NODES NODELIST(REASON)&lt;br /&gt;
1262       cpu     wrap ka_zs040  R       1:12      1 uc3n002&lt;br /&gt;
&lt;br /&gt;
$&lt;br /&gt;
$ # now, see what&#039;s up with my pending job with jobid 1262&lt;br /&gt;
$ &lt;br /&gt;
$ scontrol show job 1262&lt;br /&gt;
&lt;br /&gt;
JobId=1262 JobName=wrap&lt;br /&gt;
   UserId=ka_zs0402(241992) GroupId=ka_scc(12345) MCS_label=N/A&lt;br /&gt;
   Priority=4246 Nice=0 Account=ka QOS=normal&lt;br /&gt;
   JobState=RUNNING Reason=None Dependency=(null)&lt;br /&gt;
   Requeue=1 Restarts=0 BatchFlag=1 Reboot=0 ExitCode=0:0&lt;br /&gt;
   RunTime=00:00:37 TimeLimit=00:20:00 TimeMin=N/A&lt;br /&gt;
   SubmitTime=2025-04-04T10:01:30 EligibleTime=2025-04-04T10:01:30&lt;br /&gt;
   AccrueTime=2025-04-04T10:01:30&lt;br /&gt;
   StartTime=2025-04-04T10:01:31 EndTime=2025-04-04T10:21:31 Deadline=N/A&lt;br /&gt;
   SuspendTime=None SecsPreSuspend=0 LastSchedEval=2025-04-04T10:01:31 Scheduler=Main&lt;br /&gt;
   Partition=cpu AllocNode:Sid=uc3n999:2819841&lt;br /&gt;
   ReqNodeList=(null) ExcNodeList=(null)&lt;br /&gt;
   NodeList=uc3n002&lt;br /&gt;
   BatchHost=uc3n002&lt;br /&gt;
   NumNodes=1 NumCPUs=2 NumTasks=1 CPUs/Task=1 ReqB:S:C:T=0:0:*:*&lt;br /&gt;
   ReqTRES=cpu=1,mem=2000M,node=1,billing=1&lt;br /&gt;
   AllocTRES=cpu=2,mem=4000M,node=1,billing=2&lt;br /&gt;
   Socks/Node=* NtasksPerN:B:S:C=0:0:*:1 CoreSpec=*&lt;br /&gt;
   MinCPUsNode=1 MinMemoryCPU=2000M MinTmpDiskNode=0&lt;br /&gt;
   Features=(null) DelayBoot=00:00:00&lt;br /&gt;
   OverSubscribe=OK Contiguous=0 Licenses=(null) Network=(null)&lt;br /&gt;
   Command=(null)&lt;br /&gt;
   WorkDir=/pfs/data6/home/ka/ka_scc/ka_zs0402&lt;br /&gt;
   StdErr=/pfs/data6/home/ka/ka_scc/ka_zs0402/slurm-1262.out&lt;br /&gt;
   StdIn=/dev/null&lt;br /&gt;
   StdOut=/pfs/data6/home/ka/ka_scc/ka_zs0402/slurm-1262.out&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=== Canceling own jobs : scancel ===&lt;br /&gt;
The scancel command is used to cancel jobs. The command scancel is explained in detail on the webpage https://slurm.schedmd.com/scancel.html or via manpage (man scancel). The command is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ scancel [-i] &amp;lt;job-id&amp;gt;&lt;br /&gt;
$ scancel -t &amp;lt;job_state_name&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Slurm Options =&lt;br /&gt;
[[BwUniCluster3.0/Running_Jobs/Slurm | Detailed Slurm usage]]&lt;br /&gt;
&lt;br /&gt;
= Best Practices =&lt;br /&gt;
&lt;br /&gt;
== Step-by-Step example==&lt;br /&gt;
&lt;br /&gt;
== Dos and Don&#039;ts ==&lt;/div&gt;</summary>
		<author><name>P Schuhmacher</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster3.0/Running_Jobs&amp;diff=14699</id>
		<title>BwUniCluster3.0/Running Jobs</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster3.0/Running_Jobs&amp;diff=14699"/>
		<updated>2025-04-08T10:47:47Z</updated>

		<summary type="html">&lt;p&gt;P Schuhmacher: /* Development Queues */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
= Purpose and function of a queuing system =&lt;br /&gt;
&lt;br /&gt;
All compute activities on bwUniCluster 3.0 have to be performed on the compute nodes. Compute nodes are only available by requesting the corresponding resources via the queuing system. As soon as the requested resources are available, automated tasks are executed via a batch script or they can be accessed interactively.&amp;lt;br&amp;gt;&lt;br /&gt;
General procedure: Hint to [[Running_Calculations | Running Calculations]]&lt;br /&gt;
&lt;br /&gt;
== Job submission process ==&lt;br /&gt;
&lt;br /&gt;
bwUniCluster 3.0 has installed the workload managing software Slurm. Therefore any job submission by the user is to be executed by commands of the Slurm software. Slurm queues and runs user jobs based on fair sharing policies.&lt;br /&gt;
&lt;br /&gt;
== Slurm ==&lt;br /&gt;
&lt;br /&gt;
HPC Workload Manager on bwUniCluster 3.0 is Slurm.&lt;br /&gt;
Slurm is a cluster management and job scheduling system. Slurm has three key functions. &lt;br /&gt;
* It allocates access to resources (compute cores on nodes) to users for some duration of time so they can perform work. &lt;br /&gt;
* It provides a framework for starting, executing, and monitoring work (normally a parallel job) on the set of allocated nodes. &lt;br /&gt;
* It arbitrates contention for resources by managing a queue of pending work.&lt;br /&gt;
&lt;br /&gt;
Any kind of calculation on the compute nodes of bwUniCluster 3.0 requires the user to define calculations as a sequence of commands together with required run time, number of CPU cores and main memory and submit all, i.e., the &#039;&#039;&#039;batch job&#039;&#039;&#039;, to a resource and workload managing software.&lt;br /&gt;
&lt;br /&gt;
== Terms and definitions ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Partitions &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Slurm manages job queues for different &#039;&#039;&#039;partitions&#039;&#039;&#039;. Partitions are used to group similar node types (e.g. nodes with and without accelerators) and to enforce different access policies and resource limits.&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 3.0 there are different partitions:&lt;br /&gt;
&lt;br /&gt;
* CPU-only nodes&lt;br /&gt;
** 2-socket nodes, consisting of 2 Intel Ice Lake processors with 32 cores each or 2 AMD processors with 48 cores each&lt;br /&gt;
** 2-socket nodes with very high RAM capacity, consisting of 2 AMD processors with 48 cores each&lt;br /&gt;
* GPU-accelerated nodes&lt;br /&gt;
** 2-socket nodes with 4x NVIDIA A100 or 4x NVIDIA H100 GPUs&lt;br /&gt;
** 4-socket node with 4x AMD Instinct accelerator&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Queues &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Job &#039;&#039;&#039;queues&#039;&#039;&#039; are used to manage jobs that request access to shared but limited computing resources of a certain kind (partition).&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 3.0 there are different main types of queues:&lt;br /&gt;
* Regular queues&lt;br /&gt;
** cpu: Jobs that request CPU-only nodes.&lt;br /&gt;
** gpu: Jobs that request GPU-accelerated nodes.&lt;br /&gt;
* Development queues (dev)&lt;br /&gt;
** Short, usually interactive jobs that are used for developing, compiling and testing code and workflows. The intention behind development queues is to provide users with immediate access to computer resources without having to wait. This is the place to realize instantaneous heavy compute without affecting other users, as would be the case on the login nodes.&lt;br /&gt;
&lt;br /&gt;
Requested compute resources such as (wall-)time, number of nodes and amount of memory are restricted and must fit into the boundaries imposed by the queues. The request for compute resources on the bwUniCluster 3.0 &amp;lt;font color=red&amp;gt;requires at least the specification of the &#039;&#039;&#039;queue&#039;&#039;&#039; and the &#039;&#039;&#039;time&#039;&#039;&#039;&amp;lt;/font&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Jobs &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Jobs can be run non-interactively as &#039;&#039;&#039;batch jobs&#039;&#039;&#039; or as &#039;&#039;&#039;interactive jobs&#039;&#039;&#039;.&amp;lt;br&amp;gt;&lt;br /&gt;
Submitting a batch job means, that all steps of a compute project are defined in a Bash script. This Bash script is queued and executed as soon as the compute resources are available and allocated. Jobs are enqueued with the &amp;lt;code&amp;gt;sbatch&amp;lt;/code&amp;gt; command.&lt;br /&gt;
For interactive jobs, the resources are requested with the &amp;lt;code&amp;gt;salloc&amp;lt;/code&amp;gt; command. As soon as the computing resources are available and allocated, a command line prompt is returned on a computing node and the user can freely dispose of the resources now available to him.&lt;br /&gt;
{|style=&amp;quot;background:#deffee; width:100%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;padding:5px; background:#cef2e0; text-align:left&amp;quot;|&lt;br /&gt;
[[Image:Attention.svg|center|25px]]&lt;br /&gt;
|style=&amp;quot;padding:5px; background:#cef2e0; text-align:left&amp;quot;|&lt;br /&gt;
&#039;&#039;&#039;Please remember:&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Heavy computations are not allowed on the login nodes&#039;&#039;&#039;.&amp;lt;br&amp;gt;Use a developement or a regular job queue instead! Please refer to [[BwUniCluster3.0/Login#Allowed_Activities_on_Login_Nodes|Allowed Activities on Login Nodes]].&lt;br /&gt;
* &#039;&#039;&#039;Development queues&#039;&#039;&#039; are meant for &#039;&#039;&#039;development tasks&#039;&#039;&#039;.&amp;lt;br&amp;gt;Do not misuse this queue for regular, short-running jobs or chain jobs! Only one running job at a time is enabled. Maximum queue length is reduced to 3.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Queues on bwUniCluster 3.0 = &lt;br /&gt;
== Policy ==&lt;br /&gt;
&lt;br /&gt;
The computing time is provided in accordance with the &#039;&#039;&#039;fair share policy&#039;&#039;&#039;. The individual investment shares of the respective university and the resources already used by its members are taken into account. Furthermore, the following throttling policy is also active: The &#039;&#039;&#039;maximum amount of cores&#039;&#039;&#039; used at any given time from jobs running is &#039;&#039;&#039;1920 per user&#039;&#039;&#039; (aggregated over all running jobs). This number corresponds to 30 nodes on the Ice Lake partition or 20 nodes on the standard partition. The aim is to minimize waiting times and maximize the number of users who can access computing time at the same time.&lt;br /&gt;
&lt;br /&gt;
== Regular Queues ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
! style=&amp;quot;width:5%&amp;quot;| Queue&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Node-Type&lt;br /&gt;
! style=&amp;quot;width:23%&amp;quot;| Default Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Minimal Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Maximum Resources&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;cpu_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Ice Lake&lt;br /&gt;
| mem-per-cpu=1950mb&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=30, mem=249600mb, ntasks-per-node=64, (threads-per-core=2) &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;cpu&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Standard&lt;br /&gt;
| mem-per-cpu=1125mb&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=20, mem=380000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;highmem&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;High Memory&lt;br /&gt;
| mem-per-cpu=1125mb&lt;br /&gt;
| mem=380001mb&lt;br /&gt;
| time=72:00:00, nodes=4, mem=2300000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;gpu_h100&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;NVIDIA GPU x4&lt;br /&gt;
| mem-per-cpu=1125mb&amp;lt;br/&amp;gt;cpus-per-gpu=24&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=12, mem=760000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;gpu_mi300&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU node&amp;lt;br/&amp;gt;AMD GPU x4&lt;br /&gt;
| mem-per-cpu=1125mb&amp;lt;br/&amp;gt;cpus-per-gpu=24&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=1, mem=510000mb, ntasks-per-node=40, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;gpu_a100_il&amp;lt;/code&amp;gt;/&amp;lt;code&amp;gt;gpu_h100_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;Ice Lake&amp;lt;br/&amp;gt;NVIDIA GPU x4&lt;br /&gt;
| mem-per-gpu=127500mb&amp;lt;br/&amp;gt;cpus-per-gpu=16&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=9, mem=510000mb, ntasks-per-node=64, (threads-per-core=2) &lt;br /&gt;
|}&lt;br /&gt;
Table 1: Regular Queues&lt;br /&gt;
&lt;br /&gt;
== Development Queues ==&lt;br /&gt;
Only for development, i.e. debugging or performance optimization ...&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
! style=&amp;quot;width:5%&amp;quot;| Queue&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Node Type&lt;br /&gt;
! style=&amp;quot;width:23%&amp;quot;| Default Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Minimal Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Maximum Resources&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_cpu_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Ice Lake&lt;br /&gt;
| mem-per-cpu=1950mb&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=8, mem=249600mb, ntasks-per-node=64, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_cpu&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Standard&lt;br /&gt;
| mem-per-cpu=1125mb&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=380000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_gpu_h100&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;NVIDIA GPU x4&lt;br /&gt;
| mem-per-cpu=1125mb&amp;lt;br/&amp;gt;cpus-per-gpu=24&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=180000mb, ntasks-per-node=40, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_gpu_a100_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;NVIDIA GPU x4&amp;lt;br/&amp;gt;&lt;br /&gt;
| mem-per-gpu=127500mb&amp;lt;br/&amp;gt;cpus-per-gpu=16 &lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=510000mb, ntasks-per-node=64, (threads-per-core=2) &lt;br /&gt;
|}&lt;br /&gt;
Table 2: Development Queues&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Default resources of a queue class define number of tasks and memory if not explicitly given with sbatch command. Resource list acronyms &#039;&#039;--time&#039;&#039;, &#039;&#039;--ntasks&#039;&#039;, &#039;&#039;--nodes&#039;&#039;, &#039;&#039;--mem&#039;&#039; and &#039;&#039;--mem-per-cpu&#039;&#039; are described [[BwUniCluster3.0/Running_Jobs/Slurm|here]].&lt;br /&gt;
&lt;br /&gt;
== Check available resources: sinfo_t_idle ==&lt;br /&gt;
The Slurm command sinfo is used to view partition and node information for a system running Slurm. It incorporates down time, reservations, and node state information in determining the available backfill window. The sinfo command can only be used by the administrator.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
SCC has prepared a special script (sinfo_t_idle) to find out how many processors are available for immediate use on the system. It is anticipated that users will use this information to submit jobs that meet these criteria and thus obtain quick job turnaround times. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The following command displays what resources are available for immediate use for the whole partition.&lt;br /&gt;
&amp;lt;pre&amp;gt;$ sinfo_t_idle&lt;br /&gt;
Partition dev_cpu                 :      2 nodes idle&lt;br /&gt;
Partition cpu                     :     68 nodes idle&lt;br /&gt;
Partition highmem                 :      4 nodes idle&lt;br /&gt;
Partition dev_gpu_h100            :      0 nodes idle&lt;br /&gt;
Partition gpu_h100                :     11 nodes idle&lt;br /&gt;
Partition gpu_mi300               :      1 nodes idle&lt;br /&gt;
Partition dev_cpu_il              :      0 nodes idle&lt;br /&gt;
Partition cpu_il                  :      0 nodes idle&lt;br /&gt;
Partition dev_gpu_a100_il         :      0 nodes idle&lt;br /&gt;
Partition gpu_a100_il             :      0 nodes idle&lt;br /&gt;
Partition gpu_h100_il             :      0 nodes idle&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Running Jobs =&lt;br /&gt;
&lt;br /&gt;
== Slurm Commands (excerpt) ==&lt;br /&gt;
Important Slurm commands for non-administrators working on bwUniCluster 3.0.&lt;br /&gt;
{| width=850px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Slurm commands !! Brief explanation&lt;br /&gt;
|-&lt;br /&gt;
| [[#Batch Jobs: sbatch|sbatch]] || Submits a job and puts it into the queue [[https://slurm.schedmd.com/sbatch.html sbatch]] &lt;br /&gt;
|-&lt;br /&gt;
| [[#Interactive Jobs: salloc|salloc]] || Requests resources for an interactive Job [[https://slurm.schedmd.com/salloc.html salloc]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Monitor and manage jobs |scontrol show job]] || Displays detailed job state information [[https://slurm.schedmd.com/scontrol.html scontrol]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#List of your submitted jobs : squeue|squeue]] || Displays information about active, eligible, blocked, and/or recently completed jobs [[https://slurm.schedmd.com/squeue.html squeue]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#List of your submitted jobs : squeue|squeue --start]] || Returns start time of submitted job [[https://slurm.schedmd.com/squeue.html squeue]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Check available resources: sinfo_t_idle|sinfo_t_idle]] || Shows what resources are available for immediate use [[https://slurm.schedmd.com/sinfo.html sinfo]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Canceling own jobs : scancel|scancel]] || Cancels a job [[https://slurm.schedmd.com/scancel.html scancel]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* [https://slurm.schedmd.com/tutorials.html  Slurm Tutorials]&lt;br /&gt;
* [https://slurm.schedmd.com/pdfs/summary.pdf  Slurm command/option summary (2 pages)]&lt;br /&gt;
* [https://slurm.schedmd.com/man_index.html  Slurm Commands]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Batch Jobs: sbatch ==&lt;br /&gt;
&lt;br /&gt;
Batch jobs are submitted by using the command &#039;&#039;&#039;sbatch&#039;&#039;&#039;. The main purpose of the &#039;&#039;&#039;sbatch&#039;&#039;&#039; command is to specify the resources that are needed to run the job. &#039;&#039;&#039;sbatch&#039;&#039;&#039; will then queue the batch job. However, starting of batch job depends on the availability of the requested resources and the fair sharing value.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The syntax and use of &#039;&#039;&#039;sbatch&#039;&#039;&#039; can be displayed via:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ man sbatch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;sbatch&#039;&#039;&#039; options can be used from the command line or in your job script. Different defaults for some of these options are set based on the queue and can be found [[BwUniCluster3.0/Slurm | here]]&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | sbatch Options&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width:8%&amp;quot;| Command line&lt;br /&gt;
! style=&amp;quot;width:9%&amp;quot;| Script&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Purpose&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -t, --time=&#039;&#039;time&#039;&#039;&lt;br /&gt;
| #SBATCH --time=&#039;&#039;time&#039;&#039;&lt;br /&gt;
| Wall clock time limit.&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -N, --nodes=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --nodes=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of nodes to be used.&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -n, --ntasks=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --ntasks=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of tasks to be launched.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --ntasks-per-node=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --ntasks-per-node=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Maximum count of tasks per node.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -c, --cpus-per-task=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --cpus-per-task=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of CPUs required per (MPI-)task.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mem=&#039;&#039;value_in_MB&#039;&#039;&lt;br /&gt;
| #SBATCH --mem=&#039;&#039;value_in_MB&#039;&#039; &lt;br /&gt;
| Memory in MegaByte per node. (You should omit the setting of this option.)&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mem-per-cpu=&#039;&#039;value_in_MB&#039;&#039;&lt;br /&gt;
| #SBATCH --mem-per-cpu=&#039;&#039;value_in_MB&#039;&#039; &lt;br /&gt;
| Minimum Memory required per allocated CPU. (You should omit the setting of this option.)&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mail-type=&#039;&#039;type&#039;&#039;&lt;br /&gt;
| #SBATCH --mail-type=&#039;&#039;type&#039;&#039;&lt;br /&gt;
| Notify user by email when certain event types occur.&amp;lt;br&amp;gt;Valid type values are NONE, BEGIN, END, FAIL, REQUEUE, ALL.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mail-user=&#039;&#039;mail-address&#039;&#039;&lt;br /&gt;
| #SBATCH --mail-user=&#039;&#039;mail-address&#039;&#039;&lt;br /&gt;
|  The specified mail-address receives email notification of state changes as defined by --mail-type.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --output=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --output=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| File in which job output is stored. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --error=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --error=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| File in which job error messages are stored. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -J, --job-name=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --job-name=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| Job name.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --export=[ALL,] &#039;&#039;env-variables&#039;&#039;&lt;br /&gt;
| #SBATCH --export=[ALL,] &#039;&#039;env-variables&#039;&#039;&lt;br /&gt;
| Identifies which environment variables from the submission environment are propagated to the launched application. Default is ALL.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -A, --account=&#039;&#039;group-name&#039;&#039;&lt;br /&gt;
| #SBATCH --account=&#039;&#039;group-name&#039;&#039;&lt;br /&gt;
| Change resources used by this job to specified group. You may need this option if your account is assigned to more than one group. By command &amp;quot;scontrol show job&amp;quot; the project group the job is accounted on can be seen behind &amp;quot;Account=&amp;quot;. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -p, --partition=&#039;&#039;queue-name&#039;&#039;&lt;br /&gt;
| #SBATCH --partition=&#039;&#039;queue-name&#039;&#039;&lt;br /&gt;
| Request a specific queue for the resource allocation.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --reservation=&#039;&#039;reservation-name&#039;&#039;&lt;br /&gt;
| #SBATCH --reservation=&#039;&#039;reservation-name&#039;&#039;&lt;br /&gt;
| Use a specific reservation for the resource allocation.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -C, --constraint=&#039;&#039;LSDF&#039;&#039;&lt;br /&gt;
| #SBATCH --constraint=LSDF&lt;br /&gt;
| Job constraint LSDF filesystems.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -C, --constraint=&#039;&#039;BEEOND (BEEOND_4MDS, BEEOND_MAXMDS)&#039;&#039;&lt;br /&gt;
| #SBATCH --constraint=BEEOND (BEEOND_4MDS, BEEOND_MAXMDS)&lt;br /&gt;
| Job constraint BeeOND filesystem.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Interactive Jobs: salloc ==&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 3.0 you are only allowed to run short jobs (&amp;lt;&amp;lt; 1 hour) with little memory requirements (&amp;lt;&amp;lt; 8 GByte) on the logins nodes. If you want to run longer jobs and/or jobs with a request of more than 8 GByte of memory, you must allocate resources for so-called interactive jobs by usage of the command salloc on a login node. Considering a serial application running on a compute node that requires 5000 MByte of memory and limiting the interactive run to 2 hours the following command has to be executed:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ salloc -p cpu -n 1 -t 120 --mem=5000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then you will get one core on a compute node within the partition &amp;quot;cpu&amp;quot;. After execution of this command &#039;&#039;&#039;DO NOT CLOSE&#039;&#039;&#039; your current terminal session but wait until the queueing system Slurm has granted you the requested resources on the compute system. You will be logged in automatically on the granted core! To run a serial program on the granted core you only have to type the name of the executable.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./&amp;lt;my_serial_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please be aware that your serial job must run less than 2 hours in this example, else the job will be killed during runtime by the system. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can also start now a graphical X11-terminal connecting you to the dedicated resource that is available for 2 hours. You can start it by the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ xterm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that, once the walltime limit has been reached the resources - i.e. the compute node - will automatically be revoked.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
An interactive parallel application running on one compute node or on many compute nodes (e.g. here 5 nodes) with 96 cores each requires usually an amount of memory in GByte (e.g. 50 GByte) and a maximum time (e.g. 1 hour). E.g. 5 nodes can be allocated by the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ salloc -p cpu -N 5 --ntasks-per-node=96 -t 01:00:00  --mem=50gb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you can run parallel jobs on 480 cores requiring 50 GByte of memory per node. Please be aware that you will be logged in on core 0 of the first node.&lt;br /&gt;
If you want to have access to another node you have to open a new terminal, connect it also to bwUniCluster 3.0 and type the following commands to&lt;br /&gt;
connect to the running interactive job and then to a specific node:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ srun --jobid=XXXXXXXX --pty /bin/bash&lt;br /&gt;
$ srun --nodelist=uc3nXXX --pty /bin/bash&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ squeue&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the jobid and the nodelist can be shown.&lt;br /&gt;
&lt;br /&gt;
If you want to run MPI-programs, you can do it by simply typing mpirun &amp;lt;program_name&amp;gt;. Then your program will be run on 480 cores. A very simple example for starting a parallel job can be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mpirun &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also start the debugger ddt by the commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module add devel/ddt&lt;br /&gt;
$ ddt &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above commands will execute the parallel program &amp;lt;my_mpi_program&amp;gt; on all available cores. You can also start parallel programs on a subset of cores; an example for this can be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mpirun -n 50 &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are using Intel MPI you must start &amp;lt;my_mpi_program&amp;gt; by the command mpiexec.hydra (instead of mpirun).&lt;br /&gt;
&lt;br /&gt;
== Interactive Computing with Jupyter ==&lt;br /&gt;
&lt;br /&gt;
== Monitor and manage jobs ==&lt;br /&gt;
&lt;br /&gt;
=== List of your submitted jobs : squeue ===&lt;br /&gt;
Displays information about YOUR active, pending and/or recently completed jobs. The command displays all own active and pending jobs. The command squeue is explained in detail on the webpage https://slurm.schedmd.com/squeue.html or via manpage (man squeue).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;squeue&#039;&#039; example on bwUniCluster 3.0 &amp;lt;small&amp;gt;(Only your own jobs are displayed!)&amp;lt;/small&amp;gt;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ squeue &lt;br /&gt;
             JOBID PARTITION     NAME     USER ST       TIME  NODES NODELIST(REASON)&lt;br /&gt;
              1262       cpu     wrap ka_ab123  R       8:15      1 uc3n002&lt;br /&gt;
              1267 dev_gpu_h     wrap ka_ab123 PD       0:00      1 (Resources)&lt;br /&gt;
              1265   highmem     wrap ka_ab123  R       2:41      1 uc3n084&lt;br /&gt;
$ squeue -l&lt;br /&gt;
             JOBID PARTITION     NAME     USER    STATE       TIME TIME_LIMI  NODES NODELIST(REASON)&lt;br /&gt;
              1262       cpu     wrap ka_ab123  RUNNING       8:55     20:00      1 uc3n002&lt;br /&gt;
              1267 dev_gpu_h     wrap ka_ab123  PENDING       0:00     20:00      1 (Resources)&lt;br /&gt;
              1265   highmem     wrap ka_ab123  RUNNING       3:21     20:00      1 uc3n084&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Detailed job information : scontrol show job ===&lt;br /&gt;
scontrol show job displays detailed job state information and diagnostic output for all or a specified job of yours. Detailed information is available for active, pending and recently completed jobs. The command scontrol is explained in detail on the webpage https://slurm.schedmd.com/scontrol.html or via manpage (man scontrol). &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Display the state of all your jobs in normal mode: scontrol show job&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Display the state of a job with &amp;lt;jobid&amp;gt; in normal mode: scontrol show job &amp;lt;jobid&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Here is an example from bwUniCluster 3.0.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ squeue&lt;br /&gt;
JOBID PARTITION     NAME     USER ST       TIME  NODES NODELIST(REASON)&lt;br /&gt;
1262       cpu     wrap ka_zs040  R       1:12      1 uc3n002&lt;br /&gt;
&lt;br /&gt;
$&lt;br /&gt;
$ # now, see what&#039;s up with my pending job with jobid 1262&lt;br /&gt;
$ &lt;br /&gt;
$ scontrol show job 1262&lt;br /&gt;
&lt;br /&gt;
JobId=1262 JobName=wrap&lt;br /&gt;
   UserId=ka_zs0402(241992) GroupId=ka_scc(12345) MCS_label=N/A&lt;br /&gt;
   Priority=4246 Nice=0 Account=ka QOS=normal&lt;br /&gt;
   JobState=RUNNING Reason=None Dependency=(null)&lt;br /&gt;
   Requeue=1 Restarts=0 BatchFlag=1 Reboot=0 ExitCode=0:0&lt;br /&gt;
   RunTime=00:00:37 TimeLimit=00:20:00 TimeMin=N/A&lt;br /&gt;
   SubmitTime=2025-04-04T10:01:30 EligibleTime=2025-04-04T10:01:30&lt;br /&gt;
   AccrueTime=2025-04-04T10:01:30&lt;br /&gt;
   StartTime=2025-04-04T10:01:31 EndTime=2025-04-04T10:21:31 Deadline=N/A&lt;br /&gt;
   SuspendTime=None SecsPreSuspend=0 LastSchedEval=2025-04-04T10:01:31 Scheduler=Main&lt;br /&gt;
   Partition=cpu AllocNode:Sid=uc3n999:2819841&lt;br /&gt;
   ReqNodeList=(null) ExcNodeList=(null)&lt;br /&gt;
   NodeList=uc3n002&lt;br /&gt;
   BatchHost=uc3n002&lt;br /&gt;
   NumNodes=1 NumCPUs=2 NumTasks=1 CPUs/Task=1 ReqB:S:C:T=0:0:*:*&lt;br /&gt;
   ReqTRES=cpu=1,mem=2000M,node=1,billing=1&lt;br /&gt;
   AllocTRES=cpu=2,mem=4000M,node=1,billing=2&lt;br /&gt;
   Socks/Node=* NtasksPerN:B:S:C=0:0:*:1 CoreSpec=*&lt;br /&gt;
   MinCPUsNode=1 MinMemoryCPU=2000M MinTmpDiskNode=0&lt;br /&gt;
   Features=(null) DelayBoot=00:00:00&lt;br /&gt;
   OverSubscribe=OK Contiguous=0 Licenses=(null) Network=(null)&lt;br /&gt;
   Command=(null)&lt;br /&gt;
   WorkDir=/pfs/data6/home/ka/ka_scc/ka_zs0402&lt;br /&gt;
   StdErr=/pfs/data6/home/ka/ka_scc/ka_zs0402/slurm-1262.out&lt;br /&gt;
   StdIn=/dev/null&lt;br /&gt;
   StdOut=/pfs/data6/home/ka/ka_scc/ka_zs0402/slurm-1262.out&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=== Canceling own jobs : scancel ===&lt;br /&gt;
The scancel command is used to cancel jobs. The command scancel is explained in detail on the webpage https://slurm.schedmd.com/scancel.html or via manpage (man scancel). The command is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ scancel [-i] &amp;lt;job-id&amp;gt;&lt;br /&gt;
$ scancel -t &amp;lt;job_state_name&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Slurm Options =&lt;br /&gt;
[[BwUniCluster3.0/Running_Jobs/Slurm | Detailed Slurm usage]]&lt;br /&gt;
&lt;br /&gt;
= Best Practices =&lt;br /&gt;
&lt;br /&gt;
== Step-by-Step example==&lt;br /&gt;
&lt;br /&gt;
== Dos and Don&#039;ts ==&lt;/div&gt;</summary>
		<author><name>P Schuhmacher</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster3.0/Login&amp;diff=14698</id>
		<title>BwUniCluster3.0/Login</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster3.0/Login&amp;diff=14698"/>
		<updated>2025-04-08T08:55:25Z</updated>

		<summary type="html">&lt;p&gt;P Schuhmacher: /* Login with SSH command (Linux, Mac, Windows) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{|style=&amp;quot;background:#deffee; width:100%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;padding:5px; background:#cef2e0; text-align:left&amp;quot;|&lt;br /&gt;
[[Image:Attention.svg|center|25px]]&lt;br /&gt;
|style=&amp;quot;padding:5px; background:#cef2e0; text-align:left&amp;quot;|&lt;br /&gt;
Access to bwUniCluster 3.0 is &#039;&#039;&#039;limited to IP addresses from the BelWü network&#039;&#039;&#039;.&lt;br /&gt;
All home institutions of our current users are connected to BelWü, so if you are on your campus network (e.g. in your office or on the Campus WiFi) you should be able to connect to bwUniCluster 3.0 without restrictions.&lt;br /&gt;
If you are outside one of the BelWü networks (e.g. at home), a VPN connection to the home institution or a connection to an SSH jump host at the home institution must be established first.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The login nodes of the bwHPC clusters are the access point to the compute system, your &amp;lt;code&amp;gt;$HOME&amp;lt;/code&amp;gt; directory and your workspaces.&lt;br /&gt;
All users must log in through these nodes to submit jobs to the cluster.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Prerequisites for successful login:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You need to have&lt;br /&gt;
# Completed the 3-step [[registration|&#039;&#039;&#039;registration&#039;&#039;&#039;]] procedure.&lt;br /&gt;
# Set a [[Registration/Password|&#039;&#039;&#039;service password&#039;&#039;&#039;]] for bwUniCluster 3.0.&lt;br /&gt;
# Set up a [[Registration/2FA|&#039;&#039;&#039;second factor&#039;&#039;&#039;]] for the time-based one-time password (TOTP).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Login to the bwUniCluster =&lt;br /&gt;
&lt;br /&gt;
Login to the bwUniCluster 3.0 is only possible with a Secure Shell (SSH) client for which you must know your username on the cluster and the hostname of the login nodes.&lt;br /&gt;
For more general information on SSH clients, visit the [[BwUniCluster3.0/Login/Client|SSH Clients Guide]].&lt;br /&gt;
&lt;br /&gt;
== Username ==&lt;br /&gt;
&lt;br /&gt;
If you want to use the bwUniCluster 3.0 you need to add a prefix to your local username.&lt;br /&gt;
&lt;br /&gt;
For prefixes please refer to the [[Registration/Login/Username#Prefix_for_Universities|prefix table]].&lt;br /&gt;
&lt;br /&gt;
Examples:&amp;lt;br/&amp;gt;&lt;br /&gt;
* If your local username for the University is &amp;lt;code&amp;gt;ab123&amp;lt;/code&amp;gt; and you are a user from the University of Freiburg this would combine to: &amp;lt;code&amp;gt;fr_ab123&amp;lt;/code&amp;gt;.&lt;br /&gt;
* If your KIT username is &amp;lt;code&amp;gt;ab1234&amp;lt;/code&amp;gt; and you are a user from KIT this would combine to: &amp;lt;code&amp;gt;ka_ab1234&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Hostnames ==&lt;br /&gt;
&lt;br /&gt;
The system has two login nodes.&lt;br /&gt;
The selection of the login node is done automatically.&lt;br /&gt;
If you are logging in multiple times, different sessions might run on different login nodes.&lt;br /&gt;
&lt;br /&gt;
Login to bwUniCluster 3.0:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Hostname !! Node type&lt;br /&gt;
&amp;lt;!-- &lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;bwunicluster.scc.kit.edu&#039;&#039;&#039; || login to one of the two login nodes&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;uc3.scc.kit.edu&#039;&#039;&#039;          || login to one of the two login nodes&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In general, you should use automatic selection to allow us to balance the load over the three login nodes.&lt;br /&gt;
If you need to connect to specific login nodes, you can use the following hostnames:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Hostname !! Node type&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;uc3-login1.scc.kit.edu&#039;&#039;&#039; || bwUniCluster 3.0 first login node&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;uc3-login2.scc.kit.edu&#039;&#039;&#039; || bwUniCluster 3.0 second login node&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Host Keys ==&lt;br /&gt;
&lt;br /&gt;
When you log in, you may receive the message &amp;lt;code&amp;gt;The authenticity of host &#039;&amp;lt;host address&amp;gt;&#039; can&#039;t be established.&amp;lt;/code&amp;gt; along with the host key fingerprint. This is intended so you can verify the authenticity of the host you are connecting to. Before you continue you should verify, if this fingerprint matches one of the following:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Algorithm !! Fingerprint (SHA256)&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;RSA&#039;&#039;&#039; || SHA256:RaE0/tqQMMBmJuDCIo3WZ38YJsz0godVyt6aUOk/E0M&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;ECDSA&#039;&#039;&#039; || SHA256:LjBYL/x86ZAlL0JdlXrCmPYXvS3DaSiMuvycojBMdwQ&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;ED25519&#039;&#039;&#039; || SHA256:5mZYEpKigwK5ibBMHRrh3WIkOtCqomJW6H7OMbPk3ec&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Login with SSH command (Linux, Mac, Windows) ==&lt;br /&gt;
&lt;br /&gt;
Linux, Mac OS, other Unix-like operating systems and Microsoft Windows come with a built-in SSH client, most likely provided by the OpenSSH project.&lt;br /&gt;
&lt;br /&gt;
For login use one of the following ssh commands:&lt;br /&gt;
&lt;br /&gt;
 ssh &amp;lt;username&amp;gt; uc3.scc.kit.edu&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
 ssh &amp;lt;username&amp;gt;@bwunicluster.scc.kit.edu&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
To run graphical applications, you can use the &amp;lt;code&amp;gt;-X&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;-Y&amp;lt;/code&amp;gt; flag to &amp;lt;code&amp;gt;ssh&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 ssh -Y -l &amp;lt;username&amp;gt; bwunicluster.scc.kit.edu&lt;br /&gt;
&lt;br /&gt;
For better performance, we recommend using [[VNC]].&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Login with graphical SSH client (Windows) ==&lt;br /&gt;
&lt;br /&gt;
For Windows we suggest using  [[Data_Transfer/Graphical_Clients#MobaXterm|MobaXterm]] for login and file transfer.&lt;br /&gt;
 &lt;br /&gt;
Start &#039;&#039;MobaXterm&#039;&#039;, fill in the following fields:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Remote name              : uc3.scc.kit.edu    # or bwunicluster.scc.kit.edu&lt;br /&gt;
Specify user name        : &amp;lt;username&amp;gt;&lt;br /&gt;
Port                     : 22&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After that click on &#039;ok&#039;. Then a terminal will be opened and there you can enter your credentials.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; When using File transfer with MobaXterm version 23.6 the following configuration change has to be made:&lt;br /&gt;
In the settings in the tab &amp;quot;SSH&amp;quot;, change the option &amp;quot;SSH engine&amp;quot; from &amp;quot;&amp;lt;new&amp;gt;&amp;quot; to &amp;quot;&amp;lt;legacy&amp;gt;&amp;quot;. Then restart MobaXterm&lt;br /&gt;
&lt;br /&gt;
== Login with Jupyterhub ==&lt;br /&gt;
&lt;br /&gt;
Login takes place at:&lt;br /&gt;
* bwUniCluster 3.0: [https://uc3-jupyter.scc.kit.edu uc3-jupyter.scc.kit.edu]&lt;br /&gt;
* SDIL: [https://sdil-jupyter.scc.kit.edu sdil-jupyter.scc.kit.edu]&lt;br /&gt;
&lt;br /&gt;
More Information can be found [[BwUniCluster3.0/Jupyter#Login_process|here]].&lt;br /&gt;
&lt;br /&gt;
== Login Example ==&lt;br /&gt;
&lt;br /&gt;
To log in to bwUniCluster 3.0, you must provide your [[Registration/Password|service password]].&lt;br /&gt;
Proceed as follows:&lt;br /&gt;
# Use SSH for a login node.&lt;br /&gt;
# The system will ask for a one-time password &amp;lt;code&amp;gt;Your OTP:&amp;lt;/code&amp;gt;. Please enter your OTP and confirm it with Enter/Return. If you do not have a second factor yet, please create one (see [[Registration/2FA]]).&lt;br /&gt;
# The system will ask you for your service password &amp;lt;code&amp;gt;Password:&amp;lt;/code&amp;gt;. Please enter it and confirm it with Enter/Return. If you do not have a service password yet or have forgotten it, please create one (see [[Registration/Password]]).&lt;br /&gt;
# You will be greeted by the cluster, followed by a shell.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[user@client ~]$ ssh ka_ab1234@uc3.scc.kit.edu&lt;br /&gt;
(ka_ab1234@uc3.scc.kit.edu) Your OTP: cccccctlljdbrjdleujigivvfnkjbucudugjjlutfbrk&lt;br /&gt;
(ka_ab1234@uc3.scc.kit.edu) Password: &lt;br /&gt;
********************************************************************************&lt;br /&gt;
*                                                                              *&lt;br /&gt;
*                   Karlsruher Institut für Technologie (KIT)                  *&lt;br /&gt;
*                                                                              *&lt;br /&gt;
*                       Scientific Computing Center (SCC)                      *&lt;br /&gt;
*                                                                              *&lt;br /&gt;
*                            _    _    _____   ____                            *&lt;br /&gt;
*                           | |  | |  / ____| |___ \                           *&lt;br /&gt;
*                           | |  | | | |        __) |                          *&lt;br /&gt;
*                           | |  | | | |       |__ &amp;lt;                           *&lt;br /&gt;
*                           | |__| | | |____   ___) |                          *&lt;br /&gt;
*                            \____/   \_____| |____/                           *&lt;br /&gt;
*                                                                              *&lt;br /&gt;
*                                                                              *&lt;br /&gt;
*                  (KITE 2.0, RHEL 9.4, Lustre 2.14.0_ddn154)                  *&lt;br /&gt;
*                                                                              *&lt;br /&gt;
*                                                                              *&lt;br /&gt;
********************************************************************************&lt;br /&gt;
Last login: Wed Feb 26 11:08:20 2025 from 2a00:1398:4:181c:2be1:437b:1c36:1337&lt;br /&gt;
&lt;br /&gt;
[ka_ab1234@uc3n990 ~]$&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
See [[BwUniCluster3.0/FAQ#Login|bwUniCluster FAQ]].&lt;br /&gt;
&lt;br /&gt;
= Allowed Activities on Login Nodes =&lt;br /&gt;
&lt;br /&gt;
{|style=&amp;quot;background:#deffee; width:100%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;padding:5px; background:#ffa500; text-align:left&amp;quot;|&lt;br /&gt;
[[Image:Attention.svg|center|25px]]&lt;br /&gt;
|style=&amp;quot;padding:5px; background:#ffa500; text-align:left&amp;quot;|&lt;br /&gt;
To guarantee usability for all the users of clusters you must not run your compute jobs on the login nodes.&lt;br /&gt;
Compute jobs must be submitted to the queuing system.&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Any compute job running on the login nodes will be terminated without any notice.&#039;&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
Any long-running compilation or any long-running pre- or post-processing of batch jobs must also be submitted to the queuing system.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The login nodes of the bwHPC clusters are the access point to the compute system, your &amp;lt;code&amp;gt;$HOME&amp;lt;/code&amp;gt; directory and your workspaces.&lt;br /&gt;
These nodes are shared with all the users therefore, your activities on the login nodes are limited to primarily set up your batch jobs.&lt;br /&gt;
Your activities may also be:&lt;br /&gt;
* &#039;&#039;&#039;short&#039;&#039;&#039; compilation of your program code and&lt;br /&gt;
* &#039;&#039;&#039;light weight&#039;&#039;&#039; pre- and post-processing of your batch jobs.&lt;br /&gt;
&lt;br /&gt;
We advise users to use [[BwUniCluster3.0/Batch_Queues#Interactive_Jobs|interactive jobs]] for compute and memory intensive tasks like compiling.&lt;br /&gt;
&lt;br /&gt;
= Related Information =&lt;br /&gt;
&lt;br /&gt;
* If you want to reset your service password, consult the [[Registration/Password|Password Guide]].&lt;br /&gt;
* If you want to register a new token for the two factor authentication (2FA), consult the [[Registration/2FA|2FA Guide]].&lt;br /&gt;
* If you want to de-register, consult the [[Registration/Deregistration|De-registration Guide]].&lt;br /&gt;
* If you need an SSH key for your workflow, read [[Registration/SSH|Registering SSH Keys with your Cluster]].&lt;br /&gt;
* Configuring your shell: [[.bashrc Do&#039;s and Don&#039;ts]]&lt;/div&gt;</summary>
		<author><name>P Schuhmacher</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster3.0/Login&amp;diff=14697</id>
		<title>BwUniCluster3.0/Login</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster3.0/Login&amp;diff=14697"/>
		<updated>2025-04-08T08:54:20Z</updated>

		<summary type="html">&lt;p&gt;P Schuhmacher: /* Hostnames */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{|style=&amp;quot;background:#deffee; width:100%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;padding:5px; background:#cef2e0; text-align:left&amp;quot;|&lt;br /&gt;
[[Image:Attention.svg|center|25px]]&lt;br /&gt;
|style=&amp;quot;padding:5px; background:#cef2e0; text-align:left&amp;quot;|&lt;br /&gt;
Access to bwUniCluster 3.0 is &#039;&#039;&#039;limited to IP addresses from the BelWü network&#039;&#039;&#039;.&lt;br /&gt;
All home institutions of our current users are connected to BelWü, so if you are on your campus network (e.g. in your office or on the Campus WiFi) you should be able to connect to bwUniCluster 3.0 without restrictions.&lt;br /&gt;
If you are outside one of the BelWü networks (e.g. at home), a VPN connection to the home institution or a connection to an SSH jump host at the home institution must be established first.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The login nodes of the bwHPC clusters are the access point to the compute system, your &amp;lt;code&amp;gt;$HOME&amp;lt;/code&amp;gt; directory and your workspaces.&lt;br /&gt;
All users must log in through these nodes to submit jobs to the cluster.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Prerequisites for successful login:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You need to have&lt;br /&gt;
# Completed the 3-step [[registration|&#039;&#039;&#039;registration&#039;&#039;&#039;]] procedure.&lt;br /&gt;
# Set a [[Registration/Password|&#039;&#039;&#039;service password&#039;&#039;&#039;]] for bwUniCluster 3.0.&lt;br /&gt;
# Set up a [[Registration/2FA|&#039;&#039;&#039;second factor&#039;&#039;&#039;]] for the time-based one-time password (TOTP).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Login to the bwUniCluster =&lt;br /&gt;
&lt;br /&gt;
Login to the bwUniCluster 3.0 is only possible with a Secure Shell (SSH) client for which you must know your username on the cluster and the hostname of the login nodes.&lt;br /&gt;
For more general information on SSH clients, visit the [[BwUniCluster3.0/Login/Client|SSH Clients Guide]].&lt;br /&gt;
&lt;br /&gt;
== Username ==&lt;br /&gt;
&lt;br /&gt;
If you want to use the bwUniCluster 3.0 you need to add a prefix to your local username.&lt;br /&gt;
&lt;br /&gt;
For prefixes please refer to the [[Registration/Login/Username#Prefix_for_Universities|prefix table]].&lt;br /&gt;
&lt;br /&gt;
Examples:&amp;lt;br/&amp;gt;&lt;br /&gt;
* If your local username for the University is &amp;lt;code&amp;gt;ab123&amp;lt;/code&amp;gt; and you are a user from the University of Freiburg this would combine to: &amp;lt;code&amp;gt;fr_ab123&amp;lt;/code&amp;gt;.&lt;br /&gt;
* If your KIT username is &amp;lt;code&amp;gt;ab1234&amp;lt;/code&amp;gt; and you are a user from KIT this would combine to: &amp;lt;code&amp;gt;ka_ab1234&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Hostnames ==&lt;br /&gt;
&lt;br /&gt;
The system has two login nodes.&lt;br /&gt;
The selection of the login node is done automatically.&lt;br /&gt;
If you are logging in multiple times, different sessions might run on different login nodes.&lt;br /&gt;
&lt;br /&gt;
Login to bwUniCluster 3.0:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Hostname !! Node type&lt;br /&gt;
&amp;lt;!-- &lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;bwunicluster.scc.kit.edu&#039;&#039;&#039; || login to one of the two login nodes&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;uc3.scc.kit.edu&#039;&#039;&#039;          || login to one of the two login nodes&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In general, you should use automatic selection to allow us to balance the load over the three login nodes.&lt;br /&gt;
If you need to connect to specific login nodes, you can use the following hostnames:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Hostname !! Node type&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;uc3-login1.scc.kit.edu&#039;&#039;&#039; || bwUniCluster 3.0 first login node&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;uc3-login2.scc.kit.edu&#039;&#039;&#039; || bwUniCluster 3.0 second login node&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Host Keys ==&lt;br /&gt;
&lt;br /&gt;
When you log in, you may receive the message &amp;lt;code&amp;gt;The authenticity of host &#039;&amp;lt;host address&amp;gt;&#039; can&#039;t be established.&amp;lt;/code&amp;gt; along with the host key fingerprint. This is intended so you can verify the authenticity of the host you are connecting to. Before you continue you should verify, if this fingerprint matches one of the following:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Algorithm !! Fingerprint (SHA256)&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;RSA&#039;&#039;&#039; || SHA256:RaE0/tqQMMBmJuDCIo3WZ38YJsz0godVyt6aUOk/E0M&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;ECDSA&#039;&#039;&#039; || SHA256:LjBYL/x86ZAlL0JdlXrCmPYXvS3DaSiMuvycojBMdwQ&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;ED25519&#039;&#039;&#039; || SHA256:5mZYEpKigwK5ibBMHRrh3WIkOtCqomJW6H7OMbPk3ec&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Login with SSH command (Linux, Mac, Windows) ==&lt;br /&gt;
&lt;br /&gt;
Linux, Mac OS, other Unix-like operating systems and Microsoft Windows come with a built-in SSH client, most likely provided by the OpenSSH project.&lt;br /&gt;
&lt;br /&gt;
For login use one of the following ssh commands:&lt;br /&gt;
&lt;br /&gt;
 ssh &amp;lt;username&amp;gt; uc3.scc.kit.edu&lt;br /&gt;
 ssh &amp;lt;username&amp;gt;@bwunicluster.scc.kit.edu&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
To run graphical applications, you can use the &amp;lt;code&amp;gt;-X&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;-Y&amp;lt;/code&amp;gt; flag to &amp;lt;code&amp;gt;ssh&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 ssh -Y -l &amp;lt;username&amp;gt; bwunicluster.scc.kit.edu&lt;br /&gt;
&lt;br /&gt;
For better performance, we recommend using [[VNC]].&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Login with graphical SSH client (Windows) ==&lt;br /&gt;
&lt;br /&gt;
For Windows we suggest using  [[Data_Transfer/Graphical_Clients#MobaXterm|MobaXterm]] for login and file transfer.&lt;br /&gt;
 &lt;br /&gt;
Start &#039;&#039;MobaXterm&#039;&#039;, fill in the following fields:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Remote name              : uc3.scc.kit.edu    # or bwunicluster.scc.kit.edu&lt;br /&gt;
Specify user name        : &amp;lt;username&amp;gt;&lt;br /&gt;
Port                     : 22&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After that click on &#039;ok&#039;. Then a terminal will be opened and there you can enter your credentials.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; When using File transfer with MobaXterm version 23.6 the following configuration change has to be made:&lt;br /&gt;
In the settings in the tab &amp;quot;SSH&amp;quot;, change the option &amp;quot;SSH engine&amp;quot; from &amp;quot;&amp;lt;new&amp;gt;&amp;quot; to &amp;quot;&amp;lt;legacy&amp;gt;&amp;quot;. Then restart MobaXterm&lt;br /&gt;
&lt;br /&gt;
== Login with Jupyterhub ==&lt;br /&gt;
&lt;br /&gt;
Login takes place at:&lt;br /&gt;
* bwUniCluster 3.0: [https://uc3-jupyter.scc.kit.edu uc3-jupyter.scc.kit.edu]&lt;br /&gt;
* SDIL: [https://sdil-jupyter.scc.kit.edu sdil-jupyter.scc.kit.edu]&lt;br /&gt;
&lt;br /&gt;
More Information can be found [[BwUniCluster3.0/Jupyter#Login_process|here]].&lt;br /&gt;
&lt;br /&gt;
== Login Example ==&lt;br /&gt;
&lt;br /&gt;
To log in to bwUniCluster 3.0, you must provide your [[Registration/Password|service password]].&lt;br /&gt;
Proceed as follows:&lt;br /&gt;
# Use SSH for a login node.&lt;br /&gt;
# The system will ask for a one-time password &amp;lt;code&amp;gt;Your OTP:&amp;lt;/code&amp;gt;. Please enter your OTP and confirm it with Enter/Return. If you do not have a second factor yet, please create one (see [[Registration/2FA]]).&lt;br /&gt;
# The system will ask you for your service password &amp;lt;code&amp;gt;Password:&amp;lt;/code&amp;gt;. Please enter it and confirm it with Enter/Return. If you do not have a service password yet or have forgotten it, please create one (see [[Registration/Password]]).&lt;br /&gt;
# You will be greeted by the cluster, followed by a shell.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[user@client ~]$ ssh ka_ab1234@uc3.scc.kit.edu&lt;br /&gt;
(ka_ab1234@uc3.scc.kit.edu) Your OTP: cccccctlljdbrjdleujigivvfnkjbucudugjjlutfbrk&lt;br /&gt;
(ka_ab1234@uc3.scc.kit.edu) Password: &lt;br /&gt;
********************************************************************************&lt;br /&gt;
*                                                                              *&lt;br /&gt;
*                   Karlsruher Institut für Technologie (KIT)                  *&lt;br /&gt;
*                                                                              *&lt;br /&gt;
*                       Scientific Computing Center (SCC)                      *&lt;br /&gt;
*                                                                              *&lt;br /&gt;
*                            _    _    _____   ____                            *&lt;br /&gt;
*                           | |  | |  / ____| |___ \                           *&lt;br /&gt;
*                           | |  | | | |        __) |                          *&lt;br /&gt;
*                           | |  | | | |       |__ &amp;lt;                           *&lt;br /&gt;
*                           | |__| | | |____   ___) |                          *&lt;br /&gt;
*                            \____/   \_____| |____/                           *&lt;br /&gt;
*                                                                              *&lt;br /&gt;
*                                                                              *&lt;br /&gt;
*                  (KITE 2.0, RHEL 9.4, Lustre 2.14.0_ddn154)                  *&lt;br /&gt;
*                                                                              *&lt;br /&gt;
*                                                                              *&lt;br /&gt;
********************************************************************************&lt;br /&gt;
Last login: Wed Feb 26 11:08:20 2025 from 2a00:1398:4:181c:2be1:437b:1c36:1337&lt;br /&gt;
&lt;br /&gt;
[ka_ab1234@uc3n990 ~]$&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
See [[BwUniCluster3.0/FAQ#Login|bwUniCluster FAQ]].&lt;br /&gt;
&lt;br /&gt;
= Allowed Activities on Login Nodes =&lt;br /&gt;
&lt;br /&gt;
{|style=&amp;quot;background:#deffee; width:100%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;padding:5px; background:#ffa500; text-align:left&amp;quot;|&lt;br /&gt;
[[Image:Attention.svg|center|25px]]&lt;br /&gt;
|style=&amp;quot;padding:5px; background:#ffa500; text-align:left&amp;quot;|&lt;br /&gt;
To guarantee usability for all the users of clusters you must not run your compute jobs on the login nodes.&lt;br /&gt;
Compute jobs must be submitted to the queuing system.&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Any compute job running on the login nodes will be terminated without any notice.&#039;&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
Any long-running compilation or any long-running pre- or post-processing of batch jobs must also be submitted to the queuing system.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The login nodes of the bwHPC clusters are the access point to the compute system, your &amp;lt;code&amp;gt;$HOME&amp;lt;/code&amp;gt; directory and your workspaces.&lt;br /&gt;
These nodes are shared with all the users therefore, your activities on the login nodes are limited to primarily set up your batch jobs.&lt;br /&gt;
Your activities may also be:&lt;br /&gt;
* &#039;&#039;&#039;short&#039;&#039;&#039; compilation of your program code and&lt;br /&gt;
* &#039;&#039;&#039;light weight&#039;&#039;&#039; pre- and post-processing of your batch jobs.&lt;br /&gt;
&lt;br /&gt;
We advise users to use [[BwUniCluster3.0/Batch_Queues#Interactive_Jobs|interactive jobs]] for compute and memory intensive tasks like compiling.&lt;br /&gt;
&lt;br /&gt;
= Related Information =&lt;br /&gt;
&lt;br /&gt;
* If you want to reset your service password, consult the [[Registration/Password|Password Guide]].&lt;br /&gt;
* If you want to register a new token for the two factor authentication (2FA), consult the [[Registration/2FA|2FA Guide]].&lt;br /&gt;
* If you want to de-register, consult the [[Registration/Deregistration|De-registration Guide]].&lt;br /&gt;
* If you need an SSH key for your workflow, read [[Registration/SSH|Registering SSH Keys with your Cluster]].&lt;br /&gt;
* Configuring your shell: [[.bashrc Do&#039;s and Don&#039;ts]]&lt;/div&gt;</summary>
		<author><name>P Schuhmacher</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster3.0/Running_Jobs&amp;diff=14686</id>
		<title>BwUniCluster3.0/Running Jobs</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster3.0/Running_Jobs&amp;diff=14686"/>
		<updated>2025-04-07T06:11:39Z</updated>

		<summary type="html">&lt;p&gt;P Schuhmacher: /* Development Queues */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
= Purpose and function of a queuing system =&lt;br /&gt;
&lt;br /&gt;
All compute activities on bwUniCluster 3.0 have to be performed on the compute nodes. Compute nodes are only available by requesting the corresponding resources via the queuing system. As soon as the requested resources are available, automated tasks are executed via a batch script or they can be accessed interactively.&amp;lt;br&amp;gt;&lt;br /&gt;
General procedure: Hint to [[Running_Calculations | Running Calculations]]&lt;br /&gt;
&lt;br /&gt;
== Job submission process ==&lt;br /&gt;
&lt;br /&gt;
bwUniCluster 3.0 has installed the workload managing software Slurm. Therefore any job submission by the user is to be executed by commands of the Slurm software. Slurm queues and runs user jobs based on fair sharing policies.&lt;br /&gt;
&lt;br /&gt;
== Slurm ==&lt;br /&gt;
&lt;br /&gt;
HPC Workload Manager on bwUniCluster 3.0 is Slurm.&lt;br /&gt;
Slurm is a cluster management and job scheduling system. Slurm has three key functions. &lt;br /&gt;
* It allocates access to resources (compute cores on nodes) to users for some duration of time so they can perform work. &lt;br /&gt;
* It provides a framework for starting, executing, and monitoring work (normally a parallel job) on the set of allocated nodes. &lt;br /&gt;
* It arbitrates contention for resources by managing a queue of pending work.&lt;br /&gt;
&lt;br /&gt;
Any kind of calculation on the compute nodes of bwUniCluster 3.0 requires the user to define calculations as a sequence of commands together with required run time, number of CPU cores and main memory and submit all, i.e., the &#039;&#039;&#039;batch job&#039;&#039;&#039;, to a resource and workload managing software.&lt;br /&gt;
&lt;br /&gt;
== Terms and definitions ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Partitions &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Slurm manages job queues for different &#039;&#039;&#039;partitions&#039;&#039;&#039;. Partitions are used to group similar node types (e.g. nodes with and without accelerators) and to enforce different access policies and resource limits.&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 3.0 there are different partitions:&lt;br /&gt;
&lt;br /&gt;
* CPU-only nodes&lt;br /&gt;
** 2-socket nodes, consisting of 2 Intel Ice Lake processors with 32 cores each or 2 AMD processors with 48 cores each&lt;br /&gt;
** 2-socket nodes with very high RAM capacity, consisting of 2 AMD processors with 48 cores each&lt;br /&gt;
* GPU-accelerated nodes&lt;br /&gt;
** 2-socket nodes with 4x NVIDIA A100 or 4x NVIDIA H100 GPUs&lt;br /&gt;
** 4-socket node with 4x AMD Instinct accelerator&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Queues &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Job &#039;&#039;&#039;queues&#039;&#039;&#039; are used to manage jobs that request access to shared but limited computing resources of a certain kind (partition).&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 3.0 there are different main types of queues:&lt;br /&gt;
* Regular queues&lt;br /&gt;
** cpu: Jobs that request CPU-only nodes.&lt;br /&gt;
** gpu: Jobs that request GPU-accelerated nodes.&lt;br /&gt;
* Development queues (dev)&lt;br /&gt;
** Short, usually interactive jobs that are used for developing, compiling and testing code and workflows. The intention behind development queues is to provide users with immediate access to computer resources without having to wait. This is the place to realize instantaneous heavy compute without affecting other users, as would be the case on the login nodes.&lt;br /&gt;
&lt;br /&gt;
Requested compute resources such as (wall-)time, number of nodes and amount of memory are restricted and must fit into the boundaries imposed by the queues. The request for compute resources on the bwUniCluster 3.0 &amp;lt;font color=red&amp;gt;requires at least the specification of the &#039;&#039;&#039;queue&#039;&#039;&#039; and the &#039;&#039;&#039;time&#039;&#039;&#039;&amp;lt;/font&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Jobs &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Jobs can be run non-interactively as &#039;&#039;&#039;batch jobs&#039;&#039;&#039; or as &#039;&#039;&#039;interactive jobs&#039;&#039;&#039;.&amp;lt;br&amp;gt;&lt;br /&gt;
Submitting a batch job means, that all steps of a compute project are defined in a Bash script. This Bash script is queued and executed as soon as the compute resources are available and allocated. Jobs are enqueued with the &amp;lt;code&amp;gt;sbatch&amp;lt;/code&amp;gt; command.&lt;br /&gt;
For interactive jobs, the resources are requested with the &amp;lt;code&amp;gt;salloc&amp;lt;/code&amp;gt; command. As soon as the computing resources are available and allocated, a command line prompt is returned on a computing node and the user can freely dispose of the resources now available to him.&lt;br /&gt;
{|style=&amp;quot;background:#deffee; width:100%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;padding:5px; background:#cef2e0; text-align:left&amp;quot;|&lt;br /&gt;
[[Image:Attention.svg|center|25px]]&lt;br /&gt;
|style=&amp;quot;padding:5px; background:#cef2e0; text-align:left&amp;quot;|&lt;br /&gt;
&#039;&#039;&#039;Please remember:&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Heavy computations are not allowed on the login nodes&#039;&#039;&#039;.&amp;lt;br&amp;gt;Use a developement or a regular job queue instead! Please refer to [[BwUniCluster3.0/Login#Allowed_Activities_on_Login_Nodes|Allowed Activities on Login Nodes]].&lt;br /&gt;
* &#039;&#039;&#039;Development queues&#039;&#039;&#039; are meant for &#039;&#039;&#039;development tasks&#039;&#039;&#039;.&amp;lt;br&amp;gt;Do not misuse this queue for regular, short-running jobs or chain jobs! Only one running job at a time is enabled. Maximum queue length is reduced to 3.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Queues on bwUniCluster 3.0 = &lt;br /&gt;
== Policy ==&lt;br /&gt;
&lt;br /&gt;
The computing time is provided in accordance with the &#039;&#039;&#039;fair share policy&#039;&#039;&#039;. The individual investment shares of the respective university and the resources already used by its members are taken into account. Furthermore, the following throttling policy is also active: The &#039;&#039;&#039;maximum amount of cores&#039;&#039;&#039; used at any given time from jobs running is &#039;&#039;&#039;1920 per user&#039;&#039;&#039; (aggregated over all running jobs). This number corresponds to 30 nodes on the Ice Lake partition or 20 nodes on the standard partition. The aim is to minimize waiting times and maximize the number of users who can access computing time at the same time.&lt;br /&gt;
&lt;br /&gt;
== Regular Queues ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
! style=&amp;quot;width:5%&amp;quot;| Queue&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Node-Type&lt;br /&gt;
! style=&amp;quot;width:23%&amp;quot;| Default Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Minimal Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Maximum Resources&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;cpu_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Ice Lake&lt;br /&gt;
| mem-per-cpu=1950mb&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=30, mem=249600mb, ntasks-per-node=64, (threads-per-core=2) &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;cpu&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Standard&lt;br /&gt;
| mem-per-cpu=1125mb&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=20, mem=380000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;highmem&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;High Memory&lt;br /&gt;
| mem-per-cpu=1125mb&lt;br /&gt;
| mem=380001mb&lt;br /&gt;
| time=72:00:00, nodes=4, mem=2300000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;gpu_h100&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;NVIDIA GPU x4&lt;br /&gt;
| mem-per-cpu=1125mb&amp;lt;br/&amp;gt;cpus-per-gpu=24&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=12, mem=760000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;gpu_mi300&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU node&amp;lt;br/&amp;gt;AMD GPU x4&lt;br /&gt;
| mem-per-cpu=1125mb&amp;lt;br/&amp;gt;cpus-per-gpu=24&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=1, mem=510000mb, ntasks-per-node=40, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;gpu_a100_il&amp;lt;/code&amp;gt;/&amp;lt;code&amp;gt;gpu_h100_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;Ice Lake&amp;lt;br/&amp;gt;NVIDIA GPU x4&lt;br /&gt;
| mem-per-gpu=127500mb&amp;lt;br/&amp;gt;cpus-per-gpu=16&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=9, mem=510000mb, ntasks-per-node=64, (threads-per-core=2) &lt;br /&gt;
|}&lt;br /&gt;
Table 1: Regular Queues&lt;br /&gt;
&lt;br /&gt;
== Development Queues ==&lt;br /&gt;
Only for development, i.e. debugging or performance optimization ...&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
! style=&amp;quot;width:5%&amp;quot;| Queue&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Node Type&lt;br /&gt;
! style=&amp;quot;width:23%&amp;quot;| Default Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Minimal Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Maximum Resources&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_cpu_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Ice Lake&lt;br /&gt;
| mem-per-cpu=1950mb&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=8, mem=249600mb, ntasks-per-node=64, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_cpu&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Standard&lt;br /&gt;
| mem-per-cpu=1125mb&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=180000mb, ntasks-per-node=40, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_gpu_h100&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;NVIDIA GPU x4&lt;br /&gt;
| mem-per-cpu=1125mb&amp;lt;br/&amp;gt;cpus-per-gpu=24&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=180000mb, ntasks-per-node=40, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_gpu_a100_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;NVIDIA GPU x4&amp;lt;br/&amp;gt;&lt;br /&gt;
| mem-per-gpu=127500mb&amp;lt;br/&amp;gt;cpus-per-gpu=16 &lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=510000mb, ntasks-per-node=64, (threads-per-core=2) &lt;br /&gt;
|}&lt;br /&gt;
Table 2: Development Queues&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Default resources of a queue class define number of tasks and memory if not explicitly given with sbatch command. Resource list acronyms &#039;&#039;--time&#039;&#039;, &#039;&#039;--ntasks&#039;&#039;, &#039;&#039;--nodes&#039;&#039;, &#039;&#039;--mem&#039;&#039; and &#039;&#039;--mem-per-cpu&#039;&#039; are described [[BwUniCluster3.0/Running_Jobs/Slurm|here]].&lt;br /&gt;
&lt;br /&gt;
== Check available resources: sinfo_t_idle ==&lt;br /&gt;
The Slurm command sinfo is used to view partition and node information for a system running Slurm. It incorporates down time, reservations, and node state information in determining the available backfill window. The sinfo command can only be used by the administrator.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
SCC has prepared a special script (sinfo_t_idle) to find out how many processors are available for immediate use on the system. It is anticipated that users will use this information to submit jobs that meet these criteria and thus obtain quick job turnaround times. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The following command displays what resources are available for immediate use for the whole partition.&lt;br /&gt;
&amp;lt;pre&amp;gt;$ sinfo_t_idle&lt;br /&gt;
Partition dev_cpu                 :      2 nodes idle&lt;br /&gt;
Partition cpu                     :     68 nodes idle&lt;br /&gt;
Partition highmem                 :      4 nodes idle&lt;br /&gt;
Partition dev_gpu_h100            :      0 nodes idle&lt;br /&gt;
Partition gpu_h100                :     11 nodes idle&lt;br /&gt;
Partition gpu_mi300               :      1 nodes idle&lt;br /&gt;
Partition dev_cpu_il              :      0 nodes idle&lt;br /&gt;
Partition cpu_il                  :      0 nodes idle&lt;br /&gt;
Partition dev_gpu_a100_il         :      0 nodes idle&lt;br /&gt;
Partition gpu_a100_il             :      0 nodes idle&lt;br /&gt;
Partition gpu_h100_il             :      0 nodes idle&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Running Jobs =&lt;br /&gt;
&lt;br /&gt;
== Slurm Commands (excerpt) ==&lt;br /&gt;
Important Slurm commands for non-administrators working on bwUniCluster 3.0.&lt;br /&gt;
{| width=850px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Slurm commands !! Brief explanation&lt;br /&gt;
|-&lt;br /&gt;
| [[#Batch Jobs: sbatch|sbatch]] || Submits a job and puts it into the queue [[https://slurm.schedmd.com/sbatch.html sbatch]] &lt;br /&gt;
|-&lt;br /&gt;
| [[#Interactive Jobs: salloc|salloc]] || Requests resources for an interactive Job [[https://slurm.schedmd.com/salloc.html salloc]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Monitor and manage jobs |scontrol show job]] || Displays detailed job state information [[https://slurm.schedmd.com/scontrol.html scontrol]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#List of your submitted jobs : squeue|squeue]] || Displays information about active, eligible, blocked, and/or recently completed jobs [[https://slurm.schedmd.com/squeue.html squeue]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#List of your submitted jobs : squeue|squeue --start]] || Returns start time of submitted job [[https://slurm.schedmd.com/squeue.html squeue]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Check available resources: sinfo_t_idle|sinfo_t_idle]] || Shows what resources are available for immediate use [[https://slurm.schedmd.com/sinfo.html sinfo]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Canceling own jobs : scancel|scancel]] || Cancels a job [[https://slurm.schedmd.com/scancel.html scancel]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* [https://slurm.schedmd.com/tutorials.html  Slurm Tutorials]&lt;br /&gt;
* [https://slurm.schedmd.com/pdfs/summary.pdf  Slurm command/option summary (2 pages)]&lt;br /&gt;
* [https://slurm.schedmd.com/man_index.html  Slurm Commands]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Batch Jobs: sbatch ==&lt;br /&gt;
&lt;br /&gt;
Batch jobs are submitted by using the command &#039;&#039;&#039;sbatch&#039;&#039;&#039;. The main purpose of the &#039;&#039;&#039;sbatch&#039;&#039;&#039; command is to specify the resources that are needed to run the job. &#039;&#039;&#039;sbatch&#039;&#039;&#039; will then queue the batch job. However, starting of batch job depends on the availability of the requested resources and the fair sharing value.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The syntax and use of &#039;&#039;&#039;sbatch&#039;&#039;&#039; can be displayed via:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ man sbatch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;sbatch&#039;&#039;&#039; options can be used from the command line or in your job script. Different defaults for some of these options are set based on the queue and can be found [[BwUniCluster3.0/Slurm | here]]&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | sbatch Options&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width:8%&amp;quot;| Command line&lt;br /&gt;
! style=&amp;quot;width:9%&amp;quot;| Script&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Purpose&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -t, --time=&#039;&#039;time&#039;&#039;&lt;br /&gt;
| #SBATCH --time=&#039;&#039;time&#039;&#039;&lt;br /&gt;
| Wall clock time limit.&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -N, --nodes=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --nodes=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of nodes to be used.&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -n, --ntasks=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --ntasks=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of tasks to be launched.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --ntasks-per-node=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --ntasks-per-node=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Maximum count of tasks per node.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -c, --cpus-per-task=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --cpus-per-task=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of CPUs required per (MPI-)task.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mem=&#039;&#039;value_in_MB&#039;&#039;&lt;br /&gt;
| #SBATCH --mem=&#039;&#039;value_in_MB&#039;&#039; &lt;br /&gt;
| Memory in MegaByte per node. (You should omit the setting of this option.)&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mem-per-cpu=&#039;&#039;value_in_MB&#039;&#039;&lt;br /&gt;
| #SBATCH --mem-per-cpu=&#039;&#039;value_in_MB&#039;&#039; &lt;br /&gt;
| Minimum Memory required per allocated CPU. (You should omit the setting of this option.)&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mail-type=&#039;&#039;type&#039;&#039;&lt;br /&gt;
| #SBATCH --mail-type=&#039;&#039;type&#039;&#039;&lt;br /&gt;
| Notify user by email when certain event types occur.&amp;lt;br&amp;gt;Valid type values are NONE, BEGIN, END, FAIL, REQUEUE, ALL.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mail-user=&#039;&#039;mail-address&#039;&#039;&lt;br /&gt;
| #SBATCH --mail-user=&#039;&#039;mail-address&#039;&#039;&lt;br /&gt;
|  The specified mail-address receives email notification of state changes as defined by --mail-type.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --output=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --output=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| File in which job output is stored. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --error=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --error=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| File in which job error messages are stored. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -J, --job-name=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --job-name=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| Job name.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --export=[ALL,] &#039;&#039;env-variables&#039;&#039;&lt;br /&gt;
| #SBATCH --export=[ALL,] &#039;&#039;env-variables&#039;&#039;&lt;br /&gt;
| Identifies which environment variables from the submission environment are propagated to the launched application. Default is ALL.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -A, --account=&#039;&#039;group-name&#039;&#039;&lt;br /&gt;
| #SBATCH --account=&#039;&#039;group-name&#039;&#039;&lt;br /&gt;
| Change resources used by this job to specified group. You may need this option if your account is assigned to more than one group. By command &amp;quot;scontrol show job&amp;quot; the project group the job is accounted on can be seen behind &amp;quot;Account=&amp;quot;. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -p, --partition=&#039;&#039;queue-name&#039;&#039;&lt;br /&gt;
| #SBATCH --partition=&#039;&#039;queue-name&#039;&#039;&lt;br /&gt;
| Request a specific queue for the resource allocation.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --reservation=&#039;&#039;reservation-name&#039;&#039;&lt;br /&gt;
| #SBATCH --reservation=&#039;&#039;reservation-name&#039;&#039;&lt;br /&gt;
| Use a specific reservation for the resource allocation.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -C, --constraint=&#039;&#039;LSDF&#039;&#039;&lt;br /&gt;
| #SBATCH --constraint=LSDF&lt;br /&gt;
| Job constraint LSDF filesystems.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -C, --constraint=&#039;&#039;BEEOND (BEEOND_4MDS, BEEOND_MAXMDS)&#039;&#039;&lt;br /&gt;
| #SBATCH --constraint=BEEOND (BEEOND_4MDS, BEEOND_MAXMDS)&lt;br /&gt;
| Job constraint BeeOND filesystem.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Interactive Jobs: salloc ==&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 3.0 you are only allowed to run short jobs (&amp;lt;&amp;lt; 1 hour) with little memory requirements (&amp;lt;&amp;lt; 8 GByte) on the logins nodes. If you want to run longer jobs and/or jobs with a request of more than 8 GByte of memory, you must allocate resources for so-called interactive jobs by usage of the command salloc on a login node. Considering a serial application running on a compute node that requires 5000 MByte of memory and limiting the interactive run to 2 hours the following command has to be executed:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ salloc -p cpu -n 1 -t 120 --mem=5000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then you will get one core on a compute node within the partition &amp;quot;cpu&amp;quot;. After execution of this command &#039;&#039;&#039;DO NOT CLOSE&#039;&#039;&#039; your current terminal session but wait until the queueing system Slurm has granted you the requested resources on the compute system. You will be logged in automatically on the granted core! To run a serial program on the granted core you only have to type the name of the executable.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./&amp;lt;my_serial_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please be aware that your serial job must run less than 2 hours in this example, else the job will be killed during runtime by the system. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can also start now a graphical X11-terminal connecting you to the dedicated resource that is available for 2 hours. You can start it by the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ xterm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that, once the walltime limit has been reached the resources - i.e. the compute node - will automatically be revoked.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
An interactive parallel application running on one compute node or on many compute nodes (e.g. here 5 nodes) with 96 cores each requires usually an amount of memory in GByte (e.g. 50 GByte) and a maximum time (e.g. 1 hour). E.g. 5 nodes can be allocated by the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ salloc -p cpu -N 5 --ntasks-per-node=96 -t 01:00:00  --mem=50gb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you can run parallel jobs on 480 cores requiring 50 GByte of memory per node. Please be aware that you will be logged in on core 0 of the first node.&lt;br /&gt;
If you want to have access to another node you have to open a new terminal, connect it also to bwUniCluster 3.0 and type the following commands to&lt;br /&gt;
connect to the running interactive job and then to a specific node:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ srun --jobid=XXXXXXXX --pty /bin/bash&lt;br /&gt;
$ srun --nodelist=uc3nXXX --pty /bin/bash&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ squeue&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the jobid and the nodelist can be shown.&lt;br /&gt;
&lt;br /&gt;
If you want to run MPI-programs, you can do it by simply typing mpirun &amp;lt;program_name&amp;gt;. Then your program will be run on 480 cores. A very simple example for starting a parallel job can be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mpirun &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also start the debugger ddt by the commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module add devel/ddt&lt;br /&gt;
$ ddt &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above commands will execute the parallel program &amp;lt;my_mpi_program&amp;gt; on all available cores. You can also start parallel programs on a subset of cores; an example for this can be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mpirun -n 50 &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are using Intel MPI you must start &amp;lt;my_mpi_program&amp;gt; by the command mpiexec.hydra (instead of mpirun).&lt;br /&gt;
&lt;br /&gt;
== Interactive Computing with Jupyter ==&lt;br /&gt;
&lt;br /&gt;
== Monitor and manage jobs ==&lt;br /&gt;
&lt;br /&gt;
=== List of your submitted jobs : squeue ===&lt;br /&gt;
Displays information about YOUR active, pending and/or recently completed jobs. The command displays all own active and pending jobs. The command squeue is explained in detail on the webpage https://slurm.schedmd.com/squeue.html or via manpage (man squeue).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;squeue&#039;&#039; example on bwUniCluster 3.0 &amp;lt;small&amp;gt;(Only your own jobs are displayed!)&amp;lt;/small&amp;gt;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ squeue &lt;br /&gt;
             JOBID PARTITION     NAME     USER ST       TIME  NODES NODELIST(REASON)&lt;br /&gt;
              1262       cpu     wrap ka_ab123  R       8:15      1 uc3n002&lt;br /&gt;
              1267 dev_gpu_h     wrap ka_ab123 PD       0:00      1 (Resources)&lt;br /&gt;
              1265   highmem     wrap ka_ab123  R       2:41      1 uc3n084&lt;br /&gt;
$ squeue -l&lt;br /&gt;
             JOBID PARTITION     NAME     USER    STATE       TIME TIME_LIMI  NODES NODELIST(REASON)&lt;br /&gt;
              1262       cpu     wrap ka_ab123  RUNNING       8:55     20:00      1 uc3n002&lt;br /&gt;
              1267 dev_gpu_h     wrap ka_ab123  PENDING       0:00     20:00      1 (Resources)&lt;br /&gt;
              1265   highmem     wrap ka_ab123  RUNNING       3:21     20:00      1 uc3n084&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Detailed job information : scontrol show job ===&lt;br /&gt;
scontrol show job displays detailed job state information and diagnostic output for all or a specified job of yours. Detailed information is available for active, pending and recently completed jobs. The command scontrol is explained in detail on the webpage https://slurm.schedmd.com/scontrol.html or via manpage (man scontrol). &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Display the state of all your jobs in normal mode: scontrol show job&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Display the state of a job with &amp;lt;jobid&amp;gt; in normal mode: scontrol show job &amp;lt;jobid&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Here is an example from bwUniCluster 3.0.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ squeue&lt;br /&gt;
JOBID PARTITION     NAME     USER ST       TIME  NODES NODELIST(REASON)&lt;br /&gt;
1262       cpu     wrap ka_zs040  R       1:12      1 uc3n002&lt;br /&gt;
&lt;br /&gt;
$&lt;br /&gt;
$ # now, see what&#039;s up with my pending job with jobid 1262&lt;br /&gt;
$ &lt;br /&gt;
$ scontrol show job 1262&lt;br /&gt;
&lt;br /&gt;
JobId=1262 JobName=wrap&lt;br /&gt;
   UserId=ka_zs0402(241992) GroupId=ka_scc(12345) MCS_label=N/A&lt;br /&gt;
   Priority=4246 Nice=0 Account=ka QOS=normal&lt;br /&gt;
   JobState=RUNNING Reason=None Dependency=(null)&lt;br /&gt;
   Requeue=1 Restarts=0 BatchFlag=1 Reboot=0 ExitCode=0:0&lt;br /&gt;
   RunTime=00:00:37 TimeLimit=00:20:00 TimeMin=N/A&lt;br /&gt;
   SubmitTime=2025-04-04T10:01:30 EligibleTime=2025-04-04T10:01:30&lt;br /&gt;
   AccrueTime=2025-04-04T10:01:30&lt;br /&gt;
   StartTime=2025-04-04T10:01:31 EndTime=2025-04-04T10:21:31 Deadline=N/A&lt;br /&gt;
   SuspendTime=None SecsPreSuspend=0 LastSchedEval=2025-04-04T10:01:31 Scheduler=Main&lt;br /&gt;
   Partition=cpu AllocNode:Sid=uc3n999:2819841&lt;br /&gt;
   ReqNodeList=(null) ExcNodeList=(null)&lt;br /&gt;
   NodeList=uc3n002&lt;br /&gt;
   BatchHost=uc3n002&lt;br /&gt;
   NumNodes=1 NumCPUs=2 NumTasks=1 CPUs/Task=1 ReqB:S:C:T=0:0:*:*&lt;br /&gt;
   ReqTRES=cpu=1,mem=2000M,node=1,billing=1&lt;br /&gt;
   AllocTRES=cpu=2,mem=4000M,node=1,billing=2&lt;br /&gt;
   Socks/Node=* NtasksPerN:B:S:C=0:0:*:1 CoreSpec=*&lt;br /&gt;
   MinCPUsNode=1 MinMemoryCPU=2000M MinTmpDiskNode=0&lt;br /&gt;
   Features=(null) DelayBoot=00:00:00&lt;br /&gt;
   OverSubscribe=OK Contiguous=0 Licenses=(null) Network=(null)&lt;br /&gt;
   Command=(null)&lt;br /&gt;
   WorkDir=/pfs/data6/home/ka/ka_scc/ka_zs0402&lt;br /&gt;
   StdErr=/pfs/data6/home/ka/ka_scc/ka_zs0402/slurm-1262.out&lt;br /&gt;
   StdIn=/dev/null&lt;br /&gt;
   StdOut=/pfs/data6/home/ka/ka_scc/ka_zs0402/slurm-1262.out&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=== Canceling own jobs : scancel ===&lt;br /&gt;
The scancel command is used to cancel jobs. The command scancel is explained in detail on the webpage https://slurm.schedmd.com/scancel.html or via manpage (man scancel). The command is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ scancel [-i] &amp;lt;job-id&amp;gt;&lt;br /&gt;
$ scancel -t &amp;lt;job_state_name&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Slurm Options =&lt;br /&gt;
[[BwUniCluster3.0/Running_Jobs/Slurm | Detailed Slurm usage]]&lt;br /&gt;
&lt;br /&gt;
= Best Practices =&lt;br /&gt;
&lt;br /&gt;
== Step-by-Step example==&lt;br /&gt;
&lt;br /&gt;
== Dos and Don&#039;ts ==&lt;/div&gt;</summary>
		<author><name>P Schuhmacher</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster3.0/Running_Jobs&amp;diff=14685</id>
		<title>BwUniCluster3.0/Running Jobs</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster3.0/Running_Jobs&amp;diff=14685"/>
		<updated>2025-04-07T06:10:23Z</updated>

		<summary type="html">&lt;p&gt;P Schuhmacher: /* Regular Queues */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
= Purpose and function of a queuing system =&lt;br /&gt;
&lt;br /&gt;
All compute activities on bwUniCluster 3.0 have to be performed on the compute nodes. Compute nodes are only available by requesting the corresponding resources via the queuing system. As soon as the requested resources are available, automated tasks are executed via a batch script or they can be accessed interactively.&amp;lt;br&amp;gt;&lt;br /&gt;
General procedure: Hint to [[Running_Calculations | Running Calculations]]&lt;br /&gt;
&lt;br /&gt;
== Job submission process ==&lt;br /&gt;
&lt;br /&gt;
bwUniCluster 3.0 has installed the workload managing software Slurm. Therefore any job submission by the user is to be executed by commands of the Slurm software. Slurm queues and runs user jobs based on fair sharing policies.&lt;br /&gt;
&lt;br /&gt;
== Slurm ==&lt;br /&gt;
&lt;br /&gt;
HPC Workload Manager on bwUniCluster 3.0 is Slurm.&lt;br /&gt;
Slurm is a cluster management and job scheduling system. Slurm has three key functions. &lt;br /&gt;
* It allocates access to resources (compute cores on nodes) to users for some duration of time so they can perform work. &lt;br /&gt;
* It provides a framework for starting, executing, and monitoring work (normally a parallel job) on the set of allocated nodes. &lt;br /&gt;
* It arbitrates contention for resources by managing a queue of pending work.&lt;br /&gt;
&lt;br /&gt;
Any kind of calculation on the compute nodes of bwUniCluster 3.0 requires the user to define calculations as a sequence of commands together with required run time, number of CPU cores and main memory and submit all, i.e., the &#039;&#039;&#039;batch job&#039;&#039;&#039;, to a resource and workload managing software.&lt;br /&gt;
&lt;br /&gt;
== Terms and definitions ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Partitions &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Slurm manages job queues for different &#039;&#039;&#039;partitions&#039;&#039;&#039;. Partitions are used to group similar node types (e.g. nodes with and without accelerators) and to enforce different access policies and resource limits.&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 3.0 there are different partitions:&lt;br /&gt;
&lt;br /&gt;
* CPU-only nodes&lt;br /&gt;
** 2-socket nodes, consisting of 2 Intel Ice Lake processors with 32 cores each or 2 AMD processors with 48 cores each&lt;br /&gt;
** 2-socket nodes with very high RAM capacity, consisting of 2 AMD processors with 48 cores each&lt;br /&gt;
* GPU-accelerated nodes&lt;br /&gt;
** 2-socket nodes with 4x NVIDIA A100 or 4x NVIDIA H100 GPUs&lt;br /&gt;
** 4-socket node with 4x AMD Instinct accelerator&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Queues &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Job &#039;&#039;&#039;queues&#039;&#039;&#039; are used to manage jobs that request access to shared but limited computing resources of a certain kind (partition).&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 3.0 there are different main types of queues:&lt;br /&gt;
* Regular queues&lt;br /&gt;
** cpu: Jobs that request CPU-only nodes.&lt;br /&gt;
** gpu: Jobs that request GPU-accelerated nodes.&lt;br /&gt;
* Development queues (dev)&lt;br /&gt;
** Short, usually interactive jobs that are used for developing, compiling and testing code and workflows. The intention behind development queues is to provide users with immediate access to computer resources without having to wait. This is the place to realize instantaneous heavy compute without affecting other users, as would be the case on the login nodes.&lt;br /&gt;
&lt;br /&gt;
Requested compute resources such as (wall-)time, number of nodes and amount of memory are restricted and must fit into the boundaries imposed by the queues. The request for compute resources on the bwUniCluster 3.0 &amp;lt;font color=red&amp;gt;requires at least the specification of the &#039;&#039;&#039;queue&#039;&#039;&#039; and the &#039;&#039;&#039;time&#039;&#039;&#039;&amp;lt;/font&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Jobs &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Jobs can be run non-interactively as &#039;&#039;&#039;batch jobs&#039;&#039;&#039; or as &#039;&#039;&#039;interactive jobs&#039;&#039;&#039;.&amp;lt;br&amp;gt;&lt;br /&gt;
Submitting a batch job means, that all steps of a compute project are defined in a Bash script. This Bash script is queued and executed as soon as the compute resources are available and allocated. Jobs are enqueued with the &amp;lt;code&amp;gt;sbatch&amp;lt;/code&amp;gt; command.&lt;br /&gt;
For interactive jobs, the resources are requested with the &amp;lt;code&amp;gt;salloc&amp;lt;/code&amp;gt; command. As soon as the computing resources are available and allocated, a command line prompt is returned on a computing node and the user can freely dispose of the resources now available to him.&lt;br /&gt;
{|style=&amp;quot;background:#deffee; width:100%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;padding:5px; background:#cef2e0; text-align:left&amp;quot;|&lt;br /&gt;
[[Image:Attention.svg|center|25px]]&lt;br /&gt;
|style=&amp;quot;padding:5px; background:#cef2e0; text-align:left&amp;quot;|&lt;br /&gt;
&#039;&#039;&#039;Please remember:&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Heavy computations are not allowed on the login nodes&#039;&#039;&#039;.&amp;lt;br&amp;gt;Use a developement or a regular job queue instead! Please refer to [[BwUniCluster3.0/Login#Allowed_Activities_on_Login_Nodes|Allowed Activities on Login Nodes]].&lt;br /&gt;
* &#039;&#039;&#039;Development queues&#039;&#039;&#039; are meant for &#039;&#039;&#039;development tasks&#039;&#039;&#039;.&amp;lt;br&amp;gt;Do not misuse this queue for regular, short-running jobs or chain jobs! Only one running job at a time is enabled. Maximum queue length is reduced to 3.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Queues on bwUniCluster 3.0 = &lt;br /&gt;
== Policy ==&lt;br /&gt;
&lt;br /&gt;
The computing time is provided in accordance with the &#039;&#039;&#039;fair share policy&#039;&#039;&#039;. The individual investment shares of the respective university and the resources already used by its members are taken into account. Furthermore, the following throttling policy is also active: The &#039;&#039;&#039;maximum amount of cores&#039;&#039;&#039; used at any given time from jobs running is &#039;&#039;&#039;1920 per user&#039;&#039;&#039; (aggregated over all running jobs). This number corresponds to 30 nodes on the Ice Lake partition or 20 nodes on the standard partition. The aim is to minimize waiting times and maximize the number of users who can access computing time at the same time.&lt;br /&gt;
&lt;br /&gt;
== Regular Queues ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
! style=&amp;quot;width:5%&amp;quot;| Queue&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Node-Type&lt;br /&gt;
! style=&amp;quot;width:23%&amp;quot;| Default Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Minimal Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Maximum Resources&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;cpu_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Ice Lake&lt;br /&gt;
| mem-per-cpu=1950mb&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=30, mem=249600mb, ntasks-per-node=64, (threads-per-core=2) &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;cpu&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Standard&lt;br /&gt;
| mem-per-cpu=1125mb&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=20, mem=380000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;highmem&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;High Memory&lt;br /&gt;
| mem-per-cpu=1125mb&lt;br /&gt;
| mem=380001mb&lt;br /&gt;
| time=72:00:00, nodes=4, mem=2300000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;gpu_h100&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;NVIDIA GPU x4&lt;br /&gt;
| mem-per-cpu=1125mb&amp;lt;br/&amp;gt;cpus-per-gpu=24&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=12, mem=760000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;gpu_mi300&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU node&amp;lt;br/&amp;gt;AMD GPU x4&lt;br /&gt;
| mem-per-cpu=1125mb&amp;lt;br/&amp;gt;cpus-per-gpu=24&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=1, mem=510000mb, ntasks-per-node=40, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;gpu_a100_il&amp;lt;/code&amp;gt;/&amp;lt;code&amp;gt;gpu_h100_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;Ice Lake&amp;lt;br/&amp;gt;NVIDIA GPU x4&lt;br /&gt;
| mem-per-gpu=127500mb&amp;lt;br/&amp;gt;cpus-per-gpu=16&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=9, mem=510000mb, ntasks-per-node=64, (threads-per-core=2) &lt;br /&gt;
|}&lt;br /&gt;
Table 1: Regular Queues&lt;br /&gt;
&lt;br /&gt;
== Development Queues ==&lt;br /&gt;
Only for development, i.e. debugging or performance optimization ...&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
! style=&amp;quot;width:5%&amp;quot;| Queue&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Node Type&lt;br /&gt;
! style=&amp;quot;width:23%&amp;quot;| Default Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Minimal Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Maximum Resources&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_cpu_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Ice Lake&lt;br /&gt;
| mem-per-cpu=1950mb&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=8, mem=249600mb, ntasks-per-node=64, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_cpu&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Standard&lt;br /&gt;
| mem-per-cpu=1125mb&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=180000mb, ntasks-per-node=40, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_highmem&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;High Memory&lt;br /&gt;
| mem-per-cpu=1125mb&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=180000mb, ntasks-per-node=40, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_gpu_h100&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;NVIDIA GPU x4&lt;br /&gt;
| mem-per-cpu=1125mb&amp;lt;br/&amp;gt;cpus-per-gpu=24&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=180000mb, ntasks-per-node=40, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_gpu_a100_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;NVIDIA GPU x4&amp;lt;br/&amp;gt;&lt;br /&gt;
| mem-per-gpu=127500mb&amp;lt;br/&amp;gt;cpus-per-gpu=16 &lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=510000mb, ntasks-per-node=64, (threads-per-core=2) &lt;br /&gt;
|}&lt;br /&gt;
Table 2: Development Queues&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Default resources of a queue class define number of tasks and memory if not explicitly given with sbatch command. Resource list acronyms &#039;&#039;--time&#039;&#039;, &#039;&#039;--ntasks&#039;&#039;, &#039;&#039;--nodes&#039;&#039;, &#039;&#039;--mem&#039;&#039; and &#039;&#039;--mem-per-cpu&#039;&#039; are described [[BwUniCluster3.0/Running_Jobs/Slurm|here]].&lt;br /&gt;
&lt;br /&gt;
== Check available resources: sinfo_t_idle ==&lt;br /&gt;
The Slurm command sinfo is used to view partition and node information for a system running Slurm. It incorporates down time, reservations, and node state information in determining the available backfill window. The sinfo command can only be used by the administrator.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
SCC has prepared a special script (sinfo_t_idle) to find out how many processors are available for immediate use on the system. It is anticipated that users will use this information to submit jobs that meet these criteria and thus obtain quick job turnaround times. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The following command displays what resources are available for immediate use for the whole partition.&lt;br /&gt;
&amp;lt;pre&amp;gt;$ sinfo_t_idle&lt;br /&gt;
Partition dev_cpu                 :      2 nodes idle&lt;br /&gt;
Partition cpu                     :     68 nodes idle&lt;br /&gt;
Partition highmem                 :      4 nodes idle&lt;br /&gt;
Partition dev_gpu_h100            :      0 nodes idle&lt;br /&gt;
Partition gpu_h100                :     11 nodes idle&lt;br /&gt;
Partition gpu_mi300               :      1 nodes idle&lt;br /&gt;
Partition dev_cpu_il              :      0 nodes idle&lt;br /&gt;
Partition cpu_il                  :      0 nodes idle&lt;br /&gt;
Partition dev_gpu_a100_il         :      0 nodes idle&lt;br /&gt;
Partition gpu_a100_il             :      0 nodes idle&lt;br /&gt;
Partition gpu_h100_il             :      0 nodes idle&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Running Jobs =&lt;br /&gt;
&lt;br /&gt;
== Slurm Commands (excerpt) ==&lt;br /&gt;
Important Slurm commands for non-administrators working on bwUniCluster 3.0.&lt;br /&gt;
{| width=850px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Slurm commands !! Brief explanation&lt;br /&gt;
|-&lt;br /&gt;
| [[#Batch Jobs: sbatch|sbatch]] || Submits a job and puts it into the queue [[https://slurm.schedmd.com/sbatch.html sbatch]] &lt;br /&gt;
|-&lt;br /&gt;
| [[#Interactive Jobs: salloc|salloc]] || Requests resources for an interactive Job [[https://slurm.schedmd.com/salloc.html salloc]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Monitor and manage jobs |scontrol show job]] || Displays detailed job state information [[https://slurm.schedmd.com/scontrol.html scontrol]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#List of your submitted jobs : squeue|squeue]] || Displays information about active, eligible, blocked, and/or recently completed jobs [[https://slurm.schedmd.com/squeue.html squeue]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#List of your submitted jobs : squeue|squeue --start]] || Returns start time of submitted job [[https://slurm.schedmd.com/squeue.html squeue]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Check available resources: sinfo_t_idle|sinfo_t_idle]] || Shows what resources are available for immediate use [[https://slurm.schedmd.com/sinfo.html sinfo]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Canceling own jobs : scancel|scancel]] || Cancels a job [[https://slurm.schedmd.com/scancel.html scancel]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* [https://slurm.schedmd.com/tutorials.html  Slurm Tutorials]&lt;br /&gt;
* [https://slurm.schedmd.com/pdfs/summary.pdf  Slurm command/option summary (2 pages)]&lt;br /&gt;
* [https://slurm.schedmd.com/man_index.html  Slurm Commands]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Batch Jobs: sbatch ==&lt;br /&gt;
&lt;br /&gt;
Batch jobs are submitted by using the command &#039;&#039;&#039;sbatch&#039;&#039;&#039;. The main purpose of the &#039;&#039;&#039;sbatch&#039;&#039;&#039; command is to specify the resources that are needed to run the job. &#039;&#039;&#039;sbatch&#039;&#039;&#039; will then queue the batch job. However, starting of batch job depends on the availability of the requested resources and the fair sharing value.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The syntax and use of &#039;&#039;&#039;sbatch&#039;&#039;&#039; can be displayed via:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ man sbatch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;sbatch&#039;&#039;&#039; options can be used from the command line or in your job script. Different defaults for some of these options are set based on the queue and can be found [[BwUniCluster3.0/Slurm | here]]&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | sbatch Options&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width:8%&amp;quot;| Command line&lt;br /&gt;
! style=&amp;quot;width:9%&amp;quot;| Script&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Purpose&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -t, --time=&#039;&#039;time&#039;&#039;&lt;br /&gt;
| #SBATCH --time=&#039;&#039;time&#039;&#039;&lt;br /&gt;
| Wall clock time limit.&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -N, --nodes=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --nodes=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of nodes to be used.&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -n, --ntasks=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --ntasks=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of tasks to be launched.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --ntasks-per-node=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --ntasks-per-node=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Maximum count of tasks per node.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -c, --cpus-per-task=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --cpus-per-task=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of CPUs required per (MPI-)task.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mem=&#039;&#039;value_in_MB&#039;&#039;&lt;br /&gt;
| #SBATCH --mem=&#039;&#039;value_in_MB&#039;&#039; &lt;br /&gt;
| Memory in MegaByte per node. (You should omit the setting of this option.)&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mem-per-cpu=&#039;&#039;value_in_MB&#039;&#039;&lt;br /&gt;
| #SBATCH --mem-per-cpu=&#039;&#039;value_in_MB&#039;&#039; &lt;br /&gt;
| Minimum Memory required per allocated CPU. (You should omit the setting of this option.)&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mail-type=&#039;&#039;type&#039;&#039;&lt;br /&gt;
| #SBATCH --mail-type=&#039;&#039;type&#039;&#039;&lt;br /&gt;
| Notify user by email when certain event types occur.&amp;lt;br&amp;gt;Valid type values are NONE, BEGIN, END, FAIL, REQUEUE, ALL.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mail-user=&#039;&#039;mail-address&#039;&#039;&lt;br /&gt;
| #SBATCH --mail-user=&#039;&#039;mail-address&#039;&#039;&lt;br /&gt;
|  The specified mail-address receives email notification of state changes as defined by --mail-type.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --output=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --output=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| File in which job output is stored. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --error=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --error=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| File in which job error messages are stored. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -J, --job-name=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --job-name=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| Job name.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --export=[ALL,] &#039;&#039;env-variables&#039;&#039;&lt;br /&gt;
| #SBATCH --export=[ALL,] &#039;&#039;env-variables&#039;&#039;&lt;br /&gt;
| Identifies which environment variables from the submission environment are propagated to the launched application. Default is ALL.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -A, --account=&#039;&#039;group-name&#039;&#039;&lt;br /&gt;
| #SBATCH --account=&#039;&#039;group-name&#039;&#039;&lt;br /&gt;
| Change resources used by this job to specified group. You may need this option if your account is assigned to more than one group. By command &amp;quot;scontrol show job&amp;quot; the project group the job is accounted on can be seen behind &amp;quot;Account=&amp;quot;. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -p, --partition=&#039;&#039;queue-name&#039;&#039;&lt;br /&gt;
| #SBATCH --partition=&#039;&#039;queue-name&#039;&#039;&lt;br /&gt;
| Request a specific queue for the resource allocation.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --reservation=&#039;&#039;reservation-name&#039;&#039;&lt;br /&gt;
| #SBATCH --reservation=&#039;&#039;reservation-name&#039;&#039;&lt;br /&gt;
| Use a specific reservation for the resource allocation.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -C, --constraint=&#039;&#039;LSDF&#039;&#039;&lt;br /&gt;
| #SBATCH --constraint=LSDF&lt;br /&gt;
| Job constraint LSDF filesystems.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -C, --constraint=&#039;&#039;BEEOND (BEEOND_4MDS, BEEOND_MAXMDS)&#039;&#039;&lt;br /&gt;
| #SBATCH --constraint=BEEOND (BEEOND_4MDS, BEEOND_MAXMDS)&lt;br /&gt;
| Job constraint BeeOND filesystem.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Interactive Jobs: salloc ==&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 3.0 you are only allowed to run short jobs (&amp;lt;&amp;lt; 1 hour) with little memory requirements (&amp;lt;&amp;lt; 8 GByte) on the logins nodes. If you want to run longer jobs and/or jobs with a request of more than 8 GByte of memory, you must allocate resources for so-called interactive jobs by usage of the command salloc on a login node. Considering a serial application running on a compute node that requires 5000 MByte of memory and limiting the interactive run to 2 hours the following command has to be executed:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ salloc -p cpu -n 1 -t 120 --mem=5000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then you will get one core on a compute node within the partition &amp;quot;cpu&amp;quot;. After execution of this command &#039;&#039;&#039;DO NOT CLOSE&#039;&#039;&#039; your current terminal session but wait until the queueing system Slurm has granted you the requested resources on the compute system. You will be logged in automatically on the granted core! To run a serial program on the granted core you only have to type the name of the executable.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./&amp;lt;my_serial_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please be aware that your serial job must run less than 2 hours in this example, else the job will be killed during runtime by the system. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can also start now a graphical X11-terminal connecting you to the dedicated resource that is available for 2 hours. You can start it by the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ xterm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that, once the walltime limit has been reached the resources - i.e. the compute node - will automatically be revoked.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
An interactive parallel application running on one compute node or on many compute nodes (e.g. here 5 nodes) with 96 cores each requires usually an amount of memory in GByte (e.g. 50 GByte) and a maximum time (e.g. 1 hour). E.g. 5 nodes can be allocated by the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ salloc -p cpu -N 5 --ntasks-per-node=96 -t 01:00:00  --mem=50gb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you can run parallel jobs on 480 cores requiring 50 GByte of memory per node. Please be aware that you will be logged in on core 0 of the first node.&lt;br /&gt;
If you want to have access to another node you have to open a new terminal, connect it also to bwUniCluster 3.0 and type the following commands to&lt;br /&gt;
connect to the running interactive job and then to a specific node:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ srun --jobid=XXXXXXXX --pty /bin/bash&lt;br /&gt;
$ srun --nodelist=uc3nXXX --pty /bin/bash&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ squeue&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the jobid and the nodelist can be shown.&lt;br /&gt;
&lt;br /&gt;
If you want to run MPI-programs, you can do it by simply typing mpirun &amp;lt;program_name&amp;gt;. Then your program will be run on 480 cores. A very simple example for starting a parallel job can be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mpirun &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also start the debugger ddt by the commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module add devel/ddt&lt;br /&gt;
$ ddt &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above commands will execute the parallel program &amp;lt;my_mpi_program&amp;gt; on all available cores. You can also start parallel programs on a subset of cores; an example for this can be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mpirun -n 50 &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are using Intel MPI you must start &amp;lt;my_mpi_program&amp;gt; by the command mpiexec.hydra (instead of mpirun).&lt;br /&gt;
&lt;br /&gt;
== Interactive Computing with Jupyter ==&lt;br /&gt;
&lt;br /&gt;
== Monitor and manage jobs ==&lt;br /&gt;
&lt;br /&gt;
=== List of your submitted jobs : squeue ===&lt;br /&gt;
Displays information about YOUR active, pending and/or recently completed jobs. The command displays all own active and pending jobs. The command squeue is explained in detail on the webpage https://slurm.schedmd.com/squeue.html or via manpage (man squeue).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;squeue&#039;&#039; example on bwUniCluster 3.0 &amp;lt;small&amp;gt;(Only your own jobs are displayed!)&amp;lt;/small&amp;gt;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ squeue &lt;br /&gt;
             JOBID PARTITION     NAME     USER ST       TIME  NODES NODELIST(REASON)&lt;br /&gt;
              1262       cpu     wrap ka_ab123  R       8:15      1 uc3n002&lt;br /&gt;
              1267 dev_gpu_h     wrap ka_ab123 PD       0:00      1 (Resources)&lt;br /&gt;
              1265   highmem     wrap ka_ab123  R       2:41      1 uc3n084&lt;br /&gt;
$ squeue -l&lt;br /&gt;
             JOBID PARTITION     NAME     USER    STATE       TIME TIME_LIMI  NODES NODELIST(REASON)&lt;br /&gt;
              1262       cpu     wrap ka_ab123  RUNNING       8:55     20:00      1 uc3n002&lt;br /&gt;
              1267 dev_gpu_h     wrap ka_ab123  PENDING       0:00     20:00      1 (Resources)&lt;br /&gt;
              1265   highmem     wrap ka_ab123  RUNNING       3:21     20:00      1 uc3n084&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Detailed job information : scontrol show job ===&lt;br /&gt;
scontrol show job displays detailed job state information and diagnostic output for all or a specified job of yours. Detailed information is available for active, pending and recently completed jobs. The command scontrol is explained in detail on the webpage https://slurm.schedmd.com/scontrol.html or via manpage (man scontrol). &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Display the state of all your jobs in normal mode: scontrol show job&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Display the state of a job with &amp;lt;jobid&amp;gt; in normal mode: scontrol show job &amp;lt;jobid&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Here is an example from bwUniCluster 3.0.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ squeue&lt;br /&gt;
JOBID PARTITION     NAME     USER ST       TIME  NODES NODELIST(REASON)&lt;br /&gt;
1262       cpu     wrap ka_zs040  R       1:12      1 uc3n002&lt;br /&gt;
&lt;br /&gt;
$&lt;br /&gt;
$ # now, see what&#039;s up with my pending job with jobid 1262&lt;br /&gt;
$ &lt;br /&gt;
$ scontrol show job 1262&lt;br /&gt;
&lt;br /&gt;
JobId=1262 JobName=wrap&lt;br /&gt;
   UserId=ka_zs0402(241992) GroupId=ka_scc(12345) MCS_label=N/A&lt;br /&gt;
   Priority=4246 Nice=0 Account=ka QOS=normal&lt;br /&gt;
   JobState=RUNNING Reason=None Dependency=(null)&lt;br /&gt;
   Requeue=1 Restarts=0 BatchFlag=1 Reboot=0 ExitCode=0:0&lt;br /&gt;
   RunTime=00:00:37 TimeLimit=00:20:00 TimeMin=N/A&lt;br /&gt;
   SubmitTime=2025-04-04T10:01:30 EligibleTime=2025-04-04T10:01:30&lt;br /&gt;
   AccrueTime=2025-04-04T10:01:30&lt;br /&gt;
   StartTime=2025-04-04T10:01:31 EndTime=2025-04-04T10:21:31 Deadline=N/A&lt;br /&gt;
   SuspendTime=None SecsPreSuspend=0 LastSchedEval=2025-04-04T10:01:31 Scheduler=Main&lt;br /&gt;
   Partition=cpu AllocNode:Sid=uc3n999:2819841&lt;br /&gt;
   ReqNodeList=(null) ExcNodeList=(null)&lt;br /&gt;
   NodeList=uc3n002&lt;br /&gt;
   BatchHost=uc3n002&lt;br /&gt;
   NumNodes=1 NumCPUs=2 NumTasks=1 CPUs/Task=1 ReqB:S:C:T=0:0:*:*&lt;br /&gt;
   ReqTRES=cpu=1,mem=2000M,node=1,billing=1&lt;br /&gt;
   AllocTRES=cpu=2,mem=4000M,node=1,billing=2&lt;br /&gt;
   Socks/Node=* NtasksPerN:B:S:C=0:0:*:1 CoreSpec=*&lt;br /&gt;
   MinCPUsNode=1 MinMemoryCPU=2000M MinTmpDiskNode=0&lt;br /&gt;
   Features=(null) DelayBoot=00:00:00&lt;br /&gt;
   OverSubscribe=OK Contiguous=0 Licenses=(null) Network=(null)&lt;br /&gt;
   Command=(null)&lt;br /&gt;
   WorkDir=/pfs/data6/home/ka/ka_scc/ka_zs0402&lt;br /&gt;
   StdErr=/pfs/data6/home/ka/ka_scc/ka_zs0402/slurm-1262.out&lt;br /&gt;
   StdIn=/dev/null&lt;br /&gt;
   StdOut=/pfs/data6/home/ka/ka_scc/ka_zs0402/slurm-1262.out&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=== Canceling own jobs : scancel ===&lt;br /&gt;
The scancel command is used to cancel jobs. The command scancel is explained in detail on the webpage https://slurm.schedmd.com/scancel.html or via manpage (man scancel). The command is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ scancel [-i] &amp;lt;job-id&amp;gt;&lt;br /&gt;
$ scancel -t &amp;lt;job_state_name&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Slurm Options =&lt;br /&gt;
[[BwUniCluster3.0/Running_Jobs/Slurm | Detailed Slurm usage]]&lt;br /&gt;
&lt;br /&gt;
= Best Practices =&lt;br /&gt;
&lt;br /&gt;
== Step-by-Step example==&lt;br /&gt;
&lt;br /&gt;
== Dos and Don&#039;ts ==&lt;/div&gt;</summary>
		<author><name>P Schuhmacher</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster3.0/Running_Jobs&amp;diff=14652</id>
		<title>BwUniCluster3.0/Running Jobs</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster3.0/Running_Jobs&amp;diff=14652"/>
		<updated>2025-04-04T15:25:24Z</updated>

		<summary type="html">&lt;p&gt;P Schuhmacher: /* Purpose and function of a queuing system */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
= Purpose and function of a queuing system =&lt;br /&gt;
&lt;br /&gt;
General procedure: Hint to [[Running_Calculations | Running Calculations]]&lt;br /&gt;
&lt;br /&gt;
== Job submission process ==&lt;br /&gt;
&lt;br /&gt;
bwUniCluster 3.0 has installed the workload managing software Slurm. Therefore any job submission by the user is to be executed by commands of the Slurm software. Slurm queues and runs user jobs based on fair sharing policies.&lt;br /&gt;
&lt;br /&gt;
== Slurm ==&lt;br /&gt;
&lt;br /&gt;
HPC Workload Manager on bwUniCluster 3.0 is Slurm.&lt;br /&gt;
Slurm is a cluster management and job scheduling system. Slurm has three key functions. &lt;br /&gt;
* First, it allocates access to resources (compute cores on nodes) to users for some duration of time so they can perform work. &lt;br /&gt;
* it provides a framework for starting, executing, and monitoring work (normally a parallel job) on the set of allocated nodes. &lt;br /&gt;
* it arbitrates contention for resources by managing a queue of pending work.&lt;br /&gt;
&lt;br /&gt;
Any kind of calculation on the compute nodes of bwUniCluster 3.0 requires the user to define calculations as a sequence of commands together with required run time, number of CPU cores and main memory and submit all, i.e., the &#039;&#039;&#039;batch job&#039;&#039;&#039;, to a resource and workload managing software. &lt;br /&gt;
== Terms and definitions ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Partitions &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Slurm manages job queues for different &#039;&#039;&#039;partitions&#039;&#039;&#039;. Partitions are used to group similar node types (e.g. nodes with and without accelerators) and to enforce different access policies and resource limits.&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 3.0 there are different partitions:&lt;br /&gt;
&lt;br /&gt;
* CPU-only nodes&lt;br /&gt;
** 2-socket nodes, consisting of 2 Intel Ice Lake processors with 32 cores each or 2 AMD processors with 48 cores each&lt;br /&gt;
** 2-socket nodes with very high RAM capacity, consisting of 2 AMD processors with 48 cores each&lt;br /&gt;
* GPU-accelerated nodes&lt;br /&gt;
** 2-socket nodes with 4x NVIDIA A100 or 4x NVIDIA H100 GPUs&lt;br /&gt;
** 4-socket node with 4x AMD Instinct accelerator&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Queues &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Job &#039;&#039;&#039;queues&#039;&#039;&#039; are used to manage jobs that request access to shared but limited computing resources of a certain kind (partition).&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 3.0 there are different main types of queues:&lt;br /&gt;
* Regular queues&lt;br /&gt;
** cpu: Jobs that request CPU-only nodes.&lt;br /&gt;
** gpu: Jobs that request GPU-accelerated nodes.&lt;br /&gt;
* Development queues (dev)&lt;br /&gt;
** Short, usually interactive jobs that are used for developing, compiling and testing code and workflows. The intention behind development queues is to provide users with immediate access to computer resources without having to wait. This is the place to realize instantaneous heavy compute without affecting other users, as would be the case on the login nodes.&lt;br /&gt;
&lt;br /&gt;
Requested compute resources such as (wall-)time, number of nodes and amount of memory are restricted and must fit into the boundaries imposed by the queues. The request for compute resources on the bwUniCluster 3.0 &amp;lt;font color=red&amp;gt;requires at least the specification of the &#039;&#039;&#039;queue&#039;&#039;&#039; and the &#039;&#039;&#039;time&#039;&#039;&#039;&amp;lt;/font&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Jobs &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Jobs can be run non-interactively as &#039;&#039;&#039;batch jobs&#039;&#039;&#039; or as &#039;&#039;&#039;interactive jobs&#039;&#039;&#039;.&lt;br /&gt;
Submitting a batch job means, that all steps of a compute project are defined in a Bash script. This Bash script is queued and executed as soon as the compute resources are available and allocated. Jobs are enqueued with the &#039;&#039;sbatch&#039;&#039; command.&lt;br /&gt;
&lt;br /&gt;
For interactive jobs, the resources are requested with the &#039;&#039;salloc&#039;&#039; command. As soon as the computing resources are available and allocated, a command line prompt is returned on a computing node and the user can freely dispose of the resources now available to him.&lt;br /&gt;
{|style=&amp;quot;background:#deffee; width:100%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;padding:5px; background:#cef2e0; text-align:left&amp;quot;|&lt;br /&gt;
[[Image:Attention.svg|center|25px]]&lt;br /&gt;
|style=&amp;quot;padding:5px; background:#cef2e0; text-align:left&amp;quot;|&lt;br /&gt;
&#039;&#039;&#039;Please remember:&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Heavy computations are not allowed on the login nodes&#039;&#039;&#039;.&amp;lt;br&amp;gt;Use a developement or a regular job queue instead! Please refer to [[BwUniCluster3.0/Login#Allowed_Activities_on_Login_Nodes|Allowed Activities on Login Nodes]].&lt;br /&gt;
* &#039;&#039;&#039;Development queues&#039;&#039;&#039; are meant for &#039;&#039;&#039;development tasks&#039;&#039;&#039;.&amp;lt;br&amp;gt;Do not misuse this queue for regular, short-running jobs or chain jobs! Only one running job at a time is enabled. Maximum queue length is reduced to 3.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Queues on bwUniCluster 3.0 = &lt;br /&gt;
== Policy ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Regular Queues ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
! style=&amp;quot;width:5%&amp;quot;| Queue&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Node-Type&lt;br /&gt;
! style=&amp;quot;width:23%&amp;quot;| Default Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Minimal Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Maximum Resources&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;cpu_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Ice Lake&lt;br /&gt;
| mem-per-cpu=1950mb&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=30, mem=249600mb, ntasks-per-node=64, (threads-per-core=2) &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;cpu&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Standard&lt;br /&gt;
| mem-per-cpu=1125mb&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=20, mem=380000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;highmem&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;High Memory&lt;br /&gt;
| mem-per-cpu=1125mb&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=4, mem=2300000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;gpu_h100&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;NVIDIA GPU x4&lt;br /&gt;
| mem-per-cpu=1125mb&amp;lt;br/&amp;gt;cpus-per-gpu=24&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=12, mem=760000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;gpu_mi300&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU node&amp;lt;br/&amp;gt;AMD GPU x4&lt;br /&gt;
| mem-per-cpu=1125mb&amp;lt;br/&amp;gt;cpus-per-gpu=24&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=1, mem=510000mb, ntasks-per-node=40, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;gpu_a100_il&amp;lt;/code&amp;gt;/&amp;lt;code&amp;gt;gpu_h100_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;Ice Lake&amp;lt;br/&amp;gt;NVIDIA GPU x4&lt;br /&gt;
| mem-per-gpu=127500mb&amp;lt;br/&amp;gt;cpus-per-gpu=16&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=9, mem=510000mb, ntasks-per-node=64, (threads-per-core=2) &lt;br /&gt;
|}&lt;br /&gt;
Table 1: Regular Queues&lt;br /&gt;
&lt;br /&gt;
== Development Queues ==&lt;br /&gt;
Only for development, i.e. debugging or performance optimization ...&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
! style=&amp;quot;width:5%&amp;quot;| Queue&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Node Type&lt;br /&gt;
! style=&amp;quot;width:23%&amp;quot;| Default Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Minimal Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Maximum Resources&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_cpu_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Ice Lake&lt;br /&gt;
| mem-per-cpu=1950mb&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=8, mem=249600mb, ntasks-per-node=64, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_cpu&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Standard&lt;br /&gt;
| mem-per-cpu=1125mb&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=180000mb, ntasks-per-node=40, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_highmem&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;High Memory&lt;br /&gt;
| mem-per-cpu=1125mb&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=180000mb, ntasks-per-node=40, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_gpu_h100&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;NVIDIA GPU x4&lt;br /&gt;
| mem-per-cpu=1125mb&amp;lt;br/&amp;gt;cpus-per-gpu=24&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=180000mb, ntasks-per-node=40, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_gpu_a100_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;NVIDIA GPU x4&amp;lt;br/&amp;gt;&lt;br /&gt;
| mem-per-gpu=127500mb&amp;lt;br/&amp;gt;cpus-per-gpu=16 &lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=510000mb, ntasks-per-node=64, (threads-per-core=2) &lt;br /&gt;
|}&lt;br /&gt;
Table 2: Development Queues&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Default resources of a queue class defines time, #tasks and memory if not explicitly given with sbatch command. Resource list acronyms &#039;&#039;--time&#039;&#039;, &#039;&#039;--ntasks&#039;&#039;, &#039;&#039;--nodes&#039;&#039;, &#039;&#039;--mem&#039;&#039; and &#039;&#039;--mem-per-cpu&#039;&#039; are described [[BwUniCluster_3.0_Slurm_common_Features|here]].&lt;br /&gt;
&lt;br /&gt;
== Check available resources: sinfo_t_idle ==&lt;br /&gt;
The Slurm command sinfo is used to view partition and node information for a system running Slurm. It incorporates down time, reservations, and node state information in determining the available backfill window. The sinfo command can only be used by the administrator.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
SCC has prepared a special script (sinfo_t_idle) to find out how many processors are available for immediate use on the system. It is anticipated that users will use this information to submit jobs that meet these criteria and thus obtain quick job turnaround times. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The following command displays what resources are available for immediate use for the whole partition.&lt;br /&gt;
&amp;lt;pre&amp;gt;$ sinfo_t_idle&lt;br /&gt;
Partition dev_cpu                 :      2 nodes idle&lt;br /&gt;
Partition cpu                     :     68 nodes idle&lt;br /&gt;
Partition highmem                 :      4 nodes idle&lt;br /&gt;
Partition dev_gpu_h100            :      0 nodes idle&lt;br /&gt;
Partition gpu_h100                :     11 nodes idle&lt;br /&gt;
Partition gpu_mi300               :      1 nodes idle&lt;br /&gt;
Partition dev_cpu_il              :      0 nodes idle&lt;br /&gt;
Partition cpu_il                  :      0 nodes idle&lt;br /&gt;
Partition dev_gpu_a100_il         :      0 nodes idle&lt;br /&gt;
Partition gpu_a100_il             :      0 nodes idle&lt;br /&gt;
Partition gpu_h100_il             :      0 nodes idle&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Running Jobs =&lt;br /&gt;
&lt;br /&gt;
== Slurm Commands (excerpt) ==&lt;br /&gt;
Important Slurm commands for non-administrators working on bwUniCluster 3.0.&lt;br /&gt;
{| width=850px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Slurm commands !! Brief explanation&lt;br /&gt;
|-&lt;br /&gt;
| [[#Batch Jobs: sbatch|sbatch]] || Submits a job and puts it into the queue [[https://slurm.schedmd.com/sbatch.html sbatch]] &lt;br /&gt;
|-&lt;br /&gt;
| [[#Interactive Jobs: salloc|salloc]] || Requests resources for an interactive Job [[https://slurm.schedmd.com/salloc.html salloc]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Monitor and manage jobs |scontrol show job]] || Displays detailed job state information [[https://slurm.schedmd.com/scontrol.html scontrol]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#List of your submitted jobs : squeue|squeue]] || Displays information about active, eligible, blocked, and/or recently completed jobs [[https://slurm.schedmd.com/squeue.html squeue]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#List of your submitted jobs : squeue|squeue --start]] || Returns start time of submitted job [[https://slurm.schedmd.com/squeue.html squeue]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Check available resources: sinfo_t_idle|sinfo_t_idle]] || Shows what resources are available for immediate use [[https://slurm.schedmd.com/sinfo.html sinfo]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Canceling own jobs : scancel|scancel]] || Cancels a job [[https://slurm.schedmd.com/scancel.html scancel]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* [https://slurm.schedmd.com/tutorials.html  Slurm Tutorials]&lt;br /&gt;
* [https://slurm.schedmd.com/pdfs/summary.pdf  Slurm command/option summary (2 pages)]&lt;br /&gt;
* [https://slurm.schedmd.com/man_index.html  Slurm Commands]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Batch Jobs: sbatch ==&lt;br /&gt;
&lt;br /&gt;
Batch jobs are submitted by using the command &#039;&#039;&#039;sbatch&#039;&#039;&#039;. The main purpose of the &#039;&#039;&#039;sbatch&#039;&#039;&#039; command is to specify the resources that are needed to run the job. &#039;&#039;&#039;sbatch&#039;&#039;&#039; will then queue the batch job. However, starting of batch job depends on the availability of the requested resources and the fair sharing value.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The syntax and use of &#039;&#039;&#039;sbatch&#039;&#039;&#039; can be displayed via:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ man sbatch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;sbatch&#039;&#039;&#039; options can be used from the command line or in your job script. Different defaults for some of these options are set based on the queue and can be found [https://wiki.bwhpc.de/e/BwUniCluster3.0/Batch_Queues#sbatch_-p_queue here]&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | sbatch Options&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width:8%&amp;quot;| Command line&lt;br /&gt;
! style=&amp;quot;width:9%&amp;quot;| Script&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Purpose&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -t, --time=&#039;&#039;time&#039;&#039;&lt;br /&gt;
| #SBATCH --time=&#039;&#039;time&#039;&#039;&lt;br /&gt;
| Wall clock time limit.&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -N, --nodes=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --nodes=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of nodes to be used.&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -n, --ntasks=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --ntasks=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of tasks to be launched.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --ntasks-per-node=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --ntasks-per-node=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Maximum count of tasks per node.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -c, --cpus-per-task=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --cpus-per-task=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of CPUs required per (MPI-)task.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mem=&#039;&#039;value_in_MB&#039;&#039;&lt;br /&gt;
| #SBATCH --mem=&#039;&#039;value_in_MB&#039;&#039; &lt;br /&gt;
| Memory in MegaByte per node. (You should omit the setting of this option.)&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mem-per-cpu=&#039;&#039;value_in_MB&#039;&#039;&lt;br /&gt;
| #SBATCH --mem-per-cpu=&#039;&#039;value_in_MB&#039;&#039; &lt;br /&gt;
| Minimum Memory required per allocated CPU. (You should omit the setting of this option.)&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mail-type=&#039;&#039;type&#039;&#039;&lt;br /&gt;
| #SBATCH --mail-type=&#039;&#039;type&#039;&#039;&lt;br /&gt;
| Notify user by email when certain event types occur.&amp;lt;br&amp;gt;Valid type values are NONE, BEGIN, END, FAIL, REQUEUE, ALL.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mail-user=&#039;&#039;mail-address&#039;&#039;&lt;br /&gt;
| #SBATCH --mail-user=&#039;&#039;mail-address&#039;&#039;&lt;br /&gt;
|  The specified mail-address receives email notification of state changes as defined by --mail-type.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --output=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --output=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| File in which job output is stored. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --error=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --error=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| File in which job error messages are stored. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -J, --job-name=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --job-name=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| Job name.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --export=[ALL,] &#039;&#039;env-variables&#039;&#039;&lt;br /&gt;
| #SBATCH --export=[ALL,] &#039;&#039;env-variables&#039;&#039;&lt;br /&gt;
| Identifies which environment variables from the submission environment are propagated to the launched application. Default is ALL.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -A, --account=&#039;&#039;group-name&#039;&#039;&lt;br /&gt;
| #SBATCH --account=&#039;&#039;group-name&#039;&#039;&lt;br /&gt;
| Change resources used by this job to specified group. You may need this option if your account is assigned to more than one group. By command &amp;quot;scontrol show job&amp;quot; the project group the job is accounted on can be seen behind &amp;quot;Account=&amp;quot;. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -p, --partition=&#039;&#039;queue-name&#039;&#039;&lt;br /&gt;
| #SBATCH --partition=&#039;&#039;queue-name&#039;&#039;&lt;br /&gt;
| Request a specific queue for the resource allocation.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --reservation=&#039;&#039;reservation-name&#039;&#039;&lt;br /&gt;
| #SBATCH --reservation=&#039;&#039;reservation-name&#039;&#039;&lt;br /&gt;
| Use a specific reservation for the resource allocation.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -C, --constraint=&#039;&#039;LSDF&#039;&#039;&lt;br /&gt;
| #SBATCH --constraint=LSDF&lt;br /&gt;
| Job constraint LSDF filesystems.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -C, --constraint=&#039;&#039;BEEOND (BEEOND_4MDS, BEEOND_MAXMDS)&#039;&#039;&lt;br /&gt;
| #SBATCH --constraint=BEEOND (BEEOND_4MDS, BEEOND_MAXMDS)&lt;br /&gt;
| Job constraint BeeOND filesystem.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Interactive Jobs: salloc ==&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 3.0 you are only allowed to run short jobs (&amp;lt;&amp;lt; 1 hour) with little memory requirements (&amp;lt;&amp;lt; 8 GByte) on the logins nodes. If you want to run longer jobs and/or jobs with a request of more than 8 GByte of memory, you must allocate resources for so-called interactive jobs by usage of the command salloc on a login node. Considering a serial application running on a compute node that requires 5000 MByte of memory and limiting the interactive run to 2 hours the following command has to be executed:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ salloc -p cpu -n 1 -t 120 --mem=5000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then you will get one core on a compute node within the partition &amp;quot;cpu&amp;quot;. After execution of this command &#039;&#039;&#039;DO NOT CLOSE&#039;&#039;&#039; your current terminal session but wait until the queueing system Slurm has granted you the requested resources on the compute system. You will be logged in automatically on the granted core! To run a serial program on the granted core you only have to type the name of the executable.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./&amp;lt;my_serial_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please be aware that your serial job must run less than 2 hours in this example, else the job will be killed during runtime by the system. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can also start now a graphical X11-terminal connecting you to the dedicated resource that is available for 2 hours. You can start it by the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ xterm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that, once the walltime limit has been reached the resources - i.e. the compute node - will automatically be revoked.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
An interactive parallel application running on one compute node or on many compute nodes (e.g. here 5 nodes) with 96 cores each requires usually an amount of memory in GByte (e.g. 50 GByte) and a maximum time (e.g. 1 hour). E.g. 5 nodes can be allocated by the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ salloc -p cpu -N 5 --ntasks-per-node=96 -t 01:00:00  --mem=50gb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you can run parallel jobs on 480 cores requiring 50 GByte of memory per node. Please be aware that you will be logged in on core 0 of the first node.&lt;br /&gt;
If you want to have access to another node you have to open a new terminal, connect it also to bwUniCluster 3.0 and type the following commands to&lt;br /&gt;
connect to the running interactive job and then to a specific node:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ srun --jobid=XXXXXXXX --pty /bin/bash&lt;br /&gt;
$ srun --nodelist=uc3nXXX --pty /bin/bash&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ squeue&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the jobid and the nodelist can be shown.&lt;br /&gt;
&lt;br /&gt;
If you want to run MPI-programs, you can do it by simply typing mpirun &amp;lt;program_name&amp;gt;. Then your program will be run on 480 cores. A very simple example for starting a parallel job can be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mpirun &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also start the debugger ddt by the commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module add devel/ddt&lt;br /&gt;
$ ddt &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above commands will execute the parallel program &amp;lt;my_mpi_program&amp;gt; on all available cores. You can also start parallel programs on a subset of cores; an example for this can be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mpirun -n 50 &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are using Intel MPI you must start &amp;lt;my_mpi_program&amp;gt; by the command mpiexec.hydra (instead of mpirun).&lt;br /&gt;
&lt;br /&gt;
== Interactive Computing with Jupyter ==&lt;br /&gt;
&lt;br /&gt;
== Monitor and manage jobs ==&lt;br /&gt;
&lt;br /&gt;
=== List of your submitted jobs : squeue ===&lt;br /&gt;
Displays information about YOUR active, pending and/or recently completed jobs. The command displays all own active and pending jobs. The command squeue is explained in detail on the webpage https://slurm.schedmd.com/squeue.html or via manpage (man squeue).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;squeue&#039;&#039; example on bwUniCluster 3.0 &amp;lt;small&amp;gt;(Only your own jobs are displayed!)&amp;lt;/small&amp;gt;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ squeue &lt;br /&gt;
             JOBID PARTITION     NAME     USER ST       TIME  NODES NODELIST(REASON)&lt;br /&gt;
              1262       cpu     wrap ka_ab123  R       8:15      1 uc3n002&lt;br /&gt;
              1267 dev_gpu_h     wrap ka_ab123 PD       0:00      1 (Resources)&lt;br /&gt;
              1265   highmem     wrap ka_ab123  R       2:41      1 uc3n084&lt;br /&gt;
$ squeue -l&lt;br /&gt;
             JOBID PARTITION     NAME     USER    STATE       TIME TIME_LIMI  NODES NODELIST(REASON)&lt;br /&gt;
              1262       cpu     wrap ka_ab123  RUNNING       8:55     20:00      1 uc3n002&lt;br /&gt;
              1267 dev_gpu_h     wrap ka_ab123  PENDING       0:00     20:00      1 (Resources)&lt;br /&gt;
              1265   highmem     wrap ka_ab123  RUNNING       3:21     20:00      1 uc3n084&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Detailed job information : scontrol show job ===&lt;br /&gt;
scontrol show job displays detailed job state information and diagnostic output for all or a specified job of yours. Detailed information is available for active, pending and recently completed jobs. The command scontrol is explained in detail on the webpage https://slurm.schedmd.com/scontrol.html or via manpage (man scontrol). &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Display the state of all your jobs in normal mode: scontrol show job&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Display the state of a job with &amp;lt;jobid&amp;gt; in normal mode: scontrol show job &amp;lt;jobid&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Here is an example from bwUniCluster 3.0.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ squeue&lt;br /&gt;
JOBID PARTITION     NAME     USER ST       TIME  NODES NODELIST(REASON)&lt;br /&gt;
1262       cpu     wrap ka_zs040  R       1:12      1 uc3n002&lt;br /&gt;
&lt;br /&gt;
$&lt;br /&gt;
$ # now, see what&#039;s up with my pending job with jobid 1262&lt;br /&gt;
$ &lt;br /&gt;
$ scontrol show job 1262&lt;br /&gt;
&lt;br /&gt;
JobId=1262 JobName=wrap&lt;br /&gt;
   UserId=ka_zs0402(241992) GroupId=ka_scc(12345) MCS_label=N/A&lt;br /&gt;
   Priority=4246 Nice=0 Account=ka QOS=normal&lt;br /&gt;
   JobState=RUNNING Reason=None Dependency=(null)&lt;br /&gt;
   Requeue=1 Restarts=0 BatchFlag=1 Reboot=0 ExitCode=0:0&lt;br /&gt;
   RunTime=00:00:37 TimeLimit=00:20:00 TimeMin=N/A&lt;br /&gt;
   SubmitTime=2025-04-04T10:01:30 EligibleTime=2025-04-04T10:01:30&lt;br /&gt;
   AccrueTime=2025-04-04T10:01:30&lt;br /&gt;
   StartTime=2025-04-04T10:01:31 EndTime=2025-04-04T10:21:31 Deadline=N/A&lt;br /&gt;
   SuspendTime=None SecsPreSuspend=0 LastSchedEval=2025-04-04T10:01:31 Scheduler=Main&lt;br /&gt;
   Partition=cpu AllocNode:Sid=uc3n999:2819841&lt;br /&gt;
   ReqNodeList=(null) ExcNodeList=(null)&lt;br /&gt;
   NodeList=uc3n002&lt;br /&gt;
   BatchHost=uc3n002&lt;br /&gt;
   NumNodes=1 NumCPUs=2 NumTasks=1 CPUs/Task=1 ReqB:S:C:T=0:0:*:*&lt;br /&gt;
   ReqTRES=cpu=1,mem=2000M,node=1,billing=1&lt;br /&gt;
   AllocTRES=cpu=2,mem=4000M,node=1,billing=2&lt;br /&gt;
   Socks/Node=* NtasksPerN:B:S:C=0:0:*:1 CoreSpec=*&lt;br /&gt;
   MinCPUsNode=1 MinMemoryCPU=2000M MinTmpDiskNode=0&lt;br /&gt;
   Features=(null) DelayBoot=00:00:00&lt;br /&gt;
   OverSubscribe=OK Contiguous=0 Licenses=(null) Network=(null)&lt;br /&gt;
   Command=(null)&lt;br /&gt;
   WorkDir=/pfs/data6/home/ka/ka_scc/ka_zs0402&lt;br /&gt;
   StdErr=/pfs/data6/home/ka/ka_scc/ka_zs0402/slurm-1262.out&lt;br /&gt;
   StdIn=/dev/null&lt;br /&gt;
   StdOut=/pfs/data6/home/ka/ka_scc/ka_zs0402/slurm-1262.out&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=== Canceling own jobs : scancel ===&lt;br /&gt;
The scancel command is used to cancel jobs. The command scancel is explained in detail on the webpage https://slurm.schedmd.com/scancel.html or via manpage (man scancel). The command is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ scancel [-i] &amp;lt;job-id&amp;gt;&lt;br /&gt;
$ scancel -t &amp;lt;job_state_name&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Slurm Options =&lt;br /&gt;
&lt;br /&gt;
= Best Practices =&lt;br /&gt;
&lt;br /&gt;
== Step-by-Step example==&lt;br /&gt;
&lt;br /&gt;
== Dos and Don&#039;ts ==&lt;/div&gt;</summary>
		<author><name>P Schuhmacher</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster3.0/Running_Jobs&amp;diff=14651</id>
		<title>BwUniCluster3.0/Running Jobs</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster3.0/Running_Jobs&amp;diff=14651"/>
		<updated>2025-04-04T15:24:38Z</updated>

		<summary type="html">&lt;p&gt;P Schuhmacher: /* Batch Jobs: sbatch */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
= Purpose and function of a queuing system =&lt;br /&gt;
&lt;br /&gt;
General procedure: Hint to [[Running_Calculations | Running Calculations]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Job submission process ==&lt;br /&gt;
&lt;br /&gt;
bwUniCluster 3.0 has installed the workload managing software Slurm. Therefore any job submission by the user is to be executed by commands of the Slurm software. Slurm queues and runs user jobs based on fair sharing policies.&lt;br /&gt;
&lt;br /&gt;
== Slurm ==&lt;br /&gt;
&lt;br /&gt;
HPC Workload Manager on bwUniCluster 3.0 is Slurm.&lt;br /&gt;
Slurm is a cluster management and job scheduling system. Slurm has three key functions. &lt;br /&gt;
* First, it allocates access to resources (compute cores on nodes) to users for some duration of time so they can perform work. &lt;br /&gt;
* it provides a framework for starting, executing, and monitoring work (normally a parallel job) on the set of allocated nodes. &lt;br /&gt;
* it arbitrates contention for resources by managing a queue of pending work.&lt;br /&gt;
&lt;br /&gt;
Any kind of calculation on the compute nodes of bwUniCluster 3.0 requires the user to define calculations as a sequence of commands together with required run time, number of CPU cores and main memory and submit all, i.e., the &#039;&#039;&#039;batch job&#039;&#039;&#039;, to a resource and workload managing software. &lt;br /&gt;
== Terms and definitions ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Partitions &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Slurm manages job queues for different &#039;&#039;&#039;partitions&#039;&#039;&#039;. Partitions are used to group similar node types (e.g. nodes with and without accelerators) and to enforce different access policies and resource limits.&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 3.0 there are different partitions:&lt;br /&gt;
&lt;br /&gt;
* CPU-only nodes&lt;br /&gt;
** 2-socket nodes, consisting of 2 Intel Ice Lake processors with 32 cores each or 2 AMD processors with 48 cores each&lt;br /&gt;
** 2-socket nodes with very high RAM capacity, consisting of 2 AMD processors with 48 cores each&lt;br /&gt;
* GPU-accelerated nodes&lt;br /&gt;
** 2-socket nodes with 4x NVIDIA A100 or 4x NVIDIA H100 GPUs&lt;br /&gt;
** 4-socket node with 4x AMD Instinct accelerator&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Queues &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Job &#039;&#039;&#039;queues&#039;&#039;&#039; are used to manage jobs that request access to shared but limited computing resources of a certain kind (partition).&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 3.0 there are different main types of queues:&lt;br /&gt;
* Regular queues&lt;br /&gt;
** cpu: Jobs that request CPU-only nodes.&lt;br /&gt;
** gpu: Jobs that request GPU-accelerated nodes.&lt;br /&gt;
* Development queues (dev)&lt;br /&gt;
** Short, usually interactive jobs that are used for developing, compiling and testing code and workflows. The intention behind development queues is to provide users with immediate access to computer resources without having to wait. This is the place to realize instantaneous heavy compute without affecting other users, as would be the case on the login nodes.&lt;br /&gt;
&lt;br /&gt;
Requested compute resources such as (wall-)time, number of nodes and amount of memory are restricted and must fit into the boundaries imposed by the queues. The request for compute resources on the bwUniCluster 3.0 &amp;lt;font color=red&amp;gt;requires at least the specification of the &#039;&#039;&#039;queue&#039;&#039;&#039; and the &#039;&#039;&#039;time&#039;&#039;&#039;&amp;lt;/font&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Jobs &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Jobs can be run non-interactively as &#039;&#039;&#039;batch jobs&#039;&#039;&#039; or as &#039;&#039;&#039;interactive jobs&#039;&#039;&#039;.&lt;br /&gt;
Submitting a batch job means, that all steps of a compute project are defined in a Bash script. This Bash script is queued and executed as soon as the compute resources are available and allocated. Jobs are enqueued with the &#039;&#039;sbatch&#039;&#039; command.&lt;br /&gt;
&lt;br /&gt;
For interactive jobs, the resources are requested with the &#039;&#039;salloc&#039;&#039; command. As soon as the computing resources are available and allocated, a command line prompt is returned on a computing node and the user can freely dispose of the resources now available to him.&lt;br /&gt;
{|style=&amp;quot;background:#deffee; width:100%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;padding:5px; background:#cef2e0; text-align:left&amp;quot;|&lt;br /&gt;
[[Image:Attention.svg|center|25px]]&lt;br /&gt;
|style=&amp;quot;padding:5px; background:#cef2e0; text-align:left&amp;quot;|&lt;br /&gt;
&#039;&#039;&#039;Please remember:&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Heavy computations are not allowed on the login nodes&#039;&#039;&#039;.&amp;lt;br&amp;gt;Use a developement or a regular job queue instead! Please refer to [[BwUniCluster3.0/Login#Allowed_Activities_on_Login_Nodes|Allowed Activities on Login Nodes]].&lt;br /&gt;
* &#039;&#039;&#039;Development queues&#039;&#039;&#039; are meant for &#039;&#039;&#039;development tasks&#039;&#039;&#039;.&amp;lt;br&amp;gt;Do not misuse this queue for regular, short-running jobs or chain jobs! Only one running job at a time is enabled. Maximum queue length is reduced to 3.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Queues on bwUniCluster 3.0 = &lt;br /&gt;
== Policy ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Regular Queues ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
! style=&amp;quot;width:5%&amp;quot;| Queue&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Node-Type&lt;br /&gt;
! style=&amp;quot;width:23%&amp;quot;| Default Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Minimal Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Maximum Resources&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;cpu_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Ice Lake&lt;br /&gt;
| mem-per-cpu=1950mb&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=30, mem=249600mb, ntasks-per-node=64, (threads-per-core=2) &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;cpu&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Standard&lt;br /&gt;
| mem-per-cpu=1125mb&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=20, mem=380000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;highmem&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;High Memory&lt;br /&gt;
| mem-per-cpu=1125mb&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=4, mem=2300000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;gpu_h100&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;NVIDIA GPU x4&lt;br /&gt;
| mem-per-cpu=1125mb&amp;lt;br/&amp;gt;cpus-per-gpu=24&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=12, mem=760000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;gpu_mi300&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU node&amp;lt;br/&amp;gt;AMD GPU x4&lt;br /&gt;
| mem-per-cpu=1125mb&amp;lt;br/&amp;gt;cpus-per-gpu=24&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=1, mem=510000mb, ntasks-per-node=40, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;gpu_a100_il&amp;lt;/code&amp;gt;/&amp;lt;code&amp;gt;gpu_h100_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;Ice Lake&amp;lt;br/&amp;gt;NVIDIA GPU x4&lt;br /&gt;
| mem-per-gpu=127500mb&amp;lt;br/&amp;gt;cpus-per-gpu=16&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=9, mem=510000mb, ntasks-per-node=64, (threads-per-core=2) &lt;br /&gt;
|}&lt;br /&gt;
Table 1: Regular Queues&lt;br /&gt;
&lt;br /&gt;
== Development Queues ==&lt;br /&gt;
Only for development, i.e. debugging or performance optimization ...&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
! style=&amp;quot;width:5%&amp;quot;| Queue&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Node Type&lt;br /&gt;
! style=&amp;quot;width:23%&amp;quot;| Default Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Minimal Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Maximum Resources&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_cpu_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Ice Lake&lt;br /&gt;
| mem-per-cpu=1950mb&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=8, mem=249600mb, ntasks-per-node=64, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_cpu&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Standard&lt;br /&gt;
| mem-per-cpu=1125mb&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=180000mb, ntasks-per-node=40, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_highmem&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;High Memory&lt;br /&gt;
| mem-per-cpu=1125mb&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=180000mb, ntasks-per-node=40, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_gpu_h100&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;NVIDIA GPU x4&lt;br /&gt;
| mem-per-cpu=1125mb&amp;lt;br/&amp;gt;cpus-per-gpu=24&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=180000mb, ntasks-per-node=40, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_gpu_a100_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;NVIDIA GPU x4&amp;lt;br/&amp;gt;&lt;br /&gt;
| mem-per-gpu=127500mb&amp;lt;br/&amp;gt;cpus-per-gpu=16 &lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=510000mb, ntasks-per-node=64, (threads-per-core=2) &lt;br /&gt;
|}&lt;br /&gt;
Table 2: Development Queues&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Default resources of a queue class defines time, #tasks and memory if not explicitly given with sbatch command. Resource list acronyms &#039;&#039;--time&#039;&#039;, &#039;&#039;--ntasks&#039;&#039;, &#039;&#039;--nodes&#039;&#039;, &#039;&#039;--mem&#039;&#039; and &#039;&#039;--mem-per-cpu&#039;&#039; are described [[BwUniCluster_3.0_Slurm_common_Features|here]].&lt;br /&gt;
&lt;br /&gt;
== Check available resources: sinfo_t_idle ==&lt;br /&gt;
The Slurm command sinfo is used to view partition and node information for a system running Slurm. It incorporates down time, reservations, and node state information in determining the available backfill window. The sinfo command can only be used by the administrator.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
SCC has prepared a special script (sinfo_t_idle) to find out how many processors are available for immediate use on the system. It is anticipated that users will use this information to submit jobs that meet these criteria and thus obtain quick job turnaround times. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The following command displays what resources are available for immediate use for the whole partition.&lt;br /&gt;
&amp;lt;pre&amp;gt;$ sinfo_t_idle&lt;br /&gt;
Partition dev_cpu                 :      2 nodes idle&lt;br /&gt;
Partition cpu                     :     68 nodes idle&lt;br /&gt;
Partition highmem                 :      4 nodes idle&lt;br /&gt;
Partition dev_gpu_h100            :      0 nodes idle&lt;br /&gt;
Partition gpu_h100                :     11 nodes idle&lt;br /&gt;
Partition gpu_mi300               :      1 nodes idle&lt;br /&gt;
Partition dev_cpu_il              :      0 nodes idle&lt;br /&gt;
Partition cpu_il                  :      0 nodes idle&lt;br /&gt;
Partition dev_gpu_a100_il         :      0 nodes idle&lt;br /&gt;
Partition gpu_a100_il             :      0 nodes idle&lt;br /&gt;
Partition gpu_h100_il             :      0 nodes idle&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Running Jobs =&lt;br /&gt;
&lt;br /&gt;
== Slurm Commands (excerpt) ==&lt;br /&gt;
Important Slurm commands for non-administrators working on bwUniCluster 3.0.&lt;br /&gt;
{| width=850px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Slurm commands !! Brief explanation&lt;br /&gt;
|-&lt;br /&gt;
| [[#Batch Jobs: sbatch|sbatch]] || Submits a job and puts it into the queue [[https://slurm.schedmd.com/sbatch.html sbatch]] &lt;br /&gt;
|-&lt;br /&gt;
| [[#Interactive Jobs: salloc|salloc]] || Requests resources for an interactive Job [[https://slurm.schedmd.com/salloc.html salloc]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Monitor and manage jobs |scontrol show job]] || Displays detailed job state information [[https://slurm.schedmd.com/scontrol.html scontrol]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#List of your submitted jobs : squeue|squeue]] || Displays information about active, eligible, blocked, and/or recently completed jobs [[https://slurm.schedmd.com/squeue.html squeue]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#List of your submitted jobs : squeue|squeue --start]] || Returns start time of submitted job [[https://slurm.schedmd.com/squeue.html squeue]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Check available resources: sinfo_t_idle|sinfo_t_idle]] || Shows what resources are available for immediate use [[https://slurm.schedmd.com/sinfo.html sinfo]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Canceling own jobs : scancel|scancel]] || Cancels a job [[https://slurm.schedmd.com/scancel.html scancel]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* [https://slurm.schedmd.com/tutorials.html  Slurm Tutorials]&lt;br /&gt;
* [https://slurm.schedmd.com/pdfs/summary.pdf  Slurm command/option summary (2 pages)]&lt;br /&gt;
* [https://slurm.schedmd.com/man_index.html  Slurm Commands]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Batch Jobs: sbatch ==&lt;br /&gt;
&lt;br /&gt;
Batch jobs are submitted by using the command &#039;&#039;&#039;sbatch&#039;&#039;&#039;. The main purpose of the &#039;&#039;&#039;sbatch&#039;&#039;&#039; command is to specify the resources that are needed to run the job. &#039;&#039;&#039;sbatch&#039;&#039;&#039; will then queue the batch job. However, starting of batch job depends on the availability of the requested resources and the fair sharing value.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The syntax and use of &#039;&#039;&#039;sbatch&#039;&#039;&#039; can be displayed via:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ man sbatch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;sbatch&#039;&#039;&#039; options can be used from the command line or in your job script. Different defaults for some of these options are set based on the queue and can be found [https://wiki.bwhpc.de/e/BwUniCluster3.0/Batch_Queues#sbatch_-p_queue here]&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | sbatch Options&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width:8%&amp;quot;| Command line&lt;br /&gt;
! style=&amp;quot;width:9%&amp;quot;| Script&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Purpose&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -t, --time=&#039;&#039;time&#039;&#039;&lt;br /&gt;
| #SBATCH --time=&#039;&#039;time&#039;&#039;&lt;br /&gt;
| Wall clock time limit.&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -N, --nodes=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --nodes=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of nodes to be used.&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -n, --ntasks=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --ntasks=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of tasks to be launched.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --ntasks-per-node=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --ntasks-per-node=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Maximum count of tasks per node.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -c, --cpus-per-task=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --cpus-per-task=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of CPUs required per (MPI-)task.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mem=&#039;&#039;value_in_MB&#039;&#039;&lt;br /&gt;
| #SBATCH --mem=&#039;&#039;value_in_MB&#039;&#039; &lt;br /&gt;
| Memory in MegaByte per node. (You should omit the setting of this option.)&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mem-per-cpu=&#039;&#039;value_in_MB&#039;&#039;&lt;br /&gt;
| #SBATCH --mem-per-cpu=&#039;&#039;value_in_MB&#039;&#039; &lt;br /&gt;
| Minimum Memory required per allocated CPU. (You should omit the setting of this option.)&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mail-type=&#039;&#039;type&#039;&#039;&lt;br /&gt;
| #SBATCH --mail-type=&#039;&#039;type&#039;&#039;&lt;br /&gt;
| Notify user by email when certain event types occur.&amp;lt;br&amp;gt;Valid type values are NONE, BEGIN, END, FAIL, REQUEUE, ALL.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mail-user=&#039;&#039;mail-address&#039;&#039;&lt;br /&gt;
| #SBATCH --mail-user=&#039;&#039;mail-address&#039;&#039;&lt;br /&gt;
|  The specified mail-address receives email notification of state changes as defined by --mail-type.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --output=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --output=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| File in which job output is stored. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --error=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --error=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| File in which job error messages are stored. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -J, --job-name=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --job-name=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| Job name.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --export=[ALL,] &#039;&#039;env-variables&#039;&#039;&lt;br /&gt;
| #SBATCH --export=[ALL,] &#039;&#039;env-variables&#039;&#039;&lt;br /&gt;
| Identifies which environment variables from the submission environment are propagated to the launched application. Default is ALL.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -A, --account=&#039;&#039;group-name&#039;&#039;&lt;br /&gt;
| #SBATCH --account=&#039;&#039;group-name&#039;&#039;&lt;br /&gt;
| Change resources used by this job to specified group. You may need this option if your account is assigned to more than one group. By command &amp;quot;scontrol show job&amp;quot; the project group the job is accounted on can be seen behind &amp;quot;Account=&amp;quot;. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -p, --partition=&#039;&#039;queue-name&#039;&#039;&lt;br /&gt;
| #SBATCH --partition=&#039;&#039;queue-name&#039;&#039;&lt;br /&gt;
| Request a specific queue for the resource allocation.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --reservation=&#039;&#039;reservation-name&#039;&#039;&lt;br /&gt;
| #SBATCH --reservation=&#039;&#039;reservation-name&#039;&#039;&lt;br /&gt;
| Use a specific reservation for the resource allocation.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -C, --constraint=&#039;&#039;LSDF&#039;&#039;&lt;br /&gt;
| #SBATCH --constraint=LSDF&lt;br /&gt;
| Job constraint LSDF filesystems.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -C, --constraint=&#039;&#039;BEEOND (BEEOND_4MDS, BEEOND_MAXMDS)&#039;&#039;&lt;br /&gt;
| #SBATCH --constraint=BEEOND (BEEOND_4MDS, BEEOND_MAXMDS)&lt;br /&gt;
| Job constraint BeeOND filesystem.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Interactive Jobs: salloc ==&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 3.0 you are only allowed to run short jobs (&amp;lt;&amp;lt; 1 hour) with little memory requirements (&amp;lt;&amp;lt; 8 GByte) on the logins nodes. If you want to run longer jobs and/or jobs with a request of more than 8 GByte of memory, you must allocate resources for so-called interactive jobs by usage of the command salloc on a login node. Considering a serial application running on a compute node that requires 5000 MByte of memory and limiting the interactive run to 2 hours the following command has to be executed:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ salloc -p cpu -n 1 -t 120 --mem=5000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then you will get one core on a compute node within the partition &amp;quot;cpu&amp;quot;. After execution of this command &#039;&#039;&#039;DO NOT CLOSE&#039;&#039;&#039; your current terminal session but wait until the queueing system Slurm has granted you the requested resources on the compute system. You will be logged in automatically on the granted core! To run a serial program on the granted core you only have to type the name of the executable.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./&amp;lt;my_serial_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please be aware that your serial job must run less than 2 hours in this example, else the job will be killed during runtime by the system. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can also start now a graphical X11-terminal connecting you to the dedicated resource that is available for 2 hours. You can start it by the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ xterm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that, once the walltime limit has been reached the resources - i.e. the compute node - will automatically be revoked.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
An interactive parallel application running on one compute node or on many compute nodes (e.g. here 5 nodes) with 96 cores each requires usually an amount of memory in GByte (e.g. 50 GByte) and a maximum time (e.g. 1 hour). E.g. 5 nodes can be allocated by the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ salloc -p cpu -N 5 --ntasks-per-node=96 -t 01:00:00  --mem=50gb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you can run parallel jobs on 480 cores requiring 50 GByte of memory per node. Please be aware that you will be logged in on core 0 of the first node.&lt;br /&gt;
If you want to have access to another node you have to open a new terminal, connect it also to bwUniCluster 3.0 and type the following commands to&lt;br /&gt;
connect to the running interactive job and then to a specific node:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ srun --jobid=XXXXXXXX --pty /bin/bash&lt;br /&gt;
$ srun --nodelist=uc3nXXX --pty /bin/bash&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ squeue&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the jobid and the nodelist can be shown.&lt;br /&gt;
&lt;br /&gt;
If you want to run MPI-programs, you can do it by simply typing mpirun &amp;lt;program_name&amp;gt;. Then your program will be run on 480 cores. A very simple example for starting a parallel job can be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mpirun &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also start the debugger ddt by the commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module add devel/ddt&lt;br /&gt;
$ ddt &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above commands will execute the parallel program &amp;lt;my_mpi_program&amp;gt; on all available cores. You can also start parallel programs on a subset of cores; an example for this can be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mpirun -n 50 &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are using Intel MPI you must start &amp;lt;my_mpi_program&amp;gt; by the command mpiexec.hydra (instead of mpirun).&lt;br /&gt;
&lt;br /&gt;
== Interactive Computing with Jupyter ==&lt;br /&gt;
&lt;br /&gt;
== Monitor and manage jobs ==&lt;br /&gt;
&lt;br /&gt;
=== List of your submitted jobs : squeue ===&lt;br /&gt;
Displays information about YOUR active, pending and/or recently completed jobs. The command displays all own active and pending jobs. The command squeue is explained in detail on the webpage https://slurm.schedmd.com/squeue.html or via manpage (man squeue).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;squeue&#039;&#039; example on bwUniCluster 3.0 &amp;lt;small&amp;gt;(Only your own jobs are displayed!)&amp;lt;/small&amp;gt;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ squeue &lt;br /&gt;
             JOBID PARTITION     NAME     USER ST       TIME  NODES NODELIST(REASON)&lt;br /&gt;
              1262       cpu     wrap ka_ab123  R       8:15      1 uc3n002&lt;br /&gt;
              1267 dev_gpu_h     wrap ka_ab123 PD       0:00      1 (Resources)&lt;br /&gt;
              1265   highmem     wrap ka_ab123  R       2:41      1 uc3n084&lt;br /&gt;
$ squeue -l&lt;br /&gt;
             JOBID PARTITION     NAME     USER    STATE       TIME TIME_LIMI  NODES NODELIST(REASON)&lt;br /&gt;
              1262       cpu     wrap ka_ab123  RUNNING       8:55     20:00      1 uc3n002&lt;br /&gt;
              1267 dev_gpu_h     wrap ka_ab123  PENDING       0:00     20:00      1 (Resources)&lt;br /&gt;
              1265   highmem     wrap ka_ab123  RUNNING       3:21     20:00      1 uc3n084&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Detailed job information : scontrol show job ===&lt;br /&gt;
scontrol show job displays detailed job state information and diagnostic output for all or a specified job of yours. Detailed information is available for active, pending and recently completed jobs. The command scontrol is explained in detail on the webpage https://slurm.schedmd.com/scontrol.html or via manpage (man scontrol). &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Display the state of all your jobs in normal mode: scontrol show job&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Display the state of a job with &amp;lt;jobid&amp;gt; in normal mode: scontrol show job &amp;lt;jobid&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Here is an example from bwUniCluster 3.0.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ squeue&lt;br /&gt;
JOBID PARTITION     NAME     USER ST       TIME  NODES NODELIST(REASON)&lt;br /&gt;
1262       cpu     wrap ka_zs040  R       1:12      1 uc3n002&lt;br /&gt;
&lt;br /&gt;
$&lt;br /&gt;
$ # now, see what&#039;s up with my pending job with jobid 1262&lt;br /&gt;
$ &lt;br /&gt;
$ scontrol show job 1262&lt;br /&gt;
&lt;br /&gt;
JobId=1262 JobName=wrap&lt;br /&gt;
   UserId=ka_zs0402(241992) GroupId=ka_scc(12345) MCS_label=N/A&lt;br /&gt;
   Priority=4246 Nice=0 Account=ka QOS=normal&lt;br /&gt;
   JobState=RUNNING Reason=None Dependency=(null)&lt;br /&gt;
   Requeue=1 Restarts=0 BatchFlag=1 Reboot=0 ExitCode=0:0&lt;br /&gt;
   RunTime=00:00:37 TimeLimit=00:20:00 TimeMin=N/A&lt;br /&gt;
   SubmitTime=2025-04-04T10:01:30 EligibleTime=2025-04-04T10:01:30&lt;br /&gt;
   AccrueTime=2025-04-04T10:01:30&lt;br /&gt;
   StartTime=2025-04-04T10:01:31 EndTime=2025-04-04T10:21:31 Deadline=N/A&lt;br /&gt;
   SuspendTime=None SecsPreSuspend=0 LastSchedEval=2025-04-04T10:01:31 Scheduler=Main&lt;br /&gt;
   Partition=cpu AllocNode:Sid=uc3n999:2819841&lt;br /&gt;
   ReqNodeList=(null) ExcNodeList=(null)&lt;br /&gt;
   NodeList=uc3n002&lt;br /&gt;
   BatchHost=uc3n002&lt;br /&gt;
   NumNodes=1 NumCPUs=2 NumTasks=1 CPUs/Task=1 ReqB:S:C:T=0:0:*:*&lt;br /&gt;
   ReqTRES=cpu=1,mem=2000M,node=1,billing=1&lt;br /&gt;
   AllocTRES=cpu=2,mem=4000M,node=1,billing=2&lt;br /&gt;
   Socks/Node=* NtasksPerN:B:S:C=0:0:*:1 CoreSpec=*&lt;br /&gt;
   MinCPUsNode=1 MinMemoryCPU=2000M MinTmpDiskNode=0&lt;br /&gt;
   Features=(null) DelayBoot=00:00:00&lt;br /&gt;
   OverSubscribe=OK Contiguous=0 Licenses=(null) Network=(null)&lt;br /&gt;
   Command=(null)&lt;br /&gt;
   WorkDir=/pfs/data6/home/ka/ka_scc/ka_zs0402&lt;br /&gt;
   StdErr=/pfs/data6/home/ka/ka_scc/ka_zs0402/slurm-1262.out&lt;br /&gt;
   StdIn=/dev/null&lt;br /&gt;
   StdOut=/pfs/data6/home/ka/ka_scc/ka_zs0402/slurm-1262.out&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=== Canceling own jobs : scancel ===&lt;br /&gt;
The scancel command is used to cancel jobs. The command scancel is explained in detail on the webpage https://slurm.schedmd.com/scancel.html or via manpage (man scancel). The command is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ scancel [-i] &amp;lt;job-id&amp;gt;&lt;br /&gt;
$ scancel -t &amp;lt;job_state_name&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Slurm Options =&lt;br /&gt;
&lt;br /&gt;
= Best Practices =&lt;br /&gt;
&lt;br /&gt;
== Step-by-Step example==&lt;br /&gt;
&lt;br /&gt;
== Dos and Don&#039;ts ==&lt;/div&gt;</summary>
		<author><name>P Schuhmacher</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster3.0/Running_Jobs&amp;diff=14650</id>
		<title>BwUniCluster3.0/Running Jobs</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster3.0/Running_Jobs&amp;diff=14650"/>
		<updated>2025-04-04T15:21:05Z</updated>

		<summary type="html">&lt;p&gt;P Schuhmacher: /* Monitor and manage jobs */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
= Purpose and function of a queuing system =&lt;br /&gt;
&lt;br /&gt;
General procedure: Hint to [[Running_Calculations | Running Calculations]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Job submission process ==&lt;br /&gt;
&lt;br /&gt;
bwUniCluster 3.0 has installed the workload managing software Slurm. Therefore any job submission by the user is to be executed by commands of the Slurm software. Slurm queues and runs user jobs based on fair sharing policies.&lt;br /&gt;
&lt;br /&gt;
== Slurm ==&lt;br /&gt;
&lt;br /&gt;
HPC Workload Manager on bwUniCluster 3.0 is Slurm.&lt;br /&gt;
Slurm is a cluster management and job scheduling system. Slurm has three key functions. &lt;br /&gt;
* First, it allocates access to resources (compute cores on nodes) to users for some duration of time so they can perform work. &lt;br /&gt;
* it provides a framework for starting, executing, and monitoring work (normally a parallel job) on the set of allocated nodes. &lt;br /&gt;
* it arbitrates contention for resources by managing a queue of pending work.&lt;br /&gt;
&lt;br /&gt;
Any kind of calculation on the compute nodes of bwUniCluster 3.0 requires the user to define calculations as a sequence of commands together with required run time, number of CPU cores and main memory and submit all, i.e., the &#039;&#039;&#039;batch job&#039;&#039;&#039;, to a resource and workload managing software. &lt;br /&gt;
== Terms and definitions ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Partitions &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Slurm manages job queues for different &#039;&#039;&#039;partitions&#039;&#039;&#039;. Partitions are used to group similar node types (e.g. nodes with and without accelerators) and to enforce different access policies and resource limits.&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 3.0 there are different partitions:&lt;br /&gt;
&lt;br /&gt;
* CPU-only nodes&lt;br /&gt;
** 2-socket nodes, consisting of 2 Intel Ice Lake processors with 32 cores each or 2 AMD processors with 48 cores each&lt;br /&gt;
** 2-socket nodes with very high RAM capacity, consisting of 2 AMD processors with 48 cores each&lt;br /&gt;
* GPU-accelerated nodes&lt;br /&gt;
** 2-socket nodes with 4x NVIDIA A100 or 4x NVIDIA H100 GPUs&lt;br /&gt;
** 4-socket node with 4x AMD Instinct accelerator&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Queues &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Job &#039;&#039;&#039;queues&#039;&#039;&#039; are used to manage jobs that request access to shared but limited computing resources of a certain kind (partition).&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 3.0 there are different main types of queues:&lt;br /&gt;
* Regular queues&lt;br /&gt;
** cpu: Jobs that request CPU-only nodes.&lt;br /&gt;
** gpu: Jobs that request GPU-accelerated nodes.&lt;br /&gt;
* Development queues (dev)&lt;br /&gt;
** Short, usually interactive jobs that are used for developing, compiling and testing code and workflows. The intention behind development queues is to provide users with immediate access to computer resources without having to wait. This is the place to realize instantaneous heavy compute without affecting other users, as would be the case on the login nodes.&lt;br /&gt;
&lt;br /&gt;
Requested compute resources such as (wall-)time, number of nodes and amount of memory are restricted and must fit into the boundaries imposed by the queues. The request for compute resources on the bwUniCluster 3.0 &amp;lt;font color=red&amp;gt;requires at least the specification of the &#039;&#039;&#039;queue&#039;&#039;&#039; and the &#039;&#039;&#039;time&#039;&#039;&#039;&amp;lt;/font&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Jobs &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Jobs can be run non-interactively as &#039;&#039;&#039;batch jobs&#039;&#039;&#039; or as &#039;&#039;&#039;interactive jobs&#039;&#039;&#039;.&lt;br /&gt;
Submitting a batch job means, that all steps of a compute project are defined in a Bash script. This Bash script is queued and executed as soon as the compute resources are available and allocated. Jobs are enqueued with the &#039;&#039;sbatch&#039;&#039; command.&lt;br /&gt;
&lt;br /&gt;
For interactive jobs, the resources are requested with the &#039;&#039;salloc&#039;&#039; command. As soon as the computing resources are available and allocated, a command line prompt is returned on a computing node and the user can freely dispose of the resources now available to him.&lt;br /&gt;
{|style=&amp;quot;background:#deffee; width:100%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;padding:5px; background:#cef2e0; text-align:left&amp;quot;|&lt;br /&gt;
[[Image:Attention.svg|center|25px]]&lt;br /&gt;
|style=&amp;quot;padding:5px; background:#cef2e0; text-align:left&amp;quot;|&lt;br /&gt;
&#039;&#039;&#039;Please remember:&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Heavy computations are not allowed on the login nodes&#039;&#039;&#039;.&amp;lt;br&amp;gt;Use a developement or a regular job queue instead! Please refer to [[BwUniCluster3.0/Login#Allowed_Activities_on_Login_Nodes|Allowed Activities on Login Nodes]].&lt;br /&gt;
* &#039;&#039;&#039;Development queues&#039;&#039;&#039; are meant for &#039;&#039;&#039;development tasks&#039;&#039;&#039;.&amp;lt;br&amp;gt;Do not misuse this queue for regular, short-running jobs or chain jobs! Only one running job at a time is enabled. Maximum queue length is reduced to 3.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Queues on bwUniCluster 3.0 = &lt;br /&gt;
== Policy ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Regular Queues ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
! style=&amp;quot;width:5%&amp;quot;| Queue&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Node-Type&lt;br /&gt;
! style=&amp;quot;width:23%&amp;quot;| Default Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Minimal Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Maximum Resources&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;cpu_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Ice Lake&lt;br /&gt;
| mem-per-cpu=1950mb&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=30, mem=249600mb, ntasks-per-node=64, (threads-per-core=2) &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;cpu&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Standard&lt;br /&gt;
| mem-per-cpu=1125mb&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=20, mem=380000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;highmem&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;High Memory&lt;br /&gt;
| mem-per-cpu=1125mb&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=4, mem=2300000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;gpu_h100&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;NVIDIA GPU x4&lt;br /&gt;
| mem-per-cpu=1125mb&amp;lt;br/&amp;gt;cpus-per-gpu=24&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=12, mem=760000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;gpu_mi300&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU node&amp;lt;br/&amp;gt;AMD GPU x4&lt;br /&gt;
| mem-per-cpu=1125mb&amp;lt;br/&amp;gt;cpus-per-gpu=24&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=1, mem=510000mb, ntasks-per-node=40, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;gpu_a100_il&amp;lt;/code&amp;gt;/&amp;lt;code&amp;gt;gpu_h100_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;Ice Lake&amp;lt;br/&amp;gt;NVIDIA GPU x4&lt;br /&gt;
| mem-per-gpu=127500mb&amp;lt;br/&amp;gt;cpus-per-gpu=16&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=9, mem=510000mb, ntasks-per-node=64, (threads-per-core=2) &lt;br /&gt;
|}&lt;br /&gt;
Table 1: Regular Queues&lt;br /&gt;
&lt;br /&gt;
== Development Queues ==&lt;br /&gt;
Only for development, i.e. debugging or performance optimization ...&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
! style=&amp;quot;width:5%&amp;quot;| Queue&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Node Type&lt;br /&gt;
! style=&amp;quot;width:23%&amp;quot;| Default Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Minimal Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Maximum Resources&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_cpu_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Ice Lake&lt;br /&gt;
| mem-per-cpu=1950mb&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=8, mem=249600mb, ntasks-per-node=64, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_cpu&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Standard&lt;br /&gt;
| mem-per-cpu=1125mb&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=180000mb, ntasks-per-node=40, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_highmem&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;High Memory&lt;br /&gt;
| mem-per-cpu=1125mb&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=180000mb, ntasks-per-node=40, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_gpu_h100&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;NVIDIA GPU x4&lt;br /&gt;
| mem-per-cpu=1125mb&amp;lt;br/&amp;gt;cpus-per-gpu=24&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=180000mb, ntasks-per-node=40, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_gpu_a100_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;NVIDIA GPU x4&amp;lt;br/&amp;gt;&lt;br /&gt;
| mem-per-gpu=127500mb&amp;lt;br/&amp;gt;cpus-per-gpu=16 &lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=510000mb, ntasks-per-node=64, (threads-per-core=2) &lt;br /&gt;
|}&lt;br /&gt;
Table 2: Development Queues&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Default resources of a queue class defines time, #tasks and memory if not explicitly given with sbatch command. Resource list acronyms &#039;&#039;--time&#039;&#039;, &#039;&#039;--ntasks&#039;&#039;, &#039;&#039;--nodes&#039;&#039;, &#039;&#039;--mem&#039;&#039; and &#039;&#039;--mem-per-cpu&#039;&#039; are described [[BwUniCluster_3.0_Slurm_common_Features|here]].&lt;br /&gt;
&lt;br /&gt;
== Check available resources: sinfo_t_idle ==&lt;br /&gt;
The Slurm command sinfo is used to view partition and node information for a system running Slurm. It incorporates down time, reservations, and node state information in determining the available backfill window. The sinfo command can only be used by the administrator.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
SCC has prepared a special script (sinfo_t_idle) to find out how many processors are available for immediate use on the system. It is anticipated that users will use this information to submit jobs that meet these criteria and thus obtain quick job turnaround times. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The following command displays what resources are available for immediate use for the whole partition.&lt;br /&gt;
&amp;lt;pre&amp;gt;$ sinfo_t_idle&lt;br /&gt;
Partition dev_cpu                 :      2 nodes idle&lt;br /&gt;
Partition cpu                     :     68 nodes idle&lt;br /&gt;
Partition highmem                 :      4 nodes idle&lt;br /&gt;
Partition dev_gpu_h100            :      0 nodes idle&lt;br /&gt;
Partition gpu_h100                :     11 nodes idle&lt;br /&gt;
Partition gpu_mi300               :      1 nodes idle&lt;br /&gt;
Partition dev_cpu_il              :      0 nodes idle&lt;br /&gt;
Partition cpu_il                  :      0 nodes idle&lt;br /&gt;
Partition dev_gpu_a100_il         :      0 nodes idle&lt;br /&gt;
Partition gpu_a100_il             :      0 nodes idle&lt;br /&gt;
Partition gpu_h100_il             :      0 nodes idle&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Running Jobs =&lt;br /&gt;
&lt;br /&gt;
== Slurm Commands (excerpt) ==&lt;br /&gt;
Important Slurm commands for non-administrators working on bwUniCluster 3.0.&lt;br /&gt;
{| width=850px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Slurm commands !! Brief explanation&lt;br /&gt;
|-&lt;br /&gt;
| [[#Batch Jobs: sbatch|sbatch]] || Submits a job and puts it into the queue [[https://slurm.schedmd.com/sbatch.html sbatch]] &lt;br /&gt;
|-&lt;br /&gt;
| [[#Interactive Jobs: salloc|salloc]] || Requests resources for an interactive Job [[https://slurm.schedmd.com/salloc.html salloc]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Monitor and manage jobs |scontrol show job]] || Displays detailed job state information [[https://slurm.schedmd.com/scontrol.html scontrol]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#List of your submitted jobs : squeue|squeue]] || Displays information about active, eligible, blocked, and/or recently completed jobs [[https://slurm.schedmd.com/squeue.html squeue]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#List of your submitted jobs : squeue|squeue --start]] || Returns start time of submitted job [[https://slurm.schedmd.com/squeue.html squeue]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Check available resources: sinfo_t_idle|sinfo_t_idle]] || Shows what resources are available for immediate use [[https://slurm.schedmd.com/sinfo.html sinfo]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Canceling own jobs : scancel|scancel]] || Cancels a job [[https://slurm.schedmd.com/scancel.html scancel]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* [https://slurm.schedmd.com/tutorials.html  Slurm Tutorials]&lt;br /&gt;
* [https://slurm.schedmd.com/pdfs/summary.pdf  Slurm command/option summary (2 pages)]&lt;br /&gt;
* [https://slurm.schedmd.com/man_index.html  Slurm Commands]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Batch Jobs: sbatch ==&lt;br /&gt;
&lt;br /&gt;
Batch jobs are submitted by using the command &#039;&#039;&#039;sbatch&#039;&#039;&#039;. The main purpose of the &#039;&#039;&#039;sbatch&#039;&#039;&#039; command is to specify the resources that are needed to run the job. &#039;&#039;&#039;sbatch&#039;&#039;&#039; will then queue the batch job. However, starting of batch job depends on the availability of the requested resources and the fair sharing value.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To run your batch job on one of the cpu nodes, please use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sbatch --partition=dev_cpu&lt;br /&gt;
     or &lt;br /&gt;
$ sbatch -p dev_cpu&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Command parameters sbatch ===&lt;br /&gt;
The syntax and use of &#039;&#039;&#039;sbatch&#039;&#039;&#039; can be displayed via:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ man sbatch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;sbatch&#039;&#039;&#039; options can be used from the command line or in your job script. Different defaults for some of these options are set based on the queue and can be found [https://wiki.bwhpc.de/e/BwUniCluster3.0/Batch_Queues#sbatch_-p_queue here]&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | sbatch Options&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width:8%&amp;quot;| Command line&lt;br /&gt;
! style=&amp;quot;width:9%&amp;quot;| Script&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Purpose&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -t, --time=&#039;&#039;time&#039;&#039;&lt;br /&gt;
| #SBATCH --time=&#039;&#039;time&#039;&#039;&lt;br /&gt;
| Wall clock time limit.&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -N, --nodes=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --nodes=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of nodes to be used.&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -n, --ntasks=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --ntasks=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of tasks to be launched.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --ntasks-per-node=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --ntasks-per-node=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Maximum count of tasks per node.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -c, --cpus-per-task=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --cpus-per-task=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of CPUs required per (MPI-)task.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mem=&#039;&#039;value_in_MB&#039;&#039;&lt;br /&gt;
| #SBATCH --mem=&#039;&#039;value_in_MB&#039;&#039; &lt;br /&gt;
| Memory in MegaByte per node. (You should omit the setting of this option.)&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mem-per-cpu=&#039;&#039;value_in_MB&#039;&#039;&lt;br /&gt;
| #SBATCH --mem-per-cpu=&#039;&#039;value_in_MB&#039;&#039; &lt;br /&gt;
| Minimum Memory required per allocated CPU. (You should omit the setting of this option.)&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mail-type=&#039;&#039;type&#039;&#039;&lt;br /&gt;
| #SBATCH --mail-type=&#039;&#039;type&#039;&#039;&lt;br /&gt;
| Notify user by email when certain event types occur.&amp;lt;br&amp;gt;Valid type values are NONE, BEGIN, END, FAIL, REQUEUE, ALL.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mail-user=&#039;&#039;mail-address&#039;&#039;&lt;br /&gt;
| #SBATCH --mail-user=&#039;&#039;mail-address&#039;&#039;&lt;br /&gt;
|  The specified mail-address receives email notification of state changes as defined by --mail-type.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --output=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --output=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| File in which job output is stored. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --error=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --error=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| File in which job error messages are stored. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -J, --job-name=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --job-name=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| Job name.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --export=[ALL,] &#039;&#039;env-variables&#039;&#039;&lt;br /&gt;
| #SBATCH --export=[ALL,] &#039;&#039;env-variables&#039;&#039;&lt;br /&gt;
| Identifies which environment variables from the submission environment are propagated to the launched application. Default is ALL.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -A, --account=&#039;&#039;group-name&#039;&#039;&lt;br /&gt;
| #SBATCH --account=&#039;&#039;group-name&#039;&#039;&lt;br /&gt;
| Change resources used by this job to specified group. You may need this option if your account is assigned to more than one group. By command &amp;quot;scontrol show job&amp;quot; the project group the job is accounted on can be seen behind &amp;quot;Account=&amp;quot;. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -p, --partition=&#039;&#039;queue-name&#039;&#039;&lt;br /&gt;
| #SBATCH --partition=&#039;&#039;queue-name&#039;&#039;&lt;br /&gt;
| Request a specific queue for the resource allocation.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --reservation=&#039;&#039;reservation-name&#039;&#039;&lt;br /&gt;
| #SBATCH --reservation=&#039;&#039;reservation-name&#039;&#039;&lt;br /&gt;
| Use a specific reservation for the resource allocation.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -C, --constraint=&#039;&#039;LSDF&#039;&#039;&lt;br /&gt;
| #SBATCH --constraint=LSDF&lt;br /&gt;
| Job constraint LSDF filesystems.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -C, --constraint=&#039;&#039;BEEOND (BEEOND_4MDS, BEEOND_MAXMDS)&#039;&#039;&lt;br /&gt;
| #SBATCH --constraint=BEEOND (BEEOND_4MDS, BEEOND_MAXMDS)&lt;br /&gt;
| Job constraint BeeOND filesystem.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Interactive Jobs: salloc ==&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 3.0 you are only allowed to run short jobs (&amp;lt;&amp;lt; 1 hour) with little memory requirements (&amp;lt;&amp;lt; 8 GByte) on the logins nodes. If you want to run longer jobs and/or jobs with a request of more than 8 GByte of memory, you must allocate resources for so-called interactive jobs by usage of the command salloc on a login node. Considering a serial application running on a compute node that requires 5000 MByte of memory and limiting the interactive run to 2 hours the following command has to be executed:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ salloc -p cpu -n 1 -t 120 --mem=5000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then you will get one core on a compute node within the partition &amp;quot;cpu&amp;quot;. After execution of this command &#039;&#039;&#039;DO NOT CLOSE&#039;&#039;&#039; your current terminal session but wait until the queueing system Slurm has granted you the requested resources on the compute system. You will be logged in automatically on the granted core! To run a serial program on the granted core you only have to type the name of the executable.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./&amp;lt;my_serial_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please be aware that your serial job must run less than 2 hours in this example, else the job will be killed during runtime by the system. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can also start now a graphical X11-terminal connecting you to the dedicated resource that is available for 2 hours. You can start it by the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ xterm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that, once the walltime limit has been reached the resources - i.e. the compute node - will automatically be revoked.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
An interactive parallel application running on one compute node or on many compute nodes (e.g. here 5 nodes) with 96 cores each requires usually an amount of memory in GByte (e.g. 50 GByte) and a maximum time (e.g. 1 hour). E.g. 5 nodes can be allocated by the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ salloc -p cpu -N 5 --ntasks-per-node=96 -t 01:00:00  --mem=50gb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you can run parallel jobs on 480 cores requiring 50 GByte of memory per node. Please be aware that you will be logged in on core 0 of the first node.&lt;br /&gt;
If you want to have access to another node you have to open a new terminal, connect it also to bwUniCluster 3.0 and type the following commands to&lt;br /&gt;
connect to the running interactive job and then to a specific node:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ srun --jobid=XXXXXXXX --pty /bin/bash&lt;br /&gt;
$ srun --nodelist=uc3nXXX --pty /bin/bash&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ squeue&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the jobid and the nodelist can be shown.&lt;br /&gt;
&lt;br /&gt;
If you want to run MPI-programs, you can do it by simply typing mpirun &amp;lt;program_name&amp;gt;. Then your program will be run on 480 cores. A very simple example for starting a parallel job can be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mpirun &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also start the debugger ddt by the commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module add devel/ddt&lt;br /&gt;
$ ddt &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above commands will execute the parallel program &amp;lt;my_mpi_program&amp;gt; on all available cores. You can also start parallel programs on a subset of cores; an example for this can be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mpirun -n 50 &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are using Intel MPI you must start &amp;lt;my_mpi_program&amp;gt; by the command mpiexec.hydra (instead of mpirun).&lt;br /&gt;
&lt;br /&gt;
== Interactive Computing with Jupyter ==&lt;br /&gt;
&lt;br /&gt;
== Monitor and manage jobs ==&lt;br /&gt;
&lt;br /&gt;
=== List of your submitted jobs : squeue ===&lt;br /&gt;
Displays information about YOUR active, pending and/or recently completed jobs. The command displays all own active and pending jobs. The command squeue is explained in detail on the webpage https://slurm.schedmd.com/squeue.html or via manpage (man squeue).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;squeue&#039;&#039; example on bwUniCluster 3.0 &amp;lt;small&amp;gt;(Only your own jobs are displayed!)&amp;lt;/small&amp;gt;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ squeue &lt;br /&gt;
             JOBID PARTITION     NAME     USER ST       TIME  NODES NODELIST(REASON)&lt;br /&gt;
              1262       cpu     wrap ka_ab123  R       8:15      1 uc3n002&lt;br /&gt;
              1267 dev_gpu_h     wrap ka_ab123 PD       0:00      1 (Resources)&lt;br /&gt;
              1265   highmem     wrap ka_ab123  R       2:41      1 uc3n084&lt;br /&gt;
$ squeue -l&lt;br /&gt;
             JOBID PARTITION     NAME     USER    STATE       TIME TIME_LIMI  NODES NODELIST(REASON)&lt;br /&gt;
              1262       cpu     wrap ka_ab123  RUNNING       8:55     20:00      1 uc3n002&lt;br /&gt;
              1267 dev_gpu_h     wrap ka_ab123  PENDING       0:00     20:00      1 (Resources)&lt;br /&gt;
              1265   highmem     wrap ka_ab123  RUNNING       3:21     20:00      1 uc3n084&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Detailed job information : scontrol show job ===&lt;br /&gt;
scontrol show job displays detailed job state information and diagnostic output for all or a specified job of yours. Detailed information is available for active, pending and recently completed jobs. The command scontrol is explained in detail on the webpage https://slurm.schedmd.com/scontrol.html or via manpage (man scontrol). &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Display the state of all your jobs in normal mode: scontrol show job&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Display the state of a job with &amp;lt;jobid&amp;gt; in normal mode: scontrol show job &amp;lt;jobid&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Here is an example from bwUniCluster 3.0.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ squeue&lt;br /&gt;
JOBID PARTITION     NAME     USER ST       TIME  NODES NODELIST(REASON)&lt;br /&gt;
1262       cpu     wrap ka_zs040  R       1:12      1 uc3n002&lt;br /&gt;
&lt;br /&gt;
$&lt;br /&gt;
$ # now, see what&#039;s up with my pending job with jobid 1262&lt;br /&gt;
$ &lt;br /&gt;
$ scontrol show job 1262&lt;br /&gt;
&lt;br /&gt;
JobId=1262 JobName=wrap&lt;br /&gt;
   UserId=ka_zs0402(241992) GroupId=ka_scc(12345) MCS_label=N/A&lt;br /&gt;
   Priority=4246 Nice=0 Account=ka QOS=normal&lt;br /&gt;
   JobState=RUNNING Reason=None Dependency=(null)&lt;br /&gt;
   Requeue=1 Restarts=0 BatchFlag=1 Reboot=0 ExitCode=0:0&lt;br /&gt;
   RunTime=00:00:37 TimeLimit=00:20:00 TimeMin=N/A&lt;br /&gt;
   SubmitTime=2025-04-04T10:01:30 EligibleTime=2025-04-04T10:01:30&lt;br /&gt;
   AccrueTime=2025-04-04T10:01:30&lt;br /&gt;
   StartTime=2025-04-04T10:01:31 EndTime=2025-04-04T10:21:31 Deadline=N/A&lt;br /&gt;
   SuspendTime=None SecsPreSuspend=0 LastSchedEval=2025-04-04T10:01:31 Scheduler=Main&lt;br /&gt;
   Partition=cpu AllocNode:Sid=uc3n999:2819841&lt;br /&gt;
   ReqNodeList=(null) ExcNodeList=(null)&lt;br /&gt;
   NodeList=uc3n002&lt;br /&gt;
   BatchHost=uc3n002&lt;br /&gt;
   NumNodes=1 NumCPUs=2 NumTasks=1 CPUs/Task=1 ReqB:S:C:T=0:0:*:*&lt;br /&gt;
   ReqTRES=cpu=1,mem=2000M,node=1,billing=1&lt;br /&gt;
   AllocTRES=cpu=2,mem=4000M,node=1,billing=2&lt;br /&gt;
   Socks/Node=* NtasksPerN:B:S:C=0:0:*:1 CoreSpec=*&lt;br /&gt;
   MinCPUsNode=1 MinMemoryCPU=2000M MinTmpDiskNode=0&lt;br /&gt;
   Features=(null) DelayBoot=00:00:00&lt;br /&gt;
   OverSubscribe=OK Contiguous=0 Licenses=(null) Network=(null)&lt;br /&gt;
   Command=(null)&lt;br /&gt;
   WorkDir=/pfs/data6/home/ka/ka_scc/ka_zs0402&lt;br /&gt;
   StdErr=/pfs/data6/home/ka/ka_scc/ka_zs0402/slurm-1262.out&lt;br /&gt;
   StdIn=/dev/null&lt;br /&gt;
   StdOut=/pfs/data6/home/ka/ka_scc/ka_zs0402/slurm-1262.out&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=== Canceling own jobs : scancel ===&lt;br /&gt;
The scancel command is used to cancel jobs. The command scancel is explained in detail on the webpage https://slurm.schedmd.com/scancel.html or via manpage (man scancel). The command is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ scancel [-i] &amp;lt;job-id&amp;gt;&lt;br /&gt;
$ scancel -t &amp;lt;job_state_name&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Slurm Options =&lt;br /&gt;
&lt;br /&gt;
= Best Practices =&lt;br /&gt;
&lt;br /&gt;
== Step-by-Step example==&lt;br /&gt;
&lt;br /&gt;
== Dos and Don&#039;ts ==&lt;/div&gt;</summary>
		<author><name>P Schuhmacher</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster3.0/Running_Jobs&amp;diff=14649</id>
		<title>BwUniCluster3.0/Running Jobs</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster3.0/Running_Jobs&amp;diff=14649"/>
		<updated>2025-04-04T15:18:39Z</updated>

		<summary type="html">&lt;p&gt;P Schuhmacher: /* Slurm Commands (excerpt) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
= Purpose and function of a queuing system =&lt;br /&gt;
&lt;br /&gt;
General procedure: Hint to [[Running_Calculations | Running Calculations]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Job submission process ==&lt;br /&gt;
&lt;br /&gt;
bwUniCluster 3.0 has installed the workload managing software Slurm. Therefore any job submission by the user is to be executed by commands of the Slurm software. Slurm queues and runs user jobs based on fair sharing policies.&lt;br /&gt;
&lt;br /&gt;
== Slurm ==&lt;br /&gt;
&lt;br /&gt;
HPC Workload Manager on bwUniCluster 3.0 is Slurm.&lt;br /&gt;
Slurm is a cluster management and job scheduling system. Slurm has three key functions. &lt;br /&gt;
* First, it allocates access to resources (compute cores on nodes) to users for some duration of time so they can perform work. &lt;br /&gt;
* it provides a framework for starting, executing, and monitoring work (normally a parallel job) on the set of allocated nodes. &lt;br /&gt;
* it arbitrates contention for resources by managing a queue of pending work.&lt;br /&gt;
&lt;br /&gt;
Any kind of calculation on the compute nodes of bwUniCluster 3.0 requires the user to define calculations as a sequence of commands together with required run time, number of CPU cores and main memory and submit all, i.e., the &#039;&#039;&#039;batch job&#039;&#039;&#039;, to a resource and workload managing software. &lt;br /&gt;
== Terms and definitions ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Partitions &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Slurm manages job queues for different &#039;&#039;&#039;partitions&#039;&#039;&#039;. Partitions are used to group similar node types (e.g. nodes with and without accelerators) and to enforce different access policies and resource limits.&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 3.0 there are different partitions:&lt;br /&gt;
&lt;br /&gt;
* CPU-only nodes&lt;br /&gt;
** 2-socket nodes, consisting of 2 Intel Ice Lake processors with 32 cores each or 2 AMD processors with 48 cores each&lt;br /&gt;
** 2-socket nodes with very high RAM capacity, consisting of 2 AMD processors with 48 cores each&lt;br /&gt;
* GPU-accelerated nodes&lt;br /&gt;
** 2-socket nodes with 4x NVIDIA A100 or 4x NVIDIA H100 GPUs&lt;br /&gt;
** 4-socket node with 4x AMD Instinct accelerator&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Queues &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Job &#039;&#039;&#039;queues&#039;&#039;&#039; are used to manage jobs that request access to shared but limited computing resources of a certain kind (partition).&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 3.0 there are different main types of queues:&lt;br /&gt;
* Regular queues&lt;br /&gt;
** cpu: Jobs that request CPU-only nodes.&lt;br /&gt;
** gpu: Jobs that request GPU-accelerated nodes.&lt;br /&gt;
* Development queues (dev)&lt;br /&gt;
** Short, usually interactive jobs that are used for developing, compiling and testing code and workflows. The intention behind development queues is to provide users with immediate access to computer resources without having to wait. This is the place to realize instantaneous heavy compute without affecting other users, as would be the case on the login nodes.&lt;br /&gt;
&lt;br /&gt;
Requested compute resources such as (wall-)time, number of nodes and amount of memory are restricted and must fit into the boundaries imposed by the queues. The request for compute resources on the bwUniCluster 3.0 &amp;lt;font color=red&amp;gt;requires at least the specification of the &#039;&#039;&#039;queue&#039;&#039;&#039; and the &#039;&#039;&#039;time&#039;&#039;&#039;&amp;lt;/font&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Jobs &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Jobs can be run non-interactively as &#039;&#039;&#039;batch jobs&#039;&#039;&#039; or as &#039;&#039;&#039;interactive jobs&#039;&#039;&#039;.&lt;br /&gt;
Submitting a batch job means, that all steps of a compute project are defined in a Bash script. This Bash script is queued and executed as soon as the compute resources are available and allocated. Jobs are enqueued with the &#039;&#039;sbatch&#039;&#039; command.&lt;br /&gt;
&lt;br /&gt;
For interactive jobs, the resources are requested with the &#039;&#039;salloc&#039;&#039; command. As soon as the computing resources are available and allocated, a command line prompt is returned on a computing node and the user can freely dispose of the resources now available to him.&lt;br /&gt;
{|style=&amp;quot;background:#deffee; width:100%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;padding:5px; background:#cef2e0; text-align:left&amp;quot;|&lt;br /&gt;
[[Image:Attention.svg|center|25px]]&lt;br /&gt;
|style=&amp;quot;padding:5px; background:#cef2e0; text-align:left&amp;quot;|&lt;br /&gt;
&#039;&#039;&#039;Please remember:&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Heavy computations are not allowed on the login nodes&#039;&#039;&#039;.&amp;lt;br&amp;gt;Use a developement or a regular job queue instead! Please refer to [[BwUniCluster3.0/Login#Allowed_Activities_on_Login_Nodes|Allowed Activities on Login Nodes]].&lt;br /&gt;
* &#039;&#039;&#039;Development queues&#039;&#039;&#039; are meant for &#039;&#039;&#039;development tasks&#039;&#039;&#039;.&amp;lt;br&amp;gt;Do not misuse this queue for regular, short-running jobs or chain jobs! Only one running job at a time is enabled. Maximum queue length is reduced to 3.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Queues on bwUniCluster 3.0 = &lt;br /&gt;
== Policy ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Regular Queues ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
! style=&amp;quot;width:5%&amp;quot;| Queue&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Node-Type&lt;br /&gt;
! style=&amp;quot;width:23%&amp;quot;| Default Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Minimal Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Maximum Resources&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;cpu_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Ice Lake&lt;br /&gt;
| mem-per-cpu=1950mb&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=30, mem=249600mb, ntasks-per-node=64, (threads-per-core=2) &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;cpu&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Standard&lt;br /&gt;
| mem-per-cpu=1125mb&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=20, mem=380000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;highmem&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;High Memory&lt;br /&gt;
| mem-per-cpu=1125mb&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=4, mem=2300000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;gpu_h100&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;NVIDIA GPU x4&lt;br /&gt;
| mem-per-cpu=1125mb&amp;lt;br/&amp;gt;cpus-per-gpu=24&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=12, mem=760000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;gpu_mi300&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU node&amp;lt;br/&amp;gt;AMD GPU x4&lt;br /&gt;
| mem-per-cpu=1125mb&amp;lt;br/&amp;gt;cpus-per-gpu=24&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=1, mem=510000mb, ntasks-per-node=40, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;gpu_a100_il&amp;lt;/code&amp;gt;/&amp;lt;code&amp;gt;gpu_h100_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;Ice Lake&amp;lt;br/&amp;gt;NVIDIA GPU x4&lt;br /&gt;
| mem-per-gpu=127500mb&amp;lt;br/&amp;gt;cpus-per-gpu=16&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=9, mem=510000mb, ntasks-per-node=64, (threads-per-core=2) &lt;br /&gt;
|}&lt;br /&gt;
Table 1: Regular Queues&lt;br /&gt;
&lt;br /&gt;
== Development Queues ==&lt;br /&gt;
Only for development, i.e. debugging or performance optimization ...&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
! style=&amp;quot;width:5%&amp;quot;| Queue&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Node Type&lt;br /&gt;
! style=&amp;quot;width:23%&amp;quot;| Default Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Minimal Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Maximum Resources&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_cpu_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Ice Lake&lt;br /&gt;
| mem-per-cpu=1950mb&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=8, mem=249600mb, ntasks-per-node=64, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_cpu&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Standard&lt;br /&gt;
| mem-per-cpu=1125mb&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=180000mb, ntasks-per-node=40, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_highmem&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;High Memory&lt;br /&gt;
| mem-per-cpu=1125mb&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=180000mb, ntasks-per-node=40, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_gpu_h100&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;NVIDIA GPU x4&lt;br /&gt;
| mem-per-cpu=1125mb&amp;lt;br/&amp;gt;cpus-per-gpu=24&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=180000mb, ntasks-per-node=40, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_gpu_a100_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;NVIDIA GPU x4&amp;lt;br/&amp;gt;&lt;br /&gt;
| mem-per-gpu=127500mb&amp;lt;br/&amp;gt;cpus-per-gpu=16 &lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=510000mb, ntasks-per-node=64, (threads-per-core=2) &lt;br /&gt;
|}&lt;br /&gt;
Table 2: Development Queues&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Default resources of a queue class defines time, #tasks and memory if not explicitly given with sbatch command. Resource list acronyms &#039;&#039;--time&#039;&#039;, &#039;&#039;--ntasks&#039;&#039;, &#039;&#039;--nodes&#039;&#039;, &#039;&#039;--mem&#039;&#039; and &#039;&#039;--mem-per-cpu&#039;&#039; are described [[BwUniCluster_3.0_Slurm_common_Features|here]].&lt;br /&gt;
&lt;br /&gt;
== Check available resources: sinfo_t_idle ==&lt;br /&gt;
The Slurm command sinfo is used to view partition and node information for a system running Slurm. It incorporates down time, reservations, and node state information in determining the available backfill window. The sinfo command can only be used by the administrator.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
SCC has prepared a special script (sinfo_t_idle) to find out how many processors are available for immediate use on the system. It is anticipated that users will use this information to submit jobs that meet these criteria and thus obtain quick job turnaround times. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The following command displays what resources are available for immediate use for the whole partition.&lt;br /&gt;
&amp;lt;pre&amp;gt;$ sinfo_t_idle&lt;br /&gt;
Partition dev_cpu                 :      2 nodes idle&lt;br /&gt;
Partition cpu                     :     68 nodes idle&lt;br /&gt;
Partition highmem                 :      4 nodes idle&lt;br /&gt;
Partition dev_gpu_h100            :      0 nodes idle&lt;br /&gt;
Partition gpu_h100                :     11 nodes idle&lt;br /&gt;
Partition gpu_mi300               :      1 nodes idle&lt;br /&gt;
Partition dev_cpu_il              :      0 nodes idle&lt;br /&gt;
Partition cpu_il                  :      0 nodes idle&lt;br /&gt;
Partition dev_gpu_a100_il         :      0 nodes idle&lt;br /&gt;
Partition gpu_a100_il             :      0 nodes idle&lt;br /&gt;
Partition gpu_h100_il             :      0 nodes idle&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Running Jobs =&lt;br /&gt;
&lt;br /&gt;
== Slurm Commands (excerpt) ==&lt;br /&gt;
Important Slurm commands for non-administrators working on bwUniCluster 3.0.&lt;br /&gt;
{| width=850px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Slurm commands !! Brief explanation&lt;br /&gt;
|-&lt;br /&gt;
| [[#Batch Jobs: sbatch|sbatch]] || Submits a job and puts it into the queue [[https://slurm.schedmd.com/sbatch.html sbatch]] &lt;br /&gt;
|-&lt;br /&gt;
| [[#Interactive Jobs: salloc|salloc]] || Requests resources for an interactive Job [[https://slurm.schedmd.com/salloc.html salloc]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Monitor and manage jobs |scontrol show job]] || Displays detailed job state information [[https://slurm.schedmd.com/scontrol.html scontrol]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#List of your submitted jobs : squeue|squeue]] || Displays information about active, eligible, blocked, and/or recently completed jobs [[https://slurm.schedmd.com/squeue.html squeue]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#List of your submitted jobs : squeue|squeue --start]] || Returns start time of submitted job [[https://slurm.schedmd.com/squeue.html squeue]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Check available resources: sinfo_t_idle|sinfo_t_idle]] || Shows what resources are available for immediate use [[https://slurm.schedmd.com/sinfo.html sinfo]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Canceling own jobs : scancel|scancel]] || Cancels a job [[https://slurm.schedmd.com/scancel.html scancel]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* [https://slurm.schedmd.com/tutorials.html  Slurm Tutorials]&lt;br /&gt;
* [https://slurm.schedmd.com/pdfs/summary.pdf  Slurm command/option summary (2 pages)]&lt;br /&gt;
* [https://slurm.schedmd.com/man_index.html  Slurm Commands]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Batch Jobs: sbatch ==&lt;br /&gt;
&lt;br /&gt;
Batch jobs are submitted by using the command &#039;&#039;&#039;sbatch&#039;&#039;&#039;. The main purpose of the &#039;&#039;&#039;sbatch&#039;&#039;&#039; command is to specify the resources that are needed to run the job. &#039;&#039;&#039;sbatch&#039;&#039;&#039; will then queue the batch job. However, starting of batch job depends on the availability of the requested resources and the fair sharing value.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To run your batch job on one of the cpu nodes, please use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sbatch --partition=dev_cpu&lt;br /&gt;
     or &lt;br /&gt;
$ sbatch -p dev_cpu&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Command parameters sbatch ===&lt;br /&gt;
The syntax and use of &#039;&#039;&#039;sbatch&#039;&#039;&#039; can be displayed via:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ man sbatch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;sbatch&#039;&#039;&#039; options can be used from the command line or in your job script. Different defaults for some of these options are set based on the queue and can be found [https://wiki.bwhpc.de/e/BwUniCluster3.0/Batch_Queues#sbatch_-p_queue here]&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | sbatch Options&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width:8%&amp;quot;| Command line&lt;br /&gt;
! style=&amp;quot;width:9%&amp;quot;| Script&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Purpose&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -t, --time=&#039;&#039;time&#039;&#039;&lt;br /&gt;
| #SBATCH --time=&#039;&#039;time&#039;&#039;&lt;br /&gt;
| Wall clock time limit.&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -N, --nodes=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --nodes=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of nodes to be used.&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -n, --ntasks=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --ntasks=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of tasks to be launched.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --ntasks-per-node=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --ntasks-per-node=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Maximum count of tasks per node.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -c, --cpus-per-task=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --cpus-per-task=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of CPUs required per (MPI-)task.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mem=&#039;&#039;value_in_MB&#039;&#039;&lt;br /&gt;
| #SBATCH --mem=&#039;&#039;value_in_MB&#039;&#039; &lt;br /&gt;
| Memory in MegaByte per node. (You should omit the setting of this option.)&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mem-per-cpu=&#039;&#039;value_in_MB&#039;&#039;&lt;br /&gt;
| #SBATCH --mem-per-cpu=&#039;&#039;value_in_MB&#039;&#039; &lt;br /&gt;
| Minimum Memory required per allocated CPU. (You should omit the setting of this option.)&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mail-type=&#039;&#039;type&#039;&#039;&lt;br /&gt;
| #SBATCH --mail-type=&#039;&#039;type&#039;&#039;&lt;br /&gt;
| Notify user by email when certain event types occur.&amp;lt;br&amp;gt;Valid type values are NONE, BEGIN, END, FAIL, REQUEUE, ALL.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mail-user=&#039;&#039;mail-address&#039;&#039;&lt;br /&gt;
| #SBATCH --mail-user=&#039;&#039;mail-address&#039;&#039;&lt;br /&gt;
|  The specified mail-address receives email notification of state changes as defined by --mail-type.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --output=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --output=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| File in which job output is stored. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --error=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --error=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| File in which job error messages are stored. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -J, --job-name=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --job-name=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| Job name.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --export=[ALL,] &#039;&#039;env-variables&#039;&#039;&lt;br /&gt;
| #SBATCH --export=[ALL,] &#039;&#039;env-variables&#039;&#039;&lt;br /&gt;
| Identifies which environment variables from the submission environment are propagated to the launched application. Default is ALL.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -A, --account=&#039;&#039;group-name&#039;&#039;&lt;br /&gt;
| #SBATCH --account=&#039;&#039;group-name&#039;&#039;&lt;br /&gt;
| Change resources used by this job to specified group. You may need this option if your account is assigned to more than one group. By command &amp;quot;scontrol show job&amp;quot; the project group the job is accounted on can be seen behind &amp;quot;Account=&amp;quot;. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -p, --partition=&#039;&#039;queue-name&#039;&#039;&lt;br /&gt;
| #SBATCH --partition=&#039;&#039;queue-name&#039;&#039;&lt;br /&gt;
| Request a specific queue for the resource allocation.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --reservation=&#039;&#039;reservation-name&#039;&#039;&lt;br /&gt;
| #SBATCH --reservation=&#039;&#039;reservation-name&#039;&#039;&lt;br /&gt;
| Use a specific reservation for the resource allocation.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -C, --constraint=&#039;&#039;LSDF&#039;&#039;&lt;br /&gt;
| #SBATCH --constraint=LSDF&lt;br /&gt;
| Job constraint LSDF filesystems.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -C, --constraint=&#039;&#039;BEEOND (BEEOND_4MDS, BEEOND_MAXMDS)&#039;&#039;&lt;br /&gt;
| #SBATCH --constraint=BEEOND (BEEOND_4MDS, BEEOND_MAXMDS)&lt;br /&gt;
| Job constraint BeeOND filesystem.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Interactive Jobs: salloc ==&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 3.0 you are only allowed to run short jobs (&amp;lt;&amp;lt; 1 hour) with little memory requirements (&amp;lt;&amp;lt; 8 GByte) on the logins nodes. If you want to run longer jobs and/or jobs with a request of more than 8 GByte of memory, you must allocate resources for so-called interactive jobs by usage of the command salloc on a login node. Considering a serial application running on a compute node that requires 5000 MByte of memory and limiting the interactive run to 2 hours the following command has to be executed:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ salloc -p cpu -n 1 -t 120 --mem=5000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then you will get one core on a compute node within the partition &amp;quot;cpu&amp;quot;. After execution of this command &#039;&#039;&#039;DO NOT CLOSE&#039;&#039;&#039; your current terminal session but wait until the queueing system Slurm has granted you the requested resources on the compute system. You will be logged in automatically on the granted core! To run a serial program on the granted core you only have to type the name of the executable.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./&amp;lt;my_serial_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please be aware that your serial job must run less than 2 hours in this example, else the job will be killed during runtime by the system. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can also start now a graphical X11-terminal connecting you to the dedicated resource that is available for 2 hours. You can start it by the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ xterm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that, once the walltime limit has been reached the resources - i.e. the compute node - will automatically be revoked.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
An interactive parallel application running on one compute node or on many compute nodes (e.g. here 5 nodes) with 96 cores each requires usually an amount of memory in GByte (e.g. 50 GByte) and a maximum time (e.g. 1 hour). E.g. 5 nodes can be allocated by the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ salloc -p cpu -N 5 --ntasks-per-node=96 -t 01:00:00  --mem=50gb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you can run parallel jobs on 480 cores requiring 50 GByte of memory per node. Please be aware that you will be logged in on core 0 of the first node.&lt;br /&gt;
If you want to have access to another node you have to open a new terminal, connect it also to bwUniCluster 3.0 and type the following commands to&lt;br /&gt;
connect to the running interactive job and then to a specific node:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ srun --jobid=XXXXXXXX --pty /bin/bash&lt;br /&gt;
$ srun --nodelist=uc3nXXX --pty /bin/bash&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ squeue&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the jobid and the nodelist can be shown.&lt;br /&gt;
&lt;br /&gt;
If you want to run MPI-programs, you can do it by simply typing mpirun &amp;lt;program_name&amp;gt;. Then your program will be run on 480 cores. A very simple example for starting a parallel job can be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mpirun &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also start the debugger ddt by the commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module add devel/ddt&lt;br /&gt;
$ ddt &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above commands will execute the parallel program &amp;lt;my_mpi_program&amp;gt; on all available cores. You can also start parallel programs on a subset of cores; an example for this can be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mpirun -n 50 &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are using Intel MPI you must start &amp;lt;my_mpi_program&amp;gt; by the command mpiexec.hydra (instead of mpirun).&lt;br /&gt;
&lt;br /&gt;
== Interactive Computing with Jupyter ==&lt;br /&gt;
&lt;br /&gt;
== Monitor and manage jobs ==&lt;br /&gt;
&lt;br /&gt;
=== List of your submitted jobs : squeue ===&lt;br /&gt;
Displays information about YOUR active, pending and/or recently completed jobs. The command displays all own active and pending jobs. The command squeue is explained in detail on the webpage https://slurm.schedmd.com/squeue.html or via manpage (man squeue).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;squeue&#039;&#039; example on bwUniCluster 3.0 &amp;lt;small&amp;gt;(Only your own jobs are displayed!)&amp;lt;/small&amp;gt;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ squeue &lt;br /&gt;
             JOBID PARTITION     NAME     USER ST       TIME  NODES NODELIST(REASON)&lt;br /&gt;
              1262       cpu     wrap ka_ab123  R       8:15      1 uc3n002&lt;br /&gt;
              1267 dev_gpu_h     wrap ka_ab123 PD       0:00      1 (Resources)&lt;br /&gt;
              1265   highmem     wrap ka_ab123  R       2:41      1 uc3n084&lt;br /&gt;
$ squeue -l&lt;br /&gt;
             JOBID PARTITION     NAME     USER    STATE       TIME TIME_LIMI  NODES NODELIST(REASON)&lt;br /&gt;
              1262       cpu     wrap ka_ab123  RUNNING       8:55     20:00      1 uc3n002&lt;br /&gt;
              1267 dev_gpu_h     wrap ka_ab123  PENDING       0:00     20:00      1 (Resources)&lt;br /&gt;
              1265   highmem     wrap ka_ab123  RUNNING       3:21     20:00      1 uc3n084&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Detailed job information : scontrol show job ===&lt;br /&gt;
scontrol show job displays detailed job state information and diagnostic output for all or a specified job of yours. Detailed information is available for active, pending and recently completed jobs. The command scontrol is explained in detail on the webpage https://slurm.schedmd.com/scontrol.html or via manpage (man scontrol). &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Display the state of all your jobs in normal mode: scontrol show job&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Display the state of a job with &amp;lt;jobid&amp;gt; in normal mode: scontrol show job &amp;lt;jobid&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Here is an example from bwUniCluster 3.0.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ squeue&lt;br /&gt;
JOBID PARTITION     NAME     USER ST       TIME  NODES NODELIST(REASON)&lt;br /&gt;
1262       cpu     wrap ka_zs040  R       1:12      1 uc3n002&lt;br /&gt;
&lt;br /&gt;
$&lt;br /&gt;
$ # now, see what&#039;s up with my pending job with jobid 1262&lt;br /&gt;
$ &lt;br /&gt;
$ scontrol show job 1262&lt;br /&gt;
&lt;br /&gt;
JobId=1262 JobName=wrap&lt;br /&gt;
   UserId=ka_zs0402(241992) GroupId=ka_scc(12345) MCS_label=N/A&lt;br /&gt;
   Priority=4246 Nice=0 Account=ka QOS=normal&lt;br /&gt;
   JobState=RUNNING Reason=None Dependency=(null)&lt;br /&gt;
   Requeue=1 Restarts=0 BatchFlag=1 Reboot=0 ExitCode=0:0&lt;br /&gt;
   RunTime=00:00:37 TimeLimit=00:20:00 TimeMin=N/A&lt;br /&gt;
   SubmitTime=2025-04-04T10:01:30 EligibleTime=2025-04-04T10:01:30&lt;br /&gt;
   AccrueTime=2025-04-04T10:01:30&lt;br /&gt;
   StartTime=2025-04-04T10:01:31 EndTime=2025-04-04T10:21:31 Deadline=N/A&lt;br /&gt;
   SuspendTime=None SecsPreSuspend=0 LastSchedEval=2025-04-04T10:01:31 Scheduler=Main&lt;br /&gt;
   Partition=cpu AllocNode:Sid=uc3n999:2819841&lt;br /&gt;
   ReqNodeList=(null) ExcNodeList=(null)&lt;br /&gt;
   NodeList=uc3n002&lt;br /&gt;
   BatchHost=uc3n002&lt;br /&gt;
   NumNodes=1 NumCPUs=2 NumTasks=1 CPUs/Task=1 ReqB:S:C:T=0:0:*:*&lt;br /&gt;
   ReqTRES=cpu=1,mem=2000M,node=1,billing=1&lt;br /&gt;
   AllocTRES=cpu=2,mem=4000M,node=1,billing=2&lt;br /&gt;
   Socks/Node=* NtasksPerN:B:S:C=0:0:*:1 CoreSpec=*&lt;br /&gt;
   MinCPUsNode=1 MinMemoryCPU=2000M MinTmpDiskNode=0&lt;br /&gt;
   Features=(null) DelayBoot=00:00:00&lt;br /&gt;
   OverSubscribe=OK Contiguous=0 Licenses=(null) Network=(null)&lt;br /&gt;
   Command=(null)&lt;br /&gt;
   WorkDir=/pfs/data6/home/ka/ka_scc/ka_zs0402&lt;br /&gt;
   StdErr=/pfs/data6/home/ka/ka_scc/ka_zs0402/slurm-1262.out&lt;br /&gt;
   StdIn=/dev/null&lt;br /&gt;
   StdOut=/pfs/data6/home/ka/ka_scc/ka_zs0402/slurm-1262.out&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Slurm Options =&lt;br /&gt;
&lt;br /&gt;
= Best Practices =&lt;br /&gt;
&lt;br /&gt;
== Step-by-Step example==&lt;br /&gt;
&lt;br /&gt;
== Dos and Don&#039;ts ==&lt;/div&gt;</summary>
		<author><name>P Schuhmacher</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster3.0/Running_Jobs&amp;diff=14648</id>
		<title>BwUniCluster3.0/Running Jobs</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster3.0/Running_Jobs&amp;diff=14648"/>
		<updated>2025-04-04T15:18:17Z</updated>

		<summary type="html">&lt;p&gt;P Schuhmacher: /* Check available resources */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
= Purpose and function of a queuing system =&lt;br /&gt;
&lt;br /&gt;
General procedure: Hint to [[Running_Calculations | Running Calculations]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Job submission process ==&lt;br /&gt;
&lt;br /&gt;
bwUniCluster 3.0 has installed the workload managing software Slurm. Therefore any job submission by the user is to be executed by commands of the Slurm software. Slurm queues and runs user jobs based on fair sharing policies.&lt;br /&gt;
&lt;br /&gt;
== Slurm ==&lt;br /&gt;
&lt;br /&gt;
HPC Workload Manager on bwUniCluster 3.0 is Slurm.&lt;br /&gt;
Slurm is a cluster management and job scheduling system. Slurm has three key functions. &lt;br /&gt;
* First, it allocates access to resources (compute cores on nodes) to users for some duration of time so they can perform work. &lt;br /&gt;
* it provides a framework for starting, executing, and monitoring work (normally a parallel job) on the set of allocated nodes. &lt;br /&gt;
* it arbitrates contention for resources by managing a queue of pending work.&lt;br /&gt;
&lt;br /&gt;
Any kind of calculation on the compute nodes of bwUniCluster 3.0 requires the user to define calculations as a sequence of commands together with required run time, number of CPU cores and main memory and submit all, i.e., the &#039;&#039;&#039;batch job&#039;&#039;&#039;, to a resource and workload managing software. &lt;br /&gt;
== Terms and definitions ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Partitions &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Slurm manages job queues for different &#039;&#039;&#039;partitions&#039;&#039;&#039;. Partitions are used to group similar node types (e.g. nodes with and without accelerators) and to enforce different access policies and resource limits.&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 3.0 there are different partitions:&lt;br /&gt;
&lt;br /&gt;
* CPU-only nodes&lt;br /&gt;
** 2-socket nodes, consisting of 2 Intel Ice Lake processors with 32 cores each or 2 AMD processors with 48 cores each&lt;br /&gt;
** 2-socket nodes with very high RAM capacity, consisting of 2 AMD processors with 48 cores each&lt;br /&gt;
* GPU-accelerated nodes&lt;br /&gt;
** 2-socket nodes with 4x NVIDIA A100 or 4x NVIDIA H100 GPUs&lt;br /&gt;
** 4-socket node with 4x AMD Instinct accelerator&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Queues &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Job &#039;&#039;&#039;queues&#039;&#039;&#039; are used to manage jobs that request access to shared but limited computing resources of a certain kind (partition).&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 3.0 there are different main types of queues:&lt;br /&gt;
* Regular queues&lt;br /&gt;
** cpu: Jobs that request CPU-only nodes.&lt;br /&gt;
** gpu: Jobs that request GPU-accelerated nodes.&lt;br /&gt;
* Development queues (dev)&lt;br /&gt;
** Short, usually interactive jobs that are used for developing, compiling and testing code and workflows. The intention behind development queues is to provide users with immediate access to computer resources without having to wait. This is the place to realize instantaneous heavy compute without affecting other users, as would be the case on the login nodes.&lt;br /&gt;
&lt;br /&gt;
Requested compute resources such as (wall-)time, number of nodes and amount of memory are restricted and must fit into the boundaries imposed by the queues. The request for compute resources on the bwUniCluster 3.0 &amp;lt;font color=red&amp;gt;requires at least the specification of the &#039;&#039;&#039;queue&#039;&#039;&#039; and the &#039;&#039;&#039;time&#039;&#039;&#039;&amp;lt;/font&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Jobs &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Jobs can be run non-interactively as &#039;&#039;&#039;batch jobs&#039;&#039;&#039; or as &#039;&#039;&#039;interactive jobs&#039;&#039;&#039;.&lt;br /&gt;
Submitting a batch job means, that all steps of a compute project are defined in a Bash script. This Bash script is queued and executed as soon as the compute resources are available and allocated. Jobs are enqueued with the &#039;&#039;sbatch&#039;&#039; command.&lt;br /&gt;
&lt;br /&gt;
For interactive jobs, the resources are requested with the &#039;&#039;salloc&#039;&#039; command. As soon as the computing resources are available and allocated, a command line prompt is returned on a computing node and the user can freely dispose of the resources now available to him.&lt;br /&gt;
{|style=&amp;quot;background:#deffee; width:100%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;padding:5px; background:#cef2e0; text-align:left&amp;quot;|&lt;br /&gt;
[[Image:Attention.svg|center|25px]]&lt;br /&gt;
|style=&amp;quot;padding:5px; background:#cef2e0; text-align:left&amp;quot;|&lt;br /&gt;
&#039;&#039;&#039;Please remember:&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Heavy computations are not allowed on the login nodes&#039;&#039;&#039;.&amp;lt;br&amp;gt;Use a developement or a regular job queue instead! Please refer to [[BwUniCluster3.0/Login#Allowed_Activities_on_Login_Nodes|Allowed Activities on Login Nodes]].&lt;br /&gt;
* &#039;&#039;&#039;Development queues&#039;&#039;&#039; are meant for &#039;&#039;&#039;development tasks&#039;&#039;&#039;.&amp;lt;br&amp;gt;Do not misuse this queue for regular, short-running jobs or chain jobs! Only one running job at a time is enabled. Maximum queue length is reduced to 3.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Queues on bwUniCluster 3.0 = &lt;br /&gt;
== Policy ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Regular Queues ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
! style=&amp;quot;width:5%&amp;quot;| Queue&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Node-Type&lt;br /&gt;
! style=&amp;quot;width:23%&amp;quot;| Default Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Minimal Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Maximum Resources&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;cpu_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Ice Lake&lt;br /&gt;
| mem-per-cpu=1950mb&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=30, mem=249600mb, ntasks-per-node=64, (threads-per-core=2) &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;cpu&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Standard&lt;br /&gt;
| mem-per-cpu=1125mb&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=20, mem=380000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;highmem&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;High Memory&lt;br /&gt;
| mem-per-cpu=1125mb&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=4, mem=2300000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;gpu_h100&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;NVIDIA GPU x4&lt;br /&gt;
| mem-per-cpu=1125mb&amp;lt;br/&amp;gt;cpus-per-gpu=24&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=12, mem=760000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;gpu_mi300&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU node&amp;lt;br/&amp;gt;AMD GPU x4&lt;br /&gt;
| mem-per-cpu=1125mb&amp;lt;br/&amp;gt;cpus-per-gpu=24&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=1, mem=510000mb, ntasks-per-node=40, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;gpu_a100_il&amp;lt;/code&amp;gt;/&amp;lt;code&amp;gt;gpu_h100_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;Ice Lake&amp;lt;br/&amp;gt;NVIDIA GPU x4&lt;br /&gt;
| mem-per-gpu=127500mb&amp;lt;br/&amp;gt;cpus-per-gpu=16&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=9, mem=510000mb, ntasks-per-node=64, (threads-per-core=2) &lt;br /&gt;
|}&lt;br /&gt;
Table 1: Regular Queues&lt;br /&gt;
&lt;br /&gt;
== Development Queues ==&lt;br /&gt;
Only for development, i.e. debugging or performance optimization ...&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
! style=&amp;quot;width:5%&amp;quot;| Queue&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Node Type&lt;br /&gt;
! style=&amp;quot;width:23%&amp;quot;| Default Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Minimal Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Maximum Resources&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_cpu_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Ice Lake&lt;br /&gt;
| mem-per-cpu=1950mb&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=8, mem=249600mb, ntasks-per-node=64, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_cpu&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Standard&lt;br /&gt;
| mem-per-cpu=1125mb&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=180000mb, ntasks-per-node=40, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_highmem&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;High Memory&lt;br /&gt;
| mem-per-cpu=1125mb&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=180000mb, ntasks-per-node=40, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_gpu_h100&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;NVIDIA GPU x4&lt;br /&gt;
| mem-per-cpu=1125mb&amp;lt;br/&amp;gt;cpus-per-gpu=24&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=180000mb, ntasks-per-node=40, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_gpu_a100_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;NVIDIA GPU x4&amp;lt;br/&amp;gt;&lt;br /&gt;
| mem-per-gpu=127500mb&amp;lt;br/&amp;gt;cpus-per-gpu=16 &lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=510000mb, ntasks-per-node=64, (threads-per-core=2) &lt;br /&gt;
|}&lt;br /&gt;
Table 2: Development Queues&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Default resources of a queue class defines time, #tasks and memory if not explicitly given with sbatch command. Resource list acronyms &#039;&#039;--time&#039;&#039;, &#039;&#039;--ntasks&#039;&#039;, &#039;&#039;--nodes&#039;&#039;, &#039;&#039;--mem&#039;&#039; and &#039;&#039;--mem-per-cpu&#039;&#039; are described [[BwUniCluster_3.0_Slurm_common_Features|here]].&lt;br /&gt;
&lt;br /&gt;
== Check available resources: sinfo_t_idle ==&lt;br /&gt;
The Slurm command sinfo is used to view partition and node information for a system running Slurm. It incorporates down time, reservations, and node state information in determining the available backfill window. The sinfo command can only be used by the administrator.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
SCC has prepared a special script (sinfo_t_idle) to find out how many processors are available for immediate use on the system. It is anticipated that users will use this information to submit jobs that meet these criteria and thus obtain quick job turnaround times. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The following command displays what resources are available for immediate use for the whole partition.&lt;br /&gt;
&amp;lt;pre&amp;gt;$ sinfo_t_idle&lt;br /&gt;
Partition dev_cpu                 :      2 nodes idle&lt;br /&gt;
Partition cpu                     :     68 nodes idle&lt;br /&gt;
Partition highmem                 :      4 nodes idle&lt;br /&gt;
Partition dev_gpu_h100            :      0 nodes idle&lt;br /&gt;
Partition gpu_h100                :     11 nodes idle&lt;br /&gt;
Partition gpu_mi300               :      1 nodes idle&lt;br /&gt;
Partition dev_cpu_il              :      0 nodes idle&lt;br /&gt;
Partition cpu_il                  :      0 nodes idle&lt;br /&gt;
Partition dev_gpu_a100_il         :      0 nodes idle&lt;br /&gt;
Partition gpu_a100_il             :      0 nodes idle&lt;br /&gt;
Partition gpu_h100_il             :      0 nodes idle&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Running Jobs =&lt;br /&gt;
&lt;br /&gt;
== Slurm Commands (excerpt) ==&lt;br /&gt;
Important Slurm commands for non-administrators working on bwUniCluster 3.0.&lt;br /&gt;
{| width=850px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Slurm commands !! Brief explanation&lt;br /&gt;
|-&lt;br /&gt;
| [[#Batch Jobs: sbatch|sbatch]] || Submits a job and puts it into the queue [[https://slurm.schedmd.com/sbatch.html sbatch]] &lt;br /&gt;
|-&lt;br /&gt;
| [[#Interactive Jobs: salloc|salloc]] || Requests resources for an interactive Job [[https://slurm.schedmd.com/salloc.html salloc]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Monitor and manage jobs |scontrol show job]] || Displays detailed job state information [[https://slurm.schedmd.com/scontrol.html scontrol]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#List of your submitted jobs : squeue|squeue]] || Displays information about active, eligible, blocked, and/or recently completed jobs [[https://slurm.schedmd.com/squeue.html squeue]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#List of your submitted jobs : squeue|squeue --start]] || Returns start time of submitted job [[https://slurm.schedmd.com/squeue.html squeue]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Shows free resources : sinfo_t_idle|sinfo_t_idle]] || Shows what resources are available for immediate use [[https://slurm.schedmd.com/sinfo.html sinfo]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Canceling own jobs : scancel|scancel]] || Cancels a job [[https://slurm.schedmd.com/scancel.html scancel]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* [https://slurm.schedmd.com/tutorials.html  Slurm Tutorials]&lt;br /&gt;
* [https://slurm.schedmd.com/pdfs/summary.pdf  Slurm command/option summary (2 pages)]&lt;br /&gt;
* [https://slurm.schedmd.com/man_index.html  Slurm Commands]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Batch Jobs: sbatch ==&lt;br /&gt;
&lt;br /&gt;
Batch jobs are submitted by using the command &#039;&#039;&#039;sbatch&#039;&#039;&#039;. The main purpose of the &#039;&#039;&#039;sbatch&#039;&#039;&#039; command is to specify the resources that are needed to run the job. &#039;&#039;&#039;sbatch&#039;&#039;&#039; will then queue the batch job. However, starting of batch job depends on the availability of the requested resources and the fair sharing value.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To run your batch job on one of the cpu nodes, please use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sbatch --partition=dev_cpu&lt;br /&gt;
     or &lt;br /&gt;
$ sbatch -p dev_cpu&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Command parameters sbatch ===&lt;br /&gt;
The syntax and use of &#039;&#039;&#039;sbatch&#039;&#039;&#039; can be displayed via:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ man sbatch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;sbatch&#039;&#039;&#039; options can be used from the command line or in your job script. Different defaults for some of these options are set based on the queue and can be found [https://wiki.bwhpc.de/e/BwUniCluster3.0/Batch_Queues#sbatch_-p_queue here]&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | sbatch Options&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width:8%&amp;quot;| Command line&lt;br /&gt;
! style=&amp;quot;width:9%&amp;quot;| Script&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Purpose&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -t, --time=&#039;&#039;time&#039;&#039;&lt;br /&gt;
| #SBATCH --time=&#039;&#039;time&#039;&#039;&lt;br /&gt;
| Wall clock time limit.&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -N, --nodes=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --nodes=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of nodes to be used.&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -n, --ntasks=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --ntasks=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of tasks to be launched.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --ntasks-per-node=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --ntasks-per-node=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Maximum count of tasks per node.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -c, --cpus-per-task=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --cpus-per-task=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of CPUs required per (MPI-)task.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mem=&#039;&#039;value_in_MB&#039;&#039;&lt;br /&gt;
| #SBATCH --mem=&#039;&#039;value_in_MB&#039;&#039; &lt;br /&gt;
| Memory in MegaByte per node. (You should omit the setting of this option.)&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mem-per-cpu=&#039;&#039;value_in_MB&#039;&#039;&lt;br /&gt;
| #SBATCH --mem-per-cpu=&#039;&#039;value_in_MB&#039;&#039; &lt;br /&gt;
| Minimum Memory required per allocated CPU. (You should omit the setting of this option.)&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mail-type=&#039;&#039;type&#039;&#039;&lt;br /&gt;
| #SBATCH --mail-type=&#039;&#039;type&#039;&#039;&lt;br /&gt;
| Notify user by email when certain event types occur.&amp;lt;br&amp;gt;Valid type values are NONE, BEGIN, END, FAIL, REQUEUE, ALL.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mail-user=&#039;&#039;mail-address&#039;&#039;&lt;br /&gt;
| #SBATCH --mail-user=&#039;&#039;mail-address&#039;&#039;&lt;br /&gt;
|  The specified mail-address receives email notification of state changes as defined by --mail-type.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --output=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --output=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| File in which job output is stored. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --error=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --error=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| File in which job error messages are stored. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -J, --job-name=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --job-name=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| Job name.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --export=[ALL,] &#039;&#039;env-variables&#039;&#039;&lt;br /&gt;
| #SBATCH --export=[ALL,] &#039;&#039;env-variables&#039;&#039;&lt;br /&gt;
| Identifies which environment variables from the submission environment are propagated to the launched application. Default is ALL.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -A, --account=&#039;&#039;group-name&#039;&#039;&lt;br /&gt;
| #SBATCH --account=&#039;&#039;group-name&#039;&#039;&lt;br /&gt;
| Change resources used by this job to specified group. You may need this option if your account is assigned to more than one group. By command &amp;quot;scontrol show job&amp;quot; the project group the job is accounted on can be seen behind &amp;quot;Account=&amp;quot;. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -p, --partition=&#039;&#039;queue-name&#039;&#039;&lt;br /&gt;
| #SBATCH --partition=&#039;&#039;queue-name&#039;&#039;&lt;br /&gt;
| Request a specific queue for the resource allocation.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --reservation=&#039;&#039;reservation-name&#039;&#039;&lt;br /&gt;
| #SBATCH --reservation=&#039;&#039;reservation-name&#039;&#039;&lt;br /&gt;
| Use a specific reservation for the resource allocation.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -C, --constraint=&#039;&#039;LSDF&#039;&#039;&lt;br /&gt;
| #SBATCH --constraint=LSDF&lt;br /&gt;
| Job constraint LSDF filesystems.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -C, --constraint=&#039;&#039;BEEOND (BEEOND_4MDS, BEEOND_MAXMDS)&#039;&#039;&lt;br /&gt;
| #SBATCH --constraint=BEEOND (BEEOND_4MDS, BEEOND_MAXMDS)&lt;br /&gt;
| Job constraint BeeOND filesystem.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Interactive Jobs: salloc ==&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 3.0 you are only allowed to run short jobs (&amp;lt;&amp;lt; 1 hour) with little memory requirements (&amp;lt;&amp;lt; 8 GByte) on the logins nodes. If you want to run longer jobs and/or jobs with a request of more than 8 GByte of memory, you must allocate resources for so-called interactive jobs by usage of the command salloc on a login node. Considering a serial application running on a compute node that requires 5000 MByte of memory and limiting the interactive run to 2 hours the following command has to be executed:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ salloc -p cpu -n 1 -t 120 --mem=5000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then you will get one core on a compute node within the partition &amp;quot;cpu&amp;quot;. After execution of this command &#039;&#039;&#039;DO NOT CLOSE&#039;&#039;&#039; your current terminal session but wait until the queueing system Slurm has granted you the requested resources on the compute system. You will be logged in automatically on the granted core! To run a serial program on the granted core you only have to type the name of the executable.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./&amp;lt;my_serial_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please be aware that your serial job must run less than 2 hours in this example, else the job will be killed during runtime by the system. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can also start now a graphical X11-terminal connecting you to the dedicated resource that is available for 2 hours. You can start it by the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ xterm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that, once the walltime limit has been reached the resources - i.e. the compute node - will automatically be revoked.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
An interactive parallel application running on one compute node or on many compute nodes (e.g. here 5 nodes) with 96 cores each requires usually an amount of memory in GByte (e.g. 50 GByte) and a maximum time (e.g. 1 hour). E.g. 5 nodes can be allocated by the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ salloc -p cpu -N 5 --ntasks-per-node=96 -t 01:00:00  --mem=50gb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you can run parallel jobs on 480 cores requiring 50 GByte of memory per node. Please be aware that you will be logged in on core 0 of the first node.&lt;br /&gt;
If you want to have access to another node you have to open a new terminal, connect it also to bwUniCluster 3.0 and type the following commands to&lt;br /&gt;
connect to the running interactive job and then to a specific node:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ srun --jobid=XXXXXXXX --pty /bin/bash&lt;br /&gt;
$ srun --nodelist=uc3nXXX --pty /bin/bash&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ squeue&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the jobid and the nodelist can be shown.&lt;br /&gt;
&lt;br /&gt;
If you want to run MPI-programs, you can do it by simply typing mpirun &amp;lt;program_name&amp;gt;. Then your program will be run on 480 cores. A very simple example for starting a parallel job can be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mpirun &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also start the debugger ddt by the commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module add devel/ddt&lt;br /&gt;
$ ddt &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above commands will execute the parallel program &amp;lt;my_mpi_program&amp;gt; on all available cores. You can also start parallel programs on a subset of cores; an example for this can be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mpirun -n 50 &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are using Intel MPI you must start &amp;lt;my_mpi_program&amp;gt; by the command mpiexec.hydra (instead of mpirun).&lt;br /&gt;
&lt;br /&gt;
== Interactive Computing with Jupyter ==&lt;br /&gt;
&lt;br /&gt;
== Monitor and manage jobs ==&lt;br /&gt;
&lt;br /&gt;
=== List of your submitted jobs : squeue ===&lt;br /&gt;
Displays information about YOUR active, pending and/or recently completed jobs. The command displays all own active and pending jobs. The command squeue is explained in detail on the webpage https://slurm.schedmd.com/squeue.html or via manpage (man squeue).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;squeue&#039;&#039; example on bwUniCluster 3.0 &amp;lt;small&amp;gt;(Only your own jobs are displayed!)&amp;lt;/small&amp;gt;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ squeue &lt;br /&gt;
             JOBID PARTITION     NAME     USER ST       TIME  NODES NODELIST(REASON)&lt;br /&gt;
              1262       cpu     wrap ka_ab123  R       8:15      1 uc3n002&lt;br /&gt;
              1267 dev_gpu_h     wrap ka_ab123 PD       0:00      1 (Resources)&lt;br /&gt;
              1265   highmem     wrap ka_ab123  R       2:41      1 uc3n084&lt;br /&gt;
$ squeue -l&lt;br /&gt;
             JOBID PARTITION     NAME     USER    STATE       TIME TIME_LIMI  NODES NODELIST(REASON)&lt;br /&gt;
              1262       cpu     wrap ka_ab123  RUNNING       8:55     20:00      1 uc3n002&lt;br /&gt;
              1267 dev_gpu_h     wrap ka_ab123  PENDING       0:00     20:00      1 (Resources)&lt;br /&gt;
              1265   highmem     wrap ka_ab123  RUNNING       3:21     20:00      1 uc3n084&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Detailed job information : scontrol show job ===&lt;br /&gt;
scontrol show job displays detailed job state information and diagnostic output for all or a specified job of yours. Detailed information is available for active, pending and recently completed jobs. The command scontrol is explained in detail on the webpage https://slurm.schedmd.com/scontrol.html or via manpage (man scontrol). &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Display the state of all your jobs in normal mode: scontrol show job&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Display the state of a job with &amp;lt;jobid&amp;gt; in normal mode: scontrol show job &amp;lt;jobid&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Here is an example from bwUniCluster 3.0.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ squeue&lt;br /&gt;
JOBID PARTITION     NAME     USER ST       TIME  NODES NODELIST(REASON)&lt;br /&gt;
1262       cpu     wrap ka_zs040  R       1:12      1 uc3n002&lt;br /&gt;
&lt;br /&gt;
$&lt;br /&gt;
$ # now, see what&#039;s up with my pending job with jobid 1262&lt;br /&gt;
$ &lt;br /&gt;
$ scontrol show job 1262&lt;br /&gt;
&lt;br /&gt;
JobId=1262 JobName=wrap&lt;br /&gt;
   UserId=ka_zs0402(241992) GroupId=ka_scc(12345) MCS_label=N/A&lt;br /&gt;
   Priority=4246 Nice=0 Account=ka QOS=normal&lt;br /&gt;
   JobState=RUNNING Reason=None Dependency=(null)&lt;br /&gt;
   Requeue=1 Restarts=0 BatchFlag=1 Reboot=0 ExitCode=0:0&lt;br /&gt;
   RunTime=00:00:37 TimeLimit=00:20:00 TimeMin=N/A&lt;br /&gt;
   SubmitTime=2025-04-04T10:01:30 EligibleTime=2025-04-04T10:01:30&lt;br /&gt;
   AccrueTime=2025-04-04T10:01:30&lt;br /&gt;
   StartTime=2025-04-04T10:01:31 EndTime=2025-04-04T10:21:31 Deadline=N/A&lt;br /&gt;
   SuspendTime=None SecsPreSuspend=0 LastSchedEval=2025-04-04T10:01:31 Scheduler=Main&lt;br /&gt;
   Partition=cpu AllocNode:Sid=uc3n999:2819841&lt;br /&gt;
   ReqNodeList=(null) ExcNodeList=(null)&lt;br /&gt;
   NodeList=uc3n002&lt;br /&gt;
   BatchHost=uc3n002&lt;br /&gt;
   NumNodes=1 NumCPUs=2 NumTasks=1 CPUs/Task=1 ReqB:S:C:T=0:0:*:*&lt;br /&gt;
   ReqTRES=cpu=1,mem=2000M,node=1,billing=1&lt;br /&gt;
   AllocTRES=cpu=2,mem=4000M,node=1,billing=2&lt;br /&gt;
   Socks/Node=* NtasksPerN:B:S:C=0:0:*:1 CoreSpec=*&lt;br /&gt;
   MinCPUsNode=1 MinMemoryCPU=2000M MinTmpDiskNode=0&lt;br /&gt;
   Features=(null) DelayBoot=00:00:00&lt;br /&gt;
   OverSubscribe=OK Contiguous=0 Licenses=(null) Network=(null)&lt;br /&gt;
   Command=(null)&lt;br /&gt;
   WorkDir=/pfs/data6/home/ka/ka_scc/ka_zs0402&lt;br /&gt;
   StdErr=/pfs/data6/home/ka/ka_scc/ka_zs0402/slurm-1262.out&lt;br /&gt;
   StdIn=/dev/null&lt;br /&gt;
   StdOut=/pfs/data6/home/ka/ka_scc/ka_zs0402/slurm-1262.out&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Slurm Options =&lt;br /&gt;
&lt;br /&gt;
= Best Practices =&lt;br /&gt;
&lt;br /&gt;
== Step-by-Step example==&lt;br /&gt;
&lt;br /&gt;
== Dos and Don&#039;ts ==&lt;/div&gt;</summary>
		<author><name>P Schuhmacher</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster3.0/Running_Jobs&amp;diff=14647</id>
		<title>BwUniCluster3.0/Running Jobs</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster3.0/Running_Jobs&amp;diff=14647"/>
		<updated>2025-04-04T15:17:42Z</updated>

		<summary type="html">&lt;p&gt;P Schuhmacher: /* Slurm Commands (excerpt) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
= Purpose and function of a queuing system =&lt;br /&gt;
&lt;br /&gt;
General procedure: Hint to [[Running_Calculations | Running Calculations]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Job submission process ==&lt;br /&gt;
&lt;br /&gt;
bwUniCluster 3.0 has installed the workload managing software Slurm. Therefore any job submission by the user is to be executed by commands of the Slurm software. Slurm queues and runs user jobs based on fair sharing policies.&lt;br /&gt;
&lt;br /&gt;
== Slurm ==&lt;br /&gt;
&lt;br /&gt;
HPC Workload Manager on bwUniCluster 3.0 is Slurm.&lt;br /&gt;
Slurm is a cluster management and job scheduling system. Slurm has three key functions. &lt;br /&gt;
* First, it allocates access to resources (compute cores on nodes) to users for some duration of time so they can perform work. &lt;br /&gt;
* it provides a framework for starting, executing, and monitoring work (normally a parallel job) on the set of allocated nodes. &lt;br /&gt;
* it arbitrates contention for resources by managing a queue of pending work.&lt;br /&gt;
&lt;br /&gt;
Any kind of calculation on the compute nodes of bwUniCluster 3.0 requires the user to define calculations as a sequence of commands together with required run time, number of CPU cores and main memory and submit all, i.e., the &#039;&#039;&#039;batch job&#039;&#039;&#039;, to a resource and workload managing software. &lt;br /&gt;
== Terms and definitions ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Partitions &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Slurm manages job queues for different &#039;&#039;&#039;partitions&#039;&#039;&#039;. Partitions are used to group similar node types (e.g. nodes with and without accelerators) and to enforce different access policies and resource limits.&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 3.0 there are different partitions:&lt;br /&gt;
&lt;br /&gt;
* CPU-only nodes&lt;br /&gt;
** 2-socket nodes, consisting of 2 Intel Ice Lake processors with 32 cores each or 2 AMD processors with 48 cores each&lt;br /&gt;
** 2-socket nodes with very high RAM capacity, consisting of 2 AMD processors with 48 cores each&lt;br /&gt;
* GPU-accelerated nodes&lt;br /&gt;
** 2-socket nodes with 4x NVIDIA A100 or 4x NVIDIA H100 GPUs&lt;br /&gt;
** 4-socket node with 4x AMD Instinct accelerator&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Queues &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Job &#039;&#039;&#039;queues&#039;&#039;&#039; are used to manage jobs that request access to shared but limited computing resources of a certain kind (partition).&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 3.0 there are different main types of queues:&lt;br /&gt;
* Regular queues&lt;br /&gt;
** cpu: Jobs that request CPU-only nodes.&lt;br /&gt;
** gpu: Jobs that request GPU-accelerated nodes.&lt;br /&gt;
* Development queues (dev)&lt;br /&gt;
** Short, usually interactive jobs that are used for developing, compiling and testing code and workflows. The intention behind development queues is to provide users with immediate access to computer resources without having to wait. This is the place to realize instantaneous heavy compute without affecting other users, as would be the case on the login nodes.&lt;br /&gt;
&lt;br /&gt;
Requested compute resources such as (wall-)time, number of nodes and amount of memory are restricted and must fit into the boundaries imposed by the queues. The request for compute resources on the bwUniCluster 3.0 &amp;lt;font color=red&amp;gt;requires at least the specification of the &#039;&#039;&#039;queue&#039;&#039;&#039; and the &#039;&#039;&#039;time&#039;&#039;&#039;&amp;lt;/font&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Jobs &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Jobs can be run non-interactively as &#039;&#039;&#039;batch jobs&#039;&#039;&#039; or as &#039;&#039;&#039;interactive jobs&#039;&#039;&#039;.&lt;br /&gt;
Submitting a batch job means, that all steps of a compute project are defined in a Bash script. This Bash script is queued and executed as soon as the compute resources are available and allocated. Jobs are enqueued with the &#039;&#039;sbatch&#039;&#039; command.&lt;br /&gt;
&lt;br /&gt;
For interactive jobs, the resources are requested with the &#039;&#039;salloc&#039;&#039; command. As soon as the computing resources are available and allocated, a command line prompt is returned on a computing node and the user can freely dispose of the resources now available to him.&lt;br /&gt;
{|style=&amp;quot;background:#deffee; width:100%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;padding:5px; background:#cef2e0; text-align:left&amp;quot;|&lt;br /&gt;
[[Image:Attention.svg|center|25px]]&lt;br /&gt;
|style=&amp;quot;padding:5px; background:#cef2e0; text-align:left&amp;quot;|&lt;br /&gt;
&#039;&#039;&#039;Please remember:&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Heavy computations are not allowed on the login nodes&#039;&#039;&#039;.&amp;lt;br&amp;gt;Use a developement or a regular job queue instead! Please refer to [[BwUniCluster3.0/Login#Allowed_Activities_on_Login_Nodes|Allowed Activities on Login Nodes]].&lt;br /&gt;
* &#039;&#039;&#039;Development queues&#039;&#039;&#039; are meant for &#039;&#039;&#039;development tasks&#039;&#039;&#039;.&amp;lt;br&amp;gt;Do not misuse this queue for regular, short-running jobs or chain jobs! Only one running job at a time is enabled. Maximum queue length is reduced to 3.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Queues on bwUniCluster 3.0 = &lt;br /&gt;
== Policy ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Regular Queues ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
! style=&amp;quot;width:5%&amp;quot;| Queue&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Node-Type&lt;br /&gt;
! style=&amp;quot;width:23%&amp;quot;| Default Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Minimal Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Maximum Resources&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;cpu_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Ice Lake&lt;br /&gt;
| mem-per-cpu=1950mb&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=30, mem=249600mb, ntasks-per-node=64, (threads-per-core=2) &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;cpu&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Standard&lt;br /&gt;
| mem-per-cpu=1125mb&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=20, mem=380000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;highmem&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;High Memory&lt;br /&gt;
| mem-per-cpu=1125mb&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=4, mem=2300000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;gpu_h100&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;NVIDIA GPU x4&lt;br /&gt;
| mem-per-cpu=1125mb&amp;lt;br/&amp;gt;cpus-per-gpu=24&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=12, mem=760000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;gpu_mi300&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU node&amp;lt;br/&amp;gt;AMD GPU x4&lt;br /&gt;
| mem-per-cpu=1125mb&amp;lt;br/&amp;gt;cpus-per-gpu=24&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=1, mem=510000mb, ntasks-per-node=40, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;gpu_a100_il&amp;lt;/code&amp;gt;/&amp;lt;code&amp;gt;gpu_h100_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;Ice Lake&amp;lt;br/&amp;gt;NVIDIA GPU x4&lt;br /&gt;
| mem-per-gpu=127500mb&amp;lt;br/&amp;gt;cpus-per-gpu=16&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=9, mem=510000mb, ntasks-per-node=64, (threads-per-core=2) &lt;br /&gt;
|}&lt;br /&gt;
Table 1: Regular Queues&lt;br /&gt;
&lt;br /&gt;
== Development Queues ==&lt;br /&gt;
Only for development, i.e. debugging or performance optimization ...&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
! style=&amp;quot;width:5%&amp;quot;| Queue&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Node Type&lt;br /&gt;
! style=&amp;quot;width:23%&amp;quot;| Default Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Minimal Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Maximum Resources&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_cpu_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Ice Lake&lt;br /&gt;
| mem-per-cpu=1950mb&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=8, mem=249600mb, ntasks-per-node=64, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_cpu&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Standard&lt;br /&gt;
| mem-per-cpu=1125mb&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=180000mb, ntasks-per-node=40, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_highmem&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;High Memory&lt;br /&gt;
| mem-per-cpu=1125mb&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=180000mb, ntasks-per-node=40, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_gpu_h100&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;NVIDIA GPU x4&lt;br /&gt;
| mem-per-cpu=1125mb&amp;lt;br/&amp;gt;cpus-per-gpu=24&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=180000mb, ntasks-per-node=40, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_gpu_a100_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;NVIDIA GPU x4&amp;lt;br/&amp;gt;&lt;br /&gt;
| mem-per-gpu=127500mb&amp;lt;br/&amp;gt;cpus-per-gpu=16 &lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=510000mb, ntasks-per-node=64, (threads-per-core=2) &lt;br /&gt;
|}&lt;br /&gt;
Table 2: Development Queues&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Default resources of a queue class defines time, #tasks and memory if not explicitly given with sbatch command. Resource list acronyms &#039;&#039;--time&#039;&#039;, &#039;&#039;--ntasks&#039;&#039;, &#039;&#039;--nodes&#039;&#039;, &#039;&#039;--mem&#039;&#039; and &#039;&#039;--mem-per-cpu&#039;&#039; are described [[BwUniCluster_3.0_Slurm_common_Features|here]].&lt;br /&gt;
&lt;br /&gt;
== Check available resources ==&lt;br /&gt;
The Slurm command sinfo is used to view partition and node information for a system running Slurm. It incorporates down time, reservations, and node state information in determining the available backfill window. The sinfo command can only be used by the administrator.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
SCC has prepared a special script (sinfo_t_idle) to find out how many processors are available for immediate use on the system. It is anticipated that users will use this information to submit jobs that meet these criteria and thus obtain quick job turnaround times. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The following command displays what resources are available for immediate use for the whole partition.&lt;br /&gt;
&amp;lt;pre&amp;gt;$ sinfo_t_idle&lt;br /&gt;
Partition dev_cpu                 :      2 nodes idle&lt;br /&gt;
Partition cpu                     :     68 nodes idle&lt;br /&gt;
Partition highmem                 :      4 nodes idle&lt;br /&gt;
Partition dev_gpu_h100            :      0 nodes idle&lt;br /&gt;
Partition gpu_h100                :     11 nodes idle&lt;br /&gt;
Partition gpu_mi300               :      1 nodes idle&lt;br /&gt;
Partition dev_cpu_il              :      0 nodes idle&lt;br /&gt;
Partition cpu_il                  :      0 nodes idle&lt;br /&gt;
Partition dev_gpu_a100_il         :      0 nodes idle&lt;br /&gt;
Partition gpu_a100_il             :      0 nodes idle&lt;br /&gt;
Partition gpu_h100_il             :      0 nodes idle&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Running Jobs =&lt;br /&gt;
&lt;br /&gt;
== Slurm Commands (excerpt) ==&lt;br /&gt;
Important Slurm commands for non-administrators working on bwUniCluster 3.0.&lt;br /&gt;
{| width=850px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Slurm commands !! Brief explanation&lt;br /&gt;
|-&lt;br /&gt;
| [[#Batch Jobs: sbatch|sbatch]] || Submits a job and puts it into the queue [[https://slurm.schedmd.com/sbatch.html sbatch]] &lt;br /&gt;
|-&lt;br /&gt;
| [[#Interactive Jobs: salloc|salloc]] || Requests resources for an interactive Job [[https://slurm.schedmd.com/salloc.html salloc]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Monitor and manage jobs |scontrol show job]] || Displays detailed job state information [[https://slurm.schedmd.com/scontrol.html scontrol]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#List of your submitted jobs : squeue|squeue]] || Displays information about active, eligible, blocked, and/or recently completed jobs [[https://slurm.schedmd.com/squeue.html squeue]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#List of your submitted jobs : squeue|squeue --start]] || Returns start time of submitted job [[https://slurm.schedmd.com/squeue.html squeue]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Shows free resources : sinfo_t_idle|sinfo_t_idle]] || Shows what resources are available for immediate use [[https://slurm.schedmd.com/sinfo.html sinfo]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Canceling own jobs : scancel|scancel]] || Cancels a job [[https://slurm.schedmd.com/scancel.html scancel]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* [https://slurm.schedmd.com/tutorials.html  Slurm Tutorials]&lt;br /&gt;
* [https://slurm.schedmd.com/pdfs/summary.pdf  Slurm command/option summary (2 pages)]&lt;br /&gt;
* [https://slurm.schedmd.com/man_index.html  Slurm Commands]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Batch Jobs: sbatch ==&lt;br /&gt;
&lt;br /&gt;
Batch jobs are submitted by using the command &#039;&#039;&#039;sbatch&#039;&#039;&#039;. The main purpose of the &#039;&#039;&#039;sbatch&#039;&#039;&#039; command is to specify the resources that are needed to run the job. &#039;&#039;&#039;sbatch&#039;&#039;&#039; will then queue the batch job. However, starting of batch job depends on the availability of the requested resources and the fair sharing value.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To run your batch job on one of the cpu nodes, please use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sbatch --partition=dev_cpu&lt;br /&gt;
     or &lt;br /&gt;
$ sbatch -p dev_cpu&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Command parameters sbatch ===&lt;br /&gt;
The syntax and use of &#039;&#039;&#039;sbatch&#039;&#039;&#039; can be displayed via:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ man sbatch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;sbatch&#039;&#039;&#039; options can be used from the command line or in your job script. Different defaults for some of these options are set based on the queue and can be found [https://wiki.bwhpc.de/e/BwUniCluster3.0/Batch_Queues#sbatch_-p_queue here]&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | sbatch Options&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width:8%&amp;quot;| Command line&lt;br /&gt;
! style=&amp;quot;width:9%&amp;quot;| Script&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Purpose&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -t, --time=&#039;&#039;time&#039;&#039;&lt;br /&gt;
| #SBATCH --time=&#039;&#039;time&#039;&#039;&lt;br /&gt;
| Wall clock time limit.&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -N, --nodes=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --nodes=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of nodes to be used.&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -n, --ntasks=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --ntasks=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of tasks to be launched.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --ntasks-per-node=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --ntasks-per-node=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Maximum count of tasks per node.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -c, --cpus-per-task=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --cpus-per-task=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of CPUs required per (MPI-)task.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mem=&#039;&#039;value_in_MB&#039;&#039;&lt;br /&gt;
| #SBATCH --mem=&#039;&#039;value_in_MB&#039;&#039; &lt;br /&gt;
| Memory in MegaByte per node. (You should omit the setting of this option.)&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mem-per-cpu=&#039;&#039;value_in_MB&#039;&#039;&lt;br /&gt;
| #SBATCH --mem-per-cpu=&#039;&#039;value_in_MB&#039;&#039; &lt;br /&gt;
| Minimum Memory required per allocated CPU. (You should omit the setting of this option.)&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mail-type=&#039;&#039;type&#039;&#039;&lt;br /&gt;
| #SBATCH --mail-type=&#039;&#039;type&#039;&#039;&lt;br /&gt;
| Notify user by email when certain event types occur.&amp;lt;br&amp;gt;Valid type values are NONE, BEGIN, END, FAIL, REQUEUE, ALL.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mail-user=&#039;&#039;mail-address&#039;&#039;&lt;br /&gt;
| #SBATCH --mail-user=&#039;&#039;mail-address&#039;&#039;&lt;br /&gt;
|  The specified mail-address receives email notification of state changes as defined by --mail-type.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --output=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --output=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| File in which job output is stored. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --error=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --error=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| File in which job error messages are stored. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -J, --job-name=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --job-name=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| Job name.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --export=[ALL,] &#039;&#039;env-variables&#039;&#039;&lt;br /&gt;
| #SBATCH --export=[ALL,] &#039;&#039;env-variables&#039;&#039;&lt;br /&gt;
| Identifies which environment variables from the submission environment are propagated to the launched application. Default is ALL.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -A, --account=&#039;&#039;group-name&#039;&#039;&lt;br /&gt;
| #SBATCH --account=&#039;&#039;group-name&#039;&#039;&lt;br /&gt;
| Change resources used by this job to specified group. You may need this option if your account is assigned to more than one group. By command &amp;quot;scontrol show job&amp;quot; the project group the job is accounted on can be seen behind &amp;quot;Account=&amp;quot;. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -p, --partition=&#039;&#039;queue-name&#039;&#039;&lt;br /&gt;
| #SBATCH --partition=&#039;&#039;queue-name&#039;&#039;&lt;br /&gt;
| Request a specific queue for the resource allocation.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --reservation=&#039;&#039;reservation-name&#039;&#039;&lt;br /&gt;
| #SBATCH --reservation=&#039;&#039;reservation-name&#039;&#039;&lt;br /&gt;
| Use a specific reservation for the resource allocation.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -C, --constraint=&#039;&#039;LSDF&#039;&#039;&lt;br /&gt;
| #SBATCH --constraint=LSDF&lt;br /&gt;
| Job constraint LSDF filesystems.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -C, --constraint=&#039;&#039;BEEOND (BEEOND_4MDS, BEEOND_MAXMDS)&#039;&#039;&lt;br /&gt;
| #SBATCH --constraint=BEEOND (BEEOND_4MDS, BEEOND_MAXMDS)&lt;br /&gt;
| Job constraint BeeOND filesystem.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Interactive Jobs: salloc ==&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 3.0 you are only allowed to run short jobs (&amp;lt;&amp;lt; 1 hour) with little memory requirements (&amp;lt;&amp;lt; 8 GByte) on the logins nodes. If you want to run longer jobs and/or jobs with a request of more than 8 GByte of memory, you must allocate resources for so-called interactive jobs by usage of the command salloc on a login node. Considering a serial application running on a compute node that requires 5000 MByte of memory and limiting the interactive run to 2 hours the following command has to be executed:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ salloc -p cpu -n 1 -t 120 --mem=5000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then you will get one core on a compute node within the partition &amp;quot;cpu&amp;quot;. After execution of this command &#039;&#039;&#039;DO NOT CLOSE&#039;&#039;&#039; your current terminal session but wait until the queueing system Slurm has granted you the requested resources on the compute system. You will be logged in automatically on the granted core! To run a serial program on the granted core you only have to type the name of the executable.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./&amp;lt;my_serial_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please be aware that your serial job must run less than 2 hours in this example, else the job will be killed during runtime by the system. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can also start now a graphical X11-terminal connecting you to the dedicated resource that is available for 2 hours. You can start it by the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ xterm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that, once the walltime limit has been reached the resources - i.e. the compute node - will automatically be revoked.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
An interactive parallel application running on one compute node or on many compute nodes (e.g. here 5 nodes) with 96 cores each requires usually an amount of memory in GByte (e.g. 50 GByte) and a maximum time (e.g. 1 hour). E.g. 5 nodes can be allocated by the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ salloc -p cpu -N 5 --ntasks-per-node=96 -t 01:00:00  --mem=50gb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you can run parallel jobs on 480 cores requiring 50 GByte of memory per node. Please be aware that you will be logged in on core 0 of the first node.&lt;br /&gt;
If you want to have access to another node you have to open a new terminal, connect it also to bwUniCluster 3.0 and type the following commands to&lt;br /&gt;
connect to the running interactive job and then to a specific node:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ srun --jobid=XXXXXXXX --pty /bin/bash&lt;br /&gt;
$ srun --nodelist=uc3nXXX --pty /bin/bash&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ squeue&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the jobid and the nodelist can be shown.&lt;br /&gt;
&lt;br /&gt;
If you want to run MPI-programs, you can do it by simply typing mpirun &amp;lt;program_name&amp;gt;. Then your program will be run on 480 cores. A very simple example for starting a parallel job can be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mpirun &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also start the debugger ddt by the commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module add devel/ddt&lt;br /&gt;
$ ddt &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above commands will execute the parallel program &amp;lt;my_mpi_program&amp;gt; on all available cores. You can also start parallel programs on a subset of cores; an example for this can be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mpirun -n 50 &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are using Intel MPI you must start &amp;lt;my_mpi_program&amp;gt; by the command mpiexec.hydra (instead of mpirun).&lt;br /&gt;
&lt;br /&gt;
== Interactive Computing with Jupyter ==&lt;br /&gt;
&lt;br /&gt;
== Monitor and manage jobs ==&lt;br /&gt;
&lt;br /&gt;
=== List of your submitted jobs : squeue ===&lt;br /&gt;
Displays information about YOUR active, pending and/or recently completed jobs. The command displays all own active and pending jobs. The command squeue is explained in detail on the webpage https://slurm.schedmd.com/squeue.html or via manpage (man squeue).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;squeue&#039;&#039; example on bwUniCluster 3.0 &amp;lt;small&amp;gt;(Only your own jobs are displayed!)&amp;lt;/small&amp;gt;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ squeue &lt;br /&gt;
             JOBID PARTITION     NAME     USER ST       TIME  NODES NODELIST(REASON)&lt;br /&gt;
              1262       cpu     wrap ka_ab123  R       8:15      1 uc3n002&lt;br /&gt;
              1267 dev_gpu_h     wrap ka_ab123 PD       0:00      1 (Resources)&lt;br /&gt;
              1265   highmem     wrap ka_ab123  R       2:41      1 uc3n084&lt;br /&gt;
$ squeue -l&lt;br /&gt;
             JOBID PARTITION     NAME     USER    STATE       TIME TIME_LIMI  NODES NODELIST(REASON)&lt;br /&gt;
              1262       cpu     wrap ka_ab123  RUNNING       8:55     20:00      1 uc3n002&lt;br /&gt;
              1267 dev_gpu_h     wrap ka_ab123  PENDING       0:00     20:00      1 (Resources)&lt;br /&gt;
              1265   highmem     wrap ka_ab123  RUNNING       3:21     20:00      1 uc3n084&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Detailed job information : scontrol show job ===&lt;br /&gt;
scontrol show job displays detailed job state information and diagnostic output for all or a specified job of yours. Detailed information is available for active, pending and recently completed jobs. The command scontrol is explained in detail on the webpage https://slurm.schedmd.com/scontrol.html or via manpage (man scontrol). &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Display the state of all your jobs in normal mode: scontrol show job&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Display the state of a job with &amp;lt;jobid&amp;gt; in normal mode: scontrol show job &amp;lt;jobid&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Here is an example from bwUniCluster 3.0.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ squeue&lt;br /&gt;
JOBID PARTITION     NAME     USER ST       TIME  NODES NODELIST(REASON)&lt;br /&gt;
1262       cpu     wrap ka_zs040  R       1:12      1 uc3n002&lt;br /&gt;
&lt;br /&gt;
$&lt;br /&gt;
$ # now, see what&#039;s up with my pending job with jobid 1262&lt;br /&gt;
$ &lt;br /&gt;
$ scontrol show job 1262&lt;br /&gt;
&lt;br /&gt;
JobId=1262 JobName=wrap&lt;br /&gt;
   UserId=ka_zs0402(241992) GroupId=ka_scc(12345) MCS_label=N/A&lt;br /&gt;
   Priority=4246 Nice=0 Account=ka QOS=normal&lt;br /&gt;
   JobState=RUNNING Reason=None Dependency=(null)&lt;br /&gt;
   Requeue=1 Restarts=0 BatchFlag=1 Reboot=0 ExitCode=0:0&lt;br /&gt;
   RunTime=00:00:37 TimeLimit=00:20:00 TimeMin=N/A&lt;br /&gt;
   SubmitTime=2025-04-04T10:01:30 EligibleTime=2025-04-04T10:01:30&lt;br /&gt;
   AccrueTime=2025-04-04T10:01:30&lt;br /&gt;
   StartTime=2025-04-04T10:01:31 EndTime=2025-04-04T10:21:31 Deadline=N/A&lt;br /&gt;
   SuspendTime=None SecsPreSuspend=0 LastSchedEval=2025-04-04T10:01:31 Scheduler=Main&lt;br /&gt;
   Partition=cpu AllocNode:Sid=uc3n999:2819841&lt;br /&gt;
   ReqNodeList=(null) ExcNodeList=(null)&lt;br /&gt;
   NodeList=uc3n002&lt;br /&gt;
   BatchHost=uc3n002&lt;br /&gt;
   NumNodes=1 NumCPUs=2 NumTasks=1 CPUs/Task=1 ReqB:S:C:T=0:0:*:*&lt;br /&gt;
   ReqTRES=cpu=1,mem=2000M,node=1,billing=1&lt;br /&gt;
   AllocTRES=cpu=2,mem=4000M,node=1,billing=2&lt;br /&gt;
   Socks/Node=* NtasksPerN:B:S:C=0:0:*:1 CoreSpec=*&lt;br /&gt;
   MinCPUsNode=1 MinMemoryCPU=2000M MinTmpDiskNode=0&lt;br /&gt;
   Features=(null) DelayBoot=00:00:00&lt;br /&gt;
   OverSubscribe=OK Contiguous=0 Licenses=(null) Network=(null)&lt;br /&gt;
   Command=(null)&lt;br /&gt;
   WorkDir=/pfs/data6/home/ka/ka_scc/ka_zs0402&lt;br /&gt;
   StdErr=/pfs/data6/home/ka/ka_scc/ka_zs0402/slurm-1262.out&lt;br /&gt;
   StdIn=/dev/null&lt;br /&gt;
   StdOut=/pfs/data6/home/ka/ka_scc/ka_zs0402/slurm-1262.out&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Slurm Options =&lt;br /&gt;
&lt;br /&gt;
= Best Practices =&lt;br /&gt;
&lt;br /&gt;
== Step-by-Step example==&lt;br /&gt;
&lt;br /&gt;
== Dos and Don&#039;ts ==&lt;/div&gt;</summary>
		<author><name>P Schuhmacher</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster3.0/Running_Jobs&amp;diff=14646</id>
		<title>BwUniCluster3.0/Running Jobs</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster3.0/Running_Jobs&amp;diff=14646"/>
		<updated>2025-04-04T15:15:48Z</updated>

		<summary type="html">&lt;p&gt;P Schuhmacher: /* Detailed job information : scontrol show job */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
= Purpose and function of a queuing system =&lt;br /&gt;
&lt;br /&gt;
General procedure: Hint to [[Running_Calculations | Running Calculations]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Job submission process ==&lt;br /&gt;
&lt;br /&gt;
bwUniCluster 3.0 has installed the workload managing software Slurm. Therefore any job submission by the user is to be executed by commands of the Slurm software. Slurm queues and runs user jobs based on fair sharing policies.&lt;br /&gt;
&lt;br /&gt;
== Slurm ==&lt;br /&gt;
&lt;br /&gt;
HPC Workload Manager on bwUniCluster 3.0 is Slurm.&lt;br /&gt;
Slurm is a cluster management and job scheduling system. Slurm has three key functions. &lt;br /&gt;
* First, it allocates access to resources (compute cores on nodes) to users for some duration of time so they can perform work. &lt;br /&gt;
* it provides a framework for starting, executing, and monitoring work (normally a parallel job) on the set of allocated nodes. &lt;br /&gt;
* it arbitrates contention for resources by managing a queue of pending work.&lt;br /&gt;
&lt;br /&gt;
Any kind of calculation on the compute nodes of bwUniCluster 3.0 requires the user to define calculations as a sequence of commands together with required run time, number of CPU cores and main memory and submit all, i.e., the &#039;&#039;&#039;batch job&#039;&#039;&#039;, to a resource and workload managing software. &lt;br /&gt;
== Terms and definitions ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Partitions &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Slurm manages job queues for different &#039;&#039;&#039;partitions&#039;&#039;&#039;. Partitions are used to group similar node types (e.g. nodes with and without accelerators) and to enforce different access policies and resource limits.&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 3.0 there are different partitions:&lt;br /&gt;
&lt;br /&gt;
* CPU-only nodes&lt;br /&gt;
** 2-socket nodes, consisting of 2 Intel Ice Lake processors with 32 cores each or 2 AMD processors with 48 cores each&lt;br /&gt;
** 2-socket nodes with very high RAM capacity, consisting of 2 AMD processors with 48 cores each&lt;br /&gt;
* GPU-accelerated nodes&lt;br /&gt;
** 2-socket nodes with 4x NVIDIA A100 or 4x NVIDIA H100 GPUs&lt;br /&gt;
** 4-socket node with 4x AMD Instinct accelerator&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Queues &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Job &#039;&#039;&#039;queues&#039;&#039;&#039; are used to manage jobs that request access to shared but limited computing resources of a certain kind (partition).&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 3.0 there are different main types of queues:&lt;br /&gt;
* Regular queues&lt;br /&gt;
** cpu: Jobs that request CPU-only nodes.&lt;br /&gt;
** gpu: Jobs that request GPU-accelerated nodes.&lt;br /&gt;
* Development queues (dev)&lt;br /&gt;
** Short, usually interactive jobs that are used for developing, compiling and testing code and workflows. The intention behind development queues is to provide users with immediate access to computer resources without having to wait. This is the place to realize instantaneous heavy compute without affecting other users, as would be the case on the login nodes.&lt;br /&gt;
&lt;br /&gt;
Requested compute resources such as (wall-)time, number of nodes and amount of memory are restricted and must fit into the boundaries imposed by the queues. The request for compute resources on the bwUniCluster 3.0 &amp;lt;font color=red&amp;gt;requires at least the specification of the &#039;&#039;&#039;queue&#039;&#039;&#039; and the &#039;&#039;&#039;time&#039;&#039;&#039;&amp;lt;/font&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Jobs &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Jobs can be run non-interactively as &#039;&#039;&#039;batch jobs&#039;&#039;&#039; or as &#039;&#039;&#039;interactive jobs&#039;&#039;&#039;.&lt;br /&gt;
Submitting a batch job means, that all steps of a compute project are defined in a Bash script. This Bash script is queued and executed as soon as the compute resources are available and allocated. Jobs are enqueued with the &#039;&#039;sbatch&#039;&#039; command.&lt;br /&gt;
&lt;br /&gt;
For interactive jobs, the resources are requested with the &#039;&#039;salloc&#039;&#039; command. As soon as the computing resources are available and allocated, a command line prompt is returned on a computing node and the user can freely dispose of the resources now available to him.&lt;br /&gt;
{|style=&amp;quot;background:#deffee; width:100%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;padding:5px; background:#cef2e0; text-align:left&amp;quot;|&lt;br /&gt;
[[Image:Attention.svg|center|25px]]&lt;br /&gt;
|style=&amp;quot;padding:5px; background:#cef2e0; text-align:left&amp;quot;|&lt;br /&gt;
&#039;&#039;&#039;Please remember:&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Heavy computations are not allowed on the login nodes&#039;&#039;&#039;.&amp;lt;br&amp;gt;Use a developement or a regular job queue instead! Please refer to [[BwUniCluster3.0/Login#Allowed_Activities_on_Login_Nodes|Allowed Activities on Login Nodes]].&lt;br /&gt;
* &#039;&#039;&#039;Development queues&#039;&#039;&#039; are meant for &#039;&#039;&#039;development tasks&#039;&#039;&#039;.&amp;lt;br&amp;gt;Do not misuse this queue for regular, short-running jobs or chain jobs! Only one running job at a time is enabled. Maximum queue length is reduced to 3.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Queues on bwUniCluster 3.0 = &lt;br /&gt;
== Policy ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Regular Queues ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
! style=&amp;quot;width:5%&amp;quot;| Queue&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Node-Type&lt;br /&gt;
! style=&amp;quot;width:23%&amp;quot;| Default Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Minimal Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Maximum Resources&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;cpu_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Ice Lake&lt;br /&gt;
| mem-per-cpu=1950mb&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=30, mem=249600mb, ntasks-per-node=64, (threads-per-core=2) &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;cpu&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Standard&lt;br /&gt;
| mem-per-cpu=1125mb&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=20, mem=380000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;highmem&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;High Memory&lt;br /&gt;
| mem-per-cpu=1125mb&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=4, mem=2300000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;gpu_h100&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;NVIDIA GPU x4&lt;br /&gt;
| mem-per-cpu=1125mb&amp;lt;br/&amp;gt;cpus-per-gpu=24&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=12, mem=760000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;gpu_mi300&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU node&amp;lt;br/&amp;gt;AMD GPU x4&lt;br /&gt;
| mem-per-cpu=1125mb&amp;lt;br/&amp;gt;cpus-per-gpu=24&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=1, mem=510000mb, ntasks-per-node=40, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;gpu_a100_il&amp;lt;/code&amp;gt;/&amp;lt;code&amp;gt;gpu_h100_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;Ice Lake&amp;lt;br/&amp;gt;NVIDIA GPU x4&lt;br /&gt;
| mem-per-gpu=127500mb&amp;lt;br/&amp;gt;cpus-per-gpu=16&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=9, mem=510000mb, ntasks-per-node=64, (threads-per-core=2) &lt;br /&gt;
|}&lt;br /&gt;
Table 1: Regular Queues&lt;br /&gt;
&lt;br /&gt;
== Development Queues ==&lt;br /&gt;
Only for development, i.e. debugging or performance optimization ...&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
! style=&amp;quot;width:5%&amp;quot;| Queue&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Node Type&lt;br /&gt;
! style=&amp;quot;width:23%&amp;quot;| Default Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Minimal Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Maximum Resources&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_cpu_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Ice Lake&lt;br /&gt;
| mem-per-cpu=1950mb&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=8, mem=249600mb, ntasks-per-node=64, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_cpu&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Standard&lt;br /&gt;
| mem-per-cpu=1125mb&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=180000mb, ntasks-per-node=40, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_highmem&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;High Memory&lt;br /&gt;
| mem-per-cpu=1125mb&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=180000mb, ntasks-per-node=40, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_gpu_h100&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;NVIDIA GPU x4&lt;br /&gt;
| mem-per-cpu=1125mb&amp;lt;br/&amp;gt;cpus-per-gpu=24&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=180000mb, ntasks-per-node=40, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_gpu_a100_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;NVIDIA GPU x4&amp;lt;br/&amp;gt;&lt;br /&gt;
| mem-per-gpu=127500mb&amp;lt;br/&amp;gt;cpus-per-gpu=16 &lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=510000mb, ntasks-per-node=64, (threads-per-core=2) &lt;br /&gt;
|}&lt;br /&gt;
Table 2: Development Queues&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Default resources of a queue class defines time, #tasks and memory if not explicitly given with sbatch command. Resource list acronyms &#039;&#039;--time&#039;&#039;, &#039;&#039;--ntasks&#039;&#039;, &#039;&#039;--nodes&#039;&#039;, &#039;&#039;--mem&#039;&#039; and &#039;&#039;--mem-per-cpu&#039;&#039; are described [[BwUniCluster_3.0_Slurm_common_Features|here]].&lt;br /&gt;
&lt;br /&gt;
== Check available resources ==&lt;br /&gt;
The Slurm command sinfo is used to view partition and node information for a system running Slurm. It incorporates down time, reservations, and node state information in determining the available backfill window. The sinfo command can only be used by the administrator.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
SCC has prepared a special script (sinfo_t_idle) to find out how many processors are available for immediate use on the system. It is anticipated that users will use this information to submit jobs that meet these criteria and thus obtain quick job turnaround times. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The following command displays what resources are available for immediate use for the whole partition.&lt;br /&gt;
&amp;lt;pre&amp;gt;$ sinfo_t_idle&lt;br /&gt;
Partition dev_cpu                 :      2 nodes idle&lt;br /&gt;
Partition cpu                     :     68 nodes idle&lt;br /&gt;
Partition highmem                 :      4 nodes idle&lt;br /&gt;
Partition dev_gpu_h100            :      0 nodes idle&lt;br /&gt;
Partition gpu_h100                :     11 nodes idle&lt;br /&gt;
Partition gpu_mi300               :      1 nodes idle&lt;br /&gt;
Partition dev_cpu_il              :      0 nodes idle&lt;br /&gt;
Partition cpu_il                  :      0 nodes idle&lt;br /&gt;
Partition dev_gpu_a100_il         :      0 nodes idle&lt;br /&gt;
Partition gpu_a100_il             :      0 nodes idle&lt;br /&gt;
Partition gpu_h100_il             :      0 nodes idle&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Running Jobs =&lt;br /&gt;
&lt;br /&gt;
== Slurm Commands (excerpt) ==&lt;br /&gt;
Important Slurm commands for non-administrators working on bwUniCluster 3.0.&lt;br /&gt;
{| width=850px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Slurm commands !! Brief explanation&lt;br /&gt;
|-&lt;br /&gt;
| [[#Batch Jobs: sbatch|sbatch]] || Submits a job and puts it into the queue [[https://slurm.schedmd.com/sbatch.html sbatch]] &lt;br /&gt;
|-&lt;br /&gt;
| [[#Interactive Jobs: salloc|salloc]] || Requests resources for an interactive Job [[https://slurm.schedmd.com/salloc.html salloc]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Monitor and manage jobs |scontrol show job]] || Displays detailed job state information [[https://slurm.schedmd.com/scontrol.html scontrol]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#List of your submitted jobs : squeue|squeue]] || Displays information about active, eligible, blocked, and/or recently completed jobs [[https://slurm.schedmd.com/squeue.html squeue]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Start time of job or resources : squeue|squeue --start]] || Returns start time of submitted job [[https://slurm.schedmd.com/squeue.html squeue]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Shows free resources : sinfo_t_idle|sinfo_t_idle]] || Shows what resources are available for immediate use [[https://slurm.schedmd.com/sinfo.html sinfo]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Canceling own jobs : scancel|scancel]] || Cancels a job [[https://slurm.schedmd.com/scancel.html scancel]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* [https://slurm.schedmd.com/tutorials.html  Slurm Tutorials]&lt;br /&gt;
* [https://slurm.schedmd.com/pdfs/summary.pdf  Slurm command/option summary (2 pages)]&lt;br /&gt;
* [https://slurm.schedmd.com/man_index.html  Slurm Commands]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Batch Jobs: sbatch ==&lt;br /&gt;
&lt;br /&gt;
Batch jobs are submitted by using the command &#039;&#039;&#039;sbatch&#039;&#039;&#039;. The main purpose of the &#039;&#039;&#039;sbatch&#039;&#039;&#039; command is to specify the resources that are needed to run the job. &#039;&#039;&#039;sbatch&#039;&#039;&#039; will then queue the batch job. However, starting of batch job depends on the availability of the requested resources and the fair sharing value.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To run your batch job on one of the cpu nodes, please use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sbatch --partition=dev_cpu&lt;br /&gt;
     or &lt;br /&gt;
$ sbatch -p dev_cpu&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Command parameters sbatch ===&lt;br /&gt;
The syntax and use of &#039;&#039;&#039;sbatch&#039;&#039;&#039; can be displayed via:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ man sbatch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;sbatch&#039;&#039;&#039; options can be used from the command line or in your job script. Different defaults for some of these options are set based on the queue and can be found [https://wiki.bwhpc.de/e/BwUniCluster3.0/Batch_Queues#sbatch_-p_queue here]&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | sbatch Options&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width:8%&amp;quot;| Command line&lt;br /&gt;
! style=&amp;quot;width:9%&amp;quot;| Script&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Purpose&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -t, --time=&#039;&#039;time&#039;&#039;&lt;br /&gt;
| #SBATCH --time=&#039;&#039;time&#039;&#039;&lt;br /&gt;
| Wall clock time limit.&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -N, --nodes=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --nodes=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of nodes to be used.&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -n, --ntasks=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --ntasks=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of tasks to be launched.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --ntasks-per-node=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --ntasks-per-node=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Maximum count of tasks per node.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -c, --cpus-per-task=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --cpus-per-task=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of CPUs required per (MPI-)task.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mem=&#039;&#039;value_in_MB&#039;&#039;&lt;br /&gt;
| #SBATCH --mem=&#039;&#039;value_in_MB&#039;&#039; &lt;br /&gt;
| Memory in MegaByte per node. (You should omit the setting of this option.)&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mem-per-cpu=&#039;&#039;value_in_MB&#039;&#039;&lt;br /&gt;
| #SBATCH --mem-per-cpu=&#039;&#039;value_in_MB&#039;&#039; &lt;br /&gt;
| Minimum Memory required per allocated CPU. (You should omit the setting of this option.)&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mail-type=&#039;&#039;type&#039;&#039;&lt;br /&gt;
| #SBATCH --mail-type=&#039;&#039;type&#039;&#039;&lt;br /&gt;
| Notify user by email when certain event types occur.&amp;lt;br&amp;gt;Valid type values are NONE, BEGIN, END, FAIL, REQUEUE, ALL.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mail-user=&#039;&#039;mail-address&#039;&#039;&lt;br /&gt;
| #SBATCH --mail-user=&#039;&#039;mail-address&#039;&#039;&lt;br /&gt;
|  The specified mail-address receives email notification of state changes as defined by --mail-type.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --output=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --output=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| File in which job output is stored. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --error=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --error=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| File in which job error messages are stored. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -J, --job-name=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --job-name=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| Job name.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --export=[ALL,] &#039;&#039;env-variables&#039;&#039;&lt;br /&gt;
| #SBATCH --export=[ALL,] &#039;&#039;env-variables&#039;&#039;&lt;br /&gt;
| Identifies which environment variables from the submission environment are propagated to the launched application. Default is ALL.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -A, --account=&#039;&#039;group-name&#039;&#039;&lt;br /&gt;
| #SBATCH --account=&#039;&#039;group-name&#039;&#039;&lt;br /&gt;
| Change resources used by this job to specified group. You may need this option if your account is assigned to more than one group. By command &amp;quot;scontrol show job&amp;quot; the project group the job is accounted on can be seen behind &amp;quot;Account=&amp;quot;. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -p, --partition=&#039;&#039;queue-name&#039;&#039;&lt;br /&gt;
| #SBATCH --partition=&#039;&#039;queue-name&#039;&#039;&lt;br /&gt;
| Request a specific queue for the resource allocation.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --reservation=&#039;&#039;reservation-name&#039;&#039;&lt;br /&gt;
| #SBATCH --reservation=&#039;&#039;reservation-name&#039;&#039;&lt;br /&gt;
| Use a specific reservation for the resource allocation.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -C, --constraint=&#039;&#039;LSDF&#039;&#039;&lt;br /&gt;
| #SBATCH --constraint=LSDF&lt;br /&gt;
| Job constraint LSDF filesystems.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -C, --constraint=&#039;&#039;BEEOND (BEEOND_4MDS, BEEOND_MAXMDS)&#039;&#039;&lt;br /&gt;
| #SBATCH --constraint=BEEOND (BEEOND_4MDS, BEEOND_MAXMDS)&lt;br /&gt;
| Job constraint BeeOND filesystem.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Interactive Jobs: salloc ==&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 3.0 you are only allowed to run short jobs (&amp;lt;&amp;lt; 1 hour) with little memory requirements (&amp;lt;&amp;lt; 8 GByte) on the logins nodes. If you want to run longer jobs and/or jobs with a request of more than 8 GByte of memory, you must allocate resources for so-called interactive jobs by usage of the command salloc on a login node. Considering a serial application running on a compute node that requires 5000 MByte of memory and limiting the interactive run to 2 hours the following command has to be executed:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ salloc -p cpu -n 1 -t 120 --mem=5000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then you will get one core on a compute node within the partition &amp;quot;cpu&amp;quot;. After execution of this command &#039;&#039;&#039;DO NOT CLOSE&#039;&#039;&#039; your current terminal session but wait until the queueing system Slurm has granted you the requested resources on the compute system. You will be logged in automatically on the granted core! To run a serial program on the granted core you only have to type the name of the executable.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./&amp;lt;my_serial_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please be aware that your serial job must run less than 2 hours in this example, else the job will be killed during runtime by the system. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can also start now a graphical X11-terminal connecting you to the dedicated resource that is available for 2 hours. You can start it by the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ xterm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that, once the walltime limit has been reached the resources - i.e. the compute node - will automatically be revoked.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
An interactive parallel application running on one compute node or on many compute nodes (e.g. here 5 nodes) with 96 cores each requires usually an amount of memory in GByte (e.g. 50 GByte) and a maximum time (e.g. 1 hour). E.g. 5 nodes can be allocated by the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ salloc -p cpu -N 5 --ntasks-per-node=96 -t 01:00:00  --mem=50gb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you can run parallel jobs on 480 cores requiring 50 GByte of memory per node. Please be aware that you will be logged in on core 0 of the first node.&lt;br /&gt;
If you want to have access to another node you have to open a new terminal, connect it also to bwUniCluster 3.0 and type the following commands to&lt;br /&gt;
connect to the running interactive job and then to a specific node:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ srun --jobid=XXXXXXXX --pty /bin/bash&lt;br /&gt;
$ srun --nodelist=uc3nXXX --pty /bin/bash&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ squeue&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the jobid and the nodelist can be shown.&lt;br /&gt;
&lt;br /&gt;
If you want to run MPI-programs, you can do it by simply typing mpirun &amp;lt;program_name&amp;gt;. Then your program will be run on 480 cores. A very simple example for starting a parallel job can be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mpirun &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also start the debugger ddt by the commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module add devel/ddt&lt;br /&gt;
$ ddt &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above commands will execute the parallel program &amp;lt;my_mpi_program&amp;gt; on all available cores. You can also start parallel programs on a subset of cores; an example for this can be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mpirun -n 50 &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are using Intel MPI you must start &amp;lt;my_mpi_program&amp;gt; by the command mpiexec.hydra (instead of mpirun).&lt;br /&gt;
&lt;br /&gt;
== Interactive Computing with Jupyter ==&lt;br /&gt;
&lt;br /&gt;
== Monitor and manage jobs ==&lt;br /&gt;
&lt;br /&gt;
=== List of your submitted jobs : squeue ===&lt;br /&gt;
Displays information about YOUR active, pending and/or recently completed jobs. The command displays all own active and pending jobs. The command squeue is explained in detail on the webpage https://slurm.schedmd.com/squeue.html or via manpage (man squeue).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;squeue&#039;&#039; example on bwUniCluster 3.0 &amp;lt;small&amp;gt;(Only your own jobs are displayed!)&amp;lt;/small&amp;gt;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ squeue &lt;br /&gt;
             JOBID PARTITION     NAME     USER ST       TIME  NODES NODELIST(REASON)&lt;br /&gt;
              1262       cpu     wrap ka_ab123  R       8:15      1 uc3n002&lt;br /&gt;
              1267 dev_gpu_h     wrap ka_ab123 PD       0:00      1 (Resources)&lt;br /&gt;
              1265   highmem     wrap ka_ab123  R       2:41      1 uc3n084&lt;br /&gt;
$ squeue -l&lt;br /&gt;
             JOBID PARTITION     NAME     USER    STATE       TIME TIME_LIMI  NODES NODELIST(REASON)&lt;br /&gt;
              1262       cpu     wrap ka_ab123  RUNNING       8:55     20:00      1 uc3n002&lt;br /&gt;
              1267 dev_gpu_h     wrap ka_ab123  PENDING       0:00     20:00      1 (Resources)&lt;br /&gt;
              1265   highmem     wrap ka_ab123  RUNNING       3:21     20:00      1 uc3n084&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Detailed job information : scontrol show job ===&lt;br /&gt;
scontrol show job displays detailed job state information and diagnostic output for all or a specified job of yours. Detailed information is available for active, pending and recently completed jobs. The command scontrol is explained in detail on the webpage https://slurm.schedmd.com/scontrol.html or via manpage (man scontrol). &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Display the state of all your jobs in normal mode: scontrol show job&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Display the state of a job with &amp;lt;jobid&amp;gt; in normal mode: scontrol show job &amp;lt;jobid&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Here is an example from bwUniCluster 3.0.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ squeue&lt;br /&gt;
JOBID PARTITION     NAME     USER ST       TIME  NODES NODELIST(REASON)&lt;br /&gt;
1262       cpu     wrap ka_zs040  R       1:12      1 uc3n002&lt;br /&gt;
&lt;br /&gt;
$&lt;br /&gt;
$ # now, see what&#039;s up with my pending job with jobid 1262&lt;br /&gt;
$ &lt;br /&gt;
$ scontrol show job 1262&lt;br /&gt;
&lt;br /&gt;
JobId=1262 JobName=wrap&lt;br /&gt;
   UserId=ka_zs0402(241992) GroupId=ka_scc(12345) MCS_label=N/A&lt;br /&gt;
   Priority=4246 Nice=0 Account=ka QOS=normal&lt;br /&gt;
   JobState=RUNNING Reason=None Dependency=(null)&lt;br /&gt;
   Requeue=1 Restarts=0 BatchFlag=1 Reboot=0 ExitCode=0:0&lt;br /&gt;
   RunTime=00:00:37 TimeLimit=00:20:00 TimeMin=N/A&lt;br /&gt;
   SubmitTime=2025-04-04T10:01:30 EligibleTime=2025-04-04T10:01:30&lt;br /&gt;
   AccrueTime=2025-04-04T10:01:30&lt;br /&gt;
   StartTime=2025-04-04T10:01:31 EndTime=2025-04-04T10:21:31 Deadline=N/A&lt;br /&gt;
   SuspendTime=None SecsPreSuspend=0 LastSchedEval=2025-04-04T10:01:31 Scheduler=Main&lt;br /&gt;
   Partition=cpu AllocNode:Sid=uc3n999:2819841&lt;br /&gt;
   ReqNodeList=(null) ExcNodeList=(null)&lt;br /&gt;
   NodeList=uc3n002&lt;br /&gt;
   BatchHost=uc3n002&lt;br /&gt;
   NumNodes=1 NumCPUs=2 NumTasks=1 CPUs/Task=1 ReqB:S:C:T=0:0:*:*&lt;br /&gt;
   ReqTRES=cpu=1,mem=2000M,node=1,billing=1&lt;br /&gt;
   AllocTRES=cpu=2,mem=4000M,node=1,billing=2&lt;br /&gt;
   Socks/Node=* NtasksPerN:B:S:C=0:0:*:1 CoreSpec=*&lt;br /&gt;
   MinCPUsNode=1 MinMemoryCPU=2000M MinTmpDiskNode=0&lt;br /&gt;
   Features=(null) DelayBoot=00:00:00&lt;br /&gt;
   OverSubscribe=OK Contiguous=0 Licenses=(null) Network=(null)&lt;br /&gt;
   Command=(null)&lt;br /&gt;
   WorkDir=/pfs/data6/home/ka/ka_scc/ka_zs0402&lt;br /&gt;
   StdErr=/pfs/data6/home/ka/ka_scc/ka_zs0402/slurm-1262.out&lt;br /&gt;
   StdIn=/dev/null&lt;br /&gt;
   StdOut=/pfs/data6/home/ka/ka_scc/ka_zs0402/slurm-1262.out&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Slurm Options =&lt;br /&gt;
&lt;br /&gt;
= Best Practices =&lt;br /&gt;
&lt;br /&gt;
== Step-by-Step example==&lt;br /&gt;
&lt;br /&gt;
== Dos and Don&#039;ts ==&lt;/div&gt;</summary>
		<author><name>P Schuhmacher</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster3.0/Running_Jobs&amp;diff=14645</id>
		<title>BwUniCluster3.0/Running Jobs</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster3.0/Running_Jobs&amp;diff=14645"/>
		<updated>2025-04-04T15:15:35Z</updated>

		<summary type="html">&lt;p&gt;P Schuhmacher: /* List of your submitted jobs : squeue */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
= Purpose and function of a queuing system =&lt;br /&gt;
&lt;br /&gt;
General procedure: Hint to [[Running_Calculations | Running Calculations]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Job submission process ==&lt;br /&gt;
&lt;br /&gt;
bwUniCluster 3.0 has installed the workload managing software Slurm. Therefore any job submission by the user is to be executed by commands of the Slurm software. Slurm queues and runs user jobs based on fair sharing policies.&lt;br /&gt;
&lt;br /&gt;
== Slurm ==&lt;br /&gt;
&lt;br /&gt;
HPC Workload Manager on bwUniCluster 3.0 is Slurm.&lt;br /&gt;
Slurm is a cluster management and job scheduling system. Slurm has three key functions. &lt;br /&gt;
* First, it allocates access to resources (compute cores on nodes) to users for some duration of time so they can perform work. &lt;br /&gt;
* it provides a framework for starting, executing, and monitoring work (normally a parallel job) on the set of allocated nodes. &lt;br /&gt;
* it arbitrates contention for resources by managing a queue of pending work.&lt;br /&gt;
&lt;br /&gt;
Any kind of calculation on the compute nodes of bwUniCluster 3.0 requires the user to define calculations as a sequence of commands together with required run time, number of CPU cores and main memory and submit all, i.e., the &#039;&#039;&#039;batch job&#039;&#039;&#039;, to a resource and workload managing software. &lt;br /&gt;
== Terms and definitions ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Partitions &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Slurm manages job queues for different &#039;&#039;&#039;partitions&#039;&#039;&#039;. Partitions are used to group similar node types (e.g. nodes with and without accelerators) and to enforce different access policies and resource limits.&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 3.0 there are different partitions:&lt;br /&gt;
&lt;br /&gt;
* CPU-only nodes&lt;br /&gt;
** 2-socket nodes, consisting of 2 Intel Ice Lake processors with 32 cores each or 2 AMD processors with 48 cores each&lt;br /&gt;
** 2-socket nodes with very high RAM capacity, consisting of 2 AMD processors with 48 cores each&lt;br /&gt;
* GPU-accelerated nodes&lt;br /&gt;
** 2-socket nodes with 4x NVIDIA A100 or 4x NVIDIA H100 GPUs&lt;br /&gt;
** 4-socket node with 4x AMD Instinct accelerator&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Queues &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Job &#039;&#039;&#039;queues&#039;&#039;&#039; are used to manage jobs that request access to shared but limited computing resources of a certain kind (partition).&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 3.0 there are different main types of queues:&lt;br /&gt;
* Regular queues&lt;br /&gt;
** cpu: Jobs that request CPU-only nodes.&lt;br /&gt;
** gpu: Jobs that request GPU-accelerated nodes.&lt;br /&gt;
* Development queues (dev)&lt;br /&gt;
** Short, usually interactive jobs that are used for developing, compiling and testing code and workflows. The intention behind development queues is to provide users with immediate access to computer resources without having to wait. This is the place to realize instantaneous heavy compute without affecting other users, as would be the case on the login nodes.&lt;br /&gt;
&lt;br /&gt;
Requested compute resources such as (wall-)time, number of nodes and amount of memory are restricted and must fit into the boundaries imposed by the queues. The request for compute resources on the bwUniCluster 3.0 &amp;lt;font color=red&amp;gt;requires at least the specification of the &#039;&#039;&#039;queue&#039;&#039;&#039; and the &#039;&#039;&#039;time&#039;&#039;&#039;&amp;lt;/font&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Jobs &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Jobs can be run non-interactively as &#039;&#039;&#039;batch jobs&#039;&#039;&#039; or as &#039;&#039;&#039;interactive jobs&#039;&#039;&#039;.&lt;br /&gt;
Submitting a batch job means, that all steps of a compute project are defined in a Bash script. This Bash script is queued and executed as soon as the compute resources are available and allocated. Jobs are enqueued with the &#039;&#039;sbatch&#039;&#039; command.&lt;br /&gt;
&lt;br /&gt;
For interactive jobs, the resources are requested with the &#039;&#039;salloc&#039;&#039; command. As soon as the computing resources are available and allocated, a command line prompt is returned on a computing node and the user can freely dispose of the resources now available to him.&lt;br /&gt;
{|style=&amp;quot;background:#deffee; width:100%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;padding:5px; background:#cef2e0; text-align:left&amp;quot;|&lt;br /&gt;
[[Image:Attention.svg|center|25px]]&lt;br /&gt;
|style=&amp;quot;padding:5px; background:#cef2e0; text-align:left&amp;quot;|&lt;br /&gt;
&#039;&#039;&#039;Please remember:&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Heavy computations are not allowed on the login nodes&#039;&#039;&#039;.&amp;lt;br&amp;gt;Use a developement or a regular job queue instead! Please refer to [[BwUniCluster3.0/Login#Allowed_Activities_on_Login_Nodes|Allowed Activities on Login Nodes]].&lt;br /&gt;
* &#039;&#039;&#039;Development queues&#039;&#039;&#039; are meant for &#039;&#039;&#039;development tasks&#039;&#039;&#039;.&amp;lt;br&amp;gt;Do not misuse this queue for regular, short-running jobs or chain jobs! Only one running job at a time is enabled. Maximum queue length is reduced to 3.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Queues on bwUniCluster 3.0 = &lt;br /&gt;
== Policy ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Regular Queues ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
! style=&amp;quot;width:5%&amp;quot;| Queue&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Node-Type&lt;br /&gt;
! style=&amp;quot;width:23%&amp;quot;| Default Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Minimal Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Maximum Resources&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;cpu_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Ice Lake&lt;br /&gt;
| mem-per-cpu=1950mb&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=30, mem=249600mb, ntasks-per-node=64, (threads-per-core=2) &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;cpu&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Standard&lt;br /&gt;
| mem-per-cpu=1125mb&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=20, mem=380000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;highmem&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;High Memory&lt;br /&gt;
| mem-per-cpu=1125mb&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=4, mem=2300000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;gpu_h100&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;NVIDIA GPU x4&lt;br /&gt;
| mem-per-cpu=1125mb&amp;lt;br/&amp;gt;cpus-per-gpu=24&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=12, mem=760000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;gpu_mi300&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU node&amp;lt;br/&amp;gt;AMD GPU x4&lt;br /&gt;
| mem-per-cpu=1125mb&amp;lt;br/&amp;gt;cpus-per-gpu=24&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=1, mem=510000mb, ntasks-per-node=40, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;gpu_a100_il&amp;lt;/code&amp;gt;/&amp;lt;code&amp;gt;gpu_h100_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;Ice Lake&amp;lt;br/&amp;gt;NVIDIA GPU x4&lt;br /&gt;
| mem-per-gpu=127500mb&amp;lt;br/&amp;gt;cpus-per-gpu=16&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=9, mem=510000mb, ntasks-per-node=64, (threads-per-core=2) &lt;br /&gt;
|}&lt;br /&gt;
Table 1: Regular Queues&lt;br /&gt;
&lt;br /&gt;
== Development Queues ==&lt;br /&gt;
Only for development, i.e. debugging or performance optimization ...&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
! style=&amp;quot;width:5%&amp;quot;| Queue&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Node Type&lt;br /&gt;
! style=&amp;quot;width:23%&amp;quot;| Default Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Minimal Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Maximum Resources&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_cpu_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Ice Lake&lt;br /&gt;
| mem-per-cpu=1950mb&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=8, mem=249600mb, ntasks-per-node=64, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_cpu&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Standard&lt;br /&gt;
| mem-per-cpu=1125mb&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=180000mb, ntasks-per-node=40, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_highmem&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;High Memory&lt;br /&gt;
| mem-per-cpu=1125mb&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=180000mb, ntasks-per-node=40, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_gpu_h100&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;NVIDIA GPU x4&lt;br /&gt;
| mem-per-cpu=1125mb&amp;lt;br/&amp;gt;cpus-per-gpu=24&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=180000mb, ntasks-per-node=40, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_gpu_a100_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;NVIDIA GPU x4&amp;lt;br/&amp;gt;&lt;br /&gt;
| mem-per-gpu=127500mb&amp;lt;br/&amp;gt;cpus-per-gpu=16 &lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=510000mb, ntasks-per-node=64, (threads-per-core=2) &lt;br /&gt;
|}&lt;br /&gt;
Table 2: Development Queues&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Default resources of a queue class defines time, #tasks and memory if not explicitly given with sbatch command. Resource list acronyms &#039;&#039;--time&#039;&#039;, &#039;&#039;--ntasks&#039;&#039;, &#039;&#039;--nodes&#039;&#039;, &#039;&#039;--mem&#039;&#039; and &#039;&#039;--mem-per-cpu&#039;&#039; are described [[BwUniCluster_3.0_Slurm_common_Features|here]].&lt;br /&gt;
&lt;br /&gt;
== Check available resources ==&lt;br /&gt;
The Slurm command sinfo is used to view partition and node information for a system running Slurm. It incorporates down time, reservations, and node state information in determining the available backfill window. The sinfo command can only be used by the administrator.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
SCC has prepared a special script (sinfo_t_idle) to find out how many processors are available for immediate use on the system. It is anticipated that users will use this information to submit jobs that meet these criteria and thus obtain quick job turnaround times. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The following command displays what resources are available for immediate use for the whole partition.&lt;br /&gt;
&amp;lt;pre&amp;gt;$ sinfo_t_idle&lt;br /&gt;
Partition dev_cpu                 :      2 nodes idle&lt;br /&gt;
Partition cpu                     :     68 nodes idle&lt;br /&gt;
Partition highmem                 :      4 nodes idle&lt;br /&gt;
Partition dev_gpu_h100            :      0 nodes idle&lt;br /&gt;
Partition gpu_h100                :     11 nodes idle&lt;br /&gt;
Partition gpu_mi300               :      1 nodes idle&lt;br /&gt;
Partition dev_cpu_il              :      0 nodes idle&lt;br /&gt;
Partition cpu_il                  :      0 nodes idle&lt;br /&gt;
Partition dev_gpu_a100_il         :      0 nodes idle&lt;br /&gt;
Partition gpu_a100_il             :      0 nodes idle&lt;br /&gt;
Partition gpu_h100_il             :      0 nodes idle&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Running Jobs =&lt;br /&gt;
&lt;br /&gt;
== Slurm Commands (excerpt) ==&lt;br /&gt;
Important Slurm commands for non-administrators working on bwUniCluster 3.0.&lt;br /&gt;
{| width=850px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Slurm commands !! Brief explanation&lt;br /&gt;
|-&lt;br /&gt;
| [[#Batch Jobs: sbatch|sbatch]] || Submits a job and puts it into the queue [[https://slurm.schedmd.com/sbatch.html sbatch]] &lt;br /&gt;
|-&lt;br /&gt;
| [[#Interactive Jobs: salloc|salloc]] || Requests resources for an interactive Job [[https://slurm.schedmd.com/salloc.html salloc]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Monitor and manage jobs |scontrol show job]] || Displays detailed job state information [[https://slurm.schedmd.com/scontrol.html scontrol]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#List of your submitted jobs : squeue|squeue]] || Displays information about active, eligible, blocked, and/or recently completed jobs [[https://slurm.schedmd.com/squeue.html squeue]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Start time of job or resources : squeue|squeue --start]] || Returns start time of submitted job [[https://slurm.schedmd.com/squeue.html squeue]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Shows free resources : sinfo_t_idle|sinfo_t_idle]] || Shows what resources are available for immediate use [[https://slurm.schedmd.com/sinfo.html sinfo]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Canceling own jobs : scancel|scancel]] || Cancels a job [[https://slurm.schedmd.com/scancel.html scancel]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* [https://slurm.schedmd.com/tutorials.html  Slurm Tutorials]&lt;br /&gt;
* [https://slurm.schedmd.com/pdfs/summary.pdf  Slurm command/option summary (2 pages)]&lt;br /&gt;
* [https://slurm.schedmd.com/man_index.html  Slurm Commands]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Batch Jobs: sbatch ==&lt;br /&gt;
&lt;br /&gt;
Batch jobs are submitted by using the command &#039;&#039;&#039;sbatch&#039;&#039;&#039;. The main purpose of the &#039;&#039;&#039;sbatch&#039;&#039;&#039; command is to specify the resources that are needed to run the job. &#039;&#039;&#039;sbatch&#039;&#039;&#039; will then queue the batch job. However, starting of batch job depends on the availability of the requested resources and the fair sharing value.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To run your batch job on one of the cpu nodes, please use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sbatch --partition=dev_cpu&lt;br /&gt;
     or &lt;br /&gt;
$ sbatch -p dev_cpu&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Command parameters sbatch ===&lt;br /&gt;
The syntax and use of &#039;&#039;&#039;sbatch&#039;&#039;&#039; can be displayed via:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ man sbatch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;sbatch&#039;&#039;&#039; options can be used from the command line or in your job script. Different defaults for some of these options are set based on the queue and can be found [https://wiki.bwhpc.de/e/BwUniCluster3.0/Batch_Queues#sbatch_-p_queue here]&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | sbatch Options&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width:8%&amp;quot;| Command line&lt;br /&gt;
! style=&amp;quot;width:9%&amp;quot;| Script&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Purpose&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -t, --time=&#039;&#039;time&#039;&#039;&lt;br /&gt;
| #SBATCH --time=&#039;&#039;time&#039;&#039;&lt;br /&gt;
| Wall clock time limit.&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -N, --nodes=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --nodes=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of nodes to be used.&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -n, --ntasks=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --ntasks=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of tasks to be launched.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --ntasks-per-node=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --ntasks-per-node=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Maximum count of tasks per node.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -c, --cpus-per-task=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --cpus-per-task=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of CPUs required per (MPI-)task.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mem=&#039;&#039;value_in_MB&#039;&#039;&lt;br /&gt;
| #SBATCH --mem=&#039;&#039;value_in_MB&#039;&#039; &lt;br /&gt;
| Memory in MegaByte per node. (You should omit the setting of this option.)&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mem-per-cpu=&#039;&#039;value_in_MB&#039;&#039;&lt;br /&gt;
| #SBATCH --mem-per-cpu=&#039;&#039;value_in_MB&#039;&#039; &lt;br /&gt;
| Minimum Memory required per allocated CPU. (You should omit the setting of this option.)&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mail-type=&#039;&#039;type&#039;&#039;&lt;br /&gt;
| #SBATCH --mail-type=&#039;&#039;type&#039;&#039;&lt;br /&gt;
| Notify user by email when certain event types occur.&amp;lt;br&amp;gt;Valid type values are NONE, BEGIN, END, FAIL, REQUEUE, ALL.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mail-user=&#039;&#039;mail-address&#039;&#039;&lt;br /&gt;
| #SBATCH --mail-user=&#039;&#039;mail-address&#039;&#039;&lt;br /&gt;
|  The specified mail-address receives email notification of state changes as defined by --mail-type.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --output=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --output=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| File in which job output is stored. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --error=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --error=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| File in which job error messages are stored. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -J, --job-name=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --job-name=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| Job name.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --export=[ALL,] &#039;&#039;env-variables&#039;&#039;&lt;br /&gt;
| #SBATCH --export=[ALL,] &#039;&#039;env-variables&#039;&#039;&lt;br /&gt;
| Identifies which environment variables from the submission environment are propagated to the launched application. Default is ALL.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -A, --account=&#039;&#039;group-name&#039;&#039;&lt;br /&gt;
| #SBATCH --account=&#039;&#039;group-name&#039;&#039;&lt;br /&gt;
| Change resources used by this job to specified group. You may need this option if your account is assigned to more than one group. By command &amp;quot;scontrol show job&amp;quot; the project group the job is accounted on can be seen behind &amp;quot;Account=&amp;quot;. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -p, --partition=&#039;&#039;queue-name&#039;&#039;&lt;br /&gt;
| #SBATCH --partition=&#039;&#039;queue-name&#039;&#039;&lt;br /&gt;
| Request a specific queue for the resource allocation.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --reservation=&#039;&#039;reservation-name&#039;&#039;&lt;br /&gt;
| #SBATCH --reservation=&#039;&#039;reservation-name&#039;&#039;&lt;br /&gt;
| Use a specific reservation for the resource allocation.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -C, --constraint=&#039;&#039;LSDF&#039;&#039;&lt;br /&gt;
| #SBATCH --constraint=LSDF&lt;br /&gt;
| Job constraint LSDF filesystems.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -C, --constraint=&#039;&#039;BEEOND (BEEOND_4MDS, BEEOND_MAXMDS)&#039;&#039;&lt;br /&gt;
| #SBATCH --constraint=BEEOND (BEEOND_4MDS, BEEOND_MAXMDS)&lt;br /&gt;
| Job constraint BeeOND filesystem.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Interactive Jobs: salloc ==&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 3.0 you are only allowed to run short jobs (&amp;lt;&amp;lt; 1 hour) with little memory requirements (&amp;lt;&amp;lt; 8 GByte) on the logins nodes. If you want to run longer jobs and/or jobs with a request of more than 8 GByte of memory, you must allocate resources for so-called interactive jobs by usage of the command salloc on a login node. Considering a serial application running on a compute node that requires 5000 MByte of memory and limiting the interactive run to 2 hours the following command has to be executed:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ salloc -p cpu -n 1 -t 120 --mem=5000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then you will get one core on a compute node within the partition &amp;quot;cpu&amp;quot;. After execution of this command &#039;&#039;&#039;DO NOT CLOSE&#039;&#039;&#039; your current terminal session but wait until the queueing system Slurm has granted you the requested resources on the compute system. You will be logged in automatically on the granted core! To run a serial program on the granted core you only have to type the name of the executable.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./&amp;lt;my_serial_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please be aware that your serial job must run less than 2 hours in this example, else the job will be killed during runtime by the system. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can also start now a graphical X11-terminal connecting you to the dedicated resource that is available for 2 hours. You can start it by the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ xterm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that, once the walltime limit has been reached the resources - i.e. the compute node - will automatically be revoked.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
An interactive parallel application running on one compute node or on many compute nodes (e.g. here 5 nodes) with 96 cores each requires usually an amount of memory in GByte (e.g. 50 GByte) and a maximum time (e.g. 1 hour). E.g. 5 nodes can be allocated by the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ salloc -p cpu -N 5 --ntasks-per-node=96 -t 01:00:00  --mem=50gb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you can run parallel jobs on 480 cores requiring 50 GByte of memory per node. Please be aware that you will be logged in on core 0 of the first node.&lt;br /&gt;
If you want to have access to another node you have to open a new terminal, connect it also to bwUniCluster 3.0 and type the following commands to&lt;br /&gt;
connect to the running interactive job and then to a specific node:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ srun --jobid=XXXXXXXX --pty /bin/bash&lt;br /&gt;
$ srun --nodelist=uc3nXXX --pty /bin/bash&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ squeue&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the jobid and the nodelist can be shown.&lt;br /&gt;
&lt;br /&gt;
If you want to run MPI-programs, you can do it by simply typing mpirun &amp;lt;program_name&amp;gt;. Then your program will be run on 480 cores. A very simple example for starting a parallel job can be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mpirun &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also start the debugger ddt by the commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module add devel/ddt&lt;br /&gt;
$ ddt &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above commands will execute the parallel program &amp;lt;my_mpi_program&amp;gt; on all available cores. You can also start parallel programs on a subset of cores; an example for this can be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mpirun -n 50 &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are using Intel MPI you must start &amp;lt;my_mpi_program&amp;gt; by the command mpiexec.hydra (instead of mpirun).&lt;br /&gt;
&lt;br /&gt;
== Interactive Computing with Jupyter ==&lt;br /&gt;
&lt;br /&gt;
== Monitor and manage jobs ==&lt;br /&gt;
&lt;br /&gt;
=== List of your submitted jobs : squeue ===&lt;br /&gt;
Displays information about YOUR active, pending and/or recently completed jobs. The command displays all own active and pending jobs. The command squeue is explained in detail on the webpage https://slurm.schedmd.com/squeue.html or via manpage (man squeue).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;squeue&#039;&#039; example on bwUniCluster 3.0 &amp;lt;small&amp;gt;(Only your own jobs are displayed!)&amp;lt;/small&amp;gt;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ squeue &lt;br /&gt;
             JOBID PARTITION     NAME     USER ST       TIME  NODES NODELIST(REASON)&lt;br /&gt;
              1262       cpu     wrap ka_ab123  R       8:15      1 uc3n002&lt;br /&gt;
              1267 dev_gpu_h     wrap ka_ab123 PD       0:00      1 (Resources)&lt;br /&gt;
              1265   highmem     wrap ka_ab123  R       2:41      1 uc3n084&lt;br /&gt;
$ squeue -l&lt;br /&gt;
             JOBID PARTITION     NAME     USER    STATE       TIME TIME_LIMI  NODES NODELIST(REASON)&lt;br /&gt;
              1262       cpu     wrap ka_ab123  RUNNING       8:55     20:00      1 uc3n002&lt;br /&gt;
              1267 dev_gpu_h     wrap ka_ab123  PENDING       0:00     20:00      1 (Resources)&lt;br /&gt;
              1265   highmem     wrap ka_ab123  RUNNING       3:21     20:00      1 uc3n084&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Detailed job information : scontrol show job ==&lt;br /&gt;
scontrol show job displays detailed job state information and diagnostic output for all or a specified job of yours. Detailed information is available for active, pending and recently completed jobs. The command scontrol is explained in detail on the webpage https://slurm.schedmd.com/scontrol.html or via manpage (man scontrol). &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Display the state of all your jobs in normal mode: scontrol show job&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Display the state of a job with &amp;lt;jobid&amp;gt; in normal mode: scontrol show job &amp;lt;jobid&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Here is an example from bwUniCluster 3.0.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ squeue&lt;br /&gt;
JOBID PARTITION     NAME     USER ST       TIME  NODES NODELIST(REASON)&lt;br /&gt;
1262       cpu     wrap ka_zs040  R       1:12      1 uc3n002&lt;br /&gt;
&lt;br /&gt;
$&lt;br /&gt;
$ # now, see what&#039;s up with my pending job with jobid 1262&lt;br /&gt;
$ &lt;br /&gt;
$ scontrol show job 1262&lt;br /&gt;
&lt;br /&gt;
JobId=1262 JobName=wrap&lt;br /&gt;
   UserId=ka_zs0402(241992) GroupId=ka_scc(12345) MCS_label=N/A&lt;br /&gt;
   Priority=4246 Nice=0 Account=ka QOS=normal&lt;br /&gt;
   JobState=RUNNING Reason=None Dependency=(null)&lt;br /&gt;
   Requeue=1 Restarts=0 BatchFlag=1 Reboot=0 ExitCode=0:0&lt;br /&gt;
   RunTime=00:00:37 TimeLimit=00:20:00 TimeMin=N/A&lt;br /&gt;
   SubmitTime=2025-04-04T10:01:30 EligibleTime=2025-04-04T10:01:30&lt;br /&gt;
   AccrueTime=2025-04-04T10:01:30&lt;br /&gt;
   StartTime=2025-04-04T10:01:31 EndTime=2025-04-04T10:21:31 Deadline=N/A&lt;br /&gt;
   SuspendTime=None SecsPreSuspend=0 LastSchedEval=2025-04-04T10:01:31 Scheduler=Main&lt;br /&gt;
   Partition=cpu AllocNode:Sid=uc3n999:2819841&lt;br /&gt;
   ReqNodeList=(null) ExcNodeList=(null)&lt;br /&gt;
   NodeList=uc3n002&lt;br /&gt;
   BatchHost=uc3n002&lt;br /&gt;
   NumNodes=1 NumCPUs=2 NumTasks=1 CPUs/Task=1 ReqB:S:C:T=0:0:*:*&lt;br /&gt;
   ReqTRES=cpu=1,mem=2000M,node=1,billing=1&lt;br /&gt;
   AllocTRES=cpu=2,mem=4000M,node=1,billing=2&lt;br /&gt;
   Socks/Node=* NtasksPerN:B:S:C=0:0:*:1 CoreSpec=*&lt;br /&gt;
   MinCPUsNode=1 MinMemoryCPU=2000M MinTmpDiskNode=0&lt;br /&gt;
   Features=(null) DelayBoot=00:00:00&lt;br /&gt;
   OverSubscribe=OK Contiguous=0 Licenses=(null) Network=(null)&lt;br /&gt;
   Command=(null)&lt;br /&gt;
   WorkDir=/pfs/data6/home/ka/ka_scc/ka_zs0402&lt;br /&gt;
   StdErr=/pfs/data6/home/ka/ka_scc/ka_zs0402/slurm-1262.out&lt;br /&gt;
   StdIn=/dev/null&lt;br /&gt;
   StdOut=/pfs/data6/home/ka/ka_scc/ka_zs0402/slurm-1262.out&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Slurm Options =&lt;br /&gt;
&lt;br /&gt;
= Best Practices =&lt;br /&gt;
&lt;br /&gt;
== Step-by-Step example==&lt;br /&gt;
&lt;br /&gt;
== Dos and Don&#039;ts ==&lt;/div&gt;</summary>
		<author><name>P Schuhmacher</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster3.0/Running_Jobs&amp;diff=14644</id>
		<title>BwUniCluster3.0/Running Jobs</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster3.0/Running_Jobs&amp;diff=14644"/>
		<updated>2025-04-04T15:15:08Z</updated>

		<summary type="html">&lt;p&gt;P Schuhmacher: /* Monitor and manage jobs */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
= Purpose and function of a queuing system =&lt;br /&gt;
&lt;br /&gt;
General procedure: Hint to [[Running_Calculations | Running Calculations]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Job submission process ==&lt;br /&gt;
&lt;br /&gt;
bwUniCluster 3.0 has installed the workload managing software Slurm. Therefore any job submission by the user is to be executed by commands of the Slurm software. Slurm queues and runs user jobs based on fair sharing policies.&lt;br /&gt;
&lt;br /&gt;
== Slurm ==&lt;br /&gt;
&lt;br /&gt;
HPC Workload Manager on bwUniCluster 3.0 is Slurm.&lt;br /&gt;
Slurm is a cluster management and job scheduling system. Slurm has three key functions. &lt;br /&gt;
* First, it allocates access to resources (compute cores on nodes) to users for some duration of time so they can perform work. &lt;br /&gt;
* it provides a framework for starting, executing, and monitoring work (normally a parallel job) on the set of allocated nodes. &lt;br /&gt;
* it arbitrates contention for resources by managing a queue of pending work.&lt;br /&gt;
&lt;br /&gt;
Any kind of calculation on the compute nodes of bwUniCluster 3.0 requires the user to define calculations as a sequence of commands together with required run time, number of CPU cores and main memory and submit all, i.e., the &#039;&#039;&#039;batch job&#039;&#039;&#039;, to a resource and workload managing software. &lt;br /&gt;
== Terms and definitions ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Partitions &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Slurm manages job queues for different &#039;&#039;&#039;partitions&#039;&#039;&#039;. Partitions are used to group similar node types (e.g. nodes with and without accelerators) and to enforce different access policies and resource limits.&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 3.0 there are different partitions:&lt;br /&gt;
&lt;br /&gt;
* CPU-only nodes&lt;br /&gt;
** 2-socket nodes, consisting of 2 Intel Ice Lake processors with 32 cores each or 2 AMD processors with 48 cores each&lt;br /&gt;
** 2-socket nodes with very high RAM capacity, consisting of 2 AMD processors with 48 cores each&lt;br /&gt;
* GPU-accelerated nodes&lt;br /&gt;
** 2-socket nodes with 4x NVIDIA A100 or 4x NVIDIA H100 GPUs&lt;br /&gt;
** 4-socket node with 4x AMD Instinct accelerator&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Queues &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Job &#039;&#039;&#039;queues&#039;&#039;&#039; are used to manage jobs that request access to shared but limited computing resources of a certain kind (partition).&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 3.0 there are different main types of queues:&lt;br /&gt;
* Regular queues&lt;br /&gt;
** cpu: Jobs that request CPU-only nodes.&lt;br /&gt;
** gpu: Jobs that request GPU-accelerated nodes.&lt;br /&gt;
* Development queues (dev)&lt;br /&gt;
** Short, usually interactive jobs that are used for developing, compiling and testing code and workflows. The intention behind development queues is to provide users with immediate access to computer resources without having to wait. This is the place to realize instantaneous heavy compute without affecting other users, as would be the case on the login nodes.&lt;br /&gt;
&lt;br /&gt;
Requested compute resources such as (wall-)time, number of nodes and amount of memory are restricted and must fit into the boundaries imposed by the queues. The request for compute resources on the bwUniCluster 3.0 &amp;lt;font color=red&amp;gt;requires at least the specification of the &#039;&#039;&#039;queue&#039;&#039;&#039; and the &#039;&#039;&#039;time&#039;&#039;&#039;&amp;lt;/font&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Jobs &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Jobs can be run non-interactively as &#039;&#039;&#039;batch jobs&#039;&#039;&#039; or as &#039;&#039;&#039;interactive jobs&#039;&#039;&#039;.&lt;br /&gt;
Submitting a batch job means, that all steps of a compute project are defined in a Bash script. This Bash script is queued and executed as soon as the compute resources are available and allocated. Jobs are enqueued with the &#039;&#039;sbatch&#039;&#039; command.&lt;br /&gt;
&lt;br /&gt;
For interactive jobs, the resources are requested with the &#039;&#039;salloc&#039;&#039; command. As soon as the computing resources are available and allocated, a command line prompt is returned on a computing node and the user can freely dispose of the resources now available to him.&lt;br /&gt;
{|style=&amp;quot;background:#deffee; width:100%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;padding:5px; background:#cef2e0; text-align:left&amp;quot;|&lt;br /&gt;
[[Image:Attention.svg|center|25px]]&lt;br /&gt;
|style=&amp;quot;padding:5px; background:#cef2e0; text-align:left&amp;quot;|&lt;br /&gt;
&#039;&#039;&#039;Please remember:&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Heavy computations are not allowed on the login nodes&#039;&#039;&#039;.&amp;lt;br&amp;gt;Use a developement or a regular job queue instead! Please refer to [[BwUniCluster3.0/Login#Allowed_Activities_on_Login_Nodes|Allowed Activities on Login Nodes]].&lt;br /&gt;
* &#039;&#039;&#039;Development queues&#039;&#039;&#039; are meant for &#039;&#039;&#039;development tasks&#039;&#039;&#039;.&amp;lt;br&amp;gt;Do not misuse this queue for regular, short-running jobs or chain jobs! Only one running job at a time is enabled. Maximum queue length is reduced to 3.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Queues on bwUniCluster 3.0 = &lt;br /&gt;
== Policy ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Regular Queues ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
! style=&amp;quot;width:5%&amp;quot;| Queue&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Node-Type&lt;br /&gt;
! style=&amp;quot;width:23%&amp;quot;| Default Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Minimal Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Maximum Resources&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;cpu_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Ice Lake&lt;br /&gt;
| mem-per-cpu=1950mb&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=30, mem=249600mb, ntasks-per-node=64, (threads-per-core=2) &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;cpu&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Standard&lt;br /&gt;
| mem-per-cpu=1125mb&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=20, mem=380000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;highmem&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;High Memory&lt;br /&gt;
| mem-per-cpu=1125mb&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=4, mem=2300000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;gpu_h100&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;NVIDIA GPU x4&lt;br /&gt;
| mem-per-cpu=1125mb&amp;lt;br/&amp;gt;cpus-per-gpu=24&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=12, mem=760000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;gpu_mi300&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU node&amp;lt;br/&amp;gt;AMD GPU x4&lt;br /&gt;
| mem-per-cpu=1125mb&amp;lt;br/&amp;gt;cpus-per-gpu=24&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=1, mem=510000mb, ntasks-per-node=40, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;gpu_a100_il&amp;lt;/code&amp;gt;/&amp;lt;code&amp;gt;gpu_h100_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;Ice Lake&amp;lt;br/&amp;gt;NVIDIA GPU x4&lt;br /&gt;
| mem-per-gpu=127500mb&amp;lt;br/&amp;gt;cpus-per-gpu=16&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=9, mem=510000mb, ntasks-per-node=64, (threads-per-core=2) &lt;br /&gt;
|}&lt;br /&gt;
Table 1: Regular Queues&lt;br /&gt;
&lt;br /&gt;
== Development Queues ==&lt;br /&gt;
Only for development, i.e. debugging or performance optimization ...&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
! style=&amp;quot;width:5%&amp;quot;| Queue&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Node Type&lt;br /&gt;
! style=&amp;quot;width:23%&amp;quot;| Default Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Minimal Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Maximum Resources&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_cpu_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Ice Lake&lt;br /&gt;
| mem-per-cpu=1950mb&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=8, mem=249600mb, ntasks-per-node=64, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_cpu&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Standard&lt;br /&gt;
| mem-per-cpu=1125mb&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=180000mb, ntasks-per-node=40, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_highmem&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;High Memory&lt;br /&gt;
| mem-per-cpu=1125mb&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=180000mb, ntasks-per-node=40, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_gpu_h100&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;NVIDIA GPU x4&lt;br /&gt;
| mem-per-cpu=1125mb&amp;lt;br/&amp;gt;cpus-per-gpu=24&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=180000mb, ntasks-per-node=40, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_gpu_a100_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;NVIDIA GPU x4&amp;lt;br/&amp;gt;&lt;br /&gt;
| mem-per-gpu=127500mb&amp;lt;br/&amp;gt;cpus-per-gpu=16 &lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=510000mb, ntasks-per-node=64, (threads-per-core=2) &lt;br /&gt;
|}&lt;br /&gt;
Table 2: Development Queues&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Default resources of a queue class defines time, #tasks and memory if not explicitly given with sbatch command. Resource list acronyms &#039;&#039;--time&#039;&#039;, &#039;&#039;--ntasks&#039;&#039;, &#039;&#039;--nodes&#039;&#039;, &#039;&#039;--mem&#039;&#039; and &#039;&#039;--mem-per-cpu&#039;&#039; are described [[BwUniCluster_3.0_Slurm_common_Features|here]].&lt;br /&gt;
&lt;br /&gt;
== Check available resources ==&lt;br /&gt;
The Slurm command sinfo is used to view partition and node information for a system running Slurm. It incorporates down time, reservations, and node state information in determining the available backfill window. The sinfo command can only be used by the administrator.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
SCC has prepared a special script (sinfo_t_idle) to find out how many processors are available for immediate use on the system. It is anticipated that users will use this information to submit jobs that meet these criteria and thus obtain quick job turnaround times. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The following command displays what resources are available for immediate use for the whole partition.&lt;br /&gt;
&amp;lt;pre&amp;gt;$ sinfo_t_idle&lt;br /&gt;
Partition dev_cpu                 :      2 nodes idle&lt;br /&gt;
Partition cpu                     :     68 nodes idle&lt;br /&gt;
Partition highmem                 :      4 nodes idle&lt;br /&gt;
Partition dev_gpu_h100            :      0 nodes idle&lt;br /&gt;
Partition gpu_h100                :     11 nodes idle&lt;br /&gt;
Partition gpu_mi300               :      1 nodes idle&lt;br /&gt;
Partition dev_cpu_il              :      0 nodes idle&lt;br /&gt;
Partition cpu_il                  :      0 nodes idle&lt;br /&gt;
Partition dev_gpu_a100_il         :      0 nodes idle&lt;br /&gt;
Partition gpu_a100_il             :      0 nodes idle&lt;br /&gt;
Partition gpu_h100_il             :      0 nodes idle&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Running Jobs =&lt;br /&gt;
&lt;br /&gt;
== Slurm Commands (excerpt) ==&lt;br /&gt;
Important Slurm commands for non-administrators working on bwUniCluster 3.0.&lt;br /&gt;
{| width=850px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Slurm commands !! Brief explanation&lt;br /&gt;
|-&lt;br /&gt;
| [[#Batch Jobs: sbatch|sbatch]] || Submits a job and puts it into the queue [[https://slurm.schedmd.com/sbatch.html sbatch]] &lt;br /&gt;
|-&lt;br /&gt;
| [[#Interactive Jobs: salloc|salloc]] || Requests resources for an interactive Job [[https://slurm.schedmd.com/salloc.html salloc]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Monitor and manage jobs |scontrol show job]] || Displays detailed job state information [[https://slurm.schedmd.com/scontrol.html scontrol]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#List of your submitted jobs : squeue|squeue]] || Displays information about active, eligible, blocked, and/or recently completed jobs [[https://slurm.schedmd.com/squeue.html squeue]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Start time of job or resources : squeue|squeue --start]] || Returns start time of submitted job [[https://slurm.schedmd.com/squeue.html squeue]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Shows free resources : sinfo_t_idle|sinfo_t_idle]] || Shows what resources are available for immediate use [[https://slurm.schedmd.com/sinfo.html sinfo]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Canceling own jobs : scancel|scancel]] || Cancels a job [[https://slurm.schedmd.com/scancel.html scancel]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* [https://slurm.schedmd.com/tutorials.html  Slurm Tutorials]&lt;br /&gt;
* [https://slurm.schedmd.com/pdfs/summary.pdf  Slurm command/option summary (2 pages)]&lt;br /&gt;
* [https://slurm.schedmd.com/man_index.html  Slurm Commands]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Batch Jobs: sbatch ==&lt;br /&gt;
&lt;br /&gt;
Batch jobs are submitted by using the command &#039;&#039;&#039;sbatch&#039;&#039;&#039;. The main purpose of the &#039;&#039;&#039;sbatch&#039;&#039;&#039; command is to specify the resources that are needed to run the job. &#039;&#039;&#039;sbatch&#039;&#039;&#039; will then queue the batch job. However, starting of batch job depends on the availability of the requested resources and the fair sharing value.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To run your batch job on one of the cpu nodes, please use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sbatch --partition=dev_cpu&lt;br /&gt;
     or &lt;br /&gt;
$ sbatch -p dev_cpu&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Command parameters sbatch ===&lt;br /&gt;
The syntax and use of &#039;&#039;&#039;sbatch&#039;&#039;&#039; can be displayed via:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ man sbatch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;sbatch&#039;&#039;&#039; options can be used from the command line or in your job script. Different defaults for some of these options are set based on the queue and can be found [https://wiki.bwhpc.de/e/BwUniCluster3.0/Batch_Queues#sbatch_-p_queue here]&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | sbatch Options&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width:8%&amp;quot;| Command line&lt;br /&gt;
! style=&amp;quot;width:9%&amp;quot;| Script&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Purpose&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -t, --time=&#039;&#039;time&#039;&#039;&lt;br /&gt;
| #SBATCH --time=&#039;&#039;time&#039;&#039;&lt;br /&gt;
| Wall clock time limit.&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -N, --nodes=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --nodes=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of nodes to be used.&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -n, --ntasks=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --ntasks=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of tasks to be launched.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --ntasks-per-node=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --ntasks-per-node=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Maximum count of tasks per node.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -c, --cpus-per-task=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --cpus-per-task=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of CPUs required per (MPI-)task.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mem=&#039;&#039;value_in_MB&#039;&#039;&lt;br /&gt;
| #SBATCH --mem=&#039;&#039;value_in_MB&#039;&#039; &lt;br /&gt;
| Memory in MegaByte per node. (You should omit the setting of this option.)&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mem-per-cpu=&#039;&#039;value_in_MB&#039;&#039;&lt;br /&gt;
| #SBATCH --mem-per-cpu=&#039;&#039;value_in_MB&#039;&#039; &lt;br /&gt;
| Minimum Memory required per allocated CPU. (You should omit the setting of this option.)&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mail-type=&#039;&#039;type&#039;&#039;&lt;br /&gt;
| #SBATCH --mail-type=&#039;&#039;type&#039;&#039;&lt;br /&gt;
| Notify user by email when certain event types occur.&amp;lt;br&amp;gt;Valid type values are NONE, BEGIN, END, FAIL, REQUEUE, ALL.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mail-user=&#039;&#039;mail-address&#039;&#039;&lt;br /&gt;
| #SBATCH --mail-user=&#039;&#039;mail-address&#039;&#039;&lt;br /&gt;
|  The specified mail-address receives email notification of state changes as defined by --mail-type.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --output=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --output=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| File in which job output is stored. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --error=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --error=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| File in which job error messages are stored. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -J, --job-name=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --job-name=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| Job name.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --export=[ALL,] &#039;&#039;env-variables&#039;&#039;&lt;br /&gt;
| #SBATCH --export=[ALL,] &#039;&#039;env-variables&#039;&#039;&lt;br /&gt;
| Identifies which environment variables from the submission environment are propagated to the launched application. Default is ALL.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -A, --account=&#039;&#039;group-name&#039;&#039;&lt;br /&gt;
| #SBATCH --account=&#039;&#039;group-name&#039;&#039;&lt;br /&gt;
| Change resources used by this job to specified group. You may need this option if your account is assigned to more than one group. By command &amp;quot;scontrol show job&amp;quot; the project group the job is accounted on can be seen behind &amp;quot;Account=&amp;quot;. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -p, --partition=&#039;&#039;queue-name&#039;&#039;&lt;br /&gt;
| #SBATCH --partition=&#039;&#039;queue-name&#039;&#039;&lt;br /&gt;
| Request a specific queue for the resource allocation.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --reservation=&#039;&#039;reservation-name&#039;&#039;&lt;br /&gt;
| #SBATCH --reservation=&#039;&#039;reservation-name&#039;&#039;&lt;br /&gt;
| Use a specific reservation for the resource allocation.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -C, --constraint=&#039;&#039;LSDF&#039;&#039;&lt;br /&gt;
| #SBATCH --constraint=LSDF&lt;br /&gt;
| Job constraint LSDF filesystems.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -C, --constraint=&#039;&#039;BEEOND (BEEOND_4MDS, BEEOND_MAXMDS)&#039;&#039;&lt;br /&gt;
| #SBATCH --constraint=BEEOND (BEEOND_4MDS, BEEOND_MAXMDS)&lt;br /&gt;
| Job constraint BeeOND filesystem.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Interactive Jobs: salloc ==&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 3.0 you are only allowed to run short jobs (&amp;lt;&amp;lt; 1 hour) with little memory requirements (&amp;lt;&amp;lt; 8 GByte) on the logins nodes. If you want to run longer jobs and/or jobs with a request of more than 8 GByte of memory, you must allocate resources for so-called interactive jobs by usage of the command salloc on a login node. Considering a serial application running on a compute node that requires 5000 MByte of memory and limiting the interactive run to 2 hours the following command has to be executed:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ salloc -p cpu -n 1 -t 120 --mem=5000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then you will get one core on a compute node within the partition &amp;quot;cpu&amp;quot;. After execution of this command &#039;&#039;&#039;DO NOT CLOSE&#039;&#039;&#039; your current terminal session but wait until the queueing system Slurm has granted you the requested resources on the compute system. You will be logged in automatically on the granted core! To run a serial program on the granted core you only have to type the name of the executable.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./&amp;lt;my_serial_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please be aware that your serial job must run less than 2 hours in this example, else the job will be killed during runtime by the system. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can also start now a graphical X11-terminal connecting you to the dedicated resource that is available for 2 hours. You can start it by the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ xterm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that, once the walltime limit has been reached the resources - i.e. the compute node - will automatically be revoked.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
An interactive parallel application running on one compute node or on many compute nodes (e.g. here 5 nodes) with 96 cores each requires usually an amount of memory in GByte (e.g. 50 GByte) and a maximum time (e.g. 1 hour). E.g. 5 nodes can be allocated by the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ salloc -p cpu -N 5 --ntasks-per-node=96 -t 01:00:00  --mem=50gb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you can run parallel jobs on 480 cores requiring 50 GByte of memory per node. Please be aware that you will be logged in on core 0 of the first node.&lt;br /&gt;
If you want to have access to another node you have to open a new terminal, connect it also to bwUniCluster 3.0 and type the following commands to&lt;br /&gt;
connect to the running interactive job and then to a specific node:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ srun --jobid=XXXXXXXX --pty /bin/bash&lt;br /&gt;
$ srun --nodelist=uc3nXXX --pty /bin/bash&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ squeue&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the jobid and the nodelist can be shown.&lt;br /&gt;
&lt;br /&gt;
If you want to run MPI-programs, you can do it by simply typing mpirun &amp;lt;program_name&amp;gt;. Then your program will be run on 480 cores. A very simple example for starting a parallel job can be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mpirun &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also start the debugger ddt by the commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module add devel/ddt&lt;br /&gt;
$ ddt &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above commands will execute the parallel program &amp;lt;my_mpi_program&amp;gt; on all available cores. You can also start parallel programs on a subset of cores; an example for this can be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mpirun -n 50 &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are using Intel MPI you must start &amp;lt;my_mpi_program&amp;gt; by the command mpiexec.hydra (instead of mpirun).&lt;br /&gt;
&lt;br /&gt;
== Interactive Computing with Jupyter ==&lt;br /&gt;
&lt;br /&gt;
== Monitor and manage jobs ==&lt;br /&gt;
&lt;br /&gt;
== List of your submitted jobs : squeue ==&lt;br /&gt;
Displays information about YOUR active, pending and/or recently completed jobs. The command displays all own active and pending jobs. The command squeue is explained in detail on the webpage https://slurm.schedmd.com/squeue.html or via manpage (man squeue).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;squeue&#039;&#039; example on bwUniCluster 3.0 &amp;lt;small&amp;gt;(Only your own jobs are displayed!)&amp;lt;/small&amp;gt;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ squeue &lt;br /&gt;
             JOBID PARTITION     NAME     USER ST       TIME  NODES NODELIST(REASON)&lt;br /&gt;
              1262       cpu     wrap ka_ab123  R       8:15      1 uc3n002&lt;br /&gt;
              1267 dev_gpu_h     wrap ka_ab123 PD       0:00      1 (Resources)&lt;br /&gt;
              1265   highmem     wrap ka_ab123  R       2:41      1 uc3n084&lt;br /&gt;
$ squeue -l&lt;br /&gt;
             JOBID PARTITION     NAME     USER    STATE       TIME TIME_LIMI  NODES NODELIST(REASON)&lt;br /&gt;
              1262       cpu     wrap ka_ab123  RUNNING       8:55     20:00      1 uc3n002&lt;br /&gt;
              1267 dev_gpu_h     wrap ka_ab123  PENDING       0:00     20:00      1 (Resources)&lt;br /&gt;
              1265   highmem     wrap ka_ab123  RUNNING       3:21     20:00      1 uc3n084&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Detailed job information : scontrol show job ==&lt;br /&gt;
scontrol show job displays detailed job state information and diagnostic output for all or a specified job of yours. Detailed information is available for active, pending and recently completed jobs. The command scontrol is explained in detail on the webpage https://slurm.schedmd.com/scontrol.html or via manpage (man scontrol). &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Display the state of all your jobs in normal mode: scontrol show job&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Display the state of a job with &amp;lt;jobid&amp;gt; in normal mode: scontrol show job &amp;lt;jobid&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Here is an example from bwUniCluster 3.0.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ squeue&lt;br /&gt;
JOBID PARTITION     NAME     USER ST       TIME  NODES NODELIST(REASON)&lt;br /&gt;
1262       cpu     wrap ka_zs040  R       1:12      1 uc3n002&lt;br /&gt;
&lt;br /&gt;
$&lt;br /&gt;
$ # now, see what&#039;s up with my pending job with jobid 1262&lt;br /&gt;
$ &lt;br /&gt;
$ scontrol show job 1262&lt;br /&gt;
&lt;br /&gt;
JobId=1262 JobName=wrap&lt;br /&gt;
   UserId=ka_zs0402(241992) GroupId=ka_scc(12345) MCS_label=N/A&lt;br /&gt;
   Priority=4246 Nice=0 Account=ka QOS=normal&lt;br /&gt;
   JobState=RUNNING Reason=None Dependency=(null)&lt;br /&gt;
   Requeue=1 Restarts=0 BatchFlag=1 Reboot=0 ExitCode=0:0&lt;br /&gt;
   RunTime=00:00:37 TimeLimit=00:20:00 TimeMin=N/A&lt;br /&gt;
   SubmitTime=2025-04-04T10:01:30 EligibleTime=2025-04-04T10:01:30&lt;br /&gt;
   AccrueTime=2025-04-04T10:01:30&lt;br /&gt;
   StartTime=2025-04-04T10:01:31 EndTime=2025-04-04T10:21:31 Deadline=N/A&lt;br /&gt;
   SuspendTime=None SecsPreSuspend=0 LastSchedEval=2025-04-04T10:01:31 Scheduler=Main&lt;br /&gt;
   Partition=cpu AllocNode:Sid=uc3n999:2819841&lt;br /&gt;
   ReqNodeList=(null) ExcNodeList=(null)&lt;br /&gt;
   NodeList=uc3n002&lt;br /&gt;
   BatchHost=uc3n002&lt;br /&gt;
   NumNodes=1 NumCPUs=2 NumTasks=1 CPUs/Task=1 ReqB:S:C:T=0:0:*:*&lt;br /&gt;
   ReqTRES=cpu=1,mem=2000M,node=1,billing=1&lt;br /&gt;
   AllocTRES=cpu=2,mem=4000M,node=1,billing=2&lt;br /&gt;
   Socks/Node=* NtasksPerN:B:S:C=0:0:*:1 CoreSpec=*&lt;br /&gt;
   MinCPUsNode=1 MinMemoryCPU=2000M MinTmpDiskNode=0&lt;br /&gt;
   Features=(null) DelayBoot=00:00:00&lt;br /&gt;
   OverSubscribe=OK Contiguous=0 Licenses=(null) Network=(null)&lt;br /&gt;
   Command=(null)&lt;br /&gt;
   WorkDir=/pfs/data6/home/ka/ka_scc/ka_zs0402&lt;br /&gt;
   StdErr=/pfs/data6/home/ka/ka_scc/ka_zs0402/slurm-1262.out&lt;br /&gt;
   StdIn=/dev/null&lt;br /&gt;
   StdOut=/pfs/data6/home/ka/ka_scc/ka_zs0402/slurm-1262.out&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Slurm Options =&lt;br /&gt;
&lt;br /&gt;
= Best Practices =&lt;br /&gt;
&lt;br /&gt;
== Step-by-Step example==&lt;br /&gt;
&lt;br /&gt;
== Dos and Don&#039;ts ==&lt;/div&gt;</summary>
		<author><name>P Schuhmacher</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster3.0/Running_Jobs&amp;diff=14643</id>
		<title>BwUniCluster3.0/Running Jobs</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster3.0/Running_Jobs&amp;diff=14643"/>
		<updated>2025-04-04T15:12:32Z</updated>

		<summary type="html">&lt;p&gt;P Schuhmacher: /* Slurm Commands (excerpt) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
= Purpose and function of a queuing system =&lt;br /&gt;
&lt;br /&gt;
General procedure: Hint to [[Running_Calculations | Running Calculations]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Job submission process ==&lt;br /&gt;
&lt;br /&gt;
bwUniCluster 3.0 has installed the workload managing software Slurm. Therefore any job submission by the user is to be executed by commands of the Slurm software. Slurm queues and runs user jobs based on fair sharing policies.&lt;br /&gt;
&lt;br /&gt;
== Slurm ==&lt;br /&gt;
&lt;br /&gt;
HPC Workload Manager on bwUniCluster 3.0 is Slurm.&lt;br /&gt;
Slurm is a cluster management and job scheduling system. Slurm has three key functions. &lt;br /&gt;
* First, it allocates access to resources (compute cores on nodes) to users for some duration of time so they can perform work. &lt;br /&gt;
* it provides a framework for starting, executing, and monitoring work (normally a parallel job) on the set of allocated nodes. &lt;br /&gt;
* it arbitrates contention for resources by managing a queue of pending work.&lt;br /&gt;
&lt;br /&gt;
Any kind of calculation on the compute nodes of bwUniCluster 3.0 requires the user to define calculations as a sequence of commands together with required run time, number of CPU cores and main memory and submit all, i.e., the &#039;&#039;&#039;batch job&#039;&#039;&#039;, to a resource and workload managing software. &lt;br /&gt;
== Terms and definitions ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Partitions &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Slurm manages job queues for different &#039;&#039;&#039;partitions&#039;&#039;&#039;. Partitions are used to group similar node types (e.g. nodes with and without accelerators) and to enforce different access policies and resource limits.&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 3.0 there are different partitions:&lt;br /&gt;
&lt;br /&gt;
* CPU-only nodes&lt;br /&gt;
** 2-socket nodes, consisting of 2 Intel Ice Lake processors with 32 cores each or 2 AMD processors with 48 cores each&lt;br /&gt;
** 2-socket nodes with very high RAM capacity, consisting of 2 AMD processors with 48 cores each&lt;br /&gt;
* GPU-accelerated nodes&lt;br /&gt;
** 2-socket nodes with 4x NVIDIA A100 or 4x NVIDIA H100 GPUs&lt;br /&gt;
** 4-socket node with 4x AMD Instinct accelerator&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Queues &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Job &#039;&#039;&#039;queues&#039;&#039;&#039; are used to manage jobs that request access to shared but limited computing resources of a certain kind (partition).&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 3.0 there are different main types of queues:&lt;br /&gt;
* Regular queues&lt;br /&gt;
** cpu: Jobs that request CPU-only nodes.&lt;br /&gt;
** gpu: Jobs that request GPU-accelerated nodes.&lt;br /&gt;
* Development queues (dev)&lt;br /&gt;
** Short, usually interactive jobs that are used for developing, compiling and testing code and workflows. The intention behind development queues is to provide users with immediate access to computer resources without having to wait. This is the place to realize instantaneous heavy compute without affecting other users, as would be the case on the login nodes.&lt;br /&gt;
&lt;br /&gt;
Requested compute resources such as (wall-)time, number of nodes and amount of memory are restricted and must fit into the boundaries imposed by the queues. The request for compute resources on the bwUniCluster 3.0 &amp;lt;font color=red&amp;gt;requires at least the specification of the &#039;&#039;&#039;queue&#039;&#039;&#039; and the &#039;&#039;&#039;time&#039;&#039;&#039;&amp;lt;/font&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Jobs &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Jobs can be run non-interactively as &#039;&#039;&#039;batch jobs&#039;&#039;&#039; or as &#039;&#039;&#039;interactive jobs&#039;&#039;&#039;.&lt;br /&gt;
Submitting a batch job means, that all steps of a compute project are defined in a Bash script. This Bash script is queued and executed as soon as the compute resources are available and allocated. Jobs are enqueued with the &#039;&#039;sbatch&#039;&#039; command.&lt;br /&gt;
&lt;br /&gt;
For interactive jobs, the resources are requested with the &#039;&#039;salloc&#039;&#039; command. As soon as the computing resources are available and allocated, a command line prompt is returned on a computing node and the user can freely dispose of the resources now available to him.&lt;br /&gt;
{|style=&amp;quot;background:#deffee; width:100%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;padding:5px; background:#cef2e0; text-align:left&amp;quot;|&lt;br /&gt;
[[Image:Attention.svg|center|25px]]&lt;br /&gt;
|style=&amp;quot;padding:5px; background:#cef2e0; text-align:left&amp;quot;|&lt;br /&gt;
&#039;&#039;&#039;Please remember:&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Heavy computations are not allowed on the login nodes&#039;&#039;&#039;.&amp;lt;br&amp;gt;Use a developement or a regular job queue instead! Please refer to [[BwUniCluster3.0/Login#Allowed_Activities_on_Login_Nodes|Allowed Activities on Login Nodes]].&lt;br /&gt;
* &#039;&#039;&#039;Development queues&#039;&#039;&#039; are meant for &#039;&#039;&#039;development tasks&#039;&#039;&#039;.&amp;lt;br&amp;gt;Do not misuse this queue for regular, short-running jobs or chain jobs! Only one running job at a time is enabled. Maximum queue length is reduced to 3.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Queues on bwUniCluster 3.0 = &lt;br /&gt;
== Policy ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Regular Queues ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
! style=&amp;quot;width:5%&amp;quot;| Queue&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Node-Type&lt;br /&gt;
! style=&amp;quot;width:23%&amp;quot;| Default Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Minimal Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Maximum Resources&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;cpu_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Ice Lake&lt;br /&gt;
| mem-per-cpu=1950mb&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=30, mem=249600mb, ntasks-per-node=64, (threads-per-core=2) &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;cpu&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Standard&lt;br /&gt;
| mem-per-cpu=1125mb&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=20, mem=380000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;highmem&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;High Memory&lt;br /&gt;
| mem-per-cpu=1125mb&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=4, mem=2300000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;gpu_h100&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;NVIDIA GPU x4&lt;br /&gt;
| mem-per-cpu=1125mb&amp;lt;br/&amp;gt;cpus-per-gpu=24&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=12, mem=760000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;gpu_mi300&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU node&amp;lt;br/&amp;gt;AMD GPU x4&lt;br /&gt;
| mem-per-cpu=1125mb&amp;lt;br/&amp;gt;cpus-per-gpu=24&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=1, mem=510000mb, ntasks-per-node=40, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;gpu_a100_il&amp;lt;/code&amp;gt;/&amp;lt;code&amp;gt;gpu_h100_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;Ice Lake&amp;lt;br/&amp;gt;NVIDIA GPU x4&lt;br /&gt;
| mem-per-gpu=127500mb&amp;lt;br/&amp;gt;cpus-per-gpu=16&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=9, mem=510000mb, ntasks-per-node=64, (threads-per-core=2) &lt;br /&gt;
|}&lt;br /&gt;
Table 1: Regular Queues&lt;br /&gt;
&lt;br /&gt;
== Development Queues ==&lt;br /&gt;
Only for development, i.e. debugging or performance optimization ...&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
! style=&amp;quot;width:5%&amp;quot;| Queue&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Node Type&lt;br /&gt;
! style=&amp;quot;width:23%&amp;quot;| Default Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Minimal Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Maximum Resources&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_cpu_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Ice Lake&lt;br /&gt;
| mem-per-cpu=1950mb&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=8, mem=249600mb, ntasks-per-node=64, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_cpu&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Standard&lt;br /&gt;
| mem-per-cpu=1125mb&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=180000mb, ntasks-per-node=40, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_highmem&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;High Memory&lt;br /&gt;
| mem-per-cpu=1125mb&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=180000mb, ntasks-per-node=40, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_gpu_h100&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;NVIDIA GPU x4&lt;br /&gt;
| mem-per-cpu=1125mb&amp;lt;br/&amp;gt;cpus-per-gpu=24&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=180000mb, ntasks-per-node=40, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_gpu_a100_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;NVIDIA GPU x4&amp;lt;br/&amp;gt;&lt;br /&gt;
| mem-per-gpu=127500mb&amp;lt;br/&amp;gt;cpus-per-gpu=16 &lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=510000mb, ntasks-per-node=64, (threads-per-core=2) &lt;br /&gt;
|}&lt;br /&gt;
Table 2: Development Queues&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Default resources of a queue class defines time, #tasks and memory if not explicitly given with sbatch command. Resource list acronyms &#039;&#039;--time&#039;&#039;, &#039;&#039;--ntasks&#039;&#039;, &#039;&#039;--nodes&#039;&#039;, &#039;&#039;--mem&#039;&#039; and &#039;&#039;--mem-per-cpu&#039;&#039; are described [[BwUniCluster_3.0_Slurm_common_Features|here]].&lt;br /&gt;
&lt;br /&gt;
== Check available resources ==&lt;br /&gt;
The Slurm command sinfo is used to view partition and node information for a system running Slurm. It incorporates down time, reservations, and node state information in determining the available backfill window. The sinfo command can only be used by the administrator.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
SCC has prepared a special script (sinfo_t_idle) to find out how many processors are available for immediate use on the system. It is anticipated that users will use this information to submit jobs that meet these criteria and thus obtain quick job turnaround times. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The following command displays what resources are available for immediate use for the whole partition.&lt;br /&gt;
&amp;lt;pre&amp;gt;$ sinfo_t_idle&lt;br /&gt;
Partition dev_cpu                 :      2 nodes idle&lt;br /&gt;
Partition cpu                     :     68 nodes idle&lt;br /&gt;
Partition highmem                 :      4 nodes idle&lt;br /&gt;
Partition dev_gpu_h100            :      0 nodes idle&lt;br /&gt;
Partition gpu_h100                :     11 nodes idle&lt;br /&gt;
Partition gpu_mi300               :      1 nodes idle&lt;br /&gt;
Partition dev_cpu_il              :      0 nodes idle&lt;br /&gt;
Partition cpu_il                  :      0 nodes idle&lt;br /&gt;
Partition dev_gpu_a100_il         :      0 nodes idle&lt;br /&gt;
Partition gpu_a100_il             :      0 nodes idle&lt;br /&gt;
Partition gpu_h100_il             :      0 nodes idle&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Running Jobs =&lt;br /&gt;
&lt;br /&gt;
== Slurm Commands (excerpt) ==&lt;br /&gt;
Important Slurm commands for non-administrators working on bwUniCluster 3.0.&lt;br /&gt;
{| width=850px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Slurm commands !! Brief explanation&lt;br /&gt;
|-&lt;br /&gt;
| [[#Batch Jobs: sbatch|sbatch]] || Submits a job and puts it into the queue [[https://slurm.schedmd.com/sbatch.html sbatch]] &lt;br /&gt;
|-&lt;br /&gt;
| [[#Interactive Jobs: salloc|salloc]] || Requests resources for an interactive Job [[https://slurm.schedmd.com/salloc.html salloc]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Monitor and manage jobs |scontrol show job]] || Displays detailed job state information [[https://slurm.schedmd.com/scontrol.html scontrol]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#List of your submitted jobs : squeue|squeue]] || Displays information about active, eligible, blocked, and/or recently completed jobs [[https://slurm.schedmd.com/squeue.html squeue]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Start time of job or resources : squeue|squeue --start]] || Returns start time of submitted job [[https://slurm.schedmd.com/squeue.html squeue]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Shows free resources : sinfo_t_idle|sinfo_t_idle]] || Shows what resources are available for immediate use [[https://slurm.schedmd.com/sinfo.html sinfo]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Canceling own jobs : scancel|scancel]] || Cancels a job [[https://slurm.schedmd.com/scancel.html scancel]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* [https://slurm.schedmd.com/tutorials.html  Slurm Tutorials]&lt;br /&gt;
* [https://slurm.schedmd.com/pdfs/summary.pdf  Slurm command/option summary (2 pages)]&lt;br /&gt;
* [https://slurm.schedmd.com/man_index.html  Slurm Commands]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Batch Jobs: sbatch ==&lt;br /&gt;
&lt;br /&gt;
Batch jobs are submitted by using the command &#039;&#039;&#039;sbatch&#039;&#039;&#039;. The main purpose of the &#039;&#039;&#039;sbatch&#039;&#039;&#039; command is to specify the resources that are needed to run the job. &#039;&#039;&#039;sbatch&#039;&#039;&#039; will then queue the batch job. However, starting of batch job depends on the availability of the requested resources and the fair sharing value.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To run your batch job on one of the cpu nodes, please use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sbatch --partition=dev_cpu&lt;br /&gt;
     or &lt;br /&gt;
$ sbatch -p dev_cpu&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Command parameters sbatch ===&lt;br /&gt;
The syntax and use of &#039;&#039;&#039;sbatch&#039;&#039;&#039; can be displayed via:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ man sbatch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;sbatch&#039;&#039;&#039; options can be used from the command line or in your job script. Different defaults for some of these options are set based on the queue and can be found [https://wiki.bwhpc.de/e/BwUniCluster3.0/Batch_Queues#sbatch_-p_queue here]&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | sbatch Options&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width:8%&amp;quot;| Command line&lt;br /&gt;
! style=&amp;quot;width:9%&amp;quot;| Script&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Purpose&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -t, --time=&#039;&#039;time&#039;&#039;&lt;br /&gt;
| #SBATCH --time=&#039;&#039;time&#039;&#039;&lt;br /&gt;
| Wall clock time limit.&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -N, --nodes=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --nodes=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of nodes to be used.&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -n, --ntasks=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --ntasks=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of tasks to be launched.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --ntasks-per-node=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --ntasks-per-node=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Maximum count of tasks per node.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -c, --cpus-per-task=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --cpus-per-task=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of CPUs required per (MPI-)task.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mem=&#039;&#039;value_in_MB&#039;&#039;&lt;br /&gt;
| #SBATCH --mem=&#039;&#039;value_in_MB&#039;&#039; &lt;br /&gt;
| Memory in MegaByte per node. (You should omit the setting of this option.)&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mem-per-cpu=&#039;&#039;value_in_MB&#039;&#039;&lt;br /&gt;
| #SBATCH --mem-per-cpu=&#039;&#039;value_in_MB&#039;&#039; &lt;br /&gt;
| Minimum Memory required per allocated CPU. (You should omit the setting of this option.)&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mail-type=&#039;&#039;type&#039;&#039;&lt;br /&gt;
| #SBATCH --mail-type=&#039;&#039;type&#039;&#039;&lt;br /&gt;
| Notify user by email when certain event types occur.&amp;lt;br&amp;gt;Valid type values are NONE, BEGIN, END, FAIL, REQUEUE, ALL.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mail-user=&#039;&#039;mail-address&#039;&#039;&lt;br /&gt;
| #SBATCH --mail-user=&#039;&#039;mail-address&#039;&#039;&lt;br /&gt;
|  The specified mail-address receives email notification of state changes as defined by --mail-type.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --output=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --output=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| File in which job output is stored. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --error=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --error=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| File in which job error messages are stored. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -J, --job-name=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --job-name=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| Job name.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --export=[ALL,] &#039;&#039;env-variables&#039;&#039;&lt;br /&gt;
| #SBATCH --export=[ALL,] &#039;&#039;env-variables&#039;&#039;&lt;br /&gt;
| Identifies which environment variables from the submission environment are propagated to the launched application. Default is ALL.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -A, --account=&#039;&#039;group-name&#039;&#039;&lt;br /&gt;
| #SBATCH --account=&#039;&#039;group-name&#039;&#039;&lt;br /&gt;
| Change resources used by this job to specified group. You may need this option if your account is assigned to more than one group. By command &amp;quot;scontrol show job&amp;quot; the project group the job is accounted on can be seen behind &amp;quot;Account=&amp;quot;. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -p, --partition=&#039;&#039;queue-name&#039;&#039;&lt;br /&gt;
| #SBATCH --partition=&#039;&#039;queue-name&#039;&#039;&lt;br /&gt;
| Request a specific queue for the resource allocation.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --reservation=&#039;&#039;reservation-name&#039;&#039;&lt;br /&gt;
| #SBATCH --reservation=&#039;&#039;reservation-name&#039;&#039;&lt;br /&gt;
| Use a specific reservation for the resource allocation.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -C, --constraint=&#039;&#039;LSDF&#039;&#039;&lt;br /&gt;
| #SBATCH --constraint=LSDF&lt;br /&gt;
| Job constraint LSDF filesystems.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -C, --constraint=&#039;&#039;BEEOND (BEEOND_4MDS, BEEOND_MAXMDS)&#039;&#039;&lt;br /&gt;
| #SBATCH --constraint=BEEOND (BEEOND_4MDS, BEEOND_MAXMDS)&lt;br /&gt;
| Job constraint BeeOND filesystem.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Interactive Jobs: salloc ==&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 3.0 you are only allowed to run short jobs (&amp;lt;&amp;lt; 1 hour) with little memory requirements (&amp;lt;&amp;lt; 8 GByte) on the logins nodes. If you want to run longer jobs and/or jobs with a request of more than 8 GByte of memory, you must allocate resources for so-called interactive jobs by usage of the command salloc on a login node. Considering a serial application running on a compute node that requires 5000 MByte of memory and limiting the interactive run to 2 hours the following command has to be executed:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ salloc -p cpu -n 1 -t 120 --mem=5000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then you will get one core on a compute node within the partition &amp;quot;cpu&amp;quot;. After execution of this command &#039;&#039;&#039;DO NOT CLOSE&#039;&#039;&#039; your current terminal session but wait until the queueing system Slurm has granted you the requested resources on the compute system. You will be logged in automatically on the granted core! To run a serial program on the granted core you only have to type the name of the executable.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./&amp;lt;my_serial_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please be aware that your serial job must run less than 2 hours in this example, else the job will be killed during runtime by the system. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can also start now a graphical X11-terminal connecting you to the dedicated resource that is available for 2 hours. You can start it by the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ xterm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that, once the walltime limit has been reached the resources - i.e. the compute node - will automatically be revoked.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
An interactive parallel application running on one compute node or on many compute nodes (e.g. here 5 nodes) with 96 cores each requires usually an amount of memory in GByte (e.g. 50 GByte) and a maximum time (e.g. 1 hour). E.g. 5 nodes can be allocated by the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ salloc -p cpu -N 5 --ntasks-per-node=96 -t 01:00:00  --mem=50gb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you can run parallel jobs on 480 cores requiring 50 GByte of memory per node. Please be aware that you will be logged in on core 0 of the first node.&lt;br /&gt;
If you want to have access to another node you have to open a new terminal, connect it also to bwUniCluster 3.0 and type the following commands to&lt;br /&gt;
connect to the running interactive job and then to a specific node:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ srun --jobid=XXXXXXXX --pty /bin/bash&lt;br /&gt;
$ srun --nodelist=uc3nXXX --pty /bin/bash&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ squeue&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the jobid and the nodelist can be shown.&lt;br /&gt;
&lt;br /&gt;
If you want to run MPI-programs, you can do it by simply typing mpirun &amp;lt;program_name&amp;gt;. Then your program will be run on 480 cores. A very simple example for starting a parallel job can be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mpirun &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also start the debugger ddt by the commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module add devel/ddt&lt;br /&gt;
$ ddt &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above commands will execute the parallel program &amp;lt;my_mpi_program&amp;gt; on all available cores. You can also start parallel programs on a subset of cores; an example for this can be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mpirun -n 50 &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are using Intel MPI you must start &amp;lt;my_mpi_program&amp;gt; by the command mpiexec.hydra (instead of mpirun).&lt;br /&gt;
&lt;br /&gt;
== Interactive Computing with Jupyter ==&lt;br /&gt;
&lt;br /&gt;
== Monitor and manage jobs ==&lt;br /&gt;
scontrol show job displays detailed job state information and diagnostic output for all or a specified job of yours. Detailed information is available for active, pending and recently completed jobs. The command scontrol is explained in detail on the webpage https://slurm.schedmd.com/scontrol.html or via manpage (man scontrol). &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Display the state of all your jobs in normal mode: scontrol show job&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Display the state of a job with &amp;lt;jobid&amp;gt; in normal mode: scontrol show job &amp;lt;jobid&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Here is an example from bwUniCluster 3.0.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ squeue&lt;br /&gt;
JOBID PARTITION     NAME     USER ST       TIME  NODES NODELIST(REASON)&lt;br /&gt;
1262       cpu     wrap ka_zs040  R       1:12      1 uc3n002&lt;br /&gt;
&lt;br /&gt;
$&lt;br /&gt;
$ # now, see what&#039;s up with my pending job with jobid 1262&lt;br /&gt;
$ &lt;br /&gt;
$ scontrol show job 1262&lt;br /&gt;
&lt;br /&gt;
JobId=1262 JobName=wrap&lt;br /&gt;
   UserId=ka_zs0402(241992) GroupId=ka_scc(12345) MCS_label=N/A&lt;br /&gt;
   Priority=4246 Nice=0 Account=ka QOS=normal&lt;br /&gt;
   JobState=RUNNING Reason=None Dependency=(null)&lt;br /&gt;
   Requeue=1 Restarts=0 BatchFlag=1 Reboot=0 ExitCode=0:0&lt;br /&gt;
   RunTime=00:00:37 TimeLimit=00:20:00 TimeMin=N/A&lt;br /&gt;
   SubmitTime=2025-04-04T10:01:30 EligibleTime=2025-04-04T10:01:30&lt;br /&gt;
   AccrueTime=2025-04-04T10:01:30&lt;br /&gt;
   StartTime=2025-04-04T10:01:31 EndTime=2025-04-04T10:21:31 Deadline=N/A&lt;br /&gt;
   SuspendTime=None SecsPreSuspend=0 LastSchedEval=2025-04-04T10:01:31 Scheduler=Main&lt;br /&gt;
   Partition=cpu AllocNode:Sid=uc3n999:2819841&lt;br /&gt;
   ReqNodeList=(null) ExcNodeList=(null)&lt;br /&gt;
   NodeList=uc3n002&lt;br /&gt;
   BatchHost=uc3n002&lt;br /&gt;
   NumNodes=1 NumCPUs=2 NumTasks=1 CPUs/Task=1 ReqB:S:C:T=0:0:*:*&lt;br /&gt;
   ReqTRES=cpu=1,mem=2000M,node=1,billing=1&lt;br /&gt;
   AllocTRES=cpu=2,mem=4000M,node=1,billing=2&lt;br /&gt;
   Socks/Node=* NtasksPerN:B:S:C=0:0:*:1 CoreSpec=*&lt;br /&gt;
   MinCPUsNode=1 MinMemoryCPU=2000M MinTmpDiskNode=0&lt;br /&gt;
   Features=(null) DelayBoot=00:00:00&lt;br /&gt;
   OverSubscribe=OK Contiguous=0 Licenses=(null) Network=(null)&lt;br /&gt;
   Command=(null)&lt;br /&gt;
   WorkDir=/pfs/data6/home/ka/ka_scc/ka_zs0402&lt;br /&gt;
   StdErr=/pfs/data6/home/ka/ka_scc/ka_zs0402/slurm-1262.out&lt;br /&gt;
   StdIn=/dev/null&lt;br /&gt;
   StdOut=/pfs/data6/home/ka/ka_scc/ka_zs0402/slurm-1262.out&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Slurm Options =&lt;br /&gt;
&lt;br /&gt;
= Best Practices =&lt;br /&gt;
&lt;br /&gt;
== Step-by-Step example==&lt;br /&gt;
&lt;br /&gt;
== Dos and Don&#039;ts ==&lt;/div&gt;</summary>
		<author><name>P Schuhmacher</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster3.0/Running_Jobs&amp;diff=14642</id>
		<title>BwUniCluster3.0/Running Jobs</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster3.0/Running_Jobs&amp;diff=14642"/>
		<updated>2025-04-04T15:10:05Z</updated>

		<summary type="html">&lt;p&gt;P Schuhmacher: /* Slurm Commands (excerpt) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
= Purpose and function of a queuing system =&lt;br /&gt;
&lt;br /&gt;
General procedure: Hint to [[Running_Calculations | Running Calculations]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Job submission process ==&lt;br /&gt;
&lt;br /&gt;
bwUniCluster 3.0 has installed the workload managing software Slurm. Therefore any job submission by the user is to be executed by commands of the Slurm software. Slurm queues and runs user jobs based on fair sharing policies.&lt;br /&gt;
&lt;br /&gt;
== Slurm ==&lt;br /&gt;
&lt;br /&gt;
HPC Workload Manager on bwUniCluster 3.0 is Slurm.&lt;br /&gt;
Slurm is a cluster management and job scheduling system. Slurm has three key functions. &lt;br /&gt;
* First, it allocates access to resources (compute cores on nodes) to users for some duration of time so they can perform work. &lt;br /&gt;
* it provides a framework for starting, executing, and monitoring work (normally a parallel job) on the set of allocated nodes. &lt;br /&gt;
* it arbitrates contention for resources by managing a queue of pending work.&lt;br /&gt;
&lt;br /&gt;
Any kind of calculation on the compute nodes of bwUniCluster 3.0 requires the user to define calculations as a sequence of commands together with required run time, number of CPU cores and main memory and submit all, i.e., the &#039;&#039;&#039;batch job&#039;&#039;&#039;, to a resource and workload managing software. &lt;br /&gt;
== Terms and definitions ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Partitions &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Slurm manages job queues for different &#039;&#039;&#039;partitions&#039;&#039;&#039;. Partitions are used to group similar node types (e.g. nodes with and without accelerators) and to enforce different access policies and resource limits.&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 3.0 there are different partitions:&lt;br /&gt;
&lt;br /&gt;
* CPU-only nodes&lt;br /&gt;
** 2-socket nodes, consisting of 2 Intel Ice Lake processors with 32 cores each or 2 AMD processors with 48 cores each&lt;br /&gt;
** 2-socket nodes with very high RAM capacity, consisting of 2 AMD processors with 48 cores each&lt;br /&gt;
* GPU-accelerated nodes&lt;br /&gt;
** 2-socket nodes with 4x NVIDIA A100 or 4x NVIDIA H100 GPUs&lt;br /&gt;
** 4-socket node with 4x AMD Instinct accelerator&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Queues &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Job &#039;&#039;&#039;queues&#039;&#039;&#039; are used to manage jobs that request access to shared but limited computing resources of a certain kind (partition).&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 3.0 there are different main types of queues:&lt;br /&gt;
* Regular queues&lt;br /&gt;
** cpu: Jobs that request CPU-only nodes.&lt;br /&gt;
** gpu: Jobs that request GPU-accelerated nodes.&lt;br /&gt;
* Development queues (dev)&lt;br /&gt;
** Short, usually interactive jobs that are used for developing, compiling and testing code and workflows. The intention behind development queues is to provide users with immediate access to computer resources without having to wait. This is the place to realize instantaneous heavy compute without affecting other users, as would be the case on the login nodes.&lt;br /&gt;
&lt;br /&gt;
Requested compute resources such as (wall-)time, number of nodes and amount of memory are restricted and must fit into the boundaries imposed by the queues. The request for compute resources on the bwUniCluster 3.0 &amp;lt;font color=red&amp;gt;requires at least the specification of the &#039;&#039;&#039;queue&#039;&#039;&#039; and the &#039;&#039;&#039;time&#039;&#039;&#039;&amp;lt;/font&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Jobs &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Jobs can be run non-interactively as &#039;&#039;&#039;batch jobs&#039;&#039;&#039; or as &#039;&#039;&#039;interactive jobs&#039;&#039;&#039;.&lt;br /&gt;
Submitting a batch job means, that all steps of a compute project are defined in a Bash script. This Bash script is queued and executed as soon as the compute resources are available and allocated. Jobs are enqueued with the &#039;&#039;sbatch&#039;&#039; command.&lt;br /&gt;
&lt;br /&gt;
For interactive jobs, the resources are requested with the &#039;&#039;salloc&#039;&#039; command. As soon as the computing resources are available and allocated, a command line prompt is returned on a computing node and the user can freely dispose of the resources now available to him.&lt;br /&gt;
{|style=&amp;quot;background:#deffee; width:100%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;padding:5px; background:#cef2e0; text-align:left&amp;quot;|&lt;br /&gt;
[[Image:Attention.svg|center|25px]]&lt;br /&gt;
|style=&amp;quot;padding:5px; background:#cef2e0; text-align:left&amp;quot;|&lt;br /&gt;
&#039;&#039;&#039;Please remember:&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Heavy computations are not allowed on the login nodes&#039;&#039;&#039;.&amp;lt;br&amp;gt;Use a developement or a regular job queue instead! Please refer to [[BwUniCluster3.0/Login#Allowed_Activities_on_Login_Nodes|Allowed Activities on Login Nodes]].&lt;br /&gt;
* &#039;&#039;&#039;Development queues&#039;&#039;&#039; are meant for &#039;&#039;&#039;development tasks&#039;&#039;&#039;.&amp;lt;br&amp;gt;Do not misuse this queue for regular, short-running jobs or chain jobs! Only one running job at a time is enabled. Maximum queue length is reduced to 3.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Queues on bwUniCluster 3.0 = &lt;br /&gt;
== Policy ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Regular Queues ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
! style=&amp;quot;width:5%&amp;quot;| Queue&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Node-Type&lt;br /&gt;
! style=&amp;quot;width:23%&amp;quot;| Default Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Minimal Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Maximum Resources&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;cpu_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Ice Lake&lt;br /&gt;
| mem-per-cpu=1950mb&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=30, mem=249600mb, ntasks-per-node=64, (threads-per-core=2) &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;cpu&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Standard&lt;br /&gt;
| mem-per-cpu=1125mb&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=20, mem=380000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;highmem&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;High Memory&lt;br /&gt;
| mem-per-cpu=1125mb&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=4, mem=2300000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;gpu_h100&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;NVIDIA GPU x4&lt;br /&gt;
| mem-per-cpu=1125mb&amp;lt;br/&amp;gt;cpus-per-gpu=24&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=12, mem=760000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;gpu_mi300&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU node&amp;lt;br/&amp;gt;AMD GPU x4&lt;br /&gt;
| mem-per-cpu=1125mb&amp;lt;br/&amp;gt;cpus-per-gpu=24&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=1, mem=510000mb, ntasks-per-node=40, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;gpu_a100_il&amp;lt;/code&amp;gt;/&amp;lt;code&amp;gt;gpu_h100_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;Ice Lake&amp;lt;br/&amp;gt;NVIDIA GPU x4&lt;br /&gt;
| mem-per-gpu=127500mb&amp;lt;br/&amp;gt;cpus-per-gpu=16&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=9, mem=510000mb, ntasks-per-node=64, (threads-per-core=2) &lt;br /&gt;
|}&lt;br /&gt;
Table 1: Regular Queues&lt;br /&gt;
&lt;br /&gt;
== Development Queues ==&lt;br /&gt;
Only for development, i.e. debugging or performance optimization ...&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
! style=&amp;quot;width:5%&amp;quot;| Queue&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Node Type&lt;br /&gt;
! style=&amp;quot;width:23%&amp;quot;| Default Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Minimal Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Maximum Resources&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_cpu_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Ice Lake&lt;br /&gt;
| mem-per-cpu=1950mb&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=8, mem=249600mb, ntasks-per-node=64, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_cpu&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Standard&lt;br /&gt;
| mem-per-cpu=1125mb&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=180000mb, ntasks-per-node=40, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_highmem&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;High Memory&lt;br /&gt;
| mem-per-cpu=1125mb&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=180000mb, ntasks-per-node=40, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_gpu_h100&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;NVIDIA GPU x4&lt;br /&gt;
| mem-per-cpu=1125mb&amp;lt;br/&amp;gt;cpus-per-gpu=24&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=180000mb, ntasks-per-node=40, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_gpu_a100_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;NVIDIA GPU x4&amp;lt;br/&amp;gt;&lt;br /&gt;
| mem-per-gpu=127500mb&amp;lt;br/&amp;gt;cpus-per-gpu=16 &lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=510000mb, ntasks-per-node=64, (threads-per-core=2) &lt;br /&gt;
|}&lt;br /&gt;
Table 2: Development Queues&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Default resources of a queue class defines time, #tasks and memory if not explicitly given with sbatch command. Resource list acronyms &#039;&#039;--time&#039;&#039;, &#039;&#039;--ntasks&#039;&#039;, &#039;&#039;--nodes&#039;&#039;, &#039;&#039;--mem&#039;&#039; and &#039;&#039;--mem-per-cpu&#039;&#039; are described [[BwUniCluster_3.0_Slurm_common_Features|here]].&lt;br /&gt;
&lt;br /&gt;
== Check available resources ==&lt;br /&gt;
The Slurm command sinfo is used to view partition and node information for a system running Slurm. It incorporates down time, reservations, and node state information in determining the available backfill window. The sinfo command can only be used by the administrator.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
SCC has prepared a special script (sinfo_t_idle) to find out how many processors are available for immediate use on the system. It is anticipated that users will use this information to submit jobs that meet these criteria and thus obtain quick job turnaround times. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The following command displays what resources are available for immediate use for the whole partition.&lt;br /&gt;
&amp;lt;pre&amp;gt;$ sinfo_t_idle&lt;br /&gt;
Partition dev_cpu                 :      2 nodes idle&lt;br /&gt;
Partition cpu                     :     68 nodes idle&lt;br /&gt;
Partition highmem                 :      4 nodes idle&lt;br /&gt;
Partition dev_gpu_h100            :      0 nodes idle&lt;br /&gt;
Partition gpu_h100                :     11 nodes idle&lt;br /&gt;
Partition gpu_mi300               :      1 nodes idle&lt;br /&gt;
Partition dev_cpu_il              :      0 nodes idle&lt;br /&gt;
Partition cpu_il                  :      0 nodes idle&lt;br /&gt;
Partition dev_gpu_a100_il         :      0 nodes idle&lt;br /&gt;
Partition gpu_a100_il             :      0 nodes idle&lt;br /&gt;
Partition gpu_h100_il             :      0 nodes idle&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Running Jobs =&lt;br /&gt;
&lt;br /&gt;
== Slurm Commands (excerpt) ==&lt;br /&gt;
Important Slurm commands for non-administrators working on bwUniCluster 3.0.&lt;br /&gt;
{| width=850px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Slurm commands !! Brief explanation&lt;br /&gt;
|-&lt;br /&gt;
| [[#Batch Jobs: sbatch|sbatch]] || Submits a job and puts it into the queue [[https://slurm.schedmd.com/sbatch.html sbatch]] &lt;br /&gt;
|-&lt;br /&gt;
| [[#Interactive job : salloc|salloc]] || Requests resources for an interactive Job [[https://slurm.schedmd.com/salloc.html salloc]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Detailed job information : scontrol show job|scontrol show job]] || Displays detailed job state information [[https://slurm.schedmd.com/scontrol.html scontrol]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#List of your submitted jo/bs : squeue|squeue]] || Displays information about active, eligible, blocked, and/or recently completed jobs [[https://slurm.schedmd.com/squeue.html squeue]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Start time of job or resources : squeue|squeue --start]] || Returns start time of submitted job [[https://slurm.schedmd.com/squeue.html squeue]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Shows free resources : sinfo_t_idle|sinfo_t_idle]] || Shows what resources are available for immediate use [[https://slurm.schedmd.com/sinfo.html sinfo]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Canceling own jobs : scancel|scancel]] || Cancels a job [[https://slurm.schedmd.com/scancel.html scancel]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* [https://slurm.schedmd.com/tutorials.html  Slurm Tutorials]&lt;br /&gt;
* [https://slurm.schedmd.com/pdfs/summary.pdf  Slurm command/option summary (2 pages)]&lt;br /&gt;
* [https://slurm.schedmd.com/man_index.html  Slurm Commands]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Batch Jobs: sbatch ==&lt;br /&gt;
&lt;br /&gt;
Batch jobs are submitted by using the command &#039;&#039;&#039;sbatch&#039;&#039;&#039;. The main purpose of the &#039;&#039;&#039;sbatch&#039;&#039;&#039; command is to specify the resources that are needed to run the job. &#039;&#039;&#039;sbatch&#039;&#039;&#039; will then queue the batch job. However, starting of batch job depends on the availability of the requested resources and the fair sharing value.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To run your batch job on one of the cpu nodes, please use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sbatch --partition=dev_cpu&lt;br /&gt;
     or &lt;br /&gt;
$ sbatch -p dev_cpu&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Command parameters sbatch ===&lt;br /&gt;
The syntax and use of &#039;&#039;&#039;sbatch&#039;&#039;&#039; can be displayed via:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ man sbatch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;sbatch&#039;&#039;&#039; options can be used from the command line or in your job script. Different defaults for some of these options are set based on the queue and can be found [https://wiki.bwhpc.de/e/BwUniCluster3.0/Batch_Queues#sbatch_-p_queue here]&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | sbatch Options&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width:8%&amp;quot;| Command line&lt;br /&gt;
! style=&amp;quot;width:9%&amp;quot;| Script&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Purpose&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -t, --time=&#039;&#039;time&#039;&#039;&lt;br /&gt;
| #SBATCH --time=&#039;&#039;time&#039;&#039;&lt;br /&gt;
| Wall clock time limit.&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -N, --nodes=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --nodes=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of nodes to be used.&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -n, --ntasks=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --ntasks=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of tasks to be launched.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --ntasks-per-node=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --ntasks-per-node=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Maximum count of tasks per node.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -c, --cpus-per-task=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --cpus-per-task=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of CPUs required per (MPI-)task.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mem=&#039;&#039;value_in_MB&#039;&#039;&lt;br /&gt;
| #SBATCH --mem=&#039;&#039;value_in_MB&#039;&#039; &lt;br /&gt;
| Memory in MegaByte per node. (You should omit the setting of this option.)&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mem-per-cpu=&#039;&#039;value_in_MB&#039;&#039;&lt;br /&gt;
| #SBATCH --mem-per-cpu=&#039;&#039;value_in_MB&#039;&#039; &lt;br /&gt;
| Minimum Memory required per allocated CPU. (You should omit the setting of this option.)&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mail-type=&#039;&#039;type&#039;&#039;&lt;br /&gt;
| #SBATCH --mail-type=&#039;&#039;type&#039;&#039;&lt;br /&gt;
| Notify user by email when certain event types occur.&amp;lt;br&amp;gt;Valid type values are NONE, BEGIN, END, FAIL, REQUEUE, ALL.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mail-user=&#039;&#039;mail-address&#039;&#039;&lt;br /&gt;
| #SBATCH --mail-user=&#039;&#039;mail-address&#039;&#039;&lt;br /&gt;
|  The specified mail-address receives email notification of state changes as defined by --mail-type.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --output=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --output=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| File in which job output is stored. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --error=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --error=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| File in which job error messages are stored. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -J, --job-name=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --job-name=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| Job name.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --export=[ALL,] &#039;&#039;env-variables&#039;&#039;&lt;br /&gt;
| #SBATCH --export=[ALL,] &#039;&#039;env-variables&#039;&#039;&lt;br /&gt;
| Identifies which environment variables from the submission environment are propagated to the launched application. Default is ALL.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -A, --account=&#039;&#039;group-name&#039;&#039;&lt;br /&gt;
| #SBATCH --account=&#039;&#039;group-name&#039;&#039;&lt;br /&gt;
| Change resources used by this job to specified group. You may need this option if your account is assigned to more than one group. By command &amp;quot;scontrol show job&amp;quot; the project group the job is accounted on can be seen behind &amp;quot;Account=&amp;quot;. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -p, --partition=&#039;&#039;queue-name&#039;&#039;&lt;br /&gt;
| #SBATCH --partition=&#039;&#039;queue-name&#039;&#039;&lt;br /&gt;
| Request a specific queue for the resource allocation.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --reservation=&#039;&#039;reservation-name&#039;&#039;&lt;br /&gt;
| #SBATCH --reservation=&#039;&#039;reservation-name&#039;&#039;&lt;br /&gt;
| Use a specific reservation for the resource allocation.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -C, --constraint=&#039;&#039;LSDF&#039;&#039;&lt;br /&gt;
| #SBATCH --constraint=LSDF&lt;br /&gt;
| Job constraint LSDF filesystems.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -C, --constraint=&#039;&#039;BEEOND (BEEOND_4MDS, BEEOND_MAXMDS)&#039;&#039;&lt;br /&gt;
| #SBATCH --constraint=BEEOND (BEEOND_4MDS, BEEOND_MAXMDS)&lt;br /&gt;
| Job constraint BeeOND filesystem.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Interactive Jobs: salloc ==&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 3.0 you are only allowed to run short jobs (&amp;lt;&amp;lt; 1 hour) with little memory requirements (&amp;lt;&amp;lt; 8 GByte) on the logins nodes. If you want to run longer jobs and/or jobs with a request of more than 8 GByte of memory, you must allocate resources for so-called interactive jobs by usage of the command salloc on a login node. Considering a serial application running on a compute node that requires 5000 MByte of memory and limiting the interactive run to 2 hours the following command has to be executed:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ salloc -p cpu -n 1 -t 120 --mem=5000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then you will get one core on a compute node within the partition &amp;quot;cpu&amp;quot;. After execution of this command &#039;&#039;&#039;DO NOT CLOSE&#039;&#039;&#039; your current terminal session but wait until the queueing system Slurm has granted you the requested resources on the compute system. You will be logged in automatically on the granted core! To run a serial program on the granted core you only have to type the name of the executable.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./&amp;lt;my_serial_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please be aware that your serial job must run less than 2 hours in this example, else the job will be killed during runtime by the system. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can also start now a graphical X11-terminal connecting you to the dedicated resource that is available for 2 hours. You can start it by the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ xterm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that, once the walltime limit has been reached the resources - i.e. the compute node - will automatically be revoked.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
An interactive parallel application running on one compute node or on many compute nodes (e.g. here 5 nodes) with 96 cores each requires usually an amount of memory in GByte (e.g. 50 GByte) and a maximum time (e.g. 1 hour). E.g. 5 nodes can be allocated by the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ salloc -p cpu -N 5 --ntasks-per-node=96 -t 01:00:00  --mem=50gb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you can run parallel jobs on 480 cores requiring 50 GByte of memory per node. Please be aware that you will be logged in on core 0 of the first node.&lt;br /&gt;
If you want to have access to another node you have to open a new terminal, connect it also to bwUniCluster 3.0 and type the following commands to&lt;br /&gt;
connect to the running interactive job and then to a specific node:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ srun --jobid=XXXXXXXX --pty /bin/bash&lt;br /&gt;
$ srun --nodelist=uc3nXXX --pty /bin/bash&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ squeue&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the jobid and the nodelist can be shown.&lt;br /&gt;
&lt;br /&gt;
If you want to run MPI-programs, you can do it by simply typing mpirun &amp;lt;program_name&amp;gt;. Then your program will be run on 480 cores. A very simple example for starting a parallel job can be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mpirun &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also start the debugger ddt by the commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module add devel/ddt&lt;br /&gt;
$ ddt &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above commands will execute the parallel program &amp;lt;my_mpi_program&amp;gt; on all available cores. You can also start parallel programs on a subset of cores; an example for this can be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mpirun -n 50 &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are using Intel MPI you must start &amp;lt;my_mpi_program&amp;gt; by the command mpiexec.hydra (instead of mpirun).&lt;br /&gt;
&lt;br /&gt;
== Interactive Computing with Jupyter ==&lt;br /&gt;
&lt;br /&gt;
== Monitor and manage jobs ==&lt;br /&gt;
scontrol show job displays detailed job state information and diagnostic output for all or a specified job of yours. Detailed information is available for active, pending and recently completed jobs. The command scontrol is explained in detail on the webpage https://slurm.schedmd.com/scontrol.html or via manpage (man scontrol). &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Display the state of all your jobs in normal mode: scontrol show job&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Display the state of a job with &amp;lt;jobid&amp;gt; in normal mode: scontrol show job &amp;lt;jobid&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Here is an example from bwUniCluster 3.0.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ squeue&lt;br /&gt;
JOBID PARTITION     NAME     USER ST       TIME  NODES NODELIST(REASON)&lt;br /&gt;
1262       cpu     wrap ka_zs040  R       1:12      1 uc3n002&lt;br /&gt;
&lt;br /&gt;
$&lt;br /&gt;
$ # now, see what&#039;s up with my pending job with jobid 1262&lt;br /&gt;
$ &lt;br /&gt;
$ scontrol show job 1262&lt;br /&gt;
&lt;br /&gt;
JobId=1262 JobName=wrap&lt;br /&gt;
   UserId=ka_zs0402(241992) GroupId=ka_scc(12345) MCS_label=N/A&lt;br /&gt;
   Priority=4246 Nice=0 Account=ka QOS=normal&lt;br /&gt;
   JobState=RUNNING Reason=None Dependency=(null)&lt;br /&gt;
   Requeue=1 Restarts=0 BatchFlag=1 Reboot=0 ExitCode=0:0&lt;br /&gt;
   RunTime=00:00:37 TimeLimit=00:20:00 TimeMin=N/A&lt;br /&gt;
   SubmitTime=2025-04-04T10:01:30 EligibleTime=2025-04-04T10:01:30&lt;br /&gt;
   AccrueTime=2025-04-04T10:01:30&lt;br /&gt;
   StartTime=2025-04-04T10:01:31 EndTime=2025-04-04T10:21:31 Deadline=N/A&lt;br /&gt;
   SuspendTime=None SecsPreSuspend=0 LastSchedEval=2025-04-04T10:01:31 Scheduler=Main&lt;br /&gt;
   Partition=cpu AllocNode:Sid=uc3n999:2819841&lt;br /&gt;
   ReqNodeList=(null) ExcNodeList=(null)&lt;br /&gt;
   NodeList=uc3n002&lt;br /&gt;
   BatchHost=uc3n002&lt;br /&gt;
   NumNodes=1 NumCPUs=2 NumTasks=1 CPUs/Task=1 ReqB:S:C:T=0:0:*:*&lt;br /&gt;
   ReqTRES=cpu=1,mem=2000M,node=1,billing=1&lt;br /&gt;
   AllocTRES=cpu=2,mem=4000M,node=1,billing=2&lt;br /&gt;
   Socks/Node=* NtasksPerN:B:S:C=0:0:*:1 CoreSpec=*&lt;br /&gt;
   MinCPUsNode=1 MinMemoryCPU=2000M MinTmpDiskNode=0&lt;br /&gt;
   Features=(null) DelayBoot=00:00:00&lt;br /&gt;
   OverSubscribe=OK Contiguous=0 Licenses=(null) Network=(null)&lt;br /&gt;
   Command=(null)&lt;br /&gt;
   WorkDir=/pfs/data6/home/ka/ka_scc/ka_zs0402&lt;br /&gt;
   StdErr=/pfs/data6/home/ka/ka_scc/ka_zs0402/slurm-1262.out&lt;br /&gt;
   StdIn=/dev/null&lt;br /&gt;
   StdOut=/pfs/data6/home/ka/ka_scc/ka_zs0402/slurm-1262.out&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Slurm Options =&lt;br /&gt;
&lt;br /&gt;
= Best Practices =&lt;br /&gt;
&lt;br /&gt;
== Step-by-Step example==&lt;br /&gt;
&lt;br /&gt;
== Dos and Don&#039;ts ==&lt;/div&gt;</summary>
		<author><name>P Schuhmacher</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster3.0/Running_Jobs&amp;diff=14641</id>
		<title>BwUniCluster3.0/Running Jobs</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster3.0/Running_Jobs&amp;diff=14641"/>
		<updated>2025-04-04T15:09:25Z</updated>

		<summary type="html">&lt;p&gt;P Schuhmacher: /* Running Jobs */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
= Purpose and function of a queuing system =&lt;br /&gt;
&lt;br /&gt;
General procedure: Hint to [[Running_Calculations | Running Calculations]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Job submission process ==&lt;br /&gt;
&lt;br /&gt;
bwUniCluster 3.0 has installed the workload managing software Slurm. Therefore any job submission by the user is to be executed by commands of the Slurm software. Slurm queues and runs user jobs based on fair sharing policies.&lt;br /&gt;
&lt;br /&gt;
== Slurm ==&lt;br /&gt;
&lt;br /&gt;
HPC Workload Manager on bwUniCluster 3.0 is Slurm.&lt;br /&gt;
Slurm is a cluster management and job scheduling system. Slurm has three key functions. &lt;br /&gt;
* First, it allocates access to resources (compute cores on nodes) to users for some duration of time so they can perform work. &lt;br /&gt;
* it provides a framework for starting, executing, and monitoring work (normally a parallel job) on the set of allocated nodes. &lt;br /&gt;
* it arbitrates contention for resources by managing a queue of pending work.&lt;br /&gt;
&lt;br /&gt;
Any kind of calculation on the compute nodes of bwUniCluster 3.0 requires the user to define calculations as a sequence of commands together with required run time, number of CPU cores and main memory and submit all, i.e., the &#039;&#039;&#039;batch job&#039;&#039;&#039;, to a resource and workload managing software. &lt;br /&gt;
== Terms and definitions ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Partitions &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Slurm manages job queues for different &#039;&#039;&#039;partitions&#039;&#039;&#039;. Partitions are used to group similar node types (e.g. nodes with and without accelerators) and to enforce different access policies and resource limits.&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 3.0 there are different partitions:&lt;br /&gt;
&lt;br /&gt;
* CPU-only nodes&lt;br /&gt;
** 2-socket nodes, consisting of 2 Intel Ice Lake processors with 32 cores each or 2 AMD processors with 48 cores each&lt;br /&gt;
** 2-socket nodes with very high RAM capacity, consisting of 2 AMD processors with 48 cores each&lt;br /&gt;
* GPU-accelerated nodes&lt;br /&gt;
** 2-socket nodes with 4x NVIDIA A100 or 4x NVIDIA H100 GPUs&lt;br /&gt;
** 4-socket node with 4x AMD Instinct accelerator&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Queues &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Job &#039;&#039;&#039;queues&#039;&#039;&#039; are used to manage jobs that request access to shared but limited computing resources of a certain kind (partition).&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 3.0 there are different main types of queues:&lt;br /&gt;
* Regular queues&lt;br /&gt;
** cpu: Jobs that request CPU-only nodes.&lt;br /&gt;
** gpu: Jobs that request GPU-accelerated nodes.&lt;br /&gt;
* Development queues (dev)&lt;br /&gt;
** Short, usually interactive jobs that are used for developing, compiling and testing code and workflows. The intention behind development queues is to provide users with immediate access to computer resources without having to wait. This is the place to realize instantaneous heavy compute without affecting other users, as would be the case on the login nodes.&lt;br /&gt;
&lt;br /&gt;
Requested compute resources such as (wall-)time, number of nodes and amount of memory are restricted and must fit into the boundaries imposed by the queues. The request for compute resources on the bwUniCluster 3.0 &amp;lt;font color=red&amp;gt;requires at least the specification of the &#039;&#039;&#039;queue&#039;&#039;&#039; and the &#039;&#039;&#039;time&#039;&#039;&#039;&amp;lt;/font&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Jobs &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Jobs can be run non-interactively as &#039;&#039;&#039;batch jobs&#039;&#039;&#039; or as &#039;&#039;&#039;interactive jobs&#039;&#039;&#039;.&lt;br /&gt;
Submitting a batch job means, that all steps of a compute project are defined in a Bash script. This Bash script is queued and executed as soon as the compute resources are available and allocated. Jobs are enqueued with the &#039;&#039;sbatch&#039;&#039; command.&lt;br /&gt;
&lt;br /&gt;
For interactive jobs, the resources are requested with the &#039;&#039;salloc&#039;&#039; command. As soon as the computing resources are available and allocated, a command line prompt is returned on a computing node and the user can freely dispose of the resources now available to him.&lt;br /&gt;
{|style=&amp;quot;background:#deffee; width:100%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;padding:5px; background:#cef2e0; text-align:left&amp;quot;|&lt;br /&gt;
[[Image:Attention.svg|center|25px]]&lt;br /&gt;
|style=&amp;quot;padding:5px; background:#cef2e0; text-align:left&amp;quot;|&lt;br /&gt;
&#039;&#039;&#039;Please remember:&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Heavy computations are not allowed on the login nodes&#039;&#039;&#039;.&amp;lt;br&amp;gt;Use a developement or a regular job queue instead! Please refer to [[BwUniCluster3.0/Login#Allowed_Activities_on_Login_Nodes|Allowed Activities on Login Nodes]].&lt;br /&gt;
* &#039;&#039;&#039;Development queues&#039;&#039;&#039; are meant for &#039;&#039;&#039;development tasks&#039;&#039;&#039;.&amp;lt;br&amp;gt;Do not misuse this queue for regular, short-running jobs or chain jobs! Only one running job at a time is enabled. Maximum queue length is reduced to 3.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Queues on bwUniCluster 3.0 = &lt;br /&gt;
== Policy ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Regular Queues ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
! style=&amp;quot;width:5%&amp;quot;| Queue&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Node-Type&lt;br /&gt;
! style=&amp;quot;width:23%&amp;quot;| Default Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Minimal Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Maximum Resources&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;cpu_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Ice Lake&lt;br /&gt;
| mem-per-cpu=1950mb&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=30, mem=249600mb, ntasks-per-node=64, (threads-per-core=2) &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;cpu&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Standard&lt;br /&gt;
| mem-per-cpu=1125mb&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=20, mem=380000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;highmem&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;High Memory&lt;br /&gt;
| mem-per-cpu=1125mb&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=4, mem=2300000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;gpu_h100&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;NVIDIA GPU x4&lt;br /&gt;
| mem-per-cpu=1125mb&amp;lt;br/&amp;gt;cpus-per-gpu=24&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=12, mem=760000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;gpu_mi300&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU node&amp;lt;br/&amp;gt;AMD GPU x4&lt;br /&gt;
| mem-per-cpu=1125mb&amp;lt;br/&amp;gt;cpus-per-gpu=24&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=1, mem=510000mb, ntasks-per-node=40, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;gpu_a100_il&amp;lt;/code&amp;gt;/&amp;lt;code&amp;gt;gpu_h100_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;Ice Lake&amp;lt;br/&amp;gt;NVIDIA GPU x4&lt;br /&gt;
| mem-per-gpu=127500mb&amp;lt;br/&amp;gt;cpus-per-gpu=16&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=9, mem=510000mb, ntasks-per-node=64, (threads-per-core=2) &lt;br /&gt;
|}&lt;br /&gt;
Table 1: Regular Queues&lt;br /&gt;
&lt;br /&gt;
== Development Queues ==&lt;br /&gt;
Only for development, i.e. debugging or performance optimization ...&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
! style=&amp;quot;width:5%&amp;quot;| Queue&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Node Type&lt;br /&gt;
! style=&amp;quot;width:23%&amp;quot;| Default Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Minimal Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Maximum Resources&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_cpu_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Ice Lake&lt;br /&gt;
| mem-per-cpu=1950mb&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=8, mem=249600mb, ntasks-per-node=64, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_cpu&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Standard&lt;br /&gt;
| mem-per-cpu=1125mb&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=180000mb, ntasks-per-node=40, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_highmem&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;High Memory&lt;br /&gt;
| mem-per-cpu=1125mb&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=180000mb, ntasks-per-node=40, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_gpu_h100&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;NVIDIA GPU x4&lt;br /&gt;
| mem-per-cpu=1125mb&amp;lt;br/&amp;gt;cpus-per-gpu=24&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=180000mb, ntasks-per-node=40, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_gpu_a100_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;NVIDIA GPU x4&amp;lt;br/&amp;gt;&lt;br /&gt;
| mem-per-gpu=127500mb&amp;lt;br/&amp;gt;cpus-per-gpu=16 &lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=510000mb, ntasks-per-node=64, (threads-per-core=2) &lt;br /&gt;
|}&lt;br /&gt;
Table 2: Development Queues&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Default resources of a queue class defines time, #tasks and memory if not explicitly given with sbatch command. Resource list acronyms &#039;&#039;--time&#039;&#039;, &#039;&#039;--ntasks&#039;&#039;, &#039;&#039;--nodes&#039;&#039;, &#039;&#039;--mem&#039;&#039; and &#039;&#039;--mem-per-cpu&#039;&#039; are described [[BwUniCluster_3.0_Slurm_common_Features|here]].&lt;br /&gt;
&lt;br /&gt;
== Check available resources ==&lt;br /&gt;
The Slurm command sinfo is used to view partition and node information for a system running Slurm. It incorporates down time, reservations, and node state information in determining the available backfill window. The sinfo command can only be used by the administrator.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
SCC has prepared a special script (sinfo_t_idle) to find out how many processors are available for immediate use on the system. It is anticipated that users will use this information to submit jobs that meet these criteria and thus obtain quick job turnaround times. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The following command displays what resources are available for immediate use for the whole partition.&lt;br /&gt;
&amp;lt;pre&amp;gt;$ sinfo_t_idle&lt;br /&gt;
Partition dev_cpu                 :      2 nodes idle&lt;br /&gt;
Partition cpu                     :     68 nodes idle&lt;br /&gt;
Partition highmem                 :      4 nodes idle&lt;br /&gt;
Partition dev_gpu_h100            :      0 nodes idle&lt;br /&gt;
Partition gpu_h100                :     11 nodes idle&lt;br /&gt;
Partition gpu_mi300               :      1 nodes idle&lt;br /&gt;
Partition dev_cpu_il              :      0 nodes idle&lt;br /&gt;
Partition cpu_il                  :      0 nodes idle&lt;br /&gt;
Partition dev_gpu_a100_il         :      0 nodes idle&lt;br /&gt;
Partition gpu_a100_il             :      0 nodes idle&lt;br /&gt;
Partition gpu_h100_il             :      0 nodes idle&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Running Jobs =&lt;br /&gt;
&lt;br /&gt;
== Slurm Commands (excerpt) ==&lt;br /&gt;
Important Slurm commands for non-administrators working on bwUniCluster 3.0.&lt;br /&gt;
{| width=850px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Slurm commands !! Brief explanation&lt;br /&gt;
|-&lt;br /&gt;
| [[#Job submission : sbatch|sbatch]] || Submits a job and puts it into the queue [[https://slurm.schedmd.com/sbatch.html sbatch]] &lt;br /&gt;
|-&lt;br /&gt;
| [[#Interactive job : salloc|salloc]] || Requests resources for an interactive Job [[https://slurm.schedmd.com/salloc.html salloc]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Detailed job information : scontrol show job|scontrol show job]] || Displays detailed job state information [[https://slurm.schedmd.com/scontrol.html scontrol]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#List of your submitted jo/bs : squeue|squeue]] || Displays information about active, eligible, blocked, and/or recently completed jobs [[https://slurm.schedmd.com/squeue.html squeue]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Start time of job or resources : squeue|squeue --start]] || Returns start time of submitted job [[https://slurm.schedmd.com/squeue.html squeue]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Shows free resources : sinfo_t_idle|sinfo_t_idle]] || Shows what resources are available for immediate use [[https://slurm.schedmd.com/sinfo.html sinfo]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Canceling own jobs : scancel|scancel]] || Cancels a job [[https://slurm.schedmd.com/scancel.html scancel]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* [https://slurm.schedmd.com/tutorials.html  Slurm Tutorials]&lt;br /&gt;
* [https://slurm.schedmd.com/pdfs/summary.pdf  Slurm command/option summary (2 pages)]&lt;br /&gt;
* [https://slurm.schedmd.com/man_index.html  Slurm Commands]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Batch Jobs: sbatch ==&lt;br /&gt;
&lt;br /&gt;
Batch jobs are submitted by using the command &#039;&#039;&#039;sbatch&#039;&#039;&#039;. The main purpose of the &#039;&#039;&#039;sbatch&#039;&#039;&#039; command is to specify the resources that are needed to run the job. &#039;&#039;&#039;sbatch&#039;&#039;&#039; will then queue the batch job. However, starting of batch job depends on the availability of the requested resources and the fair sharing value.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To run your batch job on one of the cpu nodes, please use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sbatch --partition=dev_cpu&lt;br /&gt;
     or &lt;br /&gt;
$ sbatch -p dev_cpu&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Command parameters sbatch ===&lt;br /&gt;
The syntax and use of &#039;&#039;&#039;sbatch&#039;&#039;&#039; can be displayed via:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ man sbatch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;sbatch&#039;&#039;&#039; options can be used from the command line or in your job script. Different defaults for some of these options are set based on the queue and can be found [https://wiki.bwhpc.de/e/BwUniCluster3.0/Batch_Queues#sbatch_-p_queue here]&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | sbatch Options&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width:8%&amp;quot;| Command line&lt;br /&gt;
! style=&amp;quot;width:9%&amp;quot;| Script&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Purpose&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -t, --time=&#039;&#039;time&#039;&#039;&lt;br /&gt;
| #SBATCH --time=&#039;&#039;time&#039;&#039;&lt;br /&gt;
| Wall clock time limit.&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -N, --nodes=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --nodes=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of nodes to be used.&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -n, --ntasks=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --ntasks=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of tasks to be launched.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --ntasks-per-node=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --ntasks-per-node=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Maximum count of tasks per node.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -c, --cpus-per-task=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --cpus-per-task=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of CPUs required per (MPI-)task.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mem=&#039;&#039;value_in_MB&#039;&#039;&lt;br /&gt;
| #SBATCH --mem=&#039;&#039;value_in_MB&#039;&#039; &lt;br /&gt;
| Memory in MegaByte per node. (You should omit the setting of this option.)&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mem-per-cpu=&#039;&#039;value_in_MB&#039;&#039;&lt;br /&gt;
| #SBATCH --mem-per-cpu=&#039;&#039;value_in_MB&#039;&#039; &lt;br /&gt;
| Minimum Memory required per allocated CPU. (You should omit the setting of this option.)&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mail-type=&#039;&#039;type&#039;&#039;&lt;br /&gt;
| #SBATCH --mail-type=&#039;&#039;type&#039;&#039;&lt;br /&gt;
| Notify user by email when certain event types occur.&amp;lt;br&amp;gt;Valid type values are NONE, BEGIN, END, FAIL, REQUEUE, ALL.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mail-user=&#039;&#039;mail-address&#039;&#039;&lt;br /&gt;
| #SBATCH --mail-user=&#039;&#039;mail-address&#039;&#039;&lt;br /&gt;
|  The specified mail-address receives email notification of state changes as defined by --mail-type.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --output=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --output=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| File in which job output is stored. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --error=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --error=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| File in which job error messages are stored. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -J, --job-name=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --job-name=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| Job name.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --export=[ALL,] &#039;&#039;env-variables&#039;&#039;&lt;br /&gt;
| #SBATCH --export=[ALL,] &#039;&#039;env-variables&#039;&#039;&lt;br /&gt;
| Identifies which environment variables from the submission environment are propagated to the launched application. Default is ALL.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -A, --account=&#039;&#039;group-name&#039;&#039;&lt;br /&gt;
| #SBATCH --account=&#039;&#039;group-name&#039;&#039;&lt;br /&gt;
| Change resources used by this job to specified group. You may need this option if your account is assigned to more than one group. By command &amp;quot;scontrol show job&amp;quot; the project group the job is accounted on can be seen behind &amp;quot;Account=&amp;quot;. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -p, --partition=&#039;&#039;queue-name&#039;&#039;&lt;br /&gt;
| #SBATCH --partition=&#039;&#039;queue-name&#039;&#039;&lt;br /&gt;
| Request a specific queue for the resource allocation.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --reservation=&#039;&#039;reservation-name&#039;&#039;&lt;br /&gt;
| #SBATCH --reservation=&#039;&#039;reservation-name&#039;&#039;&lt;br /&gt;
| Use a specific reservation for the resource allocation.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -C, --constraint=&#039;&#039;LSDF&#039;&#039;&lt;br /&gt;
| #SBATCH --constraint=LSDF&lt;br /&gt;
| Job constraint LSDF filesystems.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -C, --constraint=&#039;&#039;BEEOND (BEEOND_4MDS, BEEOND_MAXMDS)&#039;&#039;&lt;br /&gt;
| #SBATCH --constraint=BEEOND (BEEOND_4MDS, BEEOND_MAXMDS)&lt;br /&gt;
| Job constraint BeeOND filesystem.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Interactive Jobs: salloc ==&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 3.0 you are only allowed to run short jobs (&amp;lt;&amp;lt; 1 hour) with little memory requirements (&amp;lt;&amp;lt; 8 GByte) on the logins nodes. If you want to run longer jobs and/or jobs with a request of more than 8 GByte of memory, you must allocate resources for so-called interactive jobs by usage of the command salloc on a login node. Considering a serial application running on a compute node that requires 5000 MByte of memory and limiting the interactive run to 2 hours the following command has to be executed:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ salloc -p cpu -n 1 -t 120 --mem=5000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then you will get one core on a compute node within the partition &amp;quot;cpu&amp;quot;. After execution of this command &#039;&#039;&#039;DO NOT CLOSE&#039;&#039;&#039; your current terminal session but wait until the queueing system Slurm has granted you the requested resources on the compute system. You will be logged in automatically on the granted core! To run a serial program on the granted core you only have to type the name of the executable.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./&amp;lt;my_serial_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please be aware that your serial job must run less than 2 hours in this example, else the job will be killed during runtime by the system. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can also start now a graphical X11-terminal connecting you to the dedicated resource that is available for 2 hours. You can start it by the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ xterm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that, once the walltime limit has been reached the resources - i.e. the compute node - will automatically be revoked.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
An interactive parallel application running on one compute node or on many compute nodes (e.g. here 5 nodes) with 96 cores each requires usually an amount of memory in GByte (e.g. 50 GByte) and a maximum time (e.g. 1 hour). E.g. 5 nodes can be allocated by the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ salloc -p cpu -N 5 --ntasks-per-node=96 -t 01:00:00  --mem=50gb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you can run parallel jobs on 480 cores requiring 50 GByte of memory per node. Please be aware that you will be logged in on core 0 of the first node.&lt;br /&gt;
If you want to have access to another node you have to open a new terminal, connect it also to bwUniCluster 3.0 and type the following commands to&lt;br /&gt;
connect to the running interactive job and then to a specific node:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ srun --jobid=XXXXXXXX --pty /bin/bash&lt;br /&gt;
$ srun --nodelist=uc3nXXX --pty /bin/bash&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ squeue&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the jobid and the nodelist can be shown.&lt;br /&gt;
&lt;br /&gt;
If you want to run MPI-programs, you can do it by simply typing mpirun &amp;lt;program_name&amp;gt;. Then your program will be run on 480 cores. A very simple example for starting a parallel job can be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mpirun &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also start the debugger ddt by the commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module add devel/ddt&lt;br /&gt;
$ ddt &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above commands will execute the parallel program &amp;lt;my_mpi_program&amp;gt; on all available cores. You can also start parallel programs on a subset of cores; an example for this can be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mpirun -n 50 &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are using Intel MPI you must start &amp;lt;my_mpi_program&amp;gt; by the command mpiexec.hydra (instead of mpirun).&lt;br /&gt;
&lt;br /&gt;
== Interactive Computing with Jupyter ==&lt;br /&gt;
&lt;br /&gt;
== Monitor and manage jobs ==&lt;br /&gt;
scontrol show job displays detailed job state information and diagnostic output for all or a specified job of yours. Detailed information is available for active, pending and recently completed jobs. The command scontrol is explained in detail on the webpage https://slurm.schedmd.com/scontrol.html or via manpage (man scontrol). &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Display the state of all your jobs in normal mode: scontrol show job&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Display the state of a job with &amp;lt;jobid&amp;gt; in normal mode: scontrol show job &amp;lt;jobid&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Here is an example from bwUniCluster 3.0.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ squeue&lt;br /&gt;
JOBID PARTITION     NAME     USER ST       TIME  NODES NODELIST(REASON)&lt;br /&gt;
1262       cpu     wrap ka_zs040  R       1:12      1 uc3n002&lt;br /&gt;
&lt;br /&gt;
$&lt;br /&gt;
$ # now, see what&#039;s up with my pending job with jobid 1262&lt;br /&gt;
$ &lt;br /&gt;
$ scontrol show job 1262&lt;br /&gt;
&lt;br /&gt;
JobId=1262 JobName=wrap&lt;br /&gt;
   UserId=ka_zs0402(241992) GroupId=ka_scc(12345) MCS_label=N/A&lt;br /&gt;
   Priority=4246 Nice=0 Account=ka QOS=normal&lt;br /&gt;
   JobState=RUNNING Reason=None Dependency=(null)&lt;br /&gt;
   Requeue=1 Restarts=0 BatchFlag=1 Reboot=0 ExitCode=0:0&lt;br /&gt;
   RunTime=00:00:37 TimeLimit=00:20:00 TimeMin=N/A&lt;br /&gt;
   SubmitTime=2025-04-04T10:01:30 EligibleTime=2025-04-04T10:01:30&lt;br /&gt;
   AccrueTime=2025-04-04T10:01:30&lt;br /&gt;
   StartTime=2025-04-04T10:01:31 EndTime=2025-04-04T10:21:31 Deadline=N/A&lt;br /&gt;
   SuspendTime=None SecsPreSuspend=0 LastSchedEval=2025-04-04T10:01:31 Scheduler=Main&lt;br /&gt;
   Partition=cpu AllocNode:Sid=uc3n999:2819841&lt;br /&gt;
   ReqNodeList=(null) ExcNodeList=(null)&lt;br /&gt;
   NodeList=uc3n002&lt;br /&gt;
   BatchHost=uc3n002&lt;br /&gt;
   NumNodes=1 NumCPUs=2 NumTasks=1 CPUs/Task=1 ReqB:S:C:T=0:0:*:*&lt;br /&gt;
   ReqTRES=cpu=1,mem=2000M,node=1,billing=1&lt;br /&gt;
   AllocTRES=cpu=2,mem=4000M,node=1,billing=2&lt;br /&gt;
   Socks/Node=* NtasksPerN:B:S:C=0:0:*:1 CoreSpec=*&lt;br /&gt;
   MinCPUsNode=1 MinMemoryCPU=2000M MinTmpDiskNode=0&lt;br /&gt;
   Features=(null) DelayBoot=00:00:00&lt;br /&gt;
   OverSubscribe=OK Contiguous=0 Licenses=(null) Network=(null)&lt;br /&gt;
   Command=(null)&lt;br /&gt;
   WorkDir=/pfs/data6/home/ka/ka_scc/ka_zs0402&lt;br /&gt;
   StdErr=/pfs/data6/home/ka/ka_scc/ka_zs0402/slurm-1262.out&lt;br /&gt;
   StdIn=/dev/null&lt;br /&gt;
   StdOut=/pfs/data6/home/ka/ka_scc/ka_zs0402/slurm-1262.out&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Slurm Options =&lt;br /&gt;
&lt;br /&gt;
= Best Practices =&lt;br /&gt;
&lt;br /&gt;
== Step-by-Step example==&lt;br /&gt;
&lt;br /&gt;
== Dos and Don&#039;ts ==&lt;/div&gt;</summary>
		<author><name>P Schuhmacher</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster3.0/Running_Jobs&amp;diff=14640</id>
		<title>BwUniCluster3.0/Running Jobs</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster3.0/Running_Jobs&amp;diff=14640"/>
		<updated>2025-04-04T15:09:01Z</updated>

		<summary type="html">&lt;p&gt;P Schuhmacher: /* Slurm Options */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
= Purpose and function of a queuing system =&lt;br /&gt;
&lt;br /&gt;
General procedure: Hint to [[Running_Calculations | Running Calculations]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Job submission process ==&lt;br /&gt;
&lt;br /&gt;
bwUniCluster 3.0 has installed the workload managing software Slurm. Therefore any job submission by the user is to be executed by commands of the Slurm software. Slurm queues and runs user jobs based on fair sharing policies.&lt;br /&gt;
&lt;br /&gt;
== Slurm ==&lt;br /&gt;
&lt;br /&gt;
HPC Workload Manager on bwUniCluster 3.0 is Slurm.&lt;br /&gt;
Slurm is a cluster management and job scheduling system. Slurm has three key functions. &lt;br /&gt;
* First, it allocates access to resources (compute cores on nodes) to users for some duration of time so they can perform work. &lt;br /&gt;
* it provides a framework for starting, executing, and monitoring work (normally a parallel job) on the set of allocated nodes. &lt;br /&gt;
* it arbitrates contention for resources by managing a queue of pending work.&lt;br /&gt;
&lt;br /&gt;
Any kind of calculation on the compute nodes of bwUniCluster 3.0 requires the user to define calculations as a sequence of commands together with required run time, number of CPU cores and main memory and submit all, i.e., the &#039;&#039;&#039;batch job&#039;&#039;&#039;, to a resource and workload managing software. &lt;br /&gt;
== Terms and definitions ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Partitions &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Slurm manages job queues for different &#039;&#039;&#039;partitions&#039;&#039;&#039;. Partitions are used to group similar node types (e.g. nodes with and without accelerators) and to enforce different access policies and resource limits.&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 3.0 there are different partitions:&lt;br /&gt;
&lt;br /&gt;
* CPU-only nodes&lt;br /&gt;
** 2-socket nodes, consisting of 2 Intel Ice Lake processors with 32 cores each or 2 AMD processors with 48 cores each&lt;br /&gt;
** 2-socket nodes with very high RAM capacity, consisting of 2 AMD processors with 48 cores each&lt;br /&gt;
* GPU-accelerated nodes&lt;br /&gt;
** 2-socket nodes with 4x NVIDIA A100 or 4x NVIDIA H100 GPUs&lt;br /&gt;
** 4-socket node with 4x AMD Instinct accelerator&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Queues &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Job &#039;&#039;&#039;queues&#039;&#039;&#039; are used to manage jobs that request access to shared but limited computing resources of a certain kind (partition).&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 3.0 there are different main types of queues:&lt;br /&gt;
* Regular queues&lt;br /&gt;
** cpu: Jobs that request CPU-only nodes.&lt;br /&gt;
** gpu: Jobs that request GPU-accelerated nodes.&lt;br /&gt;
* Development queues (dev)&lt;br /&gt;
** Short, usually interactive jobs that are used for developing, compiling and testing code and workflows. The intention behind development queues is to provide users with immediate access to computer resources without having to wait. This is the place to realize instantaneous heavy compute without affecting other users, as would be the case on the login nodes.&lt;br /&gt;
&lt;br /&gt;
Requested compute resources such as (wall-)time, number of nodes and amount of memory are restricted and must fit into the boundaries imposed by the queues. The request for compute resources on the bwUniCluster 3.0 &amp;lt;font color=red&amp;gt;requires at least the specification of the &#039;&#039;&#039;queue&#039;&#039;&#039; and the &#039;&#039;&#039;time&#039;&#039;&#039;&amp;lt;/font&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Jobs &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Jobs can be run non-interactively as &#039;&#039;&#039;batch jobs&#039;&#039;&#039; or as &#039;&#039;&#039;interactive jobs&#039;&#039;&#039;.&lt;br /&gt;
Submitting a batch job means, that all steps of a compute project are defined in a Bash script. This Bash script is queued and executed as soon as the compute resources are available and allocated. Jobs are enqueued with the &#039;&#039;sbatch&#039;&#039; command.&lt;br /&gt;
&lt;br /&gt;
For interactive jobs, the resources are requested with the &#039;&#039;salloc&#039;&#039; command. As soon as the computing resources are available and allocated, a command line prompt is returned on a computing node and the user can freely dispose of the resources now available to him.&lt;br /&gt;
{|style=&amp;quot;background:#deffee; width:100%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;padding:5px; background:#cef2e0; text-align:left&amp;quot;|&lt;br /&gt;
[[Image:Attention.svg|center|25px]]&lt;br /&gt;
|style=&amp;quot;padding:5px; background:#cef2e0; text-align:left&amp;quot;|&lt;br /&gt;
&#039;&#039;&#039;Please remember:&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Heavy computations are not allowed on the login nodes&#039;&#039;&#039;.&amp;lt;br&amp;gt;Use a developement or a regular job queue instead! Please refer to [[BwUniCluster3.0/Login#Allowed_Activities_on_Login_Nodes|Allowed Activities on Login Nodes]].&lt;br /&gt;
* &#039;&#039;&#039;Development queues&#039;&#039;&#039; are meant for &#039;&#039;&#039;development tasks&#039;&#039;&#039;.&amp;lt;br&amp;gt;Do not misuse this queue for regular, short-running jobs or chain jobs! Only one running job at a time is enabled. Maximum queue length is reduced to 3.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Queues on bwUniCluster 3.0 = &lt;br /&gt;
== Policy ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Regular Queues ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
! style=&amp;quot;width:5%&amp;quot;| Queue&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Node-Type&lt;br /&gt;
! style=&amp;quot;width:23%&amp;quot;| Default Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Minimal Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Maximum Resources&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;cpu_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Ice Lake&lt;br /&gt;
| mem-per-cpu=1950mb&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=30, mem=249600mb, ntasks-per-node=64, (threads-per-core=2) &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;cpu&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Standard&lt;br /&gt;
| mem-per-cpu=1125mb&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=20, mem=380000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;highmem&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;High Memory&lt;br /&gt;
| mem-per-cpu=1125mb&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=4, mem=2300000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;gpu_h100&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;NVIDIA GPU x4&lt;br /&gt;
| mem-per-cpu=1125mb&amp;lt;br/&amp;gt;cpus-per-gpu=24&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=12, mem=760000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;gpu_mi300&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU node&amp;lt;br/&amp;gt;AMD GPU x4&lt;br /&gt;
| mem-per-cpu=1125mb&amp;lt;br/&amp;gt;cpus-per-gpu=24&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=1, mem=510000mb, ntasks-per-node=40, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;gpu_a100_il&amp;lt;/code&amp;gt;/&amp;lt;code&amp;gt;gpu_h100_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;Ice Lake&amp;lt;br/&amp;gt;NVIDIA GPU x4&lt;br /&gt;
| mem-per-gpu=127500mb&amp;lt;br/&amp;gt;cpus-per-gpu=16&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=9, mem=510000mb, ntasks-per-node=64, (threads-per-core=2) &lt;br /&gt;
|}&lt;br /&gt;
Table 1: Regular Queues&lt;br /&gt;
&lt;br /&gt;
== Development Queues ==&lt;br /&gt;
Only for development, i.e. debugging or performance optimization ...&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
! style=&amp;quot;width:5%&amp;quot;| Queue&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Node Type&lt;br /&gt;
! style=&amp;quot;width:23%&amp;quot;| Default Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Minimal Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Maximum Resources&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_cpu_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Ice Lake&lt;br /&gt;
| mem-per-cpu=1950mb&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=8, mem=249600mb, ntasks-per-node=64, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_cpu&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Standard&lt;br /&gt;
| mem-per-cpu=1125mb&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=180000mb, ntasks-per-node=40, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_highmem&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;High Memory&lt;br /&gt;
| mem-per-cpu=1125mb&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=180000mb, ntasks-per-node=40, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_gpu_h100&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;NVIDIA GPU x4&lt;br /&gt;
| mem-per-cpu=1125mb&amp;lt;br/&amp;gt;cpus-per-gpu=24&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=180000mb, ntasks-per-node=40, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_gpu_a100_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;NVIDIA GPU x4&amp;lt;br/&amp;gt;&lt;br /&gt;
| mem-per-gpu=127500mb&amp;lt;br/&amp;gt;cpus-per-gpu=16 &lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=510000mb, ntasks-per-node=64, (threads-per-core=2) &lt;br /&gt;
|}&lt;br /&gt;
Table 2: Development Queues&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Default resources of a queue class defines time, #tasks and memory if not explicitly given with sbatch command. Resource list acronyms &#039;&#039;--time&#039;&#039;, &#039;&#039;--ntasks&#039;&#039;, &#039;&#039;--nodes&#039;&#039;, &#039;&#039;--mem&#039;&#039; and &#039;&#039;--mem-per-cpu&#039;&#039; are described [[BwUniCluster_3.0_Slurm_common_Features|here]].&lt;br /&gt;
&lt;br /&gt;
== Check available resources ==&lt;br /&gt;
The Slurm command sinfo is used to view partition and node information for a system running Slurm. It incorporates down time, reservations, and node state information in determining the available backfill window. The sinfo command can only be used by the administrator.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
SCC has prepared a special script (sinfo_t_idle) to find out how many processors are available for immediate use on the system. It is anticipated that users will use this information to submit jobs that meet these criteria and thus obtain quick job turnaround times. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The following command displays what resources are available for immediate use for the whole partition.&lt;br /&gt;
&amp;lt;pre&amp;gt;$ sinfo_t_idle&lt;br /&gt;
Partition dev_cpu                 :      2 nodes idle&lt;br /&gt;
Partition cpu                     :     68 nodes idle&lt;br /&gt;
Partition highmem                 :      4 nodes idle&lt;br /&gt;
Partition dev_gpu_h100            :      0 nodes idle&lt;br /&gt;
Partition gpu_h100                :     11 nodes idle&lt;br /&gt;
Partition gpu_mi300               :      1 nodes idle&lt;br /&gt;
Partition dev_cpu_il              :      0 nodes idle&lt;br /&gt;
Partition cpu_il                  :      0 nodes idle&lt;br /&gt;
Partition dev_gpu_a100_il         :      0 nodes idle&lt;br /&gt;
Partition gpu_a100_il             :      0 nodes idle&lt;br /&gt;
Partition gpu_h100_il             :      0 nodes idle&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Running Jobs =&lt;br /&gt;
== Batch Jobs: sbatch ==&lt;br /&gt;
&lt;br /&gt;
Batch jobs are submitted by using the command &#039;&#039;&#039;sbatch&#039;&#039;&#039;. The main purpose of the &#039;&#039;&#039;sbatch&#039;&#039;&#039; command is to specify the resources that are needed to run the job. &#039;&#039;&#039;sbatch&#039;&#039;&#039; will then queue the batch job. However, starting of batch job depends on the availability of the requested resources and the fair sharing value.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To run your batch job on one of the cpu nodes, please use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sbatch --partition=dev_cpu&lt;br /&gt;
     or &lt;br /&gt;
$ sbatch -p dev_cpu&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Command parameters sbatch ===&lt;br /&gt;
The syntax and use of &#039;&#039;&#039;sbatch&#039;&#039;&#039; can be displayed via:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ man sbatch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;sbatch&#039;&#039;&#039; options can be used from the command line or in your job script. Different defaults for some of these options are set based on the queue and can be found [https://wiki.bwhpc.de/e/BwUniCluster3.0/Batch_Queues#sbatch_-p_queue here]&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | sbatch Options&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width:8%&amp;quot;| Command line&lt;br /&gt;
! style=&amp;quot;width:9%&amp;quot;| Script&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Purpose&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -t, --time=&#039;&#039;time&#039;&#039;&lt;br /&gt;
| #SBATCH --time=&#039;&#039;time&#039;&#039;&lt;br /&gt;
| Wall clock time limit.&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -N, --nodes=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --nodes=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of nodes to be used.&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -n, --ntasks=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --ntasks=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of tasks to be launched.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --ntasks-per-node=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --ntasks-per-node=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Maximum count of tasks per node.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -c, --cpus-per-task=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --cpus-per-task=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of CPUs required per (MPI-)task.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mem=&#039;&#039;value_in_MB&#039;&#039;&lt;br /&gt;
| #SBATCH --mem=&#039;&#039;value_in_MB&#039;&#039; &lt;br /&gt;
| Memory in MegaByte per node. (You should omit the setting of this option.)&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mem-per-cpu=&#039;&#039;value_in_MB&#039;&#039;&lt;br /&gt;
| #SBATCH --mem-per-cpu=&#039;&#039;value_in_MB&#039;&#039; &lt;br /&gt;
| Minimum Memory required per allocated CPU. (You should omit the setting of this option.)&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mail-type=&#039;&#039;type&#039;&#039;&lt;br /&gt;
| #SBATCH --mail-type=&#039;&#039;type&#039;&#039;&lt;br /&gt;
| Notify user by email when certain event types occur.&amp;lt;br&amp;gt;Valid type values are NONE, BEGIN, END, FAIL, REQUEUE, ALL.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mail-user=&#039;&#039;mail-address&#039;&#039;&lt;br /&gt;
| #SBATCH --mail-user=&#039;&#039;mail-address&#039;&#039;&lt;br /&gt;
|  The specified mail-address receives email notification of state changes as defined by --mail-type.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --output=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --output=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| File in which job output is stored. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --error=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --error=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| File in which job error messages are stored. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -J, --job-name=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --job-name=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| Job name.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --export=[ALL,] &#039;&#039;env-variables&#039;&#039;&lt;br /&gt;
| #SBATCH --export=[ALL,] &#039;&#039;env-variables&#039;&#039;&lt;br /&gt;
| Identifies which environment variables from the submission environment are propagated to the launched application. Default is ALL.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -A, --account=&#039;&#039;group-name&#039;&#039;&lt;br /&gt;
| #SBATCH --account=&#039;&#039;group-name&#039;&#039;&lt;br /&gt;
| Change resources used by this job to specified group. You may need this option if your account is assigned to more than one group. By command &amp;quot;scontrol show job&amp;quot; the project group the job is accounted on can be seen behind &amp;quot;Account=&amp;quot;. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -p, --partition=&#039;&#039;queue-name&#039;&#039;&lt;br /&gt;
| #SBATCH --partition=&#039;&#039;queue-name&#039;&#039;&lt;br /&gt;
| Request a specific queue for the resource allocation.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --reservation=&#039;&#039;reservation-name&#039;&#039;&lt;br /&gt;
| #SBATCH --reservation=&#039;&#039;reservation-name&#039;&#039;&lt;br /&gt;
| Use a specific reservation for the resource allocation.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -C, --constraint=&#039;&#039;LSDF&#039;&#039;&lt;br /&gt;
| #SBATCH --constraint=LSDF&lt;br /&gt;
| Job constraint LSDF filesystems.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -C, --constraint=&#039;&#039;BEEOND (BEEOND_4MDS, BEEOND_MAXMDS)&#039;&#039;&lt;br /&gt;
| #SBATCH --constraint=BEEOND (BEEOND_4MDS, BEEOND_MAXMDS)&lt;br /&gt;
| Job constraint BeeOND filesystem.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Interactive Jobs: salloc ==&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 3.0 you are only allowed to run short jobs (&amp;lt;&amp;lt; 1 hour) with little memory requirements (&amp;lt;&amp;lt; 8 GByte) on the logins nodes. If you want to run longer jobs and/or jobs with a request of more than 8 GByte of memory, you must allocate resources for so-called interactive jobs by usage of the command salloc on a login node. Considering a serial application running on a compute node that requires 5000 MByte of memory and limiting the interactive run to 2 hours the following command has to be executed:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ salloc -p cpu -n 1 -t 120 --mem=5000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then you will get one core on a compute node within the partition &amp;quot;cpu&amp;quot;. After execution of this command &#039;&#039;&#039;DO NOT CLOSE&#039;&#039;&#039; your current terminal session but wait until the queueing system Slurm has granted you the requested resources on the compute system. You will be logged in automatically on the granted core! To run a serial program on the granted core you only have to type the name of the executable.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./&amp;lt;my_serial_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please be aware that your serial job must run less than 2 hours in this example, else the job will be killed during runtime by the system. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can also start now a graphical X11-terminal connecting you to the dedicated resource that is available for 2 hours. You can start it by the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ xterm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that, once the walltime limit has been reached the resources - i.e. the compute node - will automatically be revoked.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
An interactive parallel application running on one compute node or on many compute nodes (e.g. here 5 nodes) with 96 cores each requires usually an amount of memory in GByte (e.g. 50 GByte) and a maximum time (e.g. 1 hour). E.g. 5 nodes can be allocated by the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ salloc -p cpu -N 5 --ntasks-per-node=96 -t 01:00:00  --mem=50gb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you can run parallel jobs on 480 cores requiring 50 GByte of memory per node. Please be aware that you will be logged in on core 0 of the first node.&lt;br /&gt;
If you want to have access to another node you have to open a new terminal, connect it also to bwUniCluster 3.0 and type the following commands to&lt;br /&gt;
connect to the running interactive job and then to a specific node:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ srun --jobid=XXXXXXXX --pty /bin/bash&lt;br /&gt;
$ srun --nodelist=uc3nXXX --pty /bin/bash&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ squeue&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the jobid and the nodelist can be shown.&lt;br /&gt;
&lt;br /&gt;
If you want to run MPI-programs, you can do it by simply typing mpirun &amp;lt;program_name&amp;gt;. Then your program will be run on 480 cores. A very simple example for starting a parallel job can be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mpirun &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also start the debugger ddt by the commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module add devel/ddt&lt;br /&gt;
$ ddt &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above commands will execute the parallel program &amp;lt;my_mpi_program&amp;gt; on all available cores. You can also start parallel programs on a subset of cores; an example for this can be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mpirun -n 50 &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are using Intel MPI you must start &amp;lt;my_mpi_program&amp;gt; by the command mpiexec.hydra (instead of mpirun).&lt;br /&gt;
&lt;br /&gt;
== Interactive Computing with Jupyter ==&lt;br /&gt;
&lt;br /&gt;
== Monitor and manage jobs ==&lt;br /&gt;
scontrol show job displays detailed job state information and diagnostic output for all or a specified job of yours. Detailed information is available for active, pending and recently completed jobs. The command scontrol is explained in detail on the webpage https://slurm.schedmd.com/scontrol.html or via manpage (man scontrol). &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Display the state of all your jobs in normal mode: scontrol show job&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Display the state of a job with &amp;lt;jobid&amp;gt; in normal mode: scontrol show job &amp;lt;jobid&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Here is an example from bwUniCluster 3.0.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ squeue&lt;br /&gt;
JOBID PARTITION     NAME     USER ST       TIME  NODES NODELIST(REASON)&lt;br /&gt;
1262       cpu     wrap ka_zs040  R       1:12      1 uc3n002&lt;br /&gt;
&lt;br /&gt;
$&lt;br /&gt;
$ # now, see what&#039;s up with my pending job with jobid 1262&lt;br /&gt;
$ &lt;br /&gt;
$ scontrol show job 1262&lt;br /&gt;
&lt;br /&gt;
JobId=1262 JobName=wrap&lt;br /&gt;
   UserId=ka_zs0402(241992) GroupId=ka_scc(12345) MCS_label=N/A&lt;br /&gt;
   Priority=4246 Nice=0 Account=ka QOS=normal&lt;br /&gt;
   JobState=RUNNING Reason=None Dependency=(null)&lt;br /&gt;
   Requeue=1 Restarts=0 BatchFlag=1 Reboot=0 ExitCode=0:0&lt;br /&gt;
   RunTime=00:00:37 TimeLimit=00:20:00 TimeMin=N/A&lt;br /&gt;
   SubmitTime=2025-04-04T10:01:30 EligibleTime=2025-04-04T10:01:30&lt;br /&gt;
   AccrueTime=2025-04-04T10:01:30&lt;br /&gt;
   StartTime=2025-04-04T10:01:31 EndTime=2025-04-04T10:21:31 Deadline=N/A&lt;br /&gt;
   SuspendTime=None SecsPreSuspend=0 LastSchedEval=2025-04-04T10:01:31 Scheduler=Main&lt;br /&gt;
   Partition=cpu AllocNode:Sid=uc3n999:2819841&lt;br /&gt;
   ReqNodeList=(null) ExcNodeList=(null)&lt;br /&gt;
   NodeList=uc3n002&lt;br /&gt;
   BatchHost=uc3n002&lt;br /&gt;
   NumNodes=1 NumCPUs=2 NumTasks=1 CPUs/Task=1 ReqB:S:C:T=0:0:*:*&lt;br /&gt;
   ReqTRES=cpu=1,mem=2000M,node=1,billing=1&lt;br /&gt;
   AllocTRES=cpu=2,mem=4000M,node=1,billing=2&lt;br /&gt;
   Socks/Node=* NtasksPerN:B:S:C=0:0:*:1 CoreSpec=*&lt;br /&gt;
   MinCPUsNode=1 MinMemoryCPU=2000M MinTmpDiskNode=0&lt;br /&gt;
   Features=(null) DelayBoot=00:00:00&lt;br /&gt;
   OverSubscribe=OK Contiguous=0 Licenses=(null) Network=(null)&lt;br /&gt;
   Command=(null)&lt;br /&gt;
   WorkDir=/pfs/data6/home/ka/ka_scc/ka_zs0402&lt;br /&gt;
   StdErr=/pfs/data6/home/ka/ka_scc/ka_zs0402/slurm-1262.out&lt;br /&gt;
   StdIn=/dev/null&lt;br /&gt;
   StdOut=/pfs/data6/home/ka/ka_scc/ka_zs0402/slurm-1262.out&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Slurm Options =&lt;br /&gt;
&lt;br /&gt;
= Best Practices =&lt;br /&gt;
&lt;br /&gt;
== Step-by-Step example==&lt;br /&gt;
&lt;br /&gt;
== Dos and Don&#039;ts ==&lt;/div&gt;</summary>
		<author><name>P Schuhmacher</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster3.0/Running_Jobs&amp;diff=14639</id>
		<title>BwUniCluster3.0/Running Jobs</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster3.0/Running_Jobs&amp;diff=14639"/>
		<updated>2025-04-04T15:08:08Z</updated>

		<summary type="html">&lt;p&gt;P Schuhmacher: /* Batch Jobs: sbatch */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
= Purpose and function of a queuing system =&lt;br /&gt;
&lt;br /&gt;
General procedure: Hint to [[Running_Calculations | Running Calculations]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Job submission process ==&lt;br /&gt;
&lt;br /&gt;
bwUniCluster 3.0 has installed the workload managing software Slurm. Therefore any job submission by the user is to be executed by commands of the Slurm software. Slurm queues and runs user jobs based on fair sharing policies.&lt;br /&gt;
&lt;br /&gt;
== Slurm ==&lt;br /&gt;
&lt;br /&gt;
HPC Workload Manager on bwUniCluster 3.0 is Slurm.&lt;br /&gt;
Slurm is a cluster management and job scheduling system. Slurm has three key functions. &lt;br /&gt;
* First, it allocates access to resources (compute cores on nodes) to users for some duration of time so they can perform work. &lt;br /&gt;
* it provides a framework for starting, executing, and monitoring work (normally a parallel job) on the set of allocated nodes. &lt;br /&gt;
* it arbitrates contention for resources by managing a queue of pending work.&lt;br /&gt;
&lt;br /&gt;
Any kind of calculation on the compute nodes of bwUniCluster 3.0 requires the user to define calculations as a sequence of commands together with required run time, number of CPU cores and main memory and submit all, i.e., the &#039;&#039;&#039;batch job&#039;&#039;&#039;, to a resource and workload managing software. &lt;br /&gt;
== Terms and definitions ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Partitions &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Slurm manages job queues for different &#039;&#039;&#039;partitions&#039;&#039;&#039;. Partitions are used to group similar node types (e.g. nodes with and without accelerators) and to enforce different access policies and resource limits.&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 3.0 there are different partitions:&lt;br /&gt;
&lt;br /&gt;
* CPU-only nodes&lt;br /&gt;
** 2-socket nodes, consisting of 2 Intel Ice Lake processors with 32 cores each or 2 AMD processors with 48 cores each&lt;br /&gt;
** 2-socket nodes with very high RAM capacity, consisting of 2 AMD processors with 48 cores each&lt;br /&gt;
* GPU-accelerated nodes&lt;br /&gt;
** 2-socket nodes with 4x NVIDIA A100 or 4x NVIDIA H100 GPUs&lt;br /&gt;
** 4-socket node with 4x AMD Instinct accelerator&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Queues &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Job &#039;&#039;&#039;queues&#039;&#039;&#039; are used to manage jobs that request access to shared but limited computing resources of a certain kind (partition).&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 3.0 there are different main types of queues:&lt;br /&gt;
* Regular queues&lt;br /&gt;
** cpu: Jobs that request CPU-only nodes.&lt;br /&gt;
** gpu: Jobs that request GPU-accelerated nodes.&lt;br /&gt;
* Development queues (dev)&lt;br /&gt;
** Short, usually interactive jobs that are used for developing, compiling and testing code and workflows. The intention behind development queues is to provide users with immediate access to computer resources without having to wait. This is the place to realize instantaneous heavy compute without affecting other users, as would be the case on the login nodes.&lt;br /&gt;
&lt;br /&gt;
Requested compute resources such as (wall-)time, number of nodes and amount of memory are restricted and must fit into the boundaries imposed by the queues. The request for compute resources on the bwUniCluster 3.0 &amp;lt;font color=red&amp;gt;requires at least the specification of the &#039;&#039;&#039;queue&#039;&#039;&#039; and the &#039;&#039;&#039;time&#039;&#039;&#039;&amp;lt;/font&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Jobs &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Jobs can be run non-interactively as &#039;&#039;&#039;batch jobs&#039;&#039;&#039; or as &#039;&#039;&#039;interactive jobs&#039;&#039;&#039;.&lt;br /&gt;
Submitting a batch job means, that all steps of a compute project are defined in a Bash script. This Bash script is queued and executed as soon as the compute resources are available and allocated. Jobs are enqueued with the &#039;&#039;sbatch&#039;&#039; command.&lt;br /&gt;
&lt;br /&gt;
For interactive jobs, the resources are requested with the &#039;&#039;salloc&#039;&#039; command. As soon as the computing resources are available and allocated, a command line prompt is returned on a computing node and the user can freely dispose of the resources now available to him.&lt;br /&gt;
{|style=&amp;quot;background:#deffee; width:100%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;padding:5px; background:#cef2e0; text-align:left&amp;quot;|&lt;br /&gt;
[[Image:Attention.svg|center|25px]]&lt;br /&gt;
|style=&amp;quot;padding:5px; background:#cef2e0; text-align:left&amp;quot;|&lt;br /&gt;
&#039;&#039;&#039;Please remember:&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Heavy computations are not allowed on the login nodes&#039;&#039;&#039;.&amp;lt;br&amp;gt;Use a developement or a regular job queue instead! Please refer to [[BwUniCluster3.0/Login#Allowed_Activities_on_Login_Nodes|Allowed Activities on Login Nodes]].&lt;br /&gt;
* &#039;&#039;&#039;Development queues&#039;&#039;&#039; are meant for &#039;&#039;&#039;development tasks&#039;&#039;&#039;.&amp;lt;br&amp;gt;Do not misuse this queue for regular, short-running jobs or chain jobs! Only one running job at a time is enabled. Maximum queue length is reduced to 3.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Queues on bwUniCluster 3.0 = &lt;br /&gt;
== Policy ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Regular Queues ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
! style=&amp;quot;width:5%&amp;quot;| Queue&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Node-Type&lt;br /&gt;
! style=&amp;quot;width:23%&amp;quot;| Default Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Minimal Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Maximum Resources&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;cpu_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Ice Lake&lt;br /&gt;
| mem-per-cpu=1950mb&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=30, mem=249600mb, ntasks-per-node=64, (threads-per-core=2) &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;cpu&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Standard&lt;br /&gt;
| mem-per-cpu=1125mb&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=20, mem=380000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;highmem&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;High Memory&lt;br /&gt;
| mem-per-cpu=1125mb&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=4, mem=2300000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;gpu_h100&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;NVIDIA GPU x4&lt;br /&gt;
| mem-per-cpu=1125mb&amp;lt;br/&amp;gt;cpus-per-gpu=24&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=12, mem=760000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;gpu_mi300&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU node&amp;lt;br/&amp;gt;AMD GPU x4&lt;br /&gt;
| mem-per-cpu=1125mb&amp;lt;br/&amp;gt;cpus-per-gpu=24&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=1, mem=510000mb, ntasks-per-node=40, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;gpu_a100_il&amp;lt;/code&amp;gt;/&amp;lt;code&amp;gt;gpu_h100_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;Ice Lake&amp;lt;br/&amp;gt;NVIDIA GPU x4&lt;br /&gt;
| mem-per-gpu=127500mb&amp;lt;br/&amp;gt;cpus-per-gpu=16&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=9, mem=510000mb, ntasks-per-node=64, (threads-per-core=2) &lt;br /&gt;
|}&lt;br /&gt;
Table 1: Regular Queues&lt;br /&gt;
&lt;br /&gt;
== Development Queues ==&lt;br /&gt;
Only for development, i.e. debugging or performance optimization ...&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
! style=&amp;quot;width:5%&amp;quot;| Queue&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Node Type&lt;br /&gt;
! style=&amp;quot;width:23%&amp;quot;| Default Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Minimal Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Maximum Resources&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_cpu_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Ice Lake&lt;br /&gt;
| mem-per-cpu=1950mb&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=8, mem=249600mb, ntasks-per-node=64, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_cpu&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Standard&lt;br /&gt;
| mem-per-cpu=1125mb&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=180000mb, ntasks-per-node=40, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_highmem&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;High Memory&lt;br /&gt;
| mem-per-cpu=1125mb&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=180000mb, ntasks-per-node=40, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_gpu_h100&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;NVIDIA GPU x4&lt;br /&gt;
| mem-per-cpu=1125mb&amp;lt;br/&amp;gt;cpus-per-gpu=24&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=180000mb, ntasks-per-node=40, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_gpu_a100_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;NVIDIA GPU x4&amp;lt;br/&amp;gt;&lt;br /&gt;
| mem-per-gpu=127500mb&amp;lt;br/&amp;gt;cpus-per-gpu=16 &lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=510000mb, ntasks-per-node=64, (threads-per-core=2) &lt;br /&gt;
|}&lt;br /&gt;
Table 2: Development Queues&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Default resources of a queue class defines time, #tasks and memory if not explicitly given with sbatch command. Resource list acronyms &#039;&#039;--time&#039;&#039;, &#039;&#039;--ntasks&#039;&#039;, &#039;&#039;--nodes&#039;&#039;, &#039;&#039;--mem&#039;&#039; and &#039;&#039;--mem-per-cpu&#039;&#039; are described [[BwUniCluster_3.0_Slurm_common_Features|here]].&lt;br /&gt;
&lt;br /&gt;
== Check available resources ==&lt;br /&gt;
The Slurm command sinfo is used to view partition and node information for a system running Slurm. It incorporates down time, reservations, and node state information in determining the available backfill window. The sinfo command can only be used by the administrator.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
SCC has prepared a special script (sinfo_t_idle) to find out how many processors are available for immediate use on the system. It is anticipated that users will use this information to submit jobs that meet these criteria and thus obtain quick job turnaround times. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The following command displays what resources are available for immediate use for the whole partition.&lt;br /&gt;
&amp;lt;pre&amp;gt;$ sinfo_t_idle&lt;br /&gt;
Partition dev_cpu                 :      2 nodes idle&lt;br /&gt;
Partition cpu                     :     68 nodes idle&lt;br /&gt;
Partition highmem                 :      4 nodes idle&lt;br /&gt;
Partition dev_gpu_h100            :      0 nodes idle&lt;br /&gt;
Partition gpu_h100                :     11 nodes idle&lt;br /&gt;
Partition gpu_mi300               :      1 nodes idle&lt;br /&gt;
Partition dev_cpu_il              :      0 nodes idle&lt;br /&gt;
Partition cpu_il                  :      0 nodes idle&lt;br /&gt;
Partition dev_gpu_a100_il         :      0 nodes idle&lt;br /&gt;
Partition gpu_a100_il             :      0 nodes idle&lt;br /&gt;
Partition gpu_h100_il             :      0 nodes idle&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Running Jobs =&lt;br /&gt;
== Batch Jobs: sbatch ==&lt;br /&gt;
&lt;br /&gt;
Batch jobs are submitted by using the command &#039;&#039;&#039;sbatch&#039;&#039;&#039;. The main purpose of the &#039;&#039;&#039;sbatch&#039;&#039;&#039; command is to specify the resources that are needed to run the job. &#039;&#039;&#039;sbatch&#039;&#039;&#039; will then queue the batch job. However, starting of batch job depends on the availability of the requested resources and the fair sharing value.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To run your batch job on one of the cpu nodes, please use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sbatch --partition=dev_cpu&lt;br /&gt;
     or &lt;br /&gt;
$ sbatch -p dev_cpu&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Command parameters sbatch ===&lt;br /&gt;
The syntax and use of &#039;&#039;&#039;sbatch&#039;&#039;&#039; can be displayed via:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ man sbatch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;sbatch&#039;&#039;&#039; options can be used from the command line or in your job script. Different defaults for some of these options are set based on the queue and can be found [https://wiki.bwhpc.de/e/BwUniCluster3.0/Batch_Queues#sbatch_-p_queue here]&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | sbatch Options&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width:8%&amp;quot;| Command line&lt;br /&gt;
! style=&amp;quot;width:9%&amp;quot;| Script&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Purpose&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -t, --time=&#039;&#039;time&#039;&#039;&lt;br /&gt;
| #SBATCH --time=&#039;&#039;time&#039;&#039;&lt;br /&gt;
| Wall clock time limit.&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -N, --nodes=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --nodes=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of nodes to be used.&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -n, --ntasks=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --ntasks=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of tasks to be launched.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --ntasks-per-node=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --ntasks-per-node=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Maximum count of tasks per node.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -c, --cpus-per-task=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --cpus-per-task=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of CPUs required per (MPI-)task.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mem=&#039;&#039;value_in_MB&#039;&#039;&lt;br /&gt;
| #SBATCH --mem=&#039;&#039;value_in_MB&#039;&#039; &lt;br /&gt;
| Memory in MegaByte per node. (You should omit the setting of this option.)&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mem-per-cpu=&#039;&#039;value_in_MB&#039;&#039;&lt;br /&gt;
| #SBATCH --mem-per-cpu=&#039;&#039;value_in_MB&#039;&#039; &lt;br /&gt;
| Minimum Memory required per allocated CPU. (You should omit the setting of this option.)&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mail-type=&#039;&#039;type&#039;&#039;&lt;br /&gt;
| #SBATCH --mail-type=&#039;&#039;type&#039;&#039;&lt;br /&gt;
| Notify user by email when certain event types occur.&amp;lt;br&amp;gt;Valid type values are NONE, BEGIN, END, FAIL, REQUEUE, ALL.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mail-user=&#039;&#039;mail-address&#039;&#039;&lt;br /&gt;
| #SBATCH --mail-user=&#039;&#039;mail-address&#039;&#039;&lt;br /&gt;
|  The specified mail-address receives email notification of state changes as defined by --mail-type.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --output=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --output=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| File in which job output is stored. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --error=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --error=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| File in which job error messages are stored. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -J, --job-name=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --job-name=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| Job name.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --export=[ALL,] &#039;&#039;env-variables&#039;&#039;&lt;br /&gt;
| #SBATCH --export=[ALL,] &#039;&#039;env-variables&#039;&#039;&lt;br /&gt;
| Identifies which environment variables from the submission environment are propagated to the launched application. Default is ALL.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -A, --account=&#039;&#039;group-name&#039;&#039;&lt;br /&gt;
| #SBATCH --account=&#039;&#039;group-name&#039;&#039;&lt;br /&gt;
| Change resources used by this job to specified group. You may need this option if your account is assigned to more than one group. By command &amp;quot;scontrol show job&amp;quot; the project group the job is accounted on can be seen behind &amp;quot;Account=&amp;quot;. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -p, --partition=&#039;&#039;queue-name&#039;&#039;&lt;br /&gt;
| #SBATCH --partition=&#039;&#039;queue-name&#039;&#039;&lt;br /&gt;
| Request a specific queue for the resource allocation.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --reservation=&#039;&#039;reservation-name&#039;&#039;&lt;br /&gt;
| #SBATCH --reservation=&#039;&#039;reservation-name&#039;&#039;&lt;br /&gt;
| Use a specific reservation for the resource allocation.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -C, --constraint=&#039;&#039;LSDF&#039;&#039;&lt;br /&gt;
| #SBATCH --constraint=LSDF&lt;br /&gt;
| Job constraint LSDF filesystems.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -C, --constraint=&#039;&#039;BEEOND (BEEOND_4MDS, BEEOND_MAXMDS)&#039;&#039;&lt;br /&gt;
| #SBATCH --constraint=BEEOND (BEEOND_4MDS, BEEOND_MAXMDS)&lt;br /&gt;
| Job constraint BeeOND filesystem.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Interactive Jobs: salloc ==&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 3.0 you are only allowed to run short jobs (&amp;lt;&amp;lt; 1 hour) with little memory requirements (&amp;lt;&amp;lt; 8 GByte) on the logins nodes. If you want to run longer jobs and/or jobs with a request of more than 8 GByte of memory, you must allocate resources for so-called interactive jobs by usage of the command salloc on a login node. Considering a serial application running on a compute node that requires 5000 MByte of memory and limiting the interactive run to 2 hours the following command has to be executed:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ salloc -p cpu -n 1 -t 120 --mem=5000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then you will get one core on a compute node within the partition &amp;quot;cpu&amp;quot;. After execution of this command &#039;&#039;&#039;DO NOT CLOSE&#039;&#039;&#039; your current terminal session but wait until the queueing system Slurm has granted you the requested resources on the compute system. You will be logged in automatically on the granted core! To run a serial program on the granted core you only have to type the name of the executable.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./&amp;lt;my_serial_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please be aware that your serial job must run less than 2 hours in this example, else the job will be killed during runtime by the system. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can also start now a graphical X11-terminal connecting you to the dedicated resource that is available for 2 hours. You can start it by the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ xterm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that, once the walltime limit has been reached the resources - i.e. the compute node - will automatically be revoked.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
An interactive parallel application running on one compute node or on many compute nodes (e.g. here 5 nodes) with 96 cores each requires usually an amount of memory in GByte (e.g. 50 GByte) and a maximum time (e.g. 1 hour). E.g. 5 nodes can be allocated by the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ salloc -p cpu -N 5 --ntasks-per-node=96 -t 01:00:00  --mem=50gb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you can run parallel jobs on 480 cores requiring 50 GByte of memory per node. Please be aware that you will be logged in on core 0 of the first node.&lt;br /&gt;
If you want to have access to another node you have to open a new terminal, connect it also to bwUniCluster 3.0 and type the following commands to&lt;br /&gt;
connect to the running interactive job and then to a specific node:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ srun --jobid=XXXXXXXX --pty /bin/bash&lt;br /&gt;
$ srun --nodelist=uc3nXXX --pty /bin/bash&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ squeue&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the jobid and the nodelist can be shown.&lt;br /&gt;
&lt;br /&gt;
If you want to run MPI-programs, you can do it by simply typing mpirun &amp;lt;program_name&amp;gt;. Then your program will be run on 480 cores. A very simple example for starting a parallel job can be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mpirun &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also start the debugger ddt by the commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module add devel/ddt&lt;br /&gt;
$ ddt &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above commands will execute the parallel program &amp;lt;my_mpi_program&amp;gt; on all available cores. You can also start parallel programs on a subset of cores; an example for this can be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mpirun -n 50 &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are using Intel MPI you must start &amp;lt;my_mpi_program&amp;gt; by the command mpiexec.hydra (instead of mpirun).&lt;br /&gt;
&lt;br /&gt;
== Interactive Computing with Jupyter ==&lt;br /&gt;
&lt;br /&gt;
== Monitor and manage jobs ==&lt;br /&gt;
scontrol show job displays detailed job state information and diagnostic output for all or a specified job of yours. Detailed information is available for active, pending and recently completed jobs. The command scontrol is explained in detail on the webpage https://slurm.schedmd.com/scontrol.html or via manpage (man scontrol). &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Display the state of all your jobs in normal mode: scontrol show job&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Display the state of a job with &amp;lt;jobid&amp;gt; in normal mode: scontrol show job &amp;lt;jobid&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Here is an example from bwUniCluster 3.0.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ squeue&lt;br /&gt;
JOBID PARTITION     NAME     USER ST       TIME  NODES NODELIST(REASON)&lt;br /&gt;
1262       cpu     wrap ka_zs040  R       1:12      1 uc3n002&lt;br /&gt;
&lt;br /&gt;
$&lt;br /&gt;
$ # now, see what&#039;s up with my pending job with jobid 1262&lt;br /&gt;
$ &lt;br /&gt;
$ scontrol show job 1262&lt;br /&gt;
&lt;br /&gt;
JobId=1262 JobName=wrap&lt;br /&gt;
   UserId=ka_zs0402(241992) GroupId=ka_scc(12345) MCS_label=N/A&lt;br /&gt;
   Priority=4246 Nice=0 Account=ka QOS=normal&lt;br /&gt;
   JobState=RUNNING Reason=None Dependency=(null)&lt;br /&gt;
   Requeue=1 Restarts=0 BatchFlag=1 Reboot=0 ExitCode=0:0&lt;br /&gt;
   RunTime=00:00:37 TimeLimit=00:20:00 TimeMin=N/A&lt;br /&gt;
   SubmitTime=2025-04-04T10:01:30 EligibleTime=2025-04-04T10:01:30&lt;br /&gt;
   AccrueTime=2025-04-04T10:01:30&lt;br /&gt;
   StartTime=2025-04-04T10:01:31 EndTime=2025-04-04T10:21:31 Deadline=N/A&lt;br /&gt;
   SuspendTime=None SecsPreSuspend=0 LastSchedEval=2025-04-04T10:01:31 Scheduler=Main&lt;br /&gt;
   Partition=cpu AllocNode:Sid=uc3n999:2819841&lt;br /&gt;
   ReqNodeList=(null) ExcNodeList=(null)&lt;br /&gt;
   NodeList=uc3n002&lt;br /&gt;
   BatchHost=uc3n002&lt;br /&gt;
   NumNodes=1 NumCPUs=2 NumTasks=1 CPUs/Task=1 ReqB:S:C:T=0:0:*:*&lt;br /&gt;
   ReqTRES=cpu=1,mem=2000M,node=1,billing=1&lt;br /&gt;
   AllocTRES=cpu=2,mem=4000M,node=1,billing=2&lt;br /&gt;
   Socks/Node=* NtasksPerN:B:S:C=0:0:*:1 CoreSpec=*&lt;br /&gt;
   MinCPUsNode=1 MinMemoryCPU=2000M MinTmpDiskNode=0&lt;br /&gt;
   Features=(null) DelayBoot=00:00:00&lt;br /&gt;
   OverSubscribe=OK Contiguous=0 Licenses=(null) Network=(null)&lt;br /&gt;
   Command=(null)&lt;br /&gt;
   WorkDir=/pfs/data6/home/ka/ka_scc/ka_zs0402&lt;br /&gt;
   StdErr=/pfs/data6/home/ka/ka_scc/ka_zs0402/slurm-1262.out&lt;br /&gt;
   StdIn=/dev/null&lt;br /&gt;
   StdOut=/pfs/data6/home/ka/ka_scc/ka_zs0402/slurm-1262.out&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Slurm Options =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Slurm Commands (excerpt) ==&lt;br /&gt;
Important Slurm commands for non-administrators working on bwUniCluster 3.0.&lt;br /&gt;
{| width=850px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Slurm commands !! Brief explanation&lt;br /&gt;
|-&lt;br /&gt;
| [[#Job submission : sbatch|sbatch]] || Submits a job and puts it into the queue [[https://slurm.schedmd.com/sbatch.html sbatch]] &lt;br /&gt;
|-&lt;br /&gt;
| [[#Interactive job : salloc|salloc]] || Requests resources for an interactive Job [[https://slurm.schedmd.com/salloc.html salloc]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Detailed job information : scontrol show job|scontrol show job]] || Displays detailed job state information [[https://slurm.schedmd.com/scontrol.html scontrol]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#List of your submitted jo/bs : squeue|squeue]] || Displays information about active, eligible, blocked, and/or recently completed jobs [[https://slurm.schedmd.com/squeue.html squeue]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Start time of job or resources : squeue|squeue --start]] || Returns start time of submitted job [[https://slurm.schedmd.com/squeue.html squeue]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Shows free resources : sinfo_t_idle|sinfo_t_idle]] || Shows what resources are available for immediate use [[https://slurm.schedmd.com/sinfo.html sinfo]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Canceling own jobs : scancel|scancel]] || Cancels a job [[https://slurm.schedmd.com/scancel.html scancel]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* [https://slurm.schedmd.com/tutorials.html  Slurm Tutorials]&lt;br /&gt;
* [https://slurm.schedmd.com/pdfs/summary.pdf  Slurm command/option summary (2 pages)]&lt;br /&gt;
* [https://slurm.schedmd.com/man_index.html  Slurm Commands]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Job submission : sbatch ==&lt;br /&gt;
Batch jobs are submitted by using the command &#039;&#039;&#039;sbatch&#039;&#039;&#039;. The main purpose of the &#039;&#039;&#039;sbatch&#039;&#039;&#039; command is to specify the resources that are needed to run the job. &#039;&#039;&#039;sbatch&#039;&#039;&#039; will then queue the batch job. However, starting of batch job depends on the availability of the requested resources and the fair sharing value.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=== Command parameters sbatch ===&lt;br /&gt;
The syntax and use of &#039;&#039;&#039;sbatch&#039;&#039;&#039; can be displayed via:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ man sbatch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;sbatch&#039;&#039;&#039; options can be used from the command line or in your job script. Different defaults for some of these options are set based on the queue and can be found [https://wiki.bwhpc.de/e/BwUniCluster3.0/Batch_Queues#sbatch_-p_queue here]&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | sbatch Options&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width:8%&amp;quot;| Command line&lt;br /&gt;
! style=&amp;quot;width:9%&amp;quot;| Script&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Purpose&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -t, --time=&#039;&#039;time&#039;&#039;&lt;br /&gt;
| #SBATCH --time=&#039;&#039;time&#039;&#039;&lt;br /&gt;
| Wall clock time limit.&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -N, --nodes=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --nodes=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of nodes to be used.&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -n, --ntasks=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --ntasks=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of tasks to be launched.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --ntasks-per-node=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --ntasks-per-node=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Maximum count of tasks per node.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -c, --cpus-per-task=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --cpus-per-task=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of CPUs required per (MPI-)task.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mem=&#039;&#039;value_in_MB&#039;&#039;&lt;br /&gt;
| #SBATCH --mem=&#039;&#039;value_in_MB&#039;&#039; &lt;br /&gt;
| Memory in MegaByte per node. (You should omit the setting of this option.)&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mem-per-cpu=&#039;&#039;value_in_MB&#039;&#039;&lt;br /&gt;
| #SBATCH --mem-per-cpu=&#039;&#039;value_in_MB&#039;&#039; &lt;br /&gt;
| Minimum Memory required per allocated CPU. (You should omit the setting of this option.)&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mail-type=&#039;&#039;type&#039;&#039;&lt;br /&gt;
| #SBATCH --mail-type=&#039;&#039;type&#039;&#039;&lt;br /&gt;
| Notify user by email when certain event types occur.&amp;lt;br&amp;gt;Valid type values are NONE, BEGIN, END, FAIL, REQUEUE, ALL.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mail-user=&#039;&#039;mail-address&#039;&#039;&lt;br /&gt;
| #SBATCH --mail-user=&#039;&#039;mail-address&#039;&#039;&lt;br /&gt;
|  The specified mail-address receives email notification of state changes as defined by --mail-type.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --output=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --output=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| File in which job output is stored. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --error=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --error=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| File in which job error messages are stored. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -J, --job-name=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --job-name=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| Job name.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --export=[ALL,] &#039;&#039;env-variables&#039;&#039;&lt;br /&gt;
| #SBATCH --export=[ALL,] &#039;&#039;env-variables&#039;&#039;&lt;br /&gt;
| Identifies which environment variables from the submission environment are propagated to the launched application. Default is ALL.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -A, --account=&#039;&#039;group-name&#039;&#039;&lt;br /&gt;
| #SBATCH --account=&#039;&#039;group-name&#039;&#039;&lt;br /&gt;
| Change resources used by this job to specified group. You may need this option if your account is assigned to more than one group. By command &amp;quot;scontrol show job&amp;quot; the project group the job is accounted on can be seen behind &amp;quot;Account=&amp;quot;. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -p, --partition=&#039;&#039;queue-name&#039;&#039;&lt;br /&gt;
| #SBATCH --partition=&#039;&#039;queue-name&#039;&#039;&lt;br /&gt;
| Request a specific queue for the resource allocation.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --reservation=&#039;&#039;reservation-name&#039;&#039;&lt;br /&gt;
| #SBATCH --reservation=&#039;&#039;reservation-name&#039;&#039;&lt;br /&gt;
| Use a specific reservation for the resource allocation.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -C, --constraint=&#039;&#039;LSDF&#039;&#039;&lt;br /&gt;
| #SBATCH --constraint=LSDF&lt;br /&gt;
| Job constraint LSDF filesystems.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -C, --constraint=&#039;&#039;BEEOND (BEEOND_4MDS, BEEOND_MAXMDS)&#039;&#039;&lt;br /&gt;
| #SBATCH --constraint=BEEOND (BEEOND_4MDS, BEEOND_MAXMDS)&lt;br /&gt;
| Job constraint BeeOND filesystem.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Best Practices =&lt;br /&gt;
&lt;br /&gt;
== Step-by-Step example==&lt;br /&gt;
&lt;br /&gt;
== Dos and Don&#039;ts ==&lt;/div&gt;</summary>
		<author><name>P Schuhmacher</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster3.0/Running_Jobs&amp;diff=14638</id>
		<title>BwUniCluster3.0/Running Jobs</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster3.0/Running_Jobs&amp;diff=14638"/>
		<updated>2025-04-04T15:05:15Z</updated>

		<summary type="html">&lt;p&gt;P Schuhmacher: /* Monitor and manage jobs */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
= Purpose and function of a queuing system =&lt;br /&gt;
&lt;br /&gt;
General procedure: Hint to [[Running_Calculations | Running Calculations]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Job submission process ==&lt;br /&gt;
&lt;br /&gt;
bwUniCluster 3.0 has installed the workload managing software Slurm. Therefore any job submission by the user is to be executed by commands of the Slurm software. Slurm queues and runs user jobs based on fair sharing policies.&lt;br /&gt;
&lt;br /&gt;
== Slurm ==&lt;br /&gt;
&lt;br /&gt;
HPC Workload Manager on bwUniCluster 3.0 is Slurm.&lt;br /&gt;
Slurm is a cluster management and job scheduling system. Slurm has three key functions. &lt;br /&gt;
* First, it allocates access to resources (compute cores on nodes) to users for some duration of time so they can perform work. &lt;br /&gt;
* it provides a framework for starting, executing, and monitoring work (normally a parallel job) on the set of allocated nodes. &lt;br /&gt;
* it arbitrates contention for resources by managing a queue of pending work.&lt;br /&gt;
&lt;br /&gt;
Any kind of calculation on the compute nodes of bwUniCluster 3.0 requires the user to define calculations as a sequence of commands together with required run time, number of CPU cores and main memory and submit all, i.e., the &#039;&#039;&#039;batch job&#039;&#039;&#039;, to a resource and workload managing software. &lt;br /&gt;
== Terms and definitions ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Partitions &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Slurm manages job queues for different &#039;&#039;&#039;partitions&#039;&#039;&#039;. Partitions are used to group similar node types (e.g. nodes with and without accelerators) and to enforce different access policies and resource limits.&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 3.0 there are different partitions:&lt;br /&gt;
&lt;br /&gt;
* CPU-only nodes&lt;br /&gt;
** 2-socket nodes, consisting of 2 Intel Ice Lake processors with 32 cores each or 2 AMD processors with 48 cores each&lt;br /&gt;
** 2-socket nodes with very high RAM capacity, consisting of 2 AMD processors with 48 cores each&lt;br /&gt;
* GPU-accelerated nodes&lt;br /&gt;
** 2-socket nodes with 4x NVIDIA A100 or 4x NVIDIA H100 GPUs&lt;br /&gt;
** 4-socket node with 4x AMD Instinct accelerator&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Queues &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Job &#039;&#039;&#039;queues&#039;&#039;&#039; are used to manage jobs that request access to shared but limited computing resources of a certain kind (partition).&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 3.0 there are different main types of queues:&lt;br /&gt;
* Regular queues&lt;br /&gt;
** cpu: Jobs that request CPU-only nodes.&lt;br /&gt;
** gpu: Jobs that request GPU-accelerated nodes.&lt;br /&gt;
* Development queues (dev)&lt;br /&gt;
** Short, usually interactive jobs that are used for developing, compiling and testing code and workflows. The intention behind development queues is to provide users with immediate access to computer resources without having to wait. This is the place to realize instantaneous heavy compute without affecting other users, as would be the case on the login nodes.&lt;br /&gt;
&lt;br /&gt;
Requested compute resources such as (wall-)time, number of nodes and amount of memory are restricted and must fit into the boundaries imposed by the queues. The request for compute resources on the bwUniCluster 3.0 &amp;lt;font color=red&amp;gt;requires at least the specification of the &#039;&#039;&#039;queue&#039;&#039;&#039; and the &#039;&#039;&#039;time&#039;&#039;&#039;&amp;lt;/font&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Jobs &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Jobs can be run non-interactively as &#039;&#039;&#039;batch jobs&#039;&#039;&#039; or as &#039;&#039;&#039;interactive jobs&#039;&#039;&#039;.&lt;br /&gt;
Submitting a batch job means, that all steps of a compute project are defined in a Bash script. This Bash script is queued and executed as soon as the compute resources are available and allocated. Jobs are enqueued with the &#039;&#039;sbatch&#039;&#039; command.&lt;br /&gt;
&lt;br /&gt;
For interactive jobs, the resources are requested with the &#039;&#039;salloc&#039;&#039; command. As soon as the computing resources are available and allocated, a command line prompt is returned on a computing node and the user can freely dispose of the resources now available to him.&lt;br /&gt;
{|style=&amp;quot;background:#deffee; width:100%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;padding:5px; background:#cef2e0; text-align:left&amp;quot;|&lt;br /&gt;
[[Image:Attention.svg|center|25px]]&lt;br /&gt;
|style=&amp;quot;padding:5px; background:#cef2e0; text-align:left&amp;quot;|&lt;br /&gt;
&#039;&#039;&#039;Please remember:&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Heavy computations are not allowed on the login nodes&#039;&#039;&#039;.&amp;lt;br&amp;gt;Use a developement or a regular job queue instead! Please refer to [[BwUniCluster3.0/Login#Allowed_Activities_on_Login_Nodes|Allowed Activities on Login Nodes]].&lt;br /&gt;
* &#039;&#039;&#039;Development queues&#039;&#039;&#039; are meant for &#039;&#039;&#039;development tasks&#039;&#039;&#039;.&amp;lt;br&amp;gt;Do not misuse this queue for regular, short-running jobs or chain jobs! Only one running job at a time is enabled. Maximum queue length is reduced to 3.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Queues on bwUniCluster 3.0 = &lt;br /&gt;
== Policy ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Regular Queues ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
! style=&amp;quot;width:5%&amp;quot;| Queue&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Node-Type&lt;br /&gt;
! style=&amp;quot;width:23%&amp;quot;| Default Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Minimal Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Maximum Resources&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;cpu_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Ice Lake&lt;br /&gt;
| mem-per-cpu=1950mb&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=30, mem=249600mb, ntasks-per-node=64, (threads-per-core=2) &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;cpu&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Standard&lt;br /&gt;
| mem-per-cpu=1125mb&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=20, mem=380000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;highmem&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;High Memory&lt;br /&gt;
| mem-per-cpu=1125mb&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=4, mem=2300000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;gpu_h100&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;NVIDIA GPU x4&lt;br /&gt;
| mem-per-cpu=1125mb&amp;lt;br/&amp;gt;cpus-per-gpu=24&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=12, mem=760000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;gpu_mi300&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU node&amp;lt;br/&amp;gt;AMD GPU x4&lt;br /&gt;
| mem-per-cpu=1125mb&amp;lt;br/&amp;gt;cpus-per-gpu=24&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=1, mem=510000mb, ntasks-per-node=40, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;gpu_a100_il&amp;lt;/code&amp;gt;/&amp;lt;code&amp;gt;gpu_h100_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;Ice Lake&amp;lt;br/&amp;gt;NVIDIA GPU x4&lt;br /&gt;
| mem-per-gpu=127500mb&amp;lt;br/&amp;gt;cpus-per-gpu=16&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=9, mem=510000mb, ntasks-per-node=64, (threads-per-core=2) &lt;br /&gt;
|}&lt;br /&gt;
Table 1: Regular Queues&lt;br /&gt;
&lt;br /&gt;
== Development Queues ==&lt;br /&gt;
Only for development, i.e. debugging or performance optimization ...&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
! style=&amp;quot;width:5%&amp;quot;| Queue&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Node Type&lt;br /&gt;
! style=&amp;quot;width:23%&amp;quot;| Default Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Minimal Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Maximum Resources&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_cpu_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Ice Lake&lt;br /&gt;
| mem-per-cpu=1950mb&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=8, mem=249600mb, ntasks-per-node=64, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_cpu&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Standard&lt;br /&gt;
| mem-per-cpu=1125mb&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=180000mb, ntasks-per-node=40, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_highmem&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;High Memory&lt;br /&gt;
| mem-per-cpu=1125mb&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=180000mb, ntasks-per-node=40, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_gpu_h100&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;NVIDIA GPU x4&lt;br /&gt;
| mem-per-cpu=1125mb&amp;lt;br/&amp;gt;cpus-per-gpu=24&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=180000mb, ntasks-per-node=40, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_gpu_a100_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;NVIDIA GPU x4&amp;lt;br/&amp;gt;&lt;br /&gt;
| mem-per-gpu=127500mb&amp;lt;br/&amp;gt;cpus-per-gpu=16 &lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=510000mb, ntasks-per-node=64, (threads-per-core=2) &lt;br /&gt;
|}&lt;br /&gt;
Table 2: Development Queues&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Default resources of a queue class defines time, #tasks and memory if not explicitly given with sbatch command. Resource list acronyms &#039;&#039;--time&#039;&#039;, &#039;&#039;--ntasks&#039;&#039;, &#039;&#039;--nodes&#039;&#039;, &#039;&#039;--mem&#039;&#039; and &#039;&#039;--mem-per-cpu&#039;&#039; are described [[BwUniCluster_3.0_Slurm_common_Features|here]].&lt;br /&gt;
&lt;br /&gt;
== Check available resources ==&lt;br /&gt;
The Slurm command sinfo is used to view partition and node information for a system running Slurm. It incorporates down time, reservations, and node state information in determining the available backfill window. The sinfo command can only be used by the administrator.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
SCC has prepared a special script (sinfo_t_idle) to find out how many processors are available for immediate use on the system. It is anticipated that users will use this information to submit jobs that meet these criteria and thus obtain quick job turnaround times. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The following command displays what resources are available for immediate use for the whole partition.&lt;br /&gt;
&amp;lt;pre&amp;gt;$ sinfo_t_idle&lt;br /&gt;
Partition dev_cpu                 :      2 nodes idle&lt;br /&gt;
Partition cpu                     :     68 nodes idle&lt;br /&gt;
Partition highmem                 :      4 nodes idle&lt;br /&gt;
Partition dev_gpu_h100            :      0 nodes idle&lt;br /&gt;
Partition gpu_h100                :     11 nodes idle&lt;br /&gt;
Partition gpu_mi300               :      1 nodes idle&lt;br /&gt;
Partition dev_cpu_il              :      0 nodes idle&lt;br /&gt;
Partition cpu_il                  :      0 nodes idle&lt;br /&gt;
Partition dev_gpu_a100_il         :      0 nodes idle&lt;br /&gt;
Partition gpu_a100_il             :      0 nodes idle&lt;br /&gt;
Partition gpu_h100_il             :      0 nodes idle&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Running Jobs =&lt;br /&gt;
== Batch Jobs: sbatch ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To run your batch job on one of the cpu nodes, please use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sbatch --partition=dev_cpu&lt;br /&gt;
     or &lt;br /&gt;
$ sbatch -p dev_cpu&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Interactive Jobs: salloc ==&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 3.0 you are only allowed to run short jobs (&amp;lt;&amp;lt; 1 hour) with little memory requirements (&amp;lt;&amp;lt; 8 GByte) on the logins nodes. If you want to run longer jobs and/or jobs with a request of more than 8 GByte of memory, you must allocate resources for so-called interactive jobs by usage of the command salloc on a login node. Considering a serial application running on a compute node that requires 5000 MByte of memory and limiting the interactive run to 2 hours the following command has to be executed:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ salloc -p cpu -n 1 -t 120 --mem=5000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then you will get one core on a compute node within the partition &amp;quot;cpu&amp;quot;. After execution of this command &#039;&#039;&#039;DO NOT CLOSE&#039;&#039;&#039; your current terminal session but wait until the queueing system Slurm has granted you the requested resources on the compute system. You will be logged in automatically on the granted core! To run a serial program on the granted core you only have to type the name of the executable.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./&amp;lt;my_serial_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please be aware that your serial job must run less than 2 hours in this example, else the job will be killed during runtime by the system. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can also start now a graphical X11-terminal connecting you to the dedicated resource that is available for 2 hours. You can start it by the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ xterm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that, once the walltime limit has been reached the resources - i.e. the compute node - will automatically be revoked.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
An interactive parallel application running on one compute node or on many compute nodes (e.g. here 5 nodes) with 96 cores each requires usually an amount of memory in GByte (e.g. 50 GByte) and a maximum time (e.g. 1 hour). E.g. 5 nodes can be allocated by the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ salloc -p cpu -N 5 --ntasks-per-node=96 -t 01:00:00  --mem=50gb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you can run parallel jobs on 480 cores requiring 50 GByte of memory per node. Please be aware that you will be logged in on core 0 of the first node.&lt;br /&gt;
If you want to have access to another node you have to open a new terminal, connect it also to bwUniCluster 3.0 and type the following commands to&lt;br /&gt;
connect to the running interactive job and then to a specific node:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ srun --jobid=XXXXXXXX --pty /bin/bash&lt;br /&gt;
$ srun --nodelist=uc3nXXX --pty /bin/bash&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ squeue&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the jobid and the nodelist can be shown.&lt;br /&gt;
&lt;br /&gt;
If you want to run MPI-programs, you can do it by simply typing mpirun &amp;lt;program_name&amp;gt;. Then your program will be run on 480 cores. A very simple example for starting a parallel job can be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mpirun &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also start the debugger ddt by the commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module add devel/ddt&lt;br /&gt;
$ ddt &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above commands will execute the parallel program &amp;lt;my_mpi_program&amp;gt; on all available cores. You can also start parallel programs on a subset of cores; an example for this can be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mpirun -n 50 &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are using Intel MPI you must start &amp;lt;my_mpi_program&amp;gt; by the command mpiexec.hydra (instead of mpirun).&lt;br /&gt;
&lt;br /&gt;
== Interactive Computing with Jupyter ==&lt;br /&gt;
&lt;br /&gt;
== Monitor and manage jobs ==&lt;br /&gt;
scontrol show job displays detailed job state information and diagnostic output for all or a specified job of yours. Detailed information is available for active, pending and recently completed jobs. The command scontrol is explained in detail on the webpage https://slurm.schedmd.com/scontrol.html or via manpage (man scontrol). &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Display the state of all your jobs in normal mode: scontrol show job&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Display the state of a job with &amp;lt;jobid&amp;gt; in normal mode: scontrol show job &amp;lt;jobid&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Here is an example from bwUniCluster 3.0.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ squeue&lt;br /&gt;
JOBID PARTITION     NAME     USER ST       TIME  NODES NODELIST(REASON)&lt;br /&gt;
1262       cpu     wrap ka_zs040  R       1:12      1 uc3n002&lt;br /&gt;
&lt;br /&gt;
$&lt;br /&gt;
$ # now, see what&#039;s up with my pending job with jobid 1262&lt;br /&gt;
$ &lt;br /&gt;
$ scontrol show job 1262&lt;br /&gt;
&lt;br /&gt;
JobId=1262 JobName=wrap&lt;br /&gt;
   UserId=ka_zs0402(241992) GroupId=ka_scc(12345) MCS_label=N/A&lt;br /&gt;
   Priority=4246 Nice=0 Account=ka QOS=normal&lt;br /&gt;
   JobState=RUNNING Reason=None Dependency=(null)&lt;br /&gt;
   Requeue=1 Restarts=0 BatchFlag=1 Reboot=0 ExitCode=0:0&lt;br /&gt;
   RunTime=00:00:37 TimeLimit=00:20:00 TimeMin=N/A&lt;br /&gt;
   SubmitTime=2025-04-04T10:01:30 EligibleTime=2025-04-04T10:01:30&lt;br /&gt;
   AccrueTime=2025-04-04T10:01:30&lt;br /&gt;
   StartTime=2025-04-04T10:01:31 EndTime=2025-04-04T10:21:31 Deadline=N/A&lt;br /&gt;
   SuspendTime=None SecsPreSuspend=0 LastSchedEval=2025-04-04T10:01:31 Scheduler=Main&lt;br /&gt;
   Partition=cpu AllocNode:Sid=uc3n999:2819841&lt;br /&gt;
   ReqNodeList=(null) ExcNodeList=(null)&lt;br /&gt;
   NodeList=uc3n002&lt;br /&gt;
   BatchHost=uc3n002&lt;br /&gt;
   NumNodes=1 NumCPUs=2 NumTasks=1 CPUs/Task=1 ReqB:S:C:T=0:0:*:*&lt;br /&gt;
   ReqTRES=cpu=1,mem=2000M,node=1,billing=1&lt;br /&gt;
   AllocTRES=cpu=2,mem=4000M,node=1,billing=2&lt;br /&gt;
   Socks/Node=* NtasksPerN:B:S:C=0:0:*:1 CoreSpec=*&lt;br /&gt;
   MinCPUsNode=1 MinMemoryCPU=2000M MinTmpDiskNode=0&lt;br /&gt;
   Features=(null) DelayBoot=00:00:00&lt;br /&gt;
   OverSubscribe=OK Contiguous=0 Licenses=(null) Network=(null)&lt;br /&gt;
   Command=(null)&lt;br /&gt;
   WorkDir=/pfs/data6/home/ka/ka_scc/ka_zs0402&lt;br /&gt;
   StdErr=/pfs/data6/home/ka/ka_scc/ka_zs0402/slurm-1262.out&lt;br /&gt;
   StdIn=/dev/null&lt;br /&gt;
   StdOut=/pfs/data6/home/ka/ka_scc/ka_zs0402/slurm-1262.out&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Slurm Options =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Slurm Commands (excerpt) ==&lt;br /&gt;
Important Slurm commands for non-administrators working on bwUniCluster 3.0.&lt;br /&gt;
{| width=850px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Slurm commands !! Brief explanation&lt;br /&gt;
|-&lt;br /&gt;
| [[#Job submission : sbatch|sbatch]] || Submits a job and puts it into the queue [[https://slurm.schedmd.com/sbatch.html sbatch]] &lt;br /&gt;
|-&lt;br /&gt;
| [[#Interactive job : salloc|salloc]] || Requests resources for an interactive Job [[https://slurm.schedmd.com/salloc.html salloc]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Detailed job information : scontrol show job|scontrol show job]] || Displays detailed job state information [[https://slurm.schedmd.com/scontrol.html scontrol]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#List of your submitted jo/bs : squeue|squeue]] || Displays information about active, eligible, blocked, and/or recently completed jobs [[https://slurm.schedmd.com/squeue.html squeue]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Start time of job or resources : squeue|squeue --start]] || Returns start time of submitted job [[https://slurm.schedmd.com/squeue.html squeue]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Shows free resources : sinfo_t_idle|sinfo_t_idle]] || Shows what resources are available for immediate use [[https://slurm.schedmd.com/sinfo.html sinfo]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Canceling own jobs : scancel|scancel]] || Cancels a job [[https://slurm.schedmd.com/scancel.html scancel]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* [https://slurm.schedmd.com/tutorials.html  Slurm Tutorials]&lt;br /&gt;
* [https://slurm.schedmd.com/pdfs/summary.pdf  Slurm command/option summary (2 pages)]&lt;br /&gt;
* [https://slurm.schedmd.com/man_index.html  Slurm Commands]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Job submission : sbatch ==&lt;br /&gt;
Batch jobs are submitted by using the command &#039;&#039;&#039;sbatch&#039;&#039;&#039;. The main purpose of the &#039;&#039;&#039;sbatch&#039;&#039;&#039; command is to specify the resources that are needed to run the job. &#039;&#039;&#039;sbatch&#039;&#039;&#039; will then queue the batch job. However, starting of batch job depends on the availability of the requested resources and the fair sharing value.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=== Command parameters sbatch ===&lt;br /&gt;
The syntax and use of &#039;&#039;&#039;sbatch&#039;&#039;&#039; can be displayed via:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ man sbatch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;sbatch&#039;&#039;&#039; options can be used from the command line or in your job script. Different defaults for some of these options are set based on the queue and can be found [https://wiki.bwhpc.de/e/BwUniCluster3.0/Batch_Queues#sbatch_-p_queue here]&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | sbatch Options&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width:8%&amp;quot;| Command line&lt;br /&gt;
! style=&amp;quot;width:9%&amp;quot;| Script&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Purpose&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -t, --time=&#039;&#039;time&#039;&#039;&lt;br /&gt;
| #SBATCH --time=&#039;&#039;time&#039;&#039;&lt;br /&gt;
| Wall clock time limit.&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -N, --nodes=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --nodes=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of nodes to be used.&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -n, --ntasks=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --ntasks=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of tasks to be launched.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --ntasks-per-node=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --ntasks-per-node=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Maximum count of tasks per node.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -c, --cpus-per-task=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --cpus-per-task=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of CPUs required per (MPI-)task.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mem=&#039;&#039;value_in_MB&#039;&#039;&lt;br /&gt;
| #SBATCH --mem=&#039;&#039;value_in_MB&#039;&#039; &lt;br /&gt;
| Memory in MegaByte per node. (You should omit the setting of this option.)&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mem-per-cpu=&#039;&#039;value_in_MB&#039;&#039;&lt;br /&gt;
| #SBATCH --mem-per-cpu=&#039;&#039;value_in_MB&#039;&#039; &lt;br /&gt;
| Minimum Memory required per allocated CPU. (You should omit the setting of this option.)&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mail-type=&#039;&#039;type&#039;&#039;&lt;br /&gt;
| #SBATCH --mail-type=&#039;&#039;type&#039;&#039;&lt;br /&gt;
| Notify user by email when certain event types occur.&amp;lt;br&amp;gt;Valid type values are NONE, BEGIN, END, FAIL, REQUEUE, ALL.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mail-user=&#039;&#039;mail-address&#039;&#039;&lt;br /&gt;
| #SBATCH --mail-user=&#039;&#039;mail-address&#039;&#039;&lt;br /&gt;
|  The specified mail-address receives email notification of state changes as defined by --mail-type.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --output=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --output=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| File in which job output is stored. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --error=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --error=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| File in which job error messages are stored. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -J, --job-name=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --job-name=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| Job name.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --export=[ALL,] &#039;&#039;env-variables&#039;&#039;&lt;br /&gt;
| #SBATCH --export=[ALL,] &#039;&#039;env-variables&#039;&#039;&lt;br /&gt;
| Identifies which environment variables from the submission environment are propagated to the launched application. Default is ALL.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -A, --account=&#039;&#039;group-name&#039;&#039;&lt;br /&gt;
| #SBATCH --account=&#039;&#039;group-name&#039;&#039;&lt;br /&gt;
| Change resources used by this job to specified group. You may need this option if your account is assigned to more than one group. By command &amp;quot;scontrol show job&amp;quot; the project group the job is accounted on can be seen behind &amp;quot;Account=&amp;quot;. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -p, --partition=&#039;&#039;queue-name&#039;&#039;&lt;br /&gt;
| #SBATCH --partition=&#039;&#039;queue-name&#039;&#039;&lt;br /&gt;
| Request a specific queue for the resource allocation.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --reservation=&#039;&#039;reservation-name&#039;&#039;&lt;br /&gt;
| #SBATCH --reservation=&#039;&#039;reservation-name&#039;&#039;&lt;br /&gt;
| Use a specific reservation for the resource allocation.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -C, --constraint=&#039;&#039;LSDF&#039;&#039;&lt;br /&gt;
| #SBATCH --constraint=LSDF&lt;br /&gt;
| Job constraint LSDF filesystems.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -C, --constraint=&#039;&#039;BEEOND (BEEOND_4MDS, BEEOND_MAXMDS)&#039;&#039;&lt;br /&gt;
| #SBATCH --constraint=BEEOND (BEEOND_4MDS, BEEOND_MAXMDS)&lt;br /&gt;
| Job constraint BeeOND filesystem.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Best Practices =&lt;br /&gt;
&lt;br /&gt;
== Step-by-Step example==&lt;br /&gt;
&lt;br /&gt;
== Dos and Don&#039;ts ==&lt;/div&gt;</summary>
		<author><name>P Schuhmacher</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster3.0/Running_Jobs&amp;diff=14637</id>
		<title>BwUniCluster3.0/Running Jobs</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster3.0/Running_Jobs&amp;diff=14637"/>
		<updated>2025-04-04T15:03:24Z</updated>

		<summary type="html">&lt;p&gt;P Schuhmacher: /* Check available resources */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
= Purpose and function of a queuing system =&lt;br /&gt;
&lt;br /&gt;
General procedure: Hint to [[Running_Calculations | Running Calculations]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Job submission process ==&lt;br /&gt;
&lt;br /&gt;
bwUniCluster 3.0 has installed the workload managing software Slurm. Therefore any job submission by the user is to be executed by commands of the Slurm software. Slurm queues and runs user jobs based on fair sharing policies.&lt;br /&gt;
&lt;br /&gt;
== Slurm ==&lt;br /&gt;
&lt;br /&gt;
HPC Workload Manager on bwUniCluster 3.0 is Slurm.&lt;br /&gt;
Slurm is a cluster management and job scheduling system. Slurm has three key functions. &lt;br /&gt;
* First, it allocates access to resources (compute cores on nodes) to users for some duration of time so they can perform work. &lt;br /&gt;
* it provides a framework for starting, executing, and monitoring work (normally a parallel job) on the set of allocated nodes. &lt;br /&gt;
* it arbitrates contention for resources by managing a queue of pending work.&lt;br /&gt;
&lt;br /&gt;
Any kind of calculation on the compute nodes of bwUniCluster 3.0 requires the user to define calculations as a sequence of commands together with required run time, number of CPU cores and main memory and submit all, i.e., the &#039;&#039;&#039;batch job&#039;&#039;&#039;, to a resource and workload managing software. &lt;br /&gt;
== Terms and definitions ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Partitions &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Slurm manages job queues for different &#039;&#039;&#039;partitions&#039;&#039;&#039;. Partitions are used to group similar node types (e.g. nodes with and without accelerators) and to enforce different access policies and resource limits.&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 3.0 there are different partitions:&lt;br /&gt;
&lt;br /&gt;
* CPU-only nodes&lt;br /&gt;
** 2-socket nodes, consisting of 2 Intel Ice Lake processors with 32 cores each or 2 AMD processors with 48 cores each&lt;br /&gt;
** 2-socket nodes with very high RAM capacity, consisting of 2 AMD processors with 48 cores each&lt;br /&gt;
* GPU-accelerated nodes&lt;br /&gt;
** 2-socket nodes with 4x NVIDIA A100 or 4x NVIDIA H100 GPUs&lt;br /&gt;
** 4-socket node with 4x AMD Instinct accelerator&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Queues &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Job &#039;&#039;&#039;queues&#039;&#039;&#039; are used to manage jobs that request access to shared but limited computing resources of a certain kind (partition).&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 3.0 there are different main types of queues:&lt;br /&gt;
* Regular queues&lt;br /&gt;
** cpu: Jobs that request CPU-only nodes.&lt;br /&gt;
** gpu: Jobs that request GPU-accelerated nodes.&lt;br /&gt;
* Development queues (dev)&lt;br /&gt;
** Short, usually interactive jobs that are used for developing, compiling and testing code and workflows. The intention behind development queues is to provide users with immediate access to computer resources without having to wait. This is the place to realize instantaneous heavy compute without affecting other users, as would be the case on the login nodes.&lt;br /&gt;
&lt;br /&gt;
Requested compute resources such as (wall-)time, number of nodes and amount of memory are restricted and must fit into the boundaries imposed by the queues. The request for compute resources on the bwUniCluster 3.0 &amp;lt;font color=red&amp;gt;requires at least the specification of the &#039;&#039;&#039;queue&#039;&#039;&#039; and the &#039;&#039;&#039;time&#039;&#039;&#039;&amp;lt;/font&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Jobs &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Jobs can be run non-interactively as &#039;&#039;&#039;batch jobs&#039;&#039;&#039; or as &#039;&#039;&#039;interactive jobs&#039;&#039;&#039;.&lt;br /&gt;
Submitting a batch job means, that all steps of a compute project are defined in a Bash script. This Bash script is queued and executed as soon as the compute resources are available and allocated. Jobs are enqueued with the &#039;&#039;sbatch&#039;&#039; command.&lt;br /&gt;
&lt;br /&gt;
For interactive jobs, the resources are requested with the &#039;&#039;salloc&#039;&#039; command. As soon as the computing resources are available and allocated, a command line prompt is returned on a computing node and the user can freely dispose of the resources now available to him.&lt;br /&gt;
{|style=&amp;quot;background:#deffee; width:100%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;padding:5px; background:#cef2e0; text-align:left&amp;quot;|&lt;br /&gt;
[[Image:Attention.svg|center|25px]]&lt;br /&gt;
|style=&amp;quot;padding:5px; background:#cef2e0; text-align:left&amp;quot;|&lt;br /&gt;
&#039;&#039;&#039;Please remember:&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Heavy computations are not allowed on the login nodes&#039;&#039;&#039;.&amp;lt;br&amp;gt;Use a developement or a regular job queue instead! Please refer to [[BwUniCluster3.0/Login#Allowed_Activities_on_Login_Nodes|Allowed Activities on Login Nodes]].&lt;br /&gt;
* &#039;&#039;&#039;Development queues&#039;&#039;&#039; are meant for &#039;&#039;&#039;development tasks&#039;&#039;&#039;.&amp;lt;br&amp;gt;Do not misuse this queue for regular, short-running jobs or chain jobs! Only one running job at a time is enabled. Maximum queue length is reduced to 3.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Queues on bwUniCluster 3.0 = &lt;br /&gt;
== Policy ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Regular Queues ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
! style=&amp;quot;width:5%&amp;quot;| Queue&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Node-Type&lt;br /&gt;
! style=&amp;quot;width:23%&amp;quot;| Default Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Minimal Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Maximum Resources&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;cpu_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Ice Lake&lt;br /&gt;
| mem-per-cpu=1950mb&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=30, mem=249600mb, ntasks-per-node=64, (threads-per-core=2) &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;cpu&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Standard&lt;br /&gt;
| mem-per-cpu=1125mb&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=20, mem=380000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;highmem&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;High Memory&lt;br /&gt;
| mem-per-cpu=1125mb&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=4, mem=2300000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;gpu_h100&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;NVIDIA GPU x4&lt;br /&gt;
| mem-per-cpu=1125mb&amp;lt;br/&amp;gt;cpus-per-gpu=24&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=12, mem=760000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;gpu_mi300&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU node&amp;lt;br/&amp;gt;AMD GPU x4&lt;br /&gt;
| mem-per-cpu=1125mb&amp;lt;br/&amp;gt;cpus-per-gpu=24&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=1, mem=510000mb, ntasks-per-node=40, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;gpu_a100_il&amp;lt;/code&amp;gt;/&amp;lt;code&amp;gt;gpu_h100_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;Ice Lake&amp;lt;br/&amp;gt;NVIDIA GPU x4&lt;br /&gt;
| mem-per-gpu=127500mb&amp;lt;br/&amp;gt;cpus-per-gpu=16&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=9, mem=510000mb, ntasks-per-node=64, (threads-per-core=2) &lt;br /&gt;
|}&lt;br /&gt;
Table 1: Regular Queues&lt;br /&gt;
&lt;br /&gt;
== Development Queues ==&lt;br /&gt;
Only for development, i.e. debugging or performance optimization ...&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
! style=&amp;quot;width:5%&amp;quot;| Queue&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Node Type&lt;br /&gt;
! style=&amp;quot;width:23%&amp;quot;| Default Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Minimal Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Maximum Resources&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_cpu_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Ice Lake&lt;br /&gt;
| mem-per-cpu=1950mb&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=8, mem=249600mb, ntasks-per-node=64, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_cpu&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Standard&lt;br /&gt;
| mem-per-cpu=1125mb&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=180000mb, ntasks-per-node=40, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_highmem&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;High Memory&lt;br /&gt;
| mem-per-cpu=1125mb&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=180000mb, ntasks-per-node=40, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_gpu_h100&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;NVIDIA GPU x4&lt;br /&gt;
| mem-per-cpu=1125mb&amp;lt;br/&amp;gt;cpus-per-gpu=24&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=180000mb, ntasks-per-node=40, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_gpu_a100_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;NVIDIA GPU x4&amp;lt;br/&amp;gt;&lt;br /&gt;
| mem-per-gpu=127500mb&amp;lt;br/&amp;gt;cpus-per-gpu=16 &lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=510000mb, ntasks-per-node=64, (threads-per-core=2) &lt;br /&gt;
|}&lt;br /&gt;
Table 2: Development Queues&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Default resources of a queue class defines time, #tasks and memory if not explicitly given with sbatch command. Resource list acronyms &#039;&#039;--time&#039;&#039;, &#039;&#039;--ntasks&#039;&#039;, &#039;&#039;--nodes&#039;&#039;, &#039;&#039;--mem&#039;&#039; and &#039;&#039;--mem-per-cpu&#039;&#039; are described [[BwUniCluster_3.0_Slurm_common_Features|here]].&lt;br /&gt;
&lt;br /&gt;
== Check available resources ==&lt;br /&gt;
The Slurm command sinfo is used to view partition and node information for a system running Slurm. It incorporates down time, reservations, and node state information in determining the available backfill window. The sinfo command can only be used by the administrator.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
SCC has prepared a special script (sinfo_t_idle) to find out how many processors are available for immediate use on the system. It is anticipated that users will use this information to submit jobs that meet these criteria and thus obtain quick job turnaround times. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The following command displays what resources are available for immediate use for the whole partition.&lt;br /&gt;
&amp;lt;pre&amp;gt;$ sinfo_t_idle&lt;br /&gt;
Partition dev_cpu                 :      2 nodes idle&lt;br /&gt;
Partition cpu                     :     68 nodes idle&lt;br /&gt;
Partition highmem                 :      4 nodes idle&lt;br /&gt;
Partition dev_gpu_h100            :      0 nodes idle&lt;br /&gt;
Partition gpu_h100                :     11 nodes idle&lt;br /&gt;
Partition gpu_mi300               :      1 nodes idle&lt;br /&gt;
Partition dev_cpu_il              :      0 nodes idle&lt;br /&gt;
Partition cpu_il                  :      0 nodes idle&lt;br /&gt;
Partition dev_gpu_a100_il         :      0 nodes idle&lt;br /&gt;
Partition gpu_a100_il             :      0 nodes idle&lt;br /&gt;
Partition gpu_h100_il             :      0 nodes idle&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Running Jobs =&lt;br /&gt;
== Batch Jobs: sbatch ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To run your batch job on one of the cpu nodes, please use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sbatch --partition=dev_cpu&lt;br /&gt;
     or &lt;br /&gt;
$ sbatch -p dev_cpu&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Interactive Jobs: salloc ==&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 3.0 you are only allowed to run short jobs (&amp;lt;&amp;lt; 1 hour) with little memory requirements (&amp;lt;&amp;lt; 8 GByte) on the logins nodes. If you want to run longer jobs and/or jobs with a request of more than 8 GByte of memory, you must allocate resources for so-called interactive jobs by usage of the command salloc on a login node. Considering a serial application running on a compute node that requires 5000 MByte of memory and limiting the interactive run to 2 hours the following command has to be executed:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ salloc -p cpu -n 1 -t 120 --mem=5000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then you will get one core on a compute node within the partition &amp;quot;cpu&amp;quot;. After execution of this command &#039;&#039;&#039;DO NOT CLOSE&#039;&#039;&#039; your current terminal session but wait until the queueing system Slurm has granted you the requested resources on the compute system. You will be logged in automatically on the granted core! To run a serial program on the granted core you only have to type the name of the executable.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./&amp;lt;my_serial_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please be aware that your serial job must run less than 2 hours in this example, else the job will be killed during runtime by the system. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can also start now a graphical X11-terminal connecting you to the dedicated resource that is available for 2 hours. You can start it by the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ xterm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that, once the walltime limit has been reached the resources - i.e. the compute node - will automatically be revoked.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
An interactive parallel application running on one compute node or on many compute nodes (e.g. here 5 nodes) with 96 cores each requires usually an amount of memory in GByte (e.g. 50 GByte) and a maximum time (e.g. 1 hour). E.g. 5 nodes can be allocated by the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ salloc -p cpu -N 5 --ntasks-per-node=96 -t 01:00:00  --mem=50gb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you can run parallel jobs on 480 cores requiring 50 GByte of memory per node. Please be aware that you will be logged in on core 0 of the first node.&lt;br /&gt;
If you want to have access to another node you have to open a new terminal, connect it also to bwUniCluster 3.0 and type the following commands to&lt;br /&gt;
connect to the running interactive job and then to a specific node:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ srun --jobid=XXXXXXXX --pty /bin/bash&lt;br /&gt;
$ srun --nodelist=uc3nXXX --pty /bin/bash&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ squeue&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the jobid and the nodelist can be shown.&lt;br /&gt;
&lt;br /&gt;
If you want to run MPI-programs, you can do it by simply typing mpirun &amp;lt;program_name&amp;gt;. Then your program will be run on 480 cores. A very simple example for starting a parallel job can be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mpirun &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also start the debugger ddt by the commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module add devel/ddt&lt;br /&gt;
$ ddt &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above commands will execute the parallel program &amp;lt;my_mpi_program&amp;gt; on all available cores. You can also start parallel programs on a subset of cores; an example for this can be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mpirun -n 50 &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are using Intel MPI you must start &amp;lt;my_mpi_program&amp;gt; by the command mpiexec.hydra (instead of mpirun).&lt;br /&gt;
&lt;br /&gt;
== Interactive Computing with Jupyter ==&lt;br /&gt;
&lt;br /&gt;
== Monitor and manage jobs ==&lt;br /&gt;
scontrol show job displays detailed job state information and diagnostic output for all or a specified job of yours. Detailed information is available for active, pending and recently completed jobs. The command scontrol is explained in detail on the webpage https://slurm.schedmd.com/scontrol.html or via manpage (man scontrol). &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Display the state of all your jobs in normal mode: scontrol show job&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Display the state of a job with &amp;lt;jobid&amp;gt; in normal mode: scontrol show job &amp;lt;jobid&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Example ===&lt;br /&gt;
Here is an example from bwUniCluster 3.0.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
squeue    # show my own jobs (here the userid is replaced!)&lt;br /&gt;
             JOBID PARTITION     NAME     USER ST       TIME  NODES NODELIST(REASON)&lt;br /&gt;
              1262       cpu     wrap ka_zs040  R       1:12      1 uc3n002&lt;br /&gt;
&lt;br /&gt;
$&lt;br /&gt;
$ # now, see what&#039;s up with my pending job with jobid 1262&lt;br /&gt;
$ &lt;br /&gt;
$ scontrol show job 1262&lt;br /&gt;
&lt;br /&gt;
JobId=1262 JobName=wrap&lt;br /&gt;
   UserId=ka_zs0402(241992) GroupId=ka_scc(12345) MCS_label=N/A&lt;br /&gt;
   Priority=4246 Nice=0 Account=ka QOS=normal&lt;br /&gt;
   JobState=RUNNING Reason=None Dependency=(null)&lt;br /&gt;
   Requeue=1 Restarts=0 BatchFlag=1 Reboot=0 ExitCode=0:0&lt;br /&gt;
   RunTime=00:00:37 TimeLimit=00:20:00 TimeMin=N/A&lt;br /&gt;
   SubmitTime=2025-04-04T10:01:30 EligibleTime=2025-04-04T10:01:30&lt;br /&gt;
   AccrueTime=2025-04-04T10:01:30&lt;br /&gt;
   StartTime=2025-04-04T10:01:31 EndTime=2025-04-04T10:21:31 Deadline=N/A&lt;br /&gt;
   SuspendTime=None SecsPreSuspend=0 LastSchedEval=2025-04-04T10:01:31 Scheduler=Main&lt;br /&gt;
   Partition=cpu AllocNode:Sid=uc3n999:2819841&lt;br /&gt;
   ReqNodeList=(null) ExcNodeList=(null)&lt;br /&gt;
   NodeList=uc3n002&lt;br /&gt;
   BatchHost=uc3n002&lt;br /&gt;
   NumNodes=1 NumCPUs=2 NumTasks=1 CPUs/Task=1 ReqB:S:C:T=0:0:*:*&lt;br /&gt;
   ReqTRES=cpu=1,mem=2000M,node=1,billing=1&lt;br /&gt;
   AllocTRES=cpu=2,mem=4000M,node=1,billing=2&lt;br /&gt;
   Socks/Node=* NtasksPerN:B:S:C=0:0:*:1 CoreSpec=*&lt;br /&gt;
   MinCPUsNode=1 MinMemoryCPU=2000M MinTmpDiskNode=0&lt;br /&gt;
   Features=(null) DelayBoot=00:00:00&lt;br /&gt;
   OverSubscribe=OK Contiguous=0 Licenses=(null) Network=(null)&lt;br /&gt;
   Command=(null)&lt;br /&gt;
   WorkDir=/pfs/data6/home/ka/ka_scc/ka_zs0402&lt;br /&gt;
   StdErr=/pfs/data6/home/ka/ka_scc/ka_zs0402/slurm-1262.out&lt;br /&gt;
   StdIn=/dev/null&lt;br /&gt;
   StdOut=/pfs/data6/home/ka/ka_scc/ka_zs0402/slurm-1262.out&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Slurm Options =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Slurm Commands (excerpt) ==&lt;br /&gt;
Important Slurm commands for non-administrators working on bwUniCluster 3.0.&lt;br /&gt;
{| width=850px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Slurm commands !! Brief explanation&lt;br /&gt;
|-&lt;br /&gt;
| [[#Job submission : sbatch|sbatch]] || Submits a job and puts it into the queue [[https://slurm.schedmd.com/sbatch.html sbatch]] &lt;br /&gt;
|-&lt;br /&gt;
| [[#Interactive job : salloc|salloc]] || Requests resources for an interactive Job [[https://slurm.schedmd.com/salloc.html salloc]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Detailed job information : scontrol show job|scontrol show job]] || Displays detailed job state information [[https://slurm.schedmd.com/scontrol.html scontrol]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#List of your submitted jo/bs : squeue|squeue]] || Displays information about active, eligible, blocked, and/or recently completed jobs [[https://slurm.schedmd.com/squeue.html squeue]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Start time of job or resources : squeue|squeue --start]] || Returns start time of submitted job [[https://slurm.schedmd.com/squeue.html squeue]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Shows free resources : sinfo_t_idle|sinfo_t_idle]] || Shows what resources are available for immediate use [[https://slurm.schedmd.com/sinfo.html sinfo]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Canceling own jobs : scancel|scancel]] || Cancels a job [[https://slurm.schedmd.com/scancel.html scancel]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* [https://slurm.schedmd.com/tutorials.html  Slurm Tutorials]&lt;br /&gt;
* [https://slurm.schedmd.com/pdfs/summary.pdf  Slurm command/option summary (2 pages)]&lt;br /&gt;
* [https://slurm.schedmd.com/man_index.html  Slurm Commands]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Job submission : sbatch ==&lt;br /&gt;
Batch jobs are submitted by using the command &#039;&#039;&#039;sbatch&#039;&#039;&#039;. The main purpose of the &#039;&#039;&#039;sbatch&#039;&#039;&#039; command is to specify the resources that are needed to run the job. &#039;&#039;&#039;sbatch&#039;&#039;&#039; will then queue the batch job. However, starting of batch job depends on the availability of the requested resources and the fair sharing value.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=== Command parameters sbatch ===&lt;br /&gt;
The syntax and use of &#039;&#039;&#039;sbatch&#039;&#039;&#039; can be displayed via:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ man sbatch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;sbatch&#039;&#039;&#039; options can be used from the command line or in your job script. Different defaults for some of these options are set based on the queue and can be found [https://wiki.bwhpc.de/e/BwUniCluster3.0/Batch_Queues#sbatch_-p_queue here]&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | sbatch Options&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width:8%&amp;quot;| Command line&lt;br /&gt;
! style=&amp;quot;width:9%&amp;quot;| Script&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Purpose&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -t, --time=&#039;&#039;time&#039;&#039;&lt;br /&gt;
| #SBATCH --time=&#039;&#039;time&#039;&#039;&lt;br /&gt;
| Wall clock time limit.&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -N, --nodes=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --nodes=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of nodes to be used.&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -n, --ntasks=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --ntasks=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of tasks to be launched.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --ntasks-per-node=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --ntasks-per-node=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Maximum count of tasks per node.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -c, --cpus-per-task=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --cpus-per-task=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of CPUs required per (MPI-)task.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mem=&#039;&#039;value_in_MB&#039;&#039;&lt;br /&gt;
| #SBATCH --mem=&#039;&#039;value_in_MB&#039;&#039; &lt;br /&gt;
| Memory in MegaByte per node. (You should omit the setting of this option.)&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mem-per-cpu=&#039;&#039;value_in_MB&#039;&#039;&lt;br /&gt;
| #SBATCH --mem-per-cpu=&#039;&#039;value_in_MB&#039;&#039; &lt;br /&gt;
| Minimum Memory required per allocated CPU. (You should omit the setting of this option.)&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mail-type=&#039;&#039;type&#039;&#039;&lt;br /&gt;
| #SBATCH --mail-type=&#039;&#039;type&#039;&#039;&lt;br /&gt;
| Notify user by email when certain event types occur.&amp;lt;br&amp;gt;Valid type values are NONE, BEGIN, END, FAIL, REQUEUE, ALL.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mail-user=&#039;&#039;mail-address&#039;&#039;&lt;br /&gt;
| #SBATCH --mail-user=&#039;&#039;mail-address&#039;&#039;&lt;br /&gt;
|  The specified mail-address receives email notification of state changes as defined by --mail-type.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --output=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --output=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| File in which job output is stored. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --error=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --error=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| File in which job error messages are stored. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -J, --job-name=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --job-name=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| Job name.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --export=[ALL,] &#039;&#039;env-variables&#039;&#039;&lt;br /&gt;
| #SBATCH --export=[ALL,] &#039;&#039;env-variables&#039;&#039;&lt;br /&gt;
| Identifies which environment variables from the submission environment are propagated to the launched application. Default is ALL.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -A, --account=&#039;&#039;group-name&#039;&#039;&lt;br /&gt;
| #SBATCH --account=&#039;&#039;group-name&#039;&#039;&lt;br /&gt;
| Change resources used by this job to specified group. You may need this option if your account is assigned to more than one group. By command &amp;quot;scontrol show job&amp;quot; the project group the job is accounted on can be seen behind &amp;quot;Account=&amp;quot;. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -p, --partition=&#039;&#039;queue-name&#039;&#039;&lt;br /&gt;
| #SBATCH --partition=&#039;&#039;queue-name&#039;&#039;&lt;br /&gt;
| Request a specific queue for the resource allocation.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --reservation=&#039;&#039;reservation-name&#039;&#039;&lt;br /&gt;
| #SBATCH --reservation=&#039;&#039;reservation-name&#039;&#039;&lt;br /&gt;
| Use a specific reservation for the resource allocation.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -C, --constraint=&#039;&#039;LSDF&#039;&#039;&lt;br /&gt;
| #SBATCH --constraint=LSDF&lt;br /&gt;
| Job constraint LSDF filesystems.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -C, --constraint=&#039;&#039;BEEOND (BEEOND_4MDS, BEEOND_MAXMDS)&#039;&#039;&lt;br /&gt;
| #SBATCH --constraint=BEEOND (BEEOND_4MDS, BEEOND_MAXMDS)&lt;br /&gt;
| Job constraint BeeOND filesystem.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Best Practices =&lt;br /&gt;
&lt;br /&gt;
== Step-by-Step example==&lt;br /&gt;
&lt;br /&gt;
== Dos and Don&#039;ts ==&lt;/div&gt;</summary>
		<author><name>P Schuhmacher</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster3.0/Running_Jobs&amp;diff=14636</id>
		<title>BwUniCluster3.0/Running Jobs</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster3.0/Running_Jobs&amp;diff=14636"/>
		<updated>2025-04-04T15:02:46Z</updated>

		<summary type="html">&lt;p&gt;P Schuhmacher: /* Scontrol show job Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
= Purpose and function of a queuing system =&lt;br /&gt;
&lt;br /&gt;
General procedure: Hint to [[Running_Calculations | Running Calculations]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Job submission process ==&lt;br /&gt;
&lt;br /&gt;
bwUniCluster 3.0 has installed the workload managing software Slurm. Therefore any job submission by the user is to be executed by commands of the Slurm software. Slurm queues and runs user jobs based on fair sharing policies.&lt;br /&gt;
&lt;br /&gt;
== Slurm ==&lt;br /&gt;
&lt;br /&gt;
HPC Workload Manager on bwUniCluster 3.0 is Slurm.&lt;br /&gt;
Slurm is a cluster management and job scheduling system. Slurm has three key functions. &lt;br /&gt;
* First, it allocates access to resources (compute cores on nodes) to users for some duration of time so they can perform work. &lt;br /&gt;
* it provides a framework for starting, executing, and monitoring work (normally a parallel job) on the set of allocated nodes. &lt;br /&gt;
* it arbitrates contention for resources by managing a queue of pending work.&lt;br /&gt;
&lt;br /&gt;
Any kind of calculation on the compute nodes of bwUniCluster 3.0 requires the user to define calculations as a sequence of commands together with required run time, number of CPU cores and main memory and submit all, i.e., the &#039;&#039;&#039;batch job&#039;&#039;&#039;, to a resource and workload managing software. &lt;br /&gt;
== Terms and definitions ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Partitions &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Slurm manages job queues for different &#039;&#039;&#039;partitions&#039;&#039;&#039;. Partitions are used to group similar node types (e.g. nodes with and without accelerators) and to enforce different access policies and resource limits.&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 3.0 there are different partitions:&lt;br /&gt;
&lt;br /&gt;
* CPU-only nodes&lt;br /&gt;
** 2-socket nodes, consisting of 2 Intel Ice Lake processors with 32 cores each or 2 AMD processors with 48 cores each&lt;br /&gt;
** 2-socket nodes with very high RAM capacity, consisting of 2 AMD processors with 48 cores each&lt;br /&gt;
* GPU-accelerated nodes&lt;br /&gt;
** 2-socket nodes with 4x NVIDIA A100 or 4x NVIDIA H100 GPUs&lt;br /&gt;
** 4-socket node with 4x AMD Instinct accelerator&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Queues &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Job &#039;&#039;&#039;queues&#039;&#039;&#039; are used to manage jobs that request access to shared but limited computing resources of a certain kind (partition).&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 3.0 there are different main types of queues:&lt;br /&gt;
* Regular queues&lt;br /&gt;
** cpu: Jobs that request CPU-only nodes.&lt;br /&gt;
** gpu: Jobs that request GPU-accelerated nodes.&lt;br /&gt;
* Development queues (dev)&lt;br /&gt;
** Short, usually interactive jobs that are used for developing, compiling and testing code and workflows. The intention behind development queues is to provide users with immediate access to computer resources without having to wait. This is the place to realize instantaneous heavy compute without affecting other users, as would be the case on the login nodes.&lt;br /&gt;
&lt;br /&gt;
Requested compute resources such as (wall-)time, number of nodes and amount of memory are restricted and must fit into the boundaries imposed by the queues. The request for compute resources on the bwUniCluster 3.0 &amp;lt;font color=red&amp;gt;requires at least the specification of the &#039;&#039;&#039;queue&#039;&#039;&#039; and the &#039;&#039;&#039;time&#039;&#039;&#039;&amp;lt;/font&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Jobs &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Jobs can be run non-interactively as &#039;&#039;&#039;batch jobs&#039;&#039;&#039; or as &#039;&#039;&#039;interactive jobs&#039;&#039;&#039;.&lt;br /&gt;
Submitting a batch job means, that all steps of a compute project are defined in a Bash script. This Bash script is queued and executed as soon as the compute resources are available and allocated. Jobs are enqueued with the &#039;&#039;sbatch&#039;&#039; command.&lt;br /&gt;
&lt;br /&gt;
For interactive jobs, the resources are requested with the &#039;&#039;salloc&#039;&#039; command. As soon as the computing resources are available and allocated, a command line prompt is returned on a computing node and the user can freely dispose of the resources now available to him.&lt;br /&gt;
{|style=&amp;quot;background:#deffee; width:100%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;padding:5px; background:#cef2e0; text-align:left&amp;quot;|&lt;br /&gt;
[[Image:Attention.svg|center|25px]]&lt;br /&gt;
|style=&amp;quot;padding:5px; background:#cef2e0; text-align:left&amp;quot;|&lt;br /&gt;
&#039;&#039;&#039;Please remember:&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Heavy computations are not allowed on the login nodes&#039;&#039;&#039;.&amp;lt;br&amp;gt;Use a developement or a regular job queue instead! Please refer to [[BwUniCluster3.0/Login#Allowed_Activities_on_Login_Nodes|Allowed Activities on Login Nodes]].&lt;br /&gt;
* &#039;&#039;&#039;Development queues&#039;&#039;&#039; are meant for &#039;&#039;&#039;development tasks&#039;&#039;&#039;.&amp;lt;br&amp;gt;Do not misuse this queue for regular, short-running jobs or chain jobs! Only one running job at a time is enabled. Maximum queue length is reduced to 3.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Queues on bwUniCluster 3.0 = &lt;br /&gt;
== Policy ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Regular Queues ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
! style=&amp;quot;width:5%&amp;quot;| Queue&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Node-Type&lt;br /&gt;
! style=&amp;quot;width:23%&amp;quot;| Default Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Minimal Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Maximum Resources&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;cpu_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Ice Lake&lt;br /&gt;
| mem-per-cpu=1950mb&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=30, mem=249600mb, ntasks-per-node=64, (threads-per-core=2) &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;cpu&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Standard&lt;br /&gt;
| mem-per-cpu=1125mb&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=20, mem=380000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;highmem&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;High Memory&lt;br /&gt;
| mem-per-cpu=1125mb&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=4, mem=2300000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;gpu_h100&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;NVIDIA GPU x4&lt;br /&gt;
| mem-per-cpu=1125mb&amp;lt;br/&amp;gt;cpus-per-gpu=24&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=12, mem=760000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;gpu_mi300&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU node&amp;lt;br/&amp;gt;AMD GPU x4&lt;br /&gt;
| mem-per-cpu=1125mb&amp;lt;br/&amp;gt;cpus-per-gpu=24&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=1, mem=510000mb, ntasks-per-node=40, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;gpu_a100_il&amp;lt;/code&amp;gt;/&amp;lt;code&amp;gt;gpu_h100_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;Ice Lake&amp;lt;br/&amp;gt;NVIDIA GPU x4&lt;br /&gt;
| mem-per-gpu=127500mb&amp;lt;br/&amp;gt;cpus-per-gpu=16&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=9, mem=510000mb, ntasks-per-node=64, (threads-per-core=2) &lt;br /&gt;
|}&lt;br /&gt;
Table 1: Regular Queues&lt;br /&gt;
&lt;br /&gt;
== Development Queues ==&lt;br /&gt;
Only for development, i.e. debugging or performance optimization ...&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
! style=&amp;quot;width:5%&amp;quot;| Queue&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Node Type&lt;br /&gt;
! style=&amp;quot;width:23%&amp;quot;| Default Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Minimal Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Maximum Resources&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_cpu_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Ice Lake&lt;br /&gt;
| mem-per-cpu=1950mb&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=8, mem=249600mb, ntasks-per-node=64, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_cpu&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Standard&lt;br /&gt;
| mem-per-cpu=1125mb&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=180000mb, ntasks-per-node=40, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_highmem&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;High Memory&lt;br /&gt;
| mem-per-cpu=1125mb&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=180000mb, ntasks-per-node=40, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_gpu_h100&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;NVIDIA GPU x4&lt;br /&gt;
| mem-per-cpu=1125mb&amp;lt;br/&amp;gt;cpus-per-gpu=24&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=180000mb, ntasks-per-node=40, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_gpu_a100_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;NVIDIA GPU x4&amp;lt;br/&amp;gt;&lt;br /&gt;
| mem-per-gpu=127500mb&amp;lt;br/&amp;gt;cpus-per-gpu=16 &lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=510000mb, ntasks-per-node=64, (threads-per-core=2) &lt;br /&gt;
|}&lt;br /&gt;
Table 2: Development Queues&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Default resources of a queue class defines time, #tasks and memory if not explicitly given with sbatch command. Resource list acronyms &#039;&#039;--time&#039;&#039;, &#039;&#039;--ntasks&#039;&#039;, &#039;&#039;--nodes&#039;&#039;, &#039;&#039;--mem&#039;&#039; and &#039;&#039;--mem-per-cpu&#039;&#039; are described [[BwUniCluster_3.0_Slurm_common_Features|here]].&lt;br /&gt;
&lt;br /&gt;
== Check available resources ==&lt;br /&gt;
The Slurm command sinfo is used to view partition and node information for a system running Slurm. It incorporates down time, reservations, and node state information in determining the available backfill window. The sinfo command can only be used by the administrator.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
SCC has prepared a special script (sinfo_t_idle) to find out how many processors are available for immediate use on the system. It is anticipated that users will use this information to submit jobs that meet these criteria and thus obtain quick job turnaround times. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=== Example ===&lt;br /&gt;
* The following command displays what resources are available for immediate use for the whole partition.&lt;br /&gt;
&amp;lt;pre&amp;gt;$ sinfo_t_idle&lt;br /&gt;
Partition dev_cpu                 :      2 nodes idle&lt;br /&gt;
Partition cpu                     :     68 nodes idle&lt;br /&gt;
Partition highmem                 :      4 nodes idle&lt;br /&gt;
Partition dev_gpu_h100            :      0 nodes idle&lt;br /&gt;
Partition gpu_h100                :     11 nodes idle&lt;br /&gt;
Partition gpu_mi300               :      1 nodes idle&lt;br /&gt;
Partition dev_cpu_il              :      0 nodes idle&lt;br /&gt;
Partition cpu_il                  :      0 nodes idle&lt;br /&gt;
Partition dev_gpu_a100_il         :      0 nodes idle&lt;br /&gt;
Partition gpu_a100_il             :      0 nodes idle&lt;br /&gt;
Partition gpu_h100_il             :      0 nodes idle&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Running Jobs =&lt;br /&gt;
== Batch Jobs: sbatch ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To run your batch job on one of the cpu nodes, please use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sbatch --partition=dev_cpu&lt;br /&gt;
     or &lt;br /&gt;
$ sbatch -p dev_cpu&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Interactive Jobs: salloc ==&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 3.0 you are only allowed to run short jobs (&amp;lt;&amp;lt; 1 hour) with little memory requirements (&amp;lt;&amp;lt; 8 GByte) on the logins nodes. If you want to run longer jobs and/or jobs with a request of more than 8 GByte of memory, you must allocate resources for so-called interactive jobs by usage of the command salloc on a login node. Considering a serial application running on a compute node that requires 5000 MByte of memory and limiting the interactive run to 2 hours the following command has to be executed:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ salloc -p cpu -n 1 -t 120 --mem=5000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then you will get one core on a compute node within the partition &amp;quot;cpu&amp;quot;. After execution of this command &#039;&#039;&#039;DO NOT CLOSE&#039;&#039;&#039; your current terminal session but wait until the queueing system Slurm has granted you the requested resources on the compute system. You will be logged in automatically on the granted core! To run a serial program on the granted core you only have to type the name of the executable.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./&amp;lt;my_serial_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please be aware that your serial job must run less than 2 hours in this example, else the job will be killed during runtime by the system. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can also start now a graphical X11-terminal connecting you to the dedicated resource that is available for 2 hours. You can start it by the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ xterm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that, once the walltime limit has been reached the resources - i.e. the compute node - will automatically be revoked.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
An interactive parallel application running on one compute node or on many compute nodes (e.g. here 5 nodes) with 96 cores each requires usually an amount of memory in GByte (e.g. 50 GByte) and a maximum time (e.g. 1 hour). E.g. 5 nodes can be allocated by the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ salloc -p cpu -N 5 --ntasks-per-node=96 -t 01:00:00  --mem=50gb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you can run parallel jobs on 480 cores requiring 50 GByte of memory per node. Please be aware that you will be logged in on core 0 of the first node.&lt;br /&gt;
If you want to have access to another node you have to open a new terminal, connect it also to bwUniCluster 3.0 and type the following commands to&lt;br /&gt;
connect to the running interactive job and then to a specific node:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ srun --jobid=XXXXXXXX --pty /bin/bash&lt;br /&gt;
$ srun --nodelist=uc3nXXX --pty /bin/bash&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ squeue&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the jobid and the nodelist can be shown.&lt;br /&gt;
&lt;br /&gt;
If you want to run MPI-programs, you can do it by simply typing mpirun &amp;lt;program_name&amp;gt;. Then your program will be run on 480 cores. A very simple example for starting a parallel job can be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mpirun &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also start the debugger ddt by the commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module add devel/ddt&lt;br /&gt;
$ ddt &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above commands will execute the parallel program &amp;lt;my_mpi_program&amp;gt; on all available cores. You can also start parallel programs on a subset of cores; an example for this can be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mpirun -n 50 &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are using Intel MPI you must start &amp;lt;my_mpi_program&amp;gt; by the command mpiexec.hydra (instead of mpirun).&lt;br /&gt;
&lt;br /&gt;
== Interactive Computing with Jupyter ==&lt;br /&gt;
&lt;br /&gt;
== Monitor and manage jobs ==&lt;br /&gt;
scontrol show job displays detailed job state information and diagnostic output for all or a specified job of yours. Detailed information is available for active, pending and recently completed jobs. The command scontrol is explained in detail on the webpage https://slurm.schedmd.com/scontrol.html or via manpage (man scontrol). &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Display the state of all your jobs in normal mode: scontrol show job&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Display the state of a job with &amp;lt;jobid&amp;gt; in normal mode: scontrol show job &amp;lt;jobid&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Example ===&lt;br /&gt;
Here is an example from bwUniCluster 3.0.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
squeue    # show my own jobs (here the userid is replaced!)&lt;br /&gt;
             JOBID PARTITION     NAME     USER ST       TIME  NODES NODELIST(REASON)&lt;br /&gt;
              1262       cpu     wrap ka_zs040  R       1:12      1 uc3n002&lt;br /&gt;
&lt;br /&gt;
$&lt;br /&gt;
$ # now, see what&#039;s up with my pending job with jobid 1262&lt;br /&gt;
$ &lt;br /&gt;
$ scontrol show job 1262&lt;br /&gt;
&lt;br /&gt;
JobId=1262 JobName=wrap&lt;br /&gt;
   UserId=ka_zs0402(241992) GroupId=ka_scc(12345) MCS_label=N/A&lt;br /&gt;
   Priority=4246 Nice=0 Account=ka QOS=normal&lt;br /&gt;
   JobState=RUNNING Reason=None Dependency=(null)&lt;br /&gt;
   Requeue=1 Restarts=0 BatchFlag=1 Reboot=0 ExitCode=0:0&lt;br /&gt;
   RunTime=00:00:37 TimeLimit=00:20:00 TimeMin=N/A&lt;br /&gt;
   SubmitTime=2025-04-04T10:01:30 EligibleTime=2025-04-04T10:01:30&lt;br /&gt;
   AccrueTime=2025-04-04T10:01:30&lt;br /&gt;
   StartTime=2025-04-04T10:01:31 EndTime=2025-04-04T10:21:31 Deadline=N/A&lt;br /&gt;
   SuspendTime=None SecsPreSuspend=0 LastSchedEval=2025-04-04T10:01:31 Scheduler=Main&lt;br /&gt;
   Partition=cpu AllocNode:Sid=uc3n999:2819841&lt;br /&gt;
   ReqNodeList=(null) ExcNodeList=(null)&lt;br /&gt;
   NodeList=uc3n002&lt;br /&gt;
   BatchHost=uc3n002&lt;br /&gt;
   NumNodes=1 NumCPUs=2 NumTasks=1 CPUs/Task=1 ReqB:S:C:T=0:0:*:*&lt;br /&gt;
   ReqTRES=cpu=1,mem=2000M,node=1,billing=1&lt;br /&gt;
   AllocTRES=cpu=2,mem=4000M,node=1,billing=2&lt;br /&gt;
   Socks/Node=* NtasksPerN:B:S:C=0:0:*:1 CoreSpec=*&lt;br /&gt;
   MinCPUsNode=1 MinMemoryCPU=2000M MinTmpDiskNode=0&lt;br /&gt;
   Features=(null) DelayBoot=00:00:00&lt;br /&gt;
   OverSubscribe=OK Contiguous=0 Licenses=(null) Network=(null)&lt;br /&gt;
   Command=(null)&lt;br /&gt;
   WorkDir=/pfs/data6/home/ka/ka_scc/ka_zs0402&lt;br /&gt;
   StdErr=/pfs/data6/home/ka/ka_scc/ka_zs0402/slurm-1262.out&lt;br /&gt;
   StdIn=/dev/null&lt;br /&gt;
   StdOut=/pfs/data6/home/ka/ka_scc/ka_zs0402/slurm-1262.out&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Slurm Options =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Slurm Commands (excerpt) ==&lt;br /&gt;
Important Slurm commands for non-administrators working on bwUniCluster 3.0.&lt;br /&gt;
{| width=850px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Slurm commands !! Brief explanation&lt;br /&gt;
|-&lt;br /&gt;
| [[#Job submission : sbatch|sbatch]] || Submits a job and puts it into the queue [[https://slurm.schedmd.com/sbatch.html sbatch]] &lt;br /&gt;
|-&lt;br /&gt;
| [[#Interactive job : salloc|salloc]] || Requests resources for an interactive Job [[https://slurm.schedmd.com/salloc.html salloc]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Detailed job information : scontrol show job|scontrol show job]] || Displays detailed job state information [[https://slurm.schedmd.com/scontrol.html scontrol]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#List of your submitted jo/bs : squeue|squeue]] || Displays information about active, eligible, blocked, and/or recently completed jobs [[https://slurm.schedmd.com/squeue.html squeue]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Start time of job or resources : squeue|squeue --start]] || Returns start time of submitted job [[https://slurm.schedmd.com/squeue.html squeue]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Shows free resources : sinfo_t_idle|sinfo_t_idle]] || Shows what resources are available for immediate use [[https://slurm.schedmd.com/sinfo.html sinfo]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Canceling own jobs : scancel|scancel]] || Cancels a job [[https://slurm.schedmd.com/scancel.html scancel]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* [https://slurm.schedmd.com/tutorials.html  Slurm Tutorials]&lt;br /&gt;
* [https://slurm.schedmd.com/pdfs/summary.pdf  Slurm command/option summary (2 pages)]&lt;br /&gt;
* [https://slurm.schedmd.com/man_index.html  Slurm Commands]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Job submission : sbatch ==&lt;br /&gt;
Batch jobs are submitted by using the command &#039;&#039;&#039;sbatch&#039;&#039;&#039;. The main purpose of the &#039;&#039;&#039;sbatch&#039;&#039;&#039; command is to specify the resources that are needed to run the job. &#039;&#039;&#039;sbatch&#039;&#039;&#039; will then queue the batch job. However, starting of batch job depends on the availability of the requested resources and the fair sharing value.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=== Command parameters sbatch ===&lt;br /&gt;
The syntax and use of &#039;&#039;&#039;sbatch&#039;&#039;&#039; can be displayed via:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ man sbatch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;sbatch&#039;&#039;&#039; options can be used from the command line or in your job script. Different defaults for some of these options are set based on the queue and can be found [https://wiki.bwhpc.de/e/BwUniCluster3.0/Batch_Queues#sbatch_-p_queue here]&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | sbatch Options&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width:8%&amp;quot;| Command line&lt;br /&gt;
! style=&amp;quot;width:9%&amp;quot;| Script&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Purpose&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -t, --time=&#039;&#039;time&#039;&#039;&lt;br /&gt;
| #SBATCH --time=&#039;&#039;time&#039;&#039;&lt;br /&gt;
| Wall clock time limit.&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -N, --nodes=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --nodes=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of nodes to be used.&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -n, --ntasks=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --ntasks=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of tasks to be launched.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --ntasks-per-node=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --ntasks-per-node=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Maximum count of tasks per node.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -c, --cpus-per-task=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --cpus-per-task=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of CPUs required per (MPI-)task.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mem=&#039;&#039;value_in_MB&#039;&#039;&lt;br /&gt;
| #SBATCH --mem=&#039;&#039;value_in_MB&#039;&#039; &lt;br /&gt;
| Memory in MegaByte per node. (You should omit the setting of this option.)&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mem-per-cpu=&#039;&#039;value_in_MB&#039;&#039;&lt;br /&gt;
| #SBATCH --mem-per-cpu=&#039;&#039;value_in_MB&#039;&#039; &lt;br /&gt;
| Minimum Memory required per allocated CPU. (You should omit the setting of this option.)&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mail-type=&#039;&#039;type&#039;&#039;&lt;br /&gt;
| #SBATCH --mail-type=&#039;&#039;type&#039;&#039;&lt;br /&gt;
| Notify user by email when certain event types occur.&amp;lt;br&amp;gt;Valid type values are NONE, BEGIN, END, FAIL, REQUEUE, ALL.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mail-user=&#039;&#039;mail-address&#039;&#039;&lt;br /&gt;
| #SBATCH --mail-user=&#039;&#039;mail-address&#039;&#039;&lt;br /&gt;
|  The specified mail-address receives email notification of state changes as defined by --mail-type.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --output=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --output=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| File in which job output is stored. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --error=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --error=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| File in which job error messages are stored. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -J, --job-name=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --job-name=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| Job name.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --export=[ALL,] &#039;&#039;env-variables&#039;&#039;&lt;br /&gt;
| #SBATCH --export=[ALL,] &#039;&#039;env-variables&#039;&#039;&lt;br /&gt;
| Identifies which environment variables from the submission environment are propagated to the launched application. Default is ALL.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -A, --account=&#039;&#039;group-name&#039;&#039;&lt;br /&gt;
| #SBATCH --account=&#039;&#039;group-name&#039;&#039;&lt;br /&gt;
| Change resources used by this job to specified group. You may need this option if your account is assigned to more than one group. By command &amp;quot;scontrol show job&amp;quot; the project group the job is accounted on can be seen behind &amp;quot;Account=&amp;quot;. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -p, --partition=&#039;&#039;queue-name&#039;&#039;&lt;br /&gt;
| #SBATCH --partition=&#039;&#039;queue-name&#039;&#039;&lt;br /&gt;
| Request a specific queue for the resource allocation.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --reservation=&#039;&#039;reservation-name&#039;&#039;&lt;br /&gt;
| #SBATCH --reservation=&#039;&#039;reservation-name&#039;&#039;&lt;br /&gt;
| Use a specific reservation for the resource allocation.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -C, --constraint=&#039;&#039;LSDF&#039;&#039;&lt;br /&gt;
| #SBATCH --constraint=LSDF&lt;br /&gt;
| Job constraint LSDF filesystems.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -C, --constraint=&#039;&#039;BEEOND (BEEOND_4MDS, BEEOND_MAXMDS)&#039;&#039;&lt;br /&gt;
| #SBATCH --constraint=BEEOND (BEEOND_4MDS, BEEOND_MAXMDS)&lt;br /&gt;
| Job constraint BeeOND filesystem.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Best Practices =&lt;br /&gt;
&lt;br /&gt;
== Step-by-Step example==&lt;br /&gt;
&lt;br /&gt;
== Dos and Don&#039;ts ==&lt;/div&gt;</summary>
		<author><name>P Schuhmacher</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster3.0/Running_Jobs&amp;diff=14635</id>
		<title>BwUniCluster3.0/Running Jobs</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster3.0/Running_Jobs&amp;diff=14635"/>
		<updated>2025-04-04T15:00:44Z</updated>

		<summary type="html">&lt;p&gt;P Schuhmacher: /* Monitor and manage jobs */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
= Purpose and function of a queuing system =&lt;br /&gt;
&lt;br /&gt;
General procedure: Hint to [[Running_Calculations | Running Calculations]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Job submission process ==&lt;br /&gt;
&lt;br /&gt;
bwUniCluster 3.0 has installed the workload managing software Slurm. Therefore any job submission by the user is to be executed by commands of the Slurm software. Slurm queues and runs user jobs based on fair sharing policies.&lt;br /&gt;
&lt;br /&gt;
== Slurm ==&lt;br /&gt;
&lt;br /&gt;
HPC Workload Manager on bwUniCluster 3.0 is Slurm.&lt;br /&gt;
Slurm is a cluster management and job scheduling system. Slurm has three key functions. &lt;br /&gt;
* First, it allocates access to resources (compute cores on nodes) to users for some duration of time so they can perform work. &lt;br /&gt;
* it provides a framework for starting, executing, and monitoring work (normally a parallel job) on the set of allocated nodes. &lt;br /&gt;
* it arbitrates contention for resources by managing a queue of pending work.&lt;br /&gt;
&lt;br /&gt;
Any kind of calculation on the compute nodes of bwUniCluster 3.0 requires the user to define calculations as a sequence of commands together with required run time, number of CPU cores and main memory and submit all, i.e., the &#039;&#039;&#039;batch job&#039;&#039;&#039;, to a resource and workload managing software. &lt;br /&gt;
== Terms and definitions ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Partitions &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Slurm manages job queues for different &#039;&#039;&#039;partitions&#039;&#039;&#039;. Partitions are used to group similar node types (e.g. nodes with and without accelerators) and to enforce different access policies and resource limits.&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 3.0 there are different partitions:&lt;br /&gt;
&lt;br /&gt;
* CPU-only nodes&lt;br /&gt;
** 2-socket nodes, consisting of 2 Intel Ice Lake processors with 32 cores each or 2 AMD processors with 48 cores each&lt;br /&gt;
** 2-socket nodes with very high RAM capacity, consisting of 2 AMD processors with 48 cores each&lt;br /&gt;
* GPU-accelerated nodes&lt;br /&gt;
** 2-socket nodes with 4x NVIDIA A100 or 4x NVIDIA H100 GPUs&lt;br /&gt;
** 4-socket node with 4x AMD Instinct accelerator&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Queues &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Job &#039;&#039;&#039;queues&#039;&#039;&#039; are used to manage jobs that request access to shared but limited computing resources of a certain kind (partition).&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 3.0 there are different main types of queues:&lt;br /&gt;
* Regular queues&lt;br /&gt;
** cpu: Jobs that request CPU-only nodes.&lt;br /&gt;
** gpu: Jobs that request GPU-accelerated nodes.&lt;br /&gt;
* Development queues (dev)&lt;br /&gt;
** Short, usually interactive jobs that are used for developing, compiling and testing code and workflows. The intention behind development queues is to provide users with immediate access to computer resources without having to wait. This is the place to realize instantaneous heavy compute without affecting other users, as would be the case on the login nodes.&lt;br /&gt;
&lt;br /&gt;
Requested compute resources such as (wall-)time, number of nodes and amount of memory are restricted and must fit into the boundaries imposed by the queues. The request for compute resources on the bwUniCluster 3.0 &amp;lt;font color=red&amp;gt;requires at least the specification of the &#039;&#039;&#039;queue&#039;&#039;&#039; and the &#039;&#039;&#039;time&#039;&#039;&#039;&amp;lt;/font&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Jobs &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Jobs can be run non-interactively as &#039;&#039;&#039;batch jobs&#039;&#039;&#039; or as &#039;&#039;&#039;interactive jobs&#039;&#039;&#039;.&lt;br /&gt;
Submitting a batch job means, that all steps of a compute project are defined in a Bash script. This Bash script is queued and executed as soon as the compute resources are available and allocated. Jobs are enqueued with the &#039;&#039;sbatch&#039;&#039; command.&lt;br /&gt;
&lt;br /&gt;
For interactive jobs, the resources are requested with the &#039;&#039;salloc&#039;&#039; command. As soon as the computing resources are available and allocated, a command line prompt is returned on a computing node and the user can freely dispose of the resources now available to him.&lt;br /&gt;
{|style=&amp;quot;background:#deffee; width:100%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;padding:5px; background:#cef2e0; text-align:left&amp;quot;|&lt;br /&gt;
[[Image:Attention.svg|center|25px]]&lt;br /&gt;
|style=&amp;quot;padding:5px; background:#cef2e0; text-align:left&amp;quot;|&lt;br /&gt;
&#039;&#039;&#039;Please remember:&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Heavy computations are not allowed on the login nodes&#039;&#039;&#039;.&amp;lt;br&amp;gt;Use a developement or a regular job queue instead! Please refer to [[BwUniCluster3.0/Login#Allowed_Activities_on_Login_Nodes|Allowed Activities on Login Nodes]].&lt;br /&gt;
* &#039;&#039;&#039;Development queues&#039;&#039;&#039; are meant for &#039;&#039;&#039;development tasks&#039;&#039;&#039;.&amp;lt;br&amp;gt;Do not misuse this queue for regular, short-running jobs or chain jobs! Only one running job at a time is enabled. Maximum queue length is reduced to 3.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Queues on bwUniCluster 3.0 = &lt;br /&gt;
== Policy ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Regular Queues ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
! style=&amp;quot;width:5%&amp;quot;| Queue&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Node-Type&lt;br /&gt;
! style=&amp;quot;width:23%&amp;quot;| Default Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Minimal Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Maximum Resources&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;cpu_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Ice Lake&lt;br /&gt;
| mem-per-cpu=1950mb&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=30, mem=249600mb, ntasks-per-node=64, (threads-per-core=2) &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;cpu&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Standard&lt;br /&gt;
| mem-per-cpu=1125mb&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=20, mem=380000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;highmem&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;High Memory&lt;br /&gt;
| mem-per-cpu=1125mb&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=4, mem=2300000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;gpu_h100&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;NVIDIA GPU x4&lt;br /&gt;
| mem-per-cpu=1125mb&amp;lt;br/&amp;gt;cpus-per-gpu=24&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=12, mem=760000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;gpu_mi300&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU node&amp;lt;br/&amp;gt;AMD GPU x4&lt;br /&gt;
| mem-per-cpu=1125mb&amp;lt;br/&amp;gt;cpus-per-gpu=24&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=1, mem=510000mb, ntasks-per-node=40, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;gpu_a100_il&amp;lt;/code&amp;gt;/&amp;lt;code&amp;gt;gpu_h100_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;Ice Lake&amp;lt;br/&amp;gt;NVIDIA GPU x4&lt;br /&gt;
| mem-per-gpu=127500mb&amp;lt;br/&amp;gt;cpus-per-gpu=16&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=9, mem=510000mb, ntasks-per-node=64, (threads-per-core=2) &lt;br /&gt;
|}&lt;br /&gt;
Table 1: Regular Queues&lt;br /&gt;
&lt;br /&gt;
== Development Queues ==&lt;br /&gt;
Only for development, i.e. debugging or performance optimization ...&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
! style=&amp;quot;width:5%&amp;quot;| Queue&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Node Type&lt;br /&gt;
! style=&amp;quot;width:23%&amp;quot;| Default Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Minimal Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Maximum Resources&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_cpu_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Ice Lake&lt;br /&gt;
| mem-per-cpu=1950mb&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=8, mem=249600mb, ntasks-per-node=64, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_cpu&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Standard&lt;br /&gt;
| mem-per-cpu=1125mb&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=180000mb, ntasks-per-node=40, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_highmem&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;High Memory&lt;br /&gt;
| mem-per-cpu=1125mb&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=180000mb, ntasks-per-node=40, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_gpu_h100&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;NVIDIA GPU x4&lt;br /&gt;
| mem-per-cpu=1125mb&amp;lt;br/&amp;gt;cpus-per-gpu=24&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=180000mb, ntasks-per-node=40, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_gpu_a100_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;NVIDIA GPU x4&amp;lt;br/&amp;gt;&lt;br /&gt;
| mem-per-gpu=127500mb&amp;lt;br/&amp;gt;cpus-per-gpu=16 &lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=510000mb, ntasks-per-node=64, (threads-per-core=2) &lt;br /&gt;
|}&lt;br /&gt;
Table 2: Development Queues&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Default resources of a queue class defines time, #tasks and memory if not explicitly given with sbatch command. Resource list acronyms &#039;&#039;--time&#039;&#039;, &#039;&#039;--ntasks&#039;&#039;, &#039;&#039;--nodes&#039;&#039;, &#039;&#039;--mem&#039;&#039; and &#039;&#039;--mem-per-cpu&#039;&#039; are described [[BwUniCluster_3.0_Slurm_common_Features|here]].&lt;br /&gt;
&lt;br /&gt;
== Check available resources ==&lt;br /&gt;
The Slurm command sinfo is used to view partition and node information for a system running Slurm. It incorporates down time, reservations, and node state information in determining the available backfill window. The sinfo command can only be used by the administrator.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
SCC has prepared a special script (sinfo_t_idle) to find out how many processors are available for immediate use on the system. It is anticipated that users will use this information to submit jobs that meet these criteria and thus obtain quick job turnaround times. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=== Example ===&lt;br /&gt;
* The following command displays what resources are available for immediate use for the whole partition.&lt;br /&gt;
&amp;lt;pre&amp;gt;$ sinfo_t_idle&lt;br /&gt;
Partition dev_cpu                 :      2 nodes idle&lt;br /&gt;
Partition cpu                     :     68 nodes idle&lt;br /&gt;
Partition highmem                 :      4 nodes idle&lt;br /&gt;
Partition dev_gpu_h100            :      0 nodes idle&lt;br /&gt;
Partition gpu_h100                :     11 nodes idle&lt;br /&gt;
Partition gpu_mi300               :      1 nodes idle&lt;br /&gt;
Partition dev_cpu_il              :      0 nodes idle&lt;br /&gt;
Partition cpu_il                  :      0 nodes idle&lt;br /&gt;
Partition dev_gpu_a100_il         :      0 nodes idle&lt;br /&gt;
Partition gpu_a100_il             :      0 nodes idle&lt;br /&gt;
Partition gpu_h100_il             :      0 nodes idle&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Running Jobs =&lt;br /&gt;
== Batch Jobs: sbatch ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To run your batch job on one of the cpu nodes, please use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sbatch --partition=dev_cpu&lt;br /&gt;
     or &lt;br /&gt;
$ sbatch -p dev_cpu&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Interactive Jobs: salloc ==&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 3.0 you are only allowed to run short jobs (&amp;lt;&amp;lt; 1 hour) with little memory requirements (&amp;lt;&amp;lt; 8 GByte) on the logins nodes. If you want to run longer jobs and/or jobs with a request of more than 8 GByte of memory, you must allocate resources for so-called interactive jobs by usage of the command salloc on a login node. Considering a serial application running on a compute node that requires 5000 MByte of memory and limiting the interactive run to 2 hours the following command has to be executed:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ salloc -p cpu -n 1 -t 120 --mem=5000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then you will get one core on a compute node within the partition &amp;quot;cpu&amp;quot;. After execution of this command &#039;&#039;&#039;DO NOT CLOSE&#039;&#039;&#039; your current terminal session but wait until the queueing system Slurm has granted you the requested resources on the compute system. You will be logged in automatically on the granted core! To run a serial program on the granted core you only have to type the name of the executable.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./&amp;lt;my_serial_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please be aware that your serial job must run less than 2 hours in this example, else the job will be killed during runtime by the system. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can also start now a graphical X11-terminal connecting you to the dedicated resource that is available for 2 hours. You can start it by the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ xterm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that, once the walltime limit has been reached the resources - i.e. the compute node - will automatically be revoked.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
An interactive parallel application running on one compute node or on many compute nodes (e.g. here 5 nodes) with 96 cores each requires usually an amount of memory in GByte (e.g. 50 GByte) and a maximum time (e.g. 1 hour). E.g. 5 nodes can be allocated by the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ salloc -p cpu -N 5 --ntasks-per-node=96 -t 01:00:00  --mem=50gb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you can run parallel jobs on 480 cores requiring 50 GByte of memory per node. Please be aware that you will be logged in on core 0 of the first node.&lt;br /&gt;
If you want to have access to another node you have to open a new terminal, connect it also to bwUniCluster 3.0 and type the following commands to&lt;br /&gt;
connect to the running interactive job and then to a specific node:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ srun --jobid=XXXXXXXX --pty /bin/bash&lt;br /&gt;
$ srun --nodelist=uc3nXXX --pty /bin/bash&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ squeue&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the jobid and the nodelist can be shown.&lt;br /&gt;
&lt;br /&gt;
If you want to run MPI-programs, you can do it by simply typing mpirun &amp;lt;program_name&amp;gt;. Then your program will be run on 480 cores. A very simple example for starting a parallel job can be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mpirun &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also start the debugger ddt by the commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module add devel/ddt&lt;br /&gt;
$ ddt &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above commands will execute the parallel program &amp;lt;my_mpi_program&amp;gt; on all available cores. You can also start parallel programs on a subset of cores; an example for this can be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mpirun -n 50 &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are using Intel MPI you must start &amp;lt;my_mpi_program&amp;gt; by the command mpiexec.hydra (instead of mpirun).&lt;br /&gt;
&lt;br /&gt;
== Interactive Computing with Jupyter ==&lt;br /&gt;
&lt;br /&gt;
== Monitor and manage jobs ==&lt;br /&gt;
scontrol show job displays detailed job state information and diagnostic output for all or a specified job of yours. Detailed information is available for active, pending and recently completed jobs. The command scontrol is explained in detail on the webpage https://slurm.schedmd.com/scontrol.html or via manpage (man scontrol). &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Display the state of all your jobs in normal mode: scontrol show job&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Display the state of a job with &amp;lt;jobid&amp;gt; in normal mode: scontrol show job &amp;lt;jobid&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Scontrol show job Example ===&lt;br /&gt;
Here is an example from bwUniCluster 3.0.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
squeue    # show my own jobs (here the userid is replaced!)&lt;br /&gt;
             JOBID PARTITION     NAME     USER ST       TIME  NODES NODELIST(REASON)&lt;br /&gt;
              1262       cpu     wrap ka_zs040  R       1:12      1 uc3n002&lt;br /&gt;
&lt;br /&gt;
$&lt;br /&gt;
$ # now, see what&#039;s up with my pending job with jobid 1262&lt;br /&gt;
$ &lt;br /&gt;
$ scontrol show job 1262&lt;br /&gt;
&lt;br /&gt;
JobId=1262 JobName=wrap&lt;br /&gt;
   UserId=ka_zs0402(241992) GroupId=ka_scc(12345) MCS_label=N/A&lt;br /&gt;
   Priority=4246 Nice=0 Account=ka QOS=normal&lt;br /&gt;
   JobState=RUNNING Reason=None Dependency=(null)&lt;br /&gt;
   Requeue=1 Restarts=0 BatchFlag=1 Reboot=0 ExitCode=0:0&lt;br /&gt;
   RunTime=00:00:37 TimeLimit=00:20:00 TimeMin=N/A&lt;br /&gt;
   SubmitTime=2025-04-04T10:01:30 EligibleTime=2025-04-04T10:01:30&lt;br /&gt;
   AccrueTime=2025-04-04T10:01:30&lt;br /&gt;
   StartTime=2025-04-04T10:01:31 EndTime=2025-04-04T10:21:31 Deadline=N/A&lt;br /&gt;
   SuspendTime=None SecsPreSuspend=0 LastSchedEval=2025-04-04T10:01:31 Scheduler=Main&lt;br /&gt;
   Partition=cpu AllocNode:Sid=uc3n999:2819841&lt;br /&gt;
   ReqNodeList=(null) ExcNodeList=(null)&lt;br /&gt;
   NodeList=uc3n002&lt;br /&gt;
   BatchHost=uc3n002&lt;br /&gt;
   NumNodes=1 NumCPUs=2 NumTasks=1 CPUs/Task=1 ReqB:S:C:T=0:0:*:*&lt;br /&gt;
   ReqTRES=cpu=1,mem=2000M,node=1,billing=1&lt;br /&gt;
   AllocTRES=cpu=2,mem=4000M,node=1,billing=2&lt;br /&gt;
   Socks/Node=* NtasksPerN:B:S:C=0:0:*:1 CoreSpec=*&lt;br /&gt;
   MinCPUsNode=1 MinMemoryCPU=2000M MinTmpDiskNode=0&lt;br /&gt;
   Features=(null) DelayBoot=00:00:00&lt;br /&gt;
   OverSubscribe=OK Contiguous=0 Licenses=(null) Network=(null)&lt;br /&gt;
   Command=(null)&lt;br /&gt;
   WorkDir=/pfs/data6/home/ka/ka_scc/ka_zs0402&lt;br /&gt;
   StdErr=/pfs/data6/home/ka/ka_scc/ka_zs0402/slurm-1262.out&lt;br /&gt;
   StdIn=/dev/null&lt;br /&gt;
   StdOut=/pfs/data6/home/ka/ka_scc/ka_zs0402/slurm-1262.out&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Slurm Options =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Slurm Commands (excerpt) ==&lt;br /&gt;
Important Slurm commands for non-administrators working on bwUniCluster 3.0.&lt;br /&gt;
{| width=850px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Slurm commands !! Brief explanation&lt;br /&gt;
|-&lt;br /&gt;
| [[#Job submission : sbatch|sbatch]] || Submits a job and puts it into the queue [[https://slurm.schedmd.com/sbatch.html sbatch]] &lt;br /&gt;
|-&lt;br /&gt;
| [[#Interactive job : salloc|salloc]] || Requests resources for an interactive Job [[https://slurm.schedmd.com/salloc.html salloc]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Detailed job information : scontrol show job|scontrol show job]] || Displays detailed job state information [[https://slurm.schedmd.com/scontrol.html scontrol]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#List of your submitted jo/bs : squeue|squeue]] || Displays information about active, eligible, blocked, and/or recently completed jobs [[https://slurm.schedmd.com/squeue.html squeue]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Start time of job or resources : squeue|squeue --start]] || Returns start time of submitted job [[https://slurm.schedmd.com/squeue.html squeue]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Shows free resources : sinfo_t_idle|sinfo_t_idle]] || Shows what resources are available for immediate use [[https://slurm.schedmd.com/sinfo.html sinfo]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Canceling own jobs : scancel|scancel]] || Cancels a job [[https://slurm.schedmd.com/scancel.html scancel]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* [https://slurm.schedmd.com/tutorials.html  Slurm Tutorials]&lt;br /&gt;
* [https://slurm.schedmd.com/pdfs/summary.pdf  Slurm command/option summary (2 pages)]&lt;br /&gt;
* [https://slurm.schedmd.com/man_index.html  Slurm Commands]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Job submission : sbatch ==&lt;br /&gt;
Batch jobs are submitted by using the command &#039;&#039;&#039;sbatch&#039;&#039;&#039;. The main purpose of the &#039;&#039;&#039;sbatch&#039;&#039;&#039; command is to specify the resources that are needed to run the job. &#039;&#039;&#039;sbatch&#039;&#039;&#039; will then queue the batch job. However, starting of batch job depends on the availability of the requested resources and the fair sharing value.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=== Command parameters sbatch ===&lt;br /&gt;
The syntax and use of &#039;&#039;&#039;sbatch&#039;&#039;&#039; can be displayed via:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ man sbatch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;sbatch&#039;&#039;&#039; options can be used from the command line or in your job script. Different defaults for some of these options are set based on the queue and can be found [https://wiki.bwhpc.de/e/BwUniCluster3.0/Batch_Queues#sbatch_-p_queue here]&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | sbatch Options&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width:8%&amp;quot;| Command line&lt;br /&gt;
! style=&amp;quot;width:9%&amp;quot;| Script&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Purpose&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -t, --time=&#039;&#039;time&#039;&#039;&lt;br /&gt;
| #SBATCH --time=&#039;&#039;time&#039;&#039;&lt;br /&gt;
| Wall clock time limit.&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -N, --nodes=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --nodes=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of nodes to be used.&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -n, --ntasks=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --ntasks=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of tasks to be launched.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --ntasks-per-node=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --ntasks-per-node=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Maximum count of tasks per node.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -c, --cpus-per-task=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --cpus-per-task=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of CPUs required per (MPI-)task.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mem=&#039;&#039;value_in_MB&#039;&#039;&lt;br /&gt;
| #SBATCH --mem=&#039;&#039;value_in_MB&#039;&#039; &lt;br /&gt;
| Memory in MegaByte per node. (You should omit the setting of this option.)&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mem-per-cpu=&#039;&#039;value_in_MB&#039;&#039;&lt;br /&gt;
| #SBATCH --mem-per-cpu=&#039;&#039;value_in_MB&#039;&#039; &lt;br /&gt;
| Minimum Memory required per allocated CPU. (You should omit the setting of this option.)&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mail-type=&#039;&#039;type&#039;&#039;&lt;br /&gt;
| #SBATCH --mail-type=&#039;&#039;type&#039;&#039;&lt;br /&gt;
| Notify user by email when certain event types occur.&amp;lt;br&amp;gt;Valid type values are NONE, BEGIN, END, FAIL, REQUEUE, ALL.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mail-user=&#039;&#039;mail-address&#039;&#039;&lt;br /&gt;
| #SBATCH --mail-user=&#039;&#039;mail-address&#039;&#039;&lt;br /&gt;
|  The specified mail-address receives email notification of state changes as defined by --mail-type.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --output=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --output=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| File in which job output is stored. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --error=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --error=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| File in which job error messages are stored. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -J, --job-name=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --job-name=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| Job name.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --export=[ALL,] &#039;&#039;env-variables&#039;&#039;&lt;br /&gt;
| #SBATCH --export=[ALL,] &#039;&#039;env-variables&#039;&#039;&lt;br /&gt;
| Identifies which environment variables from the submission environment are propagated to the launched application. Default is ALL.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -A, --account=&#039;&#039;group-name&#039;&#039;&lt;br /&gt;
| #SBATCH --account=&#039;&#039;group-name&#039;&#039;&lt;br /&gt;
| Change resources used by this job to specified group. You may need this option if your account is assigned to more than one group. By command &amp;quot;scontrol show job&amp;quot; the project group the job is accounted on can be seen behind &amp;quot;Account=&amp;quot;. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -p, --partition=&#039;&#039;queue-name&#039;&#039;&lt;br /&gt;
| #SBATCH --partition=&#039;&#039;queue-name&#039;&#039;&lt;br /&gt;
| Request a specific queue for the resource allocation.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --reservation=&#039;&#039;reservation-name&#039;&#039;&lt;br /&gt;
| #SBATCH --reservation=&#039;&#039;reservation-name&#039;&#039;&lt;br /&gt;
| Use a specific reservation for the resource allocation.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -C, --constraint=&#039;&#039;LSDF&#039;&#039;&lt;br /&gt;
| #SBATCH --constraint=LSDF&lt;br /&gt;
| Job constraint LSDF filesystems.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -C, --constraint=&#039;&#039;BEEOND (BEEOND_4MDS, BEEOND_MAXMDS)&#039;&#039;&lt;br /&gt;
| #SBATCH --constraint=BEEOND (BEEOND_4MDS, BEEOND_MAXMDS)&lt;br /&gt;
| Job constraint BeeOND filesystem.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Best Practices =&lt;br /&gt;
&lt;br /&gt;
== Step-by-Step example==&lt;br /&gt;
&lt;br /&gt;
== Dos and Don&#039;ts ==&lt;/div&gt;</summary>
		<author><name>P Schuhmacher</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster3.0/Running_Jobs&amp;diff=14634</id>
		<title>BwUniCluster3.0/Running Jobs</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster3.0/Running_Jobs&amp;diff=14634"/>
		<updated>2025-04-04T14:53:06Z</updated>

		<summary type="html">&lt;p&gt;P Schuhmacher: /* Check available resources */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
= Purpose and function of a queuing system =&lt;br /&gt;
&lt;br /&gt;
General procedure: Hint to [[Running_Calculations | Running Calculations]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Job submission process ==&lt;br /&gt;
&lt;br /&gt;
bwUniCluster 3.0 has installed the workload managing software Slurm. Therefore any job submission by the user is to be executed by commands of the Slurm software. Slurm queues and runs user jobs based on fair sharing policies.&lt;br /&gt;
&lt;br /&gt;
== Slurm ==&lt;br /&gt;
&lt;br /&gt;
HPC Workload Manager on bwUniCluster 3.0 is Slurm.&lt;br /&gt;
Slurm is a cluster management and job scheduling system. Slurm has three key functions. &lt;br /&gt;
* First, it allocates access to resources (compute cores on nodes) to users for some duration of time so they can perform work. &lt;br /&gt;
* it provides a framework for starting, executing, and monitoring work (normally a parallel job) on the set of allocated nodes. &lt;br /&gt;
* it arbitrates contention for resources by managing a queue of pending work.&lt;br /&gt;
&lt;br /&gt;
Any kind of calculation on the compute nodes of bwUniCluster 3.0 requires the user to define calculations as a sequence of commands together with required run time, number of CPU cores and main memory and submit all, i.e., the &#039;&#039;&#039;batch job&#039;&#039;&#039;, to a resource and workload managing software. &lt;br /&gt;
== Terms and definitions ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Partitions &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Slurm manages job queues for different &#039;&#039;&#039;partitions&#039;&#039;&#039;. Partitions are used to group similar node types (e.g. nodes with and without accelerators) and to enforce different access policies and resource limits.&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 3.0 there are different partitions:&lt;br /&gt;
&lt;br /&gt;
* CPU-only nodes&lt;br /&gt;
** 2-socket nodes, consisting of 2 Intel Ice Lake processors with 32 cores each or 2 AMD processors with 48 cores each&lt;br /&gt;
** 2-socket nodes with very high RAM capacity, consisting of 2 AMD processors with 48 cores each&lt;br /&gt;
* GPU-accelerated nodes&lt;br /&gt;
** 2-socket nodes with 4x NVIDIA A100 or 4x NVIDIA H100 GPUs&lt;br /&gt;
** 4-socket node with 4x AMD Instinct accelerator&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Queues &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Job &#039;&#039;&#039;queues&#039;&#039;&#039; are used to manage jobs that request access to shared but limited computing resources of a certain kind (partition).&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 3.0 there are different main types of queues:&lt;br /&gt;
* Regular queues&lt;br /&gt;
** cpu: Jobs that request CPU-only nodes.&lt;br /&gt;
** gpu: Jobs that request GPU-accelerated nodes.&lt;br /&gt;
* Development queues (dev)&lt;br /&gt;
** Short, usually interactive jobs that are used for developing, compiling and testing code and workflows. The intention behind development queues is to provide users with immediate access to computer resources without having to wait. This is the place to realize instantaneous heavy compute without affecting other users, as would be the case on the login nodes.&lt;br /&gt;
&lt;br /&gt;
Requested compute resources such as (wall-)time, number of nodes and amount of memory are restricted and must fit into the boundaries imposed by the queues. The request for compute resources on the bwUniCluster 3.0 &amp;lt;font color=red&amp;gt;requires at least the specification of the &#039;&#039;&#039;queue&#039;&#039;&#039; and the &#039;&#039;&#039;time&#039;&#039;&#039;&amp;lt;/font&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Jobs &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Jobs can be run non-interactively as &#039;&#039;&#039;batch jobs&#039;&#039;&#039; or as &#039;&#039;&#039;interactive jobs&#039;&#039;&#039;.&lt;br /&gt;
Submitting a batch job means, that all steps of a compute project are defined in a Bash script. This Bash script is queued and executed as soon as the compute resources are available and allocated. Jobs are enqueued with the &#039;&#039;sbatch&#039;&#039; command.&lt;br /&gt;
&lt;br /&gt;
For interactive jobs, the resources are requested with the &#039;&#039;salloc&#039;&#039; command. As soon as the computing resources are available and allocated, a command line prompt is returned on a computing node and the user can freely dispose of the resources now available to him.&lt;br /&gt;
{|style=&amp;quot;background:#deffee; width:100%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;padding:5px; background:#cef2e0; text-align:left&amp;quot;|&lt;br /&gt;
[[Image:Attention.svg|center|25px]]&lt;br /&gt;
|style=&amp;quot;padding:5px; background:#cef2e0; text-align:left&amp;quot;|&lt;br /&gt;
&#039;&#039;&#039;Please remember:&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Heavy computations are not allowed on the login nodes&#039;&#039;&#039;.&amp;lt;br&amp;gt;Use a developement or a regular job queue instead! Please refer to [[BwUniCluster3.0/Login#Allowed_Activities_on_Login_Nodes|Allowed Activities on Login Nodes]].&lt;br /&gt;
* &#039;&#039;&#039;Development queues&#039;&#039;&#039; are meant for &#039;&#039;&#039;development tasks&#039;&#039;&#039;.&amp;lt;br&amp;gt;Do not misuse this queue for regular, short-running jobs or chain jobs! Only one running job at a time is enabled. Maximum queue length is reduced to 3.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Queues on bwUniCluster 3.0 = &lt;br /&gt;
== Policy ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Regular Queues ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
! style=&amp;quot;width:5%&amp;quot;| Queue&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Node-Type&lt;br /&gt;
! style=&amp;quot;width:23%&amp;quot;| Default Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Minimal Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Maximum Resources&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;cpu_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Ice Lake&lt;br /&gt;
| mem-per-cpu=1950mb&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=30, mem=249600mb, ntasks-per-node=64, (threads-per-core=2) &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;cpu&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Standard&lt;br /&gt;
| mem-per-cpu=1125mb&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=20, mem=380000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;highmem&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;High Memory&lt;br /&gt;
| mem-per-cpu=1125mb&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=4, mem=2300000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;gpu_h100&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;NVIDIA GPU x4&lt;br /&gt;
| mem-per-cpu=1125mb&amp;lt;br/&amp;gt;cpus-per-gpu=24&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=12, mem=760000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;gpu_mi300&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU node&amp;lt;br/&amp;gt;AMD GPU x4&lt;br /&gt;
| mem-per-cpu=1125mb&amp;lt;br/&amp;gt;cpus-per-gpu=24&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=1, mem=510000mb, ntasks-per-node=40, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;gpu_a100_il&amp;lt;/code&amp;gt;/&amp;lt;code&amp;gt;gpu_h100_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;Ice Lake&amp;lt;br/&amp;gt;NVIDIA GPU x4&lt;br /&gt;
| mem-per-gpu=127500mb&amp;lt;br/&amp;gt;cpus-per-gpu=16&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=9, mem=510000mb, ntasks-per-node=64, (threads-per-core=2) &lt;br /&gt;
|}&lt;br /&gt;
Table 1: Regular Queues&lt;br /&gt;
&lt;br /&gt;
== Development Queues ==&lt;br /&gt;
Only for development, i.e. debugging or performance optimization ...&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
! style=&amp;quot;width:5%&amp;quot;| Queue&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Node Type&lt;br /&gt;
! style=&amp;quot;width:23%&amp;quot;| Default Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Minimal Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Maximum Resources&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_cpu_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Ice Lake&lt;br /&gt;
| mem-per-cpu=1950mb&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=8, mem=249600mb, ntasks-per-node=64, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_cpu&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Standard&lt;br /&gt;
| mem-per-cpu=1125mb&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=180000mb, ntasks-per-node=40, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_highmem&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;High Memory&lt;br /&gt;
| mem-per-cpu=1125mb&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=180000mb, ntasks-per-node=40, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_gpu_h100&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;NVIDIA GPU x4&lt;br /&gt;
| mem-per-cpu=1125mb&amp;lt;br/&amp;gt;cpus-per-gpu=24&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=180000mb, ntasks-per-node=40, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_gpu_a100_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;NVIDIA GPU x4&amp;lt;br/&amp;gt;&lt;br /&gt;
| mem-per-gpu=127500mb&amp;lt;br/&amp;gt;cpus-per-gpu=16 &lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=510000mb, ntasks-per-node=64, (threads-per-core=2) &lt;br /&gt;
|}&lt;br /&gt;
Table 2: Development Queues&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Default resources of a queue class defines time, #tasks and memory if not explicitly given with sbatch command. Resource list acronyms &#039;&#039;--time&#039;&#039;, &#039;&#039;--ntasks&#039;&#039;, &#039;&#039;--nodes&#039;&#039;, &#039;&#039;--mem&#039;&#039; and &#039;&#039;--mem-per-cpu&#039;&#039; are described [[BwUniCluster_3.0_Slurm_common_Features|here]].&lt;br /&gt;
&lt;br /&gt;
== Check available resources ==&lt;br /&gt;
The Slurm command sinfo is used to view partition and node information for a system running Slurm. It incorporates down time, reservations, and node state information in determining the available backfill window. The sinfo command can only be used by the administrator.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
SCC has prepared a special script (sinfo_t_idle) to find out how many processors are available for immediate use on the system. It is anticipated that users will use this information to submit jobs that meet these criteria and thus obtain quick job turnaround times. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=== Example ===&lt;br /&gt;
* The following command displays what resources are available for immediate use for the whole partition.&lt;br /&gt;
&amp;lt;pre&amp;gt;$ sinfo_t_idle&lt;br /&gt;
Partition dev_cpu                 :      2 nodes idle&lt;br /&gt;
Partition cpu                     :     68 nodes idle&lt;br /&gt;
Partition highmem                 :      4 nodes idle&lt;br /&gt;
Partition dev_gpu_h100            :      0 nodes idle&lt;br /&gt;
Partition gpu_h100                :     11 nodes idle&lt;br /&gt;
Partition gpu_mi300               :      1 nodes idle&lt;br /&gt;
Partition dev_cpu_il              :      0 nodes idle&lt;br /&gt;
Partition cpu_il                  :      0 nodes idle&lt;br /&gt;
Partition dev_gpu_a100_il         :      0 nodes idle&lt;br /&gt;
Partition gpu_a100_il             :      0 nodes idle&lt;br /&gt;
Partition gpu_h100_il             :      0 nodes idle&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Running Jobs =&lt;br /&gt;
== Batch Jobs: sbatch ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To run your batch job on one of the cpu nodes, please use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sbatch --partition=dev_cpu&lt;br /&gt;
     or &lt;br /&gt;
$ sbatch -p dev_cpu&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Interactive Jobs: salloc ==&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 3.0 you are only allowed to run short jobs (&amp;lt;&amp;lt; 1 hour) with little memory requirements (&amp;lt;&amp;lt; 8 GByte) on the logins nodes. If you want to run longer jobs and/or jobs with a request of more than 8 GByte of memory, you must allocate resources for so-called interactive jobs by usage of the command salloc on a login node. Considering a serial application running on a compute node that requires 5000 MByte of memory and limiting the interactive run to 2 hours the following command has to be executed:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ salloc -p cpu -n 1 -t 120 --mem=5000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then you will get one core on a compute node within the partition &amp;quot;cpu&amp;quot;. After execution of this command &#039;&#039;&#039;DO NOT CLOSE&#039;&#039;&#039; your current terminal session but wait until the queueing system Slurm has granted you the requested resources on the compute system. You will be logged in automatically on the granted core! To run a serial program on the granted core you only have to type the name of the executable.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./&amp;lt;my_serial_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please be aware that your serial job must run less than 2 hours in this example, else the job will be killed during runtime by the system. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can also start now a graphical X11-terminal connecting you to the dedicated resource that is available for 2 hours. You can start it by the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ xterm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that, once the walltime limit has been reached the resources - i.e. the compute node - will automatically be revoked.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
An interactive parallel application running on one compute node or on many compute nodes (e.g. here 5 nodes) with 96 cores each requires usually an amount of memory in GByte (e.g. 50 GByte) and a maximum time (e.g. 1 hour). E.g. 5 nodes can be allocated by the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ salloc -p cpu -N 5 --ntasks-per-node=96 -t 01:00:00  --mem=50gb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you can run parallel jobs on 480 cores requiring 50 GByte of memory per node. Please be aware that you will be logged in on core 0 of the first node.&lt;br /&gt;
If you want to have access to another node you have to open a new terminal, connect it also to bwUniCluster 3.0 and type the following commands to&lt;br /&gt;
connect to the running interactive job and then to a specific node:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ srun --jobid=XXXXXXXX --pty /bin/bash&lt;br /&gt;
$ srun --nodelist=uc3nXXX --pty /bin/bash&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ squeue&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the jobid and the nodelist can be shown.&lt;br /&gt;
&lt;br /&gt;
If you want to run MPI-programs, you can do it by simply typing mpirun &amp;lt;program_name&amp;gt;. Then your program will be run on 480 cores. A very simple example for starting a parallel job can be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mpirun &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also start the debugger ddt by the commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module add devel/ddt&lt;br /&gt;
$ ddt &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above commands will execute the parallel program &amp;lt;my_mpi_program&amp;gt; on all available cores. You can also start parallel programs on a subset of cores; an example for this can be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mpirun -n 50 &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are using Intel MPI you must start &amp;lt;my_mpi_program&amp;gt; by the command mpiexec.hydra (instead of mpirun).&lt;br /&gt;
&lt;br /&gt;
== Interactive Computing with Jupyter ==&lt;br /&gt;
&lt;br /&gt;
== Monitor and manage jobs ==&lt;br /&gt;
= Slurm Options =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Slurm Commands (excerpt) ==&lt;br /&gt;
Important Slurm commands for non-administrators working on bwUniCluster 3.0.&lt;br /&gt;
{| width=850px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Slurm commands !! Brief explanation&lt;br /&gt;
|-&lt;br /&gt;
| [[#Job submission : sbatch|sbatch]] || Submits a job and puts it into the queue [[https://slurm.schedmd.com/sbatch.html sbatch]] &lt;br /&gt;
|-&lt;br /&gt;
| [[#Interactive job : salloc|salloc]] || Requests resources for an interactive Job [[https://slurm.schedmd.com/salloc.html salloc]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Detailed job information : scontrol show job|scontrol show job]] || Displays detailed job state information [[https://slurm.schedmd.com/scontrol.html scontrol]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#List of your submitted jo/bs : squeue|squeue]] || Displays information about active, eligible, blocked, and/or recently completed jobs [[https://slurm.schedmd.com/squeue.html squeue]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Start time of job or resources : squeue|squeue --start]] || Returns start time of submitted job [[https://slurm.schedmd.com/squeue.html squeue]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Shows free resources : sinfo_t_idle|sinfo_t_idle]] || Shows what resources are available for immediate use [[https://slurm.schedmd.com/sinfo.html sinfo]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Canceling own jobs : scancel|scancel]] || Cancels a job [[https://slurm.schedmd.com/scancel.html scancel]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* [https://slurm.schedmd.com/tutorials.html  Slurm Tutorials]&lt;br /&gt;
* [https://slurm.schedmd.com/pdfs/summary.pdf  Slurm command/option summary (2 pages)]&lt;br /&gt;
* [https://slurm.schedmd.com/man_index.html  Slurm Commands]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Job submission : sbatch ==&lt;br /&gt;
Batch jobs are submitted by using the command &#039;&#039;&#039;sbatch&#039;&#039;&#039;. The main purpose of the &#039;&#039;&#039;sbatch&#039;&#039;&#039; command is to specify the resources that are needed to run the job. &#039;&#039;&#039;sbatch&#039;&#039;&#039; will then queue the batch job. However, starting of batch job depends on the availability of the requested resources and the fair sharing value.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=== Command parameters sbatch ===&lt;br /&gt;
The syntax and use of &#039;&#039;&#039;sbatch&#039;&#039;&#039; can be displayed via:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ man sbatch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;sbatch&#039;&#039;&#039; options can be used from the command line or in your job script. Different defaults for some of these options are set based on the queue and can be found [https://wiki.bwhpc.de/e/BwUniCluster3.0/Batch_Queues#sbatch_-p_queue here]&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | sbatch Options&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width:8%&amp;quot;| Command line&lt;br /&gt;
! style=&amp;quot;width:9%&amp;quot;| Script&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Purpose&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -t, --time=&#039;&#039;time&#039;&#039;&lt;br /&gt;
| #SBATCH --time=&#039;&#039;time&#039;&#039;&lt;br /&gt;
| Wall clock time limit.&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -N, --nodes=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --nodes=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of nodes to be used.&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -n, --ntasks=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --ntasks=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of tasks to be launched.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --ntasks-per-node=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --ntasks-per-node=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Maximum count of tasks per node.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -c, --cpus-per-task=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --cpus-per-task=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of CPUs required per (MPI-)task.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mem=&#039;&#039;value_in_MB&#039;&#039;&lt;br /&gt;
| #SBATCH --mem=&#039;&#039;value_in_MB&#039;&#039; &lt;br /&gt;
| Memory in MegaByte per node. (You should omit the setting of this option.)&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mem-per-cpu=&#039;&#039;value_in_MB&#039;&#039;&lt;br /&gt;
| #SBATCH --mem-per-cpu=&#039;&#039;value_in_MB&#039;&#039; &lt;br /&gt;
| Minimum Memory required per allocated CPU. (You should omit the setting of this option.)&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mail-type=&#039;&#039;type&#039;&#039;&lt;br /&gt;
| #SBATCH --mail-type=&#039;&#039;type&#039;&#039;&lt;br /&gt;
| Notify user by email when certain event types occur.&amp;lt;br&amp;gt;Valid type values are NONE, BEGIN, END, FAIL, REQUEUE, ALL.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mail-user=&#039;&#039;mail-address&#039;&#039;&lt;br /&gt;
| #SBATCH --mail-user=&#039;&#039;mail-address&#039;&#039;&lt;br /&gt;
|  The specified mail-address receives email notification of state changes as defined by --mail-type.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --output=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --output=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| File in which job output is stored. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --error=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --error=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| File in which job error messages are stored. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -J, --job-name=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --job-name=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| Job name.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --export=[ALL,] &#039;&#039;env-variables&#039;&#039;&lt;br /&gt;
| #SBATCH --export=[ALL,] &#039;&#039;env-variables&#039;&#039;&lt;br /&gt;
| Identifies which environment variables from the submission environment are propagated to the launched application. Default is ALL.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -A, --account=&#039;&#039;group-name&#039;&#039;&lt;br /&gt;
| #SBATCH --account=&#039;&#039;group-name&#039;&#039;&lt;br /&gt;
| Change resources used by this job to specified group. You may need this option if your account is assigned to more than one group. By command &amp;quot;scontrol show job&amp;quot; the project group the job is accounted on can be seen behind &amp;quot;Account=&amp;quot;. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -p, --partition=&#039;&#039;queue-name&#039;&#039;&lt;br /&gt;
| #SBATCH --partition=&#039;&#039;queue-name&#039;&#039;&lt;br /&gt;
| Request a specific queue for the resource allocation.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --reservation=&#039;&#039;reservation-name&#039;&#039;&lt;br /&gt;
| #SBATCH --reservation=&#039;&#039;reservation-name&#039;&#039;&lt;br /&gt;
| Use a specific reservation for the resource allocation.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -C, --constraint=&#039;&#039;LSDF&#039;&#039;&lt;br /&gt;
| #SBATCH --constraint=LSDF&lt;br /&gt;
| Job constraint LSDF filesystems.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -C, --constraint=&#039;&#039;BEEOND (BEEOND_4MDS, BEEOND_MAXMDS)&#039;&#039;&lt;br /&gt;
| #SBATCH --constraint=BEEOND (BEEOND_4MDS, BEEOND_MAXMDS)&lt;br /&gt;
| Job constraint BeeOND filesystem.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Best Practices =&lt;br /&gt;
&lt;br /&gt;
== Step-by-Step example==&lt;br /&gt;
&lt;br /&gt;
== Dos and Don&#039;ts ==&lt;/div&gt;</summary>
		<author><name>P Schuhmacher</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster3.0/Running_Jobs/Slurm&amp;diff=14633</id>
		<title>BwUniCluster3.0/Running Jobs/Slurm</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster3.0/Running_Jobs/Slurm&amp;diff=14633"/>
		<updated>2025-04-04T14:52:44Z</updated>

		<summary type="html">&lt;p&gt;P Schuhmacher: /* Shows free resources : sinfo_t_idle */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
{|style=&amp;quot;background:#FEF4AB; width:100%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;padding:5px; background:#FEF4AB; text-align:left&amp;quot;|&lt;br /&gt;
This page is work in progress.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=  Slurm HPC Workload Manager = &lt;br /&gt;
== Specification == &lt;br /&gt;
Slurm is an open source, fault-tolerant, and highly scalable cluster management and job scheduling system for large and small Linux clusters. Slurm requires no kernel modifications for its operation and is relatively self-contained. As a cluster workload manager, Slurm has three key functions. First, it allocates exclusive and/or non-exclusive access to resources (compute nodes) to users for some duration of time so they can perform work. Second, it provides a framework for starting, executing, and monitoring work (normally a parallel job) on the set of allocated nodes. Finally, it arbitrates contention for resources by managing a queue of pending work.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Any kind of calculation on the compute nodes of bwUniCluster 3.0 requires the user to define calculations as a sequence of commands or single command together with required run time, number of CPU cores and main memory and submit all, i.e., the &#039;&#039;&#039;batch job&#039;&#039;&#039;, to a resource and workload managing software. bwUniCluster 3.0 has installed the workload managing software Slurm. Therefore any job submission by the user is to be executed by commands of the Slurm software. Slurm queues and runs user jobs based on fair sharing policies.  &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Slurm Commands (excerpt) ==&lt;br /&gt;
Important Slurm commands for non-administrators working on bwUniCluster 3.0.&lt;br /&gt;
{| width=850px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Slurm commands !! Brief explanation&lt;br /&gt;
|-&lt;br /&gt;
| [[#Job submission : sbatch|sbatch]] || Submits a job and puts it into the queue [[https://slurm.schedmd.com/sbatch.html sbatch]] &lt;br /&gt;
|-&lt;br /&gt;
| [[#Interactive job : salloc|salloc]] || Requests resources for an interactive Job [[https://slurm.schedmd.com/salloc.html salloc]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Detailed job information : scontrol show job|scontrol show job]] || Displays detailed job state information [[https://slurm.schedmd.com/scontrol.html scontrol]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#List of your submitted jo/bs : squeue|squeue]] || Displays information about active, eligible, blocked, and/or recently completed jobs [[https://slurm.schedmd.com/squeue.html squeue]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Start time of job or resources : squeue|squeue --start]] || Returns start time of submitted job [[https://slurm.schedmd.com/squeue.html squeue]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Shows free resources : sinfo_t_idle|sinfo_t_idle]] || Shows what resources are available for immediate use [[https://slurm.schedmd.com/sinfo.html sinfo]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Canceling own jobs : scancel|scancel]] || Cancels a job [[https://slurm.schedmd.com/scancel.html scancel]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* [https://slurm.schedmd.com/tutorials.html  Slurm Tutorials]&lt;br /&gt;
* [https://slurm.schedmd.com/pdfs/summary.pdf  Slurm command/option summary (2 pages)]&lt;br /&gt;
* [https://slurm.schedmd.com/man_index.html  Slurm Commands]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Job submission : sbatch ==&lt;br /&gt;
Batch jobs are submitted by using the command &#039;&#039;&#039;sbatch&#039;&#039;&#039;. The main purpose of the &#039;&#039;&#039;sbatch&#039;&#039;&#039; command is to specify the resources that are needed to run the job. &#039;&#039;&#039;sbatch&#039;&#039;&#039; will then queue the batch job. However, starting of batch job depends on the availability of the requested resources and the fair sharing value.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=== Command parameters sbatch ===&lt;br /&gt;
The syntax and use of &#039;&#039;&#039;sbatch&#039;&#039;&#039; can be displayed via:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ man sbatch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;sbatch&#039;&#039;&#039; options can be used from the command line or in your job script. Different defaults for some of these options are set based on the queue and can be found [https://wiki.bwhpc.de/e/BwUniCluster3.0/Batch_Queues#sbatch_-p_queue here]&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | sbatch Options&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width:8%&amp;quot;| Command line&lt;br /&gt;
! style=&amp;quot;width:9%&amp;quot;| Script&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Purpose&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -t, --time=&#039;&#039;time&#039;&#039;&lt;br /&gt;
| #SBATCH --time=&#039;&#039;time&#039;&#039;&lt;br /&gt;
| Wall clock time limit.&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -N, --nodes=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --nodes=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of nodes to be used.&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -n, --ntasks=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --ntasks=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of tasks to be launched.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --ntasks-per-node=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --ntasks-per-node=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Maximum count of tasks per node.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -c, --cpus-per-task=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --cpus-per-task=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of CPUs required per (MPI-)task.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mem=&#039;&#039;value_in_MB&#039;&#039;&lt;br /&gt;
| #SBATCH --mem=&#039;&#039;value_in_MB&#039;&#039; &lt;br /&gt;
| Memory in MegaByte per node. (You should omit the setting of this option.)&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mem-per-cpu=&#039;&#039;value_in_MB&#039;&#039;&lt;br /&gt;
| #SBATCH --mem-per-cpu=&#039;&#039;value_in_MB&#039;&#039; &lt;br /&gt;
| Minimum Memory required per allocated CPU. (You should omit the setting of this option.)&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mail-type=&#039;&#039;type&#039;&#039;&lt;br /&gt;
| #SBATCH --mail-type=&#039;&#039;type&#039;&#039;&lt;br /&gt;
| Notify user by email when certain event types occur.&amp;lt;br&amp;gt;Valid type values are NONE, BEGIN, END, FAIL, REQUEUE, ALL.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mail-user=&#039;&#039;mail-address&#039;&#039;&lt;br /&gt;
| #SBATCH --mail-user=&#039;&#039;mail-address&#039;&#039;&lt;br /&gt;
|  The specified mail-address receives email notification of state changes as defined by --mail-type.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --output=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --output=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| File in which job output is stored. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --error=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --error=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| File in which job error messages are stored. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -J, --job-name=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --job-name=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| Job name.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --export=[ALL,] &#039;&#039;env-variables&#039;&#039;&lt;br /&gt;
| #SBATCH --export=[ALL,] &#039;&#039;env-variables&#039;&#039;&lt;br /&gt;
| Identifies which environment variables from the submission environment are propagated to the launched application. Default is ALL.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -A, --account=&#039;&#039;group-name&#039;&#039;&lt;br /&gt;
| #SBATCH --account=&#039;&#039;group-name&#039;&#039;&lt;br /&gt;
| Change resources used by this job to specified group. You may need this option if your account is assigned to more than one group. By command &amp;quot;scontrol show job&amp;quot; the project group the job is accounted on can be seen behind &amp;quot;Account=&amp;quot;. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -p, --partition=&#039;&#039;queue-name&#039;&#039;&lt;br /&gt;
| #SBATCH --partition=&#039;&#039;queue-name&#039;&#039;&lt;br /&gt;
| Request a specific queue for the resource allocation.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --reservation=&#039;&#039;reservation-name&#039;&#039;&lt;br /&gt;
| #SBATCH --reservation=&#039;&#039;reservation-name&#039;&#039;&lt;br /&gt;
| Use a specific reservation for the resource allocation.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -C, --constraint=&#039;&#039;LSDF&#039;&#039;&lt;br /&gt;
| #SBATCH --constraint=LSDF&lt;br /&gt;
| Job constraint LSDF filesystems.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -C, --constraint=&#039;&#039;BEEOND (BEEOND_4MDS, BEEOND_MAXMDS)&#039;&#039;&lt;br /&gt;
| #SBATCH --constraint=BEEOND (BEEOND_4MDS, BEEOND_MAXMDS)&lt;br /&gt;
| Job constraint BeeOND filesystem.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Interactive job : salloc ==&lt;br /&gt;
&lt;br /&gt;
If you want to run an interactive job, you can do so via the command salloc on a login node.&amp;lt;br&amp;gt;Considering a serial application running on a compute node that requires 5000 MByte of memory and limiting the interactive run to 2 hours the following command has to be executed:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ salloc --partition=cpu --ntasks=1 --time=120 --mem=5000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then you will get one core on a compute node within the partition &amp;quot;cpu&amp;quot;. After execution of this command &#039;&#039;&#039;DO NOT CLOSE&#039;&#039;&#039; your current terminal session but wait until the queueing system Slurm has granted you the requested resources on the compute node. You will be logged in automatically on the granted core! To run a serial program on the granted core you only have to type the name of the executable.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./&amp;lt;my_serial_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please be aware that your serial job must run less than 2 hours in this example, else the job will be killed during runtime by the system. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can also start now a graphical X11-terminal connecting you to the dedicated resource that is available for 2 hours. You can start it by the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ xterm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that, once the walltime limit has been reached the resources - i.e. the compute node - will automatically be revoked.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
An interactive parallel application running on one compute node or on many compute nodes (e.g. here 5 nodes) with 40 cores each requires usually an amount of memory in GByte (e.g. 50 GByte) and a maximum time (e.g. 1 hour). E.g. 5 nodes can be allocated by the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ salloc --partition=cpu --nodes=5 --ntasks-per-node=40 --time=01:00:00  --mem=50gb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you can run parallel jobs on 200 cores requiring 50 GByte of memory per node. Please be aware that you will be logged in on core 0 of the first node.&lt;br /&gt;
If you want to have access to another node you have to open a new terminal, connect it also to BwUniCluster 2.0 and type the following commands to&lt;br /&gt;
connect to the running interactive job and then to a specific node:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ srun --jobid=XXXXXXXX --pty /bin/bash&lt;br /&gt;
$ srun --nodelist=uc3nXXX --pty /bin/bash&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ squeue&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the jobid and the nodelist can be shown.&lt;br /&gt;
&lt;br /&gt;
If you want to run MPI-programs, you can do it by simply typing mpirun &amp;lt;program_name&amp;gt;. Then your program will be run on 200 cores. A very simple example for starting a parallel job can be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mpirun &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also start the debugger ddt by the commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module add devel/ddt&lt;br /&gt;
$ ddt &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above commands will execute the parallel program &amp;lt;my_mpi_program&amp;gt; on all available cores. You can also start parallel programs on a subset of cores; an example for this can be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mpirun -n 50 &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are using Intel MPI you must start &amp;lt;my_mpi_program&amp;gt; by the command mpiexec.hydra (instead of mpirun).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;top&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
=  Slurm HPC Workload Manager = &lt;br /&gt;
== Specification == &lt;br /&gt;
Slurm is an open source, fault-tolerant, and highly scalable cluster management and job scheduling system for large and small Linux clusters. Slurm requires no kernel modifications for its operation and is relatively self-contained. As a cluster workload manager, Slurm has three key functions. First, it allocates exclusive and/or non-exclusive access to resources (compute nodes) to users for some duration of time so they can perform work. Second, it provides a framework for starting, executing, and monitoring work (normally a parallel job) on the set of allocated nodes. Finally, it arbitrates contention for resources by managing a queue of pending work.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Any kind of calculation on the compute nodes of [[bwUniCluster3.0|bwUniCluster 3.0]] requires the user to define calculations as a sequence of commands or single command together with required run time, number of CPU cores and main memory and submit all, i.e., the &#039;&#039;&#039;batch job&#039;&#039;&#039;, to a resource and workload managing software. bwUniCluster 3.0 has installed the workload managing software Slurm. Therefore any job submission by the user is to be executed by commands of the Slurm software. Slurm queues and runs user jobs based on fair sharing policies.  &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Slurm Commands (excerpt) ==&lt;br /&gt;
Some of the most used Slurm commands for non-administrators working on bwUniCluster 2.0.&lt;br /&gt;
{| width=750px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Slurm commands !! Brief explanation&lt;br /&gt;
|-&lt;br /&gt;
| [[#Job Submission : sbatch|sbatch]] || Submits a job and queues it in an input queue [[https://slurm.schedmd.com/sbatch.html sbatch]] &lt;br /&gt;
|-&lt;br /&gt;
| [[#Detailed job information : scontrol show job|scontrol show job]] || Displays detailed job state information [[https://slurm.schedmd.com/scontrol.html scontrol]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#List of your submitted jo/bs : squeue|squeue]] || Displays information about active, eligible, blocked, and/or recently completed jobs [[https://slurm.schedmd.com/squeue.html squeue]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Start time of job or resources : squeue|squeue --start]] || Returns start time of submitted job or requested resources [[https://slurm.schedmd.com/squeue.html squeue]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Shows free resources : sinfo_t_idle|sinfo_t_idle]] || Shows what resources are available for immediate use [[https://slurm.schedmd.com/sinfo.html sinfo]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Canceling own jobs : scancel|scancel]] || Cancels a job (obsoleted!) [[https://slurm.schedmd.com/scancel.html scancel]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* [https://slurm.schedmd.com/tutorials.html  Slurm Tutorials]&lt;br /&gt;
* [https://slurm.schedmd.com/pdfs/summary.pdf  Slurm command/option summary (2 pages)]&lt;br /&gt;
* [https://slurm.schedmd.com/man_index.html  Slurm Commands]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Job Submission : sbatch ==&lt;br /&gt;
Batch jobs are submitted by using the command &#039;&#039;&#039;sbatch&#039;&#039;&#039;. The main purpose of the &#039;&#039;&#039;sbatch&#039;&#039;&#039; command is to specify the resources that are needed to run the job. &#039;&#039;&#039;sbatch&#039;&#039;&#039; will then queue the batch job. However, starting of batch job depends on the availability of the requested resources and the fair sharing value.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=== sbatch Command Parameters ===&lt;br /&gt;
The syntax and use of &#039;&#039;&#039;sbatch&#039;&#039;&#039; can be displayed via:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ man sbatch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;sbatch&#039;&#039;&#039; options can be used from the command line or in your job script.&lt;br /&gt;
{| width=750px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | sbatch Options&lt;br /&gt;
|-&lt;br /&gt;
! Command line&lt;br /&gt;
! Script&lt;br /&gt;
! Purpose&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -t &#039;&#039;time&#039;&#039;  or  --time=&#039;&#039;time&#039;&#039;&lt;br /&gt;
| #SBATCH --time=&#039;&#039;time&#039;&#039;&lt;br /&gt;
| Wall clock time limit.&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -N &#039;&#039;count&#039;&#039;  or  --nodes=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --nodes=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of nodes to be used.&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -n &#039;&#039;count&#039;&#039;  or  --ntasks=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --ntasks=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of tasks to be launched.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --ntasks-per-node=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --ntasks-per-node=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Maximum count (&amp;lt;= 28 and &amp;lt;= 40 resp.) of tasks per node.&amp;lt;br&amp;gt;(Replaces the option ppn of MOAB.)&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -c &#039;&#039;count&#039;&#039; or --cpus-per-task=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --cpus-per-task=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of CPUs required per (MPI-)task.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mem=&#039;&#039;value_in_MB&#039;&#039;&lt;br /&gt;
| #SBATCH --mem=&#039;&#039;value_in_MB&#039;&#039; &lt;br /&gt;
| Memory in MegaByte per node.&amp;lt;br&amp;gt;(Default value is 128000 and 96000 MB resp., i.e. you should omit &amp;lt;br&amp;gt; the setting of this option.)&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mem-per-cpu=&#039;&#039;value_in_MB&#039;&#039;&lt;br /&gt;
| #SBATCH --mem-per-cpu=&#039;&#039;value_in_MB&#039;&#039; &lt;br /&gt;
| Minimum Memory required per allocated CPU.&amp;lt;br&amp;gt;(Replaces the option pmem of MOAB. You should omit &amp;lt;br&amp;gt; the setting of this option.)&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mail-type=&#039;&#039;type&#039;&#039;&lt;br /&gt;
| #SBATCH --mail-type=&#039;&#039;type&#039;&#039;&lt;br /&gt;
| Notify user by email when certain event types occur.&amp;lt;br&amp;gt;Valid type values are NONE, BEGIN, END, FAIL, REQUEUE, ALL.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mail-user=&#039;&#039;mail-address&#039;&#039;&lt;br /&gt;
| #SBATCH --mail-user=&#039;&#039;mail-address&#039;&#039;&lt;br /&gt;
|  The specified mail-address receives email notification of state&amp;lt;br&amp;gt;changes as defined by --mail-type.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --output=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --output=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| File in which job output is stored. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --error=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --error=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| File in which job error messages are stored. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -J &#039;&#039;name&#039;&#039; or --job-name=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --job-name=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| Job name.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --export=[ALL,] &#039;&#039;env-variables&#039;&#039;&lt;br /&gt;
| #SBATCH --export=[ALL,] &#039;&#039;env-variables&#039;&#039;&lt;br /&gt;
| Identifies which environment variables from the submission &amp;lt;br&amp;gt; environment are propagated to the launched application. Default &amp;lt;br&amp;gt; is ALL. If adding an environment variable to the submission&amp;lt;br&amp;gt; environment is intended, the argument ALL must be added.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -A &#039;&#039;group-name&#039;&#039; or --account=&#039;&#039;group-name&#039;&#039;&lt;br /&gt;
| #SBATCH --account=&#039;&#039;group-name&#039;&#039;&lt;br /&gt;
| Change resources used by this job to specified group. You may &amp;lt;br&amp;gt; need this option if your account is assigned to more &amp;lt;br&amp;gt; than one group. By command &amp;quot;scontrol show job&amp;quot; the project &amp;lt;br&amp;gt; group the job is accounted on can be seen behind &amp;quot;Account=&amp;quot;. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -p &#039;&#039;queue-name&#039;&#039; or --partition=&#039;&#039;queue-name&#039;&#039;&lt;br /&gt;
| #SBATCH --partition=&#039;&#039;queue-name&#039;&#039;&lt;br /&gt;
| Request a specific queue for the resource allocation.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --reservation=&#039;&#039;reservation-name&#039;&#039;&lt;br /&gt;
| #SBATCH --reservation=&#039;&#039;reservation-name&#039;&#039;&lt;br /&gt;
| Use a specific reservation for the resource allocation.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -C &#039;&#039;LSDF&#039;&#039; or --constraint=&#039;&#039;LSDF&#039;&#039;&lt;br /&gt;
| #SBATCH --constraint=LSDF&lt;br /&gt;
| Job constraint LSDF Filesystems.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -C &#039;&#039;BEEOND (BEEOND_4MDS, BEEOND_MAXMDS)&#039;&#039; or --constraint=&#039;&#039;BEEOND (BEEOND_4MDS, BEEOND_MAXMDS&#039;&#039;&lt;br /&gt;
| #SBATCH --constraint=BEEOND (BEEOND_4MDS, BEEOND_MAXMDS)&lt;br /&gt;
| Job constraint BeeOND file system.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== sbatch --partition  &#039;&#039;queues&#039;&#039; ====&lt;br /&gt;
Queue classes define maximum resources such as walltime, nodes and processes per node and queue of the compute system. Details can be found here:&lt;br /&gt;
* [[BwUniCluster3.0/Batch_Queues|bwUniCluster 3.0 queue settings]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== sbatch Examples ===&lt;br /&gt;
==== Serial Programs ====&lt;br /&gt;
To submit a serial job that runs the script &#039;&#039;&#039;job.sh&#039;&#039;&#039; and that requires 5000 MB of main memory and 10 minutes of wall clock time&lt;br /&gt;
&lt;br /&gt;
a) execute:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sbatch -p dev_cpu -n 1 -t 10:00 --mem=5000  job.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
or&lt;br /&gt;
b) add after the initial line of your script &#039;&#039;&#039;job.sh&#039;&#039;&#039; the lines (here with a high memory request):&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#SBATCH --ntasks=1&lt;br /&gt;
#SBATCH --time=10&lt;br /&gt;
#SBATCH --mem=180gb&lt;br /&gt;
#SBATCH --job-name=simple&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
and execute the modified script with the command line option &#039;&#039;--partition=highmem&#039;&#039;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sbatch --partition=highmem job.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note, that sbatch command line options overrule script options.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Multithreaded Programs ====&lt;br /&gt;
Multithreaded programs operate faster than serial programs on CPUs with multiple cores.&amp;lt;br&amp;gt;&lt;br /&gt;
Moreover, multiple threads of one process share resources such as memory.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
For multithreaded programs based on &#039;&#039;&#039;Open&#039;&#039;&#039; &#039;&#039;&#039;M&#039;&#039;&#039;ulti-&#039;&#039;&#039;P&#039;&#039;&#039;rocessing (OpenMP) a number of threads is defined by the environment variable OMP_NUM_THREADS. By default this variable is set to 1 (OMP_NUM_THREADS=1).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Hyperthreading is switched on on bwUniCluster 3.0, the option --threads-per-core must be set to 1, if you do not want to use it.&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
To submit a batch job called &#039;&#039;OpenMP_Test&#039;&#039; that runs a 96-fold threaded program &#039;&#039;omp_exe&#039;&#039; which requires 6000 MByte of total physical memory and total wall clock time of 40 minutes:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
a) execute:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sbatch -p cpu --export=ALL,OMP_NUM_THREADS=96 -J OpenMP_Test -N 1 -c 96 --threads-per-core=1 -t 40 --mem=6000 ./omp_exe&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
or&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
* generate the script &#039;&#039;&#039;job_omp.sh&#039;&#039;&#039; containing the following lines:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
#SBATCH --nodes=1&lt;br /&gt;
#SBATCH --cpus-per-task=96&lt;br /&gt;
#SBATCH --time=40:00&lt;br /&gt;
#SBATCH --threads-per-core=1&lt;br /&gt;
#SBATCH --mem=6000mb   &lt;br /&gt;
#SBATCH --export=ALL,EXECUTABLE=./omp_exe&lt;br /&gt;
#SBATCH -J OpenMP_Test&lt;br /&gt;
&lt;br /&gt;
#Usually you should set&lt;br /&gt;
export KMP_AFFINITY=compact,1,0&lt;br /&gt;
#export KMP_AFFINITY=verbose,compact,1,0 prints messages concerning the supported affinity&lt;br /&gt;
#KMP_AFFINITY Description: https://software.intel.com/en-us/node/524790#KMP_AFFINITY_ENVIRONMENT_VARIABLE&lt;br /&gt;
&lt;br /&gt;
export OMP_NUM_THREADS=${SLURM_JOB_CPUS_PER_NODE}&lt;br /&gt;
echo &amp;quot;Executable ${EXECUTABLE} running on ${SLURM_JOB_CPUS_PER_NODE} cores with ${OMP_NUM_THREADS} threads&amp;quot;&lt;br /&gt;
startexe=${EXECUTABLE}&lt;br /&gt;
echo $startexe&lt;br /&gt;
exec $startexe&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Using Intel compiler the environment variable KMP_AFFINITY switches on binding of threads to specific cores and, if necessary, replace &amp;lt;placeholder&amp;gt; with the required modulefile to enable the OpenMP environment and execute the script &#039;&#039;&#039;job_omp.sh&#039;&#039;&#039; adding the queue class &#039;&#039;cpu&#039;&#039; as sbatch option:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sbatch -p cpu job_omp.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note, that sbatch command line options overrule script options, e.g.,&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sbatch --partition=cpu --mem=200 job_omp.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
overwrites the script setting of 6000 MByte with 200 MByte.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== MPI Parallel Programs ====&lt;br /&gt;
MPI parallel programs run faster than serial programs on multi CPU and multi core systems. N-fold spawned processes of the MPI program, i.e., &#039;&#039;&#039;MPI tasks&#039;&#039;&#039;,  run simultaneously and communicate via the Message Passing Interface (MPI) paradigm. MPI tasks do not share memory but can be spawned over different nodes.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Multiple MPI tasks must be launched via &#039;&#039;&#039;mpirun&#039;&#039;&#039;, e.g. 4 MPI tasks of &#039;&#039;my_par_program&#039;&#039;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mpirun -n 4 my_par_program&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This command runs 4 MPI tasks of &#039;&#039;my_par_program&#039;&#039; on the node you are logged in.&lt;br /&gt;
To run this command with a loaded Intel MPI the environment variable I_MPI_HYDRA_BOOTSTRAP must be unset ( --&amp;gt; $ unset I_MPI_HYDRA_BOOTSTRAP).&lt;br /&gt;
&lt;br /&gt;
Running MPI parallel programs in a batch job the interactive environment - particularly the loaded modules - will also be set in the batch job. If you want to set a defined module environment in your batch job you have to purge all modules before setting the wished modules. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
===== OpenMPI =====&lt;br /&gt;
&lt;br /&gt;
If you want to run jobs on batch nodes, generate a wrapper script &#039;&#039;job_ompi.sh&#039;&#039; for &#039;&#039;&#039;OpenMPI&#039;&#039;&#039; containing the following lines:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
# Use when using the module environment for OpenMPI&lt;br /&gt;
module load compiler/&amp;lt;placeholder_for_compiler&amp;gt;/&amp;lt;placeholder_for_compiler_version&amp;gt;&lt;br /&gt;
module load mpi/openmpi/&amp;lt;placeholder_for_mpi_version&amp;gt;&lt;br /&gt;
mpirun --bind-to core --map-by core -report-bindings my_par_program&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Attention:&#039;&#039;&#039; Do &#039;&#039;&#039;NOT&#039;&#039;&#039; add mpirun options &#039;&#039;-n &amp;lt;number_of_processes&amp;gt;&#039;&#039; or any other option defining processes or nodes, since Slurm instructs mpirun about number of processes and node hostnames. Use &#039;&#039;&#039;ALWAYS&#039;&#039;&#039; the MPI options &#039;&#039;&#039;&#039;&#039;--bind-to core&#039;&#039;&#039;&#039;&#039; and &#039;&#039;&#039;&#039;&#039;--map-by core|socket|node&#039;&#039;&#039;&#039;&#039;. Please type &#039;&#039;mpirun --help&#039;&#039; for an explanation of the meaning of the different options of mpirun option &#039;&#039;--map-by&#039;&#039;.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Considering 4 OpenMPI tasks on a single node, each requiring 2000 MByte, and running for 1 hour, execute:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sbatch -p cpu -N 1 -n 4 --mem-per-cpu=2000 --time=01:00:00 ./job_ompi.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Intel MPI =====&lt;br /&gt;
&lt;br /&gt;
Generate a wrapper script for &#039;&#039;&#039;Intel MPI&#039;&#039;&#039;, &#039;&#039;job_impi.sh&#039;&#039; containing the following lines:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
# Use when a defined module environment related to Intel MPI is wished&lt;br /&gt;
module load compiler/&amp;lt;placeholder_for_compiler&amp;gt;/&amp;lt;placeholder_for_compiler_version&amp;gt;&lt;br /&gt;
module load mpi/impi/&amp;lt;placeholder_for_version&amp;gt;   &lt;br /&gt;
mpiexec.hydra -bootstrap slurm my_par_program&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;font color=red&amp;gt;&#039;&#039;&#039;Attention:&#039;&#039;&#039;&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Do &#039;&#039;&#039;NOT&#039;&#039;&#039; add mpirun options &#039;&#039;-n &amp;lt;number_of_processes&amp;gt;&#039;&#039; or any other option defining processes or nodes, since Slurm instructs mpirun about number of processes and node hostnames.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Launching and running 200 Intel MPI tasks on 5 nodes, each requiring 80 GByte, and running for 5 hours, execute:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sbatch --partition=cpu -N 5 --ntasks-per-node=40 --mem=80gb -t 300 ./job_impi.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
If you want to use 128 or more nodes, you must also set the environment variable as follows:           &amp;lt;BR&amp;gt;&lt;br /&gt;
export I_MPI_HYDRA_BRANCH_COUNT=-1&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
If you want to use the options perhost, ppn or rr, you must additionally set the environment variable I_MPI_JOB_RESPECT_PROCESS_PLACEMENT=off.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Multithreaded + MPI parallel Programs ====&lt;br /&gt;
Multithreaded + MPI parallel programs operate faster than serial programs on multi CPUs with multiple cores. All threads of one process share resources such as memory. On the contrary MPI tasks do not share memory but can be spawned over different nodes. &#039;&#039;&#039;Hyperthreading is switched on on bwUniCluster 3.0, the option --threads-per-core must be set to 1, if you do not want to use it.&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
===== OpenMPI with Multithreading =====&lt;br /&gt;
Multiple MPI tasks using &#039;&#039;&#039;OpenMPI&#039;&#039;&#039; must be launched by the MPI parallel program &#039;&#039;&#039;mpirun&#039;&#039;&#039;. For multithreaded programs based on &#039;&#039;&#039;Open&#039;&#039;&#039; &#039;&#039;&#039;M&#039;&#039;&#039;ulti-&#039;&#039;&#039;P&#039;&#039;&#039;rocessing (OpenMP) number of threads are defined by the environment variable OMP_NUM_THREADS. By default this variable is set to 1 (OMP_NUM_THREADS=1).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;For OpenMPI&#039;&#039;&#039; a job-script to submit a batch job called &#039;&#039;job_ompi_omp.sh&#039;&#039; that runs a MPI program with 4 tasks and a 28-fold threaded program &#039;&#039;ompi_omp_program&#039;&#039; requiring 3000 MByte of physical memory per thread (using 28 threads per MPI task you will get 28*3000 MByte = 84000 MByte per MPI task) and total wall clock time of 3 hours looks like:&lt;br /&gt;
&amp;lt;!--b)--&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
#SBATCH --ntasks=4&lt;br /&gt;
#SBATCH --cpus-per-task=28&lt;br /&gt;
#SBATCH --threads-per-core=1&lt;br /&gt;
#SBATCH --time=03:00:00&lt;br /&gt;
#SBATCH --mem=83gb    # 84000 MB = 84000/1024 GB = 82.1 GB&lt;br /&gt;
#SBATCH --export=ALL,MPI_MODULE=mpi/openmpi/3.1,EXECUTABLE=./ompi_omp_program&lt;br /&gt;
#SBATCH --output=&amp;quot;parprog_hybrid_%j.out&amp;quot;  &lt;br /&gt;
&lt;br /&gt;
# Use when a defined module environment related to OpenMPI is wished&lt;br /&gt;
module load ${MPI_MODULE}&lt;br /&gt;
export OMP_NUM_THREADS=${SLURM_CPUS_PER_TASK}&lt;br /&gt;
export MPIRUN_OPTIONS=&amp;quot;--bind-to core --map-by socket:PE=${OMP_NUM_THREADS} -report-bindings&amp;quot;&lt;br /&gt;
export NUM_CORES=${SLURM_NTASKS}*${OMP_NUM_THREADS}&lt;br /&gt;
echo &amp;quot;${EXECUTABLE} running on ${NUM_CORES} cores with ${SLURM_NTASKS} MPI-tasks and ${OMP_NUM_THREADS} threads&amp;quot;&lt;br /&gt;
startexe=&amp;quot;mpirun -n ${SLURM_NTASKS} ${MPIRUN_OPTIONS} ${EXECUTABLE}&amp;quot;&lt;br /&gt;
echo $startexe&lt;br /&gt;
exec $startexe&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Execute the script &#039;&#039;&#039;job_ompi_omp.sh&#039;&#039;&#039; by command sbatch:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sbatch -p cpu ./job_ompi_omp.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* With the mpirun option &#039;&#039;--bind-to core&#039;&#039; MPI tasks and OpenMP threads are bound to physical cores.&lt;br /&gt;
* With the option &#039;&#039;--map-by node:PE=&amp;lt;value&amp;gt;&#039;&#039; (neighbored) MPI tasks will be attached to different nodes and each MPI task is bound to the first core of a node. &amp;lt;value&amp;gt; must be set to ${OMP_NUM_THREADS}.&lt;br /&gt;
* The option &#039;&#039;-report-bindings&#039;&#039; shows the bindings between MPI tasks and physical cores.&lt;br /&gt;
* The mpirun-options &#039;&#039;&#039;--bind-to core&#039;&#039;&#039;, &#039;&#039;&#039;--map-by socket|...|node:PE=&amp;lt;value&amp;gt;&#039;&#039;&#039; should always be used when running a multithreaded MPI program.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Intel MPI with Multithreading =====&lt;br /&gt;
Multithreaded + MPI parallel programs operate faster than serial programs on multi CPUs with multiple cores. All threads of one process share resources such as memory. On the contrary MPI tasks do not share memory but can be spawned over different nodes.  &lt;br /&gt;
&lt;br /&gt;
Multiple Intel MPI tasks must be launched by the MPI parallel program &#039;&#039;&#039;mpiexec.hydra&#039;&#039;&#039;. For multithreaded programs based on &#039;&#039;&#039;Open&#039;&#039;&#039; &#039;&#039;&#039;M&#039;&#039;&#039;ulti-&#039;&#039;&#039;P&#039;&#039;&#039;rocessing (OpenMP) number of threads are defined by the environment variable OMP_NUM_THREADS. By default this variable is set to 1 (OMP_NUM_THREADS=1).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;For Intel MPI&#039;&#039;&#039; a job-script to submit a batch job called &#039;&#039;job_impi_omp.sh&#039;&#039; that runs a Intel MPI program with 10 tasks and a 96-fold threaded program &#039;&#039;impi_omp_program&#039;&#039; requiring 96000 MByte of total physical memory per task and total wall clock time of 1 hours looks like: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--b)--&amp;gt; &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
#SBATCH --ntasks=10&lt;br /&gt;
#SBATCH --cpus-per-task=96&lt;br /&gt;
#SBATCH --threads-per-core=1&lt;br /&gt;
#SBATCH --time=60&lt;br /&gt;
#SBATCH --mem=96000&lt;br /&gt;
#SBATCH --export=ALL,MPI_MODULE=mpi/impi,EXE=./impi_omp_program&lt;br /&gt;
#SBATCH --output=&amp;quot;parprog_impi_omp_%j.out&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#If using more than one MPI task per node please set&lt;br /&gt;
export KMP_AFFINITY=compact,1,0&lt;br /&gt;
#export KMP_AFFINITY=verbose,scatter  prints messages concerning the supported affinity &lt;br /&gt;
#KMP_AFFINITY Description: https://software.intel.com/en-us/node/524790#KMP_AFFINITY_ENVIRONMENT_VARIABLE&lt;br /&gt;
&lt;br /&gt;
# Use when a defined module environment related to Intel MPI is wished &lt;br /&gt;
module load ${MPI_MODULE}&lt;br /&gt;
export OMP_NUM_THREADS=${SLURM_CPUS_PER_TASK}&lt;br /&gt;
export MPIRUN_OPTIONS=&amp;quot;-binding &amp;quot;domain=omp:compact&amp;quot; -print-rank-map -envall&amp;quot;&lt;br /&gt;
export NUM_PROCS=eval(${SLURM_NTASKS}*${OMP_NUM_THREADS})&lt;br /&gt;
echo &amp;quot;${EXE} running on ${NUM_PROCS} cores with ${SLURM_NTASKS} MPI-tasks and ${OMP_NUM_THREADS} threads&amp;quot;&lt;br /&gt;
startexe=&amp;quot;mpiexec.hydra -bootstrap slurm ${MPIRUN_OPTIONS} -n ${SLURM_NTASKS} ${EXE}&amp;quot;&lt;br /&gt;
echo $startexe&lt;br /&gt;
exec $startexe&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Using Intel compiler the environment variable KMP_AFFINITY switches on binding of threads to specific cores. If you only run one MPI task per node please set KMP_AFFINITY=compact,1,0.&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
If you want to use 128 or more nodes, you must also set the environment variable as follows:           &amp;lt;BR&amp;gt;&lt;br /&gt;
export I_MPI_HYDRA_BRANCH_COUNT=-1&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
If you want to use the options perhost, ppn or rr, you must additionally set the environment variable I_MPI_JOB_RESPECT_PROCESS_PLACEMENT=off. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Execute the script &#039;&#039;&#039;job_impi_omp.sh&#039;&#039;&#039; by command sbatch:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sbatch -p cpu ./job_impi_omp.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The mpirun option &#039;&#039;-print-rank-map&#039;&#039; shows the bindings between MPI tasks and nodes (not very beneficial). The option &#039;&#039;-binding&#039;&#039; binds MPI tasks (processes) to a particular processor; &#039;&#039;domain=omp&#039;&#039; means that the domain size is determined by the number of threads. If you would choose 2 MPI tasks per node, you should choose &#039;&#039;-binding &amp;quot;cell=unit;map=bunch&amp;quot;&#039;&#039;; this binding maps one MPI process to each socket. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Chain jobs ====&lt;br /&gt;
The CPU time requirements of many applications exceed the limits of the job classes. In those situations it is recommended to solve the problem by a job chain. A job chain is a sequence of jobs where each job automatically starts its successor. &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
####################################&lt;br /&gt;
## simple Slurm submitter script to setup   ## &lt;br /&gt;
## a chain of jobs using Slurm                    ##&lt;br /&gt;
####################################&lt;br /&gt;
## ver.  : 2018-11-27, KIT, SCC&lt;br /&gt;
&lt;br /&gt;
## Define maximum number of jobs via positional parameter 1, default is 5&lt;br /&gt;
max_nojob=${1:-5}&lt;br /&gt;
&lt;br /&gt;
## Define your jobscript (e.g. &amp;quot;~/chain_job.sh&amp;quot;)&lt;br /&gt;
chain_link_job=${PWD}/chain_job.sh&lt;br /&gt;
&lt;br /&gt;
## Define type of dependency via positional parameter 2, default is &#039;afterok&#039;&lt;br /&gt;
dep_type=&amp;quot;${2:-afterok}&amp;quot;&lt;br /&gt;
## -&amp;gt; List of all dependencies:&lt;br /&gt;
## https://slurm.schedmd.com/sbatch.html&lt;br /&gt;
&lt;br /&gt;
myloop_counter=1&lt;br /&gt;
## Submit loop&lt;br /&gt;
while [ ${myloop_counter} -le ${max_nojob} ] ; do&lt;br /&gt;
   ##&lt;br /&gt;
   ## Differ slurm_opt depending on chain link number&lt;br /&gt;
   if [ ${myloop_counter} -eq 1 ] ; then&lt;br /&gt;
      slurm_opt=&amp;quot;&amp;quot;&lt;br /&gt;
   else&lt;br /&gt;
      slurm_opt=&amp;quot;-d ${dep_type}:${jobID}&amp;quot;&lt;br /&gt;
   fi&lt;br /&gt;
   ##&lt;br /&gt;
   ## Print current iteration number and sbatch command&lt;br /&gt;
   echo &amp;quot;Chain job iteration = ${myloop_counter}&amp;quot;&lt;br /&gt;
   echo &amp;quot;   sbatch --export=myloop_counter=${myloop_counter} ${slurm_opt} ${chain_link_job}&amp;quot;&lt;br /&gt;
   ## Store job ID for next iteration by storing output of sbatch command with empty lines&lt;br /&gt;
   jobID=$(sbatch -p &amp;lt;queue&amp;gt; --export=ALL,myloop_counter=${myloop_counter} ${slurm_opt} ${chain_link_job} 2&amp;gt;&amp;amp;1 | sed &#039;s/[S,a-z]* //g&#039;)&lt;br /&gt;
   ##   &lt;br /&gt;
   ## Check if ERROR occured&lt;br /&gt;
   if [[ &amp;quot;${jobID}&amp;quot; =~ &amp;quot;ERROR&amp;quot; ]] ; then&lt;br /&gt;
      echo &amp;quot;   -&amp;gt; submission failed!&amp;quot; ; exit 1&lt;br /&gt;
   else&lt;br /&gt;
      echo &amp;quot;   -&amp;gt; job number = ${jobID}&amp;quot;&lt;br /&gt;
   fi&lt;br /&gt;
   ##&lt;br /&gt;
   ## Increase counter&lt;br /&gt;
   let myloop_counter+=1&lt;br /&gt;
done&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== GPU jobs ====&lt;br /&gt;
&lt;br /&gt;
The nodes in the gpu_h100, gpu_mi300, gpu_a100_il and gpu_h100_il  queues have 4 NVIDIA Ampere A100 GPUs or 4 NVIDIA Hopper H100 GPUs. Just submitting a job to these queues is not enough to also allocate one or more GPUs, you have to do so using the &amp;quot;--gres=gpu&amp;quot; parameter. You have to specifiy how many GPUs your job needs, e.g. &amp;quot;--gres=gpu:2&amp;quot; will request two GPUs.&lt;br /&gt;
&lt;br /&gt;
The GPU nodes are shared between multiple jobs if the jobs don&#039;t request all the GPUs in a node and there are enough resources to run more than one job. The individual GPUs are always bound to a single job and will not be shared between different jobs.&lt;br /&gt;
&lt;br /&gt;
a) add after the initial line of your script job.sh the line including the&lt;br /&gt;
information about the GPU usage:&amp;lt;br&amp;gt;   #SBATCH --gres=gpu:2&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
#SBATCH --ntasks=40&lt;br /&gt;
#SBATCH --time=02:00:00&lt;br /&gt;
#SBATCH --mem=4000&lt;br /&gt;
#SBATCH --gres=gpu:2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or b) execute:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sbatch -p &amp;lt;queue&amp;gt; -n 40 -t 02:00:00 --mem 4000 --gres=gpu:2 job.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
If you start an interactive session on of the GPU nodes, you can use the &amp;quot;nvidia-smi&amp;quot; command to list the GPUs allocated to your job:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ nvidia-smi&lt;br /&gt;
Fri Apr  4 09:51:29 2025       &lt;br /&gt;
+-----------------------------------------------------------------------------------------+&lt;br /&gt;
| NVIDIA-SMI 570.86.15              Driver Version: 570.86.15      CUDA Version: 12.8     |&lt;br /&gt;
|-----------------------------------------+------------------------+----------------------+&lt;br /&gt;
| GPU  Name                 Persistence-M | Bus-Id          Disp.A | Volatile Uncorr. ECC |&lt;br /&gt;
| Fan  Temp   Perf          Pwr:Usage/Cap |           Memory-Usage | GPU-Util  Compute M. |&lt;br /&gt;
|                                         |                        |               MIG M. |&lt;br /&gt;
|=========================================+========================+======================|&lt;br /&gt;
|   0  NVIDIA H100                    On  |   00000000:06:00.0 Off |                    0 |&lt;br /&gt;
| N/A   45C    P0             70W /  415W |      27MiB /  95830MiB |      0%      Default |&lt;br /&gt;
|                                         |                        |             Disabled |&lt;br /&gt;
+-----------------------------------------+------------------------+----------------------+&lt;br /&gt;
|   1  NVIDIA H100                    On  |   00000000:26:00.0 Off |                    0 |&lt;br /&gt;
| N/A   45C    P0             69W /  415W |      27MiB /  95830MiB |      0%      Default |&lt;br /&gt;
|                                         |                        |             Disabled |&lt;br /&gt;
+-----------------------------------------+------------------------+----------------------+&lt;br /&gt;
                                                                                         &lt;br /&gt;
+-----------------------------------------------------------------------------------------+&lt;br /&gt;
| Processes:                                                                              |&lt;br /&gt;
|  GPU   GI   CI              PID   Type   Process name                        GPU Memory |&lt;br /&gt;
|        ID   ID                                                               Usage      |&lt;br /&gt;
|=========================================================================================|&lt;br /&gt;
|    0   N/A  N/A            3569      G   /usr/libexec/Xorg                        17MiB |&lt;br /&gt;
|    1   N/A  N/A            3569      G   /usr/libexec/Xorg                        17MiB |&lt;br /&gt;
+-----------------------------------------------------------------------------------------+&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
In case of using Open MPI, the underlying communication infrastructure (UCX and Open MPI&#039;s BTL) is CUDA-aware.&lt;br /&gt;
Please run Open MPI&#039;s mpirun using the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mpirun --mca pml ucx --mca btl_openib_warn_default_gid_prefix 0 -np 2 ./mpi_cuda_app&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
or disabling the (older) communication layer Bit-Transfer-Layer (short BTL) alltogether:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mpirun --mca pml ucx --mca btl ^openib -np 2 ./mpi_cuda_app&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== LSDF Online Storage ====&lt;br /&gt;
On bwUniCluster 3.0 you can use for special cases the LSDF Online Storage on the HPC cluster nodes. Please request for this service separately ([https://www.lsdf.kit.edu/os/storagerequest/: LSDF Storage Request]).&lt;br /&gt;
To mount the LSDF Online Storage on the compute nodes during the job runtime the&lt;br /&gt;
the constraint flag &amp;quot;LSDF&amp;quot; has to be set.  &lt;br /&gt;
&lt;br /&gt;
a) add after the initial line of your script job.sh the line including the&lt;br /&gt;
information about the LSDF Online Storage usage:&amp;lt;br&amp;gt;   #SBATCH --constraint=LSDF&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
#SBATCH --ntasks=1&lt;br /&gt;
#SBATCH --time=120&lt;br /&gt;
#SBATCH --mem=200&lt;br /&gt;
#SBATCH --constraint=LSDF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or b) execute:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sbatch -p &amp;lt;queue&amp;gt; -n 1 -t 2:00:00 --mem 200 job.sh -C LSDF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
For the usage of the LSDF Online Storage&lt;br /&gt;
the following environment variables are available: $LSDF, $LSDFPROJECTS, $LSDFHOME.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====BeeOND (BeeGFS On-Demand)====&lt;br /&gt;
&lt;br /&gt;
BeeOND instances are integrated into the prolog and epilog script of the cluster batch system Slurm. It can be used on the exclusive compute nodes during the job runtime with the constraint flag &amp;quot;BEEOND&amp;quot;, &amp;quot;BEEOND_4MDS&amp;quot; or &amp;quot;BEEOND_MAXMDS&amp;quot; ([[BwUniCluster_2.0_Slurm_common_Features#sbatch_Command_Parameters|Slurm Command Parameters]])&lt;br /&gt;
* BEEOND: one metadata server is started on the first node&lt;br /&gt;
* BEEOND_4MDS: 4 metadata servers are started within your job. If you have less than 4 nodes less metadata servers are started.&lt;br /&gt;
* BEEOND_MAXMDS: on every node of your job a metadata server for the on_demand file system is started&lt;br /&gt;
&lt;br /&gt;
As starting point we recommend using the &amp;quot;BEEOND&amp;quot; option. If you are unsure if this is sufficient for you feel free to contact the support team.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
#SBATCH ...&lt;br /&gt;
#SBATCH --constraint=BEEOND   # or BEEOND_4MDS or BEEOND_MAXMDS&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After your job has started you can find the private on-demand file system in &#039;&#039;&#039;/mnt/odfs/${SLURM_JOB_ID}&#039;&#039;&#039; directory. The mountpoint comes with five pre-configured directories:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# For small files (stripe count = 1)&lt;br /&gt;
/mnt/odfs/${SLURM_JOB_ID}/stripe_1&lt;br /&gt;
# Stripe count = 4&lt;br /&gt;
/mnt/odfs/${SLURM_JOB_ID}/stripe_default &lt;br /&gt;
# or &lt;br /&gt;
/mnt/odfs/${SLURM_JOB_ID}/stripe_4&lt;br /&gt;
# Stripe count = 8, 16 or 32, use this directories for medium sized and large files or when using MPI-IO&lt;br /&gt;
/mnt/odfs/${SLURM_JOB_ID}/stripe_8&lt;br /&gt;
/mnt/odfs/${SLURM_JOB_ID}/stripe_16 &lt;br /&gt;
# or &lt;br /&gt;
/mnt/odfs/${SLURM_JOB_ID}/stripe_32&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you request less nodes than stripe count, the stripe count will be the number of nodes. For example, if you only request 8 nodes the directory stripe_16 has only a stripe count 8.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;font color=red&amp;gt;&#039;&#039;&#039;Attention:&#039;&#039;&#039;&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
:Be careful when creating large files: use always the directory with the max stripe count for large files.&lt;br /&gt;
:If you create large files use a higher stripe count. For example, if your largest file is 1.1 Tb, then you have to use a stripe count larger than 2, &lt;br /&gt;
:otherwise the used disk space is exceeded.  &lt;br /&gt;
&lt;br /&gt;
The capacity of the private file system depends on the number of nodes. For each node you get 750 Gbyte.&lt;br /&gt;
If you request 100 nodes for your job, the private file system is 100 * 750 Gbyte ~ 75 Tbyte (approx) capacity.&lt;br /&gt;
&lt;br /&gt;
== Start time of job or resources : squeue --start ==&lt;br /&gt;
The command can be used by any user to displays the estimated start time of a job based a number of analysis types based on historical usage, earliest available reservable resources, and priority based backlog. The command squeue is explained in detail on the webpage https://slurm.schedmd.com/squeue.html or via manpage (man squeue). &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=== Access ===&lt;br /&gt;
By default, this command can be run by &#039;&#039;&#039;any user&#039;&#039;&#039;. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== List of your submitted jobs : squeue ==&lt;br /&gt;
Displays information about YOUR active, pending and/or recently completed jobs. The command displays all own active and pending jobs. The command squeue is explained in detail on the webpage https://slurm.schedmd.com/squeue.html or via manpage (man squeue).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=== Access ===&lt;br /&gt;
By default, this command can be run by any user.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Flags ===&lt;br /&gt;
{| width=750px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Flag !! Description&lt;br /&gt;
|-&lt;br /&gt;
| -l, --long&lt;br /&gt;
| Report more of the available information for the selected jobs or job steps, subject to any constraints specified.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
&#039;&#039;squeue&#039;&#039; example on bwUniCluster 3.0 &amp;lt;small&amp;gt;(Only your own jobs are displayed!)&amp;lt;/small&amp;gt;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ squeue &lt;br /&gt;
             JOBID PARTITION     NAME     USER ST       TIME  NODES NODELIST(REASON)&lt;br /&gt;
              1262       cpu     wrap ka_ab123  R       8:15      1 uc3n002&lt;br /&gt;
              1267 dev_gpu_h     wrap ka_ab123 PD       0:00      1 (Resources)&lt;br /&gt;
              1265   highmem     wrap ka_ab123  R       2:41      1 uc3n084&lt;br /&gt;
$ squeue -l&lt;br /&gt;
             JOBID PARTITION     NAME     USER    STATE       TIME TIME_LIMI  NODES NODELIST(REASON)&lt;br /&gt;
              1262       cpu     wrap ka_ab123  RUNNING       8:55     20:00      1 uc3n002&lt;br /&gt;
              1267 dev_gpu_h     wrap ka_ab123  PENDING       0:00     20:00      1 (Resources)&lt;br /&gt;
              1265   highmem     wrap ka_ab123  RUNNING       3:21     20:00      1 uc3n084&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* The output of &#039;&#039;squeue&#039;&#039; shows how many jobs of yours are running or pending and how many nodes are in use by your jobs.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Shows free resources : sinfo_t_idle ==&lt;br /&gt;
The Slurm command sinfo is used to view partition and node information for a system running Slurm. It incorporates down time, reservations, and node state information in determining the available backfill window. The sinfo command can only be used by the administrator.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
SCC has prepared a special script (sinfo_t_idle) to find out how many processors are available for immediate use on the system. It is anticipated that users will use this information to submit jobs that meet these criteria and thus obtain quick job turnaround times. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=== Example ===&lt;br /&gt;
* The following command displays what resources are available for immediate use for the whole partition.&lt;br /&gt;
&amp;lt;pre&amp;gt;$ sinfo_t_idle&lt;br /&gt;
Partition dev_cpu                 :      2 nodes idle&lt;br /&gt;
Partition cpu                     :     68 nodes idle&lt;br /&gt;
Partition highmem                 :      4 nodes idle&lt;br /&gt;
Partition dev_gpu_h100            :      0 nodes idle&lt;br /&gt;
Partition gpu_h100                :     11 nodes idle&lt;br /&gt;
Partition gpu_mi300               :      1 nodes idle&lt;br /&gt;
Partition dev_cpu_il              :      0 nodes idle&lt;br /&gt;
Partition cpu_il                  :      0 nodes idle&lt;br /&gt;
Partition dev_gpu_a100_il         :      0 nodes idle&lt;br /&gt;
Partition gpu_a100_il             :      0 nodes idle&lt;br /&gt;
Partition gpu_h100_il             :      0 nodes idle&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Detailed job information : scontrol show job ==&lt;br /&gt;
scontrol show job displays detailed job state information and diagnostic output for all or a specified job of yours. Detailed information is available for active, pending and recently completed jobs. The command scontrol is explained in detail on the webpage https://slurm.schedmd.com/scontrol.html or via manpage (man scontrol). &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Display the state of all your jobs in normal mode: scontrol show job&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Display the state of a job with &amp;lt;jobid&amp;gt; in normal mode: scontrol show job &amp;lt;jobid&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=== Access ===&lt;br /&gt;
* End users can use scontrol show job to view the status of their &#039;&#039;&#039;own jobs&#039;&#039;&#039; only. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Arguments ===&lt;br /&gt;
{| width=750px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Option !! Default !! Description !! Example&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;width:12%;&amp;quot; &lt;br /&gt;
| -d&lt;br /&gt;
| (n/a)&lt;br /&gt;
| Detailed mode&lt;br /&gt;
| Example: Display the state with jobid 18089884 in detailed mode. &amp;lt;br&amp;gt; &amp;lt;pre&amp;gt;scontrol -d show job 18089884&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Scontrol show job Example ===&lt;br /&gt;
Here is an example from bwUniCluster 3.0.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
squeue    # show my own jobs (here the userid is replaced!)&lt;br /&gt;
             JOBID PARTITION     NAME     USER ST       TIME  NODES NODELIST(REASON)&lt;br /&gt;
              1262       cpu     wrap ka_zs040  R       1:12      1 uc3n002&lt;br /&gt;
&lt;br /&gt;
$&lt;br /&gt;
$ # now, see what&#039;s up with my pending job with jobid 18089884&lt;br /&gt;
$ &lt;br /&gt;
$ scontrol show job 1262&lt;br /&gt;
&lt;br /&gt;
JobId=1262 JobName=wrap&lt;br /&gt;
   UserId=ka_zs0402(241992) GroupId=ka_scc(12345) MCS_label=N/A&lt;br /&gt;
   Priority=4246 Nice=0 Account=ka QOS=normal&lt;br /&gt;
   JobState=RUNNING Reason=None Dependency=(null)&lt;br /&gt;
   Requeue=1 Restarts=0 BatchFlag=1 Reboot=0 ExitCode=0:0&lt;br /&gt;
   RunTime=00:00:37 TimeLimit=00:20:00 TimeMin=N/A&lt;br /&gt;
   SubmitTime=2025-04-04T10:01:30 EligibleTime=2025-04-04T10:01:30&lt;br /&gt;
   AccrueTime=2025-04-04T10:01:30&lt;br /&gt;
   StartTime=2025-04-04T10:01:31 EndTime=2025-04-04T10:21:31 Deadline=N/A&lt;br /&gt;
   SuspendTime=None SecsPreSuspend=0 LastSchedEval=2025-04-04T10:01:31 Scheduler=Main&lt;br /&gt;
   Partition=cpu AllocNode:Sid=uc3n999:2819841&lt;br /&gt;
   ReqNodeList=(null) ExcNodeList=(null)&lt;br /&gt;
   NodeList=uc3n002&lt;br /&gt;
   BatchHost=uc3n002&lt;br /&gt;
   NumNodes=1 NumCPUs=2 NumTasks=1 CPUs/Task=1 ReqB:S:C:T=0:0:*:*&lt;br /&gt;
   ReqTRES=cpu=1,mem=2000M,node=1,billing=1&lt;br /&gt;
   AllocTRES=cpu=2,mem=4000M,node=1,billing=2&lt;br /&gt;
   Socks/Node=* NtasksPerN:B:S:C=0:0:*:1 CoreSpec=*&lt;br /&gt;
   MinCPUsNode=1 MinMemoryCPU=2000M MinTmpDiskNode=0&lt;br /&gt;
   Features=(null) DelayBoot=00:00:00&lt;br /&gt;
   OverSubscribe=OK Contiguous=0 Licenses=(null) Network=(null)&lt;br /&gt;
   Command=(null)&lt;br /&gt;
   WorkDir=/pfs/data6/home/ka/ka_scc/ka_zs0402&lt;br /&gt;
   StdErr=/pfs/data6/home/ka/ka_scc/ka_zs0402/slurm-1262.out&lt;br /&gt;
   StdIn=/dev/null&lt;br /&gt;
   StdOut=/pfs/data6/home/ka/ka_scc/ka_zs0402/slurm-1262.out&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
You can use standard Linux pipe commands to filter the very detailed scontrol show job output.&lt;br /&gt;
* In which state the job is?&lt;br /&gt;
&amp;lt;pre&amp;gt;$ scontrol show job 1262 | grep -i State&lt;br /&gt;
   JobState=RUNNING Reason=None Dependency=(null)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Cancel Slurm Jobs ==&lt;br /&gt;
The scancel command is used to cancel jobs. The command scancel is explained in detail on the webpage https://slurm.schedmd.com/scancel.html or via manpage (man scancel).   &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=== Canceling own jobs : scancel ===&lt;br /&gt;
scancel is used to signal or cancel jobs, job arrays or job steps. The command is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ scancel [-i] &amp;lt;job-id&amp;gt;&lt;br /&gt;
$ scancel -t &amp;lt;job_state_name&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Flag !! Default !! Description !! Example&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -i, --interactive&lt;br /&gt;
| (n/a)&lt;br /&gt;
| Interactive mode.&lt;br /&gt;
| Cancel the job 987654 interactively. &amp;lt;br&amp;gt; &amp;lt;pre&amp;gt; scancel -i 987654 &amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| -t, --state&lt;br /&gt;
| (n/a)&lt;br /&gt;
| Restrict the scancel operation to jobs in a certain state. &amp;lt;br&amp;gt; &amp;quot;job_state_name&amp;quot; may have a value of either &amp;quot;PENDING&amp;quot;, &amp;quot;RUNNING&amp;quot; or &amp;quot;SUSPENDED&amp;quot;.&lt;br /&gt;
| Cancel all jobs in state &amp;quot;PENDING&amp;quot;. &amp;lt;br&amp;gt; &amp;lt;pre&amp;gt; scancel -t &amp;quot;PENDING&amp;quot; &amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Resource Managers =&lt;br /&gt;
=== Batch Job (Slurm) Variables ===&lt;br /&gt;
The following environment variables of Slurm are added to your environment once your job has started&lt;br /&gt;
&amp;lt;small&amp;gt;(only an excerpt of the most important ones)&amp;lt;/small&amp;gt;.&lt;br /&gt;
{| width=750px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Environment !! Brief explanation&lt;br /&gt;
|- &lt;br /&gt;
| SLURM_JOB_CPUS_PER_NODE &lt;br /&gt;
| Number of processes per node dedicated to the job&lt;br /&gt;
|- &lt;br /&gt;
| SLURM_JOB_NODELIST &lt;br /&gt;
| List of nodes dedicated to the job&lt;br /&gt;
|- &lt;br /&gt;
| SLURM_JOB_NUM_NODES &lt;br /&gt;
| Number of nodes dedicated to the job&lt;br /&gt;
|- &lt;br /&gt;
| SLURM_MEM_PER_NODE &lt;br /&gt;
| Memory per node dedicated to the job &lt;br /&gt;
|- &lt;br /&gt;
| SLURM_NPROCS&lt;br /&gt;
| Total number of processes dedicated to the job &lt;br /&gt;
|-&lt;br /&gt;
| SLURM_CLUSTER_NAME&lt;br /&gt;
| Name of the cluster executing the job&lt;br /&gt;
|-&lt;br /&gt;
| SLURM_CPUS_PER_TASK &lt;br /&gt;
| Number of CPUs requested per task&lt;br /&gt;
|-&lt;br /&gt;
| SLURM_JOB_ACCOUNT&lt;br /&gt;
| Account name &lt;br /&gt;
|-&lt;br /&gt;
| SLURM_JOB_ID&lt;br /&gt;
| Job ID&lt;br /&gt;
|-&lt;br /&gt;
| SLURM_JOB_NAME&lt;br /&gt;
| Job Name&lt;br /&gt;
|-&lt;br /&gt;
| SLURM_JOB_PARTITION&lt;br /&gt;
| Partition/queue running the job&lt;br /&gt;
|-&lt;br /&gt;
| SLURM_JOB_UID&lt;br /&gt;
| User ID of the job&#039;s owner&lt;br /&gt;
|-&lt;br /&gt;
| SLURM_SUBMIT_DIR&lt;br /&gt;
| Job submit folder.  The directory from which sbatch was invoked. &lt;br /&gt;
|-&lt;br /&gt;
| SLURM_JOB_USER&lt;br /&gt;
| User name of the job&#039;s owner&lt;br /&gt;
|-&lt;br /&gt;
| SLURM_RESTART_COUNT&lt;br /&gt;
| Number of times job has restarted&lt;br /&gt;
|-&lt;br /&gt;
| SLURM_PROCID&lt;br /&gt;
| Task ID (MPI rank)&lt;br /&gt;
|-&lt;br /&gt;
| SLURM_NTASKS&lt;br /&gt;
| The total number of tasks available for the job&lt;br /&gt;
|-&lt;br /&gt;
| SLURM_STEP_ID&lt;br /&gt;
| Job step ID&lt;br /&gt;
|-&lt;br /&gt;
| SLURM_STEP_NUM_TASKS&lt;br /&gt;
| Task count (number of MPI ranks)&lt;br /&gt;
|-&lt;br /&gt;
| SLURM_JOB_CONSTRAINT&lt;br /&gt;
| Job constraints&lt;br /&gt;
|}&lt;br /&gt;
See also:&lt;br /&gt;
* [https://slurm.schedmd.com/sbatch.html#SECTION_INPUT-ENVIRONMENT-VARIABLES Slurm input and output environment variables]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Job Exit Codes ===&lt;br /&gt;
A job&#039;s exit code (also known as exit status, return code and completion code) is captured by SLURM and saved as part of the job record. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Any non-zero exit code will be assumed to be a job failure and will result in a Job State of FAILED with a reason of &amp;quot;NonZeroExitCode&amp;quot;.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The exit code is an 8 bit unsigned number ranging between 0 and 255. While it is possible for a job to return a negative exit code, SLURM will display it as an unsigned value in the 0 - 255 range.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
==== Displaying Exit Codes and Signals ====&lt;br /&gt;
SLURM displays a job&#039;s exit code in the output of the &#039;&#039;&#039;scontrol show job&#039;&#039;&#039; and the sview utility.&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
When a signal was responsible for a job or step&#039;s termination, the signal number will be displayed after the exit code, delineated by a colon(:).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
==== Submitting Termination Signal ====&lt;br /&gt;
Here is an example, how to &#039;save&#039; a Slurm termination signal in a typical jobscript.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
[...]&lt;br /&gt;
exit_code=$?&lt;br /&gt;
mpirun  -np &amp;lt;#cores&amp;gt;  &amp;lt;EXE_BIN_DIR&amp;gt;/&amp;lt;executable&amp;gt; ... (options)  2&amp;gt;&amp;amp;1&lt;br /&gt;
[ &amp;quot;$exit_code&amp;quot; -eq 0 ] &amp;amp;&amp;amp; echo &amp;quot;all clean...&amp;quot; || \&lt;br /&gt;
   echo &amp;quot;Executable &amp;lt;EXE_BIN_DIR&amp;gt;/&amp;lt;executable&amp;gt; finished with exit code ${$exit_code}&amp;quot;&lt;br /&gt;
[...]&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
* Do not use &#039;&#039;&#039;&#039;time&#039;&#039;&#039;&#039; mpirun! The exit code will be the one submitted by the first (time) program.&lt;br /&gt;
* You do not need an &#039;&#039;&#039;exit $exit_code&#039;&#039;&#039; in the scripts.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
[[#top|Back to top]]&lt;/div&gt;</summary>
		<author><name>P Schuhmacher</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster3.0/Running_Jobs&amp;diff=14632</id>
		<title>BwUniCluster3.0/Running Jobs</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster3.0/Running_Jobs&amp;diff=14632"/>
		<updated>2025-04-04T14:51:17Z</updated>

		<summary type="html">&lt;p&gt;P Schuhmacher: /* Check available resources */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
= Purpose and function of a queuing system =&lt;br /&gt;
&lt;br /&gt;
General procedure: Hint to [[Running_Calculations | Running Calculations]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Job submission process ==&lt;br /&gt;
&lt;br /&gt;
bwUniCluster 3.0 has installed the workload managing software Slurm. Therefore any job submission by the user is to be executed by commands of the Slurm software. Slurm queues and runs user jobs based on fair sharing policies.&lt;br /&gt;
&lt;br /&gt;
== Slurm ==&lt;br /&gt;
&lt;br /&gt;
HPC Workload Manager on bwUniCluster 3.0 is Slurm.&lt;br /&gt;
Slurm is a cluster management and job scheduling system. Slurm has three key functions. &lt;br /&gt;
* First, it allocates access to resources (compute cores on nodes) to users for some duration of time so they can perform work. &lt;br /&gt;
* it provides a framework for starting, executing, and monitoring work (normally a parallel job) on the set of allocated nodes. &lt;br /&gt;
* it arbitrates contention for resources by managing a queue of pending work.&lt;br /&gt;
&lt;br /&gt;
Any kind of calculation on the compute nodes of bwUniCluster 3.0 requires the user to define calculations as a sequence of commands together with required run time, number of CPU cores and main memory and submit all, i.e., the &#039;&#039;&#039;batch job&#039;&#039;&#039;, to a resource and workload managing software. &lt;br /&gt;
== Terms and definitions ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Partitions &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Slurm manages job queues for different &#039;&#039;&#039;partitions&#039;&#039;&#039;. Partitions are used to group similar node types (e.g. nodes with and without accelerators) and to enforce different access policies and resource limits.&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 3.0 there are different partitions:&lt;br /&gt;
&lt;br /&gt;
* CPU-only nodes&lt;br /&gt;
** 2-socket nodes, consisting of 2 Intel Ice Lake processors with 32 cores each or 2 AMD processors with 48 cores each&lt;br /&gt;
** 2-socket nodes with very high RAM capacity, consisting of 2 AMD processors with 48 cores each&lt;br /&gt;
* GPU-accelerated nodes&lt;br /&gt;
** 2-socket nodes with 4x NVIDIA A100 or 4x NVIDIA H100 GPUs&lt;br /&gt;
** 4-socket node with 4x AMD Instinct accelerator&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Queues &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Job &#039;&#039;&#039;queues&#039;&#039;&#039; are used to manage jobs that request access to shared but limited computing resources of a certain kind (partition).&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 3.0 there are different main types of queues:&lt;br /&gt;
* Regular queues&lt;br /&gt;
** cpu: Jobs that request CPU-only nodes.&lt;br /&gt;
** gpu: Jobs that request GPU-accelerated nodes.&lt;br /&gt;
* Development queues (dev)&lt;br /&gt;
** Short, usually interactive jobs that are used for developing, compiling and testing code and workflows. The intention behind development queues is to provide users with immediate access to computer resources without having to wait. This is the place to realize instantaneous heavy compute without affecting other users, as would be the case on the login nodes.&lt;br /&gt;
&lt;br /&gt;
Requested compute resources such as (wall-)time, number of nodes and amount of memory are restricted and must fit into the boundaries imposed by the queues. The request for compute resources on the bwUniCluster 3.0 &amp;lt;font color=red&amp;gt;requires at least the specification of the &#039;&#039;&#039;queue&#039;&#039;&#039; and the &#039;&#039;&#039;time&#039;&#039;&#039;&amp;lt;/font&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Jobs &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Jobs can be run non-interactively as &#039;&#039;&#039;batch jobs&#039;&#039;&#039; or as &#039;&#039;&#039;interactive jobs&#039;&#039;&#039;.&lt;br /&gt;
Submitting a batch job means, that all steps of a compute project are defined in a Bash script. This Bash script is queued and executed as soon as the compute resources are available and allocated. Jobs are enqueued with the &#039;&#039;sbatch&#039;&#039; command.&lt;br /&gt;
&lt;br /&gt;
For interactive jobs, the resources are requested with the &#039;&#039;salloc&#039;&#039; command. As soon as the computing resources are available and allocated, a command line prompt is returned on a computing node and the user can freely dispose of the resources now available to him.&lt;br /&gt;
{|style=&amp;quot;background:#deffee; width:100%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;padding:5px; background:#cef2e0; text-align:left&amp;quot;|&lt;br /&gt;
[[Image:Attention.svg|center|25px]]&lt;br /&gt;
|style=&amp;quot;padding:5px; background:#cef2e0; text-align:left&amp;quot;|&lt;br /&gt;
&#039;&#039;&#039;Please remember:&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Heavy computations are not allowed on the login nodes&#039;&#039;&#039;.&amp;lt;br&amp;gt;Use a developement or a regular job queue instead! Please refer to [[BwUniCluster3.0/Login#Allowed_Activities_on_Login_Nodes|Allowed Activities on Login Nodes]].&lt;br /&gt;
* &#039;&#039;&#039;Development queues&#039;&#039;&#039; are meant for &#039;&#039;&#039;development tasks&#039;&#039;&#039;.&amp;lt;br&amp;gt;Do not misuse this queue for regular, short-running jobs or chain jobs! Only one running job at a time is enabled. Maximum queue length is reduced to 3.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Queues on bwUniCluster 3.0 = &lt;br /&gt;
== Policy ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Regular Queues ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
! style=&amp;quot;width:5%&amp;quot;| Queue&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Node-Type&lt;br /&gt;
! style=&amp;quot;width:23%&amp;quot;| Default Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Minimal Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Maximum Resources&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;cpu_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Ice Lake&lt;br /&gt;
| mem-per-cpu=1950mb&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=30, mem=249600mb, ntasks-per-node=64, (threads-per-core=2) &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;cpu&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Standard&lt;br /&gt;
| mem-per-cpu=1125mb&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=20, mem=380000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;highmem&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;High Memory&lt;br /&gt;
| mem-per-cpu=1125mb&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=4, mem=2300000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;gpu_h100&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;NVIDIA GPU x4&lt;br /&gt;
| mem-per-cpu=1125mb&amp;lt;br/&amp;gt;cpus-per-gpu=24&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=12, mem=760000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;gpu_mi300&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU node&amp;lt;br/&amp;gt;AMD GPU x4&lt;br /&gt;
| mem-per-cpu=1125mb&amp;lt;br/&amp;gt;cpus-per-gpu=24&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=1, mem=510000mb, ntasks-per-node=40, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;gpu_a100_il&amp;lt;/code&amp;gt;/&amp;lt;code&amp;gt;gpu_h100_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;Ice Lake&amp;lt;br/&amp;gt;NVIDIA GPU x4&lt;br /&gt;
| mem-per-gpu=127500mb&amp;lt;br/&amp;gt;cpus-per-gpu=16&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=9, mem=510000mb, ntasks-per-node=64, (threads-per-core=2) &lt;br /&gt;
|}&lt;br /&gt;
Table 1: Regular Queues&lt;br /&gt;
&lt;br /&gt;
== Development Queues ==&lt;br /&gt;
Only for development, i.e. debugging or performance optimization ...&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
! style=&amp;quot;width:5%&amp;quot;| Queue&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Node Type&lt;br /&gt;
! style=&amp;quot;width:23%&amp;quot;| Default Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Minimal Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Maximum Resources&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_cpu_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Ice Lake&lt;br /&gt;
| mem-per-cpu=1950mb&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=8, mem=249600mb, ntasks-per-node=64, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_cpu&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Standard&lt;br /&gt;
| mem-per-cpu=1125mb&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=180000mb, ntasks-per-node=40, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_highmem&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;High Memory&lt;br /&gt;
| mem-per-cpu=1125mb&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=180000mb, ntasks-per-node=40, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_gpu_h100&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;NVIDIA GPU x4&lt;br /&gt;
| mem-per-cpu=1125mb&amp;lt;br/&amp;gt;cpus-per-gpu=24&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=180000mb, ntasks-per-node=40, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_gpu_a100_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;NVIDIA GPU x4&amp;lt;br/&amp;gt;&lt;br /&gt;
| mem-per-gpu=127500mb&amp;lt;br/&amp;gt;cpus-per-gpu=16 &lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=510000mb, ntasks-per-node=64, (threads-per-core=2) &lt;br /&gt;
|}&lt;br /&gt;
Table 2: Development Queues&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Default resources of a queue class defines time, #tasks and memory if not explicitly given with sbatch command. Resource list acronyms &#039;&#039;--time&#039;&#039;, &#039;&#039;--ntasks&#039;&#039;, &#039;&#039;--nodes&#039;&#039;, &#039;&#039;--mem&#039;&#039; and &#039;&#039;--mem-per-cpu&#039;&#039; are described [[BwUniCluster_3.0_Slurm_common_Features|here]].&lt;br /&gt;
&lt;br /&gt;
== Check available resources ==&lt;br /&gt;
The Slurm command sinfo is used to view partition and node information for a system running Slurm. It incorporates down time, reservations, and node state information in determining the available backfill window. The sinfo command can only be used by the administrator.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
SCC has prepared a special script (sinfo_t_idle) to find out how many processors are available for immediate use on the system. It is anticipated that users will use this information to submit jobs that meet these criteria and thus obtain quick job turnaround times. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=== Access ===&lt;br /&gt;
By default, this command can be used by any user or administrator. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=== Example ===&lt;br /&gt;
* The following command displays what resources are available for immediate use for the whole partition.&lt;br /&gt;
&amp;lt;pre&amp;gt;$ sinfo_t_idle&lt;br /&gt;
Partition dev_cpu                 :      2 nodes idle&lt;br /&gt;
Partition cpu                     :     68 nodes idle&lt;br /&gt;
Partition highmem                 :      4 nodes idle&lt;br /&gt;
Partition dev_gpu_h100            :      0 nodes idle&lt;br /&gt;
Partition gpu_h100                :     11 nodes idle&lt;br /&gt;
Partition gpu_mi300               :      1 nodes idle&lt;br /&gt;
Partition dev_cpu_il              :      0 nodes idle&lt;br /&gt;
Partition cpu_il                  :      0 nodes idle&lt;br /&gt;
Partition dev_gpu_a100_il         :      0 nodes idle&lt;br /&gt;
Partition gpu_a100_il             :      0 nodes idle&lt;br /&gt;
Partition gpu_h100_il             :      0 nodes idle&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* For the above example jobs in all partitions can be run immediately.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Running Jobs =&lt;br /&gt;
== Batch Jobs: sbatch ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To run your batch job on one of the cpu nodes, please use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sbatch --partition=dev_cpu&lt;br /&gt;
     or &lt;br /&gt;
$ sbatch -p dev_cpu&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Interactive Jobs: salloc ==&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 3.0 you are only allowed to run short jobs (&amp;lt;&amp;lt; 1 hour) with little memory requirements (&amp;lt;&amp;lt; 8 GByte) on the logins nodes. If you want to run longer jobs and/or jobs with a request of more than 8 GByte of memory, you must allocate resources for so-called interactive jobs by usage of the command salloc on a login node. Considering a serial application running on a compute node that requires 5000 MByte of memory and limiting the interactive run to 2 hours the following command has to be executed:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ salloc -p cpu -n 1 -t 120 --mem=5000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then you will get one core on a compute node within the partition &amp;quot;cpu&amp;quot;. After execution of this command &#039;&#039;&#039;DO NOT CLOSE&#039;&#039;&#039; your current terminal session but wait until the queueing system Slurm has granted you the requested resources on the compute system. You will be logged in automatically on the granted core! To run a serial program on the granted core you only have to type the name of the executable.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./&amp;lt;my_serial_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please be aware that your serial job must run less than 2 hours in this example, else the job will be killed during runtime by the system. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can also start now a graphical X11-terminal connecting you to the dedicated resource that is available for 2 hours. You can start it by the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ xterm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that, once the walltime limit has been reached the resources - i.e. the compute node - will automatically be revoked.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
An interactive parallel application running on one compute node or on many compute nodes (e.g. here 5 nodes) with 96 cores each requires usually an amount of memory in GByte (e.g. 50 GByte) and a maximum time (e.g. 1 hour). E.g. 5 nodes can be allocated by the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ salloc -p cpu -N 5 --ntasks-per-node=96 -t 01:00:00  --mem=50gb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you can run parallel jobs on 480 cores requiring 50 GByte of memory per node. Please be aware that you will be logged in on core 0 of the first node.&lt;br /&gt;
If you want to have access to another node you have to open a new terminal, connect it also to bwUniCluster 3.0 and type the following commands to&lt;br /&gt;
connect to the running interactive job and then to a specific node:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ srun --jobid=XXXXXXXX --pty /bin/bash&lt;br /&gt;
$ srun --nodelist=uc3nXXX --pty /bin/bash&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ squeue&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the jobid and the nodelist can be shown.&lt;br /&gt;
&lt;br /&gt;
If you want to run MPI-programs, you can do it by simply typing mpirun &amp;lt;program_name&amp;gt;. Then your program will be run on 480 cores. A very simple example for starting a parallel job can be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mpirun &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also start the debugger ddt by the commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module add devel/ddt&lt;br /&gt;
$ ddt &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above commands will execute the parallel program &amp;lt;my_mpi_program&amp;gt; on all available cores. You can also start parallel programs on a subset of cores; an example for this can be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mpirun -n 50 &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are using Intel MPI you must start &amp;lt;my_mpi_program&amp;gt; by the command mpiexec.hydra (instead of mpirun).&lt;br /&gt;
&lt;br /&gt;
== Interactive Computing with Jupyter ==&lt;br /&gt;
&lt;br /&gt;
== Monitor and manage jobs ==&lt;br /&gt;
= Slurm Options =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Slurm Commands (excerpt) ==&lt;br /&gt;
Important Slurm commands for non-administrators working on bwUniCluster 3.0.&lt;br /&gt;
{| width=850px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Slurm commands !! Brief explanation&lt;br /&gt;
|-&lt;br /&gt;
| [[#Job submission : sbatch|sbatch]] || Submits a job and puts it into the queue [[https://slurm.schedmd.com/sbatch.html sbatch]] &lt;br /&gt;
|-&lt;br /&gt;
| [[#Interactive job : salloc|salloc]] || Requests resources for an interactive Job [[https://slurm.schedmd.com/salloc.html salloc]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Detailed job information : scontrol show job|scontrol show job]] || Displays detailed job state information [[https://slurm.schedmd.com/scontrol.html scontrol]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#List of your submitted jo/bs : squeue|squeue]] || Displays information about active, eligible, blocked, and/or recently completed jobs [[https://slurm.schedmd.com/squeue.html squeue]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Start time of job or resources : squeue|squeue --start]] || Returns start time of submitted job [[https://slurm.schedmd.com/squeue.html squeue]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Shows free resources : sinfo_t_idle|sinfo_t_idle]] || Shows what resources are available for immediate use [[https://slurm.schedmd.com/sinfo.html sinfo]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Canceling own jobs : scancel|scancel]] || Cancels a job [[https://slurm.schedmd.com/scancel.html scancel]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* [https://slurm.schedmd.com/tutorials.html  Slurm Tutorials]&lt;br /&gt;
* [https://slurm.schedmd.com/pdfs/summary.pdf  Slurm command/option summary (2 pages)]&lt;br /&gt;
* [https://slurm.schedmd.com/man_index.html  Slurm Commands]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Job submission : sbatch ==&lt;br /&gt;
Batch jobs are submitted by using the command &#039;&#039;&#039;sbatch&#039;&#039;&#039;. The main purpose of the &#039;&#039;&#039;sbatch&#039;&#039;&#039; command is to specify the resources that are needed to run the job. &#039;&#039;&#039;sbatch&#039;&#039;&#039; will then queue the batch job. However, starting of batch job depends on the availability of the requested resources and the fair sharing value.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=== Command parameters sbatch ===&lt;br /&gt;
The syntax and use of &#039;&#039;&#039;sbatch&#039;&#039;&#039; can be displayed via:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ man sbatch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;sbatch&#039;&#039;&#039; options can be used from the command line or in your job script. Different defaults for some of these options are set based on the queue and can be found [https://wiki.bwhpc.de/e/BwUniCluster3.0/Batch_Queues#sbatch_-p_queue here]&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | sbatch Options&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width:8%&amp;quot;| Command line&lt;br /&gt;
! style=&amp;quot;width:9%&amp;quot;| Script&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Purpose&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -t, --time=&#039;&#039;time&#039;&#039;&lt;br /&gt;
| #SBATCH --time=&#039;&#039;time&#039;&#039;&lt;br /&gt;
| Wall clock time limit.&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -N, --nodes=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --nodes=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of nodes to be used.&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -n, --ntasks=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --ntasks=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of tasks to be launched.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --ntasks-per-node=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --ntasks-per-node=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Maximum count of tasks per node.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -c, --cpus-per-task=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --cpus-per-task=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of CPUs required per (MPI-)task.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mem=&#039;&#039;value_in_MB&#039;&#039;&lt;br /&gt;
| #SBATCH --mem=&#039;&#039;value_in_MB&#039;&#039; &lt;br /&gt;
| Memory in MegaByte per node. (You should omit the setting of this option.)&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mem-per-cpu=&#039;&#039;value_in_MB&#039;&#039;&lt;br /&gt;
| #SBATCH --mem-per-cpu=&#039;&#039;value_in_MB&#039;&#039; &lt;br /&gt;
| Minimum Memory required per allocated CPU. (You should omit the setting of this option.)&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mail-type=&#039;&#039;type&#039;&#039;&lt;br /&gt;
| #SBATCH --mail-type=&#039;&#039;type&#039;&#039;&lt;br /&gt;
| Notify user by email when certain event types occur.&amp;lt;br&amp;gt;Valid type values are NONE, BEGIN, END, FAIL, REQUEUE, ALL.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mail-user=&#039;&#039;mail-address&#039;&#039;&lt;br /&gt;
| #SBATCH --mail-user=&#039;&#039;mail-address&#039;&#039;&lt;br /&gt;
|  The specified mail-address receives email notification of state changes as defined by --mail-type.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --output=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --output=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| File in which job output is stored. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --error=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --error=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| File in which job error messages are stored. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -J, --job-name=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --job-name=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| Job name.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --export=[ALL,] &#039;&#039;env-variables&#039;&#039;&lt;br /&gt;
| #SBATCH --export=[ALL,] &#039;&#039;env-variables&#039;&#039;&lt;br /&gt;
| Identifies which environment variables from the submission environment are propagated to the launched application. Default is ALL.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -A, --account=&#039;&#039;group-name&#039;&#039;&lt;br /&gt;
| #SBATCH --account=&#039;&#039;group-name&#039;&#039;&lt;br /&gt;
| Change resources used by this job to specified group. You may need this option if your account is assigned to more than one group. By command &amp;quot;scontrol show job&amp;quot; the project group the job is accounted on can be seen behind &amp;quot;Account=&amp;quot;. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -p, --partition=&#039;&#039;queue-name&#039;&#039;&lt;br /&gt;
| #SBATCH --partition=&#039;&#039;queue-name&#039;&#039;&lt;br /&gt;
| Request a specific queue for the resource allocation.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --reservation=&#039;&#039;reservation-name&#039;&#039;&lt;br /&gt;
| #SBATCH --reservation=&#039;&#039;reservation-name&#039;&#039;&lt;br /&gt;
| Use a specific reservation for the resource allocation.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -C, --constraint=&#039;&#039;LSDF&#039;&#039;&lt;br /&gt;
| #SBATCH --constraint=LSDF&lt;br /&gt;
| Job constraint LSDF filesystems.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -C, --constraint=&#039;&#039;BEEOND (BEEOND_4MDS, BEEOND_MAXMDS)&#039;&#039;&lt;br /&gt;
| #SBATCH --constraint=BEEOND (BEEOND_4MDS, BEEOND_MAXMDS)&lt;br /&gt;
| Job constraint BeeOND filesystem.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Best Practices =&lt;br /&gt;
&lt;br /&gt;
== Step-by-Step example==&lt;br /&gt;
&lt;br /&gt;
== Dos and Don&#039;ts ==&lt;/div&gt;</summary>
		<author><name>P Schuhmacher</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster3.0/Running_Jobs&amp;diff=14631</id>
		<title>BwUniCluster3.0/Running Jobs</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster3.0/Running_Jobs&amp;diff=14631"/>
		<updated>2025-04-04T14:44:27Z</updated>

		<summary type="html">&lt;p&gt;P Schuhmacher: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
= Purpose and function of a queuing system =&lt;br /&gt;
&lt;br /&gt;
General procedure: Hint to [[Running_Calculations | Running Calculations]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Job submission process ==&lt;br /&gt;
&lt;br /&gt;
bwUniCluster 3.0 has installed the workload managing software Slurm. Therefore any job submission by the user is to be executed by commands of the Slurm software. Slurm queues and runs user jobs based on fair sharing policies.&lt;br /&gt;
&lt;br /&gt;
== Slurm ==&lt;br /&gt;
&lt;br /&gt;
HPC Workload Manager on bwUniCluster 3.0 is Slurm.&lt;br /&gt;
Slurm is a cluster management and job scheduling system. Slurm has three key functions. &lt;br /&gt;
* First, it allocates access to resources (compute cores on nodes) to users for some duration of time so they can perform work. &lt;br /&gt;
* it provides a framework for starting, executing, and monitoring work (normally a parallel job) on the set of allocated nodes. &lt;br /&gt;
* it arbitrates contention for resources by managing a queue of pending work.&lt;br /&gt;
&lt;br /&gt;
Any kind of calculation on the compute nodes of bwUniCluster 3.0 requires the user to define calculations as a sequence of commands together with required run time, number of CPU cores and main memory and submit all, i.e., the &#039;&#039;&#039;batch job&#039;&#039;&#039;, to a resource and workload managing software. &lt;br /&gt;
== Terms and definitions ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Partitions &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Slurm manages job queues for different &#039;&#039;&#039;partitions&#039;&#039;&#039;. Partitions are used to group similar node types (e.g. nodes with and without accelerators) and to enforce different access policies and resource limits.&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 3.0 there are different partitions:&lt;br /&gt;
&lt;br /&gt;
* CPU-only nodes&lt;br /&gt;
** 2-socket nodes, consisting of 2 Intel Ice Lake processors with 32 cores each or 2 AMD processors with 48 cores each&lt;br /&gt;
** 2-socket nodes with very high RAM capacity, consisting of 2 AMD processors with 48 cores each&lt;br /&gt;
* GPU-accelerated nodes&lt;br /&gt;
** 2-socket nodes with 4x NVIDIA A100 or 4x NVIDIA H100 GPUs&lt;br /&gt;
** 4-socket node with 4x AMD Instinct accelerator&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Queues &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Job &#039;&#039;&#039;queues&#039;&#039;&#039; are used to manage jobs that request access to shared but limited computing resources of a certain kind (partition).&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 3.0 there are different main types of queues:&lt;br /&gt;
* Regular queues&lt;br /&gt;
** cpu: Jobs that request CPU-only nodes.&lt;br /&gt;
** gpu: Jobs that request GPU-accelerated nodes.&lt;br /&gt;
* Development queues (dev)&lt;br /&gt;
** Short, usually interactive jobs that are used for developing, compiling and testing code and workflows. The intention behind development queues is to provide users with immediate access to computer resources without having to wait. This is the place to realize instantaneous heavy compute without affecting other users, as would be the case on the login nodes.&lt;br /&gt;
&lt;br /&gt;
Requested compute resources such as (wall-)time, number of nodes and amount of memory are restricted and must fit into the boundaries imposed by the queues. The request for compute resources on the bwUniCluster 3.0 &amp;lt;font color=red&amp;gt;requires at least the specification of the &#039;&#039;&#039;queue&#039;&#039;&#039; and the &#039;&#039;&#039;time&#039;&#039;&#039;&amp;lt;/font&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Jobs &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Jobs can be run non-interactively as &#039;&#039;&#039;batch jobs&#039;&#039;&#039; or as &#039;&#039;&#039;interactive jobs&#039;&#039;&#039;.&lt;br /&gt;
Submitting a batch job means, that all steps of a compute project are defined in a Bash script. This Bash script is queued and executed as soon as the compute resources are available and allocated. Jobs are enqueued with the &#039;&#039;sbatch&#039;&#039; command.&lt;br /&gt;
&lt;br /&gt;
For interactive jobs, the resources are requested with the &#039;&#039;salloc&#039;&#039; command. As soon as the computing resources are available and allocated, a command line prompt is returned on a computing node and the user can freely dispose of the resources now available to him.&lt;br /&gt;
{|style=&amp;quot;background:#deffee; width:100%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;padding:5px; background:#cef2e0; text-align:left&amp;quot;|&lt;br /&gt;
[[Image:Attention.svg|center|25px]]&lt;br /&gt;
|style=&amp;quot;padding:5px; background:#cef2e0; text-align:left&amp;quot;|&lt;br /&gt;
&#039;&#039;&#039;Please remember:&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Heavy computations are not allowed on the login nodes&#039;&#039;&#039;.&amp;lt;br&amp;gt;Use a developement or a regular job queue instead! Please refer to [[BwUniCluster3.0/Login#Allowed_Activities_on_Login_Nodes|Allowed Activities on Login Nodes]].&lt;br /&gt;
* &#039;&#039;&#039;Development queues&#039;&#039;&#039; are meant for &#039;&#039;&#039;development tasks&#039;&#039;&#039;.&amp;lt;br&amp;gt;Do not misuse this queue for regular, short-running jobs or chain jobs! Only one running job at a time is enabled. Maximum queue length is reduced to 3.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Queues on bwUniCluster 3.0 = &lt;br /&gt;
== Policy ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Regular Queues ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
! style=&amp;quot;width:5%&amp;quot;| Queue&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Node-Type&lt;br /&gt;
! style=&amp;quot;width:23%&amp;quot;| Default Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Minimal Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Maximum Resources&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;cpu_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Ice Lake&lt;br /&gt;
| mem-per-cpu=1950mb&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=30, mem=249600mb, ntasks-per-node=64, (threads-per-core=2) &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;cpu&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Standard&lt;br /&gt;
| mem-per-cpu=1125mb&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=20, mem=380000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;highmem&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;High Memory&lt;br /&gt;
| mem-per-cpu=1125mb&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=4, mem=2300000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;gpu_h100&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;NVIDIA GPU x4&lt;br /&gt;
| mem-per-cpu=1125mb&amp;lt;br/&amp;gt;cpus-per-gpu=24&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=12, mem=760000mb, ntasks-per-node=96, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;gpu_mi300&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU node&amp;lt;br/&amp;gt;AMD GPU x4&lt;br /&gt;
| mem-per-cpu=1125mb&amp;lt;br/&amp;gt;cpus-per-gpu=24&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=1, mem=510000mb, ntasks-per-node=40, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;gpu_a100_il&amp;lt;/code&amp;gt;/&amp;lt;code&amp;gt;gpu_h100_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;Ice Lake&amp;lt;br/&amp;gt;NVIDIA GPU x4&lt;br /&gt;
| mem-per-gpu=127500mb&amp;lt;br/&amp;gt;cpus-per-gpu=16&lt;br /&gt;
| &lt;br /&gt;
| time=72:00:00, nodes=9, mem=510000mb, ntasks-per-node=64, (threads-per-core=2) &lt;br /&gt;
|}&lt;br /&gt;
Table 1: Regular Queues&lt;br /&gt;
&lt;br /&gt;
== Development Queues ==&lt;br /&gt;
Only for development, i.e. debugging or performance optimization ...&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
! style=&amp;quot;width:5%&amp;quot;| Queue&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Node Type&lt;br /&gt;
! style=&amp;quot;width:23%&amp;quot;| Default Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Minimal Resources&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Maximum Resources&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_cpu_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Ice Lake&lt;br /&gt;
| mem-per-cpu=1950mb&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=8, mem=249600mb, ntasks-per-node=64, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_cpu&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;Standard&lt;br /&gt;
| mem-per-cpu=1125mb&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=180000mb, ntasks-per-node=40, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_highmem&amp;lt;/code&amp;gt;&lt;br /&gt;
| CPU nodes&amp;lt;br/&amp;gt;High Memory&lt;br /&gt;
| mem-per-cpu=1125mb&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=180000mb, ntasks-per-node=40, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_gpu_h100&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;NVIDIA GPU x4&lt;br /&gt;
| mem-per-cpu=1125mb&amp;lt;br/&amp;gt;cpus-per-gpu=24&lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=180000mb, ntasks-per-node=40, (threads-per-core=2)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dev_gpu_a100_il&amp;lt;/code&amp;gt;&lt;br /&gt;
| GPU nodes&amp;lt;br/&amp;gt;NVIDIA GPU x4&amp;lt;br/&amp;gt;&lt;br /&gt;
| mem-per-gpu=127500mb&amp;lt;br/&amp;gt;cpus-per-gpu=16 &lt;br /&gt;
| &lt;br /&gt;
| time=30, nodes=1, mem=510000mb, ntasks-per-node=64, (threads-per-core=2) &lt;br /&gt;
|}&lt;br /&gt;
Table 2: Development Queues&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Default resources of a queue class defines time, #tasks and memory if not explicitly given with sbatch command. Resource list acronyms &#039;&#039;--time&#039;&#039;, &#039;&#039;--ntasks&#039;&#039;, &#039;&#039;--nodes&#039;&#039;, &#039;&#039;--mem&#039;&#039; and &#039;&#039;--mem-per-cpu&#039;&#039; are described [[BwUniCluster_3.0_Slurm_common_Features|here]].&lt;br /&gt;
&lt;br /&gt;
== Check available resources ==&lt;br /&gt;
&lt;br /&gt;
= Running Jobs =&lt;br /&gt;
== Batch Jobs: sbatch ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To run your batch job on one of the cpu nodes, please use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sbatch --partition=dev_cpu&lt;br /&gt;
     or &lt;br /&gt;
$ sbatch -p dev_cpu&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Interactive Jobs: salloc ==&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 3.0 you are only allowed to run short jobs (&amp;lt;&amp;lt; 1 hour) with little memory requirements (&amp;lt;&amp;lt; 8 GByte) on the logins nodes. If you want to run longer jobs and/or jobs with a request of more than 8 GByte of memory, you must allocate resources for so-called interactive jobs by usage of the command salloc on a login node. Considering a serial application running on a compute node that requires 5000 MByte of memory and limiting the interactive run to 2 hours the following command has to be executed:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ salloc -p cpu -n 1 -t 120 --mem=5000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then you will get one core on a compute node within the partition &amp;quot;cpu&amp;quot;. After execution of this command &#039;&#039;&#039;DO NOT CLOSE&#039;&#039;&#039; your current terminal session but wait until the queueing system Slurm has granted you the requested resources on the compute system. You will be logged in automatically on the granted core! To run a serial program on the granted core you only have to type the name of the executable.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./&amp;lt;my_serial_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please be aware that your serial job must run less than 2 hours in this example, else the job will be killed during runtime by the system. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can also start now a graphical X11-terminal connecting you to the dedicated resource that is available for 2 hours. You can start it by the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ xterm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that, once the walltime limit has been reached the resources - i.e. the compute node - will automatically be revoked.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
An interactive parallel application running on one compute node or on many compute nodes (e.g. here 5 nodes) with 96 cores each requires usually an amount of memory in GByte (e.g. 50 GByte) and a maximum time (e.g. 1 hour). E.g. 5 nodes can be allocated by the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ salloc -p cpu -N 5 --ntasks-per-node=96 -t 01:00:00  --mem=50gb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you can run parallel jobs on 480 cores requiring 50 GByte of memory per node. Please be aware that you will be logged in on core 0 of the first node.&lt;br /&gt;
If you want to have access to another node you have to open a new terminal, connect it also to bwUniCluster 3.0 and type the following commands to&lt;br /&gt;
connect to the running interactive job and then to a specific node:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ srun --jobid=XXXXXXXX --pty /bin/bash&lt;br /&gt;
$ srun --nodelist=uc3nXXX --pty /bin/bash&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ squeue&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the jobid and the nodelist can be shown.&lt;br /&gt;
&lt;br /&gt;
If you want to run MPI-programs, you can do it by simply typing mpirun &amp;lt;program_name&amp;gt;. Then your program will be run on 480 cores. A very simple example for starting a parallel job can be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mpirun &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also start the debugger ddt by the commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module add devel/ddt&lt;br /&gt;
$ ddt &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above commands will execute the parallel program &amp;lt;my_mpi_program&amp;gt; on all available cores. You can also start parallel programs on a subset of cores; an example for this can be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mpirun -n 50 &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are using Intel MPI you must start &amp;lt;my_mpi_program&amp;gt; by the command mpiexec.hydra (instead of mpirun).&lt;br /&gt;
&lt;br /&gt;
== Interactive Computing with Jupyter ==&lt;br /&gt;
&lt;br /&gt;
== Monitor and manage jobs ==&lt;br /&gt;
= Slurm Options =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Slurm Commands (excerpt) ==&lt;br /&gt;
Important Slurm commands for non-administrators working on bwUniCluster 3.0.&lt;br /&gt;
{| width=850px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Slurm commands !! Brief explanation&lt;br /&gt;
|-&lt;br /&gt;
| [[#Job submission : sbatch|sbatch]] || Submits a job and puts it into the queue [[https://slurm.schedmd.com/sbatch.html sbatch]] &lt;br /&gt;
|-&lt;br /&gt;
| [[#Interactive job : salloc|salloc]] || Requests resources for an interactive Job [[https://slurm.schedmd.com/salloc.html salloc]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Detailed job information : scontrol show job|scontrol show job]] || Displays detailed job state information [[https://slurm.schedmd.com/scontrol.html scontrol]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#List of your submitted jo/bs : squeue|squeue]] || Displays information about active, eligible, blocked, and/or recently completed jobs [[https://slurm.schedmd.com/squeue.html squeue]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Start time of job or resources : squeue|squeue --start]] || Returns start time of submitted job [[https://slurm.schedmd.com/squeue.html squeue]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Shows free resources : sinfo_t_idle|sinfo_t_idle]] || Shows what resources are available for immediate use [[https://slurm.schedmd.com/sinfo.html sinfo]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Canceling own jobs : scancel|scancel]] || Cancels a job [[https://slurm.schedmd.com/scancel.html scancel]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* [https://slurm.schedmd.com/tutorials.html  Slurm Tutorials]&lt;br /&gt;
* [https://slurm.schedmd.com/pdfs/summary.pdf  Slurm command/option summary (2 pages)]&lt;br /&gt;
* [https://slurm.schedmd.com/man_index.html  Slurm Commands]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Job submission : sbatch ==&lt;br /&gt;
Batch jobs are submitted by using the command &#039;&#039;&#039;sbatch&#039;&#039;&#039;. The main purpose of the &#039;&#039;&#039;sbatch&#039;&#039;&#039; command is to specify the resources that are needed to run the job. &#039;&#039;&#039;sbatch&#039;&#039;&#039; will then queue the batch job. However, starting of batch job depends on the availability of the requested resources and the fair sharing value.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=== Command parameters sbatch ===&lt;br /&gt;
The syntax and use of &#039;&#039;&#039;sbatch&#039;&#039;&#039; can be displayed via:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ man sbatch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;sbatch&#039;&#039;&#039; options can be used from the command line or in your job script. Different defaults for some of these options are set based on the queue and can be found [https://wiki.bwhpc.de/e/BwUniCluster3.0/Batch_Queues#sbatch_-p_queue here]&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | sbatch Options&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width:8%&amp;quot;| Command line&lt;br /&gt;
! style=&amp;quot;width:9%&amp;quot;| Script&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Purpose&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -t, --time=&#039;&#039;time&#039;&#039;&lt;br /&gt;
| #SBATCH --time=&#039;&#039;time&#039;&#039;&lt;br /&gt;
| Wall clock time limit.&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -N, --nodes=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --nodes=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of nodes to be used.&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -n, --ntasks=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --ntasks=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of tasks to be launched.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --ntasks-per-node=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --ntasks-per-node=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Maximum count of tasks per node.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -c, --cpus-per-task=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --cpus-per-task=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of CPUs required per (MPI-)task.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mem=&#039;&#039;value_in_MB&#039;&#039;&lt;br /&gt;
| #SBATCH --mem=&#039;&#039;value_in_MB&#039;&#039; &lt;br /&gt;
| Memory in MegaByte per node. (You should omit the setting of this option.)&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mem-per-cpu=&#039;&#039;value_in_MB&#039;&#039;&lt;br /&gt;
| #SBATCH --mem-per-cpu=&#039;&#039;value_in_MB&#039;&#039; &lt;br /&gt;
| Minimum Memory required per allocated CPU. (You should omit the setting of this option.)&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mail-type=&#039;&#039;type&#039;&#039;&lt;br /&gt;
| #SBATCH --mail-type=&#039;&#039;type&#039;&#039;&lt;br /&gt;
| Notify user by email when certain event types occur.&amp;lt;br&amp;gt;Valid type values are NONE, BEGIN, END, FAIL, REQUEUE, ALL.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mail-user=&#039;&#039;mail-address&#039;&#039;&lt;br /&gt;
| #SBATCH --mail-user=&#039;&#039;mail-address&#039;&#039;&lt;br /&gt;
|  The specified mail-address receives email notification of state changes as defined by --mail-type.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --output=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --output=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| File in which job output is stored. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --error=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --error=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| File in which job error messages are stored. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -J, --job-name=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --job-name=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| Job name.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --export=[ALL,] &#039;&#039;env-variables&#039;&#039;&lt;br /&gt;
| #SBATCH --export=[ALL,] &#039;&#039;env-variables&#039;&#039;&lt;br /&gt;
| Identifies which environment variables from the submission environment are propagated to the launched application. Default is ALL.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -A, --account=&#039;&#039;group-name&#039;&#039;&lt;br /&gt;
| #SBATCH --account=&#039;&#039;group-name&#039;&#039;&lt;br /&gt;
| Change resources used by this job to specified group. You may need this option if your account is assigned to more than one group. By command &amp;quot;scontrol show job&amp;quot; the project group the job is accounted on can be seen behind &amp;quot;Account=&amp;quot;. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -p, --partition=&#039;&#039;queue-name&#039;&#039;&lt;br /&gt;
| #SBATCH --partition=&#039;&#039;queue-name&#039;&#039;&lt;br /&gt;
| Request a specific queue for the resource allocation.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --reservation=&#039;&#039;reservation-name&#039;&#039;&lt;br /&gt;
| #SBATCH --reservation=&#039;&#039;reservation-name&#039;&#039;&lt;br /&gt;
| Use a specific reservation for the resource allocation.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -C, --constraint=&#039;&#039;LSDF&#039;&#039;&lt;br /&gt;
| #SBATCH --constraint=LSDF&lt;br /&gt;
| Job constraint LSDF filesystems.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -C, --constraint=&#039;&#039;BEEOND (BEEOND_4MDS, BEEOND_MAXMDS)&#039;&#039;&lt;br /&gt;
| #SBATCH --constraint=BEEOND (BEEOND_4MDS, BEEOND_MAXMDS)&lt;br /&gt;
| Job constraint BeeOND filesystem.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Best Practices =&lt;br /&gt;
&lt;br /&gt;
== Step-by-Step example==&lt;br /&gt;
&lt;br /&gt;
== Dos and Don&#039;ts ==&lt;/div&gt;</summary>
		<author><name>P Schuhmacher</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster3.0/Running_Jobs/Slurm&amp;diff=14629</id>
		<title>BwUniCluster3.0/Running Jobs/Slurm</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster3.0/Running_Jobs/Slurm&amp;diff=14629"/>
		<updated>2025-04-04T08:12:22Z</updated>

		<summary type="html">&lt;p&gt;P Schuhmacher: /* Examples */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
{|style=&amp;quot;background:#FEF4AB; width:100%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;padding:5px; background:#FEF4AB; text-align:left&amp;quot;|&lt;br /&gt;
This page is work in progress.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=  Slurm HPC Workload Manager = &lt;br /&gt;
== Specification == &lt;br /&gt;
Slurm is an open source, fault-tolerant, and highly scalable cluster management and job scheduling system for large and small Linux clusters. Slurm requires no kernel modifications for its operation and is relatively self-contained. As a cluster workload manager, Slurm has three key functions. First, it allocates exclusive and/or non-exclusive access to resources (compute nodes) to users for some duration of time so they can perform work. Second, it provides a framework for starting, executing, and monitoring work (normally a parallel job) on the set of allocated nodes. Finally, it arbitrates contention for resources by managing a queue of pending work.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Any kind of calculation on the compute nodes of bwUniCluster 3.0 requires the user to define calculations as a sequence of commands or single command together with required run time, number of CPU cores and main memory and submit all, i.e., the &#039;&#039;&#039;batch job&#039;&#039;&#039;, to a resource and workload managing software. bwUniCluster 3.0 has installed the workload managing software Slurm. Therefore any job submission by the user is to be executed by commands of the Slurm software. Slurm queues and runs user jobs based on fair sharing policies.  &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Slurm Commands (excerpt) ==&lt;br /&gt;
Important Slurm commands for non-administrators working on bwUniCluster 3.0.&lt;br /&gt;
{| width=850px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Slurm commands !! Brief explanation&lt;br /&gt;
|-&lt;br /&gt;
| [[#Job submission : sbatch|sbatch]] || Submits a job and puts it into the queue [[https://slurm.schedmd.com/sbatch.html sbatch]] &lt;br /&gt;
|-&lt;br /&gt;
| [[#Interactive job : salloc|salloc]] || Requests resources for an interactive Job [[https://slurm.schedmd.com/salloc.html salloc]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Detailed job information : scontrol show job|scontrol show job]] || Displays detailed job state information [[https://slurm.schedmd.com/scontrol.html scontrol]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#List of your submitted jo/bs : squeue|squeue]] || Displays information about active, eligible, blocked, and/or recently completed jobs [[https://slurm.schedmd.com/squeue.html squeue]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Start time of job or resources : squeue|squeue --start]] || Returns start time of submitted job [[https://slurm.schedmd.com/squeue.html squeue]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Shows free resources : sinfo_t_idle|sinfo_t_idle]] || Shows what resources are available for immediate use [[https://slurm.schedmd.com/sinfo.html sinfo]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Canceling own jobs : scancel|scancel]] || Cancels a job [[https://slurm.schedmd.com/scancel.html scancel]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* [https://slurm.schedmd.com/tutorials.html  Slurm Tutorials]&lt;br /&gt;
* [https://slurm.schedmd.com/pdfs/summary.pdf  Slurm command/option summary (2 pages)]&lt;br /&gt;
* [https://slurm.schedmd.com/man_index.html  Slurm Commands]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Job submission : sbatch ==&lt;br /&gt;
Batch jobs are submitted by using the command &#039;&#039;&#039;sbatch&#039;&#039;&#039;. The main purpose of the &#039;&#039;&#039;sbatch&#039;&#039;&#039; command is to specify the resources that are needed to run the job. &#039;&#039;&#039;sbatch&#039;&#039;&#039; will then queue the batch job. However, starting of batch job depends on the availability of the requested resources and the fair sharing value.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=== Command parameters sbatch ===&lt;br /&gt;
The syntax and use of &#039;&#039;&#039;sbatch&#039;&#039;&#039; can be displayed via:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ man sbatch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;sbatch&#039;&#039;&#039; options can be used from the command line or in your job script. Different defaults for some of these options are set based on the queue and can be found [https://wiki.bwhpc.de/e/BwUniCluster3.0/Batch_Queues#sbatch_-p_queue here]&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | sbatch Options&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width:8%&amp;quot;| Command line&lt;br /&gt;
! style=&amp;quot;width:9%&amp;quot;| Script&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Purpose&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -t, --time=&#039;&#039;time&#039;&#039;&lt;br /&gt;
| #SBATCH --time=&#039;&#039;time&#039;&#039;&lt;br /&gt;
| Wall clock time limit.&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -N, --nodes=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --nodes=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of nodes to be used.&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -n, --ntasks=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --ntasks=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of tasks to be launched.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --ntasks-per-node=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --ntasks-per-node=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Maximum count of tasks per node.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -c, --cpus-per-task=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --cpus-per-task=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of CPUs required per (MPI-)task.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mem=&#039;&#039;value_in_MB&#039;&#039;&lt;br /&gt;
| #SBATCH --mem=&#039;&#039;value_in_MB&#039;&#039; &lt;br /&gt;
| Memory in MegaByte per node. (You should omit the setting of this option.)&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mem-per-cpu=&#039;&#039;value_in_MB&#039;&#039;&lt;br /&gt;
| #SBATCH --mem-per-cpu=&#039;&#039;value_in_MB&#039;&#039; &lt;br /&gt;
| Minimum Memory required per allocated CPU. (You should omit the setting of this option.)&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mail-type=&#039;&#039;type&#039;&#039;&lt;br /&gt;
| #SBATCH --mail-type=&#039;&#039;type&#039;&#039;&lt;br /&gt;
| Notify user by email when certain event types occur.&amp;lt;br&amp;gt;Valid type values are NONE, BEGIN, END, FAIL, REQUEUE, ALL.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mail-user=&#039;&#039;mail-address&#039;&#039;&lt;br /&gt;
| #SBATCH --mail-user=&#039;&#039;mail-address&#039;&#039;&lt;br /&gt;
|  The specified mail-address receives email notification of state changes as defined by --mail-type.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --output=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --output=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| File in which job output is stored. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --error=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --error=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| File in which job error messages are stored. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -J, --job-name=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --job-name=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| Job name.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --export=[ALL,] &#039;&#039;env-variables&#039;&#039;&lt;br /&gt;
| #SBATCH --export=[ALL,] &#039;&#039;env-variables&#039;&#039;&lt;br /&gt;
| Identifies which environment variables from the submission environment are propagated to the launched application. Default is ALL.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -A, --account=&#039;&#039;group-name&#039;&#039;&lt;br /&gt;
| #SBATCH --account=&#039;&#039;group-name&#039;&#039;&lt;br /&gt;
| Change resources used by this job to specified group. You may need this option if your account is assigned to more than one group. By command &amp;quot;scontrol show job&amp;quot; the project group the job is accounted on can be seen behind &amp;quot;Account=&amp;quot;. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -p, --partition=&#039;&#039;queue-name&#039;&#039;&lt;br /&gt;
| #SBATCH --partition=&#039;&#039;queue-name&#039;&#039;&lt;br /&gt;
| Request a specific queue for the resource allocation.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --reservation=&#039;&#039;reservation-name&#039;&#039;&lt;br /&gt;
| #SBATCH --reservation=&#039;&#039;reservation-name&#039;&#039;&lt;br /&gt;
| Use a specific reservation for the resource allocation.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -C, --constraint=&#039;&#039;LSDF&#039;&#039;&lt;br /&gt;
| #SBATCH --constraint=LSDF&lt;br /&gt;
| Job constraint LSDF filesystems.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -C, --constraint=&#039;&#039;BEEOND (BEEOND_4MDS, BEEOND_MAXMDS)&#039;&#039;&lt;br /&gt;
| #SBATCH --constraint=BEEOND (BEEOND_4MDS, BEEOND_MAXMDS)&lt;br /&gt;
| Job constraint BeeOND filesystem.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Interactive job : salloc ==&lt;br /&gt;
&lt;br /&gt;
If you want to run an interactive job, you can do so via the command salloc on a login node.&amp;lt;br&amp;gt;Considering a serial application running on a compute node that requires 5000 MByte of memory and limiting the interactive run to 2 hours the following command has to be executed:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ salloc --partition=cpu --ntasks=1 --time=120 --mem=5000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then you will get one core on a compute node within the partition &amp;quot;cpu&amp;quot;. After execution of this command &#039;&#039;&#039;DO NOT CLOSE&#039;&#039;&#039; your current terminal session but wait until the queueing system Slurm has granted you the requested resources on the compute node. You will be logged in automatically on the granted core! To run a serial program on the granted core you only have to type the name of the executable.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./&amp;lt;my_serial_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please be aware that your serial job must run less than 2 hours in this example, else the job will be killed during runtime by the system. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can also start now a graphical X11-terminal connecting you to the dedicated resource that is available for 2 hours. You can start it by the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ xterm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that, once the walltime limit has been reached the resources - i.e. the compute node - will automatically be revoked.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
An interactive parallel application running on one compute node or on many compute nodes (e.g. here 5 nodes) with 40 cores each requires usually an amount of memory in GByte (e.g. 50 GByte) and a maximum time (e.g. 1 hour). E.g. 5 nodes can be allocated by the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ salloc --partition=cpu --nodes=5 --ntasks-per-node=40 --time=01:00:00  --mem=50gb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you can run parallel jobs on 200 cores requiring 50 GByte of memory per node. Please be aware that you will be logged in on core 0 of the first node.&lt;br /&gt;
If you want to have access to another node you have to open a new terminal, connect it also to BwUniCluster 2.0 and type the following commands to&lt;br /&gt;
connect to the running interactive job and then to a specific node:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ srun --jobid=XXXXXXXX --pty /bin/bash&lt;br /&gt;
$ srun --nodelist=uc3nXXX --pty /bin/bash&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ squeue&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the jobid and the nodelist can be shown.&lt;br /&gt;
&lt;br /&gt;
If you want to run MPI-programs, you can do it by simply typing mpirun &amp;lt;program_name&amp;gt;. Then your program will be run on 200 cores. A very simple example for starting a parallel job can be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mpirun &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also start the debugger ddt by the commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module add devel/ddt&lt;br /&gt;
$ ddt &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above commands will execute the parallel program &amp;lt;my_mpi_program&amp;gt; on all available cores. You can also start parallel programs on a subset of cores; an example for this can be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mpirun -n 50 &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are using Intel MPI you must start &amp;lt;my_mpi_program&amp;gt; by the command mpiexec.hydra (instead of mpirun).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;top&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
=  Slurm HPC Workload Manager = &lt;br /&gt;
== Specification == &lt;br /&gt;
Slurm is an open source, fault-tolerant, and highly scalable cluster management and job scheduling system for large and small Linux clusters. Slurm requires no kernel modifications for its operation and is relatively self-contained. As a cluster workload manager, Slurm has three key functions. First, it allocates exclusive and/or non-exclusive access to resources (compute nodes) to users for some duration of time so they can perform work. Second, it provides a framework for starting, executing, and monitoring work (normally a parallel job) on the set of allocated nodes. Finally, it arbitrates contention for resources by managing a queue of pending work.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Any kind of calculation on the compute nodes of [[bwUniCluster3.0|bwUniCluster 3.0]] requires the user to define calculations as a sequence of commands or single command together with required run time, number of CPU cores and main memory and submit all, i.e., the &#039;&#039;&#039;batch job&#039;&#039;&#039;, to a resource and workload managing software. bwUniCluster 3.0 has installed the workload managing software Slurm. Therefore any job submission by the user is to be executed by commands of the Slurm software. Slurm queues and runs user jobs based on fair sharing policies.  &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Slurm Commands (excerpt) ==&lt;br /&gt;
Some of the most used Slurm commands for non-administrators working on bwUniCluster 2.0.&lt;br /&gt;
{| width=750px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Slurm commands !! Brief explanation&lt;br /&gt;
|-&lt;br /&gt;
| [[#Job Submission : sbatch|sbatch]] || Submits a job and queues it in an input queue [[https://slurm.schedmd.com/sbatch.html sbatch]] &lt;br /&gt;
|-&lt;br /&gt;
| [[#Detailed job information : scontrol show job|scontrol show job]] || Displays detailed job state information [[https://slurm.schedmd.com/scontrol.html scontrol]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#List of your submitted jo/bs : squeue|squeue]] || Displays information about active, eligible, blocked, and/or recently completed jobs [[https://slurm.schedmd.com/squeue.html squeue]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Start time of job or resources : squeue|squeue --start]] || Returns start time of submitted job or requested resources [[https://slurm.schedmd.com/squeue.html squeue]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Shows free resources : sinfo_t_idle|sinfo_t_idle]] || Shows what resources are available for immediate use [[https://slurm.schedmd.com/sinfo.html sinfo]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Canceling own jobs : scancel|scancel]] || Cancels a job (obsoleted!) [[https://slurm.schedmd.com/scancel.html scancel]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* [https://slurm.schedmd.com/tutorials.html  Slurm Tutorials]&lt;br /&gt;
* [https://slurm.schedmd.com/pdfs/summary.pdf  Slurm command/option summary (2 pages)]&lt;br /&gt;
* [https://slurm.schedmd.com/man_index.html  Slurm Commands]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Job Submission : sbatch ==&lt;br /&gt;
Batch jobs are submitted by using the command &#039;&#039;&#039;sbatch&#039;&#039;&#039;. The main purpose of the &#039;&#039;&#039;sbatch&#039;&#039;&#039; command is to specify the resources that are needed to run the job. &#039;&#039;&#039;sbatch&#039;&#039;&#039; will then queue the batch job. However, starting of batch job depends on the availability of the requested resources and the fair sharing value.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=== sbatch Command Parameters ===&lt;br /&gt;
The syntax and use of &#039;&#039;&#039;sbatch&#039;&#039;&#039; can be displayed via:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ man sbatch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;sbatch&#039;&#039;&#039; options can be used from the command line or in your job script.&lt;br /&gt;
{| width=750px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | sbatch Options&lt;br /&gt;
|-&lt;br /&gt;
! Command line&lt;br /&gt;
! Script&lt;br /&gt;
! Purpose&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -t &#039;&#039;time&#039;&#039;  or  --time=&#039;&#039;time&#039;&#039;&lt;br /&gt;
| #SBATCH --time=&#039;&#039;time&#039;&#039;&lt;br /&gt;
| Wall clock time limit.&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -N &#039;&#039;count&#039;&#039;  or  --nodes=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --nodes=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of nodes to be used.&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -n &#039;&#039;count&#039;&#039;  or  --ntasks=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --ntasks=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of tasks to be launched.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --ntasks-per-node=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --ntasks-per-node=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Maximum count (&amp;lt;= 28 and &amp;lt;= 40 resp.) of tasks per node.&amp;lt;br&amp;gt;(Replaces the option ppn of MOAB.)&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -c &#039;&#039;count&#039;&#039; or --cpus-per-task=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --cpus-per-task=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of CPUs required per (MPI-)task.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mem=&#039;&#039;value_in_MB&#039;&#039;&lt;br /&gt;
| #SBATCH --mem=&#039;&#039;value_in_MB&#039;&#039; &lt;br /&gt;
| Memory in MegaByte per node.&amp;lt;br&amp;gt;(Default value is 128000 and 96000 MB resp., i.e. you should omit &amp;lt;br&amp;gt; the setting of this option.)&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mem-per-cpu=&#039;&#039;value_in_MB&#039;&#039;&lt;br /&gt;
| #SBATCH --mem-per-cpu=&#039;&#039;value_in_MB&#039;&#039; &lt;br /&gt;
| Minimum Memory required per allocated CPU.&amp;lt;br&amp;gt;(Replaces the option pmem of MOAB. You should omit &amp;lt;br&amp;gt; the setting of this option.)&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mail-type=&#039;&#039;type&#039;&#039;&lt;br /&gt;
| #SBATCH --mail-type=&#039;&#039;type&#039;&#039;&lt;br /&gt;
| Notify user by email when certain event types occur.&amp;lt;br&amp;gt;Valid type values are NONE, BEGIN, END, FAIL, REQUEUE, ALL.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mail-user=&#039;&#039;mail-address&#039;&#039;&lt;br /&gt;
| #SBATCH --mail-user=&#039;&#039;mail-address&#039;&#039;&lt;br /&gt;
|  The specified mail-address receives email notification of state&amp;lt;br&amp;gt;changes as defined by --mail-type.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --output=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --output=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| File in which job output is stored. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --error=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --error=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| File in which job error messages are stored. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -J &#039;&#039;name&#039;&#039; or --job-name=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --job-name=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| Job name.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --export=[ALL,] &#039;&#039;env-variables&#039;&#039;&lt;br /&gt;
| #SBATCH --export=[ALL,] &#039;&#039;env-variables&#039;&#039;&lt;br /&gt;
| Identifies which environment variables from the submission &amp;lt;br&amp;gt; environment are propagated to the launched application. Default &amp;lt;br&amp;gt; is ALL. If adding an environment variable to the submission&amp;lt;br&amp;gt; environment is intended, the argument ALL must be added.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -A &#039;&#039;group-name&#039;&#039; or --account=&#039;&#039;group-name&#039;&#039;&lt;br /&gt;
| #SBATCH --account=&#039;&#039;group-name&#039;&#039;&lt;br /&gt;
| Change resources used by this job to specified group. You may &amp;lt;br&amp;gt; need this option if your account is assigned to more &amp;lt;br&amp;gt; than one group. By command &amp;quot;scontrol show job&amp;quot; the project &amp;lt;br&amp;gt; group the job is accounted on can be seen behind &amp;quot;Account=&amp;quot;. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -p &#039;&#039;queue-name&#039;&#039; or --partition=&#039;&#039;queue-name&#039;&#039;&lt;br /&gt;
| #SBATCH --partition=&#039;&#039;queue-name&#039;&#039;&lt;br /&gt;
| Request a specific queue for the resource allocation.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --reservation=&#039;&#039;reservation-name&#039;&#039;&lt;br /&gt;
| #SBATCH --reservation=&#039;&#039;reservation-name&#039;&#039;&lt;br /&gt;
| Use a specific reservation for the resource allocation.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -C &#039;&#039;LSDF&#039;&#039; or --constraint=&#039;&#039;LSDF&#039;&#039;&lt;br /&gt;
| #SBATCH --constraint=LSDF&lt;br /&gt;
| Job constraint LSDF Filesystems.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -C &#039;&#039;BEEOND (BEEOND_4MDS, BEEOND_MAXMDS)&#039;&#039; or --constraint=&#039;&#039;BEEOND (BEEOND_4MDS, BEEOND_MAXMDS&#039;&#039;&lt;br /&gt;
| #SBATCH --constraint=BEEOND (BEEOND_4MDS, BEEOND_MAXMDS)&lt;br /&gt;
| Job constraint BeeOND file system.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== sbatch --partition  &#039;&#039;queues&#039;&#039; ====&lt;br /&gt;
Queue classes define maximum resources such as walltime, nodes and processes per node and queue of the compute system. Details can be found here:&lt;br /&gt;
* [[BwUniCluster3.0/Batch_Queues|bwUniCluster 3.0 queue settings]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== sbatch Examples ===&lt;br /&gt;
==== Serial Programs ====&lt;br /&gt;
To submit a serial job that runs the script &#039;&#039;&#039;job.sh&#039;&#039;&#039; and that requires 5000 MB of main memory and 10 minutes of wall clock time&lt;br /&gt;
&lt;br /&gt;
a) execute:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sbatch -p dev_cpu -n 1 -t 10:00 --mem=5000  job.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
or&lt;br /&gt;
b) add after the initial line of your script &#039;&#039;&#039;job.sh&#039;&#039;&#039; the lines (here with a high memory request):&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#SBATCH --ntasks=1&lt;br /&gt;
#SBATCH --time=10&lt;br /&gt;
#SBATCH --mem=180gb&lt;br /&gt;
#SBATCH --job-name=simple&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
and execute the modified script with the command line option &#039;&#039;--partition=highmem&#039;&#039;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sbatch --partition=highmem job.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note, that sbatch command line options overrule script options.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Multithreaded Programs ====&lt;br /&gt;
Multithreaded programs operate faster than serial programs on CPUs with multiple cores.&amp;lt;br&amp;gt;&lt;br /&gt;
Moreover, multiple threads of one process share resources such as memory.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
For multithreaded programs based on &#039;&#039;&#039;Open&#039;&#039;&#039; &#039;&#039;&#039;M&#039;&#039;&#039;ulti-&#039;&#039;&#039;P&#039;&#039;&#039;rocessing (OpenMP) a number of threads is defined by the environment variable OMP_NUM_THREADS. By default this variable is set to 1 (OMP_NUM_THREADS=1).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Hyperthreading is switched on on bwUniCluster 3.0, the option --threads-per-core must be set to 1, if you do not want to use it.&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
To submit a batch job called &#039;&#039;OpenMP_Test&#039;&#039; that runs a 96-fold threaded program &#039;&#039;omp_exe&#039;&#039; which requires 6000 MByte of total physical memory and total wall clock time of 40 minutes:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
a) execute:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sbatch -p cpu --export=ALL,OMP_NUM_THREADS=96 -J OpenMP_Test -N 1 -c 96 --threads-per-core=1 -t 40 --mem=6000 ./omp_exe&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
or&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
* generate the script &#039;&#039;&#039;job_omp.sh&#039;&#039;&#039; containing the following lines:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
#SBATCH --nodes=1&lt;br /&gt;
#SBATCH --cpus-per-task=96&lt;br /&gt;
#SBATCH --time=40:00&lt;br /&gt;
#SBATCH --threads-per-core=1&lt;br /&gt;
#SBATCH --mem=6000mb   &lt;br /&gt;
#SBATCH --export=ALL,EXECUTABLE=./omp_exe&lt;br /&gt;
#SBATCH -J OpenMP_Test&lt;br /&gt;
&lt;br /&gt;
#Usually you should set&lt;br /&gt;
export KMP_AFFINITY=compact,1,0&lt;br /&gt;
#export KMP_AFFINITY=verbose,compact,1,0 prints messages concerning the supported affinity&lt;br /&gt;
#KMP_AFFINITY Description: https://software.intel.com/en-us/node/524790#KMP_AFFINITY_ENVIRONMENT_VARIABLE&lt;br /&gt;
&lt;br /&gt;
export OMP_NUM_THREADS=${SLURM_JOB_CPUS_PER_NODE}&lt;br /&gt;
echo &amp;quot;Executable ${EXECUTABLE} running on ${SLURM_JOB_CPUS_PER_NODE} cores with ${OMP_NUM_THREADS} threads&amp;quot;&lt;br /&gt;
startexe=${EXECUTABLE}&lt;br /&gt;
echo $startexe&lt;br /&gt;
exec $startexe&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Using Intel compiler the environment variable KMP_AFFINITY switches on binding of threads to specific cores and, if necessary, replace &amp;lt;placeholder&amp;gt; with the required modulefile to enable the OpenMP environment and execute the script &#039;&#039;&#039;job_omp.sh&#039;&#039;&#039; adding the queue class &#039;&#039;cpu&#039;&#039; as sbatch option:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sbatch -p cpu job_omp.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note, that sbatch command line options overrule script options, e.g.,&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sbatch --partition=cpu --mem=200 job_omp.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
overwrites the script setting of 6000 MByte with 200 MByte.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== MPI Parallel Programs ====&lt;br /&gt;
MPI parallel programs run faster than serial programs on multi CPU and multi core systems. N-fold spawned processes of the MPI program, i.e., &#039;&#039;&#039;MPI tasks&#039;&#039;&#039;,  run simultaneously and communicate via the Message Passing Interface (MPI) paradigm. MPI tasks do not share memory but can be spawned over different nodes.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Multiple MPI tasks must be launched via &#039;&#039;&#039;mpirun&#039;&#039;&#039;, e.g. 4 MPI tasks of &#039;&#039;my_par_program&#039;&#039;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mpirun -n 4 my_par_program&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This command runs 4 MPI tasks of &#039;&#039;my_par_program&#039;&#039; on the node you are logged in.&lt;br /&gt;
To run this command with a loaded Intel MPI the environment variable I_MPI_HYDRA_BOOTSTRAP must be unset ( --&amp;gt; $ unset I_MPI_HYDRA_BOOTSTRAP).&lt;br /&gt;
&lt;br /&gt;
Running MPI parallel programs in a batch job the interactive environment - particularly the loaded modules - will also be set in the batch job. If you want to set a defined module environment in your batch job you have to purge all modules before setting the wished modules. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
===== OpenMPI =====&lt;br /&gt;
&lt;br /&gt;
If you want to run jobs on batch nodes, generate a wrapper script &#039;&#039;job_ompi.sh&#039;&#039; for &#039;&#039;&#039;OpenMPI&#039;&#039;&#039; containing the following lines:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
# Use when using the module environment for OpenMPI&lt;br /&gt;
module load compiler/&amp;lt;placeholder_for_compiler&amp;gt;/&amp;lt;placeholder_for_compiler_version&amp;gt;&lt;br /&gt;
module load mpi/openmpi/&amp;lt;placeholder_for_mpi_version&amp;gt;&lt;br /&gt;
mpirun --bind-to core --map-by core -report-bindings my_par_program&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Attention:&#039;&#039;&#039; Do &#039;&#039;&#039;NOT&#039;&#039;&#039; add mpirun options &#039;&#039;-n &amp;lt;number_of_processes&amp;gt;&#039;&#039; or any other option defining processes or nodes, since Slurm instructs mpirun about number of processes and node hostnames. Use &#039;&#039;&#039;ALWAYS&#039;&#039;&#039; the MPI options &#039;&#039;&#039;&#039;&#039;--bind-to core&#039;&#039;&#039;&#039;&#039; and &#039;&#039;&#039;&#039;&#039;--map-by core|socket|node&#039;&#039;&#039;&#039;&#039;. Please type &#039;&#039;mpirun --help&#039;&#039; for an explanation of the meaning of the different options of mpirun option &#039;&#039;--map-by&#039;&#039;.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Considering 4 OpenMPI tasks on a single node, each requiring 2000 MByte, and running for 1 hour, execute:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sbatch -p cpu -N 1 -n 4 --mem-per-cpu=2000 --time=01:00:00 ./job_ompi.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Intel MPI =====&lt;br /&gt;
&lt;br /&gt;
Generate a wrapper script for &#039;&#039;&#039;Intel MPI&#039;&#039;&#039;, &#039;&#039;job_impi.sh&#039;&#039; containing the following lines:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
# Use when a defined module environment related to Intel MPI is wished&lt;br /&gt;
module load compiler/&amp;lt;placeholder_for_compiler&amp;gt;/&amp;lt;placeholder_for_compiler_version&amp;gt;&lt;br /&gt;
module load mpi/impi/&amp;lt;placeholder_for_version&amp;gt;   &lt;br /&gt;
mpiexec.hydra -bootstrap slurm my_par_program&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;font color=red&amp;gt;&#039;&#039;&#039;Attention:&#039;&#039;&#039;&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Do &#039;&#039;&#039;NOT&#039;&#039;&#039; add mpirun options &#039;&#039;-n &amp;lt;number_of_processes&amp;gt;&#039;&#039; or any other option defining processes or nodes, since Slurm instructs mpirun about number of processes and node hostnames.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Launching and running 200 Intel MPI tasks on 5 nodes, each requiring 80 GByte, and running for 5 hours, execute:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sbatch --partition=cpu -N 5 --ntasks-per-node=40 --mem=80gb -t 300 ./job_impi.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
If you want to use 128 or more nodes, you must also set the environment variable as follows:           &amp;lt;BR&amp;gt;&lt;br /&gt;
export I_MPI_HYDRA_BRANCH_COUNT=-1&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
If you want to use the options perhost, ppn or rr, you must additionally set the environment variable I_MPI_JOB_RESPECT_PROCESS_PLACEMENT=off.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Multithreaded + MPI parallel Programs ====&lt;br /&gt;
Multithreaded + MPI parallel programs operate faster than serial programs on multi CPUs with multiple cores. All threads of one process share resources such as memory. On the contrary MPI tasks do not share memory but can be spawned over different nodes. &#039;&#039;&#039;Hyperthreading is switched on on bwUniCluster 3.0, the option --threads-per-core must be set to 1, if you do not want to use it.&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
===== OpenMPI with Multithreading =====&lt;br /&gt;
Multiple MPI tasks using &#039;&#039;&#039;OpenMPI&#039;&#039;&#039; must be launched by the MPI parallel program &#039;&#039;&#039;mpirun&#039;&#039;&#039;. For multithreaded programs based on &#039;&#039;&#039;Open&#039;&#039;&#039; &#039;&#039;&#039;M&#039;&#039;&#039;ulti-&#039;&#039;&#039;P&#039;&#039;&#039;rocessing (OpenMP) number of threads are defined by the environment variable OMP_NUM_THREADS. By default this variable is set to 1 (OMP_NUM_THREADS=1).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;For OpenMPI&#039;&#039;&#039; a job-script to submit a batch job called &#039;&#039;job_ompi_omp.sh&#039;&#039; that runs a MPI program with 4 tasks and a 28-fold threaded program &#039;&#039;ompi_omp_program&#039;&#039; requiring 3000 MByte of physical memory per thread (using 28 threads per MPI task you will get 28*3000 MByte = 84000 MByte per MPI task) and total wall clock time of 3 hours looks like:&lt;br /&gt;
&amp;lt;!--b)--&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
#SBATCH --ntasks=4&lt;br /&gt;
#SBATCH --cpus-per-task=28&lt;br /&gt;
#SBATCH --threads-per-core=1&lt;br /&gt;
#SBATCH --time=03:00:00&lt;br /&gt;
#SBATCH --mem=83gb    # 84000 MB = 84000/1024 GB = 82.1 GB&lt;br /&gt;
#SBATCH --export=ALL,MPI_MODULE=mpi/openmpi/3.1,EXECUTABLE=./ompi_omp_program&lt;br /&gt;
#SBATCH --output=&amp;quot;parprog_hybrid_%j.out&amp;quot;  &lt;br /&gt;
&lt;br /&gt;
# Use when a defined module environment related to OpenMPI is wished&lt;br /&gt;
module load ${MPI_MODULE}&lt;br /&gt;
export OMP_NUM_THREADS=${SLURM_CPUS_PER_TASK}&lt;br /&gt;
export MPIRUN_OPTIONS=&amp;quot;--bind-to core --map-by socket:PE=${OMP_NUM_THREADS} -report-bindings&amp;quot;&lt;br /&gt;
export NUM_CORES=${SLURM_NTASKS}*${OMP_NUM_THREADS}&lt;br /&gt;
echo &amp;quot;${EXECUTABLE} running on ${NUM_CORES} cores with ${SLURM_NTASKS} MPI-tasks and ${OMP_NUM_THREADS} threads&amp;quot;&lt;br /&gt;
startexe=&amp;quot;mpirun -n ${SLURM_NTASKS} ${MPIRUN_OPTIONS} ${EXECUTABLE}&amp;quot;&lt;br /&gt;
echo $startexe&lt;br /&gt;
exec $startexe&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Execute the script &#039;&#039;&#039;job_ompi_omp.sh&#039;&#039;&#039; by command sbatch:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sbatch -p cpu ./job_ompi_omp.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* With the mpirun option &#039;&#039;--bind-to core&#039;&#039; MPI tasks and OpenMP threads are bound to physical cores.&lt;br /&gt;
* With the option &#039;&#039;--map-by node:PE=&amp;lt;value&amp;gt;&#039;&#039; (neighbored) MPI tasks will be attached to different nodes and each MPI task is bound to the first core of a node. &amp;lt;value&amp;gt; must be set to ${OMP_NUM_THREADS}.&lt;br /&gt;
* The option &#039;&#039;-report-bindings&#039;&#039; shows the bindings between MPI tasks and physical cores.&lt;br /&gt;
* The mpirun-options &#039;&#039;&#039;--bind-to core&#039;&#039;&#039;, &#039;&#039;&#039;--map-by socket|...|node:PE=&amp;lt;value&amp;gt;&#039;&#039;&#039; should always be used when running a multithreaded MPI program.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Intel MPI with Multithreading =====&lt;br /&gt;
Multithreaded + MPI parallel programs operate faster than serial programs on multi CPUs with multiple cores. All threads of one process share resources such as memory. On the contrary MPI tasks do not share memory but can be spawned over different nodes.  &lt;br /&gt;
&lt;br /&gt;
Multiple Intel MPI tasks must be launched by the MPI parallel program &#039;&#039;&#039;mpiexec.hydra&#039;&#039;&#039;. For multithreaded programs based on &#039;&#039;&#039;Open&#039;&#039;&#039; &#039;&#039;&#039;M&#039;&#039;&#039;ulti-&#039;&#039;&#039;P&#039;&#039;&#039;rocessing (OpenMP) number of threads are defined by the environment variable OMP_NUM_THREADS. By default this variable is set to 1 (OMP_NUM_THREADS=1).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;For Intel MPI&#039;&#039;&#039; a job-script to submit a batch job called &#039;&#039;job_impi_omp.sh&#039;&#039; that runs a Intel MPI program with 10 tasks and a 96-fold threaded program &#039;&#039;impi_omp_program&#039;&#039; requiring 96000 MByte of total physical memory per task and total wall clock time of 1 hours looks like: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--b)--&amp;gt; &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
#SBATCH --ntasks=10&lt;br /&gt;
#SBATCH --cpus-per-task=96&lt;br /&gt;
#SBATCH --threads-per-core=1&lt;br /&gt;
#SBATCH --time=60&lt;br /&gt;
#SBATCH --mem=96000&lt;br /&gt;
#SBATCH --export=ALL,MPI_MODULE=mpi/impi,EXE=./impi_omp_program&lt;br /&gt;
#SBATCH --output=&amp;quot;parprog_impi_omp_%j.out&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#If using more than one MPI task per node please set&lt;br /&gt;
export KMP_AFFINITY=compact,1,0&lt;br /&gt;
#export KMP_AFFINITY=verbose,scatter  prints messages concerning the supported affinity &lt;br /&gt;
#KMP_AFFINITY Description: https://software.intel.com/en-us/node/524790#KMP_AFFINITY_ENVIRONMENT_VARIABLE&lt;br /&gt;
&lt;br /&gt;
# Use when a defined module environment related to Intel MPI is wished &lt;br /&gt;
module load ${MPI_MODULE}&lt;br /&gt;
export OMP_NUM_THREADS=${SLURM_CPUS_PER_TASK}&lt;br /&gt;
export MPIRUN_OPTIONS=&amp;quot;-binding &amp;quot;domain=omp:compact&amp;quot; -print-rank-map -envall&amp;quot;&lt;br /&gt;
export NUM_PROCS=eval(${SLURM_NTASKS}*${OMP_NUM_THREADS})&lt;br /&gt;
echo &amp;quot;${EXE} running on ${NUM_PROCS} cores with ${SLURM_NTASKS} MPI-tasks and ${OMP_NUM_THREADS} threads&amp;quot;&lt;br /&gt;
startexe=&amp;quot;mpiexec.hydra -bootstrap slurm ${MPIRUN_OPTIONS} -n ${SLURM_NTASKS} ${EXE}&amp;quot;&lt;br /&gt;
echo $startexe&lt;br /&gt;
exec $startexe&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Using Intel compiler the environment variable KMP_AFFINITY switches on binding of threads to specific cores. If you only run one MPI task per node please set KMP_AFFINITY=compact,1,0.&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
If you want to use 128 or more nodes, you must also set the environment variable as follows:           &amp;lt;BR&amp;gt;&lt;br /&gt;
export I_MPI_HYDRA_BRANCH_COUNT=-1&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
If you want to use the options perhost, ppn or rr, you must additionally set the environment variable I_MPI_JOB_RESPECT_PROCESS_PLACEMENT=off. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Execute the script &#039;&#039;&#039;job_impi_omp.sh&#039;&#039;&#039; by command sbatch:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sbatch -p cpu ./job_impi_omp.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The mpirun option &#039;&#039;-print-rank-map&#039;&#039; shows the bindings between MPI tasks and nodes (not very beneficial). The option &#039;&#039;-binding&#039;&#039; binds MPI tasks (processes) to a particular processor; &#039;&#039;domain=omp&#039;&#039; means that the domain size is determined by the number of threads. If you would choose 2 MPI tasks per node, you should choose &#039;&#039;-binding &amp;quot;cell=unit;map=bunch&amp;quot;&#039;&#039;; this binding maps one MPI process to each socket. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Chain jobs ====&lt;br /&gt;
The CPU time requirements of many applications exceed the limits of the job classes. In those situations it is recommended to solve the problem by a job chain. A job chain is a sequence of jobs where each job automatically starts its successor. &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
####################################&lt;br /&gt;
## simple Slurm submitter script to setup   ## &lt;br /&gt;
## a chain of jobs using Slurm                    ##&lt;br /&gt;
####################################&lt;br /&gt;
## ver.  : 2018-11-27, KIT, SCC&lt;br /&gt;
&lt;br /&gt;
## Define maximum number of jobs via positional parameter 1, default is 5&lt;br /&gt;
max_nojob=${1:-5}&lt;br /&gt;
&lt;br /&gt;
## Define your jobscript (e.g. &amp;quot;~/chain_job.sh&amp;quot;)&lt;br /&gt;
chain_link_job=${PWD}/chain_job.sh&lt;br /&gt;
&lt;br /&gt;
## Define type of dependency via positional parameter 2, default is &#039;afterok&#039;&lt;br /&gt;
dep_type=&amp;quot;${2:-afterok}&amp;quot;&lt;br /&gt;
## -&amp;gt; List of all dependencies:&lt;br /&gt;
## https://slurm.schedmd.com/sbatch.html&lt;br /&gt;
&lt;br /&gt;
myloop_counter=1&lt;br /&gt;
## Submit loop&lt;br /&gt;
while [ ${myloop_counter} -le ${max_nojob} ] ; do&lt;br /&gt;
   ##&lt;br /&gt;
   ## Differ slurm_opt depending on chain link number&lt;br /&gt;
   if [ ${myloop_counter} -eq 1 ] ; then&lt;br /&gt;
      slurm_opt=&amp;quot;&amp;quot;&lt;br /&gt;
   else&lt;br /&gt;
      slurm_opt=&amp;quot;-d ${dep_type}:${jobID}&amp;quot;&lt;br /&gt;
   fi&lt;br /&gt;
   ##&lt;br /&gt;
   ## Print current iteration number and sbatch command&lt;br /&gt;
   echo &amp;quot;Chain job iteration = ${myloop_counter}&amp;quot;&lt;br /&gt;
   echo &amp;quot;   sbatch --export=myloop_counter=${myloop_counter} ${slurm_opt} ${chain_link_job}&amp;quot;&lt;br /&gt;
   ## Store job ID for next iteration by storing output of sbatch command with empty lines&lt;br /&gt;
   jobID=$(sbatch -p &amp;lt;queue&amp;gt; --export=ALL,myloop_counter=${myloop_counter} ${slurm_opt} ${chain_link_job} 2&amp;gt;&amp;amp;1 | sed &#039;s/[S,a-z]* //g&#039;)&lt;br /&gt;
   ##   &lt;br /&gt;
   ## Check if ERROR occured&lt;br /&gt;
   if [[ &amp;quot;${jobID}&amp;quot; =~ &amp;quot;ERROR&amp;quot; ]] ; then&lt;br /&gt;
      echo &amp;quot;   -&amp;gt; submission failed!&amp;quot; ; exit 1&lt;br /&gt;
   else&lt;br /&gt;
      echo &amp;quot;   -&amp;gt; job number = ${jobID}&amp;quot;&lt;br /&gt;
   fi&lt;br /&gt;
   ##&lt;br /&gt;
   ## Increase counter&lt;br /&gt;
   let myloop_counter+=1&lt;br /&gt;
done&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== GPU jobs ====&lt;br /&gt;
&lt;br /&gt;
The nodes in the gpu_h100, gpu_mi300, gpu_a100_il and gpu_h100_il  queues have 4 NVIDIA Ampere A100 GPUs or 4 NVIDIA Hopper H100 GPUs. Just submitting a job to these queues is not enough to also allocate one or more GPUs, you have to do so using the &amp;quot;--gres=gpu&amp;quot; parameter. You have to specifiy how many GPUs your job needs, e.g. &amp;quot;--gres=gpu:2&amp;quot; will request two GPUs.&lt;br /&gt;
&lt;br /&gt;
The GPU nodes are shared between multiple jobs if the jobs don&#039;t request all the GPUs in a node and there are enough resources to run more than one job. The individual GPUs are always bound to a single job and will not be shared between different jobs.&lt;br /&gt;
&lt;br /&gt;
a) add after the initial line of your script job.sh the line including the&lt;br /&gt;
information about the GPU usage:&amp;lt;br&amp;gt;   #SBATCH --gres=gpu:2&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
#SBATCH --ntasks=40&lt;br /&gt;
#SBATCH --time=02:00:00&lt;br /&gt;
#SBATCH --mem=4000&lt;br /&gt;
#SBATCH --gres=gpu:2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or b) execute:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sbatch -p &amp;lt;queue&amp;gt; -n 40 -t 02:00:00 --mem 4000 --gres=gpu:2 job.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
If you start an interactive session on of the GPU nodes, you can use the &amp;quot;nvidia-smi&amp;quot; command to list the GPUs allocated to your job:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ nvidia-smi&lt;br /&gt;
Fri Apr  4 09:51:29 2025       &lt;br /&gt;
+-----------------------------------------------------------------------------------------+&lt;br /&gt;
| NVIDIA-SMI 570.86.15              Driver Version: 570.86.15      CUDA Version: 12.8     |&lt;br /&gt;
|-----------------------------------------+------------------------+----------------------+&lt;br /&gt;
| GPU  Name                 Persistence-M | Bus-Id          Disp.A | Volatile Uncorr. ECC |&lt;br /&gt;
| Fan  Temp   Perf          Pwr:Usage/Cap |           Memory-Usage | GPU-Util  Compute M. |&lt;br /&gt;
|                                         |                        |               MIG M. |&lt;br /&gt;
|=========================================+========================+======================|&lt;br /&gt;
|   0  NVIDIA H100                    On  |   00000000:06:00.0 Off |                    0 |&lt;br /&gt;
| N/A   45C    P0             70W /  415W |      27MiB /  95830MiB |      0%      Default |&lt;br /&gt;
|                                         |                        |             Disabled |&lt;br /&gt;
+-----------------------------------------+------------------------+----------------------+&lt;br /&gt;
|   1  NVIDIA H100                    On  |   00000000:26:00.0 Off |                    0 |&lt;br /&gt;
| N/A   45C    P0             69W /  415W |      27MiB /  95830MiB |      0%      Default |&lt;br /&gt;
|                                         |                        |             Disabled |&lt;br /&gt;
+-----------------------------------------+------------------------+----------------------+&lt;br /&gt;
                                                                                         &lt;br /&gt;
+-----------------------------------------------------------------------------------------+&lt;br /&gt;
| Processes:                                                                              |&lt;br /&gt;
|  GPU   GI   CI              PID   Type   Process name                        GPU Memory |&lt;br /&gt;
|        ID   ID                                                               Usage      |&lt;br /&gt;
|=========================================================================================|&lt;br /&gt;
|    0   N/A  N/A            3569      G   /usr/libexec/Xorg                        17MiB |&lt;br /&gt;
|    1   N/A  N/A            3569      G   /usr/libexec/Xorg                        17MiB |&lt;br /&gt;
+-----------------------------------------------------------------------------------------+&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
In case of using Open MPI, the underlying communication infrastructure (UCX and Open MPI&#039;s BTL) is CUDA-aware.&lt;br /&gt;
Please run Open MPI&#039;s mpirun using the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mpirun --mca pml ucx --mca btl_openib_warn_default_gid_prefix 0 -np 2 ./mpi_cuda_app&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
or disabling the (older) communication layer Bit-Transfer-Layer (short BTL) alltogether:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mpirun --mca pml ucx --mca btl ^openib -np 2 ./mpi_cuda_app&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== LSDF Online Storage ====&lt;br /&gt;
On bwUniCluster 3.0 you can use for special cases the LSDF Online Storage on the HPC cluster nodes. Please request for this service separately ([https://www.lsdf.kit.edu/os/storagerequest/: LSDF Storage Request]).&lt;br /&gt;
To mount the LSDF Online Storage on the compute nodes during the job runtime the&lt;br /&gt;
the constraint flag &amp;quot;LSDF&amp;quot; has to be set.  &lt;br /&gt;
&lt;br /&gt;
a) add after the initial line of your script job.sh the line including the&lt;br /&gt;
information about the LSDF Online Storage usage:&amp;lt;br&amp;gt;   #SBATCH --constraint=LSDF&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
#SBATCH --ntasks=1&lt;br /&gt;
#SBATCH --time=120&lt;br /&gt;
#SBATCH --mem=200&lt;br /&gt;
#SBATCH --constraint=LSDF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or b) execute:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sbatch -p &amp;lt;queue&amp;gt; -n 1 -t 2:00:00 --mem 200 job.sh -C LSDF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
For the usage of the LSDF Online Storage&lt;br /&gt;
the following environment variables are available: $LSDF, $LSDFPROJECTS, $LSDFHOME.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====BeeOND (BeeGFS On-Demand)====&lt;br /&gt;
&lt;br /&gt;
BeeOND instances are integrated into the prolog and epilog script of the cluster batch system Slurm. It can be used on the exclusive compute nodes during the job runtime with the constraint flag &amp;quot;BEEOND&amp;quot;, &amp;quot;BEEOND_4MDS&amp;quot; or &amp;quot;BEEOND_MAXMDS&amp;quot; ([[BwUniCluster_2.0_Slurm_common_Features#sbatch_Command_Parameters|Slurm Command Parameters]])&lt;br /&gt;
* BEEOND: one metadata server is started on the first node&lt;br /&gt;
* BEEOND_4MDS: 4 metadata servers are started within your job. If you have less than 4 nodes less metadata servers are started.&lt;br /&gt;
* BEEOND_MAXMDS: on every node of your job a metadata server for the on_demand file system is started&lt;br /&gt;
&lt;br /&gt;
As starting point we recommend using the &amp;quot;BEEOND&amp;quot; option. If you are unsure if this is sufficient for you feel free to contact the support team.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
#SBATCH ...&lt;br /&gt;
#SBATCH --constraint=BEEOND   # or BEEOND_4MDS or BEEOND_MAXMDS&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After your job has started you can find the private on-demand file system in &#039;&#039;&#039;/mnt/odfs/${SLURM_JOB_ID}&#039;&#039;&#039; directory. The mountpoint comes with five pre-configured directories:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# For small files (stripe count = 1)&lt;br /&gt;
/mnt/odfs/${SLURM_JOB_ID}/stripe_1&lt;br /&gt;
# Stripe count = 4&lt;br /&gt;
/mnt/odfs/${SLURM_JOB_ID}/stripe_default &lt;br /&gt;
# or &lt;br /&gt;
/mnt/odfs/${SLURM_JOB_ID}/stripe_4&lt;br /&gt;
# Stripe count = 8, 16 or 32, use this directories for medium sized and large files or when using MPI-IO&lt;br /&gt;
/mnt/odfs/${SLURM_JOB_ID}/stripe_8&lt;br /&gt;
/mnt/odfs/${SLURM_JOB_ID}/stripe_16 &lt;br /&gt;
# or &lt;br /&gt;
/mnt/odfs/${SLURM_JOB_ID}/stripe_32&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you request less nodes than stripe count, the stripe count will be the number of nodes. For example, if you only request 8 nodes the directory stripe_16 has only a stripe count 8.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;font color=red&amp;gt;&#039;&#039;&#039;Attention:&#039;&#039;&#039;&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
:Be careful when creating large files: use always the directory with the max stripe count for large files.&lt;br /&gt;
:If you create large files use a higher stripe count. For example, if your largest file is 1.1 Tb, then you have to use a stripe count larger than 2, &lt;br /&gt;
:otherwise the used disk space is exceeded.  &lt;br /&gt;
&lt;br /&gt;
The capacity of the private file system depends on the number of nodes. For each node you get 750 Gbyte.&lt;br /&gt;
If you request 100 nodes for your job, the private file system is 100 * 750 Gbyte ~ 75 Tbyte (approx) capacity.&lt;br /&gt;
&lt;br /&gt;
== Start time of job or resources : squeue --start ==&lt;br /&gt;
The command can be used by any user to displays the estimated start time of a job based a number of analysis types based on historical usage, earliest available reservable resources, and priority based backlog. The command squeue is explained in detail on the webpage https://slurm.schedmd.com/squeue.html or via manpage (man squeue). &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=== Access ===&lt;br /&gt;
By default, this command can be run by &#039;&#039;&#039;any user&#039;&#039;&#039;. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== List of your submitted jobs : squeue ==&lt;br /&gt;
Displays information about YOUR active, pending and/or recently completed jobs. The command displays all own active and pending jobs. The command squeue is explained in detail on the webpage https://slurm.schedmd.com/squeue.html or via manpage (man squeue).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=== Access ===&lt;br /&gt;
By default, this command can be run by any user.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Flags ===&lt;br /&gt;
{| width=750px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Flag !! Description&lt;br /&gt;
|-&lt;br /&gt;
| -l, --long&lt;br /&gt;
| Report more of the available information for the selected jobs or job steps, subject to any constraints specified.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
&#039;&#039;squeue&#039;&#039; example on bwUniCluster 3.0 &amp;lt;small&amp;gt;(Only your own jobs are displayed!)&amp;lt;/small&amp;gt;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ squeue &lt;br /&gt;
             JOBID PARTITION     NAME     USER ST       TIME  NODES NODELIST(REASON)&lt;br /&gt;
              1262       cpu     wrap ka_ab123  R       8:15      1 uc3n002&lt;br /&gt;
              1267 dev_gpu_h     wrap ka_ab123 PD       0:00      1 (Resources)&lt;br /&gt;
              1265   highmem     wrap ka_ab123  R       2:41      1 uc3n084&lt;br /&gt;
$ squeue -l&lt;br /&gt;
             JOBID PARTITION     NAME     USER    STATE       TIME TIME_LIMI  NODES NODELIST(REASON)&lt;br /&gt;
              1262       cpu     wrap ka_ab123  RUNNING       8:55     20:00      1 uc3n002&lt;br /&gt;
              1267 dev_gpu_h     wrap ka_ab123  PENDING       0:00     20:00      1 (Resources)&lt;br /&gt;
              1265   highmem     wrap ka_ab123  RUNNING       3:21     20:00      1 uc3n084&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* The output of &#039;&#039;squeue&#039;&#039; shows how many jobs of yours are running or pending and how many nodes are in use by your jobs.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Shows free resources : sinfo_t_idle ==&lt;br /&gt;
The Slurm command sinfo is used to view partition and node information for a system running Slurm. It incorporates down time, reservations, and node state information in determining the available backfill window. The sinfo command can only be used by the administrator.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
SCC has prepared a special script (sinfo_t_idle) to find out how many processors are available for immediate use on the system. It is anticipated that users will use this information to submit jobs that meet these criteria and thus obtain quick job turnaround times. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=== Access ===&lt;br /&gt;
By default, this command can be used by any user or administrator. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=== Example ===&lt;br /&gt;
* The following command displays what resources are available for immediate use for the whole partition.&lt;br /&gt;
&amp;lt;pre&amp;gt;$ sinfo_t_idle&lt;br /&gt;
Partition dev_cpu                 :      2 nodes idle&lt;br /&gt;
Partition cpu                     :     68 nodes idle&lt;br /&gt;
Partition highmem                 :      4 nodes idle&lt;br /&gt;
Partition dev_gpu_h100            :      0 nodes idle&lt;br /&gt;
Partition gpu_h100                :     11 nodes idle&lt;br /&gt;
Partition gpu_mi300               :      1 nodes idle&lt;br /&gt;
Partition dev_cpu_il              :      0 nodes idle&lt;br /&gt;
Partition cpu_il                  :      0 nodes idle&lt;br /&gt;
Partition dev_gpu_a100_il         :      0 nodes idle&lt;br /&gt;
Partition gpu_a100_il             :      0 nodes idle&lt;br /&gt;
Partition gpu_h100_il             :      0 nodes idle&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* For the above example jobs in all partitions can be run immediately.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Detailed job information : scontrol show job ==&lt;br /&gt;
scontrol show job displays detailed job state information and diagnostic output for all or a specified job of yours. Detailed information is available for active, pending and recently completed jobs. The command scontrol is explained in detail on the webpage https://slurm.schedmd.com/scontrol.html or via manpage (man scontrol). &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Display the state of all your jobs in normal mode: scontrol show job&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Display the state of a job with &amp;lt;jobid&amp;gt; in normal mode: scontrol show job &amp;lt;jobid&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=== Access ===&lt;br /&gt;
* End users can use scontrol show job to view the status of their &#039;&#039;&#039;own jobs&#039;&#039;&#039; only. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Arguments ===&lt;br /&gt;
{| width=750px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Option !! Default !! Description !! Example&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;width:12%;&amp;quot; &lt;br /&gt;
| -d&lt;br /&gt;
| (n/a)&lt;br /&gt;
| Detailed mode&lt;br /&gt;
| Example: Display the state with jobid 18089884 in detailed mode. &amp;lt;br&amp;gt; &amp;lt;pre&amp;gt;scontrol -d show job 18089884&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Scontrol show job Example ===&lt;br /&gt;
Here is an example from bwUniCluster 3.0.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
squeue    # show my own jobs (here the userid is replaced!)&lt;br /&gt;
             JOBID PARTITION     NAME     USER ST       TIME  NODES NODELIST(REASON)&lt;br /&gt;
              1262       cpu     wrap ka_zs040  R       1:12      1 uc3n002&lt;br /&gt;
&lt;br /&gt;
$&lt;br /&gt;
$ # now, see what&#039;s up with my pending job with jobid 18089884&lt;br /&gt;
$ &lt;br /&gt;
$ scontrol show job 1262&lt;br /&gt;
&lt;br /&gt;
JobId=1262 JobName=wrap&lt;br /&gt;
   UserId=ka_zs0402(241992) GroupId=ka_scc(12345) MCS_label=N/A&lt;br /&gt;
   Priority=4246 Nice=0 Account=ka QOS=normal&lt;br /&gt;
   JobState=RUNNING Reason=None Dependency=(null)&lt;br /&gt;
   Requeue=1 Restarts=0 BatchFlag=1 Reboot=0 ExitCode=0:0&lt;br /&gt;
   RunTime=00:00:37 TimeLimit=00:20:00 TimeMin=N/A&lt;br /&gt;
   SubmitTime=2025-04-04T10:01:30 EligibleTime=2025-04-04T10:01:30&lt;br /&gt;
   AccrueTime=2025-04-04T10:01:30&lt;br /&gt;
   StartTime=2025-04-04T10:01:31 EndTime=2025-04-04T10:21:31 Deadline=N/A&lt;br /&gt;
   SuspendTime=None SecsPreSuspend=0 LastSchedEval=2025-04-04T10:01:31 Scheduler=Main&lt;br /&gt;
   Partition=cpu AllocNode:Sid=uc3n999:2819841&lt;br /&gt;
   ReqNodeList=(null) ExcNodeList=(null)&lt;br /&gt;
   NodeList=uc3n002&lt;br /&gt;
   BatchHost=uc3n002&lt;br /&gt;
   NumNodes=1 NumCPUs=2 NumTasks=1 CPUs/Task=1 ReqB:S:C:T=0:0:*:*&lt;br /&gt;
   ReqTRES=cpu=1,mem=2000M,node=1,billing=1&lt;br /&gt;
   AllocTRES=cpu=2,mem=4000M,node=1,billing=2&lt;br /&gt;
   Socks/Node=* NtasksPerN:B:S:C=0:0:*:1 CoreSpec=*&lt;br /&gt;
   MinCPUsNode=1 MinMemoryCPU=2000M MinTmpDiskNode=0&lt;br /&gt;
   Features=(null) DelayBoot=00:00:00&lt;br /&gt;
   OverSubscribe=OK Contiguous=0 Licenses=(null) Network=(null)&lt;br /&gt;
   Command=(null)&lt;br /&gt;
   WorkDir=/pfs/data6/home/ka/ka_scc/ka_zs0402&lt;br /&gt;
   StdErr=/pfs/data6/home/ka/ka_scc/ka_zs0402/slurm-1262.out&lt;br /&gt;
   StdIn=/dev/null&lt;br /&gt;
   StdOut=/pfs/data6/home/ka/ka_scc/ka_zs0402/slurm-1262.out&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
You can use standard Linux pipe commands to filter the very detailed scontrol show job output.&lt;br /&gt;
* In which state the job is?&lt;br /&gt;
&amp;lt;pre&amp;gt;$ scontrol show job 1262 | grep -i State&lt;br /&gt;
   JobState=RUNNING Reason=None Dependency=(null)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Cancel Slurm Jobs ==&lt;br /&gt;
The scancel command is used to cancel jobs. The command scancel is explained in detail on the webpage https://slurm.schedmd.com/scancel.html or via manpage (man scancel).   &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=== Canceling own jobs : scancel ===&lt;br /&gt;
scancel is used to signal or cancel jobs, job arrays or job steps. The command is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ scancel [-i] &amp;lt;job-id&amp;gt;&lt;br /&gt;
$ scancel -t &amp;lt;job_state_name&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Flag !! Default !! Description !! Example&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -i, --interactive&lt;br /&gt;
| (n/a)&lt;br /&gt;
| Interactive mode.&lt;br /&gt;
| Cancel the job 987654 interactively. &amp;lt;br&amp;gt; &amp;lt;pre&amp;gt; scancel -i 987654 &amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| -t, --state&lt;br /&gt;
| (n/a)&lt;br /&gt;
| Restrict the scancel operation to jobs in a certain state. &amp;lt;br&amp;gt; &amp;quot;job_state_name&amp;quot; may have a value of either &amp;quot;PENDING&amp;quot;, &amp;quot;RUNNING&amp;quot; or &amp;quot;SUSPENDED&amp;quot;.&lt;br /&gt;
| Cancel all jobs in state &amp;quot;PENDING&amp;quot;. &amp;lt;br&amp;gt; &amp;lt;pre&amp;gt; scancel -t &amp;quot;PENDING&amp;quot; &amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Resource Managers =&lt;br /&gt;
=== Batch Job (Slurm) Variables ===&lt;br /&gt;
The following environment variables of Slurm are added to your environment once your job has started&lt;br /&gt;
&amp;lt;small&amp;gt;(only an excerpt of the most important ones)&amp;lt;/small&amp;gt;.&lt;br /&gt;
{| width=750px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Environment !! Brief explanation&lt;br /&gt;
|- &lt;br /&gt;
| SLURM_JOB_CPUS_PER_NODE &lt;br /&gt;
| Number of processes per node dedicated to the job&lt;br /&gt;
|- &lt;br /&gt;
| SLURM_JOB_NODELIST &lt;br /&gt;
| List of nodes dedicated to the job&lt;br /&gt;
|- &lt;br /&gt;
| SLURM_JOB_NUM_NODES &lt;br /&gt;
| Number of nodes dedicated to the job&lt;br /&gt;
|- &lt;br /&gt;
| SLURM_MEM_PER_NODE &lt;br /&gt;
| Memory per node dedicated to the job &lt;br /&gt;
|- &lt;br /&gt;
| SLURM_NPROCS&lt;br /&gt;
| Total number of processes dedicated to the job &lt;br /&gt;
|-&lt;br /&gt;
| SLURM_CLUSTER_NAME&lt;br /&gt;
| Name of the cluster executing the job&lt;br /&gt;
|-&lt;br /&gt;
| SLURM_CPUS_PER_TASK &lt;br /&gt;
| Number of CPUs requested per task&lt;br /&gt;
|-&lt;br /&gt;
| SLURM_JOB_ACCOUNT&lt;br /&gt;
| Account name &lt;br /&gt;
|-&lt;br /&gt;
| SLURM_JOB_ID&lt;br /&gt;
| Job ID&lt;br /&gt;
|-&lt;br /&gt;
| SLURM_JOB_NAME&lt;br /&gt;
| Job Name&lt;br /&gt;
|-&lt;br /&gt;
| SLURM_JOB_PARTITION&lt;br /&gt;
| Partition/queue running the job&lt;br /&gt;
|-&lt;br /&gt;
| SLURM_JOB_UID&lt;br /&gt;
| User ID of the job&#039;s owner&lt;br /&gt;
|-&lt;br /&gt;
| SLURM_SUBMIT_DIR&lt;br /&gt;
| Job submit folder.  The directory from which sbatch was invoked. &lt;br /&gt;
|-&lt;br /&gt;
| SLURM_JOB_USER&lt;br /&gt;
| User name of the job&#039;s owner&lt;br /&gt;
|-&lt;br /&gt;
| SLURM_RESTART_COUNT&lt;br /&gt;
| Number of times job has restarted&lt;br /&gt;
|-&lt;br /&gt;
| SLURM_PROCID&lt;br /&gt;
| Task ID (MPI rank)&lt;br /&gt;
|-&lt;br /&gt;
| SLURM_NTASKS&lt;br /&gt;
| The total number of tasks available for the job&lt;br /&gt;
|-&lt;br /&gt;
| SLURM_STEP_ID&lt;br /&gt;
| Job step ID&lt;br /&gt;
|-&lt;br /&gt;
| SLURM_STEP_NUM_TASKS&lt;br /&gt;
| Task count (number of MPI ranks)&lt;br /&gt;
|-&lt;br /&gt;
| SLURM_JOB_CONSTRAINT&lt;br /&gt;
| Job constraints&lt;br /&gt;
|}&lt;br /&gt;
See also:&lt;br /&gt;
* [https://slurm.schedmd.com/sbatch.html#SECTION_INPUT-ENVIRONMENT-VARIABLES Slurm input and output environment variables]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Job Exit Codes ===&lt;br /&gt;
A job&#039;s exit code (also known as exit status, return code and completion code) is captured by SLURM and saved as part of the job record. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Any non-zero exit code will be assumed to be a job failure and will result in a Job State of FAILED with a reason of &amp;quot;NonZeroExitCode&amp;quot;.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The exit code is an 8 bit unsigned number ranging between 0 and 255. While it is possible for a job to return a negative exit code, SLURM will display it as an unsigned value in the 0 - 255 range.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
==== Displaying Exit Codes and Signals ====&lt;br /&gt;
SLURM displays a job&#039;s exit code in the output of the &#039;&#039;&#039;scontrol show job&#039;&#039;&#039; and the sview utility.&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
When a signal was responsible for a job or step&#039;s termination, the signal number will be displayed after the exit code, delineated by a colon(:).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
==== Submitting Termination Signal ====&lt;br /&gt;
Here is an example, how to &#039;save&#039; a Slurm termination signal in a typical jobscript.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
[...]&lt;br /&gt;
exit_code=$?&lt;br /&gt;
mpirun  -np &amp;lt;#cores&amp;gt;  &amp;lt;EXE_BIN_DIR&amp;gt;/&amp;lt;executable&amp;gt; ... (options)  2&amp;gt;&amp;amp;1&lt;br /&gt;
[ &amp;quot;$exit_code&amp;quot; -eq 0 ] &amp;amp;&amp;amp; echo &amp;quot;all clean...&amp;quot; || \&lt;br /&gt;
   echo &amp;quot;Executable &amp;lt;EXE_BIN_DIR&amp;gt;/&amp;lt;executable&amp;gt; finished with exit code ${$exit_code}&amp;quot;&lt;br /&gt;
[...]&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
* Do not use &#039;&#039;&#039;&#039;time&#039;&#039;&#039;&#039; mpirun! The exit code will be the one submitted by the first (time) program.&lt;br /&gt;
* You do not need an &#039;&#039;&#039;exit $exit_code&#039;&#039;&#039; in the scripts.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
[[#top|Back to top]]&lt;/div&gt;</summary>
		<author><name>P Schuhmacher</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster3.0/Running_Jobs/Slurm&amp;diff=14628</id>
		<title>BwUniCluster3.0/Running Jobs/Slurm</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster3.0/Running_Jobs/Slurm&amp;diff=14628"/>
		<updated>2025-04-04T08:12:09Z</updated>

		<summary type="html">&lt;p&gt;P Schuhmacher: /* Examples */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
{|style=&amp;quot;background:#FEF4AB; width:100%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;padding:5px; background:#FEF4AB; text-align:left&amp;quot;|&lt;br /&gt;
This page is work in progress.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=  Slurm HPC Workload Manager = &lt;br /&gt;
== Specification == &lt;br /&gt;
Slurm is an open source, fault-tolerant, and highly scalable cluster management and job scheduling system for large and small Linux clusters. Slurm requires no kernel modifications for its operation and is relatively self-contained. As a cluster workload manager, Slurm has three key functions. First, it allocates exclusive and/or non-exclusive access to resources (compute nodes) to users for some duration of time so they can perform work. Second, it provides a framework for starting, executing, and monitoring work (normally a parallel job) on the set of allocated nodes. Finally, it arbitrates contention for resources by managing a queue of pending work.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Any kind of calculation on the compute nodes of bwUniCluster 3.0 requires the user to define calculations as a sequence of commands or single command together with required run time, number of CPU cores and main memory and submit all, i.e., the &#039;&#039;&#039;batch job&#039;&#039;&#039;, to a resource and workload managing software. bwUniCluster 3.0 has installed the workload managing software Slurm. Therefore any job submission by the user is to be executed by commands of the Slurm software. Slurm queues and runs user jobs based on fair sharing policies.  &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Slurm Commands (excerpt) ==&lt;br /&gt;
Important Slurm commands for non-administrators working on bwUniCluster 3.0.&lt;br /&gt;
{| width=850px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Slurm commands !! Brief explanation&lt;br /&gt;
|-&lt;br /&gt;
| [[#Job submission : sbatch|sbatch]] || Submits a job and puts it into the queue [[https://slurm.schedmd.com/sbatch.html sbatch]] &lt;br /&gt;
|-&lt;br /&gt;
| [[#Interactive job : salloc|salloc]] || Requests resources for an interactive Job [[https://slurm.schedmd.com/salloc.html salloc]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Detailed job information : scontrol show job|scontrol show job]] || Displays detailed job state information [[https://slurm.schedmd.com/scontrol.html scontrol]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#List of your submitted jo/bs : squeue|squeue]] || Displays information about active, eligible, blocked, and/or recently completed jobs [[https://slurm.schedmd.com/squeue.html squeue]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Start time of job or resources : squeue|squeue --start]] || Returns start time of submitted job [[https://slurm.schedmd.com/squeue.html squeue]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Shows free resources : sinfo_t_idle|sinfo_t_idle]] || Shows what resources are available for immediate use [[https://slurm.schedmd.com/sinfo.html sinfo]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Canceling own jobs : scancel|scancel]] || Cancels a job [[https://slurm.schedmd.com/scancel.html scancel]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* [https://slurm.schedmd.com/tutorials.html  Slurm Tutorials]&lt;br /&gt;
* [https://slurm.schedmd.com/pdfs/summary.pdf  Slurm command/option summary (2 pages)]&lt;br /&gt;
* [https://slurm.schedmd.com/man_index.html  Slurm Commands]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Job submission : sbatch ==&lt;br /&gt;
Batch jobs are submitted by using the command &#039;&#039;&#039;sbatch&#039;&#039;&#039;. The main purpose of the &#039;&#039;&#039;sbatch&#039;&#039;&#039; command is to specify the resources that are needed to run the job. &#039;&#039;&#039;sbatch&#039;&#039;&#039; will then queue the batch job. However, starting of batch job depends on the availability of the requested resources and the fair sharing value.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=== Command parameters sbatch ===&lt;br /&gt;
The syntax and use of &#039;&#039;&#039;sbatch&#039;&#039;&#039; can be displayed via:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ man sbatch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;sbatch&#039;&#039;&#039; options can be used from the command line or in your job script. Different defaults for some of these options are set based on the queue and can be found [https://wiki.bwhpc.de/e/BwUniCluster3.0/Batch_Queues#sbatch_-p_queue here]&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | sbatch Options&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width:8%&amp;quot;| Command line&lt;br /&gt;
! style=&amp;quot;width:9%&amp;quot;| Script&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Purpose&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -t, --time=&#039;&#039;time&#039;&#039;&lt;br /&gt;
| #SBATCH --time=&#039;&#039;time&#039;&#039;&lt;br /&gt;
| Wall clock time limit.&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -N, --nodes=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --nodes=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of nodes to be used.&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -n, --ntasks=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --ntasks=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of tasks to be launched.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --ntasks-per-node=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --ntasks-per-node=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Maximum count of tasks per node.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -c, --cpus-per-task=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --cpus-per-task=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of CPUs required per (MPI-)task.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mem=&#039;&#039;value_in_MB&#039;&#039;&lt;br /&gt;
| #SBATCH --mem=&#039;&#039;value_in_MB&#039;&#039; &lt;br /&gt;
| Memory in MegaByte per node. (You should omit the setting of this option.)&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mem-per-cpu=&#039;&#039;value_in_MB&#039;&#039;&lt;br /&gt;
| #SBATCH --mem-per-cpu=&#039;&#039;value_in_MB&#039;&#039; &lt;br /&gt;
| Minimum Memory required per allocated CPU. (You should omit the setting of this option.)&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mail-type=&#039;&#039;type&#039;&#039;&lt;br /&gt;
| #SBATCH --mail-type=&#039;&#039;type&#039;&#039;&lt;br /&gt;
| Notify user by email when certain event types occur.&amp;lt;br&amp;gt;Valid type values are NONE, BEGIN, END, FAIL, REQUEUE, ALL.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mail-user=&#039;&#039;mail-address&#039;&#039;&lt;br /&gt;
| #SBATCH --mail-user=&#039;&#039;mail-address&#039;&#039;&lt;br /&gt;
|  The specified mail-address receives email notification of state changes as defined by --mail-type.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --output=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --output=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| File in which job output is stored. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --error=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --error=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| File in which job error messages are stored. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -J, --job-name=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --job-name=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| Job name.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --export=[ALL,] &#039;&#039;env-variables&#039;&#039;&lt;br /&gt;
| #SBATCH --export=[ALL,] &#039;&#039;env-variables&#039;&#039;&lt;br /&gt;
| Identifies which environment variables from the submission environment are propagated to the launched application. Default is ALL.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -A, --account=&#039;&#039;group-name&#039;&#039;&lt;br /&gt;
| #SBATCH --account=&#039;&#039;group-name&#039;&#039;&lt;br /&gt;
| Change resources used by this job to specified group. You may need this option if your account is assigned to more than one group. By command &amp;quot;scontrol show job&amp;quot; the project group the job is accounted on can be seen behind &amp;quot;Account=&amp;quot;. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -p, --partition=&#039;&#039;queue-name&#039;&#039;&lt;br /&gt;
| #SBATCH --partition=&#039;&#039;queue-name&#039;&#039;&lt;br /&gt;
| Request a specific queue for the resource allocation.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --reservation=&#039;&#039;reservation-name&#039;&#039;&lt;br /&gt;
| #SBATCH --reservation=&#039;&#039;reservation-name&#039;&#039;&lt;br /&gt;
| Use a specific reservation for the resource allocation.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -C, --constraint=&#039;&#039;LSDF&#039;&#039;&lt;br /&gt;
| #SBATCH --constraint=LSDF&lt;br /&gt;
| Job constraint LSDF filesystems.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -C, --constraint=&#039;&#039;BEEOND (BEEOND_4MDS, BEEOND_MAXMDS)&#039;&#039;&lt;br /&gt;
| #SBATCH --constraint=BEEOND (BEEOND_4MDS, BEEOND_MAXMDS)&lt;br /&gt;
| Job constraint BeeOND filesystem.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Interactive job : salloc ==&lt;br /&gt;
&lt;br /&gt;
If you want to run an interactive job, you can do so via the command salloc on a login node.&amp;lt;br&amp;gt;Considering a serial application running on a compute node that requires 5000 MByte of memory and limiting the interactive run to 2 hours the following command has to be executed:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ salloc --partition=cpu --ntasks=1 --time=120 --mem=5000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then you will get one core on a compute node within the partition &amp;quot;cpu&amp;quot;. After execution of this command &#039;&#039;&#039;DO NOT CLOSE&#039;&#039;&#039; your current terminal session but wait until the queueing system Slurm has granted you the requested resources on the compute node. You will be logged in automatically on the granted core! To run a serial program on the granted core you only have to type the name of the executable.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./&amp;lt;my_serial_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please be aware that your serial job must run less than 2 hours in this example, else the job will be killed during runtime by the system. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can also start now a graphical X11-terminal connecting you to the dedicated resource that is available for 2 hours. You can start it by the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ xterm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that, once the walltime limit has been reached the resources - i.e. the compute node - will automatically be revoked.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
An interactive parallel application running on one compute node or on many compute nodes (e.g. here 5 nodes) with 40 cores each requires usually an amount of memory in GByte (e.g. 50 GByte) and a maximum time (e.g. 1 hour). E.g. 5 nodes can be allocated by the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ salloc --partition=cpu --nodes=5 --ntasks-per-node=40 --time=01:00:00  --mem=50gb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you can run parallel jobs on 200 cores requiring 50 GByte of memory per node. Please be aware that you will be logged in on core 0 of the first node.&lt;br /&gt;
If you want to have access to another node you have to open a new terminal, connect it also to BwUniCluster 2.0 and type the following commands to&lt;br /&gt;
connect to the running interactive job and then to a specific node:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ srun --jobid=XXXXXXXX --pty /bin/bash&lt;br /&gt;
$ srun --nodelist=uc3nXXX --pty /bin/bash&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ squeue&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the jobid and the nodelist can be shown.&lt;br /&gt;
&lt;br /&gt;
If you want to run MPI-programs, you can do it by simply typing mpirun &amp;lt;program_name&amp;gt;. Then your program will be run on 200 cores. A very simple example for starting a parallel job can be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mpirun &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also start the debugger ddt by the commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module add devel/ddt&lt;br /&gt;
$ ddt &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above commands will execute the parallel program &amp;lt;my_mpi_program&amp;gt; on all available cores. You can also start parallel programs on a subset of cores; an example for this can be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mpirun -n 50 &amp;lt;my_mpi_program&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are using Intel MPI you must start &amp;lt;my_mpi_program&amp;gt; by the command mpiexec.hydra (instead of mpirun).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;top&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
=  Slurm HPC Workload Manager = &lt;br /&gt;
== Specification == &lt;br /&gt;
Slurm is an open source, fault-tolerant, and highly scalable cluster management and job scheduling system for large and small Linux clusters. Slurm requires no kernel modifications for its operation and is relatively self-contained. As a cluster workload manager, Slurm has three key functions. First, it allocates exclusive and/or non-exclusive access to resources (compute nodes) to users for some duration of time so they can perform work. Second, it provides a framework for starting, executing, and monitoring work (normally a parallel job) on the set of allocated nodes. Finally, it arbitrates contention for resources by managing a queue of pending work.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Any kind of calculation on the compute nodes of [[bwUniCluster3.0|bwUniCluster 3.0]] requires the user to define calculations as a sequence of commands or single command together with required run time, number of CPU cores and main memory and submit all, i.e., the &#039;&#039;&#039;batch job&#039;&#039;&#039;, to a resource and workload managing software. bwUniCluster 3.0 has installed the workload managing software Slurm. Therefore any job submission by the user is to be executed by commands of the Slurm software. Slurm queues and runs user jobs based on fair sharing policies.  &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Slurm Commands (excerpt) ==&lt;br /&gt;
Some of the most used Slurm commands for non-administrators working on bwUniCluster 2.0.&lt;br /&gt;
{| width=750px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Slurm commands !! Brief explanation&lt;br /&gt;
|-&lt;br /&gt;
| [[#Job Submission : sbatch|sbatch]] || Submits a job and queues it in an input queue [[https://slurm.schedmd.com/sbatch.html sbatch]] &lt;br /&gt;
|-&lt;br /&gt;
| [[#Detailed job information : scontrol show job|scontrol show job]] || Displays detailed job state information [[https://slurm.schedmd.com/scontrol.html scontrol]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#List of your submitted jo/bs : squeue|squeue]] || Displays information about active, eligible, blocked, and/or recently completed jobs [[https://slurm.schedmd.com/squeue.html squeue]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Start time of job or resources : squeue|squeue --start]] || Returns start time of submitted job or requested resources [[https://slurm.schedmd.com/squeue.html squeue]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Shows free resources : sinfo_t_idle|sinfo_t_idle]] || Shows what resources are available for immediate use [[https://slurm.schedmd.com/sinfo.html sinfo]]&lt;br /&gt;
|-&lt;br /&gt;
| [[#Canceling own jobs : scancel|scancel]] || Cancels a job (obsoleted!) [[https://slurm.schedmd.com/scancel.html scancel]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* [https://slurm.schedmd.com/tutorials.html  Slurm Tutorials]&lt;br /&gt;
* [https://slurm.schedmd.com/pdfs/summary.pdf  Slurm command/option summary (2 pages)]&lt;br /&gt;
* [https://slurm.schedmd.com/man_index.html  Slurm Commands]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Job Submission : sbatch ==&lt;br /&gt;
Batch jobs are submitted by using the command &#039;&#039;&#039;sbatch&#039;&#039;&#039;. The main purpose of the &#039;&#039;&#039;sbatch&#039;&#039;&#039; command is to specify the resources that are needed to run the job. &#039;&#039;&#039;sbatch&#039;&#039;&#039; will then queue the batch job. However, starting of batch job depends on the availability of the requested resources and the fair sharing value.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=== sbatch Command Parameters ===&lt;br /&gt;
The syntax and use of &#039;&#039;&#039;sbatch&#039;&#039;&#039; can be displayed via:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ man sbatch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;sbatch&#039;&#039;&#039; options can be used from the command line or in your job script.&lt;br /&gt;
{| width=750px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | sbatch Options&lt;br /&gt;
|-&lt;br /&gt;
! Command line&lt;br /&gt;
! Script&lt;br /&gt;
! Purpose&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -t &#039;&#039;time&#039;&#039;  or  --time=&#039;&#039;time&#039;&#039;&lt;br /&gt;
| #SBATCH --time=&#039;&#039;time&#039;&#039;&lt;br /&gt;
| Wall clock time limit.&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -N &#039;&#039;count&#039;&#039;  or  --nodes=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --nodes=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of nodes to be used.&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -n &#039;&#039;count&#039;&#039;  or  --ntasks=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --ntasks=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of tasks to be launched.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --ntasks-per-node=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --ntasks-per-node=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Maximum count (&amp;lt;= 28 and &amp;lt;= 40 resp.) of tasks per node.&amp;lt;br&amp;gt;(Replaces the option ppn of MOAB.)&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -c &#039;&#039;count&#039;&#039; or --cpus-per-task=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| #SBATCH --cpus-per-task=&#039;&#039;count&#039;&#039;&lt;br /&gt;
| Number of CPUs required per (MPI-)task.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mem=&#039;&#039;value_in_MB&#039;&#039;&lt;br /&gt;
| #SBATCH --mem=&#039;&#039;value_in_MB&#039;&#039; &lt;br /&gt;
| Memory in MegaByte per node.&amp;lt;br&amp;gt;(Default value is 128000 and 96000 MB resp., i.e. you should omit &amp;lt;br&amp;gt; the setting of this option.)&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mem-per-cpu=&#039;&#039;value_in_MB&#039;&#039;&lt;br /&gt;
| #SBATCH --mem-per-cpu=&#039;&#039;value_in_MB&#039;&#039; &lt;br /&gt;
| Minimum Memory required per allocated CPU.&amp;lt;br&amp;gt;(Replaces the option pmem of MOAB. You should omit &amp;lt;br&amp;gt; the setting of this option.)&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mail-type=&#039;&#039;type&#039;&#039;&lt;br /&gt;
| #SBATCH --mail-type=&#039;&#039;type&#039;&#039;&lt;br /&gt;
| Notify user by email when certain event types occur.&amp;lt;br&amp;gt;Valid type values are NONE, BEGIN, END, FAIL, REQUEUE, ALL.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --mail-user=&#039;&#039;mail-address&#039;&#039;&lt;br /&gt;
| #SBATCH --mail-user=&#039;&#039;mail-address&#039;&#039;&lt;br /&gt;
|  The specified mail-address receives email notification of state&amp;lt;br&amp;gt;changes as defined by --mail-type.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --output=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --output=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| File in which job output is stored. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --error=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --error=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| File in which job error messages are stored. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -J &#039;&#039;name&#039;&#039; or --job-name=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| #SBATCH --job-name=&#039;&#039;name&#039;&#039;&lt;br /&gt;
| Job name.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --export=[ALL,] &#039;&#039;env-variables&#039;&#039;&lt;br /&gt;
| #SBATCH --export=[ALL,] &#039;&#039;env-variables&#039;&#039;&lt;br /&gt;
| Identifies which environment variables from the submission &amp;lt;br&amp;gt; environment are propagated to the launched application. Default &amp;lt;br&amp;gt; is ALL. If adding an environment variable to the submission&amp;lt;br&amp;gt; environment is intended, the argument ALL must be added.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -A &#039;&#039;group-name&#039;&#039; or --account=&#039;&#039;group-name&#039;&#039;&lt;br /&gt;
| #SBATCH --account=&#039;&#039;group-name&#039;&#039;&lt;br /&gt;
| Change resources used by this job to specified group. You may &amp;lt;br&amp;gt; need this option if your account is assigned to more &amp;lt;br&amp;gt; than one group. By command &amp;quot;scontrol show job&amp;quot; the project &amp;lt;br&amp;gt; group the job is accounted on can be seen behind &amp;quot;Account=&amp;quot;. &lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -p &#039;&#039;queue-name&#039;&#039; or --partition=&#039;&#039;queue-name&#039;&#039;&lt;br /&gt;
| #SBATCH --partition=&#039;&#039;queue-name&#039;&#039;&lt;br /&gt;
| Request a specific queue for the resource allocation.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| --reservation=&#039;&#039;reservation-name&#039;&#039;&lt;br /&gt;
| #SBATCH --reservation=&#039;&#039;reservation-name&#039;&#039;&lt;br /&gt;
| Use a specific reservation for the resource allocation.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -C &#039;&#039;LSDF&#039;&#039; or --constraint=&#039;&#039;LSDF&#039;&#039;&lt;br /&gt;
| #SBATCH --constraint=LSDF&lt;br /&gt;
| Job constraint LSDF Filesystems.&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -C &#039;&#039;BEEOND (BEEOND_4MDS, BEEOND_MAXMDS)&#039;&#039; or --constraint=&#039;&#039;BEEOND (BEEOND_4MDS, BEEOND_MAXMDS&#039;&#039;&lt;br /&gt;
| #SBATCH --constraint=BEEOND (BEEOND_4MDS, BEEOND_MAXMDS)&lt;br /&gt;
| Job constraint BeeOND file system.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== sbatch --partition  &#039;&#039;queues&#039;&#039; ====&lt;br /&gt;
Queue classes define maximum resources such as walltime, nodes and processes per node and queue of the compute system. Details can be found here:&lt;br /&gt;
* [[BwUniCluster3.0/Batch_Queues|bwUniCluster 3.0 queue settings]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== sbatch Examples ===&lt;br /&gt;
==== Serial Programs ====&lt;br /&gt;
To submit a serial job that runs the script &#039;&#039;&#039;job.sh&#039;&#039;&#039; and that requires 5000 MB of main memory and 10 minutes of wall clock time&lt;br /&gt;
&lt;br /&gt;
a) execute:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sbatch -p dev_cpu -n 1 -t 10:00 --mem=5000  job.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
or&lt;br /&gt;
b) add after the initial line of your script &#039;&#039;&#039;job.sh&#039;&#039;&#039; the lines (here with a high memory request):&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#SBATCH --ntasks=1&lt;br /&gt;
#SBATCH --time=10&lt;br /&gt;
#SBATCH --mem=180gb&lt;br /&gt;
#SBATCH --job-name=simple&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
and execute the modified script with the command line option &#039;&#039;--partition=highmem&#039;&#039;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sbatch --partition=highmem job.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note, that sbatch command line options overrule script options.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Multithreaded Programs ====&lt;br /&gt;
Multithreaded programs operate faster than serial programs on CPUs with multiple cores.&amp;lt;br&amp;gt;&lt;br /&gt;
Moreover, multiple threads of one process share resources such as memory.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
For multithreaded programs based on &#039;&#039;&#039;Open&#039;&#039;&#039; &#039;&#039;&#039;M&#039;&#039;&#039;ulti-&#039;&#039;&#039;P&#039;&#039;&#039;rocessing (OpenMP) a number of threads is defined by the environment variable OMP_NUM_THREADS. By default this variable is set to 1 (OMP_NUM_THREADS=1).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Hyperthreading is switched on on bwUniCluster 3.0, the option --threads-per-core must be set to 1, if you do not want to use it.&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
To submit a batch job called &#039;&#039;OpenMP_Test&#039;&#039; that runs a 96-fold threaded program &#039;&#039;omp_exe&#039;&#039; which requires 6000 MByte of total physical memory and total wall clock time of 40 minutes:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
a) execute:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sbatch -p cpu --export=ALL,OMP_NUM_THREADS=96 -J OpenMP_Test -N 1 -c 96 --threads-per-core=1 -t 40 --mem=6000 ./omp_exe&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
or&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
* generate the script &#039;&#039;&#039;job_omp.sh&#039;&#039;&#039; containing the following lines:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
#SBATCH --nodes=1&lt;br /&gt;
#SBATCH --cpus-per-task=96&lt;br /&gt;
#SBATCH --time=40:00&lt;br /&gt;
#SBATCH --threads-per-core=1&lt;br /&gt;
#SBATCH --mem=6000mb   &lt;br /&gt;
#SBATCH --export=ALL,EXECUTABLE=./omp_exe&lt;br /&gt;
#SBATCH -J OpenMP_Test&lt;br /&gt;
&lt;br /&gt;
#Usually you should set&lt;br /&gt;
export KMP_AFFINITY=compact,1,0&lt;br /&gt;
#export KMP_AFFINITY=verbose,compact,1,0 prints messages concerning the supported affinity&lt;br /&gt;
#KMP_AFFINITY Description: https://software.intel.com/en-us/node/524790#KMP_AFFINITY_ENVIRONMENT_VARIABLE&lt;br /&gt;
&lt;br /&gt;
export OMP_NUM_THREADS=${SLURM_JOB_CPUS_PER_NODE}&lt;br /&gt;
echo &amp;quot;Executable ${EXECUTABLE} running on ${SLURM_JOB_CPUS_PER_NODE} cores with ${OMP_NUM_THREADS} threads&amp;quot;&lt;br /&gt;
startexe=${EXECUTABLE}&lt;br /&gt;
echo $startexe&lt;br /&gt;
exec $startexe&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Using Intel compiler the environment variable KMP_AFFINITY switches on binding of threads to specific cores and, if necessary, replace &amp;lt;placeholder&amp;gt; with the required modulefile to enable the OpenMP environment and execute the script &#039;&#039;&#039;job_omp.sh&#039;&#039;&#039; adding the queue class &#039;&#039;cpu&#039;&#039; as sbatch option:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sbatch -p cpu job_omp.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note, that sbatch command line options overrule script options, e.g.,&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sbatch --partition=cpu --mem=200 job_omp.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
overwrites the script setting of 6000 MByte with 200 MByte.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== MPI Parallel Programs ====&lt;br /&gt;
MPI parallel programs run faster than serial programs on multi CPU and multi core systems. N-fold spawned processes of the MPI program, i.e., &#039;&#039;&#039;MPI tasks&#039;&#039;&#039;,  run simultaneously and communicate via the Message Passing Interface (MPI) paradigm. MPI tasks do not share memory but can be spawned over different nodes.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Multiple MPI tasks must be launched via &#039;&#039;&#039;mpirun&#039;&#039;&#039;, e.g. 4 MPI tasks of &#039;&#039;my_par_program&#039;&#039;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mpirun -n 4 my_par_program&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This command runs 4 MPI tasks of &#039;&#039;my_par_program&#039;&#039; on the node you are logged in.&lt;br /&gt;
To run this command with a loaded Intel MPI the environment variable I_MPI_HYDRA_BOOTSTRAP must be unset ( --&amp;gt; $ unset I_MPI_HYDRA_BOOTSTRAP).&lt;br /&gt;
&lt;br /&gt;
Running MPI parallel programs in a batch job the interactive environment - particularly the loaded modules - will also be set in the batch job. If you want to set a defined module environment in your batch job you have to purge all modules before setting the wished modules. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
===== OpenMPI =====&lt;br /&gt;
&lt;br /&gt;
If you want to run jobs on batch nodes, generate a wrapper script &#039;&#039;job_ompi.sh&#039;&#039; for &#039;&#039;&#039;OpenMPI&#039;&#039;&#039; containing the following lines:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
# Use when using the module environment for OpenMPI&lt;br /&gt;
module load compiler/&amp;lt;placeholder_for_compiler&amp;gt;/&amp;lt;placeholder_for_compiler_version&amp;gt;&lt;br /&gt;
module load mpi/openmpi/&amp;lt;placeholder_for_mpi_version&amp;gt;&lt;br /&gt;
mpirun --bind-to core --map-by core -report-bindings my_par_program&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Attention:&#039;&#039;&#039; Do &#039;&#039;&#039;NOT&#039;&#039;&#039; add mpirun options &#039;&#039;-n &amp;lt;number_of_processes&amp;gt;&#039;&#039; or any other option defining processes or nodes, since Slurm instructs mpirun about number of processes and node hostnames. Use &#039;&#039;&#039;ALWAYS&#039;&#039;&#039; the MPI options &#039;&#039;&#039;&#039;&#039;--bind-to core&#039;&#039;&#039;&#039;&#039; and &#039;&#039;&#039;&#039;&#039;--map-by core|socket|node&#039;&#039;&#039;&#039;&#039;. Please type &#039;&#039;mpirun --help&#039;&#039; for an explanation of the meaning of the different options of mpirun option &#039;&#039;--map-by&#039;&#039;.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Considering 4 OpenMPI tasks on a single node, each requiring 2000 MByte, and running for 1 hour, execute:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sbatch -p cpu -N 1 -n 4 --mem-per-cpu=2000 --time=01:00:00 ./job_ompi.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Intel MPI =====&lt;br /&gt;
&lt;br /&gt;
Generate a wrapper script for &#039;&#039;&#039;Intel MPI&#039;&#039;&#039;, &#039;&#039;job_impi.sh&#039;&#039; containing the following lines:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
# Use when a defined module environment related to Intel MPI is wished&lt;br /&gt;
module load compiler/&amp;lt;placeholder_for_compiler&amp;gt;/&amp;lt;placeholder_for_compiler_version&amp;gt;&lt;br /&gt;
module load mpi/impi/&amp;lt;placeholder_for_version&amp;gt;   &lt;br /&gt;
mpiexec.hydra -bootstrap slurm my_par_program&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;font color=red&amp;gt;&#039;&#039;&#039;Attention:&#039;&#039;&#039;&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Do &#039;&#039;&#039;NOT&#039;&#039;&#039; add mpirun options &#039;&#039;-n &amp;lt;number_of_processes&amp;gt;&#039;&#039; or any other option defining processes or nodes, since Slurm instructs mpirun about number of processes and node hostnames.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Launching and running 200 Intel MPI tasks on 5 nodes, each requiring 80 GByte, and running for 5 hours, execute:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sbatch --partition=cpu -N 5 --ntasks-per-node=40 --mem=80gb -t 300 ./job_impi.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
If you want to use 128 or more nodes, you must also set the environment variable as follows:           &amp;lt;BR&amp;gt;&lt;br /&gt;
export I_MPI_HYDRA_BRANCH_COUNT=-1&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
If you want to use the options perhost, ppn or rr, you must additionally set the environment variable I_MPI_JOB_RESPECT_PROCESS_PLACEMENT=off.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Multithreaded + MPI parallel Programs ====&lt;br /&gt;
Multithreaded + MPI parallel programs operate faster than serial programs on multi CPUs with multiple cores. All threads of one process share resources such as memory. On the contrary MPI tasks do not share memory but can be spawned over different nodes. &#039;&#039;&#039;Hyperthreading is switched on on bwUniCluster 3.0, the option --threads-per-core must be set to 1, if you do not want to use it.&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
===== OpenMPI with Multithreading =====&lt;br /&gt;
Multiple MPI tasks using &#039;&#039;&#039;OpenMPI&#039;&#039;&#039; must be launched by the MPI parallel program &#039;&#039;&#039;mpirun&#039;&#039;&#039;. For multithreaded programs based on &#039;&#039;&#039;Open&#039;&#039;&#039; &#039;&#039;&#039;M&#039;&#039;&#039;ulti-&#039;&#039;&#039;P&#039;&#039;&#039;rocessing (OpenMP) number of threads are defined by the environment variable OMP_NUM_THREADS. By default this variable is set to 1 (OMP_NUM_THREADS=1).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;For OpenMPI&#039;&#039;&#039; a job-script to submit a batch job called &#039;&#039;job_ompi_omp.sh&#039;&#039; that runs a MPI program with 4 tasks and a 28-fold threaded program &#039;&#039;ompi_omp_program&#039;&#039; requiring 3000 MByte of physical memory per thread (using 28 threads per MPI task you will get 28*3000 MByte = 84000 MByte per MPI task) and total wall clock time of 3 hours looks like:&lt;br /&gt;
&amp;lt;!--b)--&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
#SBATCH --ntasks=4&lt;br /&gt;
#SBATCH --cpus-per-task=28&lt;br /&gt;
#SBATCH --threads-per-core=1&lt;br /&gt;
#SBATCH --time=03:00:00&lt;br /&gt;
#SBATCH --mem=83gb    # 84000 MB = 84000/1024 GB = 82.1 GB&lt;br /&gt;
#SBATCH --export=ALL,MPI_MODULE=mpi/openmpi/3.1,EXECUTABLE=./ompi_omp_program&lt;br /&gt;
#SBATCH --output=&amp;quot;parprog_hybrid_%j.out&amp;quot;  &lt;br /&gt;
&lt;br /&gt;
# Use when a defined module environment related to OpenMPI is wished&lt;br /&gt;
module load ${MPI_MODULE}&lt;br /&gt;
export OMP_NUM_THREADS=${SLURM_CPUS_PER_TASK}&lt;br /&gt;
export MPIRUN_OPTIONS=&amp;quot;--bind-to core --map-by socket:PE=${OMP_NUM_THREADS} -report-bindings&amp;quot;&lt;br /&gt;
export NUM_CORES=${SLURM_NTASKS}*${OMP_NUM_THREADS}&lt;br /&gt;
echo &amp;quot;${EXECUTABLE} running on ${NUM_CORES} cores with ${SLURM_NTASKS} MPI-tasks and ${OMP_NUM_THREADS} threads&amp;quot;&lt;br /&gt;
startexe=&amp;quot;mpirun -n ${SLURM_NTASKS} ${MPIRUN_OPTIONS} ${EXECUTABLE}&amp;quot;&lt;br /&gt;
echo $startexe&lt;br /&gt;
exec $startexe&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Execute the script &#039;&#039;&#039;job_ompi_omp.sh&#039;&#039;&#039; by command sbatch:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sbatch -p cpu ./job_ompi_omp.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* With the mpirun option &#039;&#039;--bind-to core&#039;&#039; MPI tasks and OpenMP threads are bound to physical cores.&lt;br /&gt;
* With the option &#039;&#039;--map-by node:PE=&amp;lt;value&amp;gt;&#039;&#039; (neighbored) MPI tasks will be attached to different nodes and each MPI task is bound to the first core of a node. &amp;lt;value&amp;gt; must be set to ${OMP_NUM_THREADS}.&lt;br /&gt;
* The option &#039;&#039;-report-bindings&#039;&#039; shows the bindings between MPI tasks and physical cores.&lt;br /&gt;
* The mpirun-options &#039;&#039;&#039;--bind-to core&#039;&#039;&#039;, &#039;&#039;&#039;--map-by socket|...|node:PE=&amp;lt;value&amp;gt;&#039;&#039;&#039; should always be used when running a multithreaded MPI program.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Intel MPI with Multithreading =====&lt;br /&gt;
Multithreaded + MPI parallel programs operate faster than serial programs on multi CPUs with multiple cores. All threads of one process share resources such as memory. On the contrary MPI tasks do not share memory but can be spawned over different nodes.  &lt;br /&gt;
&lt;br /&gt;
Multiple Intel MPI tasks must be launched by the MPI parallel program &#039;&#039;&#039;mpiexec.hydra&#039;&#039;&#039;. For multithreaded programs based on &#039;&#039;&#039;Open&#039;&#039;&#039; &#039;&#039;&#039;M&#039;&#039;&#039;ulti-&#039;&#039;&#039;P&#039;&#039;&#039;rocessing (OpenMP) number of threads are defined by the environment variable OMP_NUM_THREADS. By default this variable is set to 1 (OMP_NUM_THREADS=1).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;For Intel MPI&#039;&#039;&#039; a job-script to submit a batch job called &#039;&#039;job_impi_omp.sh&#039;&#039; that runs a Intel MPI program with 10 tasks and a 96-fold threaded program &#039;&#039;impi_omp_program&#039;&#039; requiring 96000 MByte of total physical memory per task and total wall clock time of 1 hours looks like: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--b)--&amp;gt; &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
#SBATCH --ntasks=10&lt;br /&gt;
#SBATCH --cpus-per-task=96&lt;br /&gt;
#SBATCH --threads-per-core=1&lt;br /&gt;
#SBATCH --time=60&lt;br /&gt;
#SBATCH --mem=96000&lt;br /&gt;
#SBATCH --export=ALL,MPI_MODULE=mpi/impi,EXE=./impi_omp_program&lt;br /&gt;
#SBATCH --output=&amp;quot;parprog_impi_omp_%j.out&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#If using more than one MPI task per node please set&lt;br /&gt;
export KMP_AFFINITY=compact,1,0&lt;br /&gt;
#export KMP_AFFINITY=verbose,scatter  prints messages concerning the supported affinity &lt;br /&gt;
#KMP_AFFINITY Description: https://software.intel.com/en-us/node/524790#KMP_AFFINITY_ENVIRONMENT_VARIABLE&lt;br /&gt;
&lt;br /&gt;
# Use when a defined module environment related to Intel MPI is wished &lt;br /&gt;
module load ${MPI_MODULE}&lt;br /&gt;
export OMP_NUM_THREADS=${SLURM_CPUS_PER_TASK}&lt;br /&gt;
export MPIRUN_OPTIONS=&amp;quot;-binding &amp;quot;domain=omp:compact&amp;quot; -print-rank-map -envall&amp;quot;&lt;br /&gt;
export NUM_PROCS=eval(${SLURM_NTASKS}*${OMP_NUM_THREADS})&lt;br /&gt;
echo &amp;quot;${EXE} running on ${NUM_PROCS} cores with ${SLURM_NTASKS} MPI-tasks and ${OMP_NUM_THREADS} threads&amp;quot;&lt;br /&gt;
startexe=&amp;quot;mpiexec.hydra -bootstrap slurm ${MPIRUN_OPTIONS} -n ${SLURM_NTASKS} ${EXE}&amp;quot;&lt;br /&gt;
echo $startexe&lt;br /&gt;
exec $startexe&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Using Intel compiler the environment variable KMP_AFFINITY switches on binding of threads to specific cores. If you only run one MPI task per node please set KMP_AFFINITY=compact,1,0.&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
If you want to use 128 or more nodes, you must also set the environment variable as follows:           &amp;lt;BR&amp;gt;&lt;br /&gt;
export I_MPI_HYDRA_BRANCH_COUNT=-1&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
If you want to use the options perhost, ppn or rr, you must additionally set the environment variable I_MPI_JOB_RESPECT_PROCESS_PLACEMENT=off. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Execute the script &#039;&#039;&#039;job_impi_omp.sh&#039;&#039;&#039; by command sbatch:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sbatch -p cpu ./job_impi_omp.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The mpirun option &#039;&#039;-print-rank-map&#039;&#039; shows the bindings between MPI tasks and nodes (not very beneficial). The option &#039;&#039;-binding&#039;&#039; binds MPI tasks (processes) to a particular processor; &#039;&#039;domain=omp&#039;&#039; means that the domain size is determined by the number of threads. If you would choose 2 MPI tasks per node, you should choose &#039;&#039;-binding &amp;quot;cell=unit;map=bunch&amp;quot;&#039;&#039;; this binding maps one MPI process to each socket. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Chain jobs ====&lt;br /&gt;
The CPU time requirements of many applications exceed the limits of the job classes. In those situations it is recommended to solve the problem by a job chain. A job chain is a sequence of jobs where each job automatically starts its successor. &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
####################################&lt;br /&gt;
## simple Slurm submitter script to setup   ## &lt;br /&gt;
## a chain of jobs using Slurm                    ##&lt;br /&gt;
####################################&lt;br /&gt;
## ver.  : 2018-11-27, KIT, SCC&lt;br /&gt;
&lt;br /&gt;
## Define maximum number of jobs via positional parameter 1, default is 5&lt;br /&gt;
max_nojob=${1:-5}&lt;br /&gt;
&lt;br /&gt;
## Define your jobscript (e.g. &amp;quot;~/chain_job.sh&amp;quot;)&lt;br /&gt;
chain_link_job=${PWD}/chain_job.sh&lt;br /&gt;
&lt;br /&gt;
## Define type of dependency via positional parameter 2, default is &#039;afterok&#039;&lt;br /&gt;
dep_type=&amp;quot;${2:-afterok}&amp;quot;&lt;br /&gt;
## -&amp;gt; List of all dependencies:&lt;br /&gt;
## https://slurm.schedmd.com/sbatch.html&lt;br /&gt;
&lt;br /&gt;
myloop_counter=1&lt;br /&gt;
## Submit loop&lt;br /&gt;
while [ ${myloop_counter} -le ${max_nojob} ] ; do&lt;br /&gt;
   ##&lt;br /&gt;
   ## Differ slurm_opt depending on chain link number&lt;br /&gt;
   if [ ${myloop_counter} -eq 1 ] ; then&lt;br /&gt;
      slurm_opt=&amp;quot;&amp;quot;&lt;br /&gt;
   else&lt;br /&gt;
      slurm_opt=&amp;quot;-d ${dep_type}:${jobID}&amp;quot;&lt;br /&gt;
   fi&lt;br /&gt;
   ##&lt;br /&gt;
   ## Print current iteration number and sbatch command&lt;br /&gt;
   echo &amp;quot;Chain job iteration = ${myloop_counter}&amp;quot;&lt;br /&gt;
   echo &amp;quot;   sbatch --export=myloop_counter=${myloop_counter} ${slurm_opt} ${chain_link_job}&amp;quot;&lt;br /&gt;
   ## Store job ID for next iteration by storing output of sbatch command with empty lines&lt;br /&gt;
   jobID=$(sbatch -p &amp;lt;queue&amp;gt; --export=ALL,myloop_counter=${myloop_counter} ${slurm_opt} ${chain_link_job} 2&amp;gt;&amp;amp;1 | sed &#039;s/[S,a-z]* //g&#039;)&lt;br /&gt;
   ##   &lt;br /&gt;
   ## Check if ERROR occured&lt;br /&gt;
   if [[ &amp;quot;${jobID}&amp;quot; =~ &amp;quot;ERROR&amp;quot; ]] ; then&lt;br /&gt;
      echo &amp;quot;   -&amp;gt; submission failed!&amp;quot; ; exit 1&lt;br /&gt;
   else&lt;br /&gt;
      echo &amp;quot;   -&amp;gt; job number = ${jobID}&amp;quot;&lt;br /&gt;
   fi&lt;br /&gt;
   ##&lt;br /&gt;
   ## Increase counter&lt;br /&gt;
   let myloop_counter+=1&lt;br /&gt;
done&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== GPU jobs ====&lt;br /&gt;
&lt;br /&gt;
The nodes in the gpu_h100, gpu_mi300, gpu_a100_il and gpu_h100_il  queues have 4 NVIDIA Ampere A100 GPUs or 4 NVIDIA Hopper H100 GPUs. Just submitting a job to these queues is not enough to also allocate one or more GPUs, you have to do so using the &amp;quot;--gres=gpu&amp;quot; parameter. You have to specifiy how many GPUs your job needs, e.g. &amp;quot;--gres=gpu:2&amp;quot; will request two GPUs.&lt;br /&gt;
&lt;br /&gt;
The GPU nodes are shared between multiple jobs if the jobs don&#039;t request all the GPUs in a node and there are enough resources to run more than one job. The individual GPUs are always bound to a single job and will not be shared between different jobs.&lt;br /&gt;
&lt;br /&gt;
a) add after the initial line of your script job.sh the line including the&lt;br /&gt;
information about the GPU usage:&amp;lt;br&amp;gt;   #SBATCH --gres=gpu:2&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
#SBATCH --ntasks=40&lt;br /&gt;
#SBATCH --time=02:00:00&lt;br /&gt;
#SBATCH --mem=4000&lt;br /&gt;
#SBATCH --gres=gpu:2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or b) execute:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sbatch -p &amp;lt;queue&amp;gt; -n 40 -t 02:00:00 --mem 4000 --gres=gpu:2 job.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
If you start an interactive session on of the GPU nodes, you can use the &amp;quot;nvidia-smi&amp;quot; command to list the GPUs allocated to your job:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ nvidia-smi&lt;br /&gt;
Fri Apr  4 09:51:29 2025       &lt;br /&gt;
+-----------------------------------------------------------------------------------------+&lt;br /&gt;
| NVIDIA-SMI 570.86.15              Driver Version: 570.86.15      CUDA Version: 12.8     |&lt;br /&gt;
|-----------------------------------------+------------------------+----------------------+&lt;br /&gt;
| GPU  Name                 Persistence-M | Bus-Id          Disp.A | Volatile Uncorr. ECC |&lt;br /&gt;
| Fan  Temp   Perf          Pwr:Usage/Cap |           Memory-Usage | GPU-Util  Compute M. |&lt;br /&gt;
|                                         |                        |               MIG M. |&lt;br /&gt;
|=========================================+========================+======================|&lt;br /&gt;
|   0  NVIDIA H100                    On  |   00000000:06:00.0 Off |                    0 |&lt;br /&gt;
| N/A   45C    P0             70W /  415W |      27MiB /  95830MiB |      0%      Default |&lt;br /&gt;
|                                         |                        |             Disabled |&lt;br /&gt;
+-----------------------------------------+------------------------+----------------------+&lt;br /&gt;
|   1  NVIDIA H100                    On  |   00000000:26:00.0 Off |                    0 |&lt;br /&gt;
| N/A   45C    P0             69W /  415W |      27MiB /  95830MiB |      0%      Default |&lt;br /&gt;
|                                         |                        |             Disabled |&lt;br /&gt;
+-----------------------------------------+------------------------+----------------------+&lt;br /&gt;
                                                                                         &lt;br /&gt;
+-----------------------------------------------------------------------------------------+&lt;br /&gt;
| Processes:                                                                              |&lt;br /&gt;
|  GPU   GI   CI              PID   Type   Process name                        GPU Memory |&lt;br /&gt;
|        ID   ID                                                               Usage      |&lt;br /&gt;
|=========================================================================================|&lt;br /&gt;
|    0   N/A  N/A            3569      G   /usr/libexec/Xorg                        17MiB |&lt;br /&gt;
|    1   N/A  N/A            3569      G   /usr/libexec/Xorg                        17MiB |&lt;br /&gt;
+-----------------------------------------------------------------------------------------+&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
In case of using Open MPI, the underlying communication infrastructure (UCX and Open MPI&#039;s BTL) is CUDA-aware.&lt;br /&gt;
Please run Open MPI&#039;s mpirun using the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mpirun --mca pml ucx --mca btl_openib_warn_default_gid_prefix 0 -np 2 ./mpi_cuda_app&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
or disabling the (older) communication layer Bit-Transfer-Layer (short BTL) alltogether:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mpirun --mca pml ucx --mca btl ^openib -np 2 ./mpi_cuda_app&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== LSDF Online Storage ====&lt;br /&gt;
On bwUniCluster 3.0 you can use for special cases the LSDF Online Storage on the HPC cluster nodes. Please request for this service separately ([https://www.lsdf.kit.edu/os/storagerequest/: LSDF Storage Request]).&lt;br /&gt;
To mount the LSDF Online Storage on the compute nodes during the job runtime the&lt;br /&gt;
the constraint flag &amp;quot;LSDF&amp;quot; has to be set.  &lt;br /&gt;
&lt;br /&gt;
a) add after the initial line of your script job.sh the line including the&lt;br /&gt;
information about the LSDF Online Storage usage:&amp;lt;br&amp;gt;   #SBATCH --constraint=LSDF&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
#SBATCH --ntasks=1&lt;br /&gt;
#SBATCH --time=120&lt;br /&gt;
#SBATCH --mem=200&lt;br /&gt;
#SBATCH --constraint=LSDF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or b) execute:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sbatch -p &amp;lt;queue&amp;gt; -n 1 -t 2:00:00 --mem 200 job.sh -C LSDF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
For the usage of the LSDF Online Storage&lt;br /&gt;
the following environment variables are available: $LSDF, $LSDFPROJECTS, $LSDFHOME.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====BeeOND (BeeGFS On-Demand)====&lt;br /&gt;
&lt;br /&gt;
BeeOND instances are integrated into the prolog and epilog script of the cluster batch system Slurm. It can be used on the exclusive compute nodes during the job runtime with the constraint flag &amp;quot;BEEOND&amp;quot;, &amp;quot;BEEOND_4MDS&amp;quot; or &amp;quot;BEEOND_MAXMDS&amp;quot; ([[BwUniCluster_2.0_Slurm_common_Features#sbatch_Command_Parameters|Slurm Command Parameters]])&lt;br /&gt;
* BEEOND: one metadata server is started on the first node&lt;br /&gt;
* BEEOND_4MDS: 4 metadata servers are started within your job. If you have less than 4 nodes less metadata servers are started.&lt;br /&gt;
* BEEOND_MAXMDS: on every node of your job a metadata server for the on_demand file system is started&lt;br /&gt;
&lt;br /&gt;
As starting point we recommend using the &amp;quot;BEEOND&amp;quot; option. If you are unsure if this is sufficient for you feel free to contact the support team.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
#SBATCH ...&lt;br /&gt;
#SBATCH --constraint=BEEOND   # or BEEOND_4MDS or BEEOND_MAXMDS&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After your job has started you can find the private on-demand file system in &#039;&#039;&#039;/mnt/odfs/${SLURM_JOB_ID}&#039;&#039;&#039; directory. The mountpoint comes with five pre-configured directories:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# For small files (stripe count = 1)&lt;br /&gt;
/mnt/odfs/${SLURM_JOB_ID}/stripe_1&lt;br /&gt;
# Stripe count = 4&lt;br /&gt;
/mnt/odfs/${SLURM_JOB_ID}/stripe_default &lt;br /&gt;
# or &lt;br /&gt;
/mnt/odfs/${SLURM_JOB_ID}/stripe_4&lt;br /&gt;
# Stripe count = 8, 16 or 32, use this directories for medium sized and large files or when using MPI-IO&lt;br /&gt;
/mnt/odfs/${SLURM_JOB_ID}/stripe_8&lt;br /&gt;
/mnt/odfs/${SLURM_JOB_ID}/stripe_16 &lt;br /&gt;
# or &lt;br /&gt;
/mnt/odfs/${SLURM_JOB_ID}/stripe_32&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you request less nodes than stripe count, the stripe count will be the number of nodes. For example, if you only request 8 nodes the directory stripe_16 has only a stripe count 8.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;font color=red&amp;gt;&#039;&#039;&#039;Attention:&#039;&#039;&#039;&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
:Be careful when creating large files: use always the directory with the max stripe count for large files.&lt;br /&gt;
:If you create large files use a higher stripe count. For example, if your largest file is 1.1 Tb, then you have to use a stripe count larger than 2, &lt;br /&gt;
:otherwise the used disk space is exceeded.  &lt;br /&gt;
&lt;br /&gt;
The capacity of the private file system depends on the number of nodes. For each node you get 750 Gbyte.&lt;br /&gt;
If you request 100 nodes for your job, the private file system is 100 * 750 Gbyte ~ 75 Tbyte (approx) capacity.&lt;br /&gt;
&lt;br /&gt;
== Start time of job or resources : squeue --start ==&lt;br /&gt;
The command can be used by any user to displays the estimated start time of a job based a number of analysis types based on historical usage, earliest available reservable resources, and priority based backlog. The command squeue is explained in detail on the webpage https://slurm.schedmd.com/squeue.html or via manpage (man squeue). &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=== Access ===&lt;br /&gt;
By default, this command can be run by &#039;&#039;&#039;any user&#039;&#039;&#039;. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== List of your submitted jobs : squeue ==&lt;br /&gt;
Displays information about YOUR active, pending and/or recently completed jobs. The command displays all own active and pending jobs. The command squeue is explained in detail on the webpage https://slurm.schedmd.com/squeue.html or via manpage (man squeue).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=== Access ===&lt;br /&gt;
By default, this command can be run by any user.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Flags ===&lt;br /&gt;
{| width=750px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Flag !! Description&lt;br /&gt;
|-&lt;br /&gt;
| -l, --long&lt;br /&gt;
| Report more of the available information for the selected jobs or job steps, subject to any constraints specified.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
&#039;&#039;squeue&#039;&#039; example on bwUniCluster 2.0 &amp;lt;small&amp;gt;(Only your own jobs are displayed!)&amp;lt;/small&amp;gt;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ squeue &lt;br /&gt;
             JOBID PARTITION     NAME     USER ST       TIME  NODES NODELIST(REASON)&lt;br /&gt;
              1262       cpu     wrap ka_ab123  R       8:15      1 uc3n002&lt;br /&gt;
              1267 dev_gpu_h     wrap ka_ab123 PD       0:00      1 (Resources)&lt;br /&gt;
              1265   highmem     wrap ka_ab123  R       2:41      1 uc3n084&lt;br /&gt;
$ squeue -l&lt;br /&gt;
             JOBID PARTITION     NAME     USER    STATE       TIME TIME_LIMI  NODES NODELIST(REASON)&lt;br /&gt;
              1262       cpu     wrap ka_ab123  RUNNING       8:55     20:00      1 uc3n002&lt;br /&gt;
              1267 dev_gpu_h     wrap ka_ab123  PENDING       0:00     20:00      1 (Resources)&lt;br /&gt;
              1265   highmem     wrap ka_ab123  RUNNING       3:21     20:00      1 uc3n084&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* The output of &#039;&#039;squeue&#039;&#039; shows how many jobs of yours are running or pending and how many nodes are in use by your jobs.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Shows free resources : sinfo_t_idle ==&lt;br /&gt;
The Slurm command sinfo is used to view partition and node information for a system running Slurm. It incorporates down time, reservations, and node state information in determining the available backfill window. The sinfo command can only be used by the administrator.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
SCC has prepared a special script (sinfo_t_idle) to find out how many processors are available for immediate use on the system. It is anticipated that users will use this information to submit jobs that meet these criteria and thus obtain quick job turnaround times. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=== Access ===&lt;br /&gt;
By default, this command can be used by any user or administrator. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=== Example ===&lt;br /&gt;
* The following command displays what resources are available for immediate use for the whole partition.&lt;br /&gt;
&amp;lt;pre&amp;gt;$ sinfo_t_idle&lt;br /&gt;
Partition dev_cpu                 :      2 nodes idle&lt;br /&gt;
Partition cpu                     :     68 nodes idle&lt;br /&gt;
Partition highmem                 :      4 nodes idle&lt;br /&gt;
Partition dev_gpu_h100            :      0 nodes idle&lt;br /&gt;
Partition gpu_h100                :     11 nodes idle&lt;br /&gt;
Partition gpu_mi300               :      1 nodes idle&lt;br /&gt;
Partition dev_cpu_il              :      0 nodes idle&lt;br /&gt;
Partition cpu_il                  :      0 nodes idle&lt;br /&gt;
Partition dev_gpu_a100_il         :      0 nodes idle&lt;br /&gt;
Partition gpu_a100_il             :      0 nodes idle&lt;br /&gt;
Partition gpu_h100_il             :      0 nodes idle&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* For the above example jobs in all partitions can be run immediately.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Detailed job information : scontrol show job ==&lt;br /&gt;
scontrol show job displays detailed job state information and diagnostic output for all or a specified job of yours. Detailed information is available for active, pending and recently completed jobs. The command scontrol is explained in detail on the webpage https://slurm.schedmd.com/scontrol.html or via manpage (man scontrol). &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Display the state of all your jobs in normal mode: scontrol show job&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Display the state of a job with &amp;lt;jobid&amp;gt; in normal mode: scontrol show job &amp;lt;jobid&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=== Access ===&lt;br /&gt;
* End users can use scontrol show job to view the status of their &#039;&#039;&#039;own jobs&#039;&#039;&#039; only. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Arguments ===&lt;br /&gt;
{| width=750px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Option !! Default !! Description !! Example&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;width:12%;&amp;quot; &lt;br /&gt;
| -d&lt;br /&gt;
| (n/a)&lt;br /&gt;
| Detailed mode&lt;br /&gt;
| Example: Display the state with jobid 18089884 in detailed mode. &amp;lt;br&amp;gt; &amp;lt;pre&amp;gt;scontrol -d show job 18089884&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Scontrol show job Example ===&lt;br /&gt;
Here is an example from bwUniCluster 3.0.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
squeue    # show my own jobs (here the userid is replaced!)&lt;br /&gt;
             JOBID PARTITION     NAME     USER ST       TIME  NODES NODELIST(REASON)&lt;br /&gt;
              1262       cpu     wrap ka_zs040  R       1:12      1 uc3n002&lt;br /&gt;
&lt;br /&gt;
$&lt;br /&gt;
$ # now, see what&#039;s up with my pending job with jobid 18089884&lt;br /&gt;
$ &lt;br /&gt;
$ scontrol show job 1262&lt;br /&gt;
&lt;br /&gt;
JobId=1262 JobName=wrap&lt;br /&gt;
   UserId=ka_zs0402(241992) GroupId=ka_scc(12345) MCS_label=N/A&lt;br /&gt;
   Priority=4246 Nice=0 Account=ka QOS=normal&lt;br /&gt;
   JobState=RUNNING Reason=None Dependency=(null)&lt;br /&gt;
   Requeue=1 Restarts=0 BatchFlag=1 Reboot=0 ExitCode=0:0&lt;br /&gt;
   RunTime=00:00:37 TimeLimit=00:20:00 TimeMin=N/A&lt;br /&gt;
   SubmitTime=2025-04-04T10:01:30 EligibleTime=2025-04-04T10:01:30&lt;br /&gt;
   AccrueTime=2025-04-04T10:01:30&lt;br /&gt;
   StartTime=2025-04-04T10:01:31 EndTime=2025-04-04T10:21:31 Deadline=N/A&lt;br /&gt;
   SuspendTime=None SecsPreSuspend=0 LastSchedEval=2025-04-04T10:01:31 Scheduler=Main&lt;br /&gt;
   Partition=cpu AllocNode:Sid=uc3n999:2819841&lt;br /&gt;
   ReqNodeList=(null) ExcNodeList=(null)&lt;br /&gt;
   NodeList=uc3n002&lt;br /&gt;
   BatchHost=uc3n002&lt;br /&gt;
   NumNodes=1 NumCPUs=2 NumTasks=1 CPUs/Task=1 ReqB:S:C:T=0:0:*:*&lt;br /&gt;
   ReqTRES=cpu=1,mem=2000M,node=1,billing=1&lt;br /&gt;
   AllocTRES=cpu=2,mem=4000M,node=1,billing=2&lt;br /&gt;
   Socks/Node=* NtasksPerN:B:S:C=0:0:*:1 CoreSpec=*&lt;br /&gt;
   MinCPUsNode=1 MinMemoryCPU=2000M MinTmpDiskNode=0&lt;br /&gt;
   Features=(null) DelayBoot=00:00:00&lt;br /&gt;
   OverSubscribe=OK Contiguous=0 Licenses=(null) Network=(null)&lt;br /&gt;
   Command=(null)&lt;br /&gt;
   WorkDir=/pfs/data6/home/ka/ka_scc/ka_zs0402&lt;br /&gt;
   StdErr=/pfs/data6/home/ka/ka_scc/ka_zs0402/slurm-1262.out&lt;br /&gt;
   StdIn=/dev/null&lt;br /&gt;
   StdOut=/pfs/data6/home/ka/ka_scc/ka_zs0402/slurm-1262.out&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
You can use standard Linux pipe commands to filter the very detailed scontrol show job output.&lt;br /&gt;
* In which state the job is?&lt;br /&gt;
&amp;lt;pre&amp;gt;$ scontrol show job 1262 | grep -i State&lt;br /&gt;
   JobState=RUNNING Reason=None Dependency=(null)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Cancel Slurm Jobs ==&lt;br /&gt;
The scancel command is used to cancel jobs. The command scancel is explained in detail on the webpage https://slurm.schedmd.com/scancel.html or via manpage (man scancel).   &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=== Canceling own jobs : scancel ===&lt;br /&gt;
scancel is used to signal or cancel jobs, job arrays or job steps. The command is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ scancel [-i] &amp;lt;job-id&amp;gt;&lt;br /&gt;
$ scancel -t &amp;lt;job_state_name&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Flag !! Default !! Description !! Example&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| -i, --interactive&lt;br /&gt;
| (n/a)&lt;br /&gt;
| Interactive mode.&lt;br /&gt;
| Cancel the job 987654 interactively. &amp;lt;br&amp;gt; &amp;lt;pre&amp;gt; scancel -i 987654 &amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| -t, --state&lt;br /&gt;
| (n/a)&lt;br /&gt;
| Restrict the scancel operation to jobs in a certain state. &amp;lt;br&amp;gt; &amp;quot;job_state_name&amp;quot; may have a value of either &amp;quot;PENDING&amp;quot;, &amp;quot;RUNNING&amp;quot; or &amp;quot;SUSPENDED&amp;quot;.&lt;br /&gt;
| Cancel all jobs in state &amp;quot;PENDING&amp;quot;. &amp;lt;br&amp;gt; &amp;lt;pre&amp;gt; scancel -t &amp;quot;PENDING&amp;quot; &amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Resource Managers =&lt;br /&gt;
=== Batch Job (Slurm) Variables ===&lt;br /&gt;
The following environment variables of Slurm are added to your environment once your job has started&lt;br /&gt;
&amp;lt;small&amp;gt;(only an excerpt of the most important ones)&amp;lt;/small&amp;gt;.&lt;br /&gt;
{| width=750px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Environment !! Brief explanation&lt;br /&gt;
|- &lt;br /&gt;
| SLURM_JOB_CPUS_PER_NODE &lt;br /&gt;
| Number of processes per node dedicated to the job&lt;br /&gt;
|- &lt;br /&gt;
| SLURM_JOB_NODELIST &lt;br /&gt;
| List of nodes dedicated to the job&lt;br /&gt;
|- &lt;br /&gt;
| SLURM_JOB_NUM_NODES &lt;br /&gt;
| Number of nodes dedicated to the job&lt;br /&gt;
|- &lt;br /&gt;
| SLURM_MEM_PER_NODE &lt;br /&gt;
| Memory per node dedicated to the job &lt;br /&gt;
|- &lt;br /&gt;
| SLURM_NPROCS&lt;br /&gt;
| Total number of processes dedicated to the job &lt;br /&gt;
|-&lt;br /&gt;
| SLURM_CLUSTER_NAME&lt;br /&gt;
| Name of the cluster executing the job&lt;br /&gt;
|-&lt;br /&gt;
| SLURM_CPUS_PER_TASK &lt;br /&gt;
| Number of CPUs requested per task&lt;br /&gt;
|-&lt;br /&gt;
| SLURM_JOB_ACCOUNT&lt;br /&gt;
| Account name &lt;br /&gt;
|-&lt;br /&gt;
| SLURM_JOB_ID&lt;br /&gt;
| Job ID&lt;br /&gt;
|-&lt;br /&gt;
| SLURM_JOB_NAME&lt;br /&gt;
| Job Name&lt;br /&gt;
|-&lt;br /&gt;
| SLURM_JOB_PARTITION&lt;br /&gt;
| Partition/queue running the job&lt;br /&gt;
|-&lt;br /&gt;
| SLURM_JOB_UID&lt;br /&gt;
| User ID of the job&#039;s owner&lt;br /&gt;
|-&lt;br /&gt;
| SLURM_SUBMIT_DIR&lt;br /&gt;
| Job submit folder.  The directory from which sbatch was invoked. &lt;br /&gt;
|-&lt;br /&gt;
| SLURM_JOB_USER&lt;br /&gt;
| User name of the job&#039;s owner&lt;br /&gt;
|-&lt;br /&gt;
| SLURM_RESTART_COUNT&lt;br /&gt;
| Number of times job has restarted&lt;br /&gt;
|-&lt;br /&gt;
| SLURM_PROCID&lt;br /&gt;
| Task ID (MPI rank)&lt;br /&gt;
|-&lt;br /&gt;
| SLURM_NTASKS&lt;br /&gt;
| The total number of tasks available for the job&lt;br /&gt;
|-&lt;br /&gt;
| SLURM_STEP_ID&lt;br /&gt;
| Job step ID&lt;br /&gt;
|-&lt;br /&gt;
| SLURM_STEP_NUM_TASKS&lt;br /&gt;
| Task count (number of MPI ranks)&lt;br /&gt;
|-&lt;br /&gt;
| SLURM_JOB_CONSTRAINT&lt;br /&gt;
| Job constraints&lt;br /&gt;
|}&lt;br /&gt;
See also:&lt;br /&gt;
* [https://slurm.schedmd.com/sbatch.html#SECTION_INPUT-ENVIRONMENT-VARIABLES Slurm input and output environment variables]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Job Exit Codes ===&lt;br /&gt;
A job&#039;s exit code (also known as exit status, return code and completion code) is captured by SLURM and saved as part of the job record. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Any non-zero exit code will be assumed to be a job failure and will result in a Job State of FAILED with a reason of &amp;quot;NonZeroExitCode&amp;quot;.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The exit code is an 8 bit unsigned number ranging between 0 and 255. While it is possible for a job to return a negative exit code, SLURM will display it as an unsigned value in the 0 - 255 range.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
==== Displaying Exit Codes and Signals ====&lt;br /&gt;
SLURM displays a job&#039;s exit code in the output of the &#039;&#039;&#039;scontrol show job&#039;&#039;&#039; and the sview utility.&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
When a signal was responsible for a job or step&#039;s termination, the signal number will be displayed after the exit code, delineated by a colon(:).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
==== Submitting Termination Signal ====&lt;br /&gt;
Here is an example, how to &#039;save&#039; a Slurm termination signal in a typical jobscript.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
[...]&lt;br /&gt;
exit_code=$?&lt;br /&gt;
mpirun  -np &amp;lt;#cores&amp;gt;  &amp;lt;EXE_BIN_DIR&amp;gt;/&amp;lt;executable&amp;gt; ... (options)  2&amp;gt;&amp;amp;1&lt;br /&gt;
[ &amp;quot;$exit_code&amp;quot; -eq 0 ] &amp;amp;&amp;amp; echo &amp;quot;all clean...&amp;quot; || \&lt;br /&gt;
   echo &amp;quot;Executable &amp;lt;EXE_BIN_DIR&amp;gt;/&amp;lt;executable&amp;gt; finished with exit code ${$exit_code}&amp;quot;&lt;br /&gt;
[...]&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
* Do not use &#039;&#039;&#039;&#039;time&#039;&#039;&#039;&#039; mpirun! The exit code will be the one submitted by the first (time) program.&lt;br /&gt;
* You do not need an &#039;&#039;&#039;exit $exit_code&#039;&#039;&#039; in the scripts.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
[[#top|Back to top]]&lt;/div&gt;</summary>
		<author><name>P Schuhmacher</name></author>
	</entry>
</feed>