<?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=H+Weber</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=H+Weber"/>
	<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/e/Special:Contributions/H_Weber"/>
	<updated>2026-06-01T14:47:29Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.17</generator>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster3.0/Hardware_and_Architecture/Filesystem_Details&amp;diff=15443</id>
		<title>BwUniCluster3.0/Hardware and Architecture/Filesystem Details</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster3.0/Hardware_and_Architecture/Filesystem_Details&amp;diff=15443"/>
		<updated>2025-11-20T08:37:02Z</updated>

		<summary type="html">&lt;p&gt;H Weber: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= File System Details =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 3.0 the parallel file system Lustre is used for most globally visible user data. Lustre is open source and Lustre solutions and support are available from different vendors. Nowadays, most of the biggest HPC systems are using Lustre. An initial home directory on a Lustre file system is created automatically after account activation, and the environment variable $HOME holds its name. Users can create so-called workspaces on another Lustre file system for non-permanent data with temporary lifetime. There is another workspace file system based on flash storage for special requirements available.&lt;br /&gt;
&lt;br /&gt;
Within a batch job further file systems are available: &lt;br /&gt;
* The directory $TMPDIR is only available and visible on the local node. It is located on fast SSD storage devices.&lt;br /&gt;
* On request a parallel on-demand file system (BeeOND) is created which uses the SSDs of the nodes which were allocated to the batch job.&lt;br /&gt;
* On request the external LSDF Online Storage is mounted on the nodes which were allocated to the batch job. This file system is based on the parallel file system IBM Storage Scale. &lt;br /&gt;
&lt;br /&gt;
Some of the characteristics of the file systems are shown in the following table.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
! scope=&amp;quot;column&amp;quot; style=&amp;quot;width:9%&amp;quot;| Property&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| $TMPDIR&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| BeeOND&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| $HOME&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Workspace&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Workspace &amp;lt;br&amp;gt; on flash&lt;br /&gt;
|- &lt;br /&gt;
! scope=&amp;quot;column&amp;quot; style=&amp;quot;height=20px; padding:3px&amp;quot;| Visibility &lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| local node&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| nodes of batch job&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| global&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| global&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| global&lt;br /&gt;
|- &lt;br /&gt;
! scope=&amp;quot;column&amp;quot; style=&amp;quot;height=20px; padding:3px&amp;quot;| Lifetime &lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| batch job runtime&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| batch job runtime&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| permanent&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| max. 240 days&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| max. 240 days&lt;br /&gt;
|- &lt;br /&gt;
! scope=&amp;quot;column&amp;quot; style=&amp;quot;height=20px; padding:3px&amp;quot;| Disk space &lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 960 GB - 6.4 TB &amp;lt;br&amp;gt; details see table 1&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| n*750 GB&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 1.1 PiB&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 4.6 PiB&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 236 TiB&lt;br /&gt;
|- &lt;br /&gt;
! scope=&amp;quot;column&amp;quot; style=&amp;quot;height=20px; padding:3px&amp;quot;| Capacity Quotas&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| no&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| no&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| yes &amp;lt;br&amp;gt; 500 GiB per user, for &amp;lt;br&amp;gt; MA users 250 GiB &amp;lt;br&amp;gt; also per organization&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| yes &amp;lt;br&amp;gt; 40 TiB per user&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| yes &amp;lt;br&amp;gt; 1 TiB per user&lt;br /&gt;
|- &lt;br /&gt;
! scope=&amp;quot;column&amp;quot; style=&amp;quot;height=20px; padding:3px&amp;quot;| Inode Quotas&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| no&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| no&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| yes &amp;lt;br&amp;gt; 5 million per user &amp;lt;br&amp;gt; for MA users 2.5 million&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| yes &amp;lt;br&amp;gt; 20 million per user&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| yes &amp;lt;br&amp;gt; 5 million per user&lt;br /&gt;
|- &lt;br /&gt;
! scope=&amp;quot;column&amp;quot; style=&amp;quot;height=20px; padding:3px&amp;quot;| Backup&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| no&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| no&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| yes&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| no&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| no&lt;br /&gt;
|- &lt;br /&gt;
! scope=&amp;quot;column&amp;quot; style=&amp;quot;height=20px; padding:3px&amp;quot;| Read perf./node&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 500 MB/s - 6 GB/s &amp;lt;br&amp;gt; depends on type of local SSD / job queue&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 400 MB/s - 500 MB/s&amp;lt;br&amp;gt; depends on type of local SSDs / job queue&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 5 GB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 5 GB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 1 GB/s&lt;br /&gt;
|- &lt;br /&gt;
! scope=&amp;quot;column&amp;quot; style=&amp;quot;height=20px; padding:3px&amp;quot;| Write perf./node&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 500 MB/s - 4 GB/s &amp;lt;br&amp;gt; depends on type of local SSD / job queue&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 250 MB/s - 350 MB/s &amp;lt;br&amp;gt; depends on type of local SSDs / job queue&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 5 GB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 5 GB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 1 GB/s&lt;br /&gt;
|- &lt;br /&gt;
! scope=&amp;quot;column&amp;quot; style=&amp;quot;height=20px;padding:3px&amp;quot;| Total read perf.&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| n*500-6000 MB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| n*400-500 MB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 63 GB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 45 GB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 45 GB/s&lt;br /&gt;
|- &lt;br /&gt;
! scope=&amp;quot;column&amp;quot; style=&amp;quot;height=20px;padding:3px&amp;quot;| Total write perf.&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| n*500-4000 MB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| n*250-350 MB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 63 GB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 40 GB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 38 GB/s&lt;br /&gt;
|}&lt;br /&gt;
---------------------------------------------------------------------------------------------------------&lt;br /&gt;
  global: all nodes of UniCluster access the same file system;&lt;br /&gt;
  local: each node has its own file system;&lt;br /&gt;
  permanent: files are stored permanently;&lt;br /&gt;
  batch job: files are removed at end of the batch job.&lt;br /&gt;
---------------------------------------------------------------------------------------------------------&lt;br /&gt;
Table 2: Properties of the file systems&lt;br /&gt;
&lt;br /&gt;
== Selecting the appropriate file system ==&lt;br /&gt;
&lt;br /&gt;
In general, you should separate your data and store it on the appropriate file system.&lt;br /&gt;
Permanently needed data like software or important results should be stored below $HOME&lt;br /&gt;
but capacity restrictions (quotas) apply. In case you accidentally deleted data on $HOME&lt;br /&gt;
there is a chance that we can restore it from backup. Permanent data which is not needed for months&lt;br /&gt;
or exceeds the capacity restrictions should be sent to the LSDF Online Storage &lt;br /&gt;
or to the archive and deleted from the file systems. Temporary data which is only needed on a single&lt;br /&gt;
node and which does not exceed the disk space shown in [[BwUniCluster3.0/Hardware_and_Architecture#Compute_nodes|Table 1]] &lt;br /&gt;
should be stored below $TMPDIR. Data which is read many times on a single node, e.g. if you are doing AI training, &lt;br /&gt;
should be copied to $TMPDIR and read from there. Temporary data which is used from many nodes &lt;br /&gt;
of your batch job and which is only needed during job runtime should be stored on a &lt;br /&gt;
parallel on-demand file system. Temporary data which can be recomputed or which is the &lt;br /&gt;
result of one job and input for another job should be stored in workspaces. The lifetime &lt;br /&gt;
of data in workspaces is limited and depends on the lifetime of the workspace which can be &lt;br /&gt;
several months.&lt;br /&gt;
&lt;br /&gt;
For further details please check the chapters below.&lt;br /&gt;
&lt;br /&gt;
== $HOME ==&lt;br /&gt;
&lt;br /&gt;
The home directories of bwUniCluster 3.0 (uc3) users are located in the parallel file system Lustre.&lt;br /&gt;
You have access to your home directory from all nodes of uc3. A regular backup of these directories &lt;br /&gt;
to a tape library is done automatically. The directory $HOME should be used to hold permanently used data like &lt;br /&gt;
source code, configuration files, executable programs etc. &lt;br /&gt;
&lt;br /&gt;
On uc3 there is a default user quota limit of 500 GiB and 5 million inodes (files and directories) per user. &lt;br /&gt;
For users of University of Mannheim the limit is 250 GiB and 2.5 million inodes.&lt;br /&gt;
You can check your current usage and limits with the command&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ lfs quota -uh $(whoami) $HOME&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note that the quota limits mentioned above are soft quota limits. The hard limits (shown on the &#039;&#039;limits&#039;&#039; &lt;br /&gt;
columns) are 10 percent higher. If you are above the soft limit and below the hard limit &lt;br /&gt;
during the grace period (7 days) your I/O operations will show a warning message. If the grace period has &lt;br /&gt;
passed or if you are above the hard limit your I/O operations will abort. &lt;br /&gt;
&lt;br /&gt;
In addition to the user limit there is a limit of your organization (e.g. university) which depends on the financial share. This limit is enforced with so-called Lustre project quotas. You can show the current usage and limits of your organization with the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
lfs quota -ph $(grep $(echo $HOME | sed -e &amp;quot;s|/[^/]*/[^/]*$||&amp;quot;) /pfs/data6/project_ids.txt | cut -f 1 -d\ ) $HOME&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Workspaces ==&lt;br /&gt;
&lt;br /&gt;
On uc3 workspaces can be used to store large non-permanent data sets, e.g. restart files or output&lt;br /&gt;
data that has to be post-processed. The file system used for workspaces is also the parallel file system Lustre. This file system is especially designed for parallel access and for a high throughput to large&lt;br /&gt;
files. It is able to provide high data transfer rates of up to 40 GB/s write and read performance when data access is parallel. &lt;br /&gt;
&lt;br /&gt;
On uc3 there is a default user quota limit of 40 TiB and 20 million inodes (files and directories) per user. &lt;br /&gt;
You can chek your current usage and limits with the command&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ lfs quota -uh $(whoami) /pfs/work9&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note that the quotas include data and inodes for all of your workspaces and all of your expired workspaces (as long as they are not yet completely removed).&lt;br /&gt;
&lt;br /&gt;
Workspaces have a lifetime and the data on a workspace expires as a whole after a fixed period. The maximum lifetime of a workspace on uc3 is 60 days, but it can be renewed at the end of that period 3 times to a total maximum of 240 days after workspace generation.&lt;br /&gt;
&lt;br /&gt;
Creating, deleting, finding, extending and sharing workspaces is explained on the [[workspace]] page.&lt;br /&gt;
&lt;br /&gt;
=== Reminder for workspace deletion ===&lt;br /&gt;
&lt;br /&gt;
Normally you will get an email every day starting 7 days before a workspace expires. You can send yourself a calender entry which reminds you when a workspace will be automatically deleted:&lt;br /&gt;
&lt;br /&gt;
 $ ws_send_ical &amp;lt;workspace&amp;gt; &amp;lt;email&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Restoring expired Workspaces ===&lt;br /&gt;
&lt;br /&gt;
At expiration time your workspace will be moved to a special, hidden directory. On uc3 expired workspaces are currently kept for 30 days. During this time you can still restore your data into a valid workspace. The same is true for released workspaces but they are only kept until the next night. In order to restore an expired workspace, use&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ws_restore -l&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
to get a list of your expired workspaces, and then restore them into an &#039;&#039;&#039;existing, active workspace&#039;&#039;&#039; (here with name &amp;lt;code&amp;gt;my_restored&amp;lt;/code&amp;gt;):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ws_restore &amp;lt;full_name_of_expired_workspace&amp;gt; my_restored&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
NOTE: The expired workspace has to be specified using the full name as listed by &amp;lt;code&amp;gt;ws_restore -l&amp;lt;/code&amp;gt;, including username prefix and timestamp suffix (otherwise, it cannot be uniquely identified).&lt;br /&gt;
The target workspace, on the other hand, must be given with just its short name as listed by &amp;lt;code&amp;gt;ws_list&amp;lt;/code&amp;gt;, without the username prefix.&lt;br /&gt;
&lt;br /&gt;
NOTE: &amp;lt;code&amp;gt;ws_restore&amp;lt;/code&amp;gt; can only work on the same filesystem. So you have to ensure that the new workspace allocated with &amp;lt;code&amp;gt;ws_allocate&amp;lt;/code&amp;gt; is placed on the same filesystem as the expired workspace. Therefore, you can use &amp;lt;code&amp;gt;-F &amp;lt;filesystem&amp;gt;&amp;lt;/code&amp;gt; flag if needed.&lt;br /&gt;
&lt;br /&gt;
=== Linking workspaces in Home ===&lt;br /&gt;
&lt;br /&gt;
It might be valuable to have links to personal workspaces within a certain directory, e.g. below the user home directory. The command &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ws_register &amp;lt;DIR&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
will create and manage links to all personal workspaces within in the directory &amp;lt;DIR&amp;gt;. Calling this command will do the following:&lt;br /&gt;
&lt;br /&gt;
* The directory &amp;lt;DIR&amp;gt; will be created if necessary&lt;br /&gt;
* Links to all personal workspaces will be managed:&lt;br /&gt;
** Creates links to all available workspaces if not already present&lt;br /&gt;
** Removes links to released or expired workspaces&lt;br /&gt;
&lt;br /&gt;
== Improving Performance on $HOME and workspaces ==&lt;br /&gt;
&lt;br /&gt;
The following recommendations might help to improve throughput and metadata&lt;br /&gt;
performance on Lustre filesystems.&lt;br /&gt;
&lt;br /&gt;
=== Improving Throughput Performance ===&lt;br /&gt;
&lt;br /&gt;
Depending on your application some adaptations might be necessary if you want to reach&lt;br /&gt;
the full bandwidth of the filesystems. &lt;br /&gt;
&lt;br /&gt;
When you are designing your application you should consider that the performance of&lt;br /&gt;
parallel filesystems is generally better if data is transferred in large blocks and stored in&lt;br /&gt;
few large files. In more detail, to increase throughput performance of a parallel application&lt;br /&gt;
following aspects should be considered:&lt;br /&gt;
&lt;br /&gt;
* collect large chunks of data and write them sequentially at once,&lt;br /&gt;
&lt;br /&gt;
* to exploit complete filesystem bandwidth use several clients,&lt;br /&gt;
&lt;br /&gt;
* avoid competitive file access by different tasks or use blocks with boundaries at stripe size (default is 1MB),&lt;br /&gt;
&lt;br /&gt;
* if files are small enough for the SSDs and are only used from one node store them on $TMPDIR.&lt;br /&gt;
&lt;br /&gt;
Parallel filesystems typically stripe files over storage subsystems, i.e. large files are separated into stripes and distributed to different storage subsystems. In Lustre, the size of these stripes (sometimes also mentioned as chunks) is called stripe size and the number of used storage subsystems is called stripe count.&lt;br /&gt;
&lt;br /&gt;
With previous Lustre versions adapting the Lustre stripe count was the most important optimization. However, for the workspaces of uc3 the Lustre feature Progressive File Layout is used to define file striping parameters. This means that the stripe count is adapted if the file size is growing. In normal cases users no longer need to adapt file striping parameters in case they have very huge files or in order to reach better performance. If you know what you are doing you can still change striping parameters but further explanation is beyond the scope of this documentation.&lt;br /&gt;
&lt;br /&gt;
=== Improving Metadata Performance ===&lt;br /&gt;
&lt;br /&gt;
Metadata performance on parallel file systems is usually not as good as with local&lt;br /&gt;
filesystems. In addition, it is usually not scalable, i.e. a limited resource. Therefore,&lt;br /&gt;
you should omit metadata operations whenever possible. For example, it is much better&lt;br /&gt;
to have few large files than lots of small files. In more detail, to increase metadata&lt;br /&gt;
performance of a parallel application following aspects should be considered:&lt;br /&gt;
&lt;br /&gt;
* avoid creating many small files&lt;br /&gt;
&lt;br /&gt;
* avoid competitive directory access, e.g. by creating files in separate subdirectories for each task&lt;br /&gt;
&lt;br /&gt;
* if many small files are only used within a batch job and accessed by one node store them on $TMPDIR&lt;br /&gt;
&lt;br /&gt;
== Workspaces on flash storage ==&lt;br /&gt;
&lt;br /&gt;
There is another workspace file system for special requirements available. The file system is called &#039;&#039;full flash pfs&#039;&#039; and is based on the parallel file system Lustre.&lt;br /&gt;
&lt;br /&gt;
=== Advantages of this file system ===&lt;br /&gt;
&lt;br /&gt;
# From the Ice Lake nodes of bwUniCluster 3.0 (queue &#039;&#039;cpu_il&#039;&#039;) the network distance and latency is low compared to the normal workspace file system.&lt;br /&gt;
# All storage devices are based on flash (no hard disks) with low access times. Hence performance is better compared to other parallel file systems for read and write access with small blocks and with small files, i.e. IOPS rates are improved.&lt;br /&gt;
# The file system is mounted on bwUniCluster 3.0 and HoreKa, i.e. it can be used to share data between these clusters.&lt;br /&gt;
&lt;br /&gt;
=== Access restrictions ===&lt;br /&gt;
&lt;br /&gt;
Only HoreKa users or KIT users of bwUniCluster 3.0 can use this file system.&lt;br /&gt;
&lt;br /&gt;
=== Using the file system ===&lt;br /&gt;
&lt;br /&gt;
As KIT or HoreKa user you can use the file system in the same way as a normal workspace. You just have to specify the name of the flash-based workspace file system using the option &#039;&#039;-F&#039;&#039; to all the commands that manage workspaces. On bwUniCluster 3.0 it is called &#039;&#039;ffuc&#039;&#039;, on HoreKa it is &#039;&#039;ffhk&#039;&#039;. For example, to create a workspace with name myws and a lifetime of 60 days on bwUniCluster 3.0 execute:&lt;br /&gt;
 ws_allocate -F ffuc myws 60&lt;br /&gt;
&lt;br /&gt;
If you want to use the full flash pfs on bwUniCluster 3.0 &#039;&#039;&#039;and&#039;&#039;&#039; HoreKa at the same time, please note that you only have to manage a particular workspace on one of the clusters since the name of the workspace directory is different. However, the path to each workspace is visible and can be used on both clusters.&lt;br /&gt;
&lt;br /&gt;
Other features are similar to normal workspaces. For example, you can restore expired workspaces during 30 days after workspace expiration. There are quota limits with a default limit of 1 TiB capacity and 5 millions inodes per user. You can check your current usage with&lt;br /&gt;
 lfs quota -uh $(whoami) /pfs/work8&lt;br /&gt;
&lt;br /&gt;
== $TMPDIR ==&lt;br /&gt;
&lt;br /&gt;
The environment variable $TMPDIR contains the name of a directory which is located on the local SSD of each node. This means &lt;br /&gt;
that different tasks of a parallel application use different directories when they do not utilize the same node. &lt;br /&gt;
Although $TMPDIR points to the same path name for different nodes of a batch job, the physical location and the &lt;br /&gt;
content of this directory path on these nodes is different.&lt;br /&gt;
&lt;br /&gt;
This directory should be used for temporary files being accessed from the local node during job runtime. It should &lt;br /&gt;
also be used if you read the same data many times from a single node, e.g. if you are doing AI training. In this &lt;br /&gt;
case you should copy the data at the beginning of your batch job to $TMPDIR and read the data from there, see usage example below.&lt;br /&gt;
&lt;br /&gt;
The $TMPDIR directory is located on extremely fast local SSD storage devices. This means that performance &lt;br /&gt;
on small files is much better than on the parallel file systems. The capacity of the local SSDs for each node type &lt;br /&gt;
is different and can be checked in [[BwUniCluster3.0/Hardware_and_Architecture#Compute_nodes|Table 1]]. &lt;br /&gt;
The capacity of $TMPDIR is at least 1400 GB.&lt;br /&gt;
&lt;br /&gt;
Each time a batch job is started, a subdirectory is created on the SSD of each node and assigned to the job. &lt;br /&gt;
$TMPDIR is set to the name of the subdirectory and this name contains the job ID so that it is unique &lt;br /&gt;
for each job. At the end of the job the subdirectory is removed.&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;
&#039;&#039;&#039;All data on $TMPDIR will be deleted when your job completes.&#039;&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
Make sure you have copied your results back to a global filesystem, e.g., $HOME or a workspace, within your job.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
On login nodes $TMPDIR also points to a fast directory on a local SSD disk but this directory is not unique. &lt;br /&gt;
It is recommended to create your own unique subdirectory on these nodes. This directory should be used for the &lt;br /&gt;
installation of software packages. This means that the software package to be installed should be unpacked, &lt;br /&gt;
compiled and linked in a subdirectory of $TMPDIR. The real installation of the package (e.g. make install) &lt;br /&gt;
should be made into the $HOME folder.&lt;br /&gt;
&lt;br /&gt;
{|style=&amp;quot;background:#ffdeee; width:100%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;padding:5px; background:#f2cece; text-align:left&amp;quot;|&lt;br /&gt;
[[Image:Attention.svg|center|25px]]&lt;br /&gt;
|style=&amp;quot;padding:5px; background:#f2cece; text-align:left&amp;quot;|&lt;br /&gt;
Note that you should &#039;&#039;&#039;not&#039;&#039;&#039; use /tmp or /scratch! Please use &#039;&#039;&#039;$TMPDIR&#039;&#039;&#039; instead.&amp;lt;br/&amp;gt;&lt;br /&gt;
The reason is that an automatic cleanup on /tmp or /scratch is not possible because another job could be still using data below these directories. Hence the corresponding file systems could fill up and this can cause issues for you and for other users. On the other hand, $TMPDIR is created when the job starts and removed when the job completes, i.e. a cleanup is automatically done.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Usage example for $TMPDIR ===&lt;br /&gt;
&lt;br /&gt;
We will provide an example for using $TMPDIR and describe efficient data transfer to and from $TMPDIR. &lt;br /&gt;
&lt;br /&gt;
If you have a data set with many files which is frequently used by batch jobs you should create &lt;br /&gt;
a compressed archive on a workspace. This archive can be extracted on $TMPDIR inside your batch jobs. &lt;br /&gt;
Such an archive can be read efficiently from a parallel file system since it is a single huge file. &lt;br /&gt;
On a login node you can create such an archive with the following steps: &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Create a workspace to store the archive&lt;br /&gt;
[ab1234@uc3n991 ~]$ ws_allocate data-ssd 60&lt;br /&gt;
# Create the archive from a local dataset folder (example)&lt;br /&gt;
[ab1234@uc3n991 ~]$ tar -cvzf $(ws_find data-ssd)/dataset.tgz dataset/&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Inside a batch job extract the archive on $TMPDIR, read input data from $TMPDIR, store results on $TMPDIR &lt;br /&gt;
and save the results on a workspace: &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
# very simple example on how to use local $TMPDIR&lt;br /&gt;
#SBATCH -N 1&lt;br /&gt;
#SBATCH -t 24:00:00&lt;br /&gt;
&lt;br /&gt;
# Extract compressed input dataset on local SSD&lt;br /&gt;
tar -C $TMPDIR/ -xvzf $(ws_find data-ssd)/dataset.tgz&lt;br /&gt;
&lt;br /&gt;
# The application reads data from dataset on $TMPDIR and writes results to $TMPDIR&lt;br /&gt;
myapp -input $TMPDIR/dataset/myinput.csv -outputdir $TMPDIR/results&lt;br /&gt;
&lt;br /&gt;
# Before job completes save results on a workspace&lt;br /&gt;
rsync -av $TMPDIR/results $(ws_find data-ssd)/results-${SLURM_JOB_ID}/&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== LSDF Online Storage ==&lt;br /&gt;
&lt;br /&gt;
The LSDF Online Storage allows dedicated users to store scientific measurement data and simulation results. BwUniCluster 3.0 has an extremely fast network connection to the LSDF Online Storage. This file system provides external access via different protocols. It is only available for certain users. For information how request storage projects on the LSDF Online Storage see [[https://www.scc.kit.edu/en/services/lsdf]].&lt;br /&gt;
&lt;br /&gt;
The LSDF Online Storage is mounted on the login nodes. It will also be mounted on the compute nodes of your batch job request it with the constraint flag &#039;&#039;LSDF&#039;&#039;. You have one of the following options:&lt;br /&gt;
&lt;br /&gt;
1. Add after the initial lines of your script job.sh the line &amp;lt;code&amp;gt;#SBATCH --constraint=LSDF&amp;lt;/code&amp;gt;:&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;
2. Add the constraint on command line:&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;
&lt;br /&gt;
In order to access the LSDF Online Storage the following environment variables are available: &lt;br /&gt;
&amp;lt;code&amp;gt;$LSDF&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;$LSDFPROJECTS&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;$LSDFHOME&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==BeeOND (BeeGFS On-Demand)==&lt;br /&gt;
&lt;br /&gt;
Users have the possibility to request a private BeeOND (on-demand BeeGFS) parallel filesystem for each job. The file system is created during job startup and purged when your job completes. &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;
&#039;&#039;&#039;All data on the private BeeOND filesystem will be deleted when your job completes.&#039;&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
Make sure you have copied your results back to a global filesystem, e.g., $HOME or a workspace, within your job.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
BeeOND/BeeGFS can be used like any other parallel file system. All nodes of the batch job have acess to the same data below the same path. Tools like cp or rsync can be used to copy data in and out. &lt;br /&gt;
&lt;br /&gt;
Starting and stopping BeeOND is integrated in the prolog and epilog of the cluster batch system Slurm. It can be used during job runtime if compute nodes are exclusive used, meaning that no other jobs are running on the same node. To achieve this, use the batch option &amp;quot;--exclusive&amp;quot; in your batch script or on command line. This is particularly important in shared partitions.&lt;br /&gt;
&lt;br /&gt;
You can request the creation of a BeeOND file system with the constraint flags &#039;&#039;BEEOND&#039;&#039;, &#039;&#039;BEEOND_4MDS&#039;&#039; or &#039;&#039;BEEOND_MAXMDS&#039;&#039;.&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 constraint &#039;&#039;BEEOND&#039;&#039;. You have one of the following options to request the constraint:&lt;br /&gt;
&lt;br /&gt;
1. Add the line &amp;lt;code&amp;gt;#SBATCH --constraint=BEEOND&amp;lt;/code&amp;gt; to your job script:&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;
2. Add the constraint on command line:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sbatch -p &amp;lt;queue&amp;gt; -N &amp;lt;# of nodes&amp;gt; -t &amp;lt;runtime&amp;gt; --mem &amp;lt;mem&amp;gt; --exclusive -C BEEOND job.sh&lt;br /&gt;
&amp;lt;/pre&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;
:Use always the directory with the greatest stripe count for large files. E.g. if your largest file is 3.1 Tb, then you have to use a stripe count greater than 4 (4 x 750 GB), 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;
==Backup and Archiving==&lt;br /&gt;
&lt;br /&gt;
There are regular backups of all data of the home directories, whereas ACLs and extended attributes will&lt;br /&gt;
not be saved in backups. &lt;br /&gt;
&lt;br /&gt;
Please open a ticket if you have the need to restore backup data.&lt;/div&gt;</summary>
		<author><name>H Weber</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster2.0/Slurm&amp;diff=12790</id>
		<title>BwUniCluster2.0/Slurm</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster2.0/Slurm&amp;diff=12790"/>
		<updated>2024-06-06T08:22:46Z</updated>

		<summary type="html">&lt;p&gt;H Weber: /* BeeOND (BeeGFS On-Demand) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&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 [[bwUniCluster 2.0|bwUniCluster 2.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 2.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;
* [[BwUniCluster_2.0_Batch_Queues#sbatch_-p_queue|bwUniCluster 2.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_single -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=fat&#039;&#039; (with &#039;&#039;--partition=(dev_)single&#039;&#039; maximum &#039;&#039;--mem=96gb&#039;&#039; is possible):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sbatch --partition=fat 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;Because hyperthreading is switched on on bwUniCluster 2.0, the option --cpus-per-task (-c) must be set to 2*n, if you want to use n threads.&#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 40-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 single --export=ALL,OMP_NUM_THREADS=40 -J OpenMP_Test -N 1 -c 80 -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=80&lt;br /&gt;
#SBATCH --time=40:00&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}/2))&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;single&#039;&#039; as sbatch option:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sbatch -p single 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=single --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 single -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=multiple -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;Because hyperthreading is switched on on bwUniCluster 2.0, the option --cpus-per-task (-c) must be set to 2*n, if you want to use n threads.&#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=56&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}/2))&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 multiple ./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 40-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=80&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}/2))&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 multiple ./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_4 and gpu_8 queues have 4 or 8 NVIDIA Tesla V100 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 ressources 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;
Sun Mar 29 15:20:05 2020       &lt;br /&gt;
+-----------------------------------------------------------------------------+&lt;br /&gt;
| NVIDIA-SMI 440.33.01    Driver Version: 440.33.01    CUDA Version: 10.2     |&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;
|===============================+======================+======================|&lt;br /&gt;
|   0  Tesla V100-SXM2...  Off  | 00000000:3A:00.0 Off |                    0 |&lt;br /&gt;
| N/A   29C    P0    39W / 300W |      9MiB / 32510MiB |      0%      Default |&lt;br /&gt;
+-------------------------------+----------------------+----------------------+&lt;br /&gt;
|   1  Tesla V100-SXM2...  Off  | 00000000:3B:00.0 Off |                    0 |&lt;br /&gt;
| N/A   30C    P0    41W / 300W |      8MiB / 32510MiB |      0%      Default |&lt;br /&gt;
+-------------------------------+----------------------+----------------------+&lt;br /&gt;
                                                                               &lt;br /&gt;
+-----------------------------------------------------------------------------+&lt;br /&gt;
| Processes:                                                       GPU Memory |&lt;br /&gt;
|  GPU       PID   Type   Process name                             Usage      |&lt;br /&gt;
|=============================================================================|&lt;br /&gt;
|    0     14228      G   /usr/bin/X                                     8MiB |&lt;br /&gt;
|    1     14228      G   /usr/bin/X                                     8MiB |&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;
However, there may be warnings, e.g. when running&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load compiler/gnu/10.3 mpi/openmpi devel/cuad&lt;br /&gt;
$ mpirun mpirun -np 2 ./mpi_cuda_app&lt;br /&gt;
--------------------------------------&lt;br /&gt;
WARNING: There are more than one active ports on host &#039;uc2n520&#039;, but the&lt;br /&gt;
default subnet GID prefix was detected on more than one of these&lt;br /&gt;
ports.  If these ports are connected to different physical IB&lt;br /&gt;
networks, this configuration will fail in Open MPI.  This version of&lt;br /&gt;
Open MPI requires that every physically separate IB subnet that is&lt;br /&gt;
used between connected MPI processes must have different subnet ID&lt;br /&gt;
values.&lt;br /&gt;
&lt;br /&gt;
Please see this FAQ entry for more details:&lt;br /&gt;
&lt;br /&gt;
  http://www.open-mpi.org/faq/?category=openfabrics#ofa-default-subnet-gid&lt;br /&gt;
&lt;br /&gt;
NOTE: You can turn off this warning by setting the MCA parameter&lt;br /&gt;
      btl_openib_warn_default_gid_prefix to 0.&lt;br /&gt;
--------------------------------------------------------------------------&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&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;
(Please note, that CUDA per v11.4 is only available with up to GCC-10)&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 2.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;
          18088744    single CPV.sbat   ab1234 PD       0:00      1 (Priority)&lt;br /&gt;
          18098414  multiple CPV.sbat   ab1234 PD       0:00      2 (Priority) &lt;br /&gt;
          18090089  multiple CPV.sbat   ab1234  R       2:27      2 uc2n[127-128]&lt;br /&gt;
$ squeue -l&lt;br /&gt;
            JOBID PARTITION     NAME     USER    STATE       TIME TIME_LIMI  NODES NODELIST(REASON) &lt;br /&gt;
         18088654    single CPV.sbat   ab1234 COMPLETI       4:29   2:00:00      1 uc2n374&lt;br /&gt;
         18088785    single CPV.sbat   ab1234  PENDING       0:00   2:00:00      1 (Priority)&lt;br /&gt;
         18098414  multiple CPV.sbat   ab1234  PENDING       0:00   2:00:00      2 (Priority)&lt;br /&gt;
         18088683    single CPV.sbat   ab1234  RUNNING       0:14   2:00:00      1 uc2n413  &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_multiple  :      8 nodes idle&lt;br /&gt;
Partition multiple      :    332 nodes idle&lt;br /&gt;
Partition dev_single    :      4 nodes idle&lt;br /&gt;
Partition single        :     76 nodes idle&lt;br /&gt;
Partition long          :     80 nodes idle&lt;br /&gt;
Partition fat           :      5 nodes idle&lt;br /&gt;
Partition dev_special   :    342 nodes idle&lt;br /&gt;
Partition special       :    342 nodes idle&lt;br /&gt;
Partition dev_multiple_e:      7 nodes idle&lt;br /&gt;
Partition multiple_e    :    335 nodes idle&lt;br /&gt;
Partition gpu_4         :     12 nodes idle&lt;br /&gt;
Partition gpu_8         :      6 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 2.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;
          18089884  multiple CPV.sbat   bq0742  R      33:44      2 uc2n[165-166]&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 18089884&lt;br /&gt;
&lt;br /&gt;
JobId=18089884 JobName=CPV.sbatch&lt;br /&gt;
   UserId=bq0742(8946) GroupId=scc(12345) MCS_label=N/A&lt;br /&gt;
   Priority=3 Nice=0 Account=kit 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:35:06 TimeLimit=02:00:00 TimeMin=N/A&lt;br /&gt;
   SubmitTime=2020-03-16T14:14:54 EligibleTime=2020-03-16T14:14:54&lt;br /&gt;
   AccrueTime=2020-03-16T14:14:54&lt;br /&gt;
   StartTime=2020-03-16T15:12:51 EndTime=2020-03-16T17:12:51 Deadline=N/A&lt;br /&gt;
   SuspendTime=None SecsPreSuspend=0 LastSchedEval=2020-03-16T15:12:51&lt;br /&gt;
   Partition=multiple AllocNode:Sid=uc2n995:5064&lt;br /&gt;
   ReqNodeList=(null) ExcNodeList=(null)&lt;br /&gt;
   NodeList=uc2n[165-166]&lt;br /&gt;
   BatchHost=uc2n165&lt;br /&gt;
   NumNodes=2 NumCPUs=160 NumTasks=80 CPUs/Task=1 ReqB:S:C:T=0:0:*:1&lt;br /&gt;
   TRES=cpu=160,mem=96320M,node=2,billing=160&lt;br /&gt;
   Socks/Node=* NtasksPerN:B:S:C=40:0:*:1 CoreSpec=*&lt;br /&gt;
   MinCPUsNode=40 MinMemoryCPU=1204M MinTmpDiskNode=0&lt;br /&gt;
   Features=(null) DelayBoot=00:00:00&lt;br /&gt;
   OverSubscribe=NO Contiguous=0 Licenses=(null) Network=(null)&lt;br /&gt;
   Command=/pfs/data5/home/kit/scc/bq0742/git/CPV/bin/CPV.sbatch&lt;br /&gt;
   WorkDir=/pfs/data5/home/kit/scc/bq0742/git/CPV/bin&lt;br /&gt;
   StdErr=/pfs/data5/home/kit/scc/bq0742/git/CPV/bin/slurm-18089884.out&lt;br /&gt;
   StdIn=/dev/null&lt;br /&gt;
   StdOut=/pfs/data5/home/kit/scc/bq0742/git/CPV/bin/slurm-18089884.out&lt;br /&gt;
   Power=&lt;br /&gt;
   MailUser=(null) MailType=NONE&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 18089884 | grep -i State&lt;br /&gt;
   JobState=COMPLETED 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;
{| width=750px 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#lbAI 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>H Weber</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster2.0/Hardware_and_Architecture&amp;diff=12463</id>
		<title>BwUniCluster2.0/Hardware and Architecture</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster2.0/Hardware_and_Architecture&amp;diff=12463"/>
		<updated>2023-11-20T11:16:45Z</updated>

		<summary type="html">&lt;p&gt;H Weber: /* BeeOND (BeeGFS On-Demand) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Architecture of bwUniCluster 2.0 =&lt;br /&gt;
&lt;br /&gt;
The bwUniCluster 2.0 is a parallel computer with distributed memory. Each node of system consists of at least two Intel Xeon processor, local memory, disks, network adapters and optionally accelerators (NVIDIA Tesla V100, A100 or H100). All nodes are connected by a fast InfiniBand interconnect. In addition the file system&lt;br /&gt;
Lustre, that is connected by coupling the InfiniBand of the file server with the InfiniBand&lt;br /&gt;
switch of the compute cluster, is added to bwUniCluster 2.0 to provide a fast and scalable&lt;br /&gt;
parallel file system.&lt;br /&gt;
&lt;br /&gt;
The operating system on each node is Red Hat Enterprise Linux (RHEL) 8.4. A number of additional software packages like e.g. SLURM have been installed on top. Some of these components are of special interest to end users and are briefly&lt;br /&gt;
discussed in this document. Others which are of greater importance to system&lt;br /&gt;
administrators will not be covered by this document.&lt;br /&gt;
&lt;br /&gt;
The individual nodes of the system may act in different roles. According to the services supplied by the nodes, they are separated into disjoint groups. From an end users point of view the different groups of nodes are login nodes, compute nodes, file server nodes and administrative server nodes.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Login Nodes&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The login nodes are the only nodes that are directly accessible by end users. These nodes&lt;br /&gt;
are used for interactive login, file management, program development and interactive pre-&lt;br /&gt;
and postprocessing. Two nodes are dedicated to this service but they are all accessible via&lt;br /&gt;
one address and a DNS round-robin alias distributes the login sessions to the&lt;br /&gt;
different login nodes.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Compute Node&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The majority of nodes are compute nodes which are managed by a batch system. Users &lt;br /&gt;
submit their jobs to the SLURM batch system and a job is executed when the required resources become available (depending on its fair-share priority).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;File Server Nodes&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The hardware of the parallel file system Lustre incorporates some file server nodes; the file&lt;br /&gt;
system Lustre is connected by coupling the InfiniBand of the file server with the independent InfiniBand switch of the compute cluster. In addition to shared file space there is also local storage on the disks of each node (for details see chapter &amp;quot;File Systems&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Administrative Server Nodes&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Some other nodes are delivering additional services like resource management, external&lt;br /&gt;
network connection, administration etc. These nodes can be accessed directly by system administrators only.&lt;br /&gt;
&lt;br /&gt;
= Components of bwUniCluster =&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
! style=&amp;quot;width:9%&amp;quot;|&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Compute nodes &amp;quot;Thin&amp;quot;&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Compute nodes &amp;quot;HPC&amp;quot;&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Compute nodes &amp;quot;IceLake&amp;quot;&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Compute nodes &amp;quot;Fat&amp;quot;&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| GPU x4&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| GPU x8&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| IceLake + GPU x4&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Login&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Number of nodes&lt;br /&gt;
| 200 + 60&lt;br /&gt;
| 260&lt;br /&gt;
| 272&lt;br /&gt;
| 6&lt;br /&gt;
| 14&lt;br /&gt;
| 10&lt;br /&gt;
| 15&lt;br /&gt;
| 4&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Processors&lt;br /&gt;
| Intel Xeon Gold 6230&lt;br /&gt;
| Intel Xeon Gold 6230&lt;br /&gt;
| Intel Xeon Platinum 8358&lt;br /&gt;
| Intel Xeon Gold 6230&lt;br /&gt;
| Intel Xeon Gold 6230&lt;br /&gt;
| Intel Xeon Gold 6248&lt;br /&gt;
| Intel Xeon Platinum 8358&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Number of sockets&lt;br /&gt;
| 2&lt;br /&gt;
| 2&lt;br /&gt;
| 2&lt;br /&gt;
| 4&lt;br /&gt;
| 2&lt;br /&gt;
| 2&lt;br /&gt;
| 2&lt;br /&gt;
| 2&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Processor frequency (GHz)&lt;br /&gt;
| 2.1 Ghz&lt;br /&gt;
| 2.1 Ghz&lt;br /&gt;
| 2.6 Ghz&lt;br /&gt;
| 2.1 Ghz&lt;br /&gt;
| 2.1 Ghz&lt;br /&gt;
| 2.6 Ghz&lt;br /&gt;
| 2.5 Ghz&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Total number of cores&lt;br /&gt;
| 40&lt;br /&gt;
| 40&lt;br /&gt;
| 64&lt;br /&gt;
| 80&lt;br /&gt;
| 40&lt;br /&gt;
| 40&lt;br /&gt;
| 64&lt;br /&gt;
| 40&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Main memory&lt;br /&gt;
| 96 GB / 192 GB&lt;br /&gt;
| 96 GB&lt;br /&gt;
| 256 GB&lt;br /&gt;
| 3 TB&lt;br /&gt;
| 384 GB&lt;br /&gt;
| 768 GB&lt;br /&gt;
| 512 GB&lt;br /&gt;
| 384 GB&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Local SSD&lt;br /&gt;
| 960 GB SATA&lt;br /&gt;
| 960 GB SATA&lt;br /&gt;
| 1,8 TB NVMe&lt;br /&gt;
| 4,8 TB NVMe&lt;br /&gt;
| 3,2 TB NVMe&lt;br /&gt;
| 15  TB NVMe&lt;br /&gt;
| 6,4 TB NVMe&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Accelerators&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
| 4x NVIDIA Tesla V100&lt;br /&gt;
| 8x NVIDIA Tesla V100&lt;br /&gt;
| 4x NVIDIA A100 / 4x NVIDIA H100&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Accelerator memory&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
| 32 GB&lt;br /&gt;
| 32 GB&lt;br /&gt;
| 80 GB / 94 GB&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Interconnect&lt;br /&gt;
| IB HDR100 (blocking)&lt;br /&gt;
| IB HDR100&lt;br /&gt;
| IB HDR200&lt;br /&gt;
| IB HDR&lt;br /&gt;
| IB HDR&lt;br /&gt;
| IB HDR&lt;br /&gt;
| IB HDR200&lt;br /&gt;
| IB HDR100 (blocking)&lt;br /&gt;
|}&lt;br /&gt;
Table 1: Properties of the nodes&lt;br /&gt;
&lt;br /&gt;
= File Systems =&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 2.0 the parallel file system Lustre is used for most globally visible user data. Lustre is open source and Lustre solutions and support are available from different vendors. Nowadays, most of the biggest HPC systems are using Lustre. An initial home directory on a Lustre file system is created automatically after account activation, and the environment variable $HOME holds its name. Users can create so-called workspaces on another Lustre file system for non-permanent data with temporary lifetime. There is another workspace file system based on flash storage for special requirements available.&lt;br /&gt;
&lt;br /&gt;
Within a batch job further file systems are available: &lt;br /&gt;
* The directory $TMPDIR is only available and visible on the local node. It is located on fast SSD storage devices.&lt;br /&gt;
* On request a parallel on-demand file system (BeeOND) is created which uses the SSDs of the nodes which were allocated to the batch job.&lt;br /&gt;
* On request the external LSDF Online Storage is mounted on the nodes which were allocated to the batch job. This file system is based on the parallel file system Spectrum Scale. &lt;br /&gt;
&lt;br /&gt;
Some of the characteristics of the file systems are shown in Table 2.&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;width:100%; vertical-align:top; background:#f5fffa;border:1px solid #000000;padding:1px&amp;quot;&lt;br /&gt;
|- style=&amp;quot;width:20%;height=20px; text-align:left;padding:3px&amp;quot;&lt;br /&gt;
! style=&amp;quot;background-color:#AAA;padding:3px&amp;quot;| Property&lt;br /&gt;
! style=&amp;quot;background-color:#AAA;padding:3px&amp;quot;| $TMPDIR&lt;br /&gt;
! style=&amp;quot;background-color:#AAA;padding:3px&amp;quot;| BeeOND&lt;br /&gt;
! style=&amp;quot;background-color:#AAA;padding:3px&amp;quot;| $HOME&lt;br /&gt;
! style=&amp;quot;background-color:#AAA;padding:3px&amp;quot;| Workspace&lt;br /&gt;
! style=&amp;quot;background-color:#AAA;padding:3px&amp;quot;| Workspace &amp;lt;br&amp;gt; on flash&lt;br /&gt;
|- &lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Visibility &lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| local node&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| nodes of batch job&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| global&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| global&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| global&lt;br /&gt;
|- &lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Lifetime &lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| batch job runtime&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| batch job runtime&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| permanent&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| max. 240 days&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| max. 240 days&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Disk space &lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 960 GB - 6.4 TB &amp;lt;br&amp;gt; details see table 1&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| n*750 GB&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 1.2 PiB&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 4.1 PiB&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 236 TiB&lt;br /&gt;
|- &lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Capacity Quotas&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| no&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| no&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| yes &amp;lt;br&amp;gt; 1 TiB per user, for &amp;lt;br&amp;gt; MA users 256 GiB &amp;lt;br&amp;gt; also per organization&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| yes &amp;lt;br&amp;gt; 40 TiB per user&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| yes &amp;lt;br&amp;gt; 1 TiB per user&lt;br /&gt;
|- &lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Inode Quotas&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| no&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| no&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| yes &amp;lt;br&amp;gt; 10 million per user &amp;lt;br&amp;gt; for MA users 2.5 million&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| yes &amp;lt;br&amp;gt; 30 million per user&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| yes &amp;lt;br&amp;gt; 5 million per user&lt;br /&gt;
|- &lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Backup&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| no&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| no&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| yes&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| no&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| no&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Read perf./node&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 500 MB/s - 6 GB/s &amp;lt;br&amp;gt; depends on type of local SSD / job queue: &amp;lt;br&amp;gt; 520 MB/s @ single / multiple &amp;lt;br&amp;gt; 800 MB/s @ multiple_e &amp;lt;br&amp;gt; 6600 MB/s @ fat &amp;lt;br&amp;gt; 6500 MB/s @ gpu_4 &amp;lt;br&amp;gt; 6500 MB/s @ gpu_8&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 400 MB/s - 500 MB/s&amp;lt;br&amp;gt; depends on type of local SSDs / job queue: &amp;lt;br&amp;gt; 500 MB/s @ multiple &amp;lt;br&amp;gt; 400 MB/s @ multiple_e&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 1 GB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 1 GB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 1 GB/s&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Write perf./node&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 500 MB/s - 4 GB/s &amp;lt;br&amp;gt; depends on type of local SSD / job queue: &amp;lt;br&amp;gt; 500 MB/s @ single / multiple &amp;lt;br&amp;gt; 650 MB/s @ multiple_e &amp;lt;br&amp;gt; 2900 MB/s @ fat &amp;lt;br&amp;gt; 2090 MB/s @ gpu_4 &amp;lt;br&amp;gt; 4060 MB/s @ gpu_8&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 250 MB/s - 350 MB/s &amp;lt;br&amp;gt; depends on type of local SSDs / job queue: &amp;lt;br&amp;gt; 350 MB/s @ multiple &amp;lt;br&amp;gt; 250 MB/s @ multiple_e&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 1 GB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 1 GB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 1 GB/s&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Total read perf.&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| n*500-6000 MB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| n*400-500 MB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 18 GB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 54 GB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 45 GB/s&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Total write perf.&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| n*500-4000 MB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| n*250-350 MB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 18 GB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 54 GB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 38 GB/s&lt;br /&gt;
|}&lt;br /&gt;
---------------------------------------------------------------------------------------------------------&lt;br /&gt;
  global: all nodes of UniCluster access the same file system;&lt;br /&gt;
  local: each node has its own file system;&lt;br /&gt;
  permanent: files are stored permanently;&lt;br /&gt;
  batch job: files are removed at end of the batch job.&lt;br /&gt;
---------------------------------------------------------------------------------------------------------&lt;br /&gt;
Table 2: Properties of the file systems&lt;br /&gt;
&lt;br /&gt;
== Selecting the appropriate file system ==&lt;br /&gt;
&lt;br /&gt;
In general, you should separate your data and store it on the appropriate file system.&lt;br /&gt;
Permanently needed data like software or important results should be stored below $HOME&lt;br /&gt;
but capacity restrictions (quotas) apply. In case you accidentally deleted data on $HOME&lt;br /&gt;
you can usually restore it from backup. Permanent data which is not needed for months&lt;br /&gt;
or exceeds the capacity restrictions should be sent to the LSDF Online Storage &lt;br /&gt;
or to the archive and deleted from the file systems. Temporary data which is only needed on a single&lt;br /&gt;
node and which does not exceed the disk space shown in the table above should be stored&lt;br /&gt;
below $TMPDIR. Data which is read many times on a single node, e.g. if you are doing AI training, &lt;br /&gt;
should be copied to $TMPDIR and read from there. Temporary data which is used from many nodes &lt;br /&gt;
of your batch job and which is only needed during job runtime should be stored on a &lt;br /&gt;
parallel on-demand file system. Temporary data which can be recomputed or which is the &lt;br /&gt;
result of one job and input for another job should be stored in workspaces. The lifetime &lt;br /&gt;
of data in workspaces is limited and depends on the lifetime of the workspace which can be &lt;br /&gt;
several months.&lt;br /&gt;
&lt;br /&gt;
For further details please check the chapters below.&lt;br /&gt;
&lt;br /&gt;
== $HOME ==&lt;br /&gt;
&lt;br /&gt;
The home directories of bwUniCluster 2.0 (uc2) users are located in the parallel file system Lustre.&lt;br /&gt;
You have access to your home directory from all nodes of uc2. A regular backup of these directories &lt;br /&gt;
to tape archive is done automatically. The directory $HOME is used to hold those files that are&lt;br /&gt;
permanently used like source codes, configuration files, executable programs etc. &lt;br /&gt;
&lt;br /&gt;
On uc2 there is a default user quota limit of 1 TiB and 10 million inodes (files and directories) per user. &lt;br /&gt;
For users of University of Mannheim the limit is 256 GiB and 2.5 million inodes.&lt;br /&gt;
You can check your current usage and limits with the command&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ lfs quota -uh $(whoami) $HOME&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In addition to the user limit there is a limit of your organization (e.g. university) which depends on the financial share. This limit is enforced with so-called Lustre project quotas. You can show the current usage and limits of your organization with the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
lfs quota -ph $(grep $(echo $HOME | sed -e &amp;quot;s|/[^/]*/[^/]*$||&amp;quot;) /pfs/data5/project_ids.txt | cut -f 1 -d\ ) $HOME&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Workspaces ==&lt;br /&gt;
&lt;br /&gt;
On uc2 workspaces can be used to store large non-permanent data sets, e.g. restart files or output&lt;br /&gt;
data that has to be post-processed. The file system used for workspaces is also the parallel file system Lustre. This file system is especially designed for parallel access and for a high throughput to large&lt;br /&gt;
files. It is able to provide high data transfer rates of up to 54 GB/s write and read performance when data access is parallel. &lt;br /&gt;
&lt;br /&gt;
Workspaces have a lifetime and the data on a workspace expires as a whole after a fixed period. The maximum lifetime of a workspace is 60 days, but it can be renewed at the end of that period 3 times to a total maximum of 240 days after workspace generation. If a workspace has inadvertently expired we can restore the data during a limited time (few weeks). In this case you should create a new workspace and report the name of the new and of the expired workspace in a ticket.&lt;br /&gt;
&lt;br /&gt;
Creating, deleting, finding and extending workspaces is explained on the  [[workspace]] page.&lt;br /&gt;
&lt;br /&gt;
On uc2 there is a default user quota limit of 40 TiB and 30 million inodes (files and directories) per user. &lt;br /&gt;
You can chek your current usage and limits with the command&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ lfs quota -uh $(whoami) /pfs/work7&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note that the quotas include data and inodes for all of your workspaces and all of your expired workspaces (as long as they are not yet completely removed).&lt;br /&gt;
&lt;br /&gt;
=== Reminder for workspace deletion ===&lt;br /&gt;
&lt;br /&gt;
Normally you will get an email every day starting 7 days before a workspace expires. You can send yourself a calender entry which reminds you when a workspace will be automatically deleted:&lt;br /&gt;
&lt;br /&gt;
 $ ws_send_ical.sh &amp;lt;workspace&amp;gt; &amp;lt;email&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Improving Performance on $HOME and workspaces ==&lt;br /&gt;
&lt;br /&gt;
The following recommendations might help to improve throughput and metadata&lt;br /&gt;
performance on Lustre filesystems.&lt;br /&gt;
&lt;br /&gt;
=== &#039;&#039;&#039;Improving Throughput Performance&#039;&#039;&#039; ===&lt;br /&gt;
&lt;br /&gt;
Depending on your application some adaptations might be necessary if you want to reach&lt;br /&gt;
the full bandwidth of the filesystems. Parallel filesystems typically stripe files over storage subsystems, i.e. large files are separated into stripes and distributed to different storage subsystems. In Lustre, the size of these stripes (sometimes also mentioned as chunks) is called stripe size and the number of used storage subsystems is called stripe count.&lt;br /&gt;
&lt;br /&gt;
When you are designing your application you should consider that the performance of&lt;br /&gt;
parallel filesystems is generally better if data is transferred in large blocks and stored in&lt;br /&gt;
few large files. In more detail, to increase throughput performance of a parallel application&lt;br /&gt;
following aspects should be considered:&lt;br /&gt;
&lt;br /&gt;
* collect large chunks of data and write them sequentially at once,&lt;br /&gt;
&lt;br /&gt;
* to exploit complete filesystem bandwidth use several clients,&lt;br /&gt;
&lt;br /&gt;
* avoid competitive file access by different tasks or use blocks with boundaries at stripe size (default is 1MB),&lt;br /&gt;
&lt;br /&gt;
* if files are small enough for the SSDs and are only used by one process store them on $TMPDIR.&lt;br /&gt;
&lt;br /&gt;
With previous Lustre versions adapting the Lustre stripe count was the most important optimization. However, for the workspaces of uc2 the new Lustre feature Progressive File Layouts has been used to define file striping parameters. This means that the stripe count is adapted if the file size is growing. In normal cases users no longer need to adapt file striping parameters in case they have very huge files or in order to reach better performance. &lt;br /&gt;
&lt;br /&gt;
If you know what you are doing you can still change striping parameters, e.g. the stripe count, of a directory and of newly created files. New files and directories inherit the stripe count from the parent directory. E.g. if you want to enhance throughput on a single very large file which is created in the directory $HOME/my_output_dir you can use the command&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ lfs setstripe -c-1 $HOME/my_output_dir&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
to change the stripe count to -1 which means that all storage subsystems of the file system are used to store that file. If you change the stripe count of a directory the stripe count of existing files inside this&lt;br /&gt;
directory is not changed. If you want to change the stripe count of existing files, change&lt;br /&gt;
the stripe count of the parent directory, copy the files to new files, remove the old files&lt;br /&gt;
and move the new files back to the old name. In order to check the stripe setting of&lt;br /&gt;
the file my_file use&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ lfs getstripe my_file&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Also note that changes on the striping parameters (e.g. stripe count) are not saved in the&lt;br /&gt;
backup, i.e. if directories have to be recreated this information is lost and the default stripe&lt;br /&gt;
count will be used. Therefore, you should annotate for which directories you made changes&lt;br /&gt;
to the striping parameters so that you can repeat these changes if required.&lt;br /&gt;
&lt;br /&gt;
=== &#039;&#039;&#039;Improving Metadata Performance&#039;&#039;&#039; ===&lt;br /&gt;
&lt;br /&gt;
Metadata performance on parallel file systems is usually not as good as with local&lt;br /&gt;
filesystems. In addition, it is usually not scalable, i.e. a limited resource. Therefore,&lt;br /&gt;
you should omit metadata operations whenever possible. For example, it is much better&lt;br /&gt;
to have few large files than lots of small files. In more detail, to increase metadata&lt;br /&gt;
performance of a parallel application following aspects should be considered:&lt;br /&gt;
&lt;br /&gt;
* avoid creating many small files,&lt;br /&gt;
&lt;br /&gt;
* avoid competitive directory access, e.g. by creating files in separate subdirectories for each task,&lt;br /&gt;
&lt;br /&gt;
* if many small files are only used within a batch job and accessed by one process store them on $TMPDIR,&lt;br /&gt;
&lt;br /&gt;
* change the default colorization setting of the command ls (see below).&lt;br /&gt;
&lt;br /&gt;
On modern Linux systems, the GNU ls command often uses colorization by default to&lt;br /&gt;
visually highlight the file type; this is especially true if the command is run within a terminal&lt;br /&gt;
session. This is because the default shell profile initializations usually contain an alias&lt;br /&gt;
directive similar to the following for the ls command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ alias ls=&amp;quot;ls --color=tty&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
However, running the ls command in this way for files on a Lustre file system requires&lt;br /&gt;
a stat() call to be used to determine the file type. This can result in a performance&lt;br /&gt;
overhead, because the stat() call always needs to determine the size of a file, and that&lt;br /&gt;
in turn means that the client node must query the object size of all the backing objects&lt;br /&gt;
that make up a file. As a result of the default colorization setting, running a simple&lt;br /&gt;
ls command on a Lustre file system often takes as much time as running the ls command&lt;br /&gt;
with the -l option (the same is true if the -F, -p, or the -classify option, or any other option &lt;br /&gt;
that requires information from a stat() call, is used). To avoid this performance overhead&lt;br /&gt;
when using ls commands, add an alias directive similar to the following&lt;br /&gt;
to your shell startup script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ alias ls=&amp;quot;ls --color=never&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Workspaces on flash storage ==&lt;br /&gt;
&lt;br /&gt;
There is another workspace file system for special requirements available. The file system is called &#039;&#039;full flash pfs&#039;&#039; and is based on the parallel file system Lustre.&lt;br /&gt;
&lt;br /&gt;
=== Advantages of this file system ===&lt;br /&gt;
&lt;br /&gt;
# All storage devices are based on flash (no hard disks) with low access times. Hence performance is better compared to other parallel file systems for read and write access with small blocks and with small files, i.e. IOPS rates are improved.&lt;br /&gt;
# The file system is mounted on bwUniCluster 2.0 and HoreKa, i.e. it can be used to share data between these clusters.&lt;br /&gt;
&lt;br /&gt;
=== Access restrictions ===&lt;br /&gt;
&lt;br /&gt;
Only HoreKa users or KIT users of bwUniCluster 2.0 can use this file system.&lt;br /&gt;
&lt;br /&gt;
=== Using the file system ===&lt;br /&gt;
&lt;br /&gt;
As KIT or HoreKa user you can use the file system in the same way as a normal workspace. You just have to specify the name of the flash-based workspace file system using the option &#039;&#039;-F&#039;&#039; to all the commands that manage workspaces. On bwUniCluster 2.0 it is called &#039;&#039;ffuc&#039;&#039;, on HoreKa it is &#039;&#039;ffhk&#039;&#039;. For example, to create a workspace with name myws and a lifetime of 60 days on bwUniCluster 2.0 execute:&lt;br /&gt;
 ws_allocate -F ffuc myws 60&lt;br /&gt;
&lt;br /&gt;
If you want to use the full flash pfs on bwUniCluster 2.0 &#039;&#039;&#039;and&#039;&#039;&#039; HoreKa at the same time, please note that you only have to manage a particular workspace on one of the clusters since the name of the workspace directory is different. However, the path to each workspace is visible and can be used on both clusters.&lt;br /&gt;
&lt;br /&gt;
Other features are similar to normal workspaces. For example, we are able to restore expired workspaces for few weeks and you have to open a ticket to request the restore. There are quota limits with a default limit of 1 TiB capacity and 5 millions inodes per user. You can check your current usage with&lt;br /&gt;
 lfs quota -uh $(whoami) /pfs/work8&lt;br /&gt;
&lt;br /&gt;
== $TMPDIR ==&lt;br /&gt;
&lt;br /&gt;
The environment variable $TMPDIR contains the name of a directory which is local to each node. This means &lt;br /&gt;
that different tasks of a parallel application use different directories when they do not utilize the same node. &lt;br /&gt;
Although $TMPDIR points to the same path name for different nodes of a batch job, the physical location and the &lt;br /&gt;
content of this directory path on these nodes is different.&lt;br /&gt;
&lt;br /&gt;
This directory should be used for temporary files being accessed from the local node during job runtime. It should &lt;br /&gt;
also be used if you read the same data many times from a single node, e.g. if you are doing AI training. In this &lt;br /&gt;
case you should copy the data at the beginning of your batch job to $TMPDIR and read the data from there.&lt;br /&gt;
&lt;br /&gt;
The $TMPDIR directory is located on extremely fast SSD local storage devices. This means that performance &lt;br /&gt;
on small files is much better than on the parallel file systems. The capacity of $TMPDIR for each node type &lt;br /&gt;
can be checked in Table 1 above. The capacity is at least 900 GB.&lt;br /&gt;
&lt;br /&gt;
Each time a batch job is started, a subdirectory is created on the SSD of each node and assigned to the job. &lt;br /&gt;
$TMPDIR is set to the name of the subdirectory and this name contains the job ID so that it is unique &lt;br /&gt;
for each job. At the end of the job the subdirectory is removed.&lt;br /&gt;
&lt;br /&gt;
On login nodes $TMPDIR also points to a fast directory on a local SSD disk but this directory is not unique. &lt;br /&gt;
It is recommended to create your own unique subdirectory on these nodes. This directory should be used for the &lt;br /&gt;
installation of software packages. This means that the software package to be installed should be unpacked, &lt;br /&gt;
compiled and linked in a subdirectory of $TMPDIR. The real installation of the package (e.g. make install) &lt;br /&gt;
should be made into the $HOME folder.&lt;br /&gt;
&lt;br /&gt;
=== Usage example for $TMPDIR ===&lt;br /&gt;
&lt;br /&gt;
We will provide an example for using $TMPDIR and describe efficient data transfer to and from $TMPDIR. &lt;br /&gt;
&lt;br /&gt;
If you have a data set with many files which is frequently used by batch jobs you should create &lt;br /&gt;
a compressed archive on a workspace. This archive can be extracted on $TMPDIR inside your batch jobs. &lt;br /&gt;
Such an archive can be read efficiently from a parallel file system since it is a single huge file. &lt;br /&gt;
On a login node you can create such an archive with the following steps: &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Create a workspace to store the archive&lt;br /&gt;
[ab1234@uc2n997 ~]$ ws_allocate data-ssd 60&lt;br /&gt;
# Create the archive from a local dataset folder (example)&lt;br /&gt;
[ab1234@uc2n997 ~]$ tar -cvzf $(ws_find data-ssd)/dataset.tgz dataset/&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Inside a batch job extract the archive on $TMPDIR, read input data from $TMPDIR, store results on $TMPDIR &lt;br /&gt;
and save the results on a workspace: &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
# very simple example on how to use local $TMPDIR&lt;br /&gt;
#SBATCH -N 1&lt;br /&gt;
#SBATCH -t 24:00:00&lt;br /&gt;
&lt;br /&gt;
# Extract compressed input dataset on local SSD&lt;br /&gt;
tar -C $TMPDIR/ -xvzf $(ws_find data-ssd)/dataset.tgz&lt;br /&gt;
&lt;br /&gt;
# The application reads data from dataset on $TMPDIR and writes results to $TMPDIR&lt;br /&gt;
myapp -input $TMPDIR/dataset/myinput.csv -outputdir $TMPDIR/results&lt;br /&gt;
&lt;br /&gt;
# Before job completes save results on a workspace&lt;br /&gt;
rsync -av $TMPDIR/results $(ws_find data-ssd)/results-${SLURM_JOB_ID}/&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== LSDF Online Storage==&lt;br /&gt;
&lt;br /&gt;
In some cases it is useful to have access to the LSDF Online Storage on the HPC-Clusters also. Therefore the LSDF Online Storage is mounted on the Login- and Datamover-Nodes.&lt;br /&gt;
Furthermore it can be used on the compute nodes during the job runtime with the constraint flag &amp;quot;LSDF&amp;quot; ([[bwUniCluster_2.0_Slurm_common_Features|Slurm common features]]&lt;br /&gt;
). There is also an example about the LSDF batch usage: [[bwUniCluster_2.0_Slurm_common_Features#LSDF_Online_Storage|Slurm LSDF example ]] .&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
#SBATCH ...&lt;br /&gt;
#SBATCH --constraint=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 the following environment variables are available: $LSDF, $LSDFPROJECTS, $LSDFHOME.&lt;br /&gt;
Please request storage projects in the LSDF Online Storage seperately:&lt;br /&gt;
[https://www.lsdf.kit.edu/os/storagerequest/: LSDF Storage Request].&lt;br /&gt;
&lt;br /&gt;
==BeeOND (BeeGFS On-Demand)==&lt;br /&gt;
&lt;br /&gt;
Users of the UniCluster have possibility to request a private BeeOND (on-demand BeeGFS) parallel filesystem for each job. The file system is created during job startup and purged after your job.&lt;br /&gt;
&lt;br /&gt;
; &#039;&#039;&#039;IMPORTANT: &#039;&#039;&#039;&lt;br /&gt;
: All data on the private filesystem will be deleted after your job. Make sure you have copied your data back to the global filesystem (within job), e.g., $HOME or any workspace.&lt;br /&gt;
&lt;br /&gt;
BeeOND/BeeGFS can be used like any other parallel file system. Tools like cp or rsync can be used to copy data in and out. &lt;br /&gt;
&lt;br /&gt;
For detailed usage see here: [[BwUniCluster_2.0_Slurm_common_Features#BeeOND_.28BeeGFS_On-Demand.29|Request on-demand file system]]&lt;br /&gt;
&lt;br /&gt;
==Backup and Archiving==&lt;br /&gt;
&lt;br /&gt;
There are regular backups of all data of the home directories,whereas ACLs and extended attributes will&lt;br /&gt;
not be backuped. &lt;br /&gt;
&lt;br /&gt;
Please open a ticket if you need backuped data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:bwUniCluster 2.0|File System]][[Category:Hardware_and_Architecture|bwUniCluster 2.0]]&lt;/div&gt;</summary>
		<author><name>H Weber</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster2.0/Hardware_and_Architecture&amp;diff=12462</id>
		<title>BwUniCluster2.0/Hardware and Architecture</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster2.0/Hardware_and_Architecture&amp;diff=12462"/>
		<updated>2023-11-20T11:15:39Z</updated>

		<summary type="html">&lt;p&gt;H Weber: /* BeeOND (BeeGFS On-Demand) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Architecture of bwUniCluster 2.0 =&lt;br /&gt;
&lt;br /&gt;
The bwUniCluster 2.0 is a parallel computer with distributed memory. Each node of system consists of at least two Intel Xeon processor, local memory, disks, network adapters and optionally accelerators (NVIDIA Tesla V100, A100 or H100). All nodes are connected by a fast InfiniBand interconnect. In addition the file system&lt;br /&gt;
Lustre, that is connected by coupling the InfiniBand of the file server with the InfiniBand&lt;br /&gt;
switch of the compute cluster, is added to bwUniCluster 2.0 to provide a fast and scalable&lt;br /&gt;
parallel file system.&lt;br /&gt;
&lt;br /&gt;
The operating system on each node is Red Hat Enterprise Linux (RHEL) 8.4. A number of additional software packages like e.g. SLURM have been installed on top. Some of these components are of special interest to end users and are briefly&lt;br /&gt;
discussed in this document. Others which are of greater importance to system&lt;br /&gt;
administrators will not be covered by this document.&lt;br /&gt;
&lt;br /&gt;
The individual nodes of the system may act in different roles. According to the services supplied by the nodes, they are separated into disjoint groups. From an end users point of view the different groups of nodes are login nodes, compute nodes, file server nodes and administrative server nodes.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Login Nodes&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The login nodes are the only nodes that are directly accessible by end users. These nodes&lt;br /&gt;
are used for interactive login, file management, program development and interactive pre-&lt;br /&gt;
and postprocessing. Two nodes are dedicated to this service but they are all accessible via&lt;br /&gt;
one address and a DNS round-robin alias distributes the login sessions to the&lt;br /&gt;
different login nodes.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Compute Node&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The majority of nodes are compute nodes which are managed by a batch system. Users &lt;br /&gt;
submit their jobs to the SLURM batch system and a job is executed when the required resources become available (depending on its fair-share priority).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;File Server Nodes&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The hardware of the parallel file system Lustre incorporates some file server nodes; the file&lt;br /&gt;
system Lustre is connected by coupling the InfiniBand of the file server with the independent InfiniBand switch of the compute cluster. In addition to shared file space there is also local storage on the disks of each node (for details see chapter &amp;quot;File Systems&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Administrative Server Nodes&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Some other nodes are delivering additional services like resource management, external&lt;br /&gt;
network connection, administration etc. These nodes can be accessed directly by system administrators only.&lt;br /&gt;
&lt;br /&gt;
= Components of bwUniCluster =&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
! style=&amp;quot;width:9%&amp;quot;|&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Compute nodes &amp;quot;Thin&amp;quot;&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Compute nodes &amp;quot;HPC&amp;quot;&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Compute nodes &amp;quot;IceLake&amp;quot;&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Compute nodes &amp;quot;Fat&amp;quot;&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| GPU x4&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| GPU x8&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| IceLake + GPU x4&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Login&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Number of nodes&lt;br /&gt;
| 200 + 60&lt;br /&gt;
| 260&lt;br /&gt;
| 272&lt;br /&gt;
| 6&lt;br /&gt;
| 14&lt;br /&gt;
| 10&lt;br /&gt;
| 15&lt;br /&gt;
| 4&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Processors&lt;br /&gt;
| Intel Xeon Gold 6230&lt;br /&gt;
| Intel Xeon Gold 6230&lt;br /&gt;
| Intel Xeon Platinum 8358&lt;br /&gt;
| Intel Xeon Gold 6230&lt;br /&gt;
| Intel Xeon Gold 6230&lt;br /&gt;
| Intel Xeon Gold 6248&lt;br /&gt;
| Intel Xeon Platinum 8358&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Number of sockets&lt;br /&gt;
| 2&lt;br /&gt;
| 2&lt;br /&gt;
| 2&lt;br /&gt;
| 4&lt;br /&gt;
| 2&lt;br /&gt;
| 2&lt;br /&gt;
| 2&lt;br /&gt;
| 2&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Processor frequency (GHz)&lt;br /&gt;
| 2.1 Ghz&lt;br /&gt;
| 2.1 Ghz&lt;br /&gt;
| 2.6 Ghz&lt;br /&gt;
| 2.1 Ghz&lt;br /&gt;
| 2.1 Ghz&lt;br /&gt;
| 2.6 Ghz&lt;br /&gt;
| 2.5 Ghz&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Total number of cores&lt;br /&gt;
| 40&lt;br /&gt;
| 40&lt;br /&gt;
| 64&lt;br /&gt;
| 80&lt;br /&gt;
| 40&lt;br /&gt;
| 40&lt;br /&gt;
| 64&lt;br /&gt;
| 40&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Main memory&lt;br /&gt;
| 96 GB / 192 GB&lt;br /&gt;
| 96 GB&lt;br /&gt;
| 256 GB&lt;br /&gt;
| 3 TB&lt;br /&gt;
| 384 GB&lt;br /&gt;
| 768 GB&lt;br /&gt;
| 512 GB&lt;br /&gt;
| 384 GB&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Local SSD&lt;br /&gt;
| 960 GB SATA&lt;br /&gt;
| 960 GB SATA&lt;br /&gt;
| 1,8 TB NVMe&lt;br /&gt;
| 4,8 TB NVMe&lt;br /&gt;
| 3,2 TB NVMe&lt;br /&gt;
| 15  TB NVMe&lt;br /&gt;
| 6,4 TB NVMe&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Accelerators&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
| 4x NVIDIA Tesla V100&lt;br /&gt;
| 8x NVIDIA Tesla V100&lt;br /&gt;
| 4x NVIDIA A100 / 4x NVIDIA H100&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Accelerator memory&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
| 32 GB&lt;br /&gt;
| 32 GB&lt;br /&gt;
| 80 GB / 94 GB&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Interconnect&lt;br /&gt;
| IB HDR100 (blocking)&lt;br /&gt;
| IB HDR100&lt;br /&gt;
| IB HDR200&lt;br /&gt;
| IB HDR&lt;br /&gt;
| IB HDR&lt;br /&gt;
| IB HDR&lt;br /&gt;
| IB HDR200&lt;br /&gt;
| IB HDR100 (blocking)&lt;br /&gt;
|}&lt;br /&gt;
Table 1: Properties of the nodes&lt;br /&gt;
&lt;br /&gt;
= File Systems =&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 2.0 the parallel file system Lustre is used for most globally visible user data. Lustre is open source and Lustre solutions and support are available from different vendors. Nowadays, most of the biggest HPC systems are using Lustre. An initial home directory on a Lustre file system is created automatically after account activation, and the environment variable $HOME holds its name. Users can create so-called workspaces on another Lustre file system for non-permanent data with temporary lifetime. There is another workspace file system based on flash storage for special requirements available.&lt;br /&gt;
&lt;br /&gt;
Within a batch job further file systems are available: &lt;br /&gt;
* The directory $TMPDIR is only available and visible on the local node. It is located on fast SSD storage devices.&lt;br /&gt;
* On request a parallel on-demand file system (BeeOND) is created which uses the SSDs of the nodes which were allocated to the batch job.&lt;br /&gt;
* On request the external LSDF Online Storage is mounted on the nodes which were allocated to the batch job. This file system is based on the parallel file system Spectrum Scale. &lt;br /&gt;
&lt;br /&gt;
Some of the characteristics of the file systems are shown in Table 2.&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;width:100%; vertical-align:top; background:#f5fffa;border:1px solid #000000;padding:1px&amp;quot;&lt;br /&gt;
|- style=&amp;quot;width:20%;height=20px; text-align:left;padding:3px&amp;quot;&lt;br /&gt;
! style=&amp;quot;background-color:#AAA;padding:3px&amp;quot;| Property&lt;br /&gt;
! style=&amp;quot;background-color:#AAA;padding:3px&amp;quot;| $TMPDIR&lt;br /&gt;
! style=&amp;quot;background-color:#AAA;padding:3px&amp;quot;| BeeOND&lt;br /&gt;
! style=&amp;quot;background-color:#AAA;padding:3px&amp;quot;| $HOME&lt;br /&gt;
! style=&amp;quot;background-color:#AAA;padding:3px&amp;quot;| Workspace&lt;br /&gt;
! style=&amp;quot;background-color:#AAA;padding:3px&amp;quot;| Workspace &amp;lt;br&amp;gt; on flash&lt;br /&gt;
|- &lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Visibility &lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| local node&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| nodes of batch job&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| global&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| global&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| global&lt;br /&gt;
|- &lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Lifetime &lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| batch job runtime&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| batch job runtime&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| permanent&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| max. 240 days&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| max. 240 days&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Disk space &lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 960 GB - 6.4 TB &amp;lt;br&amp;gt; details see table 1&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| n*750 GB&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 1.2 PiB&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 4.1 PiB&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 236 TiB&lt;br /&gt;
|- &lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Capacity Quotas&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| no&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| no&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| yes &amp;lt;br&amp;gt; 1 TiB per user, for &amp;lt;br&amp;gt; MA users 256 GiB &amp;lt;br&amp;gt; also per organization&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| yes &amp;lt;br&amp;gt; 40 TiB per user&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| yes &amp;lt;br&amp;gt; 1 TiB per user&lt;br /&gt;
|- &lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Inode Quotas&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| no&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| no&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| yes &amp;lt;br&amp;gt; 10 million per user &amp;lt;br&amp;gt; for MA users 2.5 million&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| yes &amp;lt;br&amp;gt; 30 million per user&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| yes &amp;lt;br&amp;gt; 5 million per user&lt;br /&gt;
|- &lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Backup&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| no&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| no&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| yes&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| no&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| no&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Read perf./node&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 500 MB/s - 6 GB/s &amp;lt;br&amp;gt; depends on type of local SSD / job queue: &amp;lt;br&amp;gt; 520 MB/s @ single / multiple &amp;lt;br&amp;gt; 800 MB/s @ multiple_e &amp;lt;br&amp;gt; 6600 MB/s @ fat &amp;lt;br&amp;gt; 6500 MB/s @ gpu_4 &amp;lt;br&amp;gt; 6500 MB/s @ gpu_8&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 400 MB/s - 500 MB/s&amp;lt;br&amp;gt; depends on type of local SSDs / job queue: &amp;lt;br&amp;gt; 500 MB/s @ multiple &amp;lt;br&amp;gt; 400 MB/s @ multiple_e&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 1 GB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 1 GB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 1 GB/s&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Write perf./node&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 500 MB/s - 4 GB/s &amp;lt;br&amp;gt; depends on type of local SSD / job queue: &amp;lt;br&amp;gt; 500 MB/s @ single / multiple &amp;lt;br&amp;gt; 650 MB/s @ multiple_e &amp;lt;br&amp;gt; 2900 MB/s @ fat &amp;lt;br&amp;gt; 2090 MB/s @ gpu_4 &amp;lt;br&amp;gt; 4060 MB/s @ gpu_8&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 250 MB/s - 350 MB/s &amp;lt;br&amp;gt; depends on type of local SSDs / job queue: &amp;lt;br&amp;gt; 350 MB/s @ multiple &amp;lt;br&amp;gt; 250 MB/s @ multiple_e&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 1 GB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 1 GB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 1 GB/s&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Total read perf.&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| n*500-6000 MB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| n*400-500 MB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 18 GB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 54 GB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 45 GB/s&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Total write perf.&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| n*500-4000 MB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| n*250-350 MB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 18 GB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 54 GB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 38 GB/s&lt;br /&gt;
|}&lt;br /&gt;
---------------------------------------------------------------------------------------------------------&lt;br /&gt;
  global: all nodes of UniCluster access the same file system;&lt;br /&gt;
  local: each node has its own file system;&lt;br /&gt;
  permanent: files are stored permanently;&lt;br /&gt;
  batch job: files are removed at end of the batch job.&lt;br /&gt;
---------------------------------------------------------------------------------------------------------&lt;br /&gt;
Table 2: Properties of the file systems&lt;br /&gt;
&lt;br /&gt;
== Selecting the appropriate file system ==&lt;br /&gt;
&lt;br /&gt;
In general, you should separate your data and store it on the appropriate file system.&lt;br /&gt;
Permanently needed data like software or important results should be stored below $HOME&lt;br /&gt;
but capacity restrictions (quotas) apply. In case you accidentally deleted data on $HOME&lt;br /&gt;
you can usually restore it from backup. Permanent data which is not needed for months&lt;br /&gt;
or exceeds the capacity restrictions should be sent to the LSDF Online Storage &lt;br /&gt;
or to the archive and deleted from the file systems. Temporary data which is only needed on a single&lt;br /&gt;
node and which does not exceed the disk space shown in the table above should be stored&lt;br /&gt;
below $TMPDIR. Data which is read many times on a single node, e.g. if you are doing AI training, &lt;br /&gt;
should be copied to $TMPDIR and read from there. Temporary data which is used from many nodes &lt;br /&gt;
of your batch job and which is only needed during job runtime should be stored on a &lt;br /&gt;
parallel on-demand file system. Temporary data which can be recomputed or which is the &lt;br /&gt;
result of one job and input for another job should be stored in workspaces. The lifetime &lt;br /&gt;
of data in workspaces is limited and depends on the lifetime of the workspace which can be &lt;br /&gt;
several months.&lt;br /&gt;
&lt;br /&gt;
For further details please check the chapters below.&lt;br /&gt;
&lt;br /&gt;
== $HOME ==&lt;br /&gt;
&lt;br /&gt;
The home directories of bwUniCluster 2.0 (uc2) users are located in the parallel file system Lustre.&lt;br /&gt;
You have access to your home directory from all nodes of uc2. A regular backup of these directories &lt;br /&gt;
to tape archive is done automatically. The directory $HOME is used to hold those files that are&lt;br /&gt;
permanently used like source codes, configuration files, executable programs etc. &lt;br /&gt;
&lt;br /&gt;
On uc2 there is a default user quota limit of 1 TiB and 10 million inodes (files and directories) per user. &lt;br /&gt;
For users of University of Mannheim the limit is 256 GiB and 2.5 million inodes.&lt;br /&gt;
You can check your current usage and limits with the command&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ lfs quota -uh $(whoami) $HOME&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In addition to the user limit there is a limit of your organization (e.g. university) which depends on the financial share. This limit is enforced with so-called Lustre project quotas. You can show the current usage and limits of your organization with the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
lfs quota -ph $(grep $(echo $HOME | sed -e &amp;quot;s|/[^/]*/[^/]*$||&amp;quot;) /pfs/data5/project_ids.txt | cut -f 1 -d\ ) $HOME&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Workspaces ==&lt;br /&gt;
&lt;br /&gt;
On uc2 workspaces can be used to store large non-permanent data sets, e.g. restart files or output&lt;br /&gt;
data that has to be post-processed. The file system used for workspaces is also the parallel file system Lustre. This file system is especially designed for parallel access and for a high throughput to large&lt;br /&gt;
files. It is able to provide high data transfer rates of up to 54 GB/s write and read performance when data access is parallel. &lt;br /&gt;
&lt;br /&gt;
Workspaces have a lifetime and the data on a workspace expires as a whole after a fixed period. The maximum lifetime of a workspace is 60 days, but it can be renewed at the end of that period 3 times to a total maximum of 240 days after workspace generation. If a workspace has inadvertently expired we can restore the data during a limited time (few weeks). In this case you should create a new workspace and report the name of the new and of the expired workspace in a ticket.&lt;br /&gt;
&lt;br /&gt;
Creating, deleting, finding and extending workspaces is explained on the  [[workspace]] page.&lt;br /&gt;
&lt;br /&gt;
On uc2 there is a default user quota limit of 40 TiB and 30 million inodes (files and directories) per user. &lt;br /&gt;
You can chek your current usage and limits with the command&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ lfs quota -uh $(whoami) /pfs/work7&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note that the quotas include data and inodes for all of your workspaces and all of your expired workspaces (as long as they are not yet completely removed).&lt;br /&gt;
&lt;br /&gt;
=== Reminder for workspace deletion ===&lt;br /&gt;
&lt;br /&gt;
Normally you will get an email every day starting 7 days before a workspace expires. You can send yourself a calender entry which reminds you when a workspace will be automatically deleted:&lt;br /&gt;
&lt;br /&gt;
 $ ws_send_ical.sh &amp;lt;workspace&amp;gt; &amp;lt;email&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Improving Performance on $HOME and workspaces ==&lt;br /&gt;
&lt;br /&gt;
The following recommendations might help to improve throughput and metadata&lt;br /&gt;
performance on Lustre filesystems.&lt;br /&gt;
&lt;br /&gt;
=== &#039;&#039;&#039;Improving Throughput Performance&#039;&#039;&#039; ===&lt;br /&gt;
&lt;br /&gt;
Depending on your application some adaptations might be necessary if you want to reach&lt;br /&gt;
the full bandwidth of the filesystems. Parallel filesystems typically stripe files over storage subsystems, i.e. large files are separated into stripes and distributed to different storage subsystems. In Lustre, the size of these stripes (sometimes also mentioned as chunks) is called stripe size and the number of used storage subsystems is called stripe count.&lt;br /&gt;
&lt;br /&gt;
When you are designing your application you should consider that the performance of&lt;br /&gt;
parallel filesystems is generally better if data is transferred in large blocks and stored in&lt;br /&gt;
few large files. In more detail, to increase throughput performance of a parallel application&lt;br /&gt;
following aspects should be considered:&lt;br /&gt;
&lt;br /&gt;
* collect large chunks of data and write them sequentially at once,&lt;br /&gt;
&lt;br /&gt;
* to exploit complete filesystem bandwidth use several clients,&lt;br /&gt;
&lt;br /&gt;
* avoid competitive file access by different tasks or use blocks with boundaries at stripe size (default is 1MB),&lt;br /&gt;
&lt;br /&gt;
* if files are small enough for the SSDs and are only used by one process store them on $TMPDIR.&lt;br /&gt;
&lt;br /&gt;
With previous Lustre versions adapting the Lustre stripe count was the most important optimization. However, for the workspaces of uc2 the new Lustre feature Progressive File Layouts has been used to define file striping parameters. This means that the stripe count is adapted if the file size is growing. In normal cases users no longer need to adapt file striping parameters in case they have very huge files or in order to reach better performance. &lt;br /&gt;
&lt;br /&gt;
If you know what you are doing you can still change striping parameters, e.g. the stripe count, of a directory and of newly created files. New files and directories inherit the stripe count from the parent directory. E.g. if you want to enhance throughput on a single very large file which is created in the directory $HOME/my_output_dir you can use the command&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ lfs setstripe -c-1 $HOME/my_output_dir&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
to change the stripe count to -1 which means that all storage subsystems of the file system are used to store that file. If you change the stripe count of a directory the stripe count of existing files inside this&lt;br /&gt;
directory is not changed. If you want to change the stripe count of existing files, change&lt;br /&gt;
the stripe count of the parent directory, copy the files to new files, remove the old files&lt;br /&gt;
and move the new files back to the old name. In order to check the stripe setting of&lt;br /&gt;
the file my_file use&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ lfs getstripe my_file&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Also note that changes on the striping parameters (e.g. stripe count) are not saved in the&lt;br /&gt;
backup, i.e. if directories have to be recreated this information is lost and the default stripe&lt;br /&gt;
count will be used. Therefore, you should annotate for which directories you made changes&lt;br /&gt;
to the striping parameters so that you can repeat these changes if required.&lt;br /&gt;
&lt;br /&gt;
=== &#039;&#039;&#039;Improving Metadata Performance&#039;&#039;&#039; ===&lt;br /&gt;
&lt;br /&gt;
Metadata performance on parallel file systems is usually not as good as with local&lt;br /&gt;
filesystems. In addition, it is usually not scalable, i.e. a limited resource. Therefore,&lt;br /&gt;
you should omit metadata operations whenever possible. For example, it is much better&lt;br /&gt;
to have few large files than lots of small files. In more detail, to increase metadata&lt;br /&gt;
performance of a parallel application following aspects should be considered:&lt;br /&gt;
&lt;br /&gt;
* avoid creating many small files,&lt;br /&gt;
&lt;br /&gt;
* avoid competitive directory access, e.g. by creating files in separate subdirectories for each task,&lt;br /&gt;
&lt;br /&gt;
* if many small files are only used within a batch job and accessed by one process store them on $TMPDIR,&lt;br /&gt;
&lt;br /&gt;
* change the default colorization setting of the command ls (see below).&lt;br /&gt;
&lt;br /&gt;
On modern Linux systems, the GNU ls command often uses colorization by default to&lt;br /&gt;
visually highlight the file type; this is especially true if the command is run within a terminal&lt;br /&gt;
session. This is because the default shell profile initializations usually contain an alias&lt;br /&gt;
directive similar to the following for the ls command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ alias ls=&amp;quot;ls --color=tty&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
However, running the ls command in this way for files on a Lustre file system requires&lt;br /&gt;
a stat() call to be used to determine the file type. This can result in a performance&lt;br /&gt;
overhead, because the stat() call always needs to determine the size of a file, and that&lt;br /&gt;
in turn means that the client node must query the object size of all the backing objects&lt;br /&gt;
that make up a file. As a result of the default colorization setting, running a simple&lt;br /&gt;
ls command on a Lustre file system often takes as much time as running the ls command&lt;br /&gt;
with the -l option (the same is true if the -F, -p, or the -classify option, or any other option &lt;br /&gt;
that requires information from a stat() call, is used). To avoid this performance overhead&lt;br /&gt;
when using ls commands, add an alias directive similar to the following&lt;br /&gt;
to your shell startup script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ alias ls=&amp;quot;ls --color=never&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Workspaces on flash storage ==&lt;br /&gt;
&lt;br /&gt;
There is another workspace file system for special requirements available. The file system is called &#039;&#039;full flash pfs&#039;&#039; and is based on the parallel file system Lustre.&lt;br /&gt;
&lt;br /&gt;
=== Advantages of this file system ===&lt;br /&gt;
&lt;br /&gt;
# All storage devices are based on flash (no hard disks) with low access times. Hence performance is better compared to other parallel file systems for read and write access with small blocks and with small files, i.e. IOPS rates are improved.&lt;br /&gt;
# The file system is mounted on bwUniCluster 2.0 and HoreKa, i.e. it can be used to share data between these clusters.&lt;br /&gt;
&lt;br /&gt;
=== Access restrictions ===&lt;br /&gt;
&lt;br /&gt;
Only HoreKa users or KIT users of bwUniCluster 2.0 can use this file system.&lt;br /&gt;
&lt;br /&gt;
=== Using the file system ===&lt;br /&gt;
&lt;br /&gt;
As KIT or HoreKa user you can use the file system in the same way as a normal workspace. You just have to specify the name of the flash-based workspace file system using the option &#039;&#039;-F&#039;&#039; to all the commands that manage workspaces. On bwUniCluster 2.0 it is called &#039;&#039;ffuc&#039;&#039;, on HoreKa it is &#039;&#039;ffhk&#039;&#039;. For example, to create a workspace with name myws and a lifetime of 60 days on bwUniCluster 2.0 execute:&lt;br /&gt;
 ws_allocate -F ffuc myws 60&lt;br /&gt;
&lt;br /&gt;
If you want to use the full flash pfs on bwUniCluster 2.0 &#039;&#039;&#039;and&#039;&#039;&#039; HoreKa at the same time, please note that you only have to manage a particular workspace on one of the clusters since the name of the workspace directory is different. However, the path to each workspace is visible and can be used on both clusters.&lt;br /&gt;
&lt;br /&gt;
Other features are similar to normal workspaces. For example, we are able to restore expired workspaces for few weeks and you have to open a ticket to request the restore. There are quota limits with a default limit of 1 TiB capacity and 5 millions inodes per user. You can check your current usage with&lt;br /&gt;
 lfs quota -uh $(whoami) /pfs/work8&lt;br /&gt;
&lt;br /&gt;
== $TMPDIR ==&lt;br /&gt;
&lt;br /&gt;
The environment variable $TMPDIR contains the name of a directory which is local to each node. This means &lt;br /&gt;
that different tasks of a parallel application use different directories when they do not utilize the same node. &lt;br /&gt;
Although $TMPDIR points to the same path name for different nodes of a batch job, the physical location and the &lt;br /&gt;
content of this directory path on these nodes is different.&lt;br /&gt;
&lt;br /&gt;
This directory should be used for temporary files being accessed from the local node during job runtime. It should &lt;br /&gt;
also be used if you read the same data many times from a single node, e.g. if you are doing AI training. In this &lt;br /&gt;
case you should copy the data at the beginning of your batch job to $TMPDIR and read the data from there.&lt;br /&gt;
&lt;br /&gt;
The $TMPDIR directory is located on extremely fast SSD local storage devices. This means that performance &lt;br /&gt;
on small files is much better than on the parallel file systems. The capacity of $TMPDIR for each node type &lt;br /&gt;
can be checked in Table 1 above. The capacity is at least 900 GB.&lt;br /&gt;
&lt;br /&gt;
Each time a batch job is started, a subdirectory is created on the SSD of each node and assigned to the job. &lt;br /&gt;
$TMPDIR is set to the name of the subdirectory and this name contains the job ID so that it is unique &lt;br /&gt;
for each job. At the end of the job the subdirectory is removed.&lt;br /&gt;
&lt;br /&gt;
On login nodes $TMPDIR also points to a fast directory on a local SSD disk but this directory is not unique. &lt;br /&gt;
It is recommended to create your own unique subdirectory on these nodes. This directory should be used for the &lt;br /&gt;
installation of software packages. This means that the software package to be installed should be unpacked, &lt;br /&gt;
compiled and linked in a subdirectory of $TMPDIR. The real installation of the package (e.g. make install) &lt;br /&gt;
should be made into the $HOME folder.&lt;br /&gt;
&lt;br /&gt;
=== Usage example for $TMPDIR ===&lt;br /&gt;
&lt;br /&gt;
We will provide an example for using $TMPDIR and describe efficient data transfer to and from $TMPDIR. &lt;br /&gt;
&lt;br /&gt;
If you have a data set with many files which is frequently used by batch jobs you should create &lt;br /&gt;
a compressed archive on a workspace. This archive can be extracted on $TMPDIR inside your batch jobs. &lt;br /&gt;
Such an archive can be read efficiently from a parallel file system since it is a single huge file. &lt;br /&gt;
On a login node you can create such an archive with the following steps: &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Create a workspace to store the archive&lt;br /&gt;
[ab1234@uc2n997 ~]$ ws_allocate data-ssd 60&lt;br /&gt;
# Create the archive from a local dataset folder (example)&lt;br /&gt;
[ab1234@uc2n997 ~]$ tar -cvzf $(ws_find data-ssd)/dataset.tgz dataset/&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Inside a batch job extract the archive on $TMPDIR, read input data from $TMPDIR, store results on $TMPDIR &lt;br /&gt;
and save the results on a workspace: &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
# very simple example on how to use local $TMPDIR&lt;br /&gt;
#SBATCH -N 1&lt;br /&gt;
#SBATCH -t 24:00:00&lt;br /&gt;
&lt;br /&gt;
# Extract compressed input dataset on local SSD&lt;br /&gt;
tar -C $TMPDIR/ -xvzf $(ws_find data-ssd)/dataset.tgz&lt;br /&gt;
&lt;br /&gt;
# The application reads data from dataset on $TMPDIR and writes results to $TMPDIR&lt;br /&gt;
myapp -input $TMPDIR/dataset/myinput.csv -outputdir $TMPDIR/results&lt;br /&gt;
&lt;br /&gt;
# Before job completes save results on a workspace&lt;br /&gt;
rsync -av $TMPDIR/results $(ws_find data-ssd)/results-${SLURM_JOB_ID}/&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== LSDF Online Storage==&lt;br /&gt;
&lt;br /&gt;
In some cases it is useful to have access to the LSDF Online Storage on the HPC-Clusters also. Therefore the LSDF Online Storage is mounted on the Login- and Datamover-Nodes.&lt;br /&gt;
Furthermore it can be used on the compute nodes during the job runtime with the constraint flag &amp;quot;LSDF&amp;quot; ([[bwUniCluster_2.0_Slurm_common_Features|Slurm common features]]&lt;br /&gt;
). There is also an example about the LSDF batch usage: [[bwUniCluster_2.0_Slurm_common_Features#LSDF_Online_Storage|Slurm LSDF example ]] .&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
#SBATCH ...&lt;br /&gt;
#SBATCH --constraint=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 the following environment variables are available: $LSDF, $LSDFPROJECTS, $LSDFHOME.&lt;br /&gt;
Please request storage projects in the LSDF Online Storage seperately:&lt;br /&gt;
[https://www.lsdf.kit.edu/os/storagerequest/: LSDF Storage Request].&lt;br /&gt;
&lt;br /&gt;
==BeeOND (BeeGFS On-Demand)==&lt;br /&gt;
&lt;br /&gt;
Users of the UniCluster have possibility to request a private BeeOND (on-demand BeeGFS) parallel filesystem for each job. The file system is created during job startup and purged after your job.&lt;br /&gt;
&lt;br /&gt;
; &#039;&#039;&#039;IMPORTANT: &#039;&#039;&#039;&lt;br /&gt;
: All data on the private filesystem will be deleted after your job. Make sure you have copied your data back to the global filesystem (within job), e.g., $HOME or any workspace.&lt;br /&gt;
&lt;br /&gt;
BeeOND/BeeGFS can be used like any other parallel file system. Tools like cp or rsync can be used to copy data in and out. &lt;br /&gt;
&lt;br /&gt;
For detailed usage see here:[[BwUniCluster_2.0_Slurm_common_Features#BeeOND_.28BeeGFS_On-Demand.29|Request on-demand file system]]&lt;br /&gt;
&lt;br /&gt;
==Backup and Archiving==&lt;br /&gt;
&lt;br /&gt;
There are regular backups of all data of the home directories,whereas ACLs and extended attributes will&lt;br /&gt;
not be backuped. &lt;br /&gt;
&lt;br /&gt;
Please open a ticket if you need backuped data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:bwUniCluster 2.0|File System]][[Category:Hardware_and_Architecture|bwUniCluster 2.0]]&lt;/div&gt;</summary>
		<author><name>H Weber</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster2.0/Hardware_and_Architecture&amp;diff=12461</id>
		<title>BwUniCluster2.0/Hardware and Architecture</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster2.0/Hardware_and_Architecture&amp;diff=12461"/>
		<updated>2023-11-20T11:15:06Z</updated>

		<summary type="html">&lt;p&gt;H Weber: /* BeeOND (BeeGFS On-Demand) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Architecture of bwUniCluster 2.0 =&lt;br /&gt;
&lt;br /&gt;
The bwUniCluster 2.0 is a parallel computer with distributed memory. Each node of system consists of at least two Intel Xeon processor, local memory, disks, network adapters and optionally accelerators (NVIDIA Tesla V100, A100 or H100). All nodes are connected by a fast InfiniBand interconnect. In addition the file system&lt;br /&gt;
Lustre, that is connected by coupling the InfiniBand of the file server with the InfiniBand&lt;br /&gt;
switch of the compute cluster, is added to bwUniCluster 2.0 to provide a fast and scalable&lt;br /&gt;
parallel file system.&lt;br /&gt;
&lt;br /&gt;
The operating system on each node is Red Hat Enterprise Linux (RHEL) 8.4. A number of additional software packages like e.g. SLURM have been installed on top. Some of these components are of special interest to end users and are briefly&lt;br /&gt;
discussed in this document. Others which are of greater importance to system&lt;br /&gt;
administrators will not be covered by this document.&lt;br /&gt;
&lt;br /&gt;
The individual nodes of the system may act in different roles. According to the services supplied by the nodes, they are separated into disjoint groups. From an end users point of view the different groups of nodes are login nodes, compute nodes, file server nodes and administrative server nodes.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Login Nodes&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The login nodes are the only nodes that are directly accessible by end users. These nodes&lt;br /&gt;
are used for interactive login, file management, program development and interactive pre-&lt;br /&gt;
and postprocessing. Two nodes are dedicated to this service but they are all accessible via&lt;br /&gt;
one address and a DNS round-robin alias distributes the login sessions to the&lt;br /&gt;
different login nodes.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Compute Node&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The majority of nodes are compute nodes which are managed by a batch system. Users &lt;br /&gt;
submit their jobs to the SLURM batch system and a job is executed when the required resources become available (depending on its fair-share priority).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;File Server Nodes&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The hardware of the parallel file system Lustre incorporates some file server nodes; the file&lt;br /&gt;
system Lustre is connected by coupling the InfiniBand of the file server with the independent InfiniBand switch of the compute cluster. In addition to shared file space there is also local storage on the disks of each node (for details see chapter &amp;quot;File Systems&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Administrative Server Nodes&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Some other nodes are delivering additional services like resource management, external&lt;br /&gt;
network connection, administration etc. These nodes can be accessed directly by system administrators only.&lt;br /&gt;
&lt;br /&gt;
= Components of bwUniCluster =&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
! style=&amp;quot;width:9%&amp;quot;|&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Compute nodes &amp;quot;Thin&amp;quot;&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Compute nodes &amp;quot;HPC&amp;quot;&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Compute nodes &amp;quot;IceLake&amp;quot;&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Compute nodes &amp;quot;Fat&amp;quot;&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| GPU x4&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| GPU x8&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| IceLake + GPU x4&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Login&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Number of nodes&lt;br /&gt;
| 200 + 60&lt;br /&gt;
| 260&lt;br /&gt;
| 272&lt;br /&gt;
| 6&lt;br /&gt;
| 14&lt;br /&gt;
| 10&lt;br /&gt;
| 15&lt;br /&gt;
| 4&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Processors&lt;br /&gt;
| Intel Xeon Gold 6230&lt;br /&gt;
| Intel Xeon Gold 6230&lt;br /&gt;
| Intel Xeon Platinum 8358&lt;br /&gt;
| Intel Xeon Gold 6230&lt;br /&gt;
| Intel Xeon Gold 6230&lt;br /&gt;
| Intel Xeon Gold 6248&lt;br /&gt;
| Intel Xeon Platinum 8358&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Number of sockets&lt;br /&gt;
| 2&lt;br /&gt;
| 2&lt;br /&gt;
| 2&lt;br /&gt;
| 4&lt;br /&gt;
| 2&lt;br /&gt;
| 2&lt;br /&gt;
| 2&lt;br /&gt;
| 2&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Processor frequency (GHz)&lt;br /&gt;
| 2.1 Ghz&lt;br /&gt;
| 2.1 Ghz&lt;br /&gt;
| 2.6 Ghz&lt;br /&gt;
| 2.1 Ghz&lt;br /&gt;
| 2.1 Ghz&lt;br /&gt;
| 2.6 Ghz&lt;br /&gt;
| 2.5 Ghz&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Total number of cores&lt;br /&gt;
| 40&lt;br /&gt;
| 40&lt;br /&gt;
| 64&lt;br /&gt;
| 80&lt;br /&gt;
| 40&lt;br /&gt;
| 40&lt;br /&gt;
| 64&lt;br /&gt;
| 40&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Main memory&lt;br /&gt;
| 96 GB / 192 GB&lt;br /&gt;
| 96 GB&lt;br /&gt;
| 256 GB&lt;br /&gt;
| 3 TB&lt;br /&gt;
| 384 GB&lt;br /&gt;
| 768 GB&lt;br /&gt;
| 512 GB&lt;br /&gt;
| 384 GB&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Local SSD&lt;br /&gt;
| 960 GB SATA&lt;br /&gt;
| 960 GB SATA&lt;br /&gt;
| 1,8 TB NVMe&lt;br /&gt;
| 4,8 TB NVMe&lt;br /&gt;
| 3,2 TB NVMe&lt;br /&gt;
| 15  TB NVMe&lt;br /&gt;
| 6,4 TB NVMe&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Accelerators&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
| 4x NVIDIA Tesla V100&lt;br /&gt;
| 8x NVIDIA Tesla V100&lt;br /&gt;
| 4x NVIDIA A100 / 4x NVIDIA H100&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Accelerator memory&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
| 32 GB&lt;br /&gt;
| 32 GB&lt;br /&gt;
| 80 GB / 94 GB&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Interconnect&lt;br /&gt;
| IB HDR100 (blocking)&lt;br /&gt;
| IB HDR100&lt;br /&gt;
| IB HDR200&lt;br /&gt;
| IB HDR&lt;br /&gt;
| IB HDR&lt;br /&gt;
| IB HDR&lt;br /&gt;
| IB HDR200&lt;br /&gt;
| IB HDR100 (blocking)&lt;br /&gt;
|}&lt;br /&gt;
Table 1: Properties of the nodes&lt;br /&gt;
&lt;br /&gt;
= File Systems =&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 2.0 the parallel file system Lustre is used for most globally visible user data. Lustre is open source and Lustre solutions and support are available from different vendors. Nowadays, most of the biggest HPC systems are using Lustre. An initial home directory on a Lustre file system is created automatically after account activation, and the environment variable $HOME holds its name. Users can create so-called workspaces on another Lustre file system for non-permanent data with temporary lifetime. There is another workspace file system based on flash storage for special requirements available.&lt;br /&gt;
&lt;br /&gt;
Within a batch job further file systems are available: &lt;br /&gt;
* The directory $TMPDIR is only available and visible on the local node. It is located on fast SSD storage devices.&lt;br /&gt;
* On request a parallel on-demand file system (BeeOND) is created which uses the SSDs of the nodes which were allocated to the batch job.&lt;br /&gt;
* On request the external LSDF Online Storage is mounted on the nodes which were allocated to the batch job. This file system is based on the parallel file system Spectrum Scale. &lt;br /&gt;
&lt;br /&gt;
Some of the characteristics of the file systems are shown in Table 2.&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;width:100%; vertical-align:top; background:#f5fffa;border:1px solid #000000;padding:1px&amp;quot;&lt;br /&gt;
|- style=&amp;quot;width:20%;height=20px; text-align:left;padding:3px&amp;quot;&lt;br /&gt;
! style=&amp;quot;background-color:#AAA;padding:3px&amp;quot;| Property&lt;br /&gt;
! style=&amp;quot;background-color:#AAA;padding:3px&amp;quot;| $TMPDIR&lt;br /&gt;
! style=&amp;quot;background-color:#AAA;padding:3px&amp;quot;| BeeOND&lt;br /&gt;
! style=&amp;quot;background-color:#AAA;padding:3px&amp;quot;| $HOME&lt;br /&gt;
! style=&amp;quot;background-color:#AAA;padding:3px&amp;quot;| Workspace&lt;br /&gt;
! style=&amp;quot;background-color:#AAA;padding:3px&amp;quot;| Workspace &amp;lt;br&amp;gt; on flash&lt;br /&gt;
|- &lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Visibility &lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| local node&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| nodes of batch job&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| global&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| global&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| global&lt;br /&gt;
|- &lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Lifetime &lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| batch job runtime&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| batch job runtime&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| permanent&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| max. 240 days&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| max. 240 days&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Disk space &lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 960 GB - 6.4 TB &amp;lt;br&amp;gt; details see table 1&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| n*750 GB&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 1.2 PiB&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 4.1 PiB&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 236 TiB&lt;br /&gt;
|- &lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Capacity Quotas&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| no&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| no&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| yes &amp;lt;br&amp;gt; 1 TiB per user, for &amp;lt;br&amp;gt; MA users 256 GiB &amp;lt;br&amp;gt; also per organization&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| yes &amp;lt;br&amp;gt; 40 TiB per user&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| yes &amp;lt;br&amp;gt; 1 TiB per user&lt;br /&gt;
|- &lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Inode Quotas&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| no&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| no&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| yes &amp;lt;br&amp;gt; 10 million per user &amp;lt;br&amp;gt; for MA users 2.5 million&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| yes &amp;lt;br&amp;gt; 30 million per user&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| yes &amp;lt;br&amp;gt; 5 million per user&lt;br /&gt;
|- &lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Backup&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| no&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| no&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| yes&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| no&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| no&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Read perf./node&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 500 MB/s - 6 GB/s &amp;lt;br&amp;gt; depends on type of local SSD / job queue: &amp;lt;br&amp;gt; 520 MB/s @ single / multiple &amp;lt;br&amp;gt; 800 MB/s @ multiple_e &amp;lt;br&amp;gt; 6600 MB/s @ fat &amp;lt;br&amp;gt; 6500 MB/s @ gpu_4 &amp;lt;br&amp;gt; 6500 MB/s @ gpu_8&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 400 MB/s - 500 MB/s&amp;lt;br&amp;gt; depends on type of local SSDs / job queue: &amp;lt;br&amp;gt; 500 MB/s @ multiple &amp;lt;br&amp;gt; 400 MB/s @ multiple_e&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 1 GB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 1 GB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 1 GB/s&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Write perf./node&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 500 MB/s - 4 GB/s &amp;lt;br&amp;gt; depends on type of local SSD / job queue: &amp;lt;br&amp;gt; 500 MB/s @ single / multiple &amp;lt;br&amp;gt; 650 MB/s @ multiple_e &amp;lt;br&amp;gt; 2900 MB/s @ fat &amp;lt;br&amp;gt; 2090 MB/s @ gpu_4 &amp;lt;br&amp;gt; 4060 MB/s @ gpu_8&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 250 MB/s - 350 MB/s &amp;lt;br&amp;gt; depends on type of local SSDs / job queue: &amp;lt;br&amp;gt; 350 MB/s @ multiple &amp;lt;br&amp;gt; 250 MB/s @ multiple_e&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 1 GB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 1 GB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 1 GB/s&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Total read perf.&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| n*500-6000 MB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| n*400-500 MB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 18 GB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 54 GB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 45 GB/s&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Total write perf.&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| n*500-4000 MB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| n*250-350 MB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 18 GB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 54 GB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 38 GB/s&lt;br /&gt;
|}&lt;br /&gt;
---------------------------------------------------------------------------------------------------------&lt;br /&gt;
  global: all nodes of UniCluster access the same file system;&lt;br /&gt;
  local: each node has its own file system;&lt;br /&gt;
  permanent: files are stored permanently;&lt;br /&gt;
  batch job: files are removed at end of the batch job.&lt;br /&gt;
---------------------------------------------------------------------------------------------------------&lt;br /&gt;
Table 2: Properties of the file systems&lt;br /&gt;
&lt;br /&gt;
== Selecting the appropriate file system ==&lt;br /&gt;
&lt;br /&gt;
In general, you should separate your data and store it on the appropriate file system.&lt;br /&gt;
Permanently needed data like software or important results should be stored below $HOME&lt;br /&gt;
but capacity restrictions (quotas) apply. In case you accidentally deleted data on $HOME&lt;br /&gt;
you can usually restore it from backup. Permanent data which is not needed for months&lt;br /&gt;
or exceeds the capacity restrictions should be sent to the LSDF Online Storage &lt;br /&gt;
or to the archive and deleted from the file systems. Temporary data which is only needed on a single&lt;br /&gt;
node and which does not exceed the disk space shown in the table above should be stored&lt;br /&gt;
below $TMPDIR. Data which is read many times on a single node, e.g. if you are doing AI training, &lt;br /&gt;
should be copied to $TMPDIR and read from there. Temporary data which is used from many nodes &lt;br /&gt;
of your batch job and which is only needed during job runtime should be stored on a &lt;br /&gt;
parallel on-demand file system. Temporary data which can be recomputed or which is the &lt;br /&gt;
result of one job and input for another job should be stored in workspaces. The lifetime &lt;br /&gt;
of data in workspaces is limited and depends on the lifetime of the workspace which can be &lt;br /&gt;
several months.&lt;br /&gt;
&lt;br /&gt;
For further details please check the chapters below.&lt;br /&gt;
&lt;br /&gt;
== $HOME ==&lt;br /&gt;
&lt;br /&gt;
The home directories of bwUniCluster 2.0 (uc2) users are located in the parallel file system Lustre.&lt;br /&gt;
You have access to your home directory from all nodes of uc2. A regular backup of these directories &lt;br /&gt;
to tape archive is done automatically. The directory $HOME is used to hold those files that are&lt;br /&gt;
permanently used like source codes, configuration files, executable programs etc. &lt;br /&gt;
&lt;br /&gt;
On uc2 there is a default user quota limit of 1 TiB and 10 million inodes (files and directories) per user. &lt;br /&gt;
For users of University of Mannheim the limit is 256 GiB and 2.5 million inodes.&lt;br /&gt;
You can check your current usage and limits with the command&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ lfs quota -uh $(whoami) $HOME&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In addition to the user limit there is a limit of your organization (e.g. university) which depends on the financial share. This limit is enforced with so-called Lustre project quotas. You can show the current usage and limits of your organization with the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
lfs quota -ph $(grep $(echo $HOME | sed -e &amp;quot;s|/[^/]*/[^/]*$||&amp;quot;) /pfs/data5/project_ids.txt | cut -f 1 -d\ ) $HOME&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Workspaces ==&lt;br /&gt;
&lt;br /&gt;
On uc2 workspaces can be used to store large non-permanent data sets, e.g. restart files or output&lt;br /&gt;
data that has to be post-processed. The file system used for workspaces is also the parallel file system Lustre. This file system is especially designed for parallel access and for a high throughput to large&lt;br /&gt;
files. It is able to provide high data transfer rates of up to 54 GB/s write and read performance when data access is parallel. &lt;br /&gt;
&lt;br /&gt;
Workspaces have a lifetime and the data on a workspace expires as a whole after a fixed period. The maximum lifetime of a workspace is 60 days, but it can be renewed at the end of that period 3 times to a total maximum of 240 days after workspace generation. If a workspace has inadvertently expired we can restore the data during a limited time (few weeks). In this case you should create a new workspace and report the name of the new and of the expired workspace in a ticket.&lt;br /&gt;
&lt;br /&gt;
Creating, deleting, finding and extending workspaces is explained on the  [[workspace]] page.&lt;br /&gt;
&lt;br /&gt;
On uc2 there is a default user quota limit of 40 TiB and 30 million inodes (files and directories) per user. &lt;br /&gt;
You can chek your current usage and limits with the command&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ lfs quota -uh $(whoami) /pfs/work7&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note that the quotas include data and inodes for all of your workspaces and all of your expired workspaces (as long as they are not yet completely removed).&lt;br /&gt;
&lt;br /&gt;
=== Reminder for workspace deletion ===&lt;br /&gt;
&lt;br /&gt;
Normally you will get an email every day starting 7 days before a workspace expires. You can send yourself a calender entry which reminds you when a workspace will be automatically deleted:&lt;br /&gt;
&lt;br /&gt;
 $ ws_send_ical.sh &amp;lt;workspace&amp;gt; &amp;lt;email&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Improving Performance on $HOME and workspaces ==&lt;br /&gt;
&lt;br /&gt;
The following recommendations might help to improve throughput and metadata&lt;br /&gt;
performance on Lustre filesystems.&lt;br /&gt;
&lt;br /&gt;
=== &#039;&#039;&#039;Improving Throughput Performance&#039;&#039;&#039; ===&lt;br /&gt;
&lt;br /&gt;
Depending on your application some adaptations might be necessary if you want to reach&lt;br /&gt;
the full bandwidth of the filesystems. Parallel filesystems typically stripe files over storage subsystems, i.e. large files are separated into stripes and distributed to different storage subsystems. In Lustre, the size of these stripes (sometimes also mentioned as chunks) is called stripe size and the number of used storage subsystems is called stripe count.&lt;br /&gt;
&lt;br /&gt;
When you are designing your application you should consider that the performance of&lt;br /&gt;
parallel filesystems is generally better if data is transferred in large blocks and stored in&lt;br /&gt;
few large files. In more detail, to increase throughput performance of a parallel application&lt;br /&gt;
following aspects should be considered:&lt;br /&gt;
&lt;br /&gt;
* collect large chunks of data and write them sequentially at once,&lt;br /&gt;
&lt;br /&gt;
* to exploit complete filesystem bandwidth use several clients,&lt;br /&gt;
&lt;br /&gt;
* avoid competitive file access by different tasks or use blocks with boundaries at stripe size (default is 1MB),&lt;br /&gt;
&lt;br /&gt;
* if files are small enough for the SSDs and are only used by one process store them on $TMPDIR.&lt;br /&gt;
&lt;br /&gt;
With previous Lustre versions adapting the Lustre stripe count was the most important optimization. However, for the workspaces of uc2 the new Lustre feature Progressive File Layouts has been used to define file striping parameters. This means that the stripe count is adapted if the file size is growing. In normal cases users no longer need to adapt file striping parameters in case they have very huge files or in order to reach better performance. &lt;br /&gt;
&lt;br /&gt;
If you know what you are doing you can still change striping parameters, e.g. the stripe count, of a directory and of newly created files. New files and directories inherit the stripe count from the parent directory. E.g. if you want to enhance throughput on a single very large file which is created in the directory $HOME/my_output_dir you can use the command&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ lfs setstripe -c-1 $HOME/my_output_dir&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
to change the stripe count to -1 which means that all storage subsystems of the file system are used to store that file. If you change the stripe count of a directory the stripe count of existing files inside this&lt;br /&gt;
directory is not changed. If you want to change the stripe count of existing files, change&lt;br /&gt;
the stripe count of the parent directory, copy the files to new files, remove the old files&lt;br /&gt;
and move the new files back to the old name. In order to check the stripe setting of&lt;br /&gt;
the file my_file use&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ lfs getstripe my_file&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Also note that changes on the striping parameters (e.g. stripe count) are not saved in the&lt;br /&gt;
backup, i.e. if directories have to be recreated this information is lost and the default stripe&lt;br /&gt;
count will be used. Therefore, you should annotate for which directories you made changes&lt;br /&gt;
to the striping parameters so that you can repeat these changes if required.&lt;br /&gt;
&lt;br /&gt;
=== &#039;&#039;&#039;Improving Metadata Performance&#039;&#039;&#039; ===&lt;br /&gt;
&lt;br /&gt;
Metadata performance on parallel file systems is usually not as good as with local&lt;br /&gt;
filesystems. In addition, it is usually not scalable, i.e. a limited resource. Therefore,&lt;br /&gt;
you should omit metadata operations whenever possible. For example, it is much better&lt;br /&gt;
to have few large files than lots of small files. In more detail, to increase metadata&lt;br /&gt;
performance of a parallel application following aspects should be considered:&lt;br /&gt;
&lt;br /&gt;
* avoid creating many small files,&lt;br /&gt;
&lt;br /&gt;
* avoid competitive directory access, e.g. by creating files in separate subdirectories for each task,&lt;br /&gt;
&lt;br /&gt;
* if many small files are only used within a batch job and accessed by one process store them on $TMPDIR,&lt;br /&gt;
&lt;br /&gt;
* change the default colorization setting of the command ls (see below).&lt;br /&gt;
&lt;br /&gt;
On modern Linux systems, the GNU ls command often uses colorization by default to&lt;br /&gt;
visually highlight the file type; this is especially true if the command is run within a terminal&lt;br /&gt;
session. This is because the default shell profile initializations usually contain an alias&lt;br /&gt;
directive similar to the following for the ls command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ alias ls=&amp;quot;ls --color=tty&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
However, running the ls command in this way for files on a Lustre file system requires&lt;br /&gt;
a stat() call to be used to determine the file type. This can result in a performance&lt;br /&gt;
overhead, because the stat() call always needs to determine the size of a file, and that&lt;br /&gt;
in turn means that the client node must query the object size of all the backing objects&lt;br /&gt;
that make up a file. As a result of the default colorization setting, running a simple&lt;br /&gt;
ls command on a Lustre file system often takes as much time as running the ls command&lt;br /&gt;
with the -l option (the same is true if the -F, -p, or the -classify option, or any other option &lt;br /&gt;
that requires information from a stat() call, is used). To avoid this performance overhead&lt;br /&gt;
when using ls commands, add an alias directive similar to the following&lt;br /&gt;
to your shell startup script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ alias ls=&amp;quot;ls --color=never&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Workspaces on flash storage ==&lt;br /&gt;
&lt;br /&gt;
There is another workspace file system for special requirements available. The file system is called &#039;&#039;full flash pfs&#039;&#039; and is based on the parallel file system Lustre.&lt;br /&gt;
&lt;br /&gt;
=== Advantages of this file system ===&lt;br /&gt;
&lt;br /&gt;
# All storage devices are based on flash (no hard disks) with low access times. Hence performance is better compared to other parallel file systems for read and write access with small blocks and with small files, i.e. IOPS rates are improved.&lt;br /&gt;
# The file system is mounted on bwUniCluster 2.0 and HoreKa, i.e. it can be used to share data between these clusters.&lt;br /&gt;
&lt;br /&gt;
=== Access restrictions ===&lt;br /&gt;
&lt;br /&gt;
Only HoreKa users or KIT users of bwUniCluster 2.0 can use this file system.&lt;br /&gt;
&lt;br /&gt;
=== Using the file system ===&lt;br /&gt;
&lt;br /&gt;
As KIT or HoreKa user you can use the file system in the same way as a normal workspace. You just have to specify the name of the flash-based workspace file system using the option &#039;&#039;-F&#039;&#039; to all the commands that manage workspaces. On bwUniCluster 2.0 it is called &#039;&#039;ffuc&#039;&#039;, on HoreKa it is &#039;&#039;ffhk&#039;&#039;. For example, to create a workspace with name myws and a lifetime of 60 days on bwUniCluster 2.0 execute:&lt;br /&gt;
 ws_allocate -F ffuc myws 60&lt;br /&gt;
&lt;br /&gt;
If you want to use the full flash pfs on bwUniCluster 2.0 &#039;&#039;&#039;and&#039;&#039;&#039; HoreKa at the same time, please note that you only have to manage a particular workspace on one of the clusters since the name of the workspace directory is different. However, the path to each workspace is visible and can be used on both clusters.&lt;br /&gt;
&lt;br /&gt;
Other features are similar to normal workspaces. For example, we are able to restore expired workspaces for few weeks and you have to open a ticket to request the restore. There are quota limits with a default limit of 1 TiB capacity and 5 millions inodes per user. You can check your current usage with&lt;br /&gt;
 lfs quota -uh $(whoami) /pfs/work8&lt;br /&gt;
&lt;br /&gt;
== $TMPDIR ==&lt;br /&gt;
&lt;br /&gt;
The environment variable $TMPDIR contains the name of a directory which is local to each node. This means &lt;br /&gt;
that different tasks of a parallel application use different directories when they do not utilize the same node. &lt;br /&gt;
Although $TMPDIR points to the same path name for different nodes of a batch job, the physical location and the &lt;br /&gt;
content of this directory path on these nodes is different.&lt;br /&gt;
&lt;br /&gt;
This directory should be used for temporary files being accessed from the local node during job runtime. It should &lt;br /&gt;
also be used if you read the same data many times from a single node, e.g. if you are doing AI training. In this &lt;br /&gt;
case you should copy the data at the beginning of your batch job to $TMPDIR and read the data from there.&lt;br /&gt;
&lt;br /&gt;
The $TMPDIR directory is located on extremely fast SSD local storage devices. This means that performance &lt;br /&gt;
on small files is much better than on the parallel file systems. The capacity of $TMPDIR for each node type &lt;br /&gt;
can be checked in Table 1 above. The capacity is at least 900 GB.&lt;br /&gt;
&lt;br /&gt;
Each time a batch job is started, a subdirectory is created on the SSD of each node and assigned to the job. &lt;br /&gt;
$TMPDIR is set to the name of the subdirectory and this name contains the job ID so that it is unique &lt;br /&gt;
for each job. At the end of the job the subdirectory is removed.&lt;br /&gt;
&lt;br /&gt;
On login nodes $TMPDIR also points to a fast directory on a local SSD disk but this directory is not unique. &lt;br /&gt;
It is recommended to create your own unique subdirectory on these nodes. This directory should be used for the &lt;br /&gt;
installation of software packages. This means that the software package to be installed should be unpacked, &lt;br /&gt;
compiled and linked in a subdirectory of $TMPDIR. The real installation of the package (e.g. make install) &lt;br /&gt;
should be made into the $HOME folder.&lt;br /&gt;
&lt;br /&gt;
=== Usage example for $TMPDIR ===&lt;br /&gt;
&lt;br /&gt;
We will provide an example for using $TMPDIR and describe efficient data transfer to and from $TMPDIR. &lt;br /&gt;
&lt;br /&gt;
If you have a data set with many files which is frequently used by batch jobs you should create &lt;br /&gt;
a compressed archive on a workspace. This archive can be extracted on $TMPDIR inside your batch jobs. &lt;br /&gt;
Such an archive can be read efficiently from a parallel file system since it is a single huge file. &lt;br /&gt;
On a login node you can create such an archive with the following steps: &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Create a workspace to store the archive&lt;br /&gt;
[ab1234@uc2n997 ~]$ ws_allocate data-ssd 60&lt;br /&gt;
# Create the archive from a local dataset folder (example)&lt;br /&gt;
[ab1234@uc2n997 ~]$ tar -cvzf $(ws_find data-ssd)/dataset.tgz dataset/&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Inside a batch job extract the archive on $TMPDIR, read input data from $TMPDIR, store results on $TMPDIR &lt;br /&gt;
and save the results on a workspace: &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
# very simple example on how to use local $TMPDIR&lt;br /&gt;
#SBATCH -N 1&lt;br /&gt;
#SBATCH -t 24:00:00&lt;br /&gt;
&lt;br /&gt;
# Extract compressed input dataset on local SSD&lt;br /&gt;
tar -C $TMPDIR/ -xvzf $(ws_find data-ssd)/dataset.tgz&lt;br /&gt;
&lt;br /&gt;
# The application reads data from dataset on $TMPDIR and writes results to $TMPDIR&lt;br /&gt;
myapp -input $TMPDIR/dataset/myinput.csv -outputdir $TMPDIR/results&lt;br /&gt;
&lt;br /&gt;
# Before job completes save results on a workspace&lt;br /&gt;
rsync -av $TMPDIR/results $(ws_find data-ssd)/results-${SLURM_JOB_ID}/&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== LSDF Online Storage==&lt;br /&gt;
&lt;br /&gt;
In some cases it is useful to have access to the LSDF Online Storage on the HPC-Clusters also. Therefore the LSDF Online Storage is mounted on the Login- and Datamover-Nodes.&lt;br /&gt;
Furthermore it can be used on the compute nodes during the job runtime with the constraint flag &amp;quot;LSDF&amp;quot; ([[bwUniCluster_2.0_Slurm_common_Features|Slurm common features]]&lt;br /&gt;
). There is also an example about the LSDF batch usage: [[bwUniCluster_2.0_Slurm_common_Features#LSDF_Online_Storage|Slurm LSDF example ]] .&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
#SBATCH ...&lt;br /&gt;
#SBATCH --constraint=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 the following environment variables are available: $LSDF, $LSDFPROJECTS, $LSDFHOME.&lt;br /&gt;
Please request storage projects in the LSDF Online Storage seperately:&lt;br /&gt;
[https://www.lsdf.kit.edu/os/storagerequest/: LSDF Storage Request].&lt;br /&gt;
&lt;br /&gt;
==BeeOND (BeeGFS On-Demand)==&lt;br /&gt;
&lt;br /&gt;
Users of the UniCluster have possibility to request a private BeeOND (on-demand BeeGFS) parallel filesystem for each job. The file system is created during job startup and purged after your job.&lt;br /&gt;
&lt;br /&gt;
&amp;gt; &#039;&#039;&#039;IMPORTANT: &#039;&#039;&#039;&lt;br /&gt;
&amp;gt; All data on the private filesystem will be deleted after your job. Make sure you have copied your data back to the global filesystem (within job), e.g., $HOME or any workspace.&lt;br /&gt;
&lt;br /&gt;
BeeOND/BeeGFS can be used like any other parallel file system. Tools like cp or rsync can be used to copy data in and out. &lt;br /&gt;
&lt;br /&gt;
For detailed usage see here:[[BwUniCluster_2.0_Slurm_common_Features#BeeOND_.28BeeGFS_On-Demand.29|Request on-demand file system]]&lt;br /&gt;
&lt;br /&gt;
==Backup and Archiving==&lt;br /&gt;
&lt;br /&gt;
There are regular backups of all data of the home directories,whereas ACLs and extended attributes will&lt;br /&gt;
not be backuped. &lt;br /&gt;
&lt;br /&gt;
Please open a ticket if you need backuped data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:bwUniCluster 2.0|File System]][[Category:Hardware_and_Architecture|bwUniCluster 2.0]]&lt;/div&gt;</summary>
		<author><name>H Weber</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster2.0/Hardware_and_Architecture&amp;diff=12460</id>
		<title>BwUniCluster2.0/Hardware and Architecture</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster2.0/Hardware_and_Architecture&amp;diff=12460"/>
		<updated>2023-11-20T11:14:50Z</updated>

		<summary type="html">&lt;p&gt;H Weber: /* BeeOND (BeeGFS On-Demand) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Architecture of bwUniCluster 2.0 =&lt;br /&gt;
&lt;br /&gt;
The bwUniCluster 2.0 is a parallel computer with distributed memory. Each node of system consists of at least two Intel Xeon processor, local memory, disks, network adapters and optionally accelerators (NVIDIA Tesla V100, A100 or H100). All nodes are connected by a fast InfiniBand interconnect. In addition the file system&lt;br /&gt;
Lustre, that is connected by coupling the InfiniBand of the file server with the InfiniBand&lt;br /&gt;
switch of the compute cluster, is added to bwUniCluster 2.0 to provide a fast and scalable&lt;br /&gt;
parallel file system.&lt;br /&gt;
&lt;br /&gt;
The operating system on each node is Red Hat Enterprise Linux (RHEL) 8.4. A number of additional software packages like e.g. SLURM have been installed on top. Some of these components are of special interest to end users and are briefly&lt;br /&gt;
discussed in this document. Others which are of greater importance to system&lt;br /&gt;
administrators will not be covered by this document.&lt;br /&gt;
&lt;br /&gt;
The individual nodes of the system may act in different roles. According to the services supplied by the nodes, they are separated into disjoint groups. From an end users point of view the different groups of nodes are login nodes, compute nodes, file server nodes and administrative server nodes.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Login Nodes&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The login nodes are the only nodes that are directly accessible by end users. These nodes&lt;br /&gt;
are used for interactive login, file management, program development and interactive pre-&lt;br /&gt;
and postprocessing. Two nodes are dedicated to this service but they are all accessible via&lt;br /&gt;
one address and a DNS round-robin alias distributes the login sessions to the&lt;br /&gt;
different login nodes.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Compute Node&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The majority of nodes are compute nodes which are managed by a batch system. Users &lt;br /&gt;
submit their jobs to the SLURM batch system and a job is executed when the required resources become available (depending on its fair-share priority).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;File Server Nodes&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The hardware of the parallel file system Lustre incorporates some file server nodes; the file&lt;br /&gt;
system Lustre is connected by coupling the InfiniBand of the file server with the independent InfiniBand switch of the compute cluster. In addition to shared file space there is also local storage on the disks of each node (for details see chapter &amp;quot;File Systems&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Administrative Server Nodes&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Some other nodes are delivering additional services like resource management, external&lt;br /&gt;
network connection, administration etc. These nodes can be accessed directly by system administrators only.&lt;br /&gt;
&lt;br /&gt;
= Components of bwUniCluster =&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
! style=&amp;quot;width:9%&amp;quot;|&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Compute nodes &amp;quot;Thin&amp;quot;&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Compute nodes &amp;quot;HPC&amp;quot;&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Compute nodes &amp;quot;IceLake&amp;quot;&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Compute nodes &amp;quot;Fat&amp;quot;&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| GPU x4&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| GPU x8&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| IceLake + GPU x4&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Login&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Number of nodes&lt;br /&gt;
| 200 + 60&lt;br /&gt;
| 260&lt;br /&gt;
| 272&lt;br /&gt;
| 6&lt;br /&gt;
| 14&lt;br /&gt;
| 10&lt;br /&gt;
| 15&lt;br /&gt;
| 4&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Processors&lt;br /&gt;
| Intel Xeon Gold 6230&lt;br /&gt;
| Intel Xeon Gold 6230&lt;br /&gt;
| Intel Xeon Platinum 8358&lt;br /&gt;
| Intel Xeon Gold 6230&lt;br /&gt;
| Intel Xeon Gold 6230&lt;br /&gt;
| Intel Xeon Gold 6248&lt;br /&gt;
| Intel Xeon Platinum 8358&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Number of sockets&lt;br /&gt;
| 2&lt;br /&gt;
| 2&lt;br /&gt;
| 2&lt;br /&gt;
| 4&lt;br /&gt;
| 2&lt;br /&gt;
| 2&lt;br /&gt;
| 2&lt;br /&gt;
| 2&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Processor frequency (GHz)&lt;br /&gt;
| 2.1 Ghz&lt;br /&gt;
| 2.1 Ghz&lt;br /&gt;
| 2.6 Ghz&lt;br /&gt;
| 2.1 Ghz&lt;br /&gt;
| 2.1 Ghz&lt;br /&gt;
| 2.6 Ghz&lt;br /&gt;
| 2.5 Ghz&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Total number of cores&lt;br /&gt;
| 40&lt;br /&gt;
| 40&lt;br /&gt;
| 64&lt;br /&gt;
| 80&lt;br /&gt;
| 40&lt;br /&gt;
| 40&lt;br /&gt;
| 64&lt;br /&gt;
| 40&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Main memory&lt;br /&gt;
| 96 GB / 192 GB&lt;br /&gt;
| 96 GB&lt;br /&gt;
| 256 GB&lt;br /&gt;
| 3 TB&lt;br /&gt;
| 384 GB&lt;br /&gt;
| 768 GB&lt;br /&gt;
| 512 GB&lt;br /&gt;
| 384 GB&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Local SSD&lt;br /&gt;
| 960 GB SATA&lt;br /&gt;
| 960 GB SATA&lt;br /&gt;
| 1,8 TB NVMe&lt;br /&gt;
| 4,8 TB NVMe&lt;br /&gt;
| 3,2 TB NVMe&lt;br /&gt;
| 15  TB NVMe&lt;br /&gt;
| 6,4 TB NVMe&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Accelerators&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
| 4x NVIDIA Tesla V100&lt;br /&gt;
| 8x NVIDIA Tesla V100&lt;br /&gt;
| 4x NVIDIA A100 / 4x NVIDIA H100&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Accelerator memory&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
| 32 GB&lt;br /&gt;
| 32 GB&lt;br /&gt;
| 80 GB / 94 GB&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Interconnect&lt;br /&gt;
| IB HDR100 (blocking)&lt;br /&gt;
| IB HDR100&lt;br /&gt;
| IB HDR200&lt;br /&gt;
| IB HDR&lt;br /&gt;
| IB HDR&lt;br /&gt;
| IB HDR&lt;br /&gt;
| IB HDR200&lt;br /&gt;
| IB HDR100 (blocking)&lt;br /&gt;
|}&lt;br /&gt;
Table 1: Properties of the nodes&lt;br /&gt;
&lt;br /&gt;
= File Systems =&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 2.0 the parallel file system Lustre is used for most globally visible user data. Lustre is open source and Lustre solutions and support are available from different vendors. Nowadays, most of the biggest HPC systems are using Lustre. An initial home directory on a Lustre file system is created automatically after account activation, and the environment variable $HOME holds its name. Users can create so-called workspaces on another Lustre file system for non-permanent data with temporary lifetime. There is another workspace file system based on flash storage for special requirements available.&lt;br /&gt;
&lt;br /&gt;
Within a batch job further file systems are available: &lt;br /&gt;
* The directory $TMPDIR is only available and visible on the local node. It is located on fast SSD storage devices.&lt;br /&gt;
* On request a parallel on-demand file system (BeeOND) is created which uses the SSDs of the nodes which were allocated to the batch job.&lt;br /&gt;
* On request the external LSDF Online Storage is mounted on the nodes which were allocated to the batch job. This file system is based on the parallel file system Spectrum Scale. &lt;br /&gt;
&lt;br /&gt;
Some of the characteristics of the file systems are shown in Table 2.&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;width:100%; vertical-align:top; background:#f5fffa;border:1px solid #000000;padding:1px&amp;quot;&lt;br /&gt;
|- style=&amp;quot;width:20%;height=20px; text-align:left;padding:3px&amp;quot;&lt;br /&gt;
! style=&amp;quot;background-color:#AAA;padding:3px&amp;quot;| Property&lt;br /&gt;
! style=&amp;quot;background-color:#AAA;padding:3px&amp;quot;| $TMPDIR&lt;br /&gt;
! style=&amp;quot;background-color:#AAA;padding:3px&amp;quot;| BeeOND&lt;br /&gt;
! style=&amp;quot;background-color:#AAA;padding:3px&amp;quot;| $HOME&lt;br /&gt;
! style=&amp;quot;background-color:#AAA;padding:3px&amp;quot;| Workspace&lt;br /&gt;
! style=&amp;quot;background-color:#AAA;padding:3px&amp;quot;| Workspace &amp;lt;br&amp;gt; on flash&lt;br /&gt;
|- &lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Visibility &lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| local node&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| nodes of batch job&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| global&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| global&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| global&lt;br /&gt;
|- &lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Lifetime &lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| batch job runtime&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| batch job runtime&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| permanent&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| max. 240 days&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| max. 240 days&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Disk space &lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 960 GB - 6.4 TB &amp;lt;br&amp;gt; details see table 1&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| n*750 GB&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 1.2 PiB&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 4.1 PiB&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 236 TiB&lt;br /&gt;
|- &lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Capacity Quotas&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| no&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| no&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| yes &amp;lt;br&amp;gt; 1 TiB per user, for &amp;lt;br&amp;gt; MA users 256 GiB &amp;lt;br&amp;gt; also per organization&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| yes &amp;lt;br&amp;gt; 40 TiB per user&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| yes &amp;lt;br&amp;gt; 1 TiB per user&lt;br /&gt;
|- &lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Inode Quotas&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| no&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| no&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| yes &amp;lt;br&amp;gt; 10 million per user &amp;lt;br&amp;gt; for MA users 2.5 million&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| yes &amp;lt;br&amp;gt; 30 million per user&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| yes &amp;lt;br&amp;gt; 5 million per user&lt;br /&gt;
|- &lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Backup&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| no&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| no&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| yes&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| no&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| no&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Read perf./node&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 500 MB/s - 6 GB/s &amp;lt;br&amp;gt; depends on type of local SSD / job queue: &amp;lt;br&amp;gt; 520 MB/s @ single / multiple &amp;lt;br&amp;gt; 800 MB/s @ multiple_e &amp;lt;br&amp;gt; 6600 MB/s @ fat &amp;lt;br&amp;gt; 6500 MB/s @ gpu_4 &amp;lt;br&amp;gt; 6500 MB/s @ gpu_8&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 400 MB/s - 500 MB/s&amp;lt;br&amp;gt; depends on type of local SSDs / job queue: &amp;lt;br&amp;gt; 500 MB/s @ multiple &amp;lt;br&amp;gt; 400 MB/s @ multiple_e&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 1 GB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 1 GB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 1 GB/s&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Write perf./node&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 500 MB/s - 4 GB/s &amp;lt;br&amp;gt; depends on type of local SSD / job queue: &amp;lt;br&amp;gt; 500 MB/s @ single / multiple &amp;lt;br&amp;gt; 650 MB/s @ multiple_e &amp;lt;br&amp;gt; 2900 MB/s @ fat &amp;lt;br&amp;gt; 2090 MB/s @ gpu_4 &amp;lt;br&amp;gt; 4060 MB/s @ gpu_8&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 250 MB/s - 350 MB/s &amp;lt;br&amp;gt; depends on type of local SSDs / job queue: &amp;lt;br&amp;gt; 350 MB/s @ multiple &amp;lt;br&amp;gt; 250 MB/s @ multiple_e&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 1 GB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 1 GB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 1 GB/s&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Total read perf.&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| n*500-6000 MB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| n*400-500 MB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 18 GB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 54 GB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 45 GB/s&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Total write perf.&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| n*500-4000 MB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| n*250-350 MB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 18 GB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 54 GB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 38 GB/s&lt;br /&gt;
|}&lt;br /&gt;
---------------------------------------------------------------------------------------------------------&lt;br /&gt;
  global: all nodes of UniCluster access the same file system;&lt;br /&gt;
  local: each node has its own file system;&lt;br /&gt;
  permanent: files are stored permanently;&lt;br /&gt;
  batch job: files are removed at end of the batch job.&lt;br /&gt;
---------------------------------------------------------------------------------------------------------&lt;br /&gt;
Table 2: Properties of the file systems&lt;br /&gt;
&lt;br /&gt;
== Selecting the appropriate file system ==&lt;br /&gt;
&lt;br /&gt;
In general, you should separate your data and store it on the appropriate file system.&lt;br /&gt;
Permanently needed data like software or important results should be stored below $HOME&lt;br /&gt;
but capacity restrictions (quotas) apply. In case you accidentally deleted data on $HOME&lt;br /&gt;
you can usually restore it from backup. Permanent data which is not needed for months&lt;br /&gt;
or exceeds the capacity restrictions should be sent to the LSDF Online Storage &lt;br /&gt;
or to the archive and deleted from the file systems. Temporary data which is only needed on a single&lt;br /&gt;
node and which does not exceed the disk space shown in the table above should be stored&lt;br /&gt;
below $TMPDIR. Data which is read many times on a single node, e.g. if you are doing AI training, &lt;br /&gt;
should be copied to $TMPDIR and read from there. Temporary data which is used from many nodes &lt;br /&gt;
of your batch job and which is only needed during job runtime should be stored on a &lt;br /&gt;
parallel on-demand file system. Temporary data which can be recomputed or which is the &lt;br /&gt;
result of one job and input for another job should be stored in workspaces. The lifetime &lt;br /&gt;
of data in workspaces is limited and depends on the lifetime of the workspace which can be &lt;br /&gt;
several months.&lt;br /&gt;
&lt;br /&gt;
For further details please check the chapters below.&lt;br /&gt;
&lt;br /&gt;
== $HOME ==&lt;br /&gt;
&lt;br /&gt;
The home directories of bwUniCluster 2.0 (uc2) users are located in the parallel file system Lustre.&lt;br /&gt;
You have access to your home directory from all nodes of uc2. A regular backup of these directories &lt;br /&gt;
to tape archive is done automatically. The directory $HOME is used to hold those files that are&lt;br /&gt;
permanently used like source codes, configuration files, executable programs etc. &lt;br /&gt;
&lt;br /&gt;
On uc2 there is a default user quota limit of 1 TiB and 10 million inodes (files and directories) per user. &lt;br /&gt;
For users of University of Mannheim the limit is 256 GiB and 2.5 million inodes.&lt;br /&gt;
You can check your current usage and limits with the command&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ lfs quota -uh $(whoami) $HOME&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In addition to the user limit there is a limit of your organization (e.g. university) which depends on the financial share. This limit is enforced with so-called Lustre project quotas. You can show the current usage and limits of your organization with the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
lfs quota -ph $(grep $(echo $HOME | sed -e &amp;quot;s|/[^/]*/[^/]*$||&amp;quot;) /pfs/data5/project_ids.txt | cut -f 1 -d\ ) $HOME&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Workspaces ==&lt;br /&gt;
&lt;br /&gt;
On uc2 workspaces can be used to store large non-permanent data sets, e.g. restart files or output&lt;br /&gt;
data that has to be post-processed. The file system used for workspaces is also the parallel file system Lustre. This file system is especially designed for parallel access and for a high throughput to large&lt;br /&gt;
files. It is able to provide high data transfer rates of up to 54 GB/s write and read performance when data access is parallel. &lt;br /&gt;
&lt;br /&gt;
Workspaces have a lifetime and the data on a workspace expires as a whole after a fixed period. The maximum lifetime of a workspace is 60 days, but it can be renewed at the end of that period 3 times to a total maximum of 240 days after workspace generation. If a workspace has inadvertently expired we can restore the data during a limited time (few weeks). In this case you should create a new workspace and report the name of the new and of the expired workspace in a ticket.&lt;br /&gt;
&lt;br /&gt;
Creating, deleting, finding and extending workspaces is explained on the  [[workspace]] page.&lt;br /&gt;
&lt;br /&gt;
On uc2 there is a default user quota limit of 40 TiB and 30 million inodes (files and directories) per user. &lt;br /&gt;
You can chek your current usage and limits with the command&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ lfs quota -uh $(whoami) /pfs/work7&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note that the quotas include data and inodes for all of your workspaces and all of your expired workspaces (as long as they are not yet completely removed).&lt;br /&gt;
&lt;br /&gt;
=== Reminder for workspace deletion ===&lt;br /&gt;
&lt;br /&gt;
Normally you will get an email every day starting 7 days before a workspace expires. You can send yourself a calender entry which reminds you when a workspace will be automatically deleted:&lt;br /&gt;
&lt;br /&gt;
 $ ws_send_ical.sh &amp;lt;workspace&amp;gt; &amp;lt;email&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Improving Performance on $HOME and workspaces ==&lt;br /&gt;
&lt;br /&gt;
The following recommendations might help to improve throughput and metadata&lt;br /&gt;
performance on Lustre filesystems.&lt;br /&gt;
&lt;br /&gt;
=== &#039;&#039;&#039;Improving Throughput Performance&#039;&#039;&#039; ===&lt;br /&gt;
&lt;br /&gt;
Depending on your application some adaptations might be necessary if you want to reach&lt;br /&gt;
the full bandwidth of the filesystems. Parallel filesystems typically stripe files over storage subsystems, i.e. large files are separated into stripes and distributed to different storage subsystems. In Lustre, the size of these stripes (sometimes also mentioned as chunks) is called stripe size and the number of used storage subsystems is called stripe count.&lt;br /&gt;
&lt;br /&gt;
When you are designing your application you should consider that the performance of&lt;br /&gt;
parallel filesystems is generally better if data is transferred in large blocks and stored in&lt;br /&gt;
few large files. In more detail, to increase throughput performance of a parallel application&lt;br /&gt;
following aspects should be considered:&lt;br /&gt;
&lt;br /&gt;
* collect large chunks of data and write them sequentially at once,&lt;br /&gt;
&lt;br /&gt;
* to exploit complete filesystem bandwidth use several clients,&lt;br /&gt;
&lt;br /&gt;
* avoid competitive file access by different tasks or use blocks with boundaries at stripe size (default is 1MB),&lt;br /&gt;
&lt;br /&gt;
* if files are small enough for the SSDs and are only used by one process store them on $TMPDIR.&lt;br /&gt;
&lt;br /&gt;
With previous Lustre versions adapting the Lustre stripe count was the most important optimization. However, for the workspaces of uc2 the new Lustre feature Progressive File Layouts has been used to define file striping parameters. This means that the stripe count is adapted if the file size is growing. In normal cases users no longer need to adapt file striping parameters in case they have very huge files or in order to reach better performance. &lt;br /&gt;
&lt;br /&gt;
If you know what you are doing you can still change striping parameters, e.g. the stripe count, of a directory and of newly created files. New files and directories inherit the stripe count from the parent directory. E.g. if you want to enhance throughput on a single very large file which is created in the directory $HOME/my_output_dir you can use the command&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ lfs setstripe -c-1 $HOME/my_output_dir&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
to change the stripe count to -1 which means that all storage subsystems of the file system are used to store that file. If you change the stripe count of a directory the stripe count of existing files inside this&lt;br /&gt;
directory is not changed. If you want to change the stripe count of existing files, change&lt;br /&gt;
the stripe count of the parent directory, copy the files to new files, remove the old files&lt;br /&gt;
and move the new files back to the old name. In order to check the stripe setting of&lt;br /&gt;
the file my_file use&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ lfs getstripe my_file&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Also note that changes on the striping parameters (e.g. stripe count) are not saved in the&lt;br /&gt;
backup, i.e. if directories have to be recreated this information is lost and the default stripe&lt;br /&gt;
count will be used. Therefore, you should annotate for which directories you made changes&lt;br /&gt;
to the striping parameters so that you can repeat these changes if required.&lt;br /&gt;
&lt;br /&gt;
=== &#039;&#039;&#039;Improving Metadata Performance&#039;&#039;&#039; ===&lt;br /&gt;
&lt;br /&gt;
Metadata performance on parallel file systems is usually not as good as with local&lt;br /&gt;
filesystems. In addition, it is usually not scalable, i.e. a limited resource. Therefore,&lt;br /&gt;
you should omit metadata operations whenever possible. For example, it is much better&lt;br /&gt;
to have few large files than lots of small files. In more detail, to increase metadata&lt;br /&gt;
performance of a parallel application following aspects should be considered:&lt;br /&gt;
&lt;br /&gt;
* avoid creating many small files,&lt;br /&gt;
&lt;br /&gt;
* avoid competitive directory access, e.g. by creating files in separate subdirectories for each task,&lt;br /&gt;
&lt;br /&gt;
* if many small files are only used within a batch job and accessed by one process store them on $TMPDIR,&lt;br /&gt;
&lt;br /&gt;
* change the default colorization setting of the command ls (see below).&lt;br /&gt;
&lt;br /&gt;
On modern Linux systems, the GNU ls command often uses colorization by default to&lt;br /&gt;
visually highlight the file type; this is especially true if the command is run within a terminal&lt;br /&gt;
session. This is because the default shell profile initializations usually contain an alias&lt;br /&gt;
directive similar to the following for the ls command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ alias ls=&amp;quot;ls --color=tty&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
However, running the ls command in this way for files on a Lustre file system requires&lt;br /&gt;
a stat() call to be used to determine the file type. This can result in a performance&lt;br /&gt;
overhead, because the stat() call always needs to determine the size of a file, and that&lt;br /&gt;
in turn means that the client node must query the object size of all the backing objects&lt;br /&gt;
that make up a file. As a result of the default colorization setting, running a simple&lt;br /&gt;
ls command on a Lustre file system often takes as much time as running the ls command&lt;br /&gt;
with the -l option (the same is true if the -F, -p, or the -classify option, or any other option &lt;br /&gt;
that requires information from a stat() call, is used). To avoid this performance overhead&lt;br /&gt;
when using ls commands, add an alias directive similar to the following&lt;br /&gt;
to your shell startup script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ alias ls=&amp;quot;ls --color=never&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Workspaces on flash storage ==&lt;br /&gt;
&lt;br /&gt;
There is another workspace file system for special requirements available. The file system is called &#039;&#039;full flash pfs&#039;&#039; and is based on the parallel file system Lustre.&lt;br /&gt;
&lt;br /&gt;
=== Advantages of this file system ===&lt;br /&gt;
&lt;br /&gt;
# All storage devices are based on flash (no hard disks) with low access times. Hence performance is better compared to other parallel file systems for read and write access with small blocks and with small files, i.e. IOPS rates are improved.&lt;br /&gt;
# The file system is mounted on bwUniCluster 2.0 and HoreKa, i.e. it can be used to share data between these clusters.&lt;br /&gt;
&lt;br /&gt;
=== Access restrictions ===&lt;br /&gt;
&lt;br /&gt;
Only HoreKa users or KIT users of bwUniCluster 2.0 can use this file system.&lt;br /&gt;
&lt;br /&gt;
=== Using the file system ===&lt;br /&gt;
&lt;br /&gt;
As KIT or HoreKa user you can use the file system in the same way as a normal workspace. You just have to specify the name of the flash-based workspace file system using the option &#039;&#039;-F&#039;&#039; to all the commands that manage workspaces. On bwUniCluster 2.0 it is called &#039;&#039;ffuc&#039;&#039;, on HoreKa it is &#039;&#039;ffhk&#039;&#039;. For example, to create a workspace with name myws and a lifetime of 60 days on bwUniCluster 2.0 execute:&lt;br /&gt;
 ws_allocate -F ffuc myws 60&lt;br /&gt;
&lt;br /&gt;
If you want to use the full flash pfs on bwUniCluster 2.0 &#039;&#039;&#039;and&#039;&#039;&#039; HoreKa at the same time, please note that you only have to manage a particular workspace on one of the clusters since the name of the workspace directory is different. However, the path to each workspace is visible and can be used on both clusters.&lt;br /&gt;
&lt;br /&gt;
Other features are similar to normal workspaces. For example, we are able to restore expired workspaces for few weeks and you have to open a ticket to request the restore. There are quota limits with a default limit of 1 TiB capacity and 5 millions inodes per user. You can check your current usage with&lt;br /&gt;
 lfs quota -uh $(whoami) /pfs/work8&lt;br /&gt;
&lt;br /&gt;
== $TMPDIR ==&lt;br /&gt;
&lt;br /&gt;
The environment variable $TMPDIR contains the name of a directory which is local to each node. This means &lt;br /&gt;
that different tasks of a parallel application use different directories when they do not utilize the same node. &lt;br /&gt;
Although $TMPDIR points to the same path name for different nodes of a batch job, the physical location and the &lt;br /&gt;
content of this directory path on these nodes is different.&lt;br /&gt;
&lt;br /&gt;
This directory should be used for temporary files being accessed from the local node during job runtime. It should &lt;br /&gt;
also be used if you read the same data many times from a single node, e.g. if you are doing AI training. In this &lt;br /&gt;
case you should copy the data at the beginning of your batch job to $TMPDIR and read the data from there.&lt;br /&gt;
&lt;br /&gt;
The $TMPDIR directory is located on extremely fast SSD local storage devices. This means that performance &lt;br /&gt;
on small files is much better than on the parallel file systems. The capacity of $TMPDIR for each node type &lt;br /&gt;
can be checked in Table 1 above. The capacity is at least 900 GB.&lt;br /&gt;
&lt;br /&gt;
Each time a batch job is started, a subdirectory is created on the SSD of each node and assigned to the job. &lt;br /&gt;
$TMPDIR is set to the name of the subdirectory and this name contains the job ID so that it is unique &lt;br /&gt;
for each job. At the end of the job the subdirectory is removed.&lt;br /&gt;
&lt;br /&gt;
On login nodes $TMPDIR also points to a fast directory on a local SSD disk but this directory is not unique. &lt;br /&gt;
It is recommended to create your own unique subdirectory on these nodes. This directory should be used for the &lt;br /&gt;
installation of software packages. This means that the software package to be installed should be unpacked, &lt;br /&gt;
compiled and linked in a subdirectory of $TMPDIR. The real installation of the package (e.g. make install) &lt;br /&gt;
should be made into the $HOME folder.&lt;br /&gt;
&lt;br /&gt;
=== Usage example for $TMPDIR ===&lt;br /&gt;
&lt;br /&gt;
We will provide an example for using $TMPDIR and describe efficient data transfer to and from $TMPDIR. &lt;br /&gt;
&lt;br /&gt;
If you have a data set with many files which is frequently used by batch jobs you should create &lt;br /&gt;
a compressed archive on a workspace. This archive can be extracted on $TMPDIR inside your batch jobs. &lt;br /&gt;
Such an archive can be read efficiently from a parallel file system since it is a single huge file. &lt;br /&gt;
On a login node you can create such an archive with the following steps: &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Create a workspace to store the archive&lt;br /&gt;
[ab1234@uc2n997 ~]$ ws_allocate data-ssd 60&lt;br /&gt;
# Create the archive from a local dataset folder (example)&lt;br /&gt;
[ab1234@uc2n997 ~]$ tar -cvzf $(ws_find data-ssd)/dataset.tgz dataset/&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Inside a batch job extract the archive on $TMPDIR, read input data from $TMPDIR, store results on $TMPDIR &lt;br /&gt;
and save the results on a workspace: &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
# very simple example on how to use local $TMPDIR&lt;br /&gt;
#SBATCH -N 1&lt;br /&gt;
#SBATCH -t 24:00:00&lt;br /&gt;
&lt;br /&gt;
# Extract compressed input dataset on local SSD&lt;br /&gt;
tar -C $TMPDIR/ -xvzf $(ws_find data-ssd)/dataset.tgz&lt;br /&gt;
&lt;br /&gt;
# The application reads data from dataset on $TMPDIR and writes results to $TMPDIR&lt;br /&gt;
myapp -input $TMPDIR/dataset/myinput.csv -outputdir $TMPDIR/results&lt;br /&gt;
&lt;br /&gt;
# Before job completes save results on a workspace&lt;br /&gt;
rsync -av $TMPDIR/results $(ws_find data-ssd)/results-${SLURM_JOB_ID}/&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== LSDF Online Storage==&lt;br /&gt;
&lt;br /&gt;
In some cases it is useful to have access to the LSDF Online Storage on the HPC-Clusters also. Therefore the LSDF Online Storage is mounted on the Login- and Datamover-Nodes.&lt;br /&gt;
Furthermore it can be used on the compute nodes during the job runtime with the constraint flag &amp;quot;LSDF&amp;quot; ([[bwUniCluster_2.0_Slurm_common_Features|Slurm common features]]&lt;br /&gt;
). There is also an example about the LSDF batch usage: [[bwUniCluster_2.0_Slurm_common_Features#LSDF_Online_Storage|Slurm LSDF example ]] .&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
#SBATCH ...&lt;br /&gt;
#SBATCH --constraint=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 the following environment variables are available: $LSDF, $LSDFPROJECTS, $LSDFHOME.&lt;br /&gt;
Please request storage projects in the LSDF Online Storage seperately:&lt;br /&gt;
[https://www.lsdf.kit.edu/os/storagerequest/: LSDF Storage Request].&lt;br /&gt;
&lt;br /&gt;
==BeeOND (BeeGFS On-Demand)==&lt;br /&gt;
&lt;br /&gt;
Users of the UniCluster have possibility to request a private BeeOND (on-demand BeeGFS) parallel filesystem for each job. The file system is created during job startup and purged after your job.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;IMPORTANT: &#039;&#039;&#039;&lt;br /&gt;
&amp;gt; All data on the private filesystem will be deleted after your job. Make sure you have copied your data back to the global filesystem (within job), e.g., $HOME or any workspace.&lt;br /&gt;
&lt;br /&gt;
BeeOND/BeeGFS can be used like any other parallel file system. Tools like cp or rsync can be used to copy data in and out. &lt;br /&gt;
&lt;br /&gt;
For detailed usage see here:[[BwUniCluster_2.0_Slurm_common_Features#BeeOND_.28BeeGFS_On-Demand.29|Request on-demand file system]]&lt;br /&gt;
&lt;br /&gt;
==Backup and Archiving==&lt;br /&gt;
&lt;br /&gt;
There are regular backups of all data of the home directories,whereas ACLs and extended attributes will&lt;br /&gt;
not be backuped. &lt;br /&gt;
&lt;br /&gt;
Please open a ticket if you need backuped data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:bwUniCluster 2.0|File System]][[Category:Hardware_and_Architecture|bwUniCluster 2.0]]&lt;/div&gt;</summary>
		<author><name>H Weber</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster2.0/Hardware_and_Architecture&amp;diff=12459</id>
		<title>BwUniCluster2.0/Hardware and Architecture</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster2.0/Hardware_and_Architecture&amp;diff=12459"/>
		<updated>2023-11-20T11:14:36Z</updated>

		<summary type="html">&lt;p&gt;H Weber: /* BeeOND (BeeGFS On-Demand) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Architecture of bwUniCluster 2.0 =&lt;br /&gt;
&lt;br /&gt;
The bwUniCluster 2.0 is a parallel computer with distributed memory. Each node of system consists of at least two Intel Xeon processor, local memory, disks, network adapters and optionally accelerators (NVIDIA Tesla V100, A100 or H100). All nodes are connected by a fast InfiniBand interconnect. In addition the file system&lt;br /&gt;
Lustre, that is connected by coupling the InfiniBand of the file server with the InfiniBand&lt;br /&gt;
switch of the compute cluster, is added to bwUniCluster 2.0 to provide a fast and scalable&lt;br /&gt;
parallel file system.&lt;br /&gt;
&lt;br /&gt;
The operating system on each node is Red Hat Enterprise Linux (RHEL) 8.4. A number of additional software packages like e.g. SLURM have been installed on top. Some of these components are of special interest to end users and are briefly&lt;br /&gt;
discussed in this document. Others which are of greater importance to system&lt;br /&gt;
administrators will not be covered by this document.&lt;br /&gt;
&lt;br /&gt;
The individual nodes of the system may act in different roles. According to the services supplied by the nodes, they are separated into disjoint groups. From an end users point of view the different groups of nodes are login nodes, compute nodes, file server nodes and administrative server nodes.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Login Nodes&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The login nodes are the only nodes that are directly accessible by end users. These nodes&lt;br /&gt;
are used for interactive login, file management, program development and interactive pre-&lt;br /&gt;
and postprocessing. Two nodes are dedicated to this service but they are all accessible via&lt;br /&gt;
one address and a DNS round-robin alias distributes the login sessions to the&lt;br /&gt;
different login nodes.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Compute Node&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The majority of nodes are compute nodes which are managed by a batch system. Users &lt;br /&gt;
submit their jobs to the SLURM batch system and a job is executed when the required resources become available (depending on its fair-share priority).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;File Server Nodes&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The hardware of the parallel file system Lustre incorporates some file server nodes; the file&lt;br /&gt;
system Lustre is connected by coupling the InfiniBand of the file server with the independent InfiniBand switch of the compute cluster. In addition to shared file space there is also local storage on the disks of each node (for details see chapter &amp;quot;File Systems&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Administrative Server Nodes&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Some other nodes are delivering additional services like resource management, external&lt;br /&gt;
network connection, administration etc. These nodes can be accessed directly by system administrators only.&lt;br /&gt;
&lt;br /&gt;
= Components of bwUniCluster =&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
! style=&amp;quot;width:9%&amp;quot;|&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Compute nodes &amp;quot;Thin&amp;quot;&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Compute nodes &amp;quot;HPC&amp;quot;&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Compute nodes &amp;quot;IceLake&amp;quot;&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Compute nodes &amp;quot;Fat&amp;quot;&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| GPU x4&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| GPU x8&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| IceLake + GPU x4&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Login&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Number of nodes&lt;br /&gt;
| 200 + 60&lt;br /&gt;
| 260&lt;br /&gt;
| 272&lt;br /&gt;
| 6&lt;br /&gt;
| 14&lt;br /&gt;
| 10&lt;br /&gt;
| 15&lt;br /&gt;
| 4&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Processors&lt;br /&gt;
| Intel Xeon Gold 6230&lt;br /&gt;
| Intel Xeon Gold 6230&lt;br /&gt;
| Intel Xeon Platinum 8358&lt;br /&gt;
| Intel Xeon Gold 6230&lt;br /&gt;
| Intel Xeon Gold 6230&lt;br /&gt;
| Intel Xeon Gold 6248&lt;br /&gt;
| Intel Xeon Platinum 8358&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Number of sockets&lt;br /&gt;
| 2&lt;br /&gt;
| 2&lt;br /&gt;
| 2&lt;br /&gt;
| 4&lt;br /&gt;
| 2&lt;br /&gt;
| 2&lt;br /&gt;
| 2&lt;br /&gt;
| 2&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Processor frequency (GHz)&lt;br /&gt;
| 2.1 Ghz&lt;br /&gt;
| 2.1 Ghz&lt;br /&gt;
| 2.6 Ghz&lt;br /&gt;
| 2.1 Ghz&lt;br /&gt;
| 2.1 Ghz&lt;br /&gt;
| 2.6 Ghz&lt;br /&gt;
| 2.5 Ghz&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Total number of cores&lt;br /&gt;
| 40&lt;br /&gt;
| 40&lt;br /&gt;
| 64&lt;br /&gt;
| 80&lt;br /&gt;
| 40&lt;br /&gt;
| 40&lt;br /&gt;
| 64&lt;br /&gt;
| 40&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Main memory&lt;br /&gt;
| 96 GB / 192 GB&lt;br /&gt;
| 96 GB&lt;br /&gt;
| 256 GB&lt;br /&gt;
| 3 TB&lt;br /&gt;
| 384 GB&lt;br /&gt;
| 768 GB&lt;br /&gt;
| 512 GB&lt;br /&gt;
| 384 GB&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Local SSD&lt;br /&gt;
| 960 GB SATA&lt;br /&gt;
| 960 GB SATA&lt;br /&gt;
| 1,8 TB NVMe&lt;br /&gt;
| 4,8 TB NVMe&lt;br /&gt;
| 3,2 TB NVMe&lt;br /&gt;
| 15  TB NVMe&lt;br /&gt;
| 6,4 TB NVMe&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Accelerators&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
| 4x NVIDIA Tesla V100&lt;br /&gt;
| 8x NVIDIA Tesla V100&lt;br /&gt;
| 4x NVIDIA A100 / 4x NVIDIA H100&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Accelerator memory&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
| 32 GB&lt;br /&gt;
| 32 GB&lt;br /&gt;
| 80 GB / 94 GB&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Interconnect&lt;br /&gt;
| IB HDR100 (blocking)&lt;br /&gt;
| IB HDR100&lt;br /&gt;
| IB HDR200&lt;br /&gt;
| IB HDR&lt;br /&gt;
| IB HDR&lt;br /&gt;
| IB HDR&lt;br /&gt;
| IB HDR200&lt;br /&gt;
| IB HDR100 (blocking)&lt;br /&gt;
|}&lt;br /&gt;
Table 1: Properties of the nodes&lt;br /&gt;
&lt;br /&gt;
= File Systems =&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 2.0 the parallel file system Lustre is used for most globally visible user data. Lustre is open source and Lustre solutions and support are available from different vendors. Nowadays, most of the biggest HPC systems are using Lustre. An initial home directory on a Lustre file system is created automatically after account activation, and the environment variable $HOME holds its name. Users can create so-called workspaces on another Lustre file system for non-permanent data with temporary lifetime. There is another workspace file system based on flash storage for special requirements available.&lt;br /&gt;
&lt;br /&gt;
Within a batch job further file systems are available: &lt;br /&gt;
* The directory $TMPDIR is only available and visible on the local node. It is located on fast SSD storage devices.&lt;br /&gt;
* On request a parallel on-demand file system (BeeOND) is created which uses the SSDs of the nodes which were allocated to the batch job.&lt;br /&gt;
* On request the external LSDF Online Storage is mounted on the nodes which were allocated to the batch job. This file system is based on the parallel file system Spectrum Scale. &lt;br /&gt;
&lt;br /&gt;
Some of the characteristics of the file systems are shown in Table 2.&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;width:100%; vertical-align:top; background:#f5fffa;border:1px solid #000000;padding:1px&amp;quot;&lt;br /&gt;
|- style=&amp;quot;width:20%;height=20px; text-align:left;padding:3px&amp;quot;&lt;br /&gt;
! style=&amp;quot;background-color:#AAA;padding:3px&amp;quot;| Property&lt;br /&gt;
! style=&amp;quot;background-color:#AAA;padding:3px&amp;quot;| $TMPDIR&lt;br /&gt;
! style=&amp;quot;background-color:#AAA;padding:3px&amp;quot;| BeeOND&lt;br /&gt;
! style=&amp;quot;background-color:#AAA;padding:3px&amp;quot;| $HOME&lt;br /&gt;
! style=&amp;quot;background-color:#AAA;padding:3px&amp;quot;| Workspace&lt;br /&gt;
! style=&amp;quot;background-color:#AAA;padding:3px&amp;quot;| Workspace &amp;lt;br&amp;gt; on flash&lt;br /&gt;
|- &lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Visibility &lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| local node&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| nodes of batch job&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| global&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| global&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| global&lt;br /&gt;
|- &lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Lifetime &lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| batch job runtime&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| batch job runtime&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| permanent&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| max. 240 days&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| max. 240 days&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Disk space &lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 960 GB - 6.4 TB &amp;lt;br&amp;gt; details see table 1&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| n*750 GB&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 1.2 PiB&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 4.1 PiB&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 236 TiB&lt;br /&gt;
|- &lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Capacity Quotas&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| no&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| no&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| yes &amp;lt;br&amp;gt; 1 TiB per user, for &amp;lt;br&amp;gt; MA users 256 GiB &amp;lt;br&amp;gt; also per organization&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| yes &amp;lt;br&amp;gt; 40 TiB per user&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| yes &amp;lt;br&amp;gt; 1 TiB per user&lt;br /&gt;
|- &lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Inode Quotas&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| no&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| no&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| yes &amp;lt;br&amp;gt; 10 million per user &amp;lt;br&amp;gt; for MA users 2.5 million&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| yes &amp;lt;br&amp;gt; 30 million per user&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| yes &amp;lt;br&amp;gt; 5 million per user&lt;br /&gt;
|- &lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Backup&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| no&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| no&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| yes&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| no&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| no&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Read perf./node&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 500 MB/s - 6 GB/s &amp;lt;br&amp;gt; depends on type of local SSD / job queue: &amp;lt;br&amp;gt; 520 MB/s @ single / multiple &amp;lt;br&amp;gt; 800 MB/s @ multiple_e &amp;lt;br&amp;gt; 6600 MB/s @ fat &amp;lt;br&amp;gt; 6500 MB/s @ gpu_4 &amp;lt;br&amp;gt; 6500 MB/s @ gpu_8&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 400 MB/s - 500 MB/s&amp;lt;br&amp;gt; depends on type of local SSDs / job queue: &amp;lt;br&amp;gt; 500 MB/s @ multiple &amp;lt;br&amp;gt; 400 MB/s @ multiple_e&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 1 GB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 1 GB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 1 GB/s&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Write perf./node&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 500 MB/s - 4 GB/s &amp;lt;br&amp;gt; depends on type of local SSD / job queue: &amp;lt;br&amp;gt; 500 MB/s @ single / multiple &amp;lt;br&amp;gt; 650 MB/s @ multiple_e &amp;lt;br&amp;gt; 2900 MB/s @ fat &amp;lt;br&amp;gt; 2090 MB/s @ gpu_4 &amp;lt;br&amp;gt; 4060 MB/s @ gpu_8&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 250 MB/s - 350 MB/s &amp;lt;br&amp;gt; depends on type of local SSDs / job queue: &amp;lt;br&amp;gt; 350 MB/s @ multiple &amp;lt;br&amp;gt; 250 MB/s @ multiple_e&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 1 GB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 1 GB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 1 GB/s&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Total read perf.&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| n*500-6000 MB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| n*400-500 MB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 18 GB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 54 GB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 45 GB/s&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Total write perf.&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| n*500-4000 MB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| n*250-350 MB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 18 GB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 54 GB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 38 GB/s&lt;br /&gt;
|}&lt;br /&gt;
---------------------------------------------------------------------------------------------------------&lt;br /&gt;
  global: all nodes of UniCluster access the same file system;&lt;br /&gt;
  local: each node has its own file system;&lt;br /&gt;
  permanent: files are stored permanently;&lt;br /&gt;
  batch job: files are removed at end of the batch job.&lt;br /&gt;
---------------------------------------------------------------------------------------------------------&lt;br /&gt;
Table 2: Properties of the file systems&lt;br /&gt;
&lt;br /&gt;
== Selecting the appropriate file system ==&lt;br /&gt;
&lt;br /&gt;
In general, you should separate your data and store it on the appropriate file system.&lt;br /&gt;
Permanently needed data like software or important results should be stored below $HOME&lt;br /&gt;
but capacity restrictions (quotas) apply. In case you accidentally deleted data on $HOME&lt;br /&gt;
you can usually restore it from backup. Permanent data which is not needed for months&lt;br /&gt;
or exceeds the capacity restrictions should be sent to the LSDF Online Storage &lt;br /&gt;
or to the archive and deleted from the file systems. Temporary data which is only needed on a single&lt;br /&gt;
node and which does not exceed the disk space shown in the table above should be stored&lt;br /&gt;
below $TMPDIR. Data which is read many times on a single node, e.g. if you are doing AI training, &lt;br /&gt;
should be copied to $TMPDIR and read from there. Temporary data which is used from many nodes &lt;br /&gt;
of your batch job and which is only needed during job runtime should be stored on a &lt;br /&gt;
parallel on-demand file system. Temporary data which can be recomputed or which is the &lt;br /&gt;
result of one job and input for another job should be stored in workspaces. The lifetime &lt;br /&gt;
of data in workspaces is limited and depends on the lifetime of the workspace which can be &lt;br /&gt;
several months.&lt;br /&gt;
&lt;br /&gt;
For further details please check the chapters below.&lt;br /&gt;
&lt;br /&gt;
== $HOME ==&lt;br /&gt;
&lt;br /&gt;
The home directories of bwUniCluster 2.0 (uc2) users are located in the parallel file system Lustre.&lt;br /&gt;
You have access to your home directory from all nodes of uc2. A regular backup of these directories &lt;br /&gt;
to tape archive is done automatically. The directory $HOME is used to hold those files that are&lt;br /&gt;
permanently used like source codes, configuration files, executable programs etc. &lt;br /&gt;
&lt;br /&gt;
On uc2 there is a default user quota limit of 1 TiB and 10 million inodes (files and directories) per user. &lt;br /&gt;
For users of University of Mannheim the limit is 256 GiB and 2.5 million inodes.&lt;br /&gt;
You can check your current usage and limits with the command&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ lfs quota -uh $(whoami) $HOME&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In addition to the user limit there is a limit of your organization (e.g. university) which depends on the financial share. This limit is enforced with so-called Lustre project quotas. You can show the current usage and limits of your organization with the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
lfs quota -ph $(grep $(echo $HOME | sed -e &amp;quot;s|/[^/]*/[^/]*$||&amp;quot;) /pfs/data5/project_ids.txt | cut -f 1 -d\ ) $HOME&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Workspaces ==&lt;br /&gt;
&lt;br /&gt;
On uc2 workspaces can be used to store large non-permanent data sets, e.g. restart files or output&lt;br /&gt;
data that has to be post-processed. The file system used for workspaces is also the parallel file system Lustre. This file system is especially designed for parallel access and for a high throughput to large&lt;br /&gt;
files. It is able to provide high data transfer rates of up to 54 GB/s write and read performance when data access is parallel. &lt;br /&gt;
&lt;br /&gt;
Workspaces have a lifetime and the data on a workspace expires as a whole after a fixed period. The maximum lifetime of a workspace is 60 days, but it can be renewed at the end of that period 3 times to a total maximum of 240 days after workspace generation. If a workspace has inadvertently expired we can restore the data during a limited time (few weeks). In this case you should create a new workspace and report the name of the new and of the expired workspace in a ticket.&lt;br /&gt;
&lt;br /&gt;
Creating, deleting, finding and extending workspaces is explained on the  [[workspace]] page.&lt;br /&gt;
&lt;br /&gt;
On uc2 there is a default user quota limit of 40 TiB and 30 million inodes (files and directories) per user. &lt;br /&gt;
You can chek your current usage and limits with the command&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ lfs quota -uh $(whoami) /pfs/work7&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note that the quotas include data and inodes for all of your workspaces and all of your expired workspaces (as long as they are not yet completely removed).&lt;br /&gt;
&lt;br /&gt;
=== Reminder for workspace deletion ===&lt;br /&gt;
&lt;br /&gt;
Normally you will get an email every day starting 7 days before a workspace expires. You can send yourself a calender entry which reminds you when a workspace will be automatically deleted:&lt;br /&gt;
&lt;br /&gt;
 $ ws_send_ical.sh &amp;lt;workspace&amp;gt; &amp;lt;email&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Improving Performance on $HOME and workspaces ==&lt;br /&gt;
&lt;br /&gt;
The following recommendations might help to improve throughput and metadata&lt;br /&gt;
performance on Lustre filesystems.&lt;br /&gt;
&lt;br /&gt;
=== &#039;&#039;&#039;Improving Throughput Performance&#039;&#039;&#039; ===&lt;br /&gt;
&lt;br /&gt;
Depending on your application some adaptations might be necessary if you want to reach&lt;br /&gt;
the full bandwidth of the filesystems. Parallel filesystems typically stripe files over storage subsystems, i.e. large files are separated into stripes and distributed to different storage subsystems. In Lustre, the size of these stripes (sometimes also mentioned as chunks) is called stripe size and the number of used storage subsystems is called stripe count.&lt;br /&gt;
&lt;br /&gt;
When you are designing your application you should consider that the performance of&lt;br /&gt;
parallel filesystems is generally better if data is transferred in large blocks and stored in&lt;br /&gt;
few large files. In more detail, to increase throughput performance of a parallel application&lt;br /&gt;
following aspects should be considered:&lt;br /&gt;
&lt;br /&gt;
* collect large chunks of data and write them sequentially at once,&lt;br /&gt;
&lt;br /&gt;
* to exploit complete filesystem bandwidth use several clients,&lt;br /&gt;
&lt;br /&gt;
* avoid competitive file access by different tasks or use blocks with boundaries at stripe size (default is 1MB),&lt;br /&gt;
&lt;br /&gt;
* if files are small enough for the SSDs and are only used by one process store them on $TMPDIR.&lt;br /&gt;
&lt;br /&gt;
With previous Lustre versions adapting the Lustre stripe count was the most important optimization. However, for the workspaces of uc2 the new Lustre feature Progressive File Layouts has been used to define file striping parameters. This means that the stripe count is adapted if the file size is growing. In normal cases users no longer need to adapt file striping parameters in case they have very huge files or in order to reach better performance. &lt;br /&gt;
&lt;br /&gt;
If you know what you are doing you can still change striping parameters, e.g. the stripe count, of a directory and of newly created files. New files and directories inherit the stripe count from the parent directory. E.g. if you want to enhance throughput on a single very large file which is created in the directory $HOME/my_output_dir you can use the command&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ lfs setstripe -c-1 $HOME/my_output_dir&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
to change the stripe count to -1 which means that all storage subsystems of the file system are used to store that file. If you change the stripe count of a directory the stripe count of existing files inside this&lt;br /&gt;
directory is not changed. If you want to change the stripe count of existing files, change&lt;br /&gt;
the stripe count of the parent directory, copy the files to new files, remove the old files&lt;br /&gt;
and move the new files back to the old name. In order to check the stripe setting of&lt;br /&gt;
the file my_file use&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ lfs getstripe my_file&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Also note that changes on the striping parameters (e.g. stripe count) are not saved in the&lt;br /&gt;
backup, i.e. if directories have to be recreated this information is lost and the default stripe&lt;br /&gt;
count will be used. Therefore, you should annotate for which directories you made changes&lt;br /&gt;
to the striping parameters so that you can repeat these changes if required.&lt;br /&gt;
&lt;br /&gt;
=== &#039;&#039;&#039;Improving Metadata Performance&#039;&#039;&#039; ===&lt;br /&gt;
&lt;br /&gt;
Metadata performance on parallel file systems is usually not as good as with local&lt;br /&gt;
filesystems. In addition, it is usually not scalable, i.e. a limited resource. Therefore,&lt;br /&gt;
you should omit metadata operations whenever possible. For example, it is much better&lt;br /&gt;
to have few large files than lots of small files. In more detail, to increase metadata&lt;br /&gt;
performance of a parallel application following aspects should be considered:&lt;br /&gt;
&lt;br /&gt;
* avoid creating many small files,&lt;br /&gt;
&lt;br /&gt;
* avoid competitive directory access, e.g. by creating files in separate subdirectories for each task,&lt;br /&gt;
&lt;br /&gt;
* if many small files are only used within a batch job and accessed by one process store them on $TMPDIR,&lt;br /&gt;
&lt;br /&gt;
* change the default colorization setting of the command ls (see below).&lt;br /&gt;
&lt;br /&gt;
On modern Linux systems, the GNU ls command often uses colorization by default to&lt;br /&gt;
visually highlight the file type; this is especially true if the command is run within a terminal&lt;br /&gt;
session. This is because the default shell profile initializations usually contain an alias&lt;br /&gt;
directive similar to the following for the ls command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ alias ls=&amp;quot;ls --color=tty&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
However, running the ls command in this way for files on a Lustre file system requires&lt;br /&gt;
a stat() call to be used to determine the file type. This can result in a performance&lt;br /&gt;
overhead, because the stat() call always needs to determine the size of a file, and that&lt;br /&gt;
in turn means that the client node must query the object size of all the backing objects&lt;br /&gt;
that make up a file. As a result of the default colorization setting, running a simple&lt;br /&gt;
ls command on a Lustre file system often takes as much time as running the ls command&lt;br /&gt;
with the -l option (the same is true if the -F, -p, or the -classify option, or any other option &lt;br /&gt;
that requires information from a stat() call, is used). To avoid this performance overhead&lt;br /&gt;
when using ls commands, add an alias directive similar to the following&lt;br /&gt;
to your shell startup script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ alias ls=&amp;quot;ls --color=never&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Workspaces on flash storage ==&lt;br /&gt;
&lt;br /&gt;
There is another workspace file system for special requirements available. The file system is called &#039;&#039;full flash pfs&#039;&#039; and is based on the parallel file system Lustre.&lt;br /&gt;
&lt;br /&gt;
=== Advantages of this file system ===&lt;br /&gt;
&lt;br /&gt;
# All storage devices are based on flash (no hard disks) with low access times. Hence performance is better compared to other parallel file systems for read and write access with small blocks and with small files, i.e. IOPS rates are improved.&lt;br /&gt;
# The file system is mounted on bwUniCluster 2.0 and HoreKa, i.e. it can be used to share data between these clusters.&lt;br /&gt;
&lt;br /&gt;
=== Access restrictions ===&lt;br /&gt;
&lt;br /&gt;
Only HoreKa users or KIT users of bwUniCluster 2.0 can use this file system.&lt;br /&gt;
&lt;br /&gt;
=== Using the file system ===&lt;br /&gt;
&lt;br /&gt;
As KIT or HoreKa user you can use the file system in the same way as a normal workspace. You just have to specify the name of the flash-based workspace file system using the option &#039;&#039;-F&#039;&#039; to all the commands that manage workspaces. On bwUniCluster 2.0 it is called &#039;&#039;ffuc&#039;&#039;, on HoreKa it is &#039;&#039;ffhk&#039;&#039;. For example, to create a workspace with name myws and a lifetime of 60 days on bwUniCluster 2.0 execute:&lt;br /&gt;
 ws_allocate -F ffuc myws 60&lt;br /&gt;
&lt;br /&gt;
If you want to use the full flash pfs on bwUniCluster 2.0 &#039;&#039;&#039;and&#039;&#039;&#039; HoreKa at the same time, please note that you only have to manage a particular workspace on one of the clusters since the name of the workspace directory is different. However, the path to each workspace is visible and can be used on both clusters.&lt;br /&gt;
&lt;br /&gt;
Other features are similar to normal workspaces. For example, we are able to restore expired workspaces for few weeks and you have to open a ticket to request the restore. There are quota limits with a default limit of 1 TiB capacity and 5 millions inodes per user. You can check your current usage with&lt;br /&gt;
 lfs quota -uh $(whoami) /pfs/work8&lt;br /&gt;
&lt;br /&gt;
== $TMPDIR ==&lt;br /&gt;
&lt;br /&gt;
The environment variable $TMPDIR contains the name of a directory which is local to each node. This means &lt;br /&gt;
that different tasks of a parallel application use different directories when they do not utilize the same node. &lt;br /&gt;
Although $TMPDIR points to the same path name for different nodes of a batch job, the physical location and the &lt;br /&gt;
content of this directory path on these nodes is different.&lt;br /&gt;
&lt;br /&gt;
This directory should be used for temporary files being accessed from the local node during job runtime. It should &lt;br /&gt;
also be used if you read the same data many times from a single node, e.g. if you are doing AI training. In this &lt;br /&gt;
case you should copy the data at the beginning of your batch job to $TMPDIR and read the data from there.&lt;br /&gt;
&lt;br /&gt;
The $TMPDIR directory is located on extremely fast SSD local storage devices. This means that performance &lt;br /&gt;
on small files is much better than on the parallel file systems. The capacity of $TMPDIR for each node type &lt;br /&gt;
can be checked in Table 1 above. The capacity is at least 900 GB.&lt;br /&gt;
&lt;br /&gt;
Each time a batch job is started, a subdirectory is created on the SSD of each node and assigned to the job. &lt;br /&gt;
$TMPDIR is set to the name of the subdirectory and this name contains the job ID so that it is unique &lt;br /&gt;
for each job. At the end of the job the subdirectory is removed.&lt;br /&gt;
&lt;br /&gt;
On login nodes $TMPDIR also points to a fast directory on a local SSD disk but this directory is not unique. &lt;br /&gt;
It is recommended to create your own unique subdirectory on these nodes. This directory should be used for the &lt;br /&gt;
installation of software packages. This means that the software package to be installed should be unpacked, &lt;br /&gt;
compiled and linked in a subdirectory of $TMPDIR. The real installation of the package (e.g. make install) &lt;br /&gt;
should be made into the $HOME folder.&lt;br /&gt;
&lt;br /&gt;
=== Usage example for $TMPDIR ===&lt;br /&gt;
&lt;br /&gt;
We will provide an example for using $TMPDIR and describe efficient data transfer to and from $TMPDIR. &lt;br /&gt;
&lt;br /&gt;
If you have a data set with many files which is frequently used by batch jobs you should create &lt;br /&gt;
a compressed archive on a workspace. This archive can be extracted on $TMPDIR inside your batch jobs. &lt;br /&gt;
Such an archive can be read efficiently from a parallel file system since it is a single huge file. &lt;br /&gt;
On a login node you can create such an archive with the following steps: &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Create a workspace to store the archive&lt;br /&gt;
[ab1234@uc2n997 ~]$ ws_allocate data-ssd 60&lt;br /&gt;
# Create the archive from a local dataset folder (example)&lt;br /&gt;
[ab1234@uc2n997 ~]$ tar -cvzf $(ws_find data-ssd)/dataset.tgz dataset/&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Inside a batch job extract the archive on $TMPDIR, read input data from $TMPDIR, store results on $TMPDIR &lt;br /&gt;
and save the results on a workspace: &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
# very simple example on how to use local $TMPDIR&lt;br /&gt;
#SBATCH -N 1&lt;br /&gt;
#SBATCH -t 24:00:00&lt;br /&gt;
&lt;br /&gt;
# Extract compressed input dataset on local SSD&lt;br /&gt;
tar -C $TMPDIR/ -xvzf $(ws_find data-ssd)/dataset.tgz&lt;br /&gt;
&lt;br /&gt;
# The application reads data from dataset on $TMPDIR and writes results to $TMPDIR&lt;br /&gt;
myapp -input $TMPDIR/dataset/myinput.csv -outputdir $TMPDIR/results&lt;br /&gt;
&lt;br /&gt;
# Before job completes save results on a workspace&lt;br /&gt;
rsync -av $TMPDIR/results $(ws_find data-ssd)/results-${SLURM_JOB_ID}/&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== LSDF Online Storage==&lt;br /&gt;
&lt;br /&gt;
In some cases it is useful to have access to the LSDF Online Storage on the HPC-Clusters also. Therefore the LSDF Online Storage is mounted on the Login- and Datamover-Nodes.&lt;br /&gt;
Furthermore it can be used on the compute nodes during the job runtime with the constraint flag &amp;quot;LSDF&amp;quot; ([[bwUniCluster_2.0_Slurm_common_Features|Slurm common features]]&lt;br /&gt;
). There is also an example about the LSDF batch usage: [[bwUniCluster_2.0_Slurm_common_Features#LSDF_Online_Storage|Slurm LSDF example ]] .&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
#SBATCH ...&lt;br /&gt;
#SBATCH --constraint=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 the following environment variables are available: $LSDF, $LSDFPROJECTS, $LSDFHOME.&lt;br /&gt;
Please request storage projects in the LSDF Online Storage seperately:&lt;br /&gt;
[https://www.lsdf.kit.edu/os/storagerequest/: LSDF Storage Request].&lt;br /&gt;
&lt;br /&gt;
==BeeOND (BeeGFS On-Demand)==&lt;br /&gt;
&lt;br /&gt;
Users of the UniCluster have possibility to request a private BeeOND (on-demand BeeGFS) parallel filesystem for each job. The file system is created during job startup and purged after your job.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;IMPORTANT: &#039;&#039;&#039;All data on the private filesystem will be deleted after your job. Make sure you have copied your data back to the global filesystem (within job), e.g., $HOME or any workspace.&lt;br /&gt;
&lt;br /&gt;
BeeOND/BeeGFS can be used like any other parallel file system. Tools like cp or rsync can be used to copy data in and out. &lt;br /&gt;
&lt;br /&gt;
For detailed usage see here:[[BwUniCluster_2.0_Slurm_common_Features#BeeOND_.28BeeGFS_On-Demand.29|Request on-demand file system]]&lt;br /&gt;
&lt;br /&gt;
==Backup and Archiving==&lt;br /&gt;
&lt;br /&gt;
There are regular backups of all data of the home directories,whereas ACLs and extended attributes will&lt;br /&gt;
not be backuped. &lt;br /&gt;
&lt;br /&gt;
Please open a ticket if you need backuped data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:bwUniCluster 2.0|File System]][[Category:Hardware_and_Architecture|bwUniCluster 2.0]]&lt;/div&gt;</summary>
		<author><name>H Weber</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster2.0/Slurm&amp;diff=12449</id>
		<title>BwUniCluster2.0/Slurm</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster2.0/Slurm&amp;diff=12449"/>
		<updated>2023-11-15T08:32:46Z</updated>

		<summary type="html">&lt;p&gt;H Weber: /* BeeOND (BeeGFS On-Demand) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&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 [[bwUniCluster 2.0|bwUniCluster 2.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 2.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;
If your job was submitted to the &amp;quot;multiple&amp;quot; queue you can log into the allocated nodes via SSH as soon as the job is running.&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;
* [[BwUniCluster_2.0_Batch_Queues#sbatch_-p_queue|bwUniCluster 2.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_single -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=fat&#039;&#039; (with &#039;&#039;--partition=(dev_)single&#039;&#039; maximum &#039;&#039;--mem=96gb&#039;&#039; is possible):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sbatch --partition=fat 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;Because hyperthreading is switched on on bwUniCluster 2.0, the option --cpus-per-task (-c) must be set to 2*n, if you want to use n threads.&#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 40-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 single --export=ALL,OMP_NUM_THREADS=40 -J OpenMP_Test -N 1 -c 80 -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=80&lt;br /&gt;
#SBATCH --time=40:00&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}/2))&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;single&#039;&#039; as sbatch option:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sbatch -p single 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=single --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 a defined module environment related to OpenMPI is wished&lt;br /&gt;
module load mpi/openmpi/&amp;lt;placeholder_for_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 single -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 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=multiple -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;Because hyperthreading is switched on on bwUniCluster 2.0, the option --cpus-per-task (-c) must be set to 2*n, if you want to use n threads.&#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=56&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}/2))&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 multiple ./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 40-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=80&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}/2))&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 multiple ./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_4 and gpu_8 queues have 4 or 8 NVIDIA Tesla V100 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 ressources 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;
Sun Mar 29 15:20:05 2020       &lt;br /&gt;
+-----------------------------------------------------------------------------+&lt;br /&gt;
| NVIDIA-SMI 440.33.01    Driver Version: 440.33.01    CUDA Version: 10.2     |&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;
|===============================+======================+======================|&lt;br /&gt;
|   0  Tesla V100-SXM2...  Off  | 00000000:3A:00.0 Off |                    0 |&lt;br /&gt;
| N/A   29C    P0    39W / 300W |      9MiB / 32510MiB |      0%      Default |&lt;br /&gt;
+-------------------------------+----------------------+----------------------+&lt;br /&gt;
|   1  Tesla V100-SXM2...  Off  | 00000000:3B:00.0 Off |                    0 |&lt;br /&gt;
| N/A   30C    P0    41W / 300W |      8MiB / 32510MiB |      0%      Default |&lt;br /&gt;
+-------------------------------+----------------------+----------------------+&lt;br /&gt;
                                                                               &lt;br /&gt;
+-----------------------------------------------------------------------------+&lt;br /&gt;
| Processes:                                                       GPU Memory |&lt;br /&gt;
|  GPU       PID   Type   Process name                             Usage      |&lt;br /&gt;
|=============================================================================|&lt;br /&gt;
|    0     14228      G   /usr/bin/X                                     8MiB |&lt;br /&gt;
|    1     14228      G   /usr/bin/X                                     8MiB |&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;
However, there may be warnings, e.g. when running&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load compiler/gnu/10.3 mpi/openmpi devel/cuad&lt;br /&gt;
$ mpirun mpirun -np 2 ./mpi_cuda_app&lt;br /&gt;
--------------------------------------&lt;br /&gt;
WARNING: There are more than one active ports on host &#039;uc2n520&#039;, but the&lt;br /&gt;
default subnet GID prefix was detected on more than one of these&lt;br /&gt;
ports.  If these ports are connected to different physical IB&lt;br /&gt;
networks, this configuration will fail in Open MPI.  This version of&lt;br /&gt;
Open MPI requires that every physically separate IB subnet that is&lt;br /&gt;
used between connected MPI processes must have different subnet ID&lt;br /&gt;
values.&lt;br /&gt;
&lt;br /&gt;
Please see this FAQ entry for more details:&lt;br /&gt;
&lt;br /&gt;
  http://www.open-mpi.org/faq/?category=openfabrics#ofa-default-subnet-gid&lt;br /&gt;
&lt;br /&gt;
NOTE: You can turn off this warning by setting the MCA parameter&lt;br /&gt;
      btl_openib_warn_default_gid_prefix to 0.&lt;br /&gt;
--------------------------------------------------------------------------&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&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;
(Please note, that CUDA per v11.4 is only available with up to GCC-10)&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 2.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;
&#039;&#039;&#039;Possible optimization:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A possible optimization is that the private file system uses its own metadata server. With the constraint BEEOND the metadata server is started on the first node. Depending on your application, the metadata server could consume a decent amount of CPU power. In this case, adding a extra node to your job could improve the performance of the on-demand file system and the total runtime of your application. In order to use this option, start your application with the MPI option:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mpirun -nolocal myapplication&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
With the -nolocal option the node where mpirun is initiated is not used for your application. This node is fully available for the meta data server of your requested on-demand file system.&lt;br /&gt;
&lt;br /&gt;
Example job script:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
# Very simple example on how to use a private on-demand file system.&lt;br /&gt;
#SBATCH -N 10&lt;br /&gt;
#SBATCH --constraint=BEEOND&lt;br /&gt;
&lt;br /&gt;
# Create a workspace. &lt;br /&gt;
ws_allocate myresults-${SLURM_JOB_ID} 90&lt;br /&gt;
RESULTDIR=$(ws_find myresults-${SLURM_JOB_ID})&lt;br /&gt;
&lt;br /&gt;
# Set ENV variable to on-demand file system.&lt;br /&gt;
ODFSDIR=/mnt/odfs/${SLURM_JOB_ID}/stripe_16/&lt;br /&gt;
&lt;br /&gt;
# Start application and write results to on-demand file system.&lt;br /&gt;
mpirun -nolocal myapplication -o $ODFSDIR/results&lt;br /&gt;
&lt;br /&gt;
# Copy back data after your job application end.&lt;br /&gt;
rsync -av $ODFSDIR/results $RESULTDIR&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&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;
          18088744    single CPV.sbat   ab1234 PD       0:00      1 (Priority)&lt;br /&gt;
          18098414  multiple CPV.sbat   ab1234 PD       0:00      2 (Priority) &lt;br /&gt;
          18090089  multiple CPV.sbat   ab1234  R       2:27      2 uc2n[127-128]&lt;br /&gt;
$ squeue -l&lt;br /&gt;
            JOBID PARTITION     NAME     USER    STATE       TIME TIME_LIMI  NODES NODELIST(REASON) &lt;br /&gt;
         18088654    single CPV.sbat   ab1234 COMPLETI       4:29   2:00:00      1 uc2n374&lt;br /&gt;
         18088785    single CPV.sbat   ab1234  PENDING       0:00   2:00:00      1 (Priority)&lt;br /&gt;
         18098414  multiple CPV.sbat   ab1234  PENDING       0:00   2:00:00      2 (Priority)&lt;br /&gt;
         18088683    single CPV.sbat   ab1234  RUNNING       0:14   2:00:00      1 uc2n413  &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_multiple  :      8 nodes idle&lt;br /&gt;
Partition multiple      :    332 nodes idle&lt;br /&gt;
Partition dev_single    :      4 nodes idle&lt;br /&gt;
Partition single        :     76 nodes idle&lt;br /&gt;
Partition long          :     80 nodes idle&lt;br /&gt;
Partition fat           :      5 nodes idle&lt;br /&gt;
Partition dev_special   :    342 nodes idle&lt;br /&gt;
Partition special       :    342 nodes idle&lt;br /&gt;
Partition dev_multiple_e:      7 nodes idle&lt;br /&gt;
Partition multiple_e    :    335 nodes idle&lt;br /&gt;
Partition gpu_4         :     12 nodes idle&lt;br /&gt;
Partition gpu_8         :      6 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 2.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;
          18089884  multiple CPV.sbat   bq0742  R      33:44      2 uc2n[165-166]&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 18089884&lt;br /&gt;
&lt;br /&gt;
JobId=18089884 JobName=CPV.sbatch&lt;br /&gt;
   UserId=bq0742(8946) GroupId=scc(12345) MCS_label=N/A&lt;br /&gt;
   Priority=3 Nice=0 Account=kit 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:35:06 TimeLimit=02:00:00 TimeMin=N/A&lt;br /&gt;
   SubmitTime=2020-03-16T14:14:54 EligibleTime=2020-03-16T14:14:54&lt;br /&gt;
   AccrueTime=2020-03-16T14:14:54&lt;br /&gt;
   StartTime=2020-03-16T15:12:51 EndTime=2020-03-16T17:12:51 Deadline=N/A&lt;br /&gt;
   SuspendTime=None SecsPreSuspend=0 LastSchedEval=2020-03-16T15:12:51&lt;br /&gt;
   Partition=multiple AllocNode:Sid=uc2n995:5064&lt;br /&gt;
   ReqNodeList=(null) ExcNodeList=(null)&lt;br /&gt;
   NodeList=uc2n[165-166]&lt;br /&gt;
   BatchHost=uc2n165&lt;br /&gt;
   NumNodes=2 NumCPUs=160 NumTasks=80 CPUs/Task=1 ReqB:S:C:T=0:0:*:1&lt;br /&gt;
   TRES=cpu=160,mem=96320M,node=2,billing=160&lt;br /&gt;
   Socks/Node=* NtasksPerN:B:S:C=40:0:*:1 CoreSpec=*&lt;br /&gt;
   MinCPUsNode=40 MinMemoryCPU=1204M MinTmpDiskNode=0&lt;br /&gt;
   Features=(null) DelayBoot=00:00:00&lt;br /&gt;
   OverSubscribe=NO Contiguous=0 Licenses=(null) Network=(null)&lt;br /&gt;
   Command=/pfs/data5/home/kit/scc/bq0742/git/CPV/bin/CPV.sbatch&lt;br /&gt;
   WorkDir=/pfs/data5/home/kit/scc/bq0742/git/CPV/bin&lt;br /&gt;
   StdErr=/pfs/data5/home/kit/scc/bq0742/git/CPV/bin/slurm-18089884.out&lt;br /&gt;
   StdIn=/dev/null&lt;br /&gt;
   StdOut=/pfs/data5/home/kit/scc/bq0742/git/CPV/bin/slurm-18089884.out&lt;br /&gt;
   Power=&lt;br /&gt;
   MailUser=(null) MailType=NONE&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 18089884 | grep -i State&lt;br /&gt;
   JobState=COMPLETED 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;
{| width=750px 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#lbAI 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;
[[Category:bwUniCluster 2.0|bwUniCluster 2.0]]&lt;br /&gt;
[[#top|Back to top]]&lt;/div&gt;</summary>
		<author><name>H Weber</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster2.0/Slurm&amp;diff=12448</id>
		<title>BwUniCluster2.0/Slurm</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster2.0/Slurm&amp;diff=12448"/>
		<updated>2023-11-15T08:30:51Z</updated>

		<summary type="html">&lt;p&gt;H Weber: /* BeeOND (BeeGFS On-Demand) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&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 [[bwUniCluster 2.0|bwUniCluster 2.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 2.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;
If your job was submitted to the &amp;quot;multiple&amp;quot; queue you can log into the allocated nodes via SSH as soon as the job is running.&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;
* [[BwUniCluster_2.0_Batch_Queues#sbatch_-p_queue|bwUniCluster 2.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_single -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=fat&#039;&#039; (with &#039;&#039;--partition=(dev_)single&#039;&#039; maximum &#039;&#039;--mem=96gb&#039;&#039; is possible):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sbatch --partition=fat 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;Because hyperthreading is switched on on bwUniCluster 2.0, the option --cpus-per-task (-c) must be set to 2*n, if you want to use n threads.&#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 40-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 single --export=ALL,OMP_NUM_THREADS=40 -J OpenMP_Test -N 1 -c 80 -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=80&lt;br /&gt;
#SBATCH --time=40:00&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}/2))&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;single&#039;&#039; as sbatch option:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sbatch -p single 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=single --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 a defined module environment related to OpenMPI is wished&lt;br /&gt;
module load mpi/openmpi/&amp;lt;placeholder_for_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 single -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 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=multiple -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;Because hyperthreading is switched on on bwUniCluster 2.0, the option --cpus-per-task (-c) must be set to 2*n, if you want to use n threads.&#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=56&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}/2))&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 multiple ./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 40-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=80&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}/2))&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 multiple ./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_4 and gpu_8 queues have 4 or 8 NVIDIA Tesla V100 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 ressources 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;
Sun Mar 29 15:20:05 2020       &lt;br /&gt;
+-----------------------------------------------------------------------------+&lt;br /&gt;
| NVIDIA-SMI 440.33.01    Driver Version: 440.33.01    CUDA Version: 10.2     |&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;
|===============================+======================+======================|&lt;br /&gt;
|   0  Tesla V100-SXM2...  Off  | 00000000:3A:00.0 Off |                    0 |&lt;br /&gt;
| N/A   29C    P0    39W / 300W |      9MiB / 32510MiB |      0%      Default |&lt;br /&gt;
+-------------------------------+----------------------+----------------------+&lt;br /&gt;
|   1  Tesla V100-SXM2...  Off  | 00000000:3B:00.0 Off |                    0 |&lt;br /&gt;
| N/A   30C    P0    41W / 300W |      8MiB / 32510MiB |      0%      Default |&lt;br /&gt;
+-------------------------------+----------------------+----------------------+&lt;br /&gt;
                                                                               &lt;br /&gt;
+-----------------------------------------------------------------------------+&lt;br /&gt;
| Processes:                                                       GPU Memory |&lt;br /&gt;
|  GPU       PID   Type   Process name                             Usage      |&lt;br /&gt;
|=============================================================================|&lt;br /&gt;
|    0     14228      G   /usr/bin/X                                     8MiB |&lt;br /&gt;
|    1     14228      G   /usr/bin/X                                     8MiB |&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;
However, there may be warnings, e.g. when running&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load compiler/gnu/10.3 mpi/openmpi devel/cuad&lt;br /&gt;
$ mpirun mpirun -np 2 ./mpi_cuda_app&lt;br /&gt;
--------------------------------------&lt;br /&gt;
WARNING: There are more than one active ports on host &#039;uc2n520&#039;, but the&lt;br /&gt;
default subnet GID prefix was detected on more than one of these&lt;br /&gt;
ports.  If these ports are connected to different physical IB&lt;br /&gt;
networks, this configuration will fail in Open MPI.  This version of&lt;br /&gt;
Open MPI requires that every physically separate IB subnet that is&lt;br /&gt;
used between connected MPI processes must have different subnet ID&lt;br /&gt;
values.&lt;br /&gt;
&lt;br /&gt;
Please see this FAQ entry for more details:&lt;br /&gt;
&lt;br /&gt;
  http://www.open-mpi.org/faq/?category=openfabrics#ofa-default-subnet-gid&lt;br /&gt;
&lt;br /&gt;
NOTE: You can turn off this warning by setting the MCA parameter&lt;br /&gt;
      btl_openib_warn_default_gid_prefix to 0.&lt;br /&gt;
--------------------------------------------------------------------------&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&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;
(Please note, that CUDA per v11.4 is only available with up to GCC-10)&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 2.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, 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;
&#039;&#039;&#039;Possible optimization:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A possible optimization is that the private file system uses its own metadata server. With the constraint BEEOND the metadata server is started on the first node. Depending on your application, the metadata server could consume a decent amount of CPU power. In this case, adding a extra node to your job could improve the performance of the on-demand file system and the total runtime of your application. In order to use this option, start your application with the MPI option:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mpirun -nolocal myapplication&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
With the -nolocal option the node where mpirun is initiated is not used for your application. This node is fully available for the meta data server of your requested on-demand file system.&lt;br /&gt;
&lt;br /&gt;
Example job script:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
# Very simple example on how to use a private on-demand file system.&lt;br /&gt;
#SBATCH -N 10&lt;br /&gt;
#SBATCH --constraint=BEEOND&lt;br /&gt;
&lt;br /&gt;
# Create a workspace. &lt;br /&gt;
ws_allocate myresults-${SLURM_JOB_ID} 90&lt;br /&gt;
RESULTDIR=$(ws_find myresults-${SLURM_JOB_ID})&lt;br /&gt;
&lt;br /&gt;
# Set ENV variable to on-demand file system.&lt;br /&gt;
ODFSDIR=/mnt/odfs/${SLURM_JOB_ID}/stripe_16/&lt;br /&gt;
&lt;br /&gt;
# Start application and write results to on-demand file system.&lt;br /&gt;
mpirun -nolocal myapplication -o $ODFSDIR/results&lt;br /&gt;
&lt;br /&gt;
# Copy back data after your job application end.&lt;br /&gt;
rsync -av $ODFSDIR/results $RESULTDIR&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&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;
          18088744    single CPV.sbat   ab1234 PD       0:00      1 (Priority)&lt;br /&gt;
          18098414  multiple CPV.sbat   ab1234 PD       0:00      2 (Priority) &lt;br /&gt;
          18090089  multiple CPV.sbat   ab1234  R       2:27      2 uc2n[127-128]&lt;br /&gt;
$ squeue -l&lt;br /&gt;
            JOBID PARTITION     NAME     USER    STATE       TIME TIME_LIMI  NODES NODELIST(REASON) &lt;br /&gt;
         18088654    single CPV.sbat   ab1234 COMPLETI       4:29   2:00:00      1 uc2n374&lt;br /&gt;
         18088785    single CPV.sbat   ab1234  PENDING       0:00   2:00:00      1 (Priority)&lt;br /&gt;
         18098414  multiple CPV.sbat   ab1234  PENDING       0:00   2:00:00      2 (Priority)&lt;br /&gt;
         18088683    single CPV.sbat   ab1234  RUNNING       0:14   2:00:00      1 uc2n413  &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_multiple  :      8 nodes idle&lt;br /&gt;
Partition multiple      :    332 nodes idle&lt;br /&gt;
Partition dev_single    :      4 nodes idle&lt;br /&gt;
Partition single        :     76 nodes idle&lt;br /&gt;
Partition long          :     80 nodes idle&lt;br /&gt;
Partition fat           :      5 nodes idle&lt;br /&gt;
Partition dev_special   :    342 nodes idle&lt;br /&gt;
Partition special       :    342 nodes idle&lt;br /&gt;
Partition dev_multiple_e:      7 nodes idle&lt;br /&gt;
Partition multiple_e    :    335 nodes idle&lt;br /&gt;
Partition gpu_4         :     12 nodes idle&lt;br /&gt;
Partition gpu_8         :      6 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 2.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;
          18089884  multiple CPV.sbat   bq0742  R      33:44      2 uc2n[165-166]&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 18089884&lt;br /&gt;
&lt;br /&gt;
JobId=18089884 JobName=CPV.sbatch&lt;br /&gt;
   UserId=bq0742(8946) GroupId=scc(12345) MCS_label=N/A&lt;br /&gt;
   Priority=3 Nice=0 Account=kit 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:35:06 TimeLimit=02:00:00 TimeMin=N/A&lt;br /&gt;
   SubmitTime=2020-03-16T14:14:54 EligibleTime=2020-03-16T14:14:54&lt;br /&gt;
   AccrueTime=2020-03-16T14:14:54&lt;br /&gt;
   StartTime=2020-03-16T15:12:51 EndTime=2020-03-16T17:12:51 Deadline=N/A&lt;br /&gt;
   SuspendTime=None SecsPreSuspend=0 LastSchedEval=2020-03-16T15:12:51&lt;br /&gt;
   Partition=multiple AllocNode:Sid=uc2n995:5064&lt;br /&gt;
   ReqNodeList=(null) ExcNodeList=(null)&lt;br /&gt;
   NodeList=uc2n[165-166]&lt;br /&gt;
   BatchHost=uc2n165&lt;br /&gt;
   NumNodes=2 NumCPUs=160 NumTasks=80 CPUs/Task=1 ReqB:S:C:T=0:0:*:1&lt;br /&gt;
   TRES=cpu=160,mem=96320M,node=2,billing=160&lt;br /&gt;
   Socks/Node=* NtasksPerN:B:S:C=40:0:*:1 CoreSpec=*&lt;br /&gt;
   MinCPUsNode=40 MinMemoryCPU=1204M MinTmpDiskNode=0&lt;br /&gt;
   Features=(null) DelayBoot=00:00:00&lt;br /&gt;
   OverSubscribe=NO Contiguous=0 Licenses=(null) Network=(null)&lt;br /&gt;
   Command=/pfs/data5/home/kit/scc/bq0742/git/CPV/bin/CPV.sbatch&lt;br /&gt;
   WorkDir=/pfs/data5/home/kit/scc/bq0742/git/CPV/bin&lt;br /&gt;
   StdErr=/pfs/data5/home/kit/scc/bq0742/git/CPV/bin/slurm-18089884.out&lt;br /&gt;
   StdIn=/dev/null&lt;br /&gt;
   StdOut=/pfs/data5/home/kit/scc/bq0742/git/CPV/bin/slurm-18089884.out&lt;br /&gt;
   Power=&lt;br /&gt;
   MailUser=(null) MailType=NONE&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 18089884 | grep -i State&lt;br /&gt;
   JobState=COMPLETED 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;
{| width=750px 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#lbAI 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;
[[Category:bwUniCluster 2.0|bwUniCluster 2.0]]&lt;br /&gt;
[[#top|Back to top]]&lt;/div&gt;</summary>
		<author><name>H Weber</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster2.0/Slurm&amp;diff=12444</id>
		<title>BwUniCluster2.0/Slurm</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster2.0/Slurm&amp;diff=12444"/>
		<updated>2023-11-14T09:26:55Z</updated>

		<summary type="html">&lt;p&gt;H Weber: /* BeeOND (BeeGFS On-Demand) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&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 [[bwUniCluster 2.0|bwUniCluster 2.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 2.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;
If your job was submitted to the &amp;quot;multiple&amp;quot; queue you can log into the allocated nodes via SSH as soon as the job is running.&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;
* [[BwUniCluster_2.0_Batch_Queues#sbatch_-p_queue|bwUniCluster 2.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_single -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=fat&#039;&#039; (with &#039;&#039;--partition=(dev_)single&#039;&#039; maximum &#039;&#039;--mem=96gb&#039;&#039; is possible):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sbatch --partition=fat 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;Because hyperthreading is switched on on bwUniCluster 2.0, the option --cpus-per-task (-c) must be set to 2*n, if you want to use n threads.&#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 40-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 single --export=ALL,OMP_NUM_THREADS=40 -J OpenMP_Test -N 1 -c 80 -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=80&lt;br /&gt;
#SBATCH --time=40:00&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}/2))&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;single&#039;&#039; as sbatch option:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sbatch -p single 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=single --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 a defined module environment related to OpenMPI is wished&lt;br /&gt;
module load mpi/openmpi/&amp;lt;placeholder_for_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 single -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 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=multiple -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;Because hyperthreading is switched on on bwUniCluster 2.0, the option --cpus-per-task (-c) must be set to 2*n, if you want to use n threads.&#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=56&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}/2))&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 multiple ./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 40-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=80&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}/2))&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 multiple ./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_4 and gpu_8 queues have 4 or 8 NVIDIA Tesla V100 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 ressources 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;
Sun Mar 29 15:20:05 2020       &lt;br /&gt;
+-----------------------------------------------------------------------------+&lt;br /&gt;
| NVIDIA-SMI 440.33.01    Driver Version: 440.33.01    CUDA Version: 10.2     |&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;
|===============================+======================+======================|&lt;br /&gt;
|   0  Tesla V100-SXM2...  Off  | 00000000:3A:00.0 Off |                    0 |&lt;br /&gt;
| N/A   29C    P0    39W / 300W |      9MiB / 32510MiB |      0%      Default |&lt;br /&gt;
+-------------------------------+----------------------+----------------------+&lt;br /&gt;
|   1  Tesla V100-SXM2...  Off  | 00000000:3B:00.0 Off |                    0 |&lt;br /&gt;
| N/A   30C    P0    41W / 300W |      8MiB / 32510MiB |      0%      Default |&lt;br /&gt;
+-------------------------------+----------------------+----------------------+&lt;br /&gt;
                                                                               &lt;br /&gt;
+-----------------------------------------------------------------------------+&lt;br /&gt;
| Processes:                                                       GPU Memory |&lt;br /&gt;
|  GPU       PID   Type   Process name                             Usage      |&lt;br /&gt;
|=============================================================================|&lt;br /&gt;
|    0     14228      G   /usr/bin/X                                     8MiB |&lt;br /&gt;
|    1     14228      G   /usr/bin/X                                     8MiB |&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;
However, there may be warnings, e.g. when running&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load compiler/gnu/10.3 mpi/openmpi devel/cuad&lt;br /&gt;
$ mpirun mpirun -np 2 ./mpi_cuda_app&lt;br /&gt;
--------------------------------------&lt;br /&gt;
WARNING: There are more than one active ports on host &#039;uc2n520&#039;, but the&lt;br /&gt;
default subnet GID prefix was detected on more than one of these&lt;br /&gt;
ports.  If these ports are connected to different physical IB&lt;br /&gt;
networks, this configuration will fail in Open MPI.  This version of&lt;br /&gt;
Open MPI requires that every physically separate IB subnet that is&lt;br /&gt;
used between connected MPI processes must have different subnet ID&lt;br /&gt;
values.&lt;br /&gt;
&lt;br /&gt;
Please see this FAQ entry for more details:&lt;br /&gt;
&lt;br /&gt;
  http://www.open-mpi.org/faq/?category=openfabrics#ofa-default-subnet-gid&lt;br /&gt;
&lt;br /&gt;
NOTE: You can turn off this warning by setting the MCA parameter&lt;br /&gt;
      btl_openib_warn_default_gid_prefix to 0.&lt;br /&gt;
--------------------------------------------------------------------------&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&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;
(Please note, that CUDA per v11.4 is only available with up to GCC-10)&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 2.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, 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;
&#039;&#039;&#039;Possible optimization:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A possible optimization is that the private file system uses its own metadata server. With the constraint BEEOND the metadata server is started on the first node. Depending on your application, the metadata server could consume a decent amount of CPU power. In this case, adding a extra node to your job could improve the performance of the on-demand file system and the total runtime of your application. In order to use this option, start your application with the MPI option:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mpirun -nolocal myapplication&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
With the -nolocal option the node where mpirun is initiated is not used for your application. This node is fully available for the meta data server of your requested on-demand file system.&lt;br /&gt;
&lt;br /&gt;
Example job script:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
# Very simple example on how to use a private on-demand file system.&lt;br /&gt;
#SBATCH -N 10&lt;br /&gt;
#SBATCH --constraint=BEEOND&lt;br /&gt;
&lt;br /&gt;
# Create a workspace. &lt;br /&gt;
ws_allocate myresults-${SLURM_JOB_ID} 90&lt;br /&gt;
RESULTDIR=$(ws_find myresults-${SLURM_JOB_ID})&lt;br /&gt;
&lt;br /&gt;
# Set ENV variable to on-demand file system.&lt;br /&gt;
ODFSDIR=/mnt/odfs/${SLURM_JOB_ID}/stripe_16/&lt;br /&gt;
&lt;br /&gt;
# Start application and write results to on-demand file system.&lt;br /&gt;
mpirun -nolocal myapplication -o $ODFSDIR/results&lt;br /&gt;
&lt;br /&gt;
# Copy back data after your job application end.&lt;br /&gt;
rsync -av $ODFSDIR/results $RESULTDIR&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&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;
          18088744    single CPV.sbat   ab1234 PD       0:00      1 (Priority)&lt;br /&gt;
          18098414  multiple CPV.sbat   ab1234 PD       0:00      2 (Priority) &lt;br /&gt;
          18090089  multiple CPV.sbat   ab1234  R       2:27      2 uc2n[127-128]&lt;br /&gt;
$ squeue -l&lt;br /&gt;
            JOBID PARTITION     NAME     USER    STATE       TIME TIME_LIMI  NODES NODELIST(REASON) &lt;br /&gt;
         18088654    single CPV.sbat   ab1234 COMPLETI       4:29   2:00:00      1 uc2n374&lt;br /&gt;
         18088785    single CPV.sbat   ab1234  PENDING       0:00   2:00:00      1 (Priority)&lt;br /&gt;
         18098414  multiple CPV.sbat   ab1234  PENDING       0:00   2:00:00      2 (Priority)&lt;br /&gt;
         18088683    single CPV.sbat   ab1234  RUNNING       0:14   2:00:00      1 uc2n413  &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_multiple  :      8 nodes idle&lt;br /&gt;
Partition multiple      :    332 nodes idle&lt;br /&gt;
Partition dev_single    :      4 nodes idle&lt;br /&gt;
Partition single        :     76 nodes idle&lt;br /&gt;
Partition long          :     80 nodes idle&lt;br /&gt;
Partition fat           :      5 nodes idle&lt;br /&gt;
Partition dev_special   :    342 nodes idle&lt;br /&gt;
Partition special       :    342 nodes idle&lt;br /&gt;
Partition dev_multiple_e:      7 nodes idle&lt;br /&gt;
Partition multiple_e    :    335 nodes idle&lt;br /&gt;
Partition gpu_4         :     12 nodes idle&lt;br /&gt;
Partition gpu_8         :      6 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 2.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;
          18089884  multiple CPV.sbat   bq0742  R      33:44      2 uc2n[165-166]&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 18089884&lt;br /&gt;
&lt;br /&gt;
JobId=18089884 JobName=CPV.sbatch&lt;br /&gt;
   UserId=bq0742(8946) GroupId=scc(12345) MCS_label=N/A&lt;br /&gt;
   Priority=3 Nice=0 Account=kit 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:35:06 TimeLimit=02:00:00 TimeMin=N/A&lt;br /&gt;
   SubmitTime=2020-03-16T14:14:54 EligibleTime=2020-03-16T14:14:54&lt;br /&gt;
   AccrueTime=2020-03-16T14:14:54&lt;br /&gt;
   StartTime=2020-03-16T15:12:51 EndTime=2020-03-16T17:12:51 Deadline=N/A&lt;br /&gt;
   SuspendTime=None SecsPreSuspend=0 LastSchedEval=2020-03-16T15:12:51&lt;br /&gt;
   Partition=multiple AllocNode:Sid=uc2n995:5064&lt;br /&gt;
   ReqNodeList=(null) ExcNodeList=(null)&lt;br /&gt;
   NodeList=uc2n[165-166]&lt;br /&gt;
   BatchHost=uc2n165&lt;br /&gt;
   NumNodes=2 NumCPUs=160 NumTasks=80 CPUs/Task=1 ReqB:S:C:T=0:0:*:1&lt;br /&gt;
   TRES=cpu=160,mem=96320M,node=2,billing=160&lt;br /&gt;
   Socks/Node=* NtasksPerN:B:S:C=40:0:*:1 CoreSpec=*&lt;br /&gt;
   MinCPUsNode=40 MinMemoryCPU=1204M MinTmpDiskNode=0&lt;br /&gt;
   Features=(null) DelayBoot=00:00:00&lt;br /&gt;
   OverSubscribe=NO Contiguous=0 Licenses=(null) Network=(null)&lt;br /&gt;
   Command=/pfs/data5/home/kit/scc/bq0742/git/CPV/bin/CPV.sbatch&lt;br /&gt;
   WorkDir=/pfs/data5/home/kit/scc/bq0742/git/CPV/bin&lt;br /&gt;
   StdErr=/pfs/data5/home/kit/scc/bq0742/git/CPV/bin/slurm-18089884.out&lt;br /&gt;
   StdIn=/dev/null&lt;br /&gt;
   StdOut=/pfs/data5/home/kit/scc/bq0742/git/CPV/bin/slurm-18089884.out&lt;br /&gt;
   Power=&lt;br /&gt;
   MailUser=(null) MailType=NONE&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 18089884 | grep -i State&lt;br /&gt;
   JobState=COMPLETED 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;
{| width=750px 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#lbAI 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;
[[Category:bwUniCluster 2.0|bwUniCluster 2.0]]&lt;br /&gt;
[[#top|Back to top]]&lt;/div&gt;</summary>
		<author><name>H Weber</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster2.0/Slurm&amp;diff=12443</id>
		<title>BwUniCluster2.0/Slurm</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster2.0/Slurm&amp;diff=12443"/>
		<updated>2023-11-14T09:22:53Z</updated>

		<summary type="html">&lt;p&gt;H Weber: /* BeeOND (BeeGFS On-Demand) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&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 [[bwUniCluster 2.0|bwUniCluster 2.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 2.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;
If your job was submitted to the &amp;quot;multiple&amp;quot; queue you can log into the allocated nodes via SSH as soon as the job is running.&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;
* [[BwUniCluster_2.0_Batch_Queues#sbatch_-p_queue|bwUniCluster 2.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_single -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=fat&#039;&#039; (with &#039;&#039;--partition=(dev_)single&#039;&#039; maximum &#039;&#039;--mem=96gb&#039;&#039; is possible):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sbatch --partition=fat 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;Because hyperthreading is switched on on bwUniCluster 2.0, the option --cpus-per-task (-c) must be set to 2*n, if you want to use n threads.&#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 40-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 single --export=ALL,OMP_NUM_THREADS=40 -J OpenMP_Test -N 1 -c 80 -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=80&lt;br /&gt;
#SBATCH --time=40:00&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}/2))&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;single&#039;&#039; as sbatch option:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sbatch -p single 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=single --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 a defined module environment related to OpenMPI is wished&lt;br /&gt;
module load mpi/openmpi/&amp;lt;placeholder_for_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 single -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 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=multiple -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;Because hyperthreading is switched on on bwUniCluster 2.0, the option --cpus-per-task (-c) must be set to 2*n, if you want to use n threads.&#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=56&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}/2))&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 multiple ./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 40-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=80&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}/2))&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 multiple ./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_4 and gpu_8 queues have 4 or 8 NVIDIA Tesla V100 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 ressources 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;
Sun Mar 29 15:20:05 2020       &lt;br /&gt;
+-----------------------------------------------------------------------------+&lt;br /&gt;
| NVIDIA-SMI 440.33.01    Driver Version: 440.33.01    CUDA Version: 10.2     |&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;
|===============================+======================+======================|&lt;br /&gt;
|   0  Tesla V100-SXM2...  Off  | 00000000:3A:00.0 Off |                    0 |&lt;br /&gt;
| N/A   29C    P0    39W / 300W |      9MiB / 32510MiB |      0%      Default |&lt;br /&gt;
+-------------------------------+----------------------+----------------------+&lt;br /&gt;
|   1  Tesla V100-SXM2...  Off  | 00000000:3B:00.0 Off |                    0 |&lt;br /&gt;
| N/A   30C    P0    41W / 300W |      8MiB / 32510MiB |      0%      Default |&lt;br /&gt;
+-------------------------------+----------------------+----------------------+&lt;br /&gt;
                                                                               &lt;br /&gt;
+-----------------------------------------------------------------------------+&lt;br /&gt;
| Processes:                                                       GPU Memory |&lt;br /&gt;
|  GPU       PID   Type   Process name                             Usage      |&lt;br /&gt;
|=============================================================================|&lt;br /&gt;
|    0     14228      G   /usr/bin/X                                     8MiB |&lt;br /&gt;
|    1     14228      G   /usr/bin/X                                     8MiB |&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;
However, there may be warnings, e.g. when running&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load compiler/gnu/10.3 mpi/openmpi devel/cuad&lt;br /&gt;
$ mpirun mpirun -np 2 ./mpi_cuda_app&lt;br /&gt;
--------------------------------------&lt;br /&gt;
WARNING: There are more than one active ports on host &#039;uc2n520&#039;, but the&lt;br /&gt;
default subnet GID prefix was detected on more than one of these&lt;br /&gt;
ports.  If these ports are connected to different physical IB&lt;br /&gt;
networks, this configuration will fail in Open MPI.  This version of&lt;br /&gt;
Open MPI requires that every physically separate IB subnet that is&lt;br /&gt;
used between connected MPI processes must have different subnet ID&lt;br /&gt;
values.&lt;br /&gt;
&lt;br /&gt;
Please see this FAQ entry for more details:&lt;br /&gt;
&lt;br /&gt;
  http://www.open-mpi.org/faq/?category=openfabrics#ofa-default-subnet-gid&lt;br /&gt;
&lt;br /&gt;
NOTE: You can turn off this warning by setting the MCA parameter&lt;br /&gt;
      btl_openib_warn_default_gid_prefix to 0.&lt;br /&gt;
--------------------------------------------------------------------------&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&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;
(Please note, that CUDA per v11.4 is only available with up to GCC-10)&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 2.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;
The capacity of the private file system depends on the number of nodes. For each node you get 750 Gbyte.&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, otherwise the used disk space is exceeded.  &lt;br /&gt;
&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;
&#039;&#039;&#039;Possible optimization:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A possible optimization is that the private file system uses its own metadata server. With the constraint BEEOND the metadata server is started on the first node. Depending on your application, the metadata server could consume a decent amount of CPU power. In this case, adding a extra node to your job could improve the performance of the on-demand file system and the total runtime of your application. In order to use this option, start your application with the MPI option:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mpirun -nolocal myapplication&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
With the -nolocal option the node where mpirun is initiated is not used for your application. This node is fully available for the meta data server of your requested on-demand file system.&lt;br /&gt;
&lt;br /&gt;
Example job script:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
# Very simple example on how to use a private on-demand file system.&lt;br /&gt;
#SBATCH -N 10&lt;br /&gt;
#SBATCH --constraint=BEEOND&lt;br /&gt;
&lt;br /&gt;
# Create a workspace. &lt;br /&gt;
ws_allocate myresults-${SLURM_JOB_ID} 90&lt;br /&gt;
RESULTDIR=$(ws_find myresults-${SLURM_JOB_ID})&lt;br /&gt;
&lt;br /&gt;
# Set ENV variable to on-demand file system.&lt;br /&gt;
ODFSDIR=/mnt/odfs/${SLURM_JOB_ID}/stripe_16/&lt;br /&gt;
&lt;br /&gt;
# Start application and write results to on-demand file system.&lt;br /&gt;
mpirun -nolocal myapplication -o $ODFSDIR/results&lt;br /&gt;
&lt;br /&gt;
# Copy back data after your job application end.&lt;br /&gt;
rsync -av $ODFSDIR/results $RESULTDIR&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&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;
          18088744    single CPV.sbat   ab1234 PD       0:00      1 (Priority)&lt;br /&gt;
          18098414  multiple CPV.sbat   ab1234 PD       0:00      2 (Priority) &lt;br /&gt;
          18090089  multiple CPV.sbat   ab1234  R       2:27      2 uc2n[127-128]&lt;br /&gt;
$ squeue -l&lt;br /&gt;
            JOBID PARTITION     NAME     USER    STATE       TIME TIME_LIMI  NODES NODELIST(REASON) &lt;br /&gt;
         18088654    single CPV.sbat   ab1234 COMPLETI       4:29   2:00:00      1 uc2n374&lt;br /&gt;
         18088785    single CPV.sbat   ab1234  PENDING       0:00   2:00:00      1 (Priority)&lt;br /&gt;
         18098414  multiple CPV.sbat   ab1234  PENDING       0:00   2:00:00      2 (Priority)&lt;br /&gt;
         18088683    single CPV.sbat   ab1234  RUNNING       0:14   2:00:00      1 uc2n413  &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_multiple  :      8 nodes idle&lt;br /&gt;
Partition multiple      :    332 nodes idle&lt;br /&gt;
Partition dev_single    :      4 nodes idle&lt;br /&gt;
Partition single        :     76 nodes idle&lt;br /&gt;
Partition long          :     80 nodes idle&lt;br /&gt;
Partition fat           :      5 nodes idle&lt;br /&gt;
Partition dev_special   :    342 nodes idle&lt;br /&gt;
Partition special       :    342 nodes idle&lt;br /&gt;
Partition dev_multiple_e:      7 nodes idle&lt;br /&gt;
Partition multiple_e    :    335 nodes idle&lt;br /&gt;
Partition gpu_4         :     12 nodes idle&lt;br /&gt;
Partition gpu_8         :      6 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 2.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;
          18089884  multiple CPV.sbat   bq0742  R      33:44      2 uc2n[165-166]&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 18089884&lt;br /&gt;
&lt;br /&gt;
JobId=18089884 JobName=CPV.sbatch&lt;br /&gt;
   UserId=bq0742(8946) GroupId=scc(12345) MCS_label=N/A&lt;br /&gt;
   Priority=3 Nice=0 Account=kit 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:35:06 TimeLimit=02:00:00 TimeMin=N/A&lt;br /&gt;
   SubmitTime=2020-03-16T14:14:54 EligibleTime=2020-03-16T14:14:54&lt;br /&gt;
   AccrueTime=2020-03-16T14:14:54&lt;br /&gt;
   StartTime=2020-03-16T15:12:51 EndTime=2020-03-16T17:12:51 Deadline=N/A&lt;br /&gt;
   SuspendTime=None SecsPreSuspend=0 LastSchedEval=2020-03-16T15:12:51&lt;br /&gt;
   Partition=multiple AllocNode:Sid=uc2n995:5064&lt;br /&gt;
   ReqNodeList=(null) ExcNodeList=(null)&lt;br /&gt;
   NodeList=uc2n[165-166]&lt;br /&gt;
   BatchHost=uc2n165&lt;br /&gt;
   NumNodes=2 NumCPUs=160 NumTasks=80 CPUs/Task=1 ReqB:S:C:T=0:0:*:1&lt;br /&gt;
   TRES=cpu=160,mem=96320M,node=2,billing=160&lt;br /&gt;
   Socks/Node=* NtasksPerN:B:S:C=40:0:*:1 CoreSpec=*&lt;br /&gt;
   MinCPUsNode=40 MinMemoryCPU=1204M MinTmpDiskNode=0&lt;br /&gt;
   Features=(null) DelayBoot=00:00:00&lt;br /&gt;
   OverSubscribe=NO Contiguous=0 Licenses=(null) Network=(null)&lt;br /&gt;
   Command=/pfs/data5/home/kit/scc/bq0742/git/CPV/bin/CPV.sbatch&lt;br /&gt;
   WorkDir=/pfs/data5/home/kit/scc/bq0742/git/CPV/bin&lt;br /&gt;
   StdErr=/pfs/data5/home/kit/scc/bq0742/git/CPV/bin/slurm-18089884.out&lt;br /&gt;
   StdIn=/dev/null&lt;br /&gt;
   StdOut=/pfs/data5/home/kit/scc/bq0742/git/CPV/bin/slurm-18089884.out&lt;br /&gt;
   Power=&lt;br /&gt;
   MailUser=(null) MailType=NONE&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 18089884 | grep -i State&lt;br /&gt;
   JobState=COMPLETED 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;
{| width=750px 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#lbAI 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;
[[Category:bwUniCluster 2.0|bwUniCluster 2.0]]&lt;br /&gt;
[[#top|Back to top]]&lt;/div&gt;</summary>
		<author><name>H Weber</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster2.0/Slurm&amp;diff=12442</id>
		<title>BwUniCluster2.0/Slurm</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster2.0/Slurm&amp;diff=12442"/>
		<updated>2023-11-14T09:19:24Z</updated>

		<summary type="html">&lt;p&gt;H Weber: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&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 [[bwUniCluster 2.0|bwUniCluster 2.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 2.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;
If your job was submitted to the &amp;quot;multiple&amp;quot; queue you can log into the allocated nodes via SSH as soon as the job is running.&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;
* [[BwUniCluster_2.0_Batch_Queues#sbatch_-p_queue|bwUniCluster 2.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_single -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=fat&#039;&#039; (with &#039;&#039;--partition=(dev_)single&#039;&#039; maximum &#039;&#039;--mem=96gb&#039;&#039; is possible):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sbatch --partition=fat 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;Because hyperthreading is switched on on bwUniCluster 2.0, the option --cpus-per-task (-c) must be set to 2*n, if you want to use n threads.&#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 40-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 single --export=ALL,OMP_NUM_THREADS=40 -J OpenMP_Test -N 1 -c 80 -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=80&lt;br /&gt;
#SBATCH --time=40:00&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}/2))&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;single&#039;&#039; as sbatch option:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sbatch -p single 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=single --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 a defined module environment related to OpenMPI is wished&lt;br /&gt;
module load mpi/openmpi/&amp;lt;placeholder_for_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 single -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 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=multiple -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;Because hyperthreading is switched on on bwUniCluster 2.0, the option --cpus-per-task (-c) must be set to 2*n, if you want to use n threads.&#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=56&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}/2))&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 multiple ./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 40-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=80&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}/2))&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 multiple ./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_4 and gpu_8 queues have 4 or 8 NVIDIA Tesla V100 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 ressources 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;
Sun Mar 29 15:20:05 2020       &lt;br /&gt;
+-----------------------------------------------------------------------------+&lt;br /&gt;
| NVIDIA-SMI 440.33.01    Driver Version: 440.33.01    CUDA Version: 10.2     |&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;
|===============================+======================+======================|&lt;br /&gt;
|   0  Tesla V100-SXM2...  Off  | 00000000:3A:00.0 Off |                    0 |&lt;br /&gt;
| N/A   29C    P0    39W / 300W |      9MiB / 32510MiB |      0%      Default |&lt;br /&gt;
+-------------------------------+----------------------+----------------------+&lt;br /&gt;
|   1  Tesla V100-SXM2...  Off  | 00000000:3B:00.0 Off |                    0 |&lt;br /&gt;
| N/A   30C    P0    41W / 300W |      8MiB / 32510MiB |      0%      Default |&lt;br /&gt;
+-------------------------------+----------------------+----------------------+&lt;br /&gt;
                                                                               &lt;br /&gt;
+-----------------------------------------------------------------------------+&lt;br /&gt;
| Processes:                                                       GPU Memory |&lt;br /&gt;
|  GPU       PID   Type   Process name                             Usage      |&lt;br /&gt;
|=============================================================================|&lt;br /&gt;
|    0     14228      G   /usr/bin/X                                     8MiB |&lt;br /&gt;
|    1     14228      G   /usr/bin/X                                     8MiB |&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;
However, there may be warnings, e.g. when running&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load compiler/gnu/10.3 mpi/openmpi devel/cuad&lt;br /&gt;
$ mpirun mpirun -np 2 ./mpi_cuda_app&lt;br /&gt;
--------------------------------------&lt;br /&gt;
WARNING: There are more than one active ports on host &#039;uc2n520&#039;, but the&lt;br /&gt;
default subnet GID prefix was detected on more than one of these&lt;br /&gt;
ports.  If these ports are connected to different physical IB&lt;br /&gt;
networks, this configuration will fail in Open MPI.  This version of&lt;br /&gt;
Open MPI requires that every physically separate IB subnet that is&lt;br /&gt;
used between connected MPI processes must have different subnet ID&lt;br /&gt;
values.&lt;br /&gt;
&lt;br /&gt;
Please see this FAQ entry for more details:&lt;br /&gt;
&lt;br /&gt;
  http://www.open-mpi.org/faq/?category=openfabrics#ofa-default-subnet-gid&lt;br /&gt;
&lt;br /&gt;
NOTE: You can turn off this warning by setting the MCA parameter&lt;br /&gt;
      btl_openib_warn_default_gid_prefix to 0.&lt;br /&gt;
--------------------------------------------------------------------------&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&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;
(Please note, that CUDA per v11.4 is only available with up to GCC-10)&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 2.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;
The capacity of the private file system depends on the number of nodes. For each node you get 750 Gbyte.&lt;br /&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, otherwise the used disk space is exceeded.  &lt;br /&gt;
&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;
&#039;&#039;&#039;Possible optimization:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A possible optimization is that the private file system uses its own metadata server. With the constraint BEEOND the metadata server is started on the first node. Depending on your application, the metadata server could consume a decent amount of CPU power. In this case, adding a extra node to your job could improve the performance of the on-demand file system and the total runtime of your application. In order to use this option, start your application with the MPI option:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mpirun -nolocal myapplication&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
With the -nolocal option the node where mpirun is initiated is not used for your application. This node is fully available for the meta data server of your requested on-demand file system.&lt;br /&gt;
&lt;br /&gt;
Example job script:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
# Very simple example on how to use a private on-demand file system.&lt;br /&gt;
#SBATCH -N 10&lt;br /&gt;
#SBATCH --constraint=BEEOND&lt;br /&gt;
&lt;br /&gt;
# Create a workspace. &lt;br /&gt;
ws_allocate myresults-${SLURM_JOB_ID} 90&lt;br /&gt;
RESULTDIR=$(ws_find myresults-${SLURM_JOB_ID})&lt;br /&gt;
&lt;br /&gt;
# Set ENV variable to on-demand file system.&lt;br /&gt;
ODFSDIR=/mnt/odfs/${SLURM_JOB_ID}/stripe_16/&lt;br /&gt;
&lt;br /&gt;
# Start application and write results to on-demand file system.&lt;br /&gt;
mpirun -nolocal myapplication -o $ODFSDIR/results&lt;br /&gt;
&lt;br /&gt;
# Copy back data after your job application end.&lt;br /&gt;
rsync -av $ODFSDIR/results $RESULTDIR&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&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;
          18088744    single CPV.sbat   ab1234 PD       0:00      1 (Priority)&lt;br /&gt;
          18098414  multiple CPV.sbat   ab1234 PD       0:00      2 (Priority) &lt;br /&gt;
          18090089  multiple CPV.sbat   ab1234  R       2:27      2 uc2n[127-128]&lt;br /&gt;
$ squeue -l&lt;br /&gt;
            JOBID PARTITION     NAME     USER    STATE       TIME TIME_LIMI  NODES NODELIST(REASON) &lt;br /&gt;
         18088654    single CPV.sbat   ab1234 COMPLETI       4:29   2:00:00      1 uc2n374&lt;br /&gt;
         18088785    single CPV.sbat   ab1234  PENDING       0:00   2:00:00      1 (Priority)&lt;br /&gt;
         18098414  multiple CPV.sbat   ab1234  PENDING       0:00   2:00:00      2 (Priority)&lt;br /&gt;
         18088683    single CPV.sbat   ab1234  RUNNING       0:14   2:00:00      1 uc2n413  &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_multiple  :      8 nodes idle&lt;br /&gt;
Partition multiple      :    332 nodes idle&lt;br /&gt;
Partition dev_single    :      4 nodes idle&lt;br /&gt;
Partition single        :     76 nodes idle&lt;br /&gt;
Partition long          :     80 nodes idle&lt;br /&gt;
Partition fat           :      5 nodes idle&lt;br /&gt;
Partition dev_special   :    342 nodes idle&lt;br /&gt;
Partition special       :    342 nodes idle&lt;br /&gt;
Partition dev_multiple_e:      7 nodes idle&lt;br /&gt;
Partition multiple_e    :    335 nodes idle&lt;br /&gt;
Partition gpu_4         :     12 nodes idle&lt;br /&gt;
Partition gpu_8         :      6 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 2.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;
          18089884  multiple CPV.sbat   bq0742  R      33:44      2 uc2n[165-166]&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 18089884&lt;br /&gt;
&lt;br /&gt;
JobId=18089884 JobName=CPV.sbatch&lt;br /&gt;
   UserId=bq0742(8946) GroupId=scc(12345) MCS_label=N/A&lt;br /&gt;
   Priority=3 Nice=0 Account=kit 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:35:06 TimeLimit=02:00:00 TimeMin=N/A&lt;br /&gt;
   SubmitTime=2020-03-16T14:14:54 EligibleTime=2020-03-16T14:14:54&lt;br /&gt;
   AccrueTime=2020-03-16T14:14:54&lt;br /&gt;
   StartTime=2020-03-16T15:12:51 EndTime=2020-03-16T17:12:51 Deadline=N/A&lt;br /&gt;
   SuspendTime=None SecsPreSuspend=0 LastSchedEval=2020-03-16T15:12:51&lt;br /&gt;
   Partition=multiple AllocNode:Sid=uc2n995:5064&lt;br /&gt;
   ReqNodeList=(null) ExcNodeList=(null)&lt;br /&gt;
   NodeList=uc2n[165-166]&lt;br /&gt;
   BatchHost=uc2n165&lt;br /&gt;
   NumNodes=2 NumCPUs=160 NumTasks=80 CPUs/Task=1 ReqB:S:C:T=0:0:*:1&lt;br /&gt;
   TRES=cpu=160,mem=96320M,node=2,billing=160&lt;br /&gt;
   Socks/Node=* NtasksPerN:B:S:C=40:0:*:1 CoreSpec=*&lt;br /&gt;
   MinCPUsNode=40 MinMemoryCPU=1204M MinTmpDiskNode=0&lt;br /&gt;
   Features=(null) DelayBoot=00:00:00&lt;br /&gt;
   OverSubscribe=NO Contiguous=0 Licenses=(null) Network=(null)&lt;br /&gt;
   Command=/pfs/data5/home/kit/scc/bq0742/git/CPV/bin/CPV.sbatch&lt;br /&gt;
   WorkDir=/pfs/data5/home/kit/scc/bq0742/git/CPV/bin&lt;br /&gt;
   StdErr=/pfs/data5/home/kit/scc/bq0742/git/CPV/bin/slurm-18089884.out&lt;br /&gt;
   StdIn=/dev/null&lt;br /&gt;
   StdOut=/pfs/data5/home/kit/scc/bq0742/git/CPV/bin/slurm-18089884.out&lt;br /&gt;
   Power=&lt;br /&gt;
   MailUser=(null) MailType=NONE&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 18089884 | grep -i State&lt;br /&gt;
   JobState=COMPLETED 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;
{| width=750px 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#lbAI 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;
[[Category:bwUniCluster 2.0|bwUniCluster 2.0]]&lt;br /&gt;
[[#top|Back to top]]&lt;/div&gt;</summary>
		<author><name>H Weber</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster2.0/Hardware_and_Architecture&amp;diff=11456</id>
		<title>BwUniCluster2.0/Hardware and Architecture</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster2.0/Hardware_and_Architecture&amp;diff=11456"/>
		<updated>2022-11-16T11:28:13Z</updated>

		<summary type="html">&lt;p&gt;H Weber: /* File Systems */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Architecture of bwUniCluster 2.0 =&lt;br /&gt;
&lt;br /&gt;
The bwUniCluster 2.0 is a parallel computer with distributed memory. Each node of system consists of at least two Intel Xeon processor, local memory, disks, network adapters and optionally accelerators (NVIDIA Tesla V100). All nodes are connected by a fast InfiniBand interconnect. In addition the file system&lt;br /&gt;
Lustre, that is connected by coupling the InfiniBand of the file server with the InfiniBand&lt;br /&gt;
switch of the compute cluster, is added to bwUniCluster 2.0 to provide a fast and scalable&lt;br /&gt;
parallel file system.&lt;br /&gt;
&lt;br /&gt;
The operating system on each node is Red Hat Enterprise Linux (RHEL) 8.4. A number of additional software packages like e.g. SLURM have been installed on top. Some of these components are of special interest to end users and are briefly&lt;br /&gt;
discussed in this document. Others which are of greater importance to system&lt;br /&gt;
administrators will not be covered by this document.&lt;br /&gt;
&lt;br /&gt;
The individual nodes of the system may act in different roles. According to the services supplied by the nodes, they are separated into disjoint groups. From an end users point of view the different groups of nodes are login nodes, compute nodes, file server nodes and administrative server nodes.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Login Nodes&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The login nodes are the only nodes that are directly accessible by end users. These nodes&lt;br /&gt;
are used for interactive login, file management, program development and interactive pre-&lt;br /&gt;
and postprocessing. Two nodes are dedicated to this service but they are all accessible via&lt;br /&gt;
one address and a DNS round-robin alias distributes the login sessions to the&lt;br /&gt;
different login nodes.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Compute Node&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The majority of nodes are compute nodes which are managed by a batch system. Users &lt;br /&gt;
submit their jobs to the SLURM batch system and a job is executed when the required resources become available (depending on its fair-share priority).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;File Server Nodes&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The hardware of the parallel file system Lustre incorporates some file server nodes; the file&lt;br /&gt;
system Lustre is connected by coupling the InfiniBand of the file server with the independent InfiniBand switch of the compute cluster. In addition to shared file space there is also local storage on the disks of each node (for details see chapter &amp;quot;File Systems&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Administrative Server Nodes&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Some other nodes are delivering additional services like resource management, external&lt;br /&gt;
network connection, administration etc. These nodes can be accessed directly by system administrators only.&lt;br /&gt;
&lt;br /&gt;
= Components of bwUniCluster =&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
! style=&amp;quot;width:9%&amp;quot;|&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Compute nodes &amp;quot;Thin&amp;quot;&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Compute nodes &amp;quot;HPC&amp;quot;&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Compute nodes &amp;quot;Fat&amp;quot;&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| GPU x4&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| GPU x8&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Login&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Number of nodes&lt;br /&gt;
| 100 + 60&lt;br /&gt;
| 360&lt;br /&gt;
| 6&lt;br /&gt;
| 14&lt;br /&gt;
| 10&lt;br /&gt;
| 4&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Processors&lt;br /&gt;
| Intel Xeon Gold 6230&lt;br /&gt;
| Intel Xeon Gold 6230&lt;br /&gt;
| Intel Xeon Gold 6230&lt;br /&gt;
| Intel Xeon Gold 6230&lt;br /&gt;
| Intel Xeon Gold 6248&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Number of sockets&lt;br /&gt;
| 2&lt;br /&gt;
| 2&lt;br /&gt;
| 4&lt;br /&gt;
| 2&lt;br /&gt;
| 2&lt;br /&gt;
| 2&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Processor frequency (GHz)&lt;br /&gt;
| 2.1 Ghz&lt;br /&gt;
| 2.1 Ghz&lt;br /&gt;
| 2.1 Ghz&lt;br /&gt;
| 2.1 Ghz&lt;br /&gt;
| 2.5 Ghz&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Total number of cores&lt;br /&gt;
| 40&lt;br /&gt;
| 40&lt;br /&gt;
| 80&lt;br /&gt;
| 40&lt;br /&gt;
| 40&lt;br /&gt;
| 40&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Main memory&lt;br /&gt;
| 96 GB / 192 GB&lt;br /&gt;
| 96 GB&lt;br /&gt;
| 3 TB&lt;br /&gt;
| 384 GB&lt;br /&gt;
| 768 GB&lt;br /&gt;
| 384 GB&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Local SSD&lt;br /&gt;
| 960 GB SATA&lt;br /&gt;
| 960 GB SATA&lt;br /&gt;
| 4,8 TB NVMe&lt;br /&gt;
| 3,2 TB NVMe&lt;br /&gt;
| 6,4 TB NVMe&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Accelerators&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
| 4x NVIDIA Tesla V100&lt;br /&gt;
| 8x NVIDIA Tesla V100&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Interconnect&lt;br /&gt;
| IB HDR100 (blocking)&lt;br /&gt;
| IB HDR100&lt;br /&gt;
| IB HDR&lt;br /&gt;
| IB HDR&lt;br /&gt;
| IB HDR&lt;br /&gt;
| IB HDR100 (blocking)&lt;br /&gt;
|}&lt;br /&gt;
Table 1: Properties of the nodes&lt;br /&gt;
&lt;br /&gt;
= File Systems =&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 2.0 the parallel file system Lustre is used for most globally visible user data. Lustre is open source and Lustre solutions and support are available from different vendors. Nowadays, most of the biggest HPC systems are using Lustre. An initial home directory on a Lustre file system is created automatically after account activation, and the environment variable $HOME holds its name. Users can create so-called workspaces on another Lustre file system for non-permanent data with temporary lifetime. There is another workspace file system based on flash storage for special requirements available.&lt;br /&gt;
&lt;br /&gt;
Within a batch job further file systems are available: &lt;br /&gt;
* The directory $TMP is only available and visible on the local node. It is located on fast SSD storage devices.&lt;br /&gt;
* On request a parallel on-demand file system (BeeOND) is created which uses the SSDs of the nodes which were allocated to the batch job.&lt;br /&gt;
* On request the external LSDF Online Storage is mounted on the nodes which were allocated to the batch job. This file system is based on the parallel file system Spectrum Scale. &lt;br /&gt;
&lt;br /&gt;
Some of the characteristics of the file systems are shown in Table 2.&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;width:100%; vertical-align:top; background:#f5fffa;border:1px solid #000000;padding:1px&amp;quot;&lt;br /&gt;
|- style=&amp;quot;width:20%;height=20px; text-align:left;padding:3px&amp;quot;&lt;br /&gt;
! style=&amp;quot;background-color:#AAA;padding:3px&amp;quot;| Property&lt;br /&gt;
! style=&amp;quot;background-color:#AAA;padding:3px&amp;quot;| $TMP&lt;br /&gt;
! style=&amp;quot;background-color:#AAA;padding:3px&amp;quot;| BeeOND&lt;br /&gt;
! style=&amp;quot;background-color:#AAA;padding:3px&amp;quot;| $HOME&lt;br /&gt;
! style=&amp;quot;background-color:#AAA;padding:3px&amp;quot;| Workspace&lt;br /&gt;
! style=&amp;quot;background-color:#AAA;padding:3px&amp;quot;| Workspace &amp;lt;br&amp;gt; on flash&lt;br /&gt;
|- &lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Visibility &lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| local node&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| nodes of batch job&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| global&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| global&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| global&lt;br /&gt;
|- &lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Lifetime &lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| batch job runtime&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| batch job runtime&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| permanent&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| max. 240 days&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| max. 240 days&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Disk space &lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 960 GB - 6.4 TB &amp;lt;br&amp;gt; details see table 1&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| n*750 GB&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 1.2 PiB&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 4.1 PiB&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 236 TiB&lt;br /&gt;
|- &lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Capacity Quotas&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| no&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| no&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| yes &amp;lt;br&amp;gt; 1 TiB per user &amp;lt;br&amp;gt; also per organization&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| yes &amp;lt;br&amp;gt; 40 TiB per user&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| yes &amp;lt;br&amp;gt; 5 TiB per user&lt;br /&gt;
|- &lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Inode Quotas&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| no&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| no&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| yes &amp;lt;br&amp;gt; 10 million per user&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| yes &amp;lt;br&amp;gt; 30 million per user&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| yes &amp;lt;br&amp;gt; 25 million per user&lt;br /&gt;
|- &lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Backup&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| no&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| no&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| yes&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| no&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| no&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Read perf./node&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 500 MB/s - 6 GB/s &amp;lt;br&amp;gt; depends on type of local SSD / job queue: &amp;lt;br&amp;gt; 520 MB/s @ single / multiple &amp;lt;br&amp;gt; 800 MB/s @ multiple_e &amp;lt;br&amp;gt; 6600 MB/s @ fat &amp;lt;br&amp;gt; 6500 MB/s @ gpu_4 &amp;lt;br&amp;gt; 6500 MB/s @ gpu_8&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 400 MB/s - 500 MB/s&amp;lt;br&amp;gt; depends on type of local SSDs / job queue: &amp;lt;br&amp;gt; 500 MB/s @ multiple &amp;lt;br&amp;gt; 400 MB/s @ multiple_e&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 1 GB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 1 GB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 1 GB/s&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Write perf./node&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 500 MB/s - 4 GB/s &amp;lt;br&amp;gt; depends on type of local SSD / job queue: &amp;lt;br&amp;gt; 500 MB/s @ single / multiple &amp;lt;br&amp;gt; 650 MB/s @ multiple_e &amp;lt;br&amp;gt; 2900 MB/s @ fat &amp;lt;br&amp;gt; 2090 MB/s @ gpu_4 &amp;lt;br&amp;gt; 4060 MB/s @ gpu_8&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 250 MB/s - 350 MB/s &amp;lt;br&amp;gt; depends on type of local SSDs / job queue: &amp;lt;br&amp;gt; 350 MB/s @ multiple &amp;lt;br&amp;gt; 250 MB/s @ multiple_e&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 1 GB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 1 GB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 1 GB/s&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Total read perf.&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| n*500-6000 MB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| n*400-500 MB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 18 GB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 54 GB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 45 GB/s&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Total write perf.&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| n*500-4000 MB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| n*250-350 MB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 18 GB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 54 GB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 38 GB/s&lt;br /&gt;
|}&lt;br /&gt;
---------------------------------------------------------------------------------------------------------&lt;br /&gt;
  global: all nodes of UniCluster access the same file system;&lt;br /&gt;
  local: each node has its own file system;&lt;br /&gt;
  permanent: files are stored permanently;&lt;br /&gt;
  batch job: files are removed at end of the batch job.&lt;br /&gt;
---------------------------------------------------------------------------------------------------------&lt;br /&gt;
Table 2: Properties of the file systems&lt;br /&gt;
&lt;br /&gt;
== Selecting the appropriate file system ==&lt;br /&gt;
&lt;br /&gt;
In general, you should separate your data and store it on the appropriate file system.&lt;br /&gt;
Permanently needed data like software or important results should be stored below $HOME&lt;br /&gt;
but capacity restrictions (quotas) apply. In case you accidentally deleted data on $HOME&lt;br /&gt;
you can usually restore it from backup. Permanent data which is not needed for months&lt;br /&gt;
or exceeds the capacity restrictions should be sent to the LSDF Online Storage &lt;br /&gt;
or to the archive and deleted from the file systems. Temporary data which is only needed on a single&lt;br /&gt;
node and which does not exceed the disk space shown in the table above should be stored&lt;br /&gt;
below $TMP. Data which is read many times on a single node, e.g. if you are doing AI training, &lt;br /&gt;
should be copied to $TMP and read from there. Temporary data which is used from many nodes &lt;br /&gt;
of your batch job and which is only needed during job runtime should be stored on a &lt;br /&gt;
parallel on-demand file system. Temporary data which can be recomputed or which is the &lt;br /&gt;
result of one job and input for another job should be stored in workspaces. The lifetime &lt;br /&gt;
of data in workspaces is limited and depends on the lifetime of the workspace which can be &lt;br /&gt;
several months.&lt;br /&gt;
&lt;br /&gt;
For further details please check the chapters below.&lt;br /&gt;
&lt;br /&gt;
== $HOME ==&lt;br /&gt;
&lt;br /&gt;
The home directories of bwUniCluster 2.0 (uc2) users are located in the parallel file system Lustre.&lt;br /&gt;
You have access to your home directory from all nodes of uc2. A regular backup of these directories &lt;br /&gt;
to tape archive is done automatically. The directory $HOME is used to hold those files that are&lt;br /&gt;
permanently used like source codes, configuration files, executable programs etc. &lt;br /&gt;
&lt;br /&gt;
On uc2 there is a default user quota limit of 1 TiB and 10 million inodes (files and directories) per user. &lt;br /&gt;
You can chek your current usage and limits with the command&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ lfs quota -uh $(whoami) $HOME&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In addition to the user limit there is a limit of your organization (e.g. university) which depends on the financial share. This limit is enforced with so-called Lustre project quotas. You can show the current usage and limits of your organization with the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
lfs quota -ph $(grep $(echo $HOME | sed -e &amp;quot;s|/[^/]*/[^/]*$||&amp;quot;) /pfs/data5/project_ids.txt | cut -f 1 -d\ ) $HOME&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Workspaces ==&lt;br /&gt;
&lt;br /&gt;
On uc2 workspaces can be used to store large non-permanent data sets, e.g. restart files or output&lt;br /&gt;
data that has to be post-processed. The file system used for workspaces is also the parallel file system Lustre. This file system is especially designed for parallel access and for a high throughput to large&lt;br /&gt;
files. It is able to provide high data transfer rates of up to 54 GB/s write and read performance when data access is parallel. &lt;br /&gt;
&lt;br /&gt;
Workspaces have a lifetime and the data on a workspace expires as a whole after a fixed period. The maximum lifetime of a workspace is 60 days, but it can be renewed at the end of that period 3 times to a total maximum of 240 days after workspace generation. If a workspace has inadvertently expired we can restore the data during a limited time (few weeks). In this case you should create a new workspace and report the name of the new and of the expired workspace in a ticket.&lt;br /&gt;
&lt;br /&gt;
Creating, deleting, finding and extending workspaces is explained on the  [[workspace]] page.&lt;br /&gt;
&lt;br /&gt;
On uc2 there is a default user quota limit of 40 TiB and 30 million inodes (files and directories) per user. &lt;br /&gt;
You can chek your current usage and limits with the command&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ lfs quota -uh $(whoami) /pfs/work7&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note that the quotas include data and inodes for all of your workspaces and all of your expired workspaces (as long as they are not yet completely removed).&lt;br /&gt;
&lt;br /&gt;
=== Reminder for workspace deletion ===&lt;br /&gt;
&lt;br /&gt;
Normally you will get an email every day starting 7 days before a workspace expires. You can send yourself a calender entry which reminds you when a workspace will be automatically deleted:&lt;br /&gt;
&lt;br /&gt;
 $ ws_send_ical.sh &amp;lt;workspace&amp;gt; &amp;lt;email&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Improving Performance on $HOME and workspaces ==&lt;br /&gt;
&lt;br /&gt;
The following recommendations might help to improve throughput and metadata&lt;br /&gt;
performance on Lustre filesystems.&lt;br /&gt;
&lt;br /&gt;
=== &#039;&#039;&#039;Improving Throughput Performance&#039;&#039;&#039; ===&lt;br /&gt;
&lt;br /&gt;
Depending on your application some adaptations might be necessary if you want to reach&lt;br /&gt;
the full bandwidth of the filesystems. Parallel filesystems typically stripe files over storage subsystems, i.e. large files are separated into stripes and distributed to different storage subsystems. In Lustre, the size of these stripes (sometimes also mentioned as chunks) is called stripe size and the number of used storage subsystems is called stripe count.&lt;br /&gt;
&lt;br /&gt;
When you are designing your application you should consider that the performance of&lt;br /&gt;
parallel filesystems is generally better if data is transferred in large blocks and stored in&lt;br /&gt;
few large files. In more detail, to increase throughput performance of a parallel application&lt;br /&gt;
following aspects should be considered:&lt;br /&gt;
&lt;br /&gt;
* collect large chunks of data and write them sequentially at once,&lt;br /&gt;
&lt;br /&gt;
* to exploit complete filesystem bandwidth use several clients,&lt;br /&gt;
&lt;br /&gt;
* avoid competitive file access by different tasks or use blocks with boundaries at stripe size (default is 1MB),&lt;br /&gt;
&lt;br /&gt;
* if files are small enough for the SSDs and are only used by one process store them on $TMP.&lt;br /&gt;
&lt;br /&gt;
With previous Lustre versions adapting the Lustre stripe count was the most important optimization. However, for the workspaces of uc2 the new Lustre feature Progressive File Layouts has been used to define file striping parameters. This means that the stripe count is adapted if the file size is growing. In normal cases users no longer need to adapt file striping parameters in case they have very huge files or in order to reach better performance. &lt;br /&gt;
&lt;br /&gt;
If you know what you are doing you can still change striping parameters, e.g. the stripe count, of a directory and of newly created files. New files and directories inherit the stripe count from the parent directory. E.g. if you want to enhance throughput on a single very large file which is created in the directory $HOME/my_output_dir you can use the command&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ lfs setstripe -c-1 $HOME/my_output_dir&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
to change the stripe count to -1 which means that all storage subsystems of the file system are used to store that file. If you change the stripe count of a directory the stripe count of existing files inside this&lt;br /&gt;
directory is not changed. If you want to change the stripe count of existing files, change&lt;br /&gt;
the stripe count of the parent directory, copy the files to new files, remove the old files&lt;br /&gt;
and move the new files back to the old name. In order to check the stripe setting of&lt;br /&gt;
the file my_file use&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ lfs getstripe my_file&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Also note that changes on the striping parameters (e.g. stripe count) are not saved in the&lt;br /&gt;
backup, i.e. if directories have to be recreated this information is lost and the default stripe&lt;br /&gt;
count will be used. Therefore, you should annotate for which directories you made changes&lt;br /&gt;
to the striping parameters so that you can repeat these changes if required.&lt;br /&gt;
&lt;br /&gt;
=== &#039;&#039;&#039;Improving Metadata Performance&#039;&#039;&#039; ===&lt;br /&gt;
&lt;br /&gt;
Metadata performance on parallel file systems is usually not as good as with local&lt;br /&gt;
filesystems. In addition, it is usually not scalable, i.e. a limited resource. Therefore,&lt;br /&gt;
you should omit metadata operations whenever possible. For example, it is much better&lt;br /&gt;
to have few large files than lots of small files. In more detail, to increase metadata&lt;br /&gt;
performance of a parallel application following aspects should be considered:&lt;br /&gt;
&lt;br /&gt;
* avoid creating many small files,&lt;br /&gt;
&lt;br /&gt;
* avoid competitive directory access, e.g. by creating files in separate subdirectories for each task,&lt;br /&gt;
&lt;br /&gt;
* if many small files are only used within a batch job and accessed by one process store them on $TMP,&lt;br /&gt;
&lt;br /&gt;
* change the default colorization setting of the command ls (see below).&lt;br /&gt;
&lt;br /&gt;
On modern Linux systems, the GNU ls command often uses colorization by default to&lt;br /&gt;
visually highlight the file type; this is especially true if the command is run within a terminal&lt;br /&gt;
session. This is because the default shell profile initializations usually contain an alias&lt;br /&gt;
directive similar to the following for the ls command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ alias ls=&amp;quot;ls --color=tty&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
However, running the ls command in this way for files on a Lustre file system requires&lt;br /&gt;
a stat() call to be used to determine the file type. This can result in a performance&lt;br /&gt;
overhead, because the stat() call always needs to determine the size of a file, and that&lt;br /&gt;
in turn means that the client node must query the object size of all the backing objects&lt;br /&gt;
that make up a file. As a result of the default colorization setting, running a simple&lt;br /&gt;
ls command on a Lustre file system often takes as much time as running the ls command&lt;br /&gt;
with the -l option (the same is true if the -F, -p, or the -classify option, or any other option &lt;br /&gt;
that requires information from a stat() call, is used). To avoid this performance overhead&lt;br /&gt;
when using ls commands, add an alias directive similar to the following&lt;br /&gt;
to your shell startup script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ alias ls=&amp;quot;ls --color=never&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Workspaces on flash storage ==&lt;br /&gt;
&lt;br /&gt;
There is another workspace file system for special reqirements available. The file system is called &#039;&#039;full flash pfs&#039;&#039; and is based on the parallel file system Lustre. Access will be granted on special request.&lt;br /&gt;
&lt;br /&gt;
=== Advantages of this file system ===&lt;br /&gt;
&lt;br /&gt;
# All storage devices are based on flash (no hard disks) with low access times. Hence performance is better compared to other parallel file systems for read and write access with small blocks and with small files, i.e. IOPS rates are improved.&lt;br /&gt;
# The file system is mounted on bwUniCluster 2.0 and HoreKa, i.e. it can be used to share data between these clusters.&lt;br /&gt;
&lt;br /&gt;
=== Access restrictions ===&lt;br /&gt;
&lt;br /&gt;
* Only HoreKa users or KIT users of bwUniCluster 2.0 can use this file system.&lt;br /&gt;
* Access is granted on request and for appropriate requirements. In order to request access, please open a ticket with the subject &#039;&#039;full flash pfs access required&#039;&#039; and describe the following topics:&lt;br /&gt;
** number of files you want to store on this file system&lt;br /&gt;
** needed capacity&lt;br /&gt;
** number of nodes used by your typical jobs&lt;br /&gt;
** special I/O requirements of your jobs&lt;br /&gt;
&lt;br /&gt;
=== Using the file system ===&lt;br /&gt;
&lt;br /&gt;
After access is granted, you can use the file system in the same way as a normal workspace. You just have to specify the name of the flash-based workspace file system using the option &#039;&#039;-F&#039;&#039; to all the commands that manage workspaces. On bwUniCluster 2.0 it is called &#039;&#039;ffuc&#039;&#039;, on HoreKa it is &#039;&#039;ffhk&#039;&#039;. For example, to create a workspace with name myws and a lifetime of 60 days on bwUniCluster 2.0 execute:&lt;br /&gt;
 ws_allocate -F ffuc myws 60&lt;br /&gt;
&lt;br /&gt;
If you want to use the full flash pfs on bwUniCluster 2.0 &#039;&#039;&#039;and&#039;&#039;&#039; HoreKa at the same time, please note that you only have to manage a particular workspace on one of the clusters since the name of the workspace directory is different. However, the path to each workspace is visible and can be used on both clusters.&lt;br /&gt;
&lt;br /&gt;
Other features are similar to normal workspaces. For example, we are able to restore expired workspaces for few weeks and you have to open a ticket to request the restore. There are quota limits with a default limit of 5 TB capacity and 25 millions inodes per user. You can check your current usage with&lt;br /&gt;
 lfs quota -uh $(whoami) /pfs/work8&lt;br /&gt;
&lt;br /&gt;
== $TMP ==&lt;br /&gt;
&lt;br /&gt;
While all tasks of a parallel application access the same $HOME and workspace directory, the &lt;br /&gt;
$TMP directory is local to each node on bwUniCluster 2.0. All nodes have fast SSDs &lt;br /&gt;
local storage devices which are used to store data below $TMP. Different tasks of a parallel&lt;br /&gt;
application use different $TMP directories when they do not utilize one node. This directory should&lt;br /&gt;
be used for temporary files being accessed by single tasks. It should also be used if you read the &lt;br /&gt;
same data many times from a single node, e.g. if you are doing AI training. In this case you should &lt;br /&gt;
copy the data at the beginning of your batch job to $TMP and read the data from there.&lt;br /&gt;
In addition, this directory should be used for the installation&lt;br /&gt;
of software packages. This means that the software package to be installed should be&lt;br /&gt;
unpacked, compiled and linked in a subdirectory of $TMP. The real installation of the&lt;br /&gt;
package (e.g. make install) should be made in(to) the Lustre filesystem. &lt;br /&gt;
&lt;br /&gt;
Each time a batch job is started, a subdirectory is created on each node and assigned to the job. &lt;br /&gt;
$TMP is newly set and the name of the subdirectory contains the Job-id so that the&lt;br /&gt;
subdirectory name is unique for each job. This unique name is then assigned to the&lt;br /&gt;
environment variable $TMP within the job. At the end of the job the subdirectory is removed.&lt;br /&gt;
Although $TMP points to the same path name for different nodes of a job, the physical location &lt;br /&gt;
on these nodes is different.&lt;br /&gt;
&lt;br /&gt;
== LSDF Online Storage==&lt;br /&gt;
&lt;br /&gt;
In some cases it is useful to have access to the LSDF Online Storage on the HPC-Clusters also. Therefore the LSDF Online Storage is mounted on the Login- and Datamover-Nodes.&lt;br /&gt;
Furthermore it can be used on the compute nodes during the job runtime with the constraint flag &amp;quot;LSDF&amp;quot; ([[bwUniCluster_2.0_Slurm_common_Features|Slurm common features]]&lt;br /&gt;
). There is also an example about the LSDF batch usage: [[bwUniCluster_2.0_Slurm_common_Features#LSDF_Online_Storage|Slurm LSDF example ]] .&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
#SBATCH ...&lt;br /&gt;
#SBATCH --constraint=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 the following environment variables are available: $LSDF, $LSDFPROJECTS, $LSDFHOME.&lt;br /&gt;
Please request storage projects in the LSDF Online Storage seperately:&lt;br /&gt;
[https://www.lsdf.kit.edu/os/storagerequest/: LSDF Storage Request].&lt;br /&gt;
&lt;br /&gt;
==BeeOND (BeeGFS On-Demand)==&lt;br /&gt;
&lt;br /&gt;
Users of the UniCluster have possibility to request a private BeeOND (on-demand BeeGFS) parallel filesystem for each job. The file system is created during job startup and purged after your job.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;IMPORTANT: All data on the private filesystem will be deleted after your job. Make sure you have copied your data back to the global filesystem (within job), e.g., $HOME or any workspace.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
BeeOND/BeeGFS can be used like any other parallel file system. Tools like cp or rsync can be used to copy data in and out. &lt;br /&gt;
&lt;br /&gt;
For detailed usage see here:[[BwUniCluster_2.0_Slurm_common_Features#BeeOND_.28BeeGFS_On-Demand.29|Request on-demand file system]]&lt;br /&gt;
&lt;br /&gt;
==Backup and Archiving==&lt;br /&gt;
&lt;br /&gt;
There are regular backups of all data of the home directories,whereas ACLs and extended attributes will&lt;br /&gt;
not be backuped. &lt;br /&gt;
&lt;br /&gt;
Please open a ticket if you need backuped data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:bwUniCluster 2.0|File System]][[Category:Hardware_and_Architecture|bwUniCluster 2.0]]&lt;/div&gt;</summary>
		<author><name>H Weber</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster2.0/Hardware_and_Architecture&amp;diff=11455</id>
		<title>BwUniCluster2.0/Hardware and Architecture</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster2.0/Hardware_and_Architecture&amp;diff=11455"/>
		<updated>2022-11-16T11:25:38Z</updated>

		<summary type="html">&lt;p&gt;H Weber: /* BeeOND (BeeGFS On-Demand) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Architecture of bwUniCluster 2.0 =&lt;br /&gt;
&lt;br /&gt;
The bwUniCluster 2.0 is a parallel computer with distributed memory. Each node of system consists of at least two Intel Xeon processor, local memory, disks, network adapters and optionally accelerators (NVIDIA Tesla V100). All nodes are connected by a fast InfiniBand interconnect. In addition the file system&lt;br /&gt;
Lustre, that is connected by coupling the InfiniBand of the file server with the InfiniBand&lt;br /&gt;
switch of the compute cluster, is added to bwUniCluster 2.0 to provide a fast and scalable&lt;br /&gt;
parallel file system.&lt;br /&gt;
&lt;br /&gt;
The operating system on each node is Red Hat Enterprise Linux (RHEL) 8.4. A number of additional software packages like e.g. SLURM have been installed on top. Some of these components are of special interest to end users and are briefly&lt;br /&gt;
discussed in this document. Others which are of greater importance to system&lt;br /&gt;
administrators will not be covered by this document.&lt;br /&gt;
&lt;br /&gt;
The individual nodes of the system may act in different roles. According to the services supplied by the nodes, they are separated into disjoint groups. From an end users point of view the different groups of nodes are login nodes, compute nodes, file server nodes and administrative server nodes.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Login Nodes&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The login nodes are the only nodes that are directly accessible by end users. These nodes&lt;br /&gt;
are used for interactive login, file management, program development and interactive pre-&lt;br /&gt;
and postprocessing. Two nodes are dedicated to this service but they are all accessible via&lt;br /&gt;
one address and a DNS round-robin alias distributes the login sessions to the&lt;br /&gt;
different login nodes.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Compute Node&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The majority of nodes are compute nodes which are managed by a batch system. Users &lt;br /&gt;
submit their jobs to the SLURM batch system and a job is executed when the required resources become available (depending on its fair-share priority).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;File Server Nodes&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The hardware of the parallel file system Lustre incorporates some file server nodes; the file&lt;br /&gt;
system Lustre is connected by coupling the InfiniBand of the file server with the independent InfiniBand switch of the compute cluster. In addition to shared file space there is also local storage on the disks of each node (for details see chapter &amp;quot;File Systems&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Administrative Server Nodes&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Some other nodes are delivering additional services like resource management, external&lt;br /&gt;
network connection, administration etc. These nodes can be accessed directly by system administrators only.&lt;br /&gt;
&lt;br /&gt;
= Components of bwUniCluster =&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
! style=&amp;quot;width:9%&amp;quot;|&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Compute nodes &amp;quot;Thin&amp;quot;&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Compute nodes &amp;quot;HPC&amp;quot;&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Compute nodes &amp;quot;Fat&amp;quot;&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| GPU x4&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| GPU x8&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Login&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Number of nodes&lt;br /&gt;
| 100 + 60&lt;br /&gt;
| 360&lt;br /&gt;
| 6&lt;br /&gt;
| 14&lt;br /&gt;
| 10&lt;br /&gt;
| 4&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Processors&lt;br /&gt;
| Intel Xeon Gold 6230&lt;br /&gt;
| Intel Xeon Gold 6230&lt;br /&gt;
| Intel Xeon Gold 6230&lt;br /&gt;
| Intel Xeon Gold 6230&lt;br /&gt;
| Intel Xeon Gold 6248&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Number of sockets&lt;br /&gt;
| 2&lt;br /&gt;
| 2&lt;br /&gt;
| 4&lt;br /&gt;
| 2&lt;br /&gt;
| 2&lt;br /&gt;
| 2&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Processor frequency (GHz)&lt;br /&gt;
| 2.1 Ghz&lt;br /&gt;
| 2.1 Ghz&lt;br /&gt;
| 2.1 Ghz&lt;br /&gt;
| 2.1 Ghz&lt;br /&gt;
| 2.5 Ghz&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Total number of cores&lt;br /&gt;
| 40&lt;br /&gt;
| 40&lt;br /&gt;
| 80&lt;br /&gt;
| 40&lt;br /&gt;
| 40&lt;br /&gt;
| 40&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Main memory&lt;br /&gt;
| 96 GB / 192 GB&lt;br /&gt;
| 96 GB&lt;br /&gt;
| 3 TB&lt;br /&gt;
| 384 GB&lt;br /&gt;
| 768 GB&lt;br /&gt;
| 384 GB&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Local SSD&lt;br /&gt;
| 960 GB SATA&lt;br /&gt;
| 960 GB SATA&lt;br /&gt;
| 4,8 TB NVMe&lt;br /&gt;
| 3,2 TB NVMe&lt;br /&gt;
| 6,4 TB NVMe&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Accelerators&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
| 4x NVIDIA Tesla V100&lt;br /&gt;
| 8x NVIDIA Tesla V100&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Interconnect&lt;br /&gt;
| IB HDR100 (blocking)&lt;br /&gt;
| IB HDR100&lt;br /&gt;
| IB HDR&lt;br /&gt;
| IB HDR&lt;br /&gt;
| IB HDR&lt;br /&gt;
| IB HDR100 (blocking)&lt;br /&gt;
|}&lt;br /&gt;
Table 1: Properties of the nodes&lt;br /&gt;
&lt;br /&gt;
= File Systems =&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 2.0 the parallel file system Lustre is used for most globally visible user data. Lustre is open source and Lustre solutions and support are available from different vendors. Nowadays, most of the biggest HPC systems are using Lustre. An initial home directory on a Lustre file system is created automatically after account activation, and the environment variable $HOME holds its name. Users can create so-called workspaces on another Lustre file system for non-permanent data with temporary lifetime. There is another workspace file system based on flash storage for special requirements available.&lt;br /&gt;
&lt;br /&gt;
Within a batch job further file systems are available: &lt;br /&gt;
* The directory $TMP is only available and visible on the local node. It is located on fast SSD storage devices.&lt;br /&gt;
* On request a parallel on-demand (BeeOND) file system is created which uses the SSDs of the nodes which were allocated to the batch job.&lt;br /&gt;
* On request the external LSDF Online Storage is mounted on the nodes which were allocated to the batch job. This file system is based on the parallel file system Spectrum Scale. &lt;br /&gt;
&lt;br /&gt;
Some of the characteristics of the file systems are shown in Table 2.&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;width:100%; vertical-align:top; background:#f5fffa;border:1px solid #000000;padding:1px&amp;quot;&lt;br /&gt;
|- style=&amp;quot;width:20%;height=20px; text-align:left;padding:3px&amp;quot;&lt;br /&gt;
! style=&amp;quot;background-color:#AAA;padding:3px&amp;quot;| Property&lt;br /&gt;
! style=&amp;quot;background-color:#AAA;padding:3px&amp;quot;| $TMP&lt;br /&gt;
! style=&amp;quot;background-color:#AAA;padding:3px&amp;quot;| BeeOND&lt;br /&gt;
! style=&amp;quot;background-color:#AAA;padding:3px&amp;quot;| $HOME&lt;br /&gt;
! style=&amp;quot;background-color:#AAA;padding:3px&amp;quot;| Workspace&lt;br /&gt;
! style=&amp;quot;background-color:#AAA;padding:3px&amp;quot;| Workspace &amp;lt;br&amp;gt; on flash&lt;br /&gt;
|- &lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Visibility &lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| local node&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| nodes of batch job&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| global&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| global&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| global&lt;br /&gt;
|- &lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Lifetime &lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| batch job runtime&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| batch job runtime&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| permanent&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| max. 240 days&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| max. 240 days&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Disk space &lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 960 GB - 6.4 TB &amp;lt;br&amp;gt; details see table 1&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| n*750 GB&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 1.2 PiB&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 4.1 PiB&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 236 TiB&lt;br /&gt;
|- &lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Capacity Quotas&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| no&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| no&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| yes &amp;lt;br&amp;gt; 1 TiB per user &amp;lt;br&amp;gt; also per organization&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| yes &amp;lt;br&amp;gt; 40 TiB per user&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| yes &amp;lt;br&amp;gt; 5 TiB per user&lt;br /&gt;
|- &lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Inode Quotas&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| no&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| no&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| yes &amp;lt;br&amp;gt; 10 million per user&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| yes &amp;lt;br&amp;gt; 30 million per user&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| yes &amp;lt;br&amp;gt; 25 million per user&lt;br /&gt;
|- &lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Backup&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| no&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| no&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| yes&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| no&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| no&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Read perf./node&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 500 MB/s - 6 GB/s &amp;lt;br&amp;gt; depends on type of local SSD / job queue: &amp;lt;br&amp;gt; 520 MB/s @ single / multiple &amp;lt;br&amp;gt; 800 MB/s @ multiple_e &amp;lt;br&amp;gt; 6600 MB/s @ fat &amp;lt;br&amp;gt; 6500 MB/s @ gpu_4 &amp;lt;br&amp;gt; 6500 MB/s @ gpu_8&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 400 MB/s - 500 MB/s&amp;lt;br&amp;gt; depends on type of local SSDs / job queue: &amp;lt;br&amp;gt; 500 MB/s @ multiple &amp;lt;br&amp;gt; 400 MB/s @ multiple_e&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 1 GB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 1 GB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 1 GB/s&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Write perf./node&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 500 MB/s - 4 GB/s &amp;lt;br&amp;gt; depends on type of local SSD / job queue: &amp;lt;br&amp;gt; 500 MB/s @ single / multiple &amp;lt;br&amp;gt; 650 MB/s @ multiple_e &amp;lt;br&amp;gt; 2900 MB/s @ fat &amp;lt;br&amp;gt; 2090 MB/s @ gpu_4 &amp;lt;br&amp;gt; 4060 MB/s @ gpu_8&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 250 MB/s - 350 MB/s &amp;lt;br&amp;gt; depends on type of local SSDs / job queue: &amp;lt;br&amp;gt; 350 MB/s @ multiple &amp;lt;br&amp;gt; 250 MB/s @ multiple_e&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 1 GB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 1 GB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 1 GB/s&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Total read perf.&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| n*500-6000 MB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| n*400-500 MB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 18 GB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 54 GB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 45 GB/s&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Total write perf.&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| n*500-4000 MB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| n*250-350 MB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 18 GB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 54 GB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 38 GB/s&lt;br /&gt;
|}&lt;br /&gt;
---------------------------------------------------------------------------------------------------------&lt;br /&gt;
  global: all nodes of UniCluster access the same file system;&lt;br /&gt;
  local: each node has its own file system;&lt;br /&gt;
  permanent: files are stored permanently;&lt;br /&gt;
  batch job: files are removed at end of the batch job.&lt;br /&gt;
---------------------------------------------------------------------------------------------------------&lt;br /&gt;
Table 2: Properties of the file systems&lt;br /&gt;
&lt;br /&gt;
== Selecting the appropriate file system ==&lt;br /&gt;
&lt;br /&gt;
In general, you should separate your data and store it on the appropriate file system.&lt;br /&gt;
Permanently needed data like software or important results should be stored below $HOME&lt;br /&gt;
but capacity restrictions (quotas) apply. In case you accidentally deleted data on $HOME&lt;br /&gt;
you can usually restore it from backup. Permanent data which is not needed for months&lt;br /&gt;
or exceeds the capacity restrictions should be sent to the LSDF Online Storage &lt;br /&gt;
or to the archive and deleted from the file systems. Temporary data which is only needed on a single&lt;br /&gt;
node and which does not exceed the disk space shown in the table above should be stored&lt;br /&gt;
below $TMP. Data which is read many times on a single node, e.g. if you are doing AI training, &lt;br /&gt;
should be copied to $TMP and read from there. Temporary data which is used from many nodes &lt;br /&gt;
of your batch job and which is only needed during job runtime should be stored on a &lt;br /&gt;
parallel on-demand file system. Temporary data which can be recomputed or which is the &lt;br /&gt;
result of one job and input for another job should be stored in workspaces. The lifetime &lt;br /&gt;
of data in workspaces is limited and depends on the lifetime of the workspace which can be &lt;br /&gt;
several months.&lt;br /&gt;
&lt;br /&gt;
For further details please check the chapters below.&lt;br /&gt;
&lt;br /&gt;
== $HOME ==&lt;br /&gt;
&lt;br /&gt;
The home directories of bwUniCluster 2.0 (uc2) users are located in the parallel file system Lustre.&lt;br /&gt;
You have access to your home directory from all nodes of uc2. A regular backup of these directories &lt;br /&gt;
to tape archive is done automatically. The directory $HOME is used to hold those files that are&lt;br /&gt;
permanently used like source codes, configuration files, executable programs etc. &lt;br /&gt;
&lt;br /&gt;
On uc2 there is a default user quota limit of 1 TiB and 10 million inodes (files and directories) per user. &lt;br /&gt;
You can chek your current usage and limits with the command&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ lfs quota -uh $(whoami) $HOME&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In addition to the user limit there is a limit of your organization (e.g. university) which depends on the financial share. This limit is enforced with so-called Lustre project quotas. You can show the current usage and limits of your organization with the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
lfs quota -ph $(grep $(echo $HOME | sed -e &amp;quot;s|/[^/]*/[^/]*$||&amp;quot;) /pfs/data5/project_ids.txt | cut -f 1 -d\ ) $HOME&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Workspaces ==&lt;br /&gt;
&lt;br /&gt;
On uc2 workspaces can be used to store large non-permanent data sets, e.g. restart files or output&lt;br /&gt;
data that has to be post-processed. The file system used for workspaces is also the parallel file system Lustre. This file system is especially designed for parallel access and for a high throughput to large&lt;br /&gt;
files. It is able to provide high data transfer rates of up to 54 GB/s write and read performance when data access is parallel. &lt;br /&gt;
&lt;br /&gt;
Workspaces have a lifetime and the data on a workspace expires as a whole after a fixed period. The maximum lifetime of a workspace is 60 days, but it can be renewed at the end of that period 3 times to a total maximum of 240 days after workspace generation. If a workspace has inadvertently expired we can restore the data during a limited time (few weeks). In this case you should create a new workspace and report the name of the new and of the expired workspace in a ticket.&lt;br /&gt;
&lt;br /&gt;
Creating, deleting, finding and extending workspaces is explained on the  [[workspace]] page.&lt;br /&gt;
&lt;br /&gt;
On uc2 there is a default user quota limit of 40 TiB and 30 million inodes (files and directories) per user. &lt;br /&gt;
You can chek your current usage and limits with the command&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ lfs quota -uh $(whoami) /pfs/work7&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note that the quotas include data and inodes for all of your workspaces and all of your expired workspaces (as long as they are not yet completely removed).&lt;br /&gt;
&lt;br /&gt;
=== Reminder for workspace deletion ===&lt;br /&gt;
&lt;br /&gt;
Normally you will get an email every day starting 7 days before a workspace expires. You can send yourself a calender entry which reminds you when a workspace will be automatically deleted:&lt;br /&gt;
&lt;br /&gt;
 $ ws_send_ical.sh &amp;lt;workspace&amp;gt; &amp;lt;email&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Improving Performance on $HOME and workspaces ==&lt;br /&gt;
&lt;br /&gt;
The following recommendations might help to improve throughput and metadata&lt;br /&gt;
performance on Lustre filesystems.&lt;br /&gt;
&lt;br /&gt;
=== &#039;&#039;&#039;Improving Throughput Performance&#039;&#039;&#039; ===&lt;br /&gt;
&lt;br /&gt;
Depending on your application some adaptations might be necessary if you want to reach&lt;br /&gt;
the full bandwidth of the filesystems. Parallel filesystems typically stripe files over storage subsystems, i.e. large files are separated into stripes and distributed to different storage subsystems. In Lustre, the size of these stripes (sometimes also mentioned as chunks) is called stripe size and the number of used storage subsystems is called stripe count.&lt;br /&gt;
&lt;br /&gt;
When you are designing your application you should consider that the performance of&lt;br /&gt;
parallel filesystems is generally better if data is transferred in large blocks and stored in&lt;br /&gt;
few large files. In more detail, to increase throughput performance of a parallel application&lt;br /&gt;
following aspects should be considered:&lt;br /&gt;
&lt;br /&gt;
* collect large chunks of data and write them sequentially at once,&lt;br /&gt;
&lt;br /&gt;
* to exploit complete filesystem bandwidth use several clients,&lt;br /&gt;
&lt;br /&gt;
* avoid competitive file access by different tasks or use blocks with boundaries at stripe size (default is 1MB),&lt;br /&gt;
&lt;br /&gt;
* if files are small enough for the SSDs and are only used by one process store them on $TMP.&lt;br /&gt;
&lt;br /&gt;
With previous Lustre versions adapting the Lustre stripe count was the most important optimization. However, for the workspaces of uc2 the new Lustre feature Progressive File Layouts has been used to define file striping parameters. This means that the stripe count is adapted if the file size is growing. In normal cases users no longer need to adapt file striping parameters in case they have very huge files or in order to reach better performance. &lt;br /&gt;
&lt;br /&gt;
If you know what you are doing you can still change striping parameters, e.g. the stripe count, of a directory and of newly created files. New files and directories inherit the stripe count from the parent directory. E.g. if you want to enhance throughput on a single very large file which is created in the directory $HOME/my_output_dir you can use the command&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ lfs setstripe -c-1 $HOME/my_output_dir&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
to change the stripe count to -1 which means that all storage subsystems of the file system are used to store that file. If you change the stripe count of a directory the stripe count of existing files inside this&lt;br /&gt;
directory is not changed. If you want to change the stripe count of existing files, change&lt;br /&gt;
the stripe count of the parent directory, copy the files to new files, remove the old files&lt;br /&gt;
and move the new files back to the old name. In order to check the stripe setting of&lt;br /&gt;
the file my_file use&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ lfs getstripe my_file&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Also note that changes on the striping parameters (e.g. stripe count) are not saved in the&lt;br /&gt;
backup, i.e. if directories have to be recreated this information is lost and the default stripe&lt;br /&gt;
count will be used. Therefore, you should annotate for which directories you made changes&lt;br /&gt;
to the striping parameters so that you can repeat these changes if required.&lt;br /&gt;
&lt;br /&gt;
=== &#039;&#039;&#039;Improving Metadata Performance&#039;&#039;&#039; ===&lt;br /&gt;
&lt;br /&gt;
Metadata performance on parallel file systems is usually not as good as with local&lt;br /&gt;
filesystems. In addition, it is usually not scalable, i.e. a limited resource. Therefore,&lt;br /&gt;
you should omit metadata operations whenever possible. For example, it is much better&lt;br /&gt;
to have few large files than lots of small files. In more detail, to increase metadata&lt;br /&gt;
performance of a parallel application following aspects should be considered:&lt;br /&gt;
&lt;br /&gt;
* avoid creating many small files,&lt;br /&gt;
&lt;br /&gt;
* avoid competitive directory access, e.g. by creating files in separate subdirectories for each task,&lt;br /&gt;
&lt;br /&gt;
* if many small files are only used within a batch job and accessed by one process store them on $TMP,&lt;br /&gt;
&lt;br /&gt;
* change the default colorization setting of the command ls (see below).&lt;br /&gt;
&lt;br /&gt;
On modern Linux systems, the GNU ls command often uses colorization by default to&lt;br /&gt;
visually highlight the file type; this is especially true if the command is run within a terminal&lt;br /&gt;
session. This is because the default shell profile initializations usually contain an alias&lt;br /&gt;
directive similar to the following for the ls command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ alias ls=&amp;quot;ls --color=tty&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
However, running the ls command in this way for files on a Lustre file system requires&lt;br /&gt;
a stat() call to be used to determine the file type. This can result in a performance&lt;br /&gt;
overhead, because the stat() call always needs to determine the size of a file, and that&lt;br /&gt;
in turn means that the client node must query the object size of all the backing objects&lt;br /&gt;
that make up a file. As a result of the default colorization setting, running a simple&lt;br /&gt;
ls command on a Lustre file system often takes as much time as running the ls command&lt;br /&gt;
with the -l option (the same is true if the -F, -p, or the -classify option, or any other option &lt;br /&gt;
that requires information from a stat() call, is used). To avoid this performance overhead&lt;br /&gt;
when using ls commands, add an alias directive similar to the following&lt;br /&gt;
to your shell startup script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ alias ls=&amp;quot;ls --color=never&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Workspaces on flash storage ==&lt;br /&gt;
&lt;br /&gt;
There is another workspace file system for special reqirements available. The file system is called &#039;&#039;full flash pfs&#039;&#039; and is based on the parallel file system Lustre. Access will be granted on special request.&lt;br /&gt;
&lt;br /&gt;
=== Advantages of this file system ===&lt;br /&gt;
&lt;br /&gt;
# All storage devices are based on flash (no hard disks) with low access times. Hence performance is better compared to other parallel file systems for read and write access with small blocks and with small files, i.e. IOPS rates are improved.&lt;br /&gt;
# The file system is mounted on bwUniCluster 2.0 and HoreKa, i.e. it can be used to share data between these clusters.&lt;br /&gt;
&lt;br /&gt;
=== Access restrictions ===&lt;br /&gt;
&lt;br /&gt;
* Only HoreKa users or KIT users of bwUniCluster 2.0 can use this file system.&lt;br /&gt;
* Access is granted on request and for appropriate requirements. In order to request access, please open a ticket with the subject &#039;&#039;full flash pfs access required&#039;&#039; and describe the following topics:&lt;br /&gt;
** number of files you want to store on this file system&lt;br /&gt;
** needed capacity&lt;br /&gt;
** number of nodes used by your typical jobs&lt;br /&gt;
** special I/O requirements of your jobs&lt;br /&gt;
&lt;br /&gt;
=== Using the file system ===&lt;br /&gt;
&lt;br /&gt;
After access is granted, you can use the file system in the same way as a normal workspace. You just have to specify the name of the flash-based workspace file system using the option &#039;&#039;-F&#039;&#039; to all the commands that manage workspaces. On bwUniCluster 2.0 it is called &#039;&#039;ffuc&#039;&#039;, on HoreKa it is &#039;&#039;ffhk&#039;&#039;. For example, to create a workspace with name myws and a lifetime of 60 days on bwUniCluster 2.0 execute:&lt;br /&gt;
 ws_allocate -F ffuc myws 60&lt;br /&gt;
&lt;br /&gt;
If you want to use the full flash pfs on bwUniCluster 2.0 &#039;&#039;&#039;and&#039;&#039;&#039; HoreKa at the same time, please note that you only have to manage a particular workspace on one of the clusters since the name of the workspace directory is different. However, the path to each workspace is visible and can be used on both clusters.&lt;br /&gt;
&lt;br /&gt;
Other features are similar to normal workspaces. For example, we are able to restore expired workspaces for few weeks and you have to open a ticket to request the restore. There are quota limits with a default limit of 5 TB capacity and 25 millions inodes per user. You can check your current usage with&lt;br /&gt;
 lfs quota -uh $(whoami) /pfs/work8&lt;br /&gt;
&lt;br /&gt;
== $TMP ==&lt;br /&gt;
&lt;br /&gt;
While all tasks of a parallel application access the same $HOME and workspace directory, the &lt;br /&gt;
$TMP directory is local to each node on bwUniCluster 2.0. All nodes have fast SSDs &lt;br /&gt;
local storage devices which are used to store data below $TMP. Different tasks of a parallel&lt;br /&gt;
application use different $TMP directories when they do not utilize one node. This directory should&lt;br /&gt;
be used for temporary files being accessed by single tasks. It should also be used if you read the &lt;br /&gt;
same data many times from a single node, e.g. if you are doing AI training. In this case you should &lt;br /&gt;
copy the data at the beginning of your batch job to $TMP and read the data from there.&lt;br /&gt;
In addition, this directory should be used for the installation&lt;br /&gt;
of software packages. This means that the software package to be installed should be&lt;br /&gt;
unpacked, compiled and linked in a subdirectory of $TMP. The real installation of the&lt;br /&gt;
package (e.g. make install) should be made in(to) the Lustre filesystem. &lt;br /&gt;
&lt;br /&gt;
Each time a batch job is started, a subdirectory is created on each node and assigned to the job. &lt;br /&gt;
$TMP is newly set and the name of the subdirectory contains the Job-id so that the&lt;br /&gt;
subdirectory name is unique for each job. This unique name is then assigned to the&lt;br /&gt;
environment variable $TMP within the job. At the end of the job the subdirectory is removed.&lt;br /&gt;
Although $TMP points to the same path name for different nodes of a job, the physical location &lt;br /&gt;
on these nodes is different.&lt;br /&gt;
&lt;br /&gt;
== LSDF Online Storage==&lt;br /&gt;
&lt;br /&gt;
In some cases it is useful to have access to the LSDF Online Storage on the HPC-Clusters also. Therefore the LSDF Online Storage is mounted on the Login- and Datamover-Nodes.&lt;br /&gt;
Furthermore it can be used on the compute nodes during the job runtime with the constraint flag &amp;quot;LSDF&amp;quot; ([[bwUniCluster_2.0_Slurm_common_Features|Slurm common features]]&lt;br /&gt;
). There is also an example about the LSDF batch usage: [[bwUniCluster_2.0_Slurm_common_Features#LSDF_Online_Storage|Slurm LSDF example ]] .&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
#SBATCH ...&lt;br /&gt;
#SBATCH --constraint=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 the following environment variables are available: $LSDF, $LSDFPROJECTS, $LSDFHOME.&lt;br /&gt;
Please request storage projects in the LSDF Online Storage seperately:&lt;br /&gt;
[https://www.lsdf.kit.edu/os/storagerequest/: LSDF Storage Request].&lt;br /&gt;
&lt;br /&gt;
==BeeOND (BeeGFS On-Demand)==&lt;br /&gt;
&lt;br /&gt;
Users of the UniCluster have possibility to request a private BeeOND (on-demand BeeGFS) parallel filesystem for each job. The file system is created during job startup and purged after your job.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;IMPORTANT: All data on the private filesystem will be deleted after your job. Make sure you have copied your data back to the global filesystem (within job), e.g., $HOME or any workspace.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
BeeOND/BeeGFS can be used like any other parallel file system. Tools like cp or rsync can be used to copy data in and out. &lt;br /&gt;
&lt;br /&gt;
For detailed usage see here:[[BwUniCluster_2.0_Slurm_common_Features#BeeOND_.28BeeGFS_On-Demand.29|Request on-demand file system]]&lt;br /&gt;
&lt;br /&gt;
==Backup and Archiving==&lt;br /&gt;
&lt;br /&gt;
There are regular backups of all data of the home directories,whereas ACLs and extended attributes will&lt;br /&gt;
not be backuped. &lt;br /&gt;
&lt;br /&gt;
Please open a ticket if you need backuped data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:bwUniCluster 2.0|File System]][[Category:Hardware_and_Architecture|bwUniCluster 2.0]]&lt;/div&gt;</summary>
		<author><name>H Weber</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster2.0/Hardware_and_Architecture&amp;diff=11454</id>
		<title>BwUniCluster2.0/Hardware and Architecture</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster2.0/Hardware_and_Architecture&amp;diff=11454"/>
		<updated>2022-11-16T11:23:46Z</updated>

		<summary type="html">&lt;p&gt;H Weber: /* File Systems */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Architecture of bwUniCluster 2.0 =&lt;br /&gt;
&lt;br /&gt;
The bwUniCluster 2.0 is a parallel computer with distributed memory. Each node of system consists of at least two Intel Xeon processor, local memory, disks, network adapters and optionally accelerators (NVIDIA Tesla V100). All nodes are connected by a fast InfiniBand interconnect. In addition the file system&lt;br /&gt;
Lustre, that is connected by coupling the InfiniBand of the file server with the InfiniBand&lt;br /&gt;
switch of the compute cluster, is added to bwUniCluster 2.0 to provide a fast and scalable&lt;br /&gt;
parallel file system.&lt;br /&gt;
&lt;br /&gt;
The operating system on each node is Red Hat Enterprise Linux (RHEL) 8.4. A number of additional software packages like e.g. SLURM have been installed on top. Some of these components are of special interest to end users and are briefly&lt;br /&gt;
discussed in this document. Others which are of greater importance to system&lt;br /&gt;
administrators will not be covered by this document.&lt;br /&gt;
&lt;br /&gt;
The individual nodes of the system may act in different roles. According to the services supplied by the nodes, they are separated into disjoint groups. From an end users point of view the different groups of nodes are login nodes, compute nodes, file server nodes and administrative server nodes.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Login Nodes&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The login nodes are the only nodes that are directly accessible by end users. These nodes&lt;br /&gt;
are used for interactive login, file management, program development and interactive pre-&lt;br /&gt;
and postprocessing. Two nodes are dedicated to this service but they are all accessible via&lt;br /&gt;
one address and a DNS round-robin alias distributes the login sessions to the&lt;br /&gt;
different login nodes.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Compute Node&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The majority of nodes are compute nodes which are managed by a batch system. Users &lt;br /&gt;
submit their jobs to the SLURM batch system and a job is executed when the required resources become available (depending on its fair-share priority).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;File Server Nodes&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The hardware of the parallel file system Lustre incorporates some file server nodes; the file&lt;br /&gt;
system Lustre is connected by coupling the InfiniBand of the file server with the independent InfiniBand switch of the compute cluster. In addition to shared file space there is also local storage on the disks of each node (for details see chapter &amp;quot;File Systems&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Administrative Server Nodes&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Some other nodes are delivering additional services like resource management, external&lt;br /&gt;
network connection, administration etc. These nodes can be accessed directly by system administrators only.&lt;br /&gt;
&lt;br /&gt;
= Components of bwUniCluster =&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
! style=&amp;quot;width:9%&amp;quot;|&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Compute nodes &amp;quot;Thin&amp;quot;&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Compute nodes &amp;quot;HPC&amp;quot;&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Compute nodes &amp;quot;Fat&amp;quot;&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| GPU x4&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| GPU x8&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Login&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Number of nodes&lt;br /&gt;
| 100 + 60&lt;br /&gt;
| 360&lt;br /&gt;
| 6&lt;br /&gt;
| 14&lt;br /&gt;
| 10&lt;br /&gt;
| 4&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Processors&lt;br /&gt;
| Intel Xeon Gold 6230&lt;br /&gt;
| Intel Xeon Gold 6230&lt;br /&gt;
| Intel Xeon Gold 6230&lt;br /&gt;
| Intel Xeon Gold 6230&lt;br /&gt;
| Intel Xeon Gold 6248&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Number of sockets&lt;br /&gt;
| 2&lt;br /&gt;
| 2&lt;br /&gt;
| 4&lt;br /&gt;
| 2&lt;br /&gt;
| 2&lt;br /&gt;
| 2&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Processor frequency (GHz)&lt;br /&gt;
| 2.1 Ghz&lt;br /&gt;
| 2.1 Ghz&lt;br /&gt;
| 2.1 Ghz&lt;br /&gt;
| 2.1 Ghz&lt;br /&gt;
| 2.5 Ghz&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Total number of cores&lt;br /&gt;
| 40&lt;br /&gt;
| 40&lt;br /&gt;
| 80&lt;br /&gt;
| 40&lt;br /&gt;
| 40&lt;br /&gt;
| 40&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Main memory&lt;br /&gt;
| 96 GB / 192 GB&lt;br /&gt;
| 96 GB&lt;br /&gt;
| 3 TB&lt;br /&gt;
| 384 GB&lt;br /&gt;
| 768 GB&lt;br /&gt;
| 384 GB&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Local SSD&lt;br /&gt;
| 960 GB SATA&lt;br /&gt;
| 960 GB SATA&lt;br /&gt;
| 4,8 TB NVMe&lt;br /&gt;
| 3,2 TB NVMe&lt;br /&gt;
| 6,4 TB NVMe&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Accelerators&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
| 4x NVIDIA Tesla V100&lt;br /&gt;
| 8x NVIDIA Tesla V100&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Interconnect&lt;br /&gt;
| IB HDR100 (blocking)&lt;br /&gt;
| IB HDR100&lt;br /&gt;
| IB HDR&lt;br /&gt;
| IB HDR&lt;br /&gt;
| IB HDR&lt;br /&gt;
| IB HDR100 (blocking)&lt;br /&gt;
|}&lt;br /&gt;
Table 1: Properties of the nodes&lt;br /&gt;
&lt;br /&gt;
= File Systems =&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 2.0 the parallel file system Lustre is used for most globally visible user data. Lustre is open source and Lustre solutions and support are available from different vendors. Nowadays, most of the biggest HPC systems are using Lustre. An initial home directory on a Lustre file system is created automatically after account activation, and the environment variable $HOME holds its name. Users can create so-called workspaces on another Lustre file system for non-permanent data with temporary lifetime. There is another workspace file system based on flash storage for special requirements available.&lt;br /&gt;
&lt;br /&gt;
Within a batch job further file systems are available: &lt;br /&gt;
* The directory $TMP is only available and visible on the local node. It is located on fast SSD storage devices.&lt;br /&gt;
* On request a parallel on-demand (BeeOND) file system is created which uses the SSDs of the nodes which were allocated to the batch job.&lt;br /&gt;
* On request the external LSDF Online Storage is mounted on the nodes which were allocated to the batch job. This file system is based on the parallel file system Spectrum Scale. &lt;br /&gt;
&lt;br /&gt;
Some of the characteristics of the file systems are shown in Table 2.&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;width:100%; vertical-align:top; background:#f5fffa;border:1px solid #000000;padding:1px&amp;quot;&lt;br /&gt;
|- style=&amp;quot;width:20%;height=20px; text-align:left;padding:3px&amp;quot;&lt;br /&gt;
! style=&amp;quot;background-color:#AAA;padding:3px&amp;quot;| Property&lt;br /&gt;
! style=&amp;quot;background-color:#AAA;padding:3px&amp;quot;| $TMP&lt;br /&gt;
! style=&amp;quot;background-color:#AAA;padding:3px&amp;quot;| BeeOND&lt;br /&gt;
! style=&amp;quot;background-color:#AAA;padding:3px&amp;quot;| $HOME&lt;br /&gt;
! style=&amp;quot;background-color:#AAA;padding:3px&amp;quot;| Workspace&lt;br /&gt;
! style=&amp;quot;background-color:#AAA;padding:3px&amp;quot;| Workspace &amp;lt;br&amp;gt; on flash&lt;br /&gt;
|- &lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Visibility &lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| local node&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| nodes of batch job&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| global&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| global&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| global&lt;br /&gt;
|- &lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Lifetime &lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| batch job runtime&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| batch job runtime&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| permanent&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| max. 240 days&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| max. 240 days&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Disk space &lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 960 GB - 6.4 TB &amp;lt;br&amp;gt; details see table 1&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| n*750 GB&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 1.2 PiB&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 4.1 PiB&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 236 TiB&lt;br /&gt;
|- &lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Capacity Quotas&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| no&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| no&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| yes &amp;lt;br&amp;gt; 1 TiB per user &amp;lt;br&amp;gt; also per organization&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| yes &amp;lt;br&amp;gt; 40 TiB per user&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| yes &amp;lt;br&amp;gt; 5 TiB per user&lt;br /&gt;
|- &lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Inode Quotas&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| no&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| no&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| yes &amp;lt;br&amp;gt; 10 million per user&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| yes &amp;lt;br&amp;gt; 30 million per user&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| yes &amp;lt;br&amp;gt; 25 million per user&lt;br /&gt;
|- &lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Backup&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| no&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| no&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| yes&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| no&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| no&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Read perf./node&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 500 MB/s - 6 GB/s &amp;lt;br&amp;gt; depends on type of local SSD / job queue: &amp;lt;br&amp;gt; 520 MB/s @ single / multiple &amp;lt;br&amp;gt; 800 MB/s @ multiple_e &amp;lt;br&amp;gt; 6600 MB/s @ fat &amp;lt;br&amp;gt; 6500 MB/s @ gpu_4 &amp;lt;br&amp;gt; 6500 MB/s @ gpu_8&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 400 MB/s - 500 MB/s&amp;lt;br&amp;gt; depends on type of local SSDs / job queue: &amp;lt;br&amp;gt; 500 MB/s @ multiple &amp;lt;br&amp;gt; 400 MB/s @ multiple_e&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 1 GB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 1 GB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 1 GB/s&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Write perf./node&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 500 MB/s - 4 GB/s &amp;lt;br&amp;gt; depends on type of local SSD / job queue: &amp;lt;br&amp;gt; 500 MB/s @ single / multiple &amp;lt;br&amp;gt; 650 MB/s @ multiple_e &amp;lt;br&amp;gt; 2900 MB/s @ fat &amp;lt;br&amp;gt; 2090 MB/s @ gpu_4 &amp;lt;br&amp;gt; 4060 MB/s @ gpu_8&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 250 MB/s - 350 MB/s &amp;lt;br&amp;gt; depends on type of local SSDs / job queue: &amp;lt;br&amp;gt; 350 MB/s @ multiple &amp;lt;br&amp;gt; 250 MB/s @ multiple_e&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 1 GB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 1 GB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 1 GB/s&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Total read perf.&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| n*500-6000 MB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| n*400-500 MB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 18 GB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 54 GB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 45 GB/s&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Total write perf.&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| n*500-4000 MB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| n*250-350 MB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 18 GB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 54 GB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 38 GB/s&lt;br /&gt;
|}&lt;br /&gt;
---------------------------------------------------------------------------------------------------------&lt;br /&gt;
  global: all nodes of UniCluster access the same file system;&lt;br /&gt;
  local: each node has its own file system;&lt;br /&gt;
  permanent: files are stored permanently;&lt;br /&gt;
  batch job: files are removed at end of the batch job.&lt;br /&gt;
---------------------------------------------------------------------------------------------------------&lt;br /&gt;
Table 2: Properties of the file systems&lt;br /&gt;
&lt;br /&gt;
== Selecting the appropriate file system ==&lt;br /&gt;
&lt;br /&gt;
In general, you should separate your data and store it on the appropriate file system.&lt;br /&gt;
Permanently needed data like software or important results should be stored below $HOME&lt;br /&gt;
but capacity restrictions (quotas) apply. In case you accidentally deleted data on $HOME&lt;br /&gt;
you can usually restore it from backup. Permanent data which is not needed for months&lt;br /&gt;
or exceeds the capacity restrictions should be sent to the LSDF Online Storage &lt;br /&gt;
or to the archive and deleted from the file systems. Temporary data which is only needed on a single&lt;br /&gt;
node and which does not exceed the disk space shown in the table above should be stored&lt;br /&gt;
below $TMP. Data which is read many times on a single node, e.g. if you are doing AI training, &lt;br /&gt;
should be copied to $TMP and read from there. Temporary data which is used from many nodes &lt;br /&gt;
of your batch job and which is only needed during job runtime should be stored on a &lt;br /&gt;
parallel on-demand file system. Temporary data which can be recomputed or which is the &lt;br /&gt;
result of one job and input for another job should be stored in workspaces. The lifetime &lt;br /&gt;
of data in workspaces is limited and depends on the lifetime of the workspace which can be &lt;br /&gt;
several months.&lt;br /&gt;
&lt;br /&gt;
For further details please check the chapters below.&lt;br /&gt;
&lt;br /&gt;
== $HOME ==&lt;br /&gt;
&lt;br /&gt;
The home directories of bwUniCluster 2.0 (uc2) users are located in the parallel file system Lustre.&lt;br /&gt;
You have access to your home directory from all nodes of uc2. A regular backup of these directories &lt;br /&gt;
to tape archive is done automatically. The directory $HOME is used to hold those files that are&lt;br /&gt;
permanently used like source codes, configuration files, executable programs etc. &lt;br /&gt;
&lt;br /&gt;
On uc2 there is a default user quota limit of 1 TiB and 10 million inodes (files and directories) per user. &lt;br /&gt;
You can chek your current usage and limits with the command&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ lfs quota -uh $(whoami) $HOME&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In addition to the user limit there is a limit of your organization (e.g. university) which depends on the financial share. This limit is enforced with so-called Lustre project quotas. You can show the current usage and limits of your organization with the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
lfs quota -ph $(grep $(echo $HOME | sed -e &amp;quot;s|/[^/]*/[^/]*$||&amp;quot;) /pfs/data5/project_ids.txt | cut -f 1 -d\ ) $HOME&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Workspaces ==&lt;br /&gt;
&lt;br /&gt;
On uc2 workspaces can be used to store large non-permanent data sets, e.g. restart files or output&lt;br /&gt;
data that has to be post-processed. The file system used for workspaces is also the parallel file system Lustre. This file system is especially designed for parallel access and for a high throughput to large&lt;br /&gt;
files. It is able to provide high data transfer rates of up to 54 GB/s write and read performance when data access is parallel. &lt;br /&gt;
&lt;br /&gt;
Workspaces have a lifetime and the data on a workspace expires as a whole after a fixed period. The maximum lifetime of a workspace is 60 days, but it can be renewed at the end of that period 3 times to a total maximum of 240 days after workspace generation. If a workspace has inadvertently expired we can restore the data during a limited time (few weeks). In this case you should create a new workspace and report the name of the new and of the expired workspace in a ticket.&lt;br /&gt;
&lt;br /&gt;
Creating, deleting, finding and extending workspaces is explained on the  [[workspace]] page.&lt;br /&gt;
&lt;br /&gt;
On uc2 there is a default user quota limit of 40 TiB and 30 million inodes (files and directories) per user. &lt;br /&gt;
You can chek your current usage and limits with the command&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ lfs quota -uh $(whoami) /pfs/work7&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note that the quotas include data and inodes for all of your workspaces and all of your expired workspaces (as long as they are not yet completely removed).&lt;br /&gt;
&lt;br /&gt;
=== Reminder for workspace deletion ===&lt;br /&gt;
&lt;br /&gt;
Normally you will get an email every day starting 7 days before a workspace expires. You can send yourself a calender entry which reminds you when a workspace will be automatically deleted:&lt;br /&gt;
&lt;br /&gt;
 $ ws_send_ical.sh &amp;lt;workspace&amp;gt; &amp;lt;email&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Improving Performance on $HOME and workspaces ==&lt;br /&gt;
&lt;br /&gt;
The following recommendations might help to improve throughput and metadata&lt;br /&gt;
performance on Lustre filesystems.&lt;br /&gt;
&lt;br /&gt;
=== &#039;&#039;&#039;Improving Throughput Performance&#039;&#039;&#039; ===&lt;br /&gt;
&lt;br /&gt;
Depending on your application some adaptations might be necessary if you want to reach&lt;br /&gt;
the full bandwidth of the filesystems. Parallel filesystems typically stripe files over storage subsystems, i.e. large files are separated into stripes and distributed to different storage subsystems. In Lustre, the size of these stripes (sometimes also mentioned as chunks) is called stripe size and the number of used storage subsystems is called stripe count.&lt;br /&gt;
&lt;br /&gt;
When you are designing your application you should consider that the performance of&lt;br /&gt;
parallel filesystems is generally better if data is transferred in large blocks and stored in&lt;br /&gt;
few large files. In more detail, to increase throughput performance of a parallel application&lt;br /&gt;
following aspects should be considered:&lt;br /&gt;
&lt;br /&gt;
* collect large chunks of data and write them sequentially at once,&lt;br /&gt;
&lt;br /&gt;
* to exploit complete filesystem bandwidth use several clients,&lt;br /&gt;
&lt;br /&gt;
* avoid competitive file access by different tasks or use blocks with boundaries at stripe size (default is 1MB),&lt;br /&gt;
&lt;br /&gt;
* if files are small enough for the SSDs and are only used by one process store them on $TMP.&lt;br /&gt;
&lt;br /&gt;
With previous Lustre versions adapting the Lustre stripe count was the most important optimization. However, for the workspaces of uc2 the new Lustre feature Progressive File Layouts has been used to define file striping parameters. This means that the stripe count is adapted if the file size is growing. In normal cases users no longer need to adapt file striping parameters in case they have very huge files or in order to reach better performance. &lt;br /&gt;
&lt;br /&gt;
If you know what you are doing you can still change striping parameters, e.g. the stripe count, of a directory and of newly created files. New files and directories inherit the stripe count from the parent directory. E.g. if you want to enhance throughput on a single very large file which is created in the directory $HOME/my_output_dir you can use the command&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ lfs setstripe -c-1 $HOME/my_output_dir&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
to change the stripe count to -1 which means that all storage subsystems of the file system are used to store that file. If you change the stripe count of a directory the stripe count of existing files inside this&lt;br /&gt;
directory is not changed. If you want to change the stripe count of existing files, change&lt;br /&gt;
the stripe count of the parent directory, copy the files to new files, remove the old files&lt;br /&gt;
and move the new files back to the old name. In order to check the stripe setting of&lt;br /&gt;
the file my_file use&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ lfs getstripe my_file&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Also note that changes on the striping parameters (e.g. stripe count) are not saved in the&lt;br /&gt;
backup, i.e. if directories have to be recreated this information is lost and the default stripe&lt;br /&gt;
count will be used. Therefore, you should annotate for which directories you made changes&lt;br /&gt;
to the striping parameters so that you can repeat these changes if required.&lt;br /&gt;
&lt;br /&gt;
=== &#039;&#039;&#039;Improving Metadata Performance&#039;&#039;&#039; ===&lt;br /&gt;
&lt;br /&gt;
Metadata performance on parallel file systems is usually not as good as with local&lt;br /&gt;
filesystems. In addition, it is usually not scalable, i.e. a limited resource. Therefore,&lt;br /&gt;
you should omit metadata operations whenever possible. For example, it is much better&lt;br /&gt;
to have few large files than lots of small files. In more detail, to increase metadata&lt;br /&gt;
performance of a parallel application following aspects should be considered:&lt;br /&gt;
&lt;br /&gt;
* avoid creating many small files,&lt;br /&gt;
&lt;br /&gt;
* avoid competitive directory access, e.g. by creating files in separate subdirectories for each task,&lt;br /&gt;
&lt;br /&gt;
* if many small files are only used within a batch job and accessed by one process store them on $TMP,&lt;br /&gt;
&lt;br /&gt;
* change the default colorization setting of the command ls (see below).&lt;br /&gt;
&lt;br /&gt;
On modern Linux systems, the GNU ls command often uses colorization by default to&lt;br /&gt;
visually highlight the file type; this is especially true if the command is run within a terminal&lt;br /&gt;
session. This is because the default shell profile initializations usually contain an alias&lt;br /&gt;
directive similar to the following for the ls command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ alias ls=&amp;quot;ls --color=tty&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
However, running the ls command in this way for files on a Lustre file system requires&lt;br /&gt;
a stat() call to be used to determine the file type. This can result in a performance&lt;br /&gt;
overhead, because the stat() call always needs to determine the size of a file, and that&lt;br /&gt;
in turn means that the client node must query the object size of all the backing objects&lt;br /&gt;
that make up a file. As a result of the default colorization setting, running a simple&lt;br /&gt;
ls command on a Lustre file system often takes as much time as running the ls command&lt;br /&gt;
with the -l option (the same is true if the -F, -p, or the -classify option, or any other option &lt;br /&gt;
that requires information from a stat() call, is used). To avoid this performance overhead&lt;br /&gt;
when using ls commands, add an alias directive similar to the following&lt;br /&gt;
to your shell startup script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ alias ls=&amp;quot;ls --color=never&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Workspaces on flash storage ==&lt;br /&gt;
&lt;br /&gt;
There is another workspace file system for special reqirements available. The file system is called &#039;&#039;full flash pfs&#039;&#039; and is based on the parallel file system Lustre. Access will be granted on special request.&lt;br /&gt;
&lt;br /&gt;
=== Advantages of this file system ===&lt;br /&gt;
&lt;br /&gt;
# All storage devices are based on flash (no hard disks) with low access times. Hence performance is better compared to other parallel file systems for read and write access with small blocks and with small files, i.e. IOPS rates are improved.&lt;br /&gt;
# The file system is mounted on bwUniCluster 2.0 and HoreKa, i.e. it can be used to share data between these clusters.&lt;br /&gt;
&lt;br /&gt;
=== Access restrictions ===&lt;br /&gt;
&lt;br /&gt;
* Only HoreKa users or KIT users of bwUniCluster 2.0 can use this file system.&lt;br /&gt;
* Access is granted on request and for appropriate requirements. In order to request access, please open a ticket with the subject &#039;&#039;full flash pfs access required&#039;&#039; and describe the following topics:&lt;br /&gt;
** number of files you want to store on this file system&lt;br /&gt;
** needed capacity&lt;br /&gt;
** number of nodes used by your typical jobs&lt;br /&gt;
** special I/O requirements of your jobs&lt;br /&gt;
&lt;br /&gt;
=== Using the file system ===&lt;br /&gt;
&lt;br /&gt;
After access is granted, you can use the file system in the same way as a normal workspace. You just have to specify the name of the flash-based workspace file system using the option &#039;&#039;-F&#039;&#039; to all the commands that manage workspaces. On bwUniCluster 2.0 it is called &#039;&#039;ffuc&#039;&#039;, on HoreKa it is &#039;&#039;ffhk&#039;&#039;. For example, to create a workspace with name myws and a lifetime of 60 days on bwUniCluster 2.0 execute:&lt;br /&gt;
 ws_allocate -F ffuc myws 60&lt;br /&gt;
&lt;br /&gt;
If you want to use the full flash pfs on bwUniCluster 2.0 &#039;&#039;&#039;and&#039;&#039;&#039; HoreKa at the same time, please note that you only have to manage a particular workspace on one of the clusters since the name of the workspace directory is different. However, the path to each workspace is visible and can be used on both clusters.&lt;br /&gt;
&lt;br /&gt;
Other features are similar to normal workspaces. For example, we are able to restore expired workspaces for few weeks and you have to open a ticket to request the restore. There are quota limits with a default limit of 5 TB capacity and 25 millions inodes per user. You can check your current usage with&lt;br /&gt;
 lfs quota -uh $(whoami) /pfs/work8&lt;br /&gt;
&lt;br /&gt;
== $TMP ==&lt;br /&gt;
&lt;br /&gt;
While all tasks of a parallel application access the same $HOME and workspace directory, the &lt;br /&gt;
$TMP directory is local to each node on bwUniCluster 2.0. All nodes have fast SSDs &lt;br /&gt;
local storage devices which are used to store data below $TMP. Different tasks of a parallel&lt;br /&gt;
application use different $TMP directories when they do not utilize one node. This directory should&lt;br /&gt;
be used for temporary files being accessed by single tasks. It should also be used if you read the &lt;br /&gt;
same data many times from a single node, e.g. if you are doing AI training. In this case you should &lt;br /&gt;
copy the data at the beginning of your batch job to $TMP and read the data from there.&lt;br /&gt;
In addition, this directory should be used for the installation&lt;br /&gt;
of software packages. This means that the software package to be installed should be&lt;br /&gt;
unpacked, compiled and linked in a subdirectory of $TMP. The real installation of the&lt;br /&gt;
package (e.g. make install) should be made in(to) the Lustre filesystem. &lt;br /&gt;
&lt;br /&gt;
Each time a batch job is started, a subdirectory is created on each node and assigned to the job. &lt;br /&gt;
$TMP is newly set and the name of the subdirectory contains the Job-id so that the&lt;br /&gt;
subdirectory name is unique for each job. This unique name is then assigned to the&lt;br /&gt;
environment variable $TMP within the job. At the end of the job the subdirectory is removed.&lt;br /&gt;
Although $TMP points to the same path name for different nodes of a job, the physical location &lt;br /&gt;
on these nodes is different.&lt;br /&gt;
&lt;br /&gt;
== LSDF Online Storage==&lt;br /&gt;
&lt;br /&gt;
In some cases it is useful to have access to the LSDF Online Storage on the HPC-Clusters also. Therefore the LSDF Online Storage is mounted on the Login- and Datamover-Nodes.&lt;br /&gt;
Furthermore it can be used on the compute nodes during the job runtime with the constraint flag &amp;quot;LSDF&amp;quot; ([[bwUniCluster_2.0_Slurm_common_Features|Slurm common features]]&lt;br /&gt;
). There is also an example about the LSDF batch usage: [[bwUniCluster_2.0_Slurm_common_Features#LSDF_Online_Storage|Slurm LSDF example ]] .&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
#SBATCH ...&lt;br /&gt;
#SBATCH --constraint=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 the following environment variables are available: $LSDF, $LSDFPROJECTS, $LSDFHOME.&lt;br /&gt;
Please request storage projects in the LSDF Online Storage seperately:&lt;br /&gt;
[https://www.lsdf.kit.edu/os/storagerequest/: LSDF Storage Request].&lt;br /&gt;
&lt;br /&gt;
==BeeOND (BeeGFS On-Demand)==&lt;br /&gt;
&lt;br /&gt;
Users of the HPC-Cluster have possibility to request a private BeeOND (BeeGFS) parallel filesystem for each job. The file system is created during job startup and purged after your job.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;IMPORTANT: All data on the private filesystem will be deleted after your job. Make sure you have copied your data back to the global filesystem (within job), e.g., $HOME or any workspace.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
BeeOND/BeeGFS can be used like any other parallel file system. Tools like cp or rsync can be used to copy data in and out. &lt;br /&gt;
&lt;br /&gt;
For detailed usage see here:[[BwUniCluster_2.0_Slurm_common_Features#BeeOND_.28BeeGFS_On-Demand.29|Request on-demand file system]]&lt;br /&gt;
&lt;br /&gt;
==Backup and Archiving==&lt;br /&gt;
&lt;br /&gt;
There are regular backups of all data of the home directories,whereas ACLs and extended attributes will&lt;br /&gt;
not be backuped. &lt;br /&gt;
&lt;br /&gt;
Please open a ticket if you need backuped data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:bwUniCluster 2.0|File System]][[Category:Hardware_and_Architecture|bwUniCluster 2.0]]&lt;/div&gt;</summary>
		<author><name>H Weber</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster2.0/Slurm&amp;diff=11453</id>
		<title>BwUniCluster2.0/Slurm</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster2.0/Slurm&amp;diff=11453"/>
		<updated>2022-11-15T11:48:25Z</updated>

		<summary type="html">&lt;p&gt;H Weber: /* BeeOND (BeeGFS On-Demand) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&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 [[bwUniCluster 2.0|bwUniCluster 2.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 2.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;
If your job was submitted to the &amp;quot;multiple&amp;quot; queue you can log into the allocated nodes via SSH as soon as the job is running.&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;
* [[BwUniCluster_2.0_Batch_Queues#sbatch_-p_queue|bwUniCluster 2.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_single -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=200gb&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=fat&#039;&#039; (with &#039;&#039;--partition=(dev_)single&#039;&#039; maximum &#039;&#039;--mem=96gb&#039;&#039; is possible):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sbatch --partition=fat 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;Because hyperthreading is switched on on bwUniCluster 2.0, the option --cpus-per-task (-c) must be set to 2*n, if you want to use n threads.&#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 40-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 single --export=ALL,OMP_NUM_THREADS=40 -J OpenMP_Test -N 1 -c 80 -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=80&lt;br /&gt;
#SBATCH --time=40:00&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}/2))&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;single&#039;&#039; as sbatch option:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sbatch -p single 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=single --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 a defined module environment related to OpenMPI is wished&lt;br /&gt;
module load mpi/openmpi/&amp;lt;placeholder_for_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 single -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 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=multiple -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;Because hyperthreading is switched on on bwUniCluster 2.0, the option --cpus-per-task (-c) must be set to 2*n, if you want to use n threads.&#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=56&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}/2))&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 multiple_e ./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 40-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=80&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}/2))&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 multiple ./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 msub_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_4 and gpu_8 queues have 4 or 8 NVIDIA Tesla V100 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 ressources 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 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=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;
Sun Mar 29 15:20:05 2020       &lt;br /&gt;
+-----------------------------------------------------------------------------+&lt;br /&gt;
| NVIDIA-SMI 440.33.01    Driver Version: 440.33.01    CUDA Version: 10.2     |&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;
|===============================+======================+======================|&lt;br /&gt;
|   0  Tesla V100-SXM2...  Off  | 00000000:3A:00.0 Off |                    0 |&lt;br /&gt;
| N/A   29C    P0    39W / 300W |      9MiB / 32510MiB |      0%      Default |&lt;br /&gt;
+-------------------------------+----------------------+----------------------+&lt;br /&gt;
|   1  Tesla V100-SXM2...  Off  | 00000000:3B:00.0 Off |                    0 |&lt;br /&gt;
| N/A   30C    P0    41W / 300W |      8MiB / 32510MiB |      0%      Default |&lt;br /&gt;
+-------------------------------+----------------------+----------------------+&lt;br /&gt;
                                                                               &lt;br /&gt;
+-----------------------------------------------------------------------------+&lt;br /&gt;
| Processes:                                                       GPU Memory |&lt;br /&gt;
|  GPU       PID   Type   Process name                             Usage      |&lt;br /&gt;
|=============================================================================|&lt;br /&gt;
|    0     14228      G   /usr/bin/X                                     8MiB |&lt;br /&gt;
|    1     14228      G   /usr/bin/X                                     8MiB |&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;
However, there may be warnings, e.g. when running&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ module load compiler/gnu/10.3 mpi/openmpi devel/cuad&lt;br /&gt;
$ mpirun mpirun -np 2 ./mpi_cuda_app&lt;br /&gt;
--------------------------------------&lt;br /&gt;
WARNING: There are more than one active ports on host &#039;uc2n520&#039;, but the&lt;br /&gt;
default subnet GID prefix was detected on more than one of these&lt;br /&gt;
ports.  If these ports are connected to different physical IB&lt;br /&gt;
networks, this configuration will fail in Open MPI.  This version of&lt;br /&gt;
Open MPI requires that every physically separate IB subnet that is&lt;br /&gt;
used between connected MPI processes must have different subnet ID&lt;br /&gt;
values.&lt;br /&gt;
&lt;br /&gt;
Please see this FAQ entry for more details:&lt;br /&gt;
&lt;br /&gt;
  http://www.open-mpi.org/faq/?category=openfabrics#ofa-default-subnet-gid&lt;br /&gt;
&lt;br /&gt;
NOTE: You can turn off this warning by setting the MCA parameter&lt;br /&gt;
      btl_openib_warn_default_gid_prefix to 0.&lt;br /&gt;
--------------------------------------------------------------------------&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&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;
(Please note, that CUDA per v11.4 is only available with up to GCC-10)&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 2.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 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;
The capacity of the private file system depends on the number of nodes. For each node you get 750 Gbyte.&lt;br /&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, otherwise the used disk space is exceeded.  &lt;br /&gt;
&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;
&#039;&#039;&#039;Possible optimization:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A possible optimization is that the private file system uses its own metadata server. With the constraint BEEOND the metadata server is started on the first node. Depending on your application, the metadata server could consume a decent amount of CPU power. In this case, adding a extra node to your job could improve the performance of the on-demand file system and the total runtime of your application. In order to use this option, start your application with the MPI option:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mpirun -nolocal myapplication&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
With the -nolocal option the node where mpirun is initiated is not used for your application. This node is fully available for the meta data server of your requested on-demand file system.&lt;br /&gt;
&lt;br /&gt;
Example job script:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
# Very simple example on how to use a private on-demand file system.&lt;br /&gt;
#SBATCH -N 10&lt;br /&gt;
#SBATCH --constraint=BEEOND&lt;br /&gt;
&lt;br /&gt;
# Create a workspace. &lt;br /&gt;
ws_allocate myresults-${SLURM_JOB_ID} 90&lt;br /&gt;
RESULTDIR=$(ws_find myresults-${SLURM_JOB_ID})&lt;br /&gt;
&lt;br /&gt;
# Set ENV variable to on-demand file system.&lt;br /&gt;
ODFSDIR=/mnt/odfs/${SLURM_JOB_ID}/stripe_16/&lt;br /&gt;
&lt;br /&gt;
# Start application and write results to on-demand file system.&lt;br /&gt;
mpirun -nolocal myapplication -o $ODFSDIR/results&lt;br /&gt;
&lt;br /&gt;
# Copy back data after your job application end.&lt;br /&gt;
rsync -av $ODFSDIR/results $RESULTDIR&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&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;
          18088744    single CPV.sbat   ab1234 PD       0:00      1 (Priority)&lt;br /&gt;
          18098414  multiple CPV.sbat   ab1234 PD       0:00      2 (Priority) &lt;br /&gt;
          18090089  multiple CPV.sbat   ab1234  R       2:27      2 uc2n[127-128]&lt;br /&gt;
$ squeue -l&lt;br /&gt;
            JOBID PARTITION     NAME     USER    STATE       TIME TIME_LIMI  NODES NODELIST(REASON) &lt;br /&gt;
         18088654    single CPV.sbat   ab1234 COMPLETI       4:29   2:00:00      1 uc2n374&lt;br /&gt;
         18088785    single CPV.sbat   ab1234  PENDING       0:00   2:00:00      1 (Priority)&lt;br /&gt;
         18098414  multiple CPV.sbat   ab1234  PENDING       0:00   2:00:00      2 (Priority)&lt;br /&gt;
         18088683    single CPV.sbat   ab1234  RUNNING       0:14   2:00:00      1 uc2n413  &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_multiple  :      8 nodes idle&lt;br /&gt;
Partition multiple      :    332 nodes idle&lt;br /&gt;
Partition dev_single    :      4 nodes idle&lt;br /&gt;
Partition single        :     76 nodes idle&lt;br /&gt;
Partition long          :     80 nodes idle&lt;br /&gt;
Partition fat           :      5 nodes idle&lt;br /&gt;
Partition dev_special   :    342 nodes idle&lt;br /&gt;
Partition special       :    342 nodes idle&lt;br /&gt;
Partition dev_multiple_e:      7 nodes idle&lt;br /&gt;
Partition multiple_e    :    335 nodes idle&lt;br /&gt;
Partition gpu_4         :     12 nodes idle&lt;br /&gt;
Partition gpu_8         :      6 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 2.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;
          18089884  multiple CPV.sbat   bq0742  R      33:44      2 uc2n[165-166]&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 18089884&lt;br /&gt;
&lt;br /&gt;
JobId=18089884 JobName=CPV.sbatch&lt;br /&gt;
   UserId=bq0742(8946) GroupId=scc(12345) MCS_label=N/A&lt;br /&gt;
   Priority=3 Nice=0 Account=kit 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:35:06 TimeLimit=02:00:00 TimeMin=N/A&lt;br /&gt;
   SubmitTime=2020-03-16T14:14:54 EligibleTime=2020-03-16T14:14:54&lt;br /&gt;
   AccrueTime=2020-03-16T14:14:54&lt;br /&gt;
   StartTime=2020-03-16T15:12:51 EndTime=2020-03-16T17:12:51 Deadline=N/A&lt;br /&gt;
   SuspendTime=None SecsPreSuspend=0 LastSchedEval=2020-03-16T15:12:51&lt;br /&gt;
   Partition=multiple AllocNode:Sid=uc2n995:5064&lt;br /&gt;
   ReqNodeList=(null) ExcNodeList=(null)&lt;br /&gt;
   NodeList=uc2n[165-166]&lt;br /&gt;
   BatchHost=uc2n165&lt;br /&gt;
   NumNodes=2 NumCPUs=160 NumTasks=80 CPUs/Task=1 ReqB:S:C:T=0:0:*:1&lt;br /&gt;
   TRES=cpu=160,mem=96320M,node=2,billing=160&lt;br /&gt;
   Socks/Node=* NtasksPerN:B:S:C=40:0:*:1 CoreSpec=*&lt;br /&gt;
   MinCPUsNode=40 MinMemoryCPU=1204M MinTmpDiskNode=0&lt;br /&gt;
   Features=(null) DelayBoot=00:00:00&lt;br /&gt;
   OverSubscribe=NO Contiguous=0 Licenses=(null) Network=(null)&lt;br /&gt;
   Command=/pfs/data5/home/kit/scc/bq0742/git/CPV/bin/CPV.sbatch&lt;br /&gt;
   WorkDir=/pfs/data5/home/kit/scc/bq0742/git/CPV/bin&lt;br /&gt;
   StdErr=/pfs/data5/home/kit/scc/bq0742/git/CPV/bin/slurm-18089884.out&lt;br /&gt;
   StdIn=/dev/null&lt;br /&gt;
   StdOut=/pfs/data5/home/kit/scc/bq0742/git/CPV/bin/slurm-18089884.out&lt;br /&gt;
   Power=&lt;br /&gt;
   MailUser=(null) MailType=NONE&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 18089884 | grep -i State&lt;br /&gt;
   JobState=COMPLETED 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;
{| width=750px 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 msub 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 PI 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#lbAI 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;
[[Category:bwUniCluster 2.0|bwUniCluster 2.0]]&lt;br /&gt;
[[#top|Back to top]]&lt;/div&gt;</summary>
		<author><name>H Weber</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster2.0/Hardware_and_Architecture&amp;diff=10313</id>
		<title>BwUniCluster2.0/Hardware and Architecture</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster2.0/Hardware_and_Architecture&amp;diff=10313"/>
		<updated>2022-04-14T07:35:20Z</updated>

		<summary type="html">&lt;p&gt;H Weber: /* File Systems */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Architecture of bwUniCluster 2.0 =&lt;br /&gt;
&lt;br /&gt;
The bwUniCluster 2.0 is a parallel computer with distributed memory. Each node of system consists of at least two Intel Xeon processor, local memory, disks, network adapters and optionally accelerators (NVIDIA Tesla V100). All nodes are connected by a fast InfiniBand interconnect. In addition the file system&lt;br /&gt;
Lustre, that is connected by coupling the InfiniBand of the file server with the InfiniBand&lt;br /&gt;
switch of the compute cluster, is added to bwUniCluster 2.0 to provide a fast and scalable&lt;br /&gt;
parallel file system.&lt;br /&gt;
&lt;br /&gt;
The operating system on each node is Red Hat Enterprise Linux (RHEL) 7.7. A number of additional software packages like e.g. SLURM have been installed on top. Some of these components are of special interest to end users and are briefly&lt;br /&gt;
discussed in this document. Others which are of greater importance to system&lt;br /&gt;
administrators will not be covered by this document.&lt;br /&gt;
&lt;br /&gt;
The individual nodes of the system may act in different roles. According to the services supplied by the nodes, they are separated into disjoint groups. From an end users point of view the different groups of nodes are login nodes, compute nodes, file server nodes and administrative server nodes.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Login Nodes&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The login nodes are the only nodes that are directly accessible by end users. These nodes&lt;br /&gt;
are used for interactive login, file management, program development and interactive pre-&lt;br /&gt;
and postprocessing. Two nodes are dedicated to this service but they are all accessible via&lt;br /&gt;
one address and a DNS round-robin alias distributes the login sessions to the&lt;br /&gt;
different login nodes.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Compute Node&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The majority of nodes are compute nodes which are managed by a batch system. Users &lt;br /&gt;
submit their jobs to the SLURM batch system and a job is executed when the required resources become available (depending on its fair-share priority).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;File Server Nodes&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The hardware of the parallel file system Lustre incorporates some file server nodes; the file&lt;br /&gt;
system Lustre is connected by coupling the InfiniBand of the file server with the independent InfiniBand switch of the compute cluster. In addition to shared file space there is also local storage on the disks of each node (for details see chapter &amp;quot;File Systems&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Administrative Server Nodes&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Some other nodes are delivering additional services like resource management, external&lt;br /&gt;
network connection, administration etc. These nodes can be accessed directly by system administrators only.&lt;br /&gt;
&lt;br /&gt;
= Components of bwUniCluster =&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
! style=&amp;quot;width:9%&amp;quot;|&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Compute nodes &amp;quot;Thin&amp;quot;&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Compute nodes &amp;quot;HPC&amp;quot;&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Compute nodes &amp;quot;HPC Broadwell&amp;quot;&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Compute nodes &amp;quot;Fat&amp;quot;&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| GPU x4&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| GPU x8&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Login&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Number of nodes&lt;br /&gt;
| 100 + 60&lt;br /&gt;
| 360&lt;br /&gt;
| 352&lt;br /&gt;
| 6&lt;br /&gt;
| 14&lt;br /&gt;
| 10&lt;br /&gt;
| 4 + 2 (Broadwell)&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Processors&lt;br /&gt;
| Intel Xeon Gold 6230&lt;br /&gt;
| Intel Xeon Gold 6230&lt;br /&gt;
| Intel Xeon E5-2660 v4&lt;br /&gt;
| Intel Xeon Gold 6230&lt;br /&gt;
| Intel Xeon Gold 6230&lt;br /&gt;
| Intel Xeon Gold 6248&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Number of sockets&lt;br /&gt;
| 2&lt;br /&gt;
| 2&lt;br /&gt;
| 2&lt;br /&gt;
| 4&lt;br /&gt;
| 2&lt;br /&gt;
| 2&lt;br /&gt;
| 2&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Processor frequency (GHz)&lt;br /&gt;
| 2.1 Ghz&lt;br /&gt;
| 2.1 Ghz&lt;br /&gt;
| 2.0 GHz&lt;br /&gt;
| 2.1 Ghz&lt;br /&gt;
| 2.1 Ghz&lt;br /&gt;
| 2.1 Ghz&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Total number of cores&lt;br /&gt;
| 40&lt;br /&gt;
| 40&lt;br /&gt;
| 28&lt;br /&gt;
| 80&lt;br /&gt;
| 40&lt;br /&gt;
| 40&lt;br /&gt;
| 40 / 20 (Broadwell)&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Main memory&lt;br /&gt;
| 96 GB / 192 GB&lt;br /&gt;
| 96 GB&lt;br /&gt;
| 128 GB&lt;br /&gt;
| 3 TB&lt;br /&gt;
| 384 GB&lt;br /&gt;
| 768 GB&lt;br /&gt;
| 384 GB / 128 GB (Broadwell)&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Local SSD&lt;br /&gt;
| 960 GB SATA&lt;br /&gt;
| 960 GB SATA&lt;br /&gt;
| 480 GB SATA&lt;br /&gt;
| 4,8 TB NVMe&lt;br /&gt;
| 3,2 TB NVMe&lt;br /&gt;
| 6,4 TB NVMe&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Accelerators&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
| 4x NVIDIA Tesla V100&lt;br /&gt;
| 8x NVIDIA Tesla V100&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Interconnect&lt;br /&gt;
| IB HDR100 (blocking)&lt;br /&gt;
| IB HDR100&lt;br /&gt;
| IB FDR&lt;br /&gt;
| IB HDR&lt;br /&gt;
| IB HDR&lt;br /&gt;
| IB HDR&lt;br /&gt;
| IB HDR100 (blocking)&lt;br /&gt;
|}&lt;br /&gt;
Table 1: Properties of the nodes&lt;br /&gt;
&lt;br /&gt;
= File Systems =&lt;br /&gt;
&lt;br /&gt;
Details about changes on the file systems between bwUniCluster 1 and bwUniCluster 2.0 are described in the [[BwUniCluster_2.0_File_System_Migration_Guide|File system migration guide]]. Note that $WORK is deprecated.&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 2.0 the parallel file system Lustre is used for most globally visible user data. Lustre is open source and Lustre solutions and support are available from different vendors. Nowadays, most of the biggest HPC systems are using Lustre. An initial home directory on a Lustre file system is created during the first login, and the environment variable $HOME holds its name. Users can create so-called workspaces on another Lustre file system for non-permanent data with temporary lifetime.&lt;br /&gt;
&lt;br /&gt;
Within a batch job further file systems are available: &lt;br /&gt;
* The directory $TMP is only available and visible on the local node. It is located on fast SSD storage devices.&lt;br /&gt;
* On request a parallel on-demand (BeeOND) file system is created which uses the SSDs of the nodes which were allocated to the batch job.&lt;br /&gt;
* On request the external LSDF Online Storage is mounted on the nodes which were allocated to the batch job. This file system is based on the parallel file system Spectrum Scale. &lt;br /&gt;
&lt;br /&gt;
Some of the characteristics of the file systems are shown in Table 2.&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;width:100%; vertical-align:top; background:#f5fffa;border:1px solid #000000;padding:1px&amp;quot;&lt;br /&gt;
|- style=&amp;quot;width:20%;height=20px; text-align:left;padding:3px&amp;quot;&lt;br /&gt;
! style=&amp;quot;background-color:#AAA;padding:3px&amp;quot;| Property&lt;br /&gt;
! style=&amp;quot;background-color:#AAA;padding:3px&amp;quot;| $TMP&lt;br /&gt;
! style=&amp;quot;background-color:#AAA;padding:3px&amp;quot;| BeeOND&lt;br /&gt;
! style=&amp;quot;background-color:#AAA;padding:3px&amp;quot;| $HOME&lt;br /&gt;
! style=&amp;quot;background-color:#AAA;padding:3px&amp;quot;| Workspace&lt;br /&gt;
|- &lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Visibility &lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| local node&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| nodes of batch job&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| global&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| global&lt;br /&gt;
|- &lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Lifetime &lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| batch job runtime&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| batch job runtime&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| permanent&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| max. 240 days&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Disk space &lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 960 GB - 6.4 TB &amp;lt;br&amp;gt; details see table 1&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| n*250 GB&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 1.2 PiB&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 4.1 PiB&lt;br /&gt;
|- &lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Capacity Quotas&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| no&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| no&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| yes &amp;lt;br&amp;gt; 1 TiB per user &amp;lt;br&amp;gt; also per organization&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| yes &amp;lt;br&amp;gt; 40 TiB per user&lt;br /&gt;
|- &lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Inode Quotas&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| no&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| no&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| yes &amp;lt;br&amp;gt; 10 million per user&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| yes &amp;lt;br&amp;gt; 30 million per user&lt;br /&gt;
|- &lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Backup&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| no&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| no&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| yes&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| no&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Read perf./node&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 500 MB/s - 6 GB/s &amp;lt;br&amp;gt; depends on type of local SSD / job queue: &amp;lt;br&amp;gt; 520 MB/s @ single / multiple &amp;lt;br&amp;gt; 800 MB/s @ multiple_e &amp;lt;br&amp;gt; 6600 MB/s @ fat &amp;lt;br&amp;gt; 6500 MB/s @ gpu_4 &amp;lt;br&amp;gt; 6500 MB/s @ gpu_8&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 400 MB/s - 500 MB/s&amp;lt;br&amp;gt; depends on type of local SSDs / job queue: &amp;lt;br&amp;gt; 500 MB/s @ multiple &amp;lt;br&amp;gt; 400 MB/s @ multiple_e&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 1 GB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 1 GB/s&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Write perf./node&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 500 MB/s - 4 GB/s &amp;lt;br&amp;gt; depends on type of local SSD / job queue: &amp;lt;br&amp;gt; 500 MB/s @ single / multiple &amp;lt;br&amp;gt; 650 MB/s @ multiple_e &amp;lt;br&amp;gt; 2900 MB/s @ fat &amp;lt;br&amp;gt; 2090 MB/s @ gpu_4 &amp;lt;br&amp;gt; 4060 MB/s @ gpu_8&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 250 MB/s - 350 MB/s &amp;lt;br&amp;gt; depends on type of local SSDs / job queue: &amp;lt;br&amp;gt; 350 MB/s @ multiple &amp;lt;br&amp;gt; 250 MB/s @ multiple_e&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 1 GB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 1 GB/s&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Total read perf.&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| n*500-6000 MB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| n*400-500 MB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 18 GB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 54 GB/s&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Total write perf.&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| n*500-4000 MB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| n*250-350 MB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 18 GB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 54 GB/s&lt;br /&gt;
|}&lt;br /&gt;
---------------------------------------------------------------------------------------------------------&lt;br /&gt;
  global: all nodes of uc1 access the same file system;&lt;br /&gt;
  local: each node has its own file system;&lt;br /&gt;
  permanent: files are stored permanently;&lt;br /&gt;
  batch job: files are removed at end of the batch job.&lt;br /&gt;
---------------------------------------------------------------------------------------------------------&lt;br /&gt;
Table 2: Properties of the file systems&lt;br /&gt;
&lt;br /&gt;
== Selecting the appropriate file system ==&lt;br /&gt;
&lt;br /&gt;
In general, you should separate your data and store it on the appropriate file system.&lt;br /&gt;
Permanently needed data like software or important results should be stored below $HOME&lt;br /&gt;
but capacity restrictions (quotas) apply. In case you accidentally deleted data on $HOME&lt;br /&gt;
you can usually restore it from backup. Permanent data which is not needed for months&lt;br /&gt;
or exceeds the capacity restrictions should be sent to the LSDF Online Storage &lt;br /&gt;
or to the archive and deleted from the file systems. Temporary data which is only needed on a single&lt;br /&gt;
node and which does not exceed the disk space shown in the table above should be stored&lt;br /&gt;
below $TMP. Data which is read many times on a single node, e.g. if you are doing AI training, &lt;br /&gt;
should be copied to $TMP and read from there. Temporary data which is used from many nodes &lt;br /&gt;
of your batch job and which is only needed during job runtime should be stored on a &lt;br /&gt;
parallel on-demand file system. Temporary data which can be recomputed or which is the &lt;br /&gt;
result of one job and input for another job should be stored in workspaces. The lifetime &lt;br /&gt;
of data in workspaces is limited and depends on the lifetime of the workspace which can be &lt;br /&gt;
several months.&lt;br /&gt;
&lt;br /&gt;
For further details please check the chapters below.&lt;br /&gt;
&lt;br /&gt;
== $HOME ==&lt;br /&gt;
&lt;br /&gt;
The home directories of bwUniCluster 2.0 (uc2) users are located in the parallel file system Lustre.&lt;br /&gt;
You have access to your home directory from all nodes of uc2. A regular backup of these directories &lt;br /&gt;
to tape archive is done automatically. The directory $HOME is used to hold those files that are&lt;br /&gt;
permanently used like source codes, configuration files, executable programs etc. &lt;br /&gt;
&lt;br /&gt;
On uc2 there is a default user quota limit of 1 TiB and 10 million inodes (files and directories) per user. &lt;br /&gt;
You can chek your current usage and limits with the command&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ lfs quota -uh $(whoami) $HOME&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In addition to the user limit there is a limit of your organization (e.g. university) which depends on the financial share. This limit is enforced with so-called Lustre project quotas. You can show the current usage and limits of your organization with the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
lfs quota -ph $(grep $(echo $HOME | sed -e &amp;quot;s|/[^/]*/[^/]*$||&amp;quot;) /pfs/data5/project_ids.txt | cut -f 1 -d\ ) $HOME&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Workspaces ==&lt;br /&gt;
&lt;br /&gt;
On uc2 workspaces can be used to store large non-permanent data sets, e.g. restart files or output&lt;br /&gt;
data that has to be post-processed. The file system used for workspaces is also the parallel file system Lustre. This file system is especially designed for parallel access and for a high throughput to large&lt;br /&gt;
files. It is able to provide high data transfer rates of up to 54 GB/s write and read performance when data access is parallel. &lt;br /&gt;
&lt;br /&gt;
Workspaces have a lifetime and the data on a workspace expires as a whole after a fixed period. The maximum lifetime of a workspace is 60 days, but it can be renewed at the end of that period 3 times to a total maximum of 240 days after workspace generation. If a workspace has inadvertently expired we can restore the data during a limited time (few weeks). In this case you should create a new workspace and report the name of the new and of the expired workspace in a ticket.&lt;br /&gt;
&lt;br /&gt;
Creating, deleting, finding and extending workspaces is explained on the  [[workspace]] page.&lt;br /&gt;
&lt;br /&gt;
On uc2 there is a default user quota limit of 40 TiB and 30 million inodes (files and directories) per user. &lt;br /&gt;
You can chek your current usage and limits with the command&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ lfs quota -uh $(whoami) /pfs/work7&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Reminder for workspace deletion ===&lt;br /&gt;
&lt;br /&gt;
Normally you will get an email every day starting 7 days before a workspace expires. You can send yourself a calender entry which reminds you when a workspace will be automatically deleted:&lt;br /&gt;
&lt;br /&gt;
 $ ws_send_ical.sh &amp;lt;workspace&amp;gt; &amp;lt;email&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Improving Performance on $HOME and workspaces ==&lt;br /&gt;
&lt;br /&gt;
The following recommendations might help to improve throughput and metadata&lt;br /&gt;
performance on Lustre filesystems.&lt;br /&gt;
&lt;br /&gt;
=== &#039;&#039;&#039;Improving Throughput Performance&#039;&#039;&#039; ===&lt;br /&gt;
&lt;br /&gt;
Depending on your application some adaptations might be necessary if you want to reach&lt;br /&gt;
the full bandwidth of the filesystems. Parallel filesystems typically stripe files over storage subsystems, i.e. large files are separated into stripes and distributed to different storage subsystems. In Lustre, the size of these stripes (sometimes also mentioned as chunks) is called stripe size and the number of used storage subsystems is called stripe count.&lt;br /&gt;
&lt;br /&gt;
When you are designing your application you should consider that the performance of&lt;br /&gt;
parallel filesystems is generally better if data is transferred in large blocks and stored in&lt;br /&gt;
few large files. In more detail, to increase throughput performance of a parallel application&lt;br /&gt;
following aspects should be considered:&lt;br /&gt;
&lt;br /&gt;
* collect large chunks of data and write them sequentially at once,&lt;br /&gt;
&lt;br /&gt;
* to exploit complete filesystem bandwidth use several clients,&lt;br /&gt;
&lt;br /&gt;
* avoid competitive file access by different tasks or use blocks with boundaries at stripe size (default is 1MB),&lt;br /&gt;
&lt;br /&gt;
* if files are small enough for the SSDs and are only used by one process store them on $TMP.&lt;br /&gt;
&lt;br /&gt;
With previous Lustre versions adapting the Lustre stripe count was the most important optimization. However, for the workspaces of uc2 the new Lustre feature Progressive File Layouts has been used to define file striping parameters. This means that the stripe count is adapted if the file size is growing. In normal cases users no longer need to adapt file striping parameters in case they have very huge files or in order to reach better performance. &lt;br /&gt;
&lt;br /&gt;
If you know what you are doing you can still change striping parameters, e.g. the stripe count, of a directory and of newly created files. New files and directories inherit the stripe count from the parent directory. E.g. if you want to enhance throughput on a single very large file which is created in the directory $HOME/my_output_dir you can use the command&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ lfs setstripe -c-1 $HOME/my_output_dir&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
to change the stripe count to -1 which means that all storage subsystems of the file system are used to store that file. If you change the stripe count of a directory the stripe count of existing files inside this&lt;br /&gt;
directory is not changed. If you want to change the stripe count of existing files, change&lt;br /&gt;
the stripe count of the parent directory, copy the files to new files, remove the old files&lt;br /&gt;
and move the new files back to the old name. In order to check the stripe setting of&lt;br /&gt;
the file my_file use&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ lfs getstripe my_file&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Also note that changes on the striping parameters (e.g. stripe count) are not saved in the&lt;br /&gt;
backup, i.e. if directories have to be recreated this information is lost and the default stripe&lt;br /&gt;
count will be used. Therefore, you should annotate for which directories you made changes&lt;br /&gt;
to the striping parameters so that you can repeat these changes if required.&lt;br /&gt;
&lt;br /&gt;
=== &#039;&#039;&#039;Improving Metadata Performance&#039;&#039;&#039; ===&lt;br /&gt;
&lt;br /&gt;
Metadata performance on parallel file systems is usually not as good as with local&lt;br /&gt;
filesystems. In addition, it is usually not scalable, i.e. a limited resource. Therefore,&lt;br /&gt;
you should omit metadata operations whenever possible. For example, it is much better&lt;br /&gt;
to have few large files than lots of small files. In more detail, to increase metadata&lt;br /&gt;
performance of a parallel application following aspects should be considered:&lt;br /&gt;
&lt;br /&gt;
* avoid creating many small files,&lt;br /&gt;
&lt;br /&gt;
* avoid competitive directory access, e.g. by creating files in separate subdirectories for each task,&lt;br /&gt;
&lt;br /&gt;
* if many small files are only used within a batch job and accessed by one process store them on $TMP,&lt;br /&gt;
&lt;br /&gt;
* change the default colorization setting of the command ls (see below).&lt;br /&gt;
&lt;br /&gt;
On modern Linux systems, the GNU ls command often uses colorization by default to&lt;br /&gt;
visually highlight the file type; this is especially true if the command is run within a terminal&lt;br /&gt;
session. This is because the default shell profile initializations usually contain an alias&lt;br /&gt;
directive similar to the following for the ls command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ alias ls=&amp;quot;ls --color=tty&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
However, running the ls command in this way for files on a Lustre file system requires&lt;br /&gt;
a stat() call to be used to determine the file type. This can result in a performance&lt;br /&gt;
overhead, because the stat() call always needs to determine the size of a file, and that&lt;br /&gt;
in turn means that the client node must query the object size of all the backing objects&lt;br /&gt;
that make up a file. As a result of the default colorization setting, running a simple&lt;br /&gt;
ls command on a Lustre file system often takes as much time as running the ls command&lt;br /&gt;
with the -l option (the same is true if the -F, -p, or the -classify option, or any other option &lt;br /&gt;
that requires information from a stat() call, is used). To avoid this performance overhead&lt;br /&gt;
when using ls commands, add an alias directive similar to the following&lt;br /&gt;
to your shell startup script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ alias ls=&amp;quot;ls --color=never&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== $TMP ==&lt;br /&gt;
&lt;br /&gt;
While all tasks of a parallel application access the same $HOME and workspace directory, the &lt;br /&gt;
$TMP directory is local to each node on bwUniCluster 2.0. All nodes have fast SSDs &lt;br /&gt;
local storage devices which are used to store data below $TMP. Different tasks of a parallel&lt;br /&gt;
application use different $TMP directories when they do not utilize one node. This directory should&lt;br /&gt;
be used for temporary files being accessed by single tasks. It should also be used if you read the &lt;br /&gt;
same data many times from a single node, e.g. if you are doing AI training. In this case you should &lt;br /&gt;
copy the data at the beginning of your batch job to $TMP and read the data from there.&lt;br /&gt;
In addition, this directory should be used for the installation&lt;br /&gt;
of software packages. This means that the software package to be installed should be&lt;br /&gt;
unpacked, compiled and linked in a subdirectory of $TMP. The real installation of the&lt;br /&gt;
package (e.g. make install) should be made in(to) the Lustre filesystem. &lt;br /&gt;
&lt;br /&gt;
Each time a batch job is started, a subdirectory is created on each node and assigned to the job. &lt;br /&gt;
$TMP is newly set and the name of the subdirectory contains the Job-id so that the&lt;br /&gt;
subdirectory name is unique for each job. This unique name is then assigned to the&lt;br /&gt;
environment variable $TMP within the job. At the end of the job the subdirectory is removed.&lt;br /&gt;
Although $TMP points to the same path name for different nodes of a job, the physical location &lt;br /&gt;
on these nodes is different.&lt;br /&gt;
&lt;br /&gt;
== LSDF Online Storage==&lt;br /&gt;
&lt;br /&gt;
In some cases it is useful to have access to the LSDF Online Storage on the HPC-Clusters also. Therefore the LSDF Online Storage is mounted on the Login- and Datamover-Nodes.&lt;br /&gt;
Furthermore it can be used on the compute nodes during the job runtime with the constraint flag &amp;quot;LSDF&amp;quot; ([[bwUniCluster_2.0_Slurm_common_Features|Slurm common features]]&lt;br /&gt;
). There is also an example about the LSDF batch usage: [[bwUniCluster_2.0_Slurm_common_Features#LSDF_Online_Storage|Slurm LSDF example ]] .&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
#SBATCH ...&lt;br /&gt;
#SBATCH --constraint=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 the following environment variables are available: $LSDF, $LSDFPROJECTS, $LSDFHOME.&lt;br /&gt;
Please request storage projects in the LSDF Online Storage seperately:&lt;br /&gt;
[https://www.lsdf.kit.edu/os/storagerequest/: LSDF Storage Request].&lt;br /&gt;
&lt;br /&gt;
==BeeOND (BeeGFS On-Demand)==&lt;br /&gt;
&lt;br /&gt;
Users of the HPC-Cluster have possibility to request a private BeeOND (BeeGFS) parallel filesystem for each job. The file system is created during job startup and purged after your job.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;IMPORTANT: All data on the private filesystem will be deleted after your job. Make sure you have copied your data back to the global filesystem (within job), e.g., $HOME or any workspace.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
BeeOND/BeeGFS can be used like any other parallel file system. Tools like cp or rsync can be used to copy data in and out. &lt;br /&gt;
&lt;br /&gt;
For detailed usage see here:[[BwUniCluster_2.0_Slurm_common_Features#BeeOND_.28BeeGFS_On-Demand.29|Request on-demand file system]]&lt;br /&gt;
&lt;br /&gt;
==Backup and Archiving==&lt;br /&gt;
&lt;br /&gt;
There are regular backups of all data of the home directories,whereas ACLs and extended attributes will&lt;br /&gt;
not be backuped. &lt;br /&gt;
&lt;br /&gt;
Please open a ticket if you need backuped data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:bwUniCluster 2.0|File System]][[Category:Hardware_and_Architecture|bwUniCluster 2.0]]&lt;/div&gt;</summary>
		<author><name>H Weber</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster2.0/Slurm&amp;diff=10312</id>
		<title>BwUniCluster2.0/Slurm</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster2.0/Slurm&amp;diff=10312"/>
		<updated>2022-04-14T07:34:21Z</updated>

		<summary type="html">&lt;p&gt;H Weber: /* BeeOND (BeeGFS On-Demand) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&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 [[bwUniCluster 2.0|bwUniCluster 2.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 2.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;
If your job was submitted to the &amp;quot;multiple&amp;quot; queue you can log into the allocated nodes via SSH as soon as the job is running.&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;
* [[BwUniCluster_2.0_Batch_Queues#sbatch_-p_queue|bwUniCluster 2.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_single -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=200gb&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=fat&#039;&#039; (with &#039;&#039;--partition=(dev_)single&#039;&#039; maximum &#039;&#039;--mem=96gb&#039;&#039; is possible):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sbatch --partition=fat 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;Because hyperthreading is switched on on bwUniCluster 2.0, the option --cpus-per-task (-c) must be set to 2*n, if you want to use n threads.&#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 40-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 single --export=ALL,OMP_NUM_THREADS=40 -J OpenMP_Test -N 1 -c 80 -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=80&lt;br /&gt;
#SBATCH --time=40:00&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}/2))&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;single&#039;&#039; as sbatch option:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sbatch -p single 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=single --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 a defined module environment related to OpenMPI is wished&lt;br /&gt;
module load mpi/openmpi/&amp;lt;placeholder_for_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 single -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 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=multiple -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;Because hyperthreading is switched on on bwUniCluster 2.0, the option --cpus-per-task (-c) must be set to 2*n, if you want to use n threads.&#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=56&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}/2))&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 multiple_e ./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 40-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=80&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}/2))&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 multiple ./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 msub_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_4 and gpu_8 queues have 4 or 8 NVIDIA Tesla V100 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 ressources 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 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=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;
Sun Mar 29 15:20:05 2020       &lt;br /&gt;
+-----------------------------------------------------------------------------+&lt;br /&gt;
| NVIDIA-SMI 440.33.01    Driver Version: 440.33.01    CUDA Version: 10.2     |&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;
|===============================+======================+======================|&lt;br /&gt;
|   0  Tesla V100-SXM2...  Off  | 00000000:3A:00.0 Off |                    0 |&lt;br /&gt;
| N/A   29C    P0    39W / 300W |      9MiB / 32510MiB |      0%      Default |&lt;br /&gt;
+-------------------------------+----------------------+----------------------+&lt;br /&gt;
|   1  Tesla V100-SXM2...  Off  | 00000000:3B:00.0 Off |                    0 |&lt;br /&gt;
| N/A   30C    P0    41W / 300W |      8MiB / 32510MiB |      0%      Default |&lt;br /&gt;
+-------------------------------+----------------------+----------------------+&lt;br /&gt;
                                                                               &lt;br /&gt;
+-----------------------------------------------------------------------------+&lt;br /&gt;
| Processes:                                                       GPU Memory |&lt;br /&gt;
|  GPU       PID   Type   Process name                             Usage      |&lt;br /&gt;
|=============================================================================|&lt;br /&gt;
|    0     14228      G   /usr/bin/X                                     8MiB |&lt;br /&gt;
|    1     14228      G   /usr/bin/X                                     8MiB |&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;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== LSDF Online Storage ====&lt;br /&gt;
On bwUniCluster 2.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 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;pre&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;/pre&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;pre&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 or /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, /mnt/odfs/$SLURM_JOB_ID/stripe_16 or /mnt/odfs/$SLURM_JOB_ID/stripe_32&lt;br /&gt;
&amp;lt;/pre&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;
The capacity of the private file system depends on the number of nodes. For each node you get 250 Gbyte.&lt;br /&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, otherwise the used disk space is exceeded.  &lt;br /&gt;
&lt;br /&gt;
If you request 100 nodes for your job, the private file system is 100 * 250 Gbyte ~ 25 Tbyte (approx) capacity.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Possible optimization:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A possible optimization is that the private file system uses its own metadata server. With the constraint BEEOND the metadata server is started on the first node. Depending on your application, the metadata server could consume a decent amount of CPU power. In this case, adding a extra node to your job could improve the performance of the on-demand file system and the total runtime of your application. In order to use this option, start your application with the MPI option:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mpirun -nolocal myapplication&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
With the -nolocal option the node where mpirun is initiated is not used for your application. This node is fully available for the meta data server of your requested on-demand file system.&lt;br /&gt;
&lt;br /&gt;
Example job script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
#very simple example on how to use a private on-demand file system&lt;br /&gt;
#SBATCH -N 10&lt;br /&gt;
#SBATCH --constraint=BEEOND&lt;br /&gt;
&lt;br /&gt;
#create a workspace &lt;br /&gt;
ws_allocate myresults-$SLURM_JOB_ID 90&lt;br /&gt;
RESULTDIR=`ws_find myresults-$SLURM_JOB_ID`&lt;br /&gt;
&lt;br /&gt;
#Set ENV variable to on-demand file system&lt;br /&gt;
ODFSDIR=/mnt/odfs/$SLURM_JOB_ID/stripe_16/&lt;br /&gt;
&lt;br /&gt;
#start application and write results to on-demand file system&lt;br /&gt;
mpirun -nolocal myapplication -o $ODFSDIR/results&lt;br /&gt;
&lt;br /&gt;
#Copy back data after your job application end&lt;br /&gt;
rsync -av $ODFSDIR/results $RESULTDIR&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&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;
          18088744    single CPV.sbat   ab1234 PD       0:00      1 (Priority)&lt;br /&gt;
          18098414  multiple CPV.sbat   ab1234 PD       0:00      2 (Priority) &lt;br /&gt;
          18090089  multiple CPV.sbat   ab1234  R       2:27      2 uc2n[127-128]&lt;br /&gt;
$ squeue -l&lt;br /&gt;
            JOBID PARTITION     NAME     USER    STATE       TIME TIME_LIMI  NODES NODELIST(REASON) &lt;br /&gt;
         18088654    single CPV.sbat   ab1234 COMPLETI       4:29   2:00:00      1 uc2n374&lt;br /&gt;
         18088785    single CPV.sbat   ab1234  PENDING       0:00   2:00:00      1 (Priority)&lt;br /&gt;
         18098414  multiple CPV.sbat   ab1234  PENDING       0:00   2:00:00      2 (Priority)&lt;br /&gt;
         18088683    single CPV.sbat   ab1234  RUNNING       0:14   2:00:00      1 uc2n413  &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_multiple  :      8 nodes idle&lt;br /&gt;
Partition multiple      :    332 nodes idle&lt;br /&gt;
Partition dev_single    :      4 nodes idle&lt;br /&gt;
Partition single        :     76 nodes idle&lt;br /&gt;
Partition long          :     80 nodes idle&lt;br /&gt;
Partition fat           :      5 nodes idle&lt;br /&gt;
Partition dev_special   :    342 nodes idle&lt;br /&gt;
Partition special       :    342 nodes idle&lt;br /&gt;
Partition dev_multiple_e:      7 nodes idle&lt;br /&gt;
Partition multiple_e    :    335 nodes idle&lt;br /&gt;
Partition gpu_4         :     12 nodes idle&lt;br /&gt;
Partition gpu_8         :      6 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 2.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;
          18089884  multiple CPV.sbat   bq0742  R      33:44      2 uc2n[165-166]&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 18089884&lt;br /&gt;
&lt;br /&gt;
JobId=18089884 JobName=CPV.sbatch&lt;br /&gt;
   UserId=bq0742(8946) GroupId=scc(12345) MCS_label=N/A&lt;br /&gt;
   Priority=3 Nice=0 Account=kit 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:35:06 TimeLimit=02:00:00 TimeMin=N/A&lt;br /&gt;
   SubmitTime=2020-03-16T14:14:54 EligibleTime=2020-03-16T14:14:54&lt;br /&gt;
   AccrueTime=2020-03-16T14:14:54&lt;br /&gt;
   StartTime=2020-03-16T15:12:51 EndTime=2020-03-16T17:12:51 Deadline=N/A&lt;br /&gt;
   SuspendTime=None SecsPreSuspend=0 LastSchedEval=2020-03-16T15:12:51&lt;br /&gt;
   Partition=multiple AllocNode:Sid=uc2n995:5064&lt;br /&gt;
   ReqNodeList=(null) ExcNodeList=(null)&lt;br /&gt;
   NodeList=uc2n[165-166]&lt;br /&gt;
   BatchHost=uc2n165&lt;br /&gt;
   NumNodes=2 NumCPUs=160 NumTasks=80 CPUs/Task=1 ReqB:S:C:T=0:0:*:1&lt;br /&gt;
   TRES=cpu=160,mem=96320M,node=2,billing=160&lt;br /&gt;
   Socks/Node=* NtasksPerN:B:S:C=40:0:*:1 CoreSpec=*&lt;br /&gt;
   MinCPUsNode=40 MinMemoryCPU=1204M MinTmpDiskNode=0&lt;br /&gt;
   Features=(null) DelayBoot=00:00:00&lt;br /&gt;
   OverSubscribe=NO Contiguous=0 Licenses=(null) Network=(null)&lt;br /&gt;
   Command=/pfs/data5/home/kit/scc/bq0742/git/CPV/bin/CPV.sbatch&lt;br /&gt;
   WorkDir=/pfs/data5/home/kit/scc/bq0742/git/CPV/bin&lt;br /&gt;
   StdErr=/pfs/data5/home/kit/scc/bq0742/git/CPV/bin/slurm-18089884.out&lt;br /&gt;
   StdIn=/dev/null&lt;br /&gt;
   StdOut=/pfs/data5/home/kit/scc/bq0742/git/CPV/bin/slurm-18089884.out&lt;br /&gt;
   Power=&lt;br /&gt;
   MailUser=(null) MailType=NONE&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 18089884 | grep -i State&lt;br /&gt;
   JobState=COMPLETED 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;
{| width=750px 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 msub 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 PI 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#lbAI 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;
[[Category:bwUniCluster 2.0|bwUniCluster 2.0]]&lt;br /&gt;
[[#top|Back to top]]&lt;/div&gt;</summary>
		<author><name>H Weber</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster2.0/Slurm&amp;diff=10255</id>
		<title>BwUniCluster2.0/Slurm</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster2.0/Slurm&amp;diff=10255"/>
		<updated>2022-03-29T09:44:03Z</updated>

		<summary type="html">&lt;p&gt;H Weber: /* BeeOND (BeeGFS On-Demand) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&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 [[bwUniCluster 2.0|bwUniCluster 2.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 2.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;
If your job was submitted to the &amp;quot;multiple&amp;quot; queue you can log into the allocated nodes via SSH as soon as the job is running.&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;
* [[BwUniCluster_2.0_Batch_Queues#sbatch_-p_queue|bwUniCluster 2.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_single -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=200gb&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=fat&#039;&#039; (with &#039;&#039;--partition=(dev_)single&#039;&#039; maximum &#039;&#039;--mem=96gb&#039;&#039; is possible):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sbatch --partition=fat 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;Because hyperthreading is switched on on bwUniCluster 2.0, the option --cpus-per-task (-c) must be set to 2*n, if you want to use n threads.&#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 40-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 single --export=ALL,OMP_NUM_THREADS=40 -J OpenMP_Test -N 1 -c 80 -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=80&lt;br /&gt;
#SBATCH --time=40:00&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}/2))&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;single&#039;&#039; as sbatch option:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sbatch -p single 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=single --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 a defined module environment related to OpenMPI is wished&lt;br /&gt;
module load mpi/openmpi/&amp;lt;placeholder_for_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 single -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 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=multiple -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;Because hyperthreading is switched on on bwUniCluster 2.0, the option --cpus-per-task (-c) must be set to 2*n, if you want to use n threads.&#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=56&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}/2))&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 multiple_e ./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 40-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=80&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}/2))&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 multiple ./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 msub_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_4 and gpu_8 queues have 4 or 8 NVIDIA Tesla V100 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 ressources 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 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=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;
Sun Mar 29 15:20:05 2020       &lt;br /&gt;
+-----------------------------------------------------------------------------+&lt;br /&gt;
| NVIDIA-SMI 440.33.01    Driver Version: 440.33.01    CUDA Version: 10.2     |&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;
|===============================+======================+======================|&lt;br /&gt;
|   0  Tesla V100-SXM2...  Off  | 00000000:3A:00.0 Off |                    0 |&lt;br /&gt;
| N/A   29C    P0    39W / 300W |      9MiB / 32510MiB |      0%      Default |&lt;br /&gt;
+-------------------------------+----------------------+----------------------+&lt;br /&gt;
|   1  Tesla V100-SXM2...  Off  | 00000000:3B:00.0 Off |                    0 |&lt;br /&gt;
| N/A   30C    P0    41W / 300W |      8MiB / 32510MiB |      0%      Default |&lt;br /&gt;
+-------------------------------+----------------------+----------------------+&lt;br /&gt;
                                                                               &lt;br /&gt;
+-----------------------------------------------------------------------------+&lt;br /&gt;
| Processes:                                                       GPU Memory |&lt;br /&gt;
|  GPU       PID   Type   Process name                             Usage      |&lt;br /&gt;
|=============================================================================|&lt;br /&gt;
|    0     14228      G   /usr/bin/X                                     8MiB |&lt;br /&gt;
|    1     14228      G   /usr/bin/X                                     8MiB |&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;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== LSDF Online Storage ====&lt;br /&gt;
On bwUniCluster 2.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 compute nodes during the job runtime with the constraint flag &amp;quot;BEEOND&amp;quot;, &amp;quot;BEEOND_4MDS&amp;quot; and &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. If you have less than 4 nodes, then less metadata servers are started.&lt;br /&gt;
* BEEOND_MAXMDS: on every node 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, that this is sufficient for you, feel free to contact the support team.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
#SBATCH ...&lt;br /&gt;
#SBATCH --constraint=BEEOND (BEEOND_4MDS, BEEOND_MAXMDS)&lt;br /&gt;
&amp;lt;/pre&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 three pre-configured directories:&lt;br /&gt;
&amp;lt;pre&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 or /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, /mnt/odfs/$SLURM_JOB_ID/stripe_16 or /mnt/odfs/$SLURM_JOB_ID/stripe_32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you request less nodes than stripe count, the stripe count will be max number of nodes, e.g., You only request 8 nodes , so the directory with stripe count 16 is basically only with a stripe count 8.&lt;br /&gt;
&lt;br /&gt;
The capacity of the private file system depends on the number of nodes. For each node you get 500 Gbyte.&lt;br /&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 1.  &lt;br /&gt;
&lt;br /&gt;
If you request 100 nodes for your job, the private file system is 100 * 500 Gbyte ~ 50 Tbyte (approx) capacity.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Recommendation:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The private file system is using its own metadata server. This metadata server is started on the first nodes. Depending on your application, the metadata server is consuming decent amount of CPU power. Probably adding a extra node to your job could improve the usability of the on-demand file system. Start your application with the MPI option:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mpirun -nolocal myapplication&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
With the -nolocal option the node where mpirun is initiated is not used for your application. This node is fully available for the meta data server of your requested on-demand file system.&lt;br /&gt;
&lt;br /&gt;
Example job script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
#very simple example on how to use a private on-demand file system&lt;br /&gt;
#SBATCH -N 10&lt;br /&gt;
#SBATCH --constraint=BEEOND&lt;br /&gt;
&lt;br /&gt;
#create a workspace &lt;br /&gt;
ws_allocate myresults-$SLURM_JOB_ID 90&lt;br /&gt;
RESULTDIR=`ws_find myresults-$SLURM_JOB_ID`&lt;br /&gt;
&lt;br /&gt;
#Set ENV variable to on-demand file system&lt;br /&gt;
ODFSDIR=/mnt/odfs/$SLURM_JOB_ID/stripe_16/&lt;br /&gt;
&lt;br /&gt;
#start application and write results to on-demand file system&lt;br /&gt;
mpirun -nolocal myapplication -o $ODFSDIR/results&lt;br /&gt;
&lt;br /&gt;
#Copy back data after your job application end&lt;br /&gt;
rsync -av $ODFSDIR/results $RESULTDIR&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&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;
          18088744    single CPV.sbat   ab1234 PD       0:00      1 (Priority)&lt;br /&gt;
          18098414  multiple CPV.sbat   ab1234 PD       0:00      2 (Priority) &lt;br /&gt;
          18090089  multiple CPV.sbat   ab1234  R       2:27      2 uc2n[127-128]&lt;br /&gt;
$ squeue -l&lt;br /&gt;
            JOBID PARTITION     NAME     USER    STATE       TIME TIME_LIMI  NODES NODELIST(REASON) &lt;br /&gt;
         18088654    single CPV.sbat   ab1234 COMPLETI       4:29   2:00:00      1 uc2n374&lt;br /&gt;
         18088785    single CPV.sbat   ab1234  PENDING       0:00   2:00:00      1 (Priority)&lt;br /&gt;
         18098414  multiple CPV.sbat   ab1234  PENDING       0:00   2:00:00      2 (Priority)&lt;br /&gt;
         18088683    single CPV.sbat   ab1234  RUNNING       0:14   2:00:00      1 uc2n413  &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_multiple  :      8 nodes idle&lt;br /&gt;
Partition multiple      :    332 nodes idle&lt;br /&gt;
Partition dev_single    :      4 nodes idle&lt;br /&gt;
Partition single        :     76 nodes idle&lt;br /&gt;
Partition long          :     80 nodes idle&lt;br /&gt;
Partition fat           :      5 nodes idle&lt;br /&gt;
Partition dev_special   :    342 nodes idle&lt;br /&gt;
Partition special       :    342 nodes idle&lt;br /&gt;
Partition dev_multiple_e:      7 nodes idle&lt;br /&gt;
Partition multiple_e    :    335 nodes idle&lt;br /&gt;
Partition gpu_4         :     12 nodes idle&lt;br /&gt;
Partition gpu_8         :      6 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 2.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;
          18089884  multiple CPV.sbat   bq0742  R      33:44      2 uc2n[165-166]&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 18089884&lt;br /&gt;
&lt;br /&gt;
JobId=18089884 JobName=CPV.sbatch&lt;br /&gt;
   UserId=bq0742(8946) GroupId=scc(12345) MCS_label=N/A&lt;br /&gt;
   Priority=3 Nice=0 Account=kit 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:35:06 TimeLimit=02:00:00 TimeMin=N/A&lt;br /&gt;
   SubmitTime=2020-03-16T14:14:54 EligibleTime=2020-03-16T14:14:54&lt;br /&gt;
   AccrueTime=2020-03-16T14:14:54&lt;br /&gt;
   StartTime=2020-03-16T15:12:51 EndTime=2020-03-16T17:12:51 Deadline=N/A&lt;br /&gt;
   SuspendTime=None SecsPreSuspend=0 LastSchedEval=2020-03-16T15:12:51&lt;br /&gt;
   Partition=multiple AllocNode:Sid=uc2n995:5064&lt;br /&gt;
   ReqNodeList=(null) ExcNodeList=(null)&lt;br /&gt;
   NodeList=uc2n[165-166]&lt;br /&gt;
   BatchHost=uc2n165&lt;br /&gt;
   NumNodes=2 NumCPUs=160 NumTasks=80 CPUs/Task=1 ReqB:S:C:T=0:0:*:1&lt;br /&gt;
   TRES=cpu=160,mem=96320M,node=2,billing=160&lt;br /&gt;
   Socks/Node=* NtasksPerN:B:S:C=40:0:*:1 CoreSpec=*&lt;br /&gt;
   MinCPUsNode=40 MinMemoryCPU=1204M MinTmpDiskNode=0&lt;br /&gt;
   Features=(null) DelayBoot=00:00:00&lt;br /&gt;
   OverSubscribe=NO Contiguous=0 Licenses=(null) Network=(null)&lt;br /&gt;
   Command=/pfs/data5/home/kit/scc/bq0742/git/CPV/bin/CPV.sbatch&lt;br /&gt;
   WorkDir=/pfs/data5/home/kit/scc/bq0742/git/CPV/bin&lt;br /&gt;
   StdErr=/pfs/data5/home/kit/scc/bq0742/git/CPV/bin/slurm-18089884.out&lt;br /&gt;
   StdIn=/dev/null&lt;br /&gt;
   StdOut=/pfs/data5/home/kit/scc/bq0742/git/CPV/bin/slurm-18089884.out&lt;br /&gt;
   Power=&lt;br /&gt;
   MailUser=(null) MailType=NONE&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 18089884 | grep -i State&lt;br /&gt;
   JobState=COMPLETED 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;
{| width=750px 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 msub 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 PI 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#lbAI 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;
[[Category:bwUniCluster 2.0|bwUniCluster 2.0]]&lt;br /&gt;
[[#top|Back to top]]&lt;/div&gt;</summary>
		<author><name>H Weber</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster2.0/Slurm&amp;diff=10251</id>
		<title>BwUniCluster2.0/Slurm</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster2.0/Slurm&amp;diff=10251"/>
		<updated>2022-03-29T09:08:38Z</updated>

		<summary type="html">&lt;p&gt;H Weber: /* sbatch Command Parameters */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&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 [[bwUniCluster 2.0|bwUniCluster 2.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 2.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;
If your job was submitted to the &amp;quot;multiple&amp;quot; queue you can log into the allocated nodes via SSH as soon as the job is running.&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;
* [[BwUniCluster_2.0_Batch_Queues#sbatch_-p_queue|bwUniCluster 2.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_single -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=200gb&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=fat&#039;&#039; (with &#039;&#039;--partition=(dev_)single&#039;&#039; maximum &#039;&#039;--mem=96gb&#039;&#039; is possible):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sbatch --partition=fat 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;Because hyperthreading is switched on on bwUniCluster 2.0, the option --cpus-per-task (-c) must be set to 2*n, if you want to use n threads.&#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 40-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 single --export=ALL,OMP_NUM_THREADS=40 -J OpenMP_Test -N 1 -c 80 -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=80&lt;br /&gt;
#SBATCH --time=40:00&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}/2))&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;single&#039;&#039; as sbatch option:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sbatch -p single 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=single --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 a defined module environment related to OpenMPI is wished&lt;br /&gt;
module load mpi/openmpi/&amp;lt;placeholder_for_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 single -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 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=multiple -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;Because hyperthreading is switched on on bwUniCluster 2.0, the option --cpus-per-task (-c) must be set to 2*n, if you want to use n threads.&#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=56&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}/2))&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 multiple_e ./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 40-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=80&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}/2))&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 multiple ./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 msub_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_4 and gpu_8 queues have 4 or 8 NVIDIA Tesla V100 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 ressources 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 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=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;
Sun Mar 29 15:20:05 2020       &lt;br /&gt;
+-----------------------------------------------------------------------------+&lt;br /&gt;
| NVIDIA-SMI 440.33.01    Driver Version: 440.33.01    CUDA Version: 10.2     |&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;
|===============================+======================+======================|&lt;br /&gt;
|   0  Tesla V100-SXM2...  Off  | 00000000:3A:00.0 Off |                    0 |&lt;br /&gt;
| N/A   29C    P0    39W / 300W |      9MiB / 32510MiB |      0%      Default |&lt;br /&gt;
+-------------------------------+----------------------+----------------------+&lt;br /&gt;
|   1  Tesla V100-SXM2...  Off  | 00000000:3B:00.0 Off |                    0 |&lt;br /&gt;
| N/A   30C    P0    41W / 300W |      8MiB / 32510MiB |      0%      Default |&lt;br /&gt;
+-------------------------------+----------------------+----------------------+&lt;br /&gt;
                                                                               &lt;br /&gt;
+-----------------------------------------------------------------------------+&lt;br /&gt;
| Processes:                                                       GPU Memory |&lt;br /&gt;
|  GPU       PID   Type   Process name                             Usage      |&lt;br /&gt;
|=============================================================================|&lt;br /&gt;
|    0     14228      G   /usr/bin/X                                     8MiB |&lt;br /&gt;
|    1     14228      G   /usr/bin/X                                     8MiB |&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;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== LSDF Online Storage ====&lt;br /&gt;
On bwUniCluster 2.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 compute nodes during the job runtime with the constraint flag &amp;quot;BEEOND&amp;quot;, &amp;quot;BEEOND_4MDS&amp;quot; and &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. If you have less than 4 nodes, then less metadata servers are started.&lt;br /&gt;
* BEEOND_MAXMDS: on every node 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, that this is sufficient for you, feel free to contact the support team.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
#SBATCH ...&lt;br /&gt;
#SBATCH --constraint=BEEOND (BEEOND_4MDS, BEEOND_MAXMDS)&lt;br /&gt;
&amp;lt;/pre&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 three pre-configured directories:&lt;br /&gt;
&amp;lt;pre&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 or /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, /mnt/odfs/$SLURM_JOB_ID/stripe_16 or /mnt/odfs/$SLURM_JOB_ID/stripe_32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you request less nodes than stripe count, the stripe count will be max number of nodes, e.g., You only request 8 nodes , so the directory with stripe count 16 is basically only with a stripe count 8.&lt;br /&gt;
&lt;br /&gt;
The capacity of the private file system depends on the number of nodes. For each node you get 750Gbyte.&lt;br /&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 1.  &lt;br /&gt;
&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;
&#039;&#039;&#039;Recommendation:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The private file system is using its own metadata server. This metadata server is started on the first nodes. Depending on your application, the metadata server is consuming decent amount of CPU power. Probably adding a extra node to your job could improve the usability of the on-demand file system. Start your application with the MPI option:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mpirun -nolocal myapplication&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
With the -nolocal option the node where mpirun is initiated is not used for your application. This node is fully available for the meta data server of your requested on-demand file system.&lt;br /&gt;
&lt;br /&gt;
Example job script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
#very simple example on how to use a private on-demand file system&lt;br /&gt;
#SBATCH -N 10&lt;br /&gt;
#SBATCH --constraint=BEEOND&lt;br /&gt;
&lt;br /&gt;
#create a workspace &lt;br /&gt;
ws_allocate myresults-$SLURM_JOB_ID 90&lt;br /&gt;
RESULTDIR=`ws_find myresults-$SLURM_JOB_ID`&lt;br /&gt;
&lt;br /&gt;
#Set ENV variable to on-demand file system&lt;br /&gt;
ODFSDIR=/mnt/odfs/$SLURM_JOB_ID/stripe_16/&lt;br /&gt;
&lt;br /&gt;
#start application and write results to on-demand file system&lt;br /&gt;
mpirun -nolocal myapplication -o $ODFSDIR/results&lt;br /&gt;
&lt;br /&gt;
#Copy back data after your job application end&lt;br /&gt;
rsync -av $ODFSDIR/results $RESULTDIR&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&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;
          18088744    single CPV.sbat   ab1234 PD       0:00      1 (Priority)&lt;br /&gt;
          18098414  multiple CPV.sbat   ab1234 PD       0:00      2 (Priority) &lt;br /&gt;
          18090089  multiple CPV.sbat   ab1234  R       2:27      2 uc2n[127-128]&lt;br /&gt;
$ squeue -l&lt;br /&gt;
            JOBID PARTITION     NAME     USER    STATE       TIME TIME_LIMI  NODES NODELIST(REASON) &lt;br /&gt;
         18088654    single CPV.sbat   ab1234 COMPLETI       4:29   2:00:00      1 uc2n374&lt;br /&gt;
         18088785    single CPV.sbat   ab1234  PENDING       0:00   2:00:00      1 (Priority)&lt;br /&gt;
         18098414  multiple CPV.sbat   ab1234  PENDING       0:00   2:00:00      2 (Priority)&lt;br /&gt;
         18088683    single CPV.sbat   ab1234  RUNNING       0:14   2:00:00      1 uc2n413  &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_multiple  :      8 nodes idle&lt;br /&gt;
Partition multiple      :    332 nodes idle&lt;br /&gt;
Partition dev_single    :      4 nodes idle&lt;br /&gt;
Partition single        :     76 nodes idle&lt;br /&gt;
Partition long          :     80 nodes idle&lt;br /&gt;
Partition fat           :      5 nodes idle&lt;br /&gt;
Partition dev_special   :    342 nodes idle&lt;br /&gt;
Partition special       :    342 nodes idle&lt;br /&gt;
Partition dev_multiple_e:      7 nodes idle&lt;br /&gt;
Partition multiple_e    :    335 nodes idle&lt;br /&gt;
Partition gpu_4         :     12 nodes idle&lt;br /&gt;
Partition gpu_8         :      6 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 2.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;
          18089884  multiple CPV.sbat   bq0742  R      33:44      2 uc2n[165-166]&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 18089884&lt;br /&gt;
&lt;br /&gt;
JobId=18089884 JobName=CPV.sbatch&lt;br /&gt;
   UserId=bq0742(8946) GroupId=scc(12345) MCS_label=N/A&lt;br /&gt;
   Priority=3 Nice=0 Account=kit 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:35:06 TimeLimit=02:00:00 TimeMin=N/A&lt;br /&gt;
   SubmitTime=2020-03-16T14:14:54 EligibleTime=2020-03-16T14:14:54&lt;br /&gt;
   AccrueTime=2020-03-16T14:14:54&lt;br /&gt;
   StartTime=2020-03-16T15:12:51 EndTime=2020-03-16T17:12:51 Deadline=N/A&lt;br /&gt;
   SuspendTime=None SecsPreSuspend=0 LastSchedEval=2020-03-16T15:12:51&lt;br /&gt;
   Partition=multiple AllocNode:Sid=uc2n995:5064&lt;br /&gt;
   ReqNodeList=(null) ExcNodeList=(null)&lt;br /&gt;
   NodeList=uc2n[165-166]&lt;br /&gt;
   BatchHost=uc2n165&lt;br /&gt;
   NumNodes=2 NumCPUs=160 NumTasks=80 CPUs/Task=1 ReqB:S:C:T=0:0:*:1&lt;br /&gt;
   TRES=cpu=160,mem=96320M,node=2,billing=160&lt;br /&gt;
   Socks/Node=* NtasksPerN:B:S:C=40:0:*:1 CoreSpec=*&lt;br /&gt;
   MinCPUsNode=40 MinMemoryCPU=1204M MinTmpDiskNode=0&lt;br /&gt;
   Features=(null) DelayBoot=00:00:00&lt;br /&gt;
   OverSubscribe=NO Contiguous=0 Licenses=(null) Network=(null)&lt;br /&gt;
   Command=/pfs/data5/home/kit/scc/bq0742/git/CPV/bin/CPV.sbatch&lt;br /&gt;
   WorkDir=/pfs/data5/home/kit/scc/bq0742/git/CPV/bin&lt;br /&gt;
   StdErr=/pfs/data5/home/kit/scc/bq0742/git/CPV/bin/slurm-18089884.out&lt;br /&gt;
   StdIn=/dev/null&lt;br /&gt;
   StdOut=/pfs/data5/home/kit/scc/bq0742/git/CPV/bin/slurm-18089884.out&lt;br /&gt;
   Power=&lt;br /&gt;
   MailUser=(null) MailType=NONE&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 18089884 | grep -i State&lt;br /&gt;
   JobState=COMPLETED 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;
{| width=750px 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 msub 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 PI 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#lbAI 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;
[[Category:bwUniCluster 2.0|bwUniCluster 2.0]]&lt;br /&gt;
[[#top|Back to top]]&lt;/div&gt;</summary>
		<author><name>H Weber</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster2.0/Slurm&amp;diff=10241</id>
		<title>BwUniCluster2.0/Slurm</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster2.0/Slurm&amp;diff=10241"/>
		<updated>2022-03-28T09:16:10Z</updated>

		<summary type="html">&lt;p&gt;H Weber: /* BeeOND (BeeGFS On-Demand) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&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 [[bwUniCluster 2.0|bwUniCluster 2.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 2.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;
If your job was submitted to the &amp;quot;multiple&amp;quot; queue you can log into the allocated nodes via SSH as soon as the job is running.&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&#039;&#039; or --constraint=&#039;&#039;BEEOND&#039;&#039;&lt;br /&gt;
| #SBATCH --constraint=BEEOND&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;
* [[BwUniCluster_2.0_Batch_Queues#sbatch_-p_queue|bwUniCluster 2.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_single -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=200gb&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=fat&#039;&#039; (with &#039;&#039;--partition=(dev_)single&#039;&#039; maximum &#039;&#039;--mem=96gb&#039;&#039; is possible):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sbatch --partition=fat 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;Because hyperthreading is switched on on bwUniCluster 2.0, the option --cpus-per-task (-c) must be set to 2*n, if you want to use n threads.&#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 40-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 single --export=ALL,OMP_NUM_THREADS=40 -J OpenMP_Test -N 1 -c 80 -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=80&lt;br /&gt;
#SBATCH --time=40:00&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}/2))&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;single&#039;&#039; as sbatch option:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sbatch -p single 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=single --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 a defined module environment related to OpenMPI is wished&lt;br /&gt;
module load mpi/openmpi/&amp;lt;placeholder_for_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 single -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 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=multiple -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;Because hyperthreading is switched on on bwUniCluster 2.0, the option --cpus-per-task (-c) must be set to 2*n, if you want to use n threads.&#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=56&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}/2))&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 multiple_e ./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 40-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=80&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}/2))&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 multiple ./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 msub_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_4 and gpu_8 queues have 4 or 8 NVIDIA Tesla V100 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 ressources 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 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=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;
Sun Mar 29 15:20:05 2020       &lt;br /&gt;
+-----------------------------------------------------------------------------+&lt;br /&gt;
| NVIDIA-SMI 440.33.01    Driver Version: 440.33.01    CUDA Version: 10.2     |&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;
|===============================+======================+======================|&lt;br /&gt;
|   0  Tesla V100-SXM2...  Off  | 00000000:3A:00.0 Off |                    0 |&lt;br /&gt;
| N/A   29C    P0    39W / 300W |      9MiB / 32510MiB |      0%      Default |&lt;br /&gt;
+-------------------------------+----------------------+----------------------+&lt;br /&gt;
|   1  Tesla V100-SXM2...  Off  | 00000000:3B:00.0 Off |                    0 |&lt;br /&gt;
| N/A   30C    P0    41W / 300W |      8MiB / 32510MiB |      0%      Default |&lt;br /&gt;
+-------------------------------+----------------------+----------------------+&lt;br /&gt;
                                                                               &lt;br /&gt;
+-----------------------------------------------------------------------------+&lt;br /&gt;
| Processes:                                                       GPU Memory |&lt;br /&gt;
|  GPU       PID   Type   Process name                             Usage      |&lt;br /&gt;
|=============================================================================|&lt;br /&gt;
|    0     14228      G   /usr/bin/X                                     8MiB |&lt;br /&gt;
|    1     14228      G   /usr/bin/X                                     8MiB |&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;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== LSDF Online Storage ====&lt;br /&gt;
On bwUniCluster 2.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 compute nodes during the job runtime with the constraint flag &amp;quot;BEEOND&amp;quot;, &amp;quot;BEEOND_4MDS&amp;quot; and &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. If you have less than 4 nodes, then less metadata servers are started.&lt;br /&gt;
* BEEOND_MAXMDS: on every node 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, that this is sufficient for you, feel free to contact the support team.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
#SBATCH ...&lt;br /&gt;
#SBATCH --constraint=BEEOND (BEEOND_4MDS, BEEOND_MAXMDS)&lt;br /&gt;
&amp;lt;/pre&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 three pre-configured directories:&lt;br /&gt;
&amp;lt;pre&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 or /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, /mnt/odfs/$SLURM_JOB_ID/stripe_16 or /mnt/odfs/$SLURM_JOB_ID/stripe_32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you request less nodes than stripe count, the stripe count will be max number of nodes, e.g., You only request 8 nodes , so the directory with stripe count 16 is basically only with a stripe count 8.&lt;br /&gt;
&lt;br /&gt;
The capacity of the private file system depends on the number of nodes. For each node you get 750Gbyte.&lt;br /&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 1.  &lt;br /&gt;
&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;
&#039;&#039;&#039;Recommendation:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The private file system is using its own metadata server. This metadata server is started on the first nodes. Depending on your application, the metadata server is consuming decent amount of CPU power. Probably adding a extra node to your job could improve the usability of the on-demand file system. Start your application with the MPI option:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mpirun -nolocal myapplication&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
With the -nolocal option the node where mpirun is initiated is not used for your application. This node is fully available for the meta data server of your requested on-demand file system.&lt;br /&gt;
&lt;br /&gt;
Example job script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
#very simple example on how to use a private on-demand file system&lt;br /&gt;
#SBATCH -N 10&lt;br /&gt;
#SBATCH --constraint=BEEOND&lt;br /&gt;
&lt;br /&gt;
#create a workspace &lt;br /&gt;
ws_allocate myresults-$SLURM_JOB_ID 90&lt;br /&gt;
RESULTDIR=`ws_find myresults-$SLURM_JOB_ID`&lt;br /&gt;
&lt;br /&gt;
#Set ENV variable to on-demand file system&lt;br /&gt;
ODFSDIR=/mnt/odfs/$SLURM_JOB_ID/stripe_16/&lt;br /&gt;
&lt;br /&gt;
#start application and write results to on-demand file system&lt;br /&gt;
mpirun -nolocal myapplication -o $ODFSDIR/results&lt;br /&gt;
&lt;br /&gt;
#Copy back data after your job application end&lt;br /&gt;
rsync -av $ODFSDIR/results $RESULTDIR&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&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;
          18088744    single CPV.sbat   ab1234 PD       0:00      1 (Priority)&lt;br /&gt;
          18098414  multiple CPV.sbat   ab1234 PD       0:00      2 (Priority) &lt;br /&gt;
          18090089  multiple CPV.sbat   ab1234  R       2:27      2 uc2n[127-128]&lt;br /&gt;
$ squeue -l&lt;br /&gt;
            JOBID PARTITION     NAME     USER    STATE       TIME TIME_LIMI  NODES NODELIST(REASON) &lt;br /&gt;
         18088654    single CPV.sbat   ab1234 COMPLETI       4:29   2:00:00      1 uc2n374&lt;br /&gt;
         18088785    single CPV.sbat   ab1234  PENDING       0:00   2:00:00      1 (Priority)&lt;br /&gt;
         18098414  multiple CPV.sbat   ab1234  PENDING       0:00   2:00:00      2 (Priority)&lt;br /&gt;
         18088683    single CPV.sbat   ab1234  RUNNING       0:14   2:00:00      1 uc2n413  &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_multiple  :      8 nodes idle&lt;br /&gt;
Partition multiple      :    332 nodes idle&lt;br /&gt;
Partition dev_single    :      4 nodes idle&lt;br /&gt;
Partition single        :     76 nodes idle&lt;br /&gt;
Partition long          :     80 nodes idle&lt;br /&gt;
Partition fat           :      5 nodes idle&lt;br /&gt;
Partition dev_special   :    342 nodes idle&lt;br /&gt;
Partition special       :    342 nodes idle&lt;br /&gt;
Partition dev_multiple_e:      7 nodes idle&lt;br /&gt;
Partition multiple_e    :    335 nodes idle&lt;br /&gt;
Partition gpu_4         :     12 nodes idle&lt;br /&gt;
Partition gpu_8         :      6 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 2.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;
          18089884  multiple CPV.sbat   bq0742  R      33:44      2 uc2n[165-166]&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 18089884&lt;br /&gt;
&lt;br /&gt;
JobId=18089884 JobName=CPV.sbatch&lt;br /&gt;
   UserId=bq0742(8946) GroupId=scc(12345) MCS_label=N/A&lt;br /&gt;
   Priority=3 Nice=0 Account=kit 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:35:06 TimeLimit=02:00:00 TimeMin=N/A&lt;br /&gt;
   SubmitTime=2020-03-16T14:14:54 EligibleTime=2020-03-16T14:14:54&lt;br /&gt;
   AccrueTime=2020-03-16T14:14:54&lt;br /&gt;
   StartTime=2020-03-16T15:12:51 EndTime=2020-03-16T17:12:51 Deadline=N/A&lt;br /&gt;
   SuspendTime=None SecsPreSuspend=0 LastSchedEval=2020-03-16T15:12:51&lt;br /&gt;
   Partition=multiple AllocNode:Sid=uc2n995:5064&lt;br /&gt;
   ReqNodeList=(null) ExcNodeList=(null)&lt;br /&gt;
   NodeList=uc2n[165-166]&lt;br /&gt;
   BatchHost=uc2n165&lt;br /&gt;
   NumNodes=2 NumCPUs=160 NumTasks=80 CPUs/Task=1 ReqB:S:C:T=0:0:*:1&lt;br /&gt;
   TRES=cpu=160,mem=96320M,node=2,billing=160&lt;br /&gt;
   Socks/Node=* NtasksPerN:B:S:C=40:0:*:1 CoreSpec=*&lt;br /&gt;
   MinCPUsNode=40 MinMemoryCPU=1204M MinTmpDiskNode=0&lt;br /&gt;
   Features=(null) DelayBoot=00:00:00&lt;br /&gt;
   OverSubscribe=NO Contiguous=0 Licenses=(null) Network=(null)&lt;br /&gt;
   Command=/pfs/data5/home/kit/scc/bq0742/git/CPV/bin/CPV.sbatch&lt;br /&gt;
   WorkDir=/pfs/data5/home/kit/scc/bq0742/git/CPV/bin&lt;br /&gt;
   StdErr=/pfs/data5/home/kit/scc/bq0742/git/CPV/bin/slurm-18089884.out&lt;br /&gt;
   StdIn=/dev/null&lt;br /&gt;
   StdOut=/pfs/data5/home/kit/scc/bq0742/git/CPV/bin/slurm-18089884.out&lt;br /&gt;
   Power=&lt;br /&gt;
   MailUser=(null) MailType=NONE&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 18089884 | grep -i State&lt;br /&gt;
   JobState=COMPLETED 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;
{| width=750px 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 msub 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 PI 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#lbAI 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;
[[Category:bwUniCluster 2.0|bwUniCluster 2.0]]&lt;br /&gt;
[[#top|Back to top]]&lt;/div&gt;</summary>
		<author><name>H Weber</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster2.0/Slurm&amp;diff=10240</id>
		<title>BwUniCluster2.0/Slurm</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster2.0/Slurm&amp;diff=10240"/>
		<updated>2022-03-28T09:13:59Z</updated>

		<summary type="html">&lt;p&gt;H Weber: /* BeeOND (BeeGFS On-Demand) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&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 [[bwUniCluster 2.0|bwUniCluster 2.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 2.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;
If your job was submitted to the &amp;quot;multiple&amp;quot; queue you can log into the allocated nodes via SSH as soon as the job is running.&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&#039;&#039; or --constraint=&#039;&#039;BEEOND&#039;&#039;&lt;br /&gt;
| #SBATCH --constraint=BEEOND&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;
* [[BwUniCluster_2.0_Batch_Queues#sbatch_-p_queue|bwUniCluster 2.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_single -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=200gb&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=fat&#039;&#039; (with &#039;&#039;--partition=(dev_)single&#039;&#039; maximum &#039;&#039;--mem=96gb&#039;&#039; is possible):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sbatch --partition=fat 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;Because hyperthreading is switched on on bwUniCluster 2.0, the option --cpus-per-task (-c) must be set to 2*n, if you want to use n threads.&#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 40-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 single --export=ALL,OMP_NUM_THREADS=40 -J OpenMP_Test -N 1 -c 80 -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=80&lt;br /&gt;
#SBATCH --time=40:00&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}/2))&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;single&#039;&#039; as sbatch option:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sbatch -p single 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=single --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 a defined module environment related to OpenMPI is wished&lt;br /&gt;
module load mpi/openmpi/&amp;lt;placeholder_for_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 single -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 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=multiple -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;Because hyperthreading is switched on on bwUniCluster 2.0, the option --cpus-per-task (-c) must be set to 2*n, if you want to use n threads.&#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=56&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}/2))&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 multiple_e ./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 40-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=80&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}/2))&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 multiple ./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 msub_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_4 and gpu_8 queues have 4 or 8 NVIDIA Tesla V100 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 ressources 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 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=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;
Sun Mar 29 15:20:05 2020       &lt;br /&gt;
+-----------------------------------------------------------------------------+&lt;br /&gt;
| NVIDIA-SMI 440.33.01    Driver Version: 440.33.01    CUDA Version: 10.2     |&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;
|===============================+======================+======================|&lt;br /&gt;
|   0  Tesla V100-SXM2...  Off  | 00000000:3A:00.0 Off |                    0 |&lt;br /&gt;
| N/A   29C    P0    39W / 300W |      9MiB / 32510MiB |      0%      Default |&lt;br /&gt;
+-------------------------------+----------------------+----------------------+&lt;br /&gt;
|   1  Tesla V100-SXM2...  Off  | 00000000:3B:00.0 Off |                    0 |&lt;br /&gt;
| N/A   30C    P0    41W / 300W |      8MiB / 32510MiB |      0%      Default |&lt;br /&gt;
+-------------------------------+----------------------+----------------------+&lt;br /&gt;
                                                                               &lt;br /&gt;
+-----------------------------------------------------------------------------+&lt;br /&gt;
| Processes:                                                       GPU Memory |&lt;br /&gt;
|  GPU       PID   Type   Process name                             Usage      |&lt;br /&gt;
|=============================================================================|&lt;br /&gt;
|    0     14228      G   /usr/bin/X                                     8MiB |&lt;br /&gt;
|    1     14228      G   /usr/bin/X                                     8MiB |&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;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== LSDF Online Storage ====&lt;br /&gt;
On bwUniCluster 2.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 compute nodes during the job runtime with the constraint flag &amp;quot;BEEOND&amp;quot;, &amp;quot;BEEOND_4MDS&amp;quot; and &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. If you have less than 4 nodes, then less metadata servers are started.&lt;br /&gt;
- BEEOND_MAXMDS: on every node 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, that this is sufficient for you, feel free to contact the support team.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
#SBATCH ...&lt;br /&gt;
#SBATCH --constraint=BEEOND (BEEOND_4MDS, BEEOND_MAXMDS)&lt;br /&gt;
&amp;lt;/pre&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 three pre-configured directories:&lt;br /&gt;
&amp;lt;pre&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 or /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, /mnt/odfs/$SLURM_JOB_ID/stripe_16 or /mnt/odfs/$SLURM_JOB_ID/stripe_32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you request less nodes than stripe count, the stripe count will be max number of nodes, e.g., You only request 8 nodes , so the directory with stripe count 16 is basically only with a stripe count 8.&lt;br /&gt;
&lt;br /&gt;
The capacity of the private file system depends on the number of nodes. For each node you get 750Gbyte.&lt;br /&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 1.  &lt;br /&gt;
&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;
&#039;&#039;&#039;Recommendation:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The private file system is using its own metadata server. This metadata server is started on the first nodes. Depending on your application, the metadata server is consuming decent amount of CPU power. Probably adding a extra node to your job could improve the usability of the on-demand file system. Start your application with the MPI option:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mpirun -nolocal myapplication&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
With the -nolocal option the node where mpirun is initiated is not used for your application. This node is fully available for the meta data server of your requested on-demand file system.&lt;br /&gt;
&lt;br /&gt;
Example job script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
#very simple example on how to use a private on-demand file system&lt;br /&gt;
#SBATCH -N 10&lt;br /&gt;
#SBATCH --constraint=BEEOND&lt;br /&gt;
&lt;br /&gt;
#create a workspace &lt;br /&gt;
ws_allocate myresults-$SLURM_JOB_ID 90&lt;br /&gt;
RESULTDIR=`ws_find myresults-$SLURM_JOB_ID`&lt;br /&gt;
&lt;br /&gt;
#Set ENV variable to on-demand file system&lt;br /&gt;
ODFSDIR=/mnt/odfs/$SLURM_JOB_ID/stripe_16/&lt;br /&gt;
&lt;br /&gt;
#start application and write results to on-demand file system&lt;br /&gt;
mpirun -nolocal myapplication -o $ODFSDIR/results&lt;br /&gt;
&lt;br /&gt;
#Copy back data after your job application end&lt;br /&gt;
rsync -av $ODFSDIR/results $RESULTDIR&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&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;
          18088744    single CPV.sbat   ab1234 PD       0:00      1 (Priority)&lt;br /&gt;
          18098414  multiple CPV.sbat   ab1234 PD       0:00      2 (Priority) &lt;br /&gt;
          18090089  multiple CPV.sbat   ab1234  R       2:27      2 uc2n[127-128]&lt;br /&gt;
$ squeue -l&lt;br /&gt;
            JOBID PARTITION     NAME     USER    STATE       TIME TIME_LIMI  NODES NODELIST(REASON) &lt;br /&gt;
         18088654    single CPV.sbat   ab1234 COMPLETI       4:29   2:00:00      1 uc2n374&lt;br /&gt;
         18088785    single CPV.sbat   ab1234  PENDING       0:00   2:00:00      1 (Priority)&lt;br /&gt;
         18098414  multiple CPV.sbat   ab1234  PENDING       0:00   2:00:00      2 (Priority)&lt;br /&gt;
         18088683    single CPV.sbat   ab1234  RUNNING       0:14   2:00:00      1 uc2n413  &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_multiple  :      8 nodes idle&lt;br /&gt;
Partition multiple      :    332 nodes idle&lt;br /&gt;
Partition dev_single    :      4 nodes idle&lt;br /&gt;
Partition single        :     76 nodes idle&lt;br /&gt;
Partition long          :     80 nodes idle&lt;br /&gt;
Partition fat           :      5 nodes idle&lt;br /&gt;
Partition dev_special   :    342 nodes idle&lt;br /&gt;
Partition special       :    342 nodes idle&lt;br /&gt;
Partition dev_multiple_e:      7 nodes idle&lt;br /&gt;
Partition multiple_e    :    335 nodes idle&lt;br /&gt;
Partition gpu_4         :     12 nodes idle&lt;br /&gt;
Partition gpu_8         :      6 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 2.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;
          18089884  multiple CPV.sbat   bq0742  R      33:44      2 uc2n[165-166]&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 18089884&lt;br /&gt;
&lt;br /&gt;
JobId=18089884 JobName=CPV.sbatch&lt;br /&gt;
   UserId=bq0742(8946) GroupId=scc(12345) MCS_label=N/A&lt;br /&gt;
   Priority=3 Nice=0 Account=kit 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:35:06 TimeLimit=02:00:00 TimeMin=N/A&lt;br /&gt;
   SubmitTime=2020-03-16T14:14:54 EligibleTime=2020-03-16T14:14:54&lt;br /&gt;
   AccrueTime=2020-03-16T14:14:54&lt;br /&gt;
   StartTime=2020-03-16T15:12:51 EndTime=2020-03-16T17:12:51 Deadline=N/A&lt;br /&gt;
   SuspendTime=None SecsPreSuspend=0 LastSchedEval=2020-03-16T15:12:51&lt;br /&gt;
   Partition=multiple AllocNode:Sid=uc2n995:5064&lt;br /&gt;
   ReqNodeList=(null) ExcNodeList=(null)&lt;br /&gt;
   NodeList=uc2n[165-166]&lt;br /&gt;
   BatchHost=uc2n165&lt;br /&gt;
   NumNodes=2 NumCPUs=160 NumTasks=80 CPUs/Task=1 ReqB:S:C:T=0:0:*:1&lt;br /&gt;
   TRES=cpu=160,mem=96320M,node=2,billing=160&lt;br /&gt;
   Socks/Node=* NtasksPerN:B:S:C=40:0:*:1 CoreSpec=*&lt;br /&gt;
   MinCPUsNode=40 MinMemoryCPU=1204M MinTmpDiskNode=0&lt;br /&gt;
   Features=(null) DelayBoot=00:00:00&lt;br /&gt;
   OverSubscribe=NO Contiguous=0 Licenses=(null) Network=(null)&lt;br /&gt;
   Command=/pfs/data5/home/kit/scc/bq0742/git/CPV/bin/CPV.sbatch&lt;br /&gt;
   WorkDir=/pfs/data5/home/kit/scc/bq0742/git/CPV/bin&lt;br /&gt;
   StdErr=/pfs/data5/home/kit/scc/bq0742/git/CPV/bin/slurm-18089884.out&lt;br /&gt;
   StdIn=/dev/null&lt;br /&gt;
   StdOut=/pfs/data5/home/kit/scc/bq0742/git/CPV/bin/slurm-18089884.out&lt;br /&gt;
   Power=&lt;br /&gt;
   MailUser=(null) MailType=NONE&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 18089884 | grep -i State&lt;br /&gt;
   JobState=COMPLETED 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;
{| width=750px 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 msub 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 PI 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#lbAI 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;
[[Category:bwUniCluster 2.0|bwUniCluster 2.0]]&lt;br /&gt;
[[#top|Back to top]]&lt;/div&gt;</summary>
		<author><name>H Weber</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster2.0/Hardware_and_Architecture&amp;diff=9462</id>
		<title>BwUniCluster2.0/Hardware and Architecture</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster2.0/Hardware_and_Architecture&amp;diff=9462"/>
		<updated>2021-12-14T08:59:00Z</updated>

		<summary type="html">&lt;p&gt;H Weber: /* BeeOND (BeeGFS On-Demand) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Architecture of bwUniCluster 2.0 =&lt;br /&gt;
&lt;br /&gt;
The bwUniCluster 2.0 is a parallel computer with distributed memory. Each node of system consists of at least two Intel Xeon processor, local memory, disks, network adapters and optionally accelerators (NVIDIA Tesla V100). All nodes are connected by a fast InfiniBand interconnect. In addition the file system&lt;br /&gt;
Lustre, that is connected by coupling the InfiniBand of the file server with the InfiniBand&lt;br /&gt;
switch of the compute cluster, is added to bwUniCluster 2.0 to provide a fast and scalable&lt;br /&gt;
parallel file system.&lt;br /&gt;
&lt;br /&gt;
The operating system on each node is Red Hat Enterprise Linux (RHEL) 7.7. A number of additional software packages like e.g. SLURM have been installed on top. Some of these components are of special interest to end users and are briefly&lt;br /&gt;
discussed in this document. Others which are of greater importance to system&lt;br /&gt;
administrators will not be covered by this document.&lt;br /&gt;
&lt;br /&gt;
The individual nodes of the system may act in different roles. According to the services supplied by the nodes, they are separated into disjoint groups. From an end users point of view the different groups of nodes are login nodes, compute nodes, file server nodes and administrative server nodes.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Login Nodes&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The login nodes are the only nodes that are directly accessible by end users. These nodes&lt;br /&gt;
are used for interactive login, file management, program development and interactive pre-&lt;br /&gt;
and postprocessing. Two nodes are dedicated to this service but they are all accessible via&lt;br /&gt;
one address and a DNS round-robin alias distributes the login sessions to the&lt;br /&gt;
different login nodes.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Compute Node&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The majority of nodes are compute nodes which are managed by a batch system. Users &lt;br /&gt;
submit their jobs to the SLURM batch system and a job is executed when the required resources become available (depending on its fair-share priority).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;File Server Nodes&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The hardware of the parallel file system Lustre incorporates some file server nodes; the file&lt;br /&gt;
system Lustre is connected by coupling the InfiniBand of the file server with the independent InfiniBand switch of the compute cluster. In addition to shared file space there is also local storage on the disks of each node (for details see chapter &amp;quot;File Systems&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Administrative Server Nodes&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Some other nodes are delivering additional services like resource management, external&lt;br /&gt;
network connection, administration etc. These nodes can be accessed directly by system administrators only.&lt;br /&gt;
&lt;br /&gt;
= Components of bwUniCluster =&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
! style=&amp;quot;width:9%&amp;quot;|&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Compute nodes &amp;quot;Thin&amp;quot;&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Compute nodes &amp;quot;HPC&amp;quot;&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Compute nodes &amp;quot;HPC Broadwell&amp;quot;&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Compute nodes &amp;quot;Fat&amp;quot;&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| GPU x4&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| GPU x8&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Login&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Number of nodes&lt;br /&gt;
| 100 + 60&lt;br /&gt;
| 360&lt;br /&gt;
| 352&lt;br /&gt;
| 6&lt;br /&gt;
| 14&lt;br /&gt;
| 10&lt;br /&gt;
| 4 + 2 (Broadwell)&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Processors&lt;br /&gt;
| Intel Xeon Gold 6230&lt;br /&gt;
| Intel Xeon Gold 6230&lt;br /&gt;
| Intel Xeon E5-2660 v4&lt;br /&gt;
| Intel Xeon Gold 6230&lt;br /&gt;
| Intel Xeon Gold 6230&lt;br /&gt;
| Intel Xeon Gold 6248&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Number of sockets&lt;br /&gt;
| 2&lt;br /&gt;
| 2&lt;br /&gt;
| 2&lt;br /&gt;
| 4&lt;br /&gt;
| 2&lt;br /&gt;
| 2&lt;br /&gt;
| 2&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Processor frequency (GHz)&lt;br /&gt;
| 2.1 Ghz&lt;br /&gt;
| 2.1 Ghz&lt;br /&gt;
| 2.0 GHz&lt;br /&gt;
| 2.1 Ghz&lt;br /&gt;
| 2.1 Ghz&lt;br /&gt;
| 2.1 Ghz&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Total number of cores&lt;br /&gt;
| 40&lt;br /&gt;
| 40&lt;br /&gt;
| 28&lt;br /&gt;
| 80&lt;br /&gt;
| 40&lt;br /&gt;
| 40&lt;br /&gt;
| 40 / 20 (Broadwell)&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Main memory&lt;br /&gt;
| 96 GB / 192 GB&lt;br /&gt;
| 96 GB&lt;br /&gt;
| 128 GB&lt;br /&gt;
| 3 TB&lt;br /&gt;
| 384 GB&lt;br /&gt;
| 768 GB&lt;br /&gt;
| 384 GB / 128 GB (Broadwell)&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Local SSD&lt;br /&gt;
| 960 GB SATA&lt;br /&gt;
| 960 GB SATA&lt;br /&gt;
| 480 GB SATA&lt;br /&gt;
| 4,8 TB NVMe&lt;br /&gt;
| 3,2 TB NVMe&lt;br /&gt;
| 6,4 TB NVMe&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Accelerators&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
| 4x NVIDIA Tesla V100&lt;br /&gt;
| 8x NVIDIA Tesla V100&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Interconnect&lt;br /&gt;
| IB HDR100 (blocking)&lt;br /&gt;
| IB HDR100&lt;br /&gt;
| IB FDR&lt;br /&gt;
| IB HDR&lt;br /&gt;
| IB HDR&lt;br /&gt;
| IB HDR&lt;br /&gt;
| IB HDR100 (blocking)&lt;br /&gt;
|}&lt;br /&gt;
Table 1: Properties of the nodes&lt;br /&gt;
&lt;br /&gt;
= File Systems =&lt;br /&gt;
&lt;br /&gt;
Details about changes on the file systems between bwUniCluster 1 and bwUniCluster 2.0 are described in the [[BwUniCluster_2.0_File_System_Migration_Guide|File system migration guide]]. Note that $WORK is deprecated.&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 2.0 the parallel file system Lustre is used for most globally visible user data. Lustre is open source and Lustre solutions and support are available from different vendors. Nowadays, most of the biggest HPC systems are using Lustre. An initial home directory on a Lustre file system is created during the first login, and the environment variable $HOME holds its name. Users can create so-called workspaces on another Lustre file system for non-permanent data with temporary lifetime.&lt;br /&gt;
&lt;br /&gt;
Within a batch job further file systems are available: &lt;br /&gt;
* The directory $TMP is only available and visible on the local node. It is located on fast SSD storage devices.&lt;br /&gt;
* On request a parallel on-demand (BeeOND) file system is created which uses the SSDs of the nodes which were allocated to the batch job.&lt;br /&gt;
* On request the external LSDF Online Storage is mounted on the nodes which were allocated to the batch job. This file system is based on the parallel file system Spectrum Scale. &lt;br /&gt;
&lt;br /&gt;
Some of the characteristics of the file systems are shown in Table 2.&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;width:100%; vertical-align:top; background:#f5fffa;border:1px solid #000000;padding:1px&amp;quot;&lt;br /&gt;
|- style=&amp;quot;width:20%;height=20px; text-align:left;padding:3px&amp;quot;&lt;br /&gt;
! style=&amp;quot;background-color:#AAA;padding:3px&amp;quot;| Property&lt;br /&gt;
! style=&amp;quot;background-color:#AAA;padding:3px&amp;quot;| $TMP&lt;br /&gt;
! style=&amp;quot;background-color:#AAA;padding:3px&amp;quot;| BeeOND&lt;br /&gt;
! style=&amp;quot;background-color:#AAA;padding:3px&amp;quot;| $HOME&lt;br /&gt;
! style=&amp;quot;background-color:#AAA;padding:3px&amp;quot;| Workspace&lt;br /&gt;
|- &lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Visibility &lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| local node&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| nodes of batch job&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| global&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| global&lt;br /&gt;
|- &lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Lifetime &lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| batch job runtime&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| batch job runtime&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| permanent&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| max. 240 days&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Disk space &lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 960 GB - 6.4 TB &amp;lt;br&amp;gt; details see table 1&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| n*500 GB&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 1.2 PiB&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 4.1 PiB&lt;br /&gt;
|- &lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Capacity Quotas&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| no&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| no&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| yes &amp;lt;br&amp;gt; 1 TiB per user &amp;lt;br&amp;gt; also per organization&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| yes &amp;lt;br&amp;gt; 40 TiB per user&lt;br /&gt;
|- &lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Inode Quotas&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| no&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| no&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| yes &amp;lt;br&amp;gt; 10 million per user&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| yes &amp;lt;br&amp;gt; 30 million per user&lt;br /&gt;
|- &lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Backup&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| no&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| no&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| yes&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| no&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Read perf./node&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 500 MB/s - 6 GB/s &amp;lt;br&amp;gt; depends on type of local SSD / job queue: &amp;lt;br&amp;gt; 520 MB/s @ single / multiple &amp;lt;br&amp;gt; 800 MB/s @ multiple_e &amp;lt;br&amp;gt; 6600 MB/s @ fat &amp;lt;br&amp;gt; 6500 MB/s @ gpu_4 &amp;lt;br&amp;gt; 6500 MB/s @ gpu_8&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 400 MB/s - 500 MB/s&amp;lt;br&amp;gt; depends on type of local SSDs / job queue: &amp;lt;br&amp;gt; 500 MB/s @ multiple &amp;lt;br&amp;gt; 400 MB/s @ multiple_e&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 1 GB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 1 GB/s&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Write perf./node&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 500 MB/s - 4 GB/s &amp;lt;br&amp;gt; depends on type of local SSD / job queue: &amp;lt;br&amp;gt; 500 MB/s @ single / multiple &amp;lt;br&amp;gt; 650 MB/s @ multiple_e &amp;lt;br&amp;gt; 2900 MB/s @ fat &amp;lt;br&amp;gt; 2090 MB/s @ gpu_4 &amp;lt;br&amp;gt; 4060 MB/s @ gpu_8&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 250 MB/s - 350 MB/s &amp;lt;br&amp;gt; depends on type of local SSDs / job queue: &amp;lt;br&amp;gt; 350 MB/s @ multiple &amp;lt;br&amp;gt; 250 MB/s @ multiple_e&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 1 GB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 1 GB/s&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Total read perf.&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| n*500-6000 MB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| n*400-500 MB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 18 GB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 54 GB/s&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Total write perf.&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| n*500-4000 MB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| n*250-350 MB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 18 GB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 54 GB/s&lt;br /&gt;
|}&lt;br /&gt;
---------------------------------------------------------------------------------------------------------&lt;br /&gt;
  global: all nodes of uc1 access the same file system;&lt;br /&gt;
  local: each node has its own file system;&lt;br /&gt;
  permanent: files are stored permanently;&lt;br /&gt;
  batch job: files are removed at end of the batch job.&lt;br /&gt;
---------------------------------------------------------------------------------------------------------&lt;br /&gt;
Table 2: Properties of the file systems&lt;br /&gt;
&lt;br /&gt;
== Selecting the appropriate file system ==&lt;br /&gt;
&lt;br /&gt;
In general, you should separate your data and store it on the appropriate file system.&lt;br /&gt;
Permanently needed data like software or important results should be stored below $HOME&lt;br /&gt;
but capacity restrictions (quotas) apply. In case you accidentally deleted data on $HOME&lt;br /&gt;
you can usually restore it from backup. Permanent data which is not needed for months&lt;br /&gt;
or exceeds the capacity restrictions should be sent to the LSDF Online Storage &lt;br /&gt;
or to the archive and deleted from the file systems. Temporary data which is only needed on a single&lt;br /&gt;
node and which does not exceed the disk space shown in the table above should be stored&lt;br /&gt;
below $TMP. Temporary data which is only needed during job runs should be stored on a &lt;br /&gt;
parallel on-demand file system. Temporary data which can be recomputed or which is the &lt;br /&gt;
result of one job and input for another job should be stored below in workspaces. The lifetime &lt;br /&gt;
of data in workspaces is limited and depends on the lifetime of the workspace which can be &lt;br /&gt;
several months.&lt;br /&gt;
&lt;br /&gt;
For further details please check the chapters below.&lt;br /&gt;
&lt;br /&gt;
== $HOME ==&lt;br /&gt;
&lt;br /&gt;
The home directories of bwUniCluster 2.0 (uc2) users are located in the parallel file system Lustre.&lt;br /&gt;
You have access to your home directory from all nodes of uc2. A regular backup of these directories &lt;br /&gt;
to tape archive is done automatically. The directory $HOME is used to hold those files that are&lt;br /&gt;
permanently used like source codes, configuration files, executable programs etc. &lt;br /&gt;
&lt;br /&gt;
On uc2 there is a default user quota limit of 1 TiB and 10 million inodes (files and directories) per user. &lt;br /&gt;
You can chek your current usage and limits with the command&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ lfs quota -uh $(whoami) $HOME&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In addition to the user limit there is a limit of your organization (e.g. university) which depends on the financial share. This limit is enforced with so-called Lustre project quotas. You can show the current usage and limits of your organization with the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
lfs quota -ph $(grep $(echo $HOME | sed -e &amp;quot;s|/[^/]*/[^/]*$||&amp;quot;) /pfs/data5/project_ids.txt | cut -f 1 -d\ ) $HOME&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Workspaces ==&lt;br /&gt;
&lt;br /&gt;
On uc2 workspaces can be used to store large non-permanent data sets, e.g. restart files or output&lt;br /&gt;
data that has to be post-processed. The file system used for workspaces is also the parallel file system Lustre. This file system is especially designed for parallel access and for a high throughput to large&lt;br /&gt;
files. It is able to provide high data transfer rates of up to 54 GB/s write and read performance when data access is parallel. &lt;br /&gt;
&lt;br /&gt;
Workspaces have a lifetime and the data on a workspace expires as a whole after a fixed period. The maximum lifetime of a workspace is 60 days, but it can be renewed at the end of that period 3 times to a total maximum of 240 days after workspace generation. If a workspace has inadvertently expired we can restore the data during a limited time (few weeks). In this case you should create a new workspace and report the name of the new and of the expired workspace in a ticket or in an email to the hotline.&lt;br /&gt;
&lt;br /&gt;
Creating, deleting, finding and extending workspaces is explained on the  [[workspace]] page.&lt;br /&gt;
&lt;br /&gt;
On uc2 there is a default user quota limit of 40 TiB and 30 million inodes (files and directories) per user. &lt;br /&gt;
You can chek your current usage and limits with the command&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ lfs quota -uh $(whoami) /pfs/work7&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Reminder for workspace deletion ===&lt;br /&gt;
&lt;br /&gt;
Normally you will get an email every day starting 7 days before a workspace expires. You can send yourself a calender entry which reminds you when a workspace will be automatically deleted:&lt;br /&gt;
&lt;br /&gt;
 $ ws_send_ical.sh &amp;lt;workspace&amp;gt; &amp;lt;email&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Improving Performance on $HOME and workspaces ==&lt;br /&gt;
&lt;br /&gt;
The following recommendations might help to improve throughput and metadata&lt;br /&gt;
performance on Lustre filesystems.&lt;br /&gt;
&lt;br /&gt;
=== &#039;&#039;&#039;Improving Throughput Performance&#039;&#039;&#039; ===&lt;br /&gt;
&lt;br /&gt;
Depending on your application some adaptations might be necessary if you want to reach&lt;br /&gt;
the full bandwidth of the filesystems. Parallel filesystems typically stripe files over storage subsystems, i.e. large files are separated into stripes and distributed to different storage subsystems. In Lustre, the size of these stripes (sometimes also mentioned as chunks) is called stripe size and the number of used storage subsystems is called stripe count.&lt;br /&gt;
&lt;br /&gt;
When you are designing your application you should consider that the performance of&lt;br /&gt;
parallel filesystems is generally better if data is transferred in large blocks and stored in&lt;br /&gt;
few large files. In more detail, to increase throughput performance of a parallel application&lt;br /&gt;
following aspects should be considered:&lt;br /&gt;
&lt;br /&gt;
* collect large chunks of data and write them sequentially at once,&lt;br /&gt;
&lt;br /&gt;
* to exploit complete filesystem bandwidth use several clients,&lt;br /&gt;
&lt;br /&gt;
* avoid competitive file access by different tasks or use blocks with boundaries at stripe size (default is 1MB),&lt;br /&gt;
&lt;br /&gt;
* if files are small enough for the SSDs and are only used by one process store them on $TMP.&lt;br /&gt;
&lt;br /&gt;
With previous Lustre versions adapting the Lustre stripe count was the most important optimization. However, for the workspaces of uc2 the new Lustre feature Progressive File Layouts has been used to define file striping parameters. This means that the stripe count is adapted if the file size is growing. In normal cases users no longer need to adapt file striping parameters in case they have very huge files or in order to reach better performance. &lt;br /&gt;
&lt;br /&gt;
If you know what you are doing you can still change striping parameters, e.g. the stripe count, of a directory and of newly created files. New files and directories inherit the stripe count from the parent directory. E.g. if you want to enhance throughput on a single very large file which is created in the directory $HOME/my_output_dir you can use the command&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ lfs setstripe -c-1 $HOME/my_output_dir&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
to change the stripe count to -1 which means that all storage subsystems of the file system are used to store that file. If you change the stripe count of a directory the stripe count of existing files inside this&lt;br /&gt;
directory is not changed. If you want to change the stripe count of existing files, change&lt;br /&gt;
the stripe count of the parent directory, copy the files to new files, remove the old files&lt;br /&gt;
and move the new files back to the old name. In order to check the stripe setting of&lt;br /&gt;
the file my_file use&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ lfs getstripe my_file&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Also note that changes on the striping parameters (e.g. stripe count) are not saved in the&lt;br /&gt;
backup, i.e. if directories have to be recreated this information is lost and the default stripe&lt;br /&gt;
count will be used. Therefore, you should annotate for which directories you made changes&lt;br /&gt;
to the striping parameters so that you can repeat these changes if required.&lt;br /&gt;
&lt;br /&gt;
=== &#039;&#039;&#039;Improving Metadata Performance&#039;&#039;&#039; ===&lt;br /&gt;
&lt;br /&gt;
Metadata performance on parallel file systems is usually not as good as with local&lt;br /&gt;
filesystems. In addition, it is usually not scalable, i.e. a limited resource. Therefore,&lt;br /&gt;
you should omit metadata operations whenever possible. For example, it is much better&lt;br /&gt;
to have few large files than lots of small files. In more detail, to increase metadata&lt;br /&gt;
performance of a parallel application following aspects should be considered:&lt;br /&gt;
&lt;br /&gt;
* avoid creating many small files,&lt;br /&gt;
&lt;br /&gt;
* avoid competitive directory access, e.g. by creating files in separate subdirectories for each task,&lt;br /&gt;
&lt;br /&gt;
* if many small files are only used within a batch job and accessed by one process store them on $TMP,&lt;br /&gt;
&lt;br /&gt;
* change the default colorization setting of the command ls (see below).&lt;br /&gt;
&lt;br /&gt;
On modern Linux systems, the GNU ls command often uses colorization by default to&lt;br /&gt;
visually highlight the file type; this is especially true if the command is run within a terminal&lt;br /&gt;
session. This is because the default shell profile initializations usually contain an alias&lt;br /&gt;
directive similar to the following for the ls command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ alias ls=&amp;quot;ls --color=tty&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
However, running the ls command in this way for files on a Lustre file system requires&lt;br /&gt;
a stat() call to be used to determine the file type. This can result in a performance&lt;br /&gt;
overhead, because the stat() call always needs to determine the size of a file, and that&lt;br /&gt;
in turn means that the client node must query the object size of all the backing objects&lt;br /&gt;
that make up a file. As a result of the default colorization setting, running a simple&lt;br /&gt;
ls command on a Lustre file system often takes as much time as running the ls command&lt;br /&gt;
with the -l option (the same is true if the -F, -p, or the -classify option, or any other option &lt;br /&gt;
that requires information from a stat() call, is used). To avoid this performance overhead&lt;br /&gt;
when using ls commands, add an alias directive similar to the following&lt;br /&gt;
to your shell startup script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ alias ls=&amp;quot;ls --color=never&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== $TMP ==&lt;br /&gt;
&lt;br /&gt;
While all tasks of a parallel application access the same $HOME and workspace directory, the &lt;br /&gt;
$TMP directory is local to each node on bwUniCluster 2.0. Different tasks of a parallel&lt;br /&gt;
application use different directories when they do not utilize one node. This directory should&lt;br /&gt;
be used for temporary files being accessed by single tasks. All nodes have fast SSDs &lt;br /&gt;
local storage devices which are used to store data below $TMP. &lt;br /&gt;
In addition, this directory should be used for the installation&lt;br /&gt;
of software packages. This means that the software package to be installed should be&lt;br /&gt;
unpacked, compiled and linked in a subdirectory of $TMP. The real installation of the&lt;br /&gt;
package (e.g. make install) should be made in(to) the Lustre filesystem. &lt;br /&gt;
&lt;br /&gt;
Each time a batch&lt;br /&gt;
job is started, a subdirectory is created on each node and assigned to the job. $TMP is newly&lt;br /&gt;
set; the name of the subdirectory contains the Job-id and the starting time so that the&lt;br /&gt;
subdirectory name is unique for each job. This unique name is then assigned to the&lt;br /&gt;
environment variable $TMP within the job. At the end of the job the subdirectory is removed.&lt;br /&gt;
&lt;br /&gt;
== LSDF Online Storage==&lt;br /&gt;
&lt;br /&gt;
In some cases it is useful to have access to the LSDF Online Storage on the HPC-Clusters also. Therefore the LSDF Online Storage is mounted on the Login- and Datamover-Nodes.&lt;br /&gt;
Furthermore it can be used on the compute nodes during the job runtime with the constraint flag &amp;quot;LSDF&amp;quot; ([[bwUniCluster_2.0_Slurm_common_Features|Slurm common features]]&lt;br /&gt;
). There is also an example about the LSDF batch usage: [[bwUniCluster_2.0_Slurm_common_Features#LSDF_Online_Storage|Slurm LSDF example ]] .&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
#SBATCH ...&lt;br /&gt;
#SBATCH --constraint=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 the following environment variables are available: $LSDF, $LSDFPROJECTS, $LSDFHOME.&lt;br /&gt;
Please request storage projects in the LSDF Online Storage seperately:&lt;br /&gt;
[https://www.lsdf.kit.edu/os/storagerequest/: LSDF Storage Request].&lt;br /&gt;
&lt;br /&gt;
==BeeOND (BeeGFS On-Demand)==&lt;br /&gt;
&lt;br /&gt;
Users of the HPC-Cluster have possibility to request a private BeeOND (BeeGFS) parallel filesystem for each job. The file system is created during job startup and purged after your job.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;IMPORTANT: All data on the private filesystem will be deleted after your job. Make sure you have copied your data back to the global filesystem (within job), e.g., $HOME or any workspace.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
BeeOND/BeeGFS can be used like any other parallel file system. Tools like cp or rsync can be used to copy data in and out. &lt;br /&gt;
&lt;br /&gt;
For detailed usage see here:[[BwUniCluster_2.0_Slurm_common_Features#BeeOND_.28BeeGFS_On-Demand.29|Request on-demand file system]]&lt;br /&gt;
&lt;br /&gt;
==Backup and Archiving==&lt;br /&gt;
&lt;br /&gt;
There are regular backups of all data of the home directories,whereas ACLs and extended attributes will&lt;br /&gt;
not be backuped. &lt;br /&gt;
&lt;br /&gt;
Please contact the hotline if you need backuped data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:bwUniCluster 2.0|File System]][[Category:Hardware_and_Architecture|bwUniCluster 2.0]]&lt;/div&gt;</summary>
		<author><name>H Weber</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster2.0/Slurm&amp;diff=9009</id>
		<title>BwUniCluster2.0/Slurm</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster2.0/Slurm&amp;diff=9009"/>
		<updated>2021-10-18T08:01:13Z</updated>

		<summary type="html">&lt;p&gt;H Weber: /* BeeOND (BeeGFS On-Demand) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&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 [[bwUniCluster 2.0|bwUniCluster 2.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 2.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;
If your job was submitted to the &amp;quot;multiple&amp;quot; queue you can log into the allocated nodes via SSH as soon as the job is running.&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&#039;&#039; or --constraint=&#039;&#039;BEEOND&#039;&#039;&lt;br /&gt;
| #SBATCH --constraint=BEEOND&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;
* [[BwUniCluster_2.0_Batch_Queues#sbatch_-p_queue|bwUniCluster 2.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_single -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=200gb&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=fat&#039;&#039; (with &#039;&#039;--partition=(dev_)single&#039;&#039; maximum &#039;&#039;--mem=96gb&#039;&#039; is possible):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sbatch --partition=fat 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;Because hyperthreading is switched on on bwUniCluster 2.0, the option --cpus-per-task (-c) must be set to 2*n, if you want to use n threads.&#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 40-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 single --export=ALL,OMP_NUM_THREADS=40 -J OpenMP_Test -N 1 -c 80 -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=80&lt;br /&gt;
#SBATCH --time=40:00&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}/2))&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;single&#039;&#039; as sbatch option:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sbatch -p single 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=single --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 a defined module environment related to OpenMPI is wished&lt;br /&gt;
module load mpi/openmpi/&amp;lt;placeholder_for_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 single -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 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=multiple -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;Because hyperthreading is switched on on bwUniCluster 2.0, the option --cpus-per-task (-c) must be set to 2*n, if you want to use n threads.&#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=56&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}/2))&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 multiple_e ./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 40-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=80&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}/2))&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 multiple ./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 msub_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_4 and gpu_8 queues have 4 or 8 NVIDIA Tesla V100 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 ressources 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 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=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;
Sun Mar 29 15:20:05 2020       &lt;br /&gt;
+-----------------------------------------------------------------------------+&lt;br /&gt;
| NVIDIA-SMI 440.33.01    Driver Version: 440.33.01    CUDA Version: 10.2     |&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;
|===============================+======================+======================|&lt;br /&gt;
|   0  Tesla V100-SXM2...  Off  | 00000000:3A:00.0 Off |                    0 |&lt;br /&gt;
| N/A   29C    P0    39W / 300W |      9MiB / 32510MiB |      0%      Default |&lt;br /&gt;
+-------------------------------+----------------------+----------------------+&lt;br /&gt;
|   1  Tesla V100-SXM2...  Off  | 00000000:3B:00.0 Off |                    0 |&lt;br /&gt;
| N/A   30C    P0    41W / 300W |      8MiB / 32510MiB |      0%      Default |&lt;br /&gt;
+-------------------------------+----------------------+----------------------+&lt;br /&gt;
                                                                               &lt;br /&gt;
+-----------------------------------------------------------------------------+&lt;br /&gt;
| Processes:                                                       GPU Memory |&lt;br /&gt;
|  GPU       PID   Type   Process name                             Usage      |&lt;br /&gt;
|=============================================================================|&lt;br /&gt;
|    0     14228      G   /usr/bin/X                                     8MiB |&lt;br /&gt;
|    1     14228      G   /usr/bin/X                                     8MiB |&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;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== LSDF Online Storage ====&lt;br /&gt;
On bwUniCluster 2.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 compute nodes during the job runtime with the constraint flag &amp;quot;BEEOND&amp;quot; ([[BwUniCluster_2.0_Slurm_common_Features#sbatch_Command_Parameters|Slurm Command Parameters]])&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
#SBATCH ...&lt;br /&gt;
#SBATCH --constraint=BEEOND&lt;br /&gt;
&amp;lt;/pre&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 three pre-configured directories:&lt;br /&gt;
&amp;lt;pre&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;
#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, /mnt/odfs/$SLURM_JOB_ID/stripe_16 or /mnt/odfs/$SLURM_JOB_ID/stripe_32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you request less nodes than stripe count, the stripe count will be max number of nodes, e.g., You only request 8 nodes , so the directory with stripe count 16 is basically only with a stripe count 8.&lt;br /&gt;
&lt;br /&gt;
The capacity of the private file system depends on the number of nodes. For each node you get 500Gbyte.&lt;br /&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&amp;gt;4 (4 x 500GB).  &lt;br /&gt;
&lt;br /&gt;
If you request 100 nodes for your job, the private file system is 100 * 500 Gbyte ~ 50 Tbyte (approx) capacity.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Recommendation:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The private file system is using its own metadata server. This metadata server is started on the first nodes. Depending on your application, the metadata server is consuming decent amount of CPU power. Probably adding a extra node to your job could improve the usability of the on-demand file system. Start your application with the MPI option:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mpirun -nolocal myapplication&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
With the -nolocal option the node where mpirun is initiated is not used for your application. This node is fully available for the meta data server of your requested on-demand file system.&lt;br /&gt;
&lt;br /&gt;
Example job script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
#very simple example on how to use a private on-demand file system&lt;br /&gt;
#SBATCH -N 10&lt;br /&gt;
#SBATCH --constraint=BEEOND&lt;br /&gt;
&lt;br /&gt;
#create a workspace &lt;br /&gt;
ws_allocate myresults-$SLURM_JOB_ID 90&lt;br /&gt;
RESULTDIR=`ws_find myresults-$SLURM_JOB_ID`&lt;br /&gt;
&lt;br /&gt;
#Set ENV variable to on-demand file system&lt;br /&gt;
ODFSDIR=/mnt/odfs/$SLURM_JOB_ID/stripe_16/&lt;br /&gt;
&lt;br /&gt;
#start application and write results to on-demand file system&lt;br /&gt;
mpirun -nolocal myapplication -o $ODFSDIR/results&lt;br /&gt;
&lt;br /&gt;
#Copy back data after your job application end&lt;br /&gt;
rsync -av $ODFSDIR/results $RESULTDIR&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&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;
          18088744    single CPV.sbat   ab1234 PD       0:00      1 (Priority)&lt;br /&gt;
          18098414  multiple CPV.sbat   ab1234 PD       0:00      2 (Priority) &lt;br /&gt;
          18090089  multiple CPV.sbat   ab1234  R       2:27      2 uc2n[127-128]&lt;br /&gt;
$ squeue -l&lt;br /&gt;
            JOBID PARTITION     NAME     USER    STATE       TIME TIME_LIMI  NODES NODELIST(REASON) &lt;br /&gt;
         18088654    single CPV.sbat   ab1234 COMPLETI       4:29   2:00:00      1 uc2n374&lt;br /&gt;
         18088785    single CPV.sbat   ab1234  PENDING       0:00   2:00:00      1 (Priority)&lt;br /&gt;
         18098414  multiple CPV.sbat   ab1234  PENDING       0:00   2:00:00      2 (Priority)&lt;br /&gt;
         18088683    single CPV.sbat   ab1234  RUNNING       0:14   2:00:00      1 uc2n413  &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_multiple  :      8 nodes idle&lt;br /&gt;
Partition multiple      :    332 nodes idle&lt;br /&gt;
Partition dev_single    :      4 nodes idle&lt;br /&gt;
Partition single        :     76 nodes idle&lt;br /&gt;
Partition long          :     80 nodes idle&lt;br /&gt;
Partition fat           :      5 nodes idle&lt;br /&gt;
Partition dev_special   :    342 nodes idle&lt;br /&gt;
Partition special       :    342 nodes idle&lt;br /&gt;
Partition dev_multiple_e:      7 nodes idle&lt;br /&gt;
Partition multiple_e    :    335 nodes idle&lt;br /&gt;
Partition gpu_4         :     12 nodes idle&lt;br /&gt;
Partition gpu_8         :      6 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 2.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;
          18089884  multiple CPV.sbat   bq0742  R      33:44      2 uc2n[165-166]&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 18089884&lt;br /&gt;
&lt;br /&gt;
JobId=18089884 JobName=CPV.sbatch&lt;br /&gt;
   UserId=bq0742(8946) GroupId=scc(12345) MCS_label=N/A&lt;br /&gt;
   Priority=3 Nice=0 Account=kit 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:35:06 TimeLimit=02:00:00 TimeMin=N/A&lt;br /&gt;
   SubmitTime=2020-03-16T14:14:54 EligibleTime=2020-03-16T14:14:54&lt;br /&gt;
   AccrueTime=2020-03-16T14:14:54&lt;br /&gt;
   StartTime=2020-03-16T15:12:51 EndTime=2020-03-16T17:12:51 Deadline=N/A&lt;br /&gt;
   SuspendTime=None SecsPreSuspend=0 LastSchedEval=2020-03-16T15:12:51&lt;br /&gt;
   Partition=multiple AllocNode:Sid=uc2n995:5064&lt;br /&gt;
   ReqNodeList=(null) ExcNodeList=(null)&lt;br /&gt;
   NodeList=uc2n[165-166]&lt;br /&gt;
   BatchHost=uc2n165&lt;br /&gt;
   NumNodes=2 NumCPUs=160 NumTasks=80 CPUs/Task=1 ReqB:S:C:T=0:0:*:1&lt;br /&gt;
   TRES=cpu=160,mem=96320M,node=2,billing=160&lt;br /&gt;
   Socks/Node=* NtasksPerN:B:S:C=40:0:*:1 CoreSpec=*&lt;br /&gt;
   MinCPUsNode=40 MinMemoryCPU=1204M MinTmpDiskNode=0&lt;br /&gt;
   Features=(null) DelayBoot=00:00:00&lt;br /&gt;
   OverSubscribe=NO Contiguous=0 Licenses=(null) Network=(null)&lt;br /&gt;
   Command=/pfs/data5/home/kit/scc/bq0742/git/CPV/bin/CPV.sbatch&lt;br /&gt;
   WorkDir=/pfs/data5/home/kit/scc/bq0742/git/CPV/bin&lt;br /&gt;
   StdErr=/pfs/data5/home/kit/scc/bq0742/git/CPV/bin/slurm-18089884.out&lt;br /&gt;
   StdIn=/dev/null&lt;br /&gt;
   StdOut=/pfs/data5/home/kit/scc/bq0742/git/CPV/bin/slurm-18089884.out&lt;br /&gt;
   Power=&lt;br /&gt;
   MailUser=(null) MailType=NONE&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 18089884 | grep -i State&lt;br /&gt;
   JobState=COMPLETED 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;
{| width=750px 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 msub 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 PI 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#lbAI 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;
[[Category:bwUniCluster 2.0|bwUniCluster 2.0]]&lt;br /&gt;
[[#top|Back to top]]&lt;/div&gt;</summary>
		<author><name>H Weber</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster2.0/Hardware_and_Architecture&amp;diff=9008</id>
		<title>BwUniCluster2.0/Hardware and Architecture</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster2.0/Hardware_and_Architecture&amp;diff=9008"/>
		<updated>2021-10-18T07:58:56Z</updated>

		<summary type="html">&lt;p&gt;H Weber: /* File Systems */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Architecture of bwUniCluster 2.0 =&lt;br /&gt;
&lt;br /&gt;
The bwUniCluster 2.0 is a parallel computer with distributed memory. Each node of system consists of at least two Intel Xeon processor, local memory, disks, network adapters and optionally accelerators (NVIDIA Tesla V100). All nodes are connected by a fast InfiniBand interconnect. In addition the file system&lt;br /&gt;
Lustre, that is connected by coupling the InfiniBand of the file server with the InfiniBand&lt;br /&gt;
switch of the compute cluster, is added to bwUniCluster 2.0 to provide a fast and scalable&lt;br /&gt;
parallel file system.&lt;br /&gt;
&lt;br /&gt;
The operating system on each node is Red Hat Enterprise Linux (RHEL) 7.7. A number of additional software packages like e.g. SLURM have been installed on top. Some of these components are of special interest to end users and are briefly&lt;br /&gt;
discussed in this document. Others which are of greater importance to system&lt;br /&gt;
administrators will not be covered by this document.&lt;br /&gt;
&lt;br /&gt;
The individual nodes of the system may act in different roles. According to the services supplied by the nodes, they are separated into disjoint groups. From an end users point of view the different groups of nodes are login nodes, compute nodes, file server nodes and administrative server nodes.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Login Nodes&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The login nodes are the only nodes that are directly accessible by end users. These nodes&lt;br /&gt;
are used for interactive login, file management, program development and interactive pre-&lt;br /&gt;
and postprocessing. Two nodes are dedicated to this service but they are all accessible via&lt;br /&gt;
one address and a DNS round-robin alias distributes the login sessions to the&lt;br /&gt;
different login nodes.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Compute Node&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The majority of nodes are compute nodes which are managed by a batch system. Users &lt;br /&gt;
submit their jobs to the SLURM batch system and a job is executed when the required resources become available (depending on its fair-share priority).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;File Server Nodes&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The hardware of the parallel file system Lustre incorporates some file server nodes; the file&lt;br /&gt;
system Lustre is connected by coupling the InfiniBand of the file server with the independent InfiniBand switch of the compute cluster. In addition to shared file space there is also local storage on the disks of each node (for details see chapter &amp;quot;File Systems&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Administrative Server Nodes&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Some other nodes are delivering additional services like resource management, external&lt;br /&gt;
network connection, administration etc. These nodes can be accessed directly by system administrators only.&lt;br /&gt;
&lt;br /&gt;
= Components of bwUniCluster =&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
! style=&amp;quot;width:9%&amp;quot;|&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Compute nodes &amp;quot;Thin&amp;quot;&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Compute nodes &amp;quot;HPC&amp;quot;&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Compute nodes &amp;quot;HPC Broadwell&amp;quot;&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Compute nodes &amp;quot;Fat&amp;quot;&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| GPU x4&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| GPU x8&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Login&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Number of nodes&lt;br /&gt;
| 100 + 60&lt;br /&gt;
| 360&lt;br /&gt;
| 352&lt;br /&gt;
| 6&lt;br /&gt;
| 14&lt;br /&gt;
| 10&lt;br /&gt;
| 4 + 2 (Broadwell)&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Processors&lt;br /&gt;
| Intel Xeon Gold 6230&lt;br /&gt;
| Intel Xeon Gold 6230&lt;br /&gt;
| Intel Xeon E5-2660 v4&lt;br /&gt;
| Intel Xeon Gold 6230&lt;br /&gt;
| Intel Xeon Gold 6230&lt;br /&gt;
| Intel Xeon Gold 6248&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Number of sockets&lt;br /&gt;
| 2&lt;br /&gt;
| 2&lt;br /&gt;
| 2&lt;br /&gt;
| 4&lt;br /&gt;
| 2&lt;br /&gt;
| 2&lt;br /&gt;
| 2&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Processor frequency (GHz)&lt;br /&gt;
| 2.1 Ghz&lt;br /&gt;
| 2.1 Ghz&lt;br /&gt;
| 2.0 GHz&lt;br /&gt;
| 2.1 Ghz&lt;br /&gt;
| 2.1 Ghz&lt;br /&gt;
| 2.1 Ghz&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Total number of cores&lt;br /&gt;
| 40&lt;br /&gt;
| 40&lt;br /&gt;
| 28&lt;br /&gt;
| 80&lt;br /&gt;
| 40&lt;br /&gt;
| 40&lt;br /&gt;
| 40 / 20 (Broadwell)&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Main memory&lt;br /&gt;
| 96 GB / 192 GB&lt;br /&gt;
| 96 GB&lt;br /&gt;
| 128 GB&lt;br /&gt;
| 3 TB&lt;br /&gt;
| 384 GB&lt;br /&gt;
| 768 GB&lt;br /&gt;
| 384 GB / 128 GB (Broadwell)&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Local SSD&lt;br /&gt;
| 960 GB SATA&lt;br /&gt;
| 960 GB SATA&lt;br /&gt;
| 480 GB SATA&lt;br /&gt;
| 4,8 TB NVMe&lt;br /&gt;
| 3,2 TB NVMe&lt;br /&gt;
| 6,4 TB NVMe&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Accelerators&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
| 4x NVIDIA Tesla V100&lt;br /&gt;
| 8x NVIDIA Tesla V100&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Interconnect&lt;br /&gt;
| IB HDR100 (blocking)&lt;br /&gt;
| IB HDR100&lt;br /&gt;
| IB FDR&lt;br /&gt;
| IB HDR&lt;br /&gt;
| IB HDR&lt;br /&gt;
| IB HDR&lt;br /&gt;
| IB HDR100 (blocking)&lt;br /&gt;
|}&lt;br /&gt;
Table 1: Properties of the nodes&lt;br /&gt;
&lt;br /&gt;
= File Systems =&lt;br /&gt;
&lt;br /&gt;
Details about changes on the file systems between bwUniCluster 1 and bwUniCluster 2.0 are described in the [[BwUniCluster_2.0_File_System_Migration_Guide|File system migration guide]]. Note that $WORK is deprecated.&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 2.0 the parallel file system Lustre is used for most globally visible user data. Lustre is open source and Lustre solutions and support are available from different vendors. Nowadays, most of the biggest HPC systems are using Lustre. An initial home directory on a Lustre file system is created during the first login, and the environment variable $HOME holds its name. Users can create so-called workspaces on another Lustre file system for non-permanent data with temporary lifetime.&lt;br /&gt;
&lt;br /&gt;
Within a batch job further file systems are available: &lt;br /&gt;
* The directory $TMP is only available and visible on the local node. It is located on fast SSD storage devices.&lt;br /&gt;
* On request a parallel on-demand (BeeOND) file system is created which uses the SSDs of the nodes which were allocated to the batch job.&lt;br /&gt;
* On request the external LSDF Online Storage is mounted on the nodes which were allocated to the batch job. This file system is based on the parallel file system Spectrum Scale. &lt;br /&gt;
&lt;br /&gt;
Some of the characteristics of the file systems are shown in Table 2.&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;width:100%; vertical-align:top; background:#f5fffa;border:1px solid #000000;padding:1px&amp;quot;&lt;br /&gt;
|- style=&amp;quot;width:20%;height=20px; text-align:left;padding:3px&amp;quot;&lt;br /&gt;
! style=&amp;quot;background-color:#AAA;padding:3px&amp;quot;| Property&lt;br /&gt;
! style=&amp;quot;background-color:#AAA;padding:3px&amp;quot;| $TMP&lt;br /&gt;
! style=&amp;quot;background-color:#AAA;padding:3px&amp;quot;| BeeOND&lt;br /&gt;
! style=&amp;quot;background-color:#AAA;padding:3px&amp;quot;| $HOME&lt;br /&gt;
! style=&amp;quot;background-color:#AAA;padding:3px&amp;quot;| Workspace&lt;br /&gt;
|- &lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Visibility &lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| local node&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| nodes of batch job&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| global&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| global&lt;br /&gt;
|- &lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Lifetime &lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| batch job runtime&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| batch job runtime&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| permanent&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| max. 240 days&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Disk space &lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 960 GB - 6.4 TB &amp;lt;br&amp;gt; details see table 1&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| n*500 GB&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 1.2 PiB&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 4.1 PiB&lt;br /&gt;
|- &lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Capacity Quotas&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| no&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| no&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| yes &amp;lt;br&amp;gt; 1 TiB per user &amp;lt;br&amp;gt; also per organization&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| yes &amp;lt;br&amp;gt; 40 TiB per user&lt;br /&gt;
|- &lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Inode Quotas&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| no&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| no&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| yes &amp;lt;br&amp;gt; 10 million per user&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| yes &amp;lt;br&amp;gt; 30 million per user&lt;br /&gt;
|- &lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Backup&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| no&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| no&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| yes&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| no&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Read perf./node&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 500 MB/s - 6 GB/s &amp;lt;br&amp;gt; depends on type of local SSD / job queue: &amp;lt;br&amp;gt; 520 MB/s @ single / multiple &amp;lt;br&amp;gt; 800 MB/s @ multiple_e &amp;lt;br&amp;gt; 6600 MB/s @ fat &amp;lt;br&amp;gt; 6500 MB/s @ gpu_4 &amp;lt;br&amp;gt; 6500 MB/s @ gpu_8&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 400 MB/s - 500 MB/s&amp;lt;br&amp;gt; depends on type of local SSDs / job queue: &amp;lt;br&amp;gt; 500 MB/s @ multiple &amp;lt;br&amp;gt; 400 MB/s @ multiple_e&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 1 GB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 1 GB/s&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Write perf./node&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 500 MB/s - 4 GB/s &amp;lt;br&amp;gt; depends on type of local SSD / job queue: &amp;lt;br&amp;gt; 500 MB/s @ single / multiple &amp;lt;br&amp;gt; 650 MB/s @ multiple_e &amp;lt;br&amp;gt; 2900 MB/s @ fat &amp;lt;br&amp;gt; 2090 MB/s @ gpu_4 &amp;lt;br&amp;gt; 4060 MB/s @ gpu_8&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 250 MB/s - 350 MB/s &amp;lt;br&amp;gt; depends on type of local SSDs / job queue: &amp;lt;br&amp;gt; 350 MB/s @ multiple &amp;lt;br&amp;gt; 250 MB/s @ multiple_e&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 1 GB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 1 GB/s&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Total read perf.&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| n*500-6000 MB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| n*400-500 MB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 18 GB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 54 GB/s&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Total write perf.&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| n*500-4000 MB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| n*250-350 MB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 18 GB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 54 GB/s&lt;br /&gt;
|}&lt;br /&gt;
---------------------------------------------------------------------------------------------------------&lt;br /&gt;
  global: all nodes of uc1 access the same file system;&lt;br /&gt;
  local: each node has its own file system;&lt;br /&gt;
  permanent: files are stored permanently;&lt;br /&gt;
  batch job: files are removed at end of the batch job.&lt;br /&gt;
---------------------------------------------------------------------------------------------------------&lt;br /&gt;
Table 2: Properties of the file systems&lt;br /&gt;
&lt;br /&gt;
== Selecting the appropriate file system ==&lt;br /&gt;
&lt;br /&gt;
In general, you should separate your data and store it on the appropriate file system.&lt;br /&gt;
Permanently needed data like software or important results should be stored below $HOME&lt;br /&gt;
but capacity restrictions (quotas) apply. In case you accidentally deleted data on $HOME&lt;br /&gt;
you can usually restore it from backup. Permanent data which is not needed for months&lt;br /&gt;
or exceeds the capacity restrictions should be sent to the LSDF Online Storage &lt;br /&gt;
or to the archive and deleted from the file systems. Temporary data which is only needed on a single&lt;br /&gt;
node and which does not exceed the disk space shown in the table above should be stored&lt;br /&gt;
below $TMP. Temporary data which is only needed during job runs should be stored on a &lt;br /&gt;
parallel on-demand file system. Temporary data which can be recomputed or which is the &lt;br /&gt;
result of one job and input for another job should be stored below in workspaces. The lifetime &lt;br /&gt;
of data in workspaces is limited and depends on the lifetime of the workspace which can be &lt;br /&gt;
several months.&lt;br /&gt;
&lt;br /&gt;
For further details please check the chapters below.&lt;br /&gt;
&lt;br /&gt;
== $HOME ==&lt;br /&gt;
&lt;br /&gt;
The home directories of bwUniCluster 2.0 (uc2) users are located in the parallel file system Lustre.&lt;br /&gt;
You have access to your home directory from all nodes of uc2. A regular backup of these directories &lt;br /&gt;
to tape archive is done automatically. The directory $HOME is used to hold those files that are&lt;br /&gt;
permanently used like source codes, configuration files, executable programs etc. &lt;br /&gt;
&lt;br /&gt;
On uc2 there is a default user quota limit of 1 TiB and 10 million inodes (files and directories) per user. &lt;br /&gt;
You can chek your current usage and limits with the command&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ lfs quota -uh $(whoami) $HOME&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In addition to the user limit there is a limit of your organization (e.g. university) which depends on the financial share. This limit is enforced with so-called Lustre project quotas. You can show the current usage and limits of your organization with the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
lfs quota -ph $(grep $(echo $HOME | sed -e &amp;quot;s|/[^/]*/[^/]*$||&amp;quot;) /pfs/data5/project_ids.txt | cut -f 1 -d\ ) $HOME&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Workspaces ==&lt;br /&gt;
&lt;br /&gt;
On uc2 workspaces can be used to store large non-permanent data sets, e.g. restart files or output&lt;br /&gt;
data that has to be post-processed. The file system used for workspaces is also the parallel file system Lustre. This file system is especially designed for parallel access and for a high throughput to large&lt;br /&gt;
files. It is able to provide high data transfer rates of up to 54 GB/s write and read performance when data access is parallel. &lt;br /&gt;
&lt;br /&gt;
Workspaces have a lifetime and the data on a workspace expires as a whole after a fixed period. The maximum lifetime of a workspace is 60 days, but it can be renewed at the end of that period 3 times to a total maximum of 240 days after workspace generation. If a workspace has inadvertently expired we can restore the data during a limited time (few weeks). In this case you should create a new workspace and report the name of the new and of the expired workspace in a ticket or in an email to the hotline.&lt;br /&gt;
&lt;br /&gt;
Creating, deleting, finding and extending workspaces is explained on the  [[workspace]] page.&lt;br /&gt;
&lt;br /&gt;
On uc2 there is a default user quota limit of 40 TiB and 30 million inodes (files and directories) per user. &lt;br /&gt;
You can chek your current usage and limits with the command&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ lfs quota -uh $(whoami) /pfs/work7&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Reminder for workspace deletion ===&lt;br /&gt;
&lt;br /&gt;
Normally you will get an email every day starting 7 days before a workspace expires. You can send yourself a calender entry which reminds you when a workspace will be automatically deleted:&lt;br /&gt;
&lt;br /&gt;
 $ ws_send_ical.sh &amp;lt;workspace&amp;gt; &amp;lt;email&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Improving Performance on $HOME and workspaces ==&lt;br /&gt;
&lt;br /&gt;
The following recommendations might help to improve throughput and metadata&lt;br /&gt;
performance on Lustre filesystems.&lt;br /&gt;
&lt;br /&gt;
=== &#039;&#039;&#039;Improving Throughput Performance&#039;&#039;&#039; ===&lt;br /&gt;
&lt;br /&gt;
Depending on your application some adaptations might be necessary if you want to reach&lt;br /&gt;
the full bandwidth of the filesystems. Parallel filesystems typically stripe files over storage subsystems, i.e. large files are separated into stripes and distributed to different storage subsystems. In Lustre, the size of these stripes (sometimes also mentioned as chunks) is called stripe size and the number of used storage subsystems is called stripe count.&lt;br /&gt;
&lt;br /&gt;
When you are designing your application you should consider that the performance of&lt;br /&gt;
parallel filesystems is generally better if data is transferred in large blocks and stored in&lt;br /&gt;
few large files. In more detail, to increase throughput performance of a parallel application&lt;br /&gt;
following aspects should be considered:&lt;br /&gt;
&lt;br /&gt;
* collect large chunks of data and write them sequentially at once,&lt;br /&gt;
&lt;br /&gt;
* to exploit complete filesystem bandwidth use several clients,&lt;br /&gt;
&lt;br /&gt;
* avoid competitive file access by different tasks or use blocks with boundaries at stripe size (default is 1MB),&lt;br /&gt;
&lt;br /&gt;
* if files are small enough for the SSDs and are only used by one process store them on $TMP.&lt;br /&gt;
&lt;br /&gt;
With previous Lustre versions adapting the Lustre stripe count was the most important optimization. However, for the workspaces of uc2 the new Lustre feature Progressive File Layouts has been used to define file striping parameters. This means that the stripe count is adapted if the file size is growing. In normal cases users no longer need to adapt file striping parameters in case they have very huge files or in order to reach better performance. &lt;br /&gt;
&lt;br /&gt;
If you know what you are doing you can still change striping parameters, e.g. the stripe count, of a directory and of newly created files. New files and directories inherit the stripe count from the parent directory. E.g. if you want to enhance throughput on a single very large file which is created in the directory $HOME/my_output_dir you can use the command&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ lfs setstripe -c-1 $HOME/my_output_dir&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
to change the stripe count to -1 which means that all storage subsystems of the file system are used to store that file. If you change the stripe count of a directory the stripe count of existing files inside this&lt;br /&gt;
directory is not changed. If you want to change the stripe count of existing files, change&lt;br /&gt;
the stripe count of the parent directory, copy the files to new files, remove the old files&lt;br /&gt;
and move the new files back to the old name. In order to check the stripe setting of&lt;br /&gt;
the file my_file use&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ lfs getstripe my_file&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Also note that changes on the striping parameters (e.g. stripe count) are not saved in the&lt;br /&gt;
backup, i.e. if directories have to be recreated this information is lost and the default stripe&lt;br /&gt;
count will be used. Therefore, you should annotate for which directories you made changes&lt;br /&gt;
to the striping parameters so that you can repeat these changes if required.&lt;br /&gt;
&lt;br /&gt;
=== &#039;&#039;&#039;Improving Metadata Performance&#039;&#039;&#039; ===&lt;br /&gt;
&lt;br /&gt;
Metadata performance on parallel file systems is usually not as good as with local&lt;br /&gt;
filesystems. In addition, it is usually not scalable, i.e. a limited resource. Therefore,&lt;br /&gt;
you should omit metadata operations whenever possible. For example, it is much better&lt;br /&gt;
to have few large files than lots of small files. In more detail, to increase metadata&lt;br /&gt;
performance of a parallel application following aspects should be considered:&lt;br /&gt;
&lt;br /&gt;
* avoid creating many small files,&lt;br /&gt;
&lt;br /&gt;
* avoid competitive directory access, e.g. by creating files in separate subdirectories for each task,&lt;br /&gt;
&lt;br /&gt;
* if many small files are only used within a batch job and accessed by one process store them on $TMP,&lt;br /&gt;
&lt;br /&gt;
* change the default colorization setting of the command ls (see below).&lt;br /&gt;
&lt;br /&gt;
On modern Linux systems, the GNU ls command often uses colorization by default to&lt;br /&gt;
visually highlight the file type; this is especially true if the command is run within a terminal&lt;br /&gt;
session. This is because the default shell profile initializations usually contain an alias&lt;br /&gt;
directive similar to the following for the ls command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ alias ls=&amp;quot;ls --color=tty&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
However, running the ls command in this way for files on a Lustre file system requires&lt;br /&gt;
a stat() call to be used to determine the file type. This can result in a performance&lt;br /&gt;
overhead, because the stat() call always needs to determine the size of a file, and that&lt;br /&gt;
in turn means that the client node must query the object size of all the backing objects&lt;br /&gt;
that make up a file. As a result of the default colorization setting, running a simple&lt;br /&gt;
ls command on a Lustre file system often takes as much time as running the ls command&lt;br /&gt;
with the -l option (the same is true if the -F, -p, or the -classify option, or any other option &lt;br /&gt;
that requires information from a stat() call, is used). To avoid this performance overhead&lt;br /&gt;
when using ls commands, add an alias directive similar to the following&lt;br /&gt;
to your shell startup script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ alias ls=&amp;quot;ls --color=never&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== $TMP ==&lt;br /&gt;
&lt;br /&gt;
While all tasks of a parallel application access the same $HOME and workspace directory, the &lt;br /&gt;
$TMP directory is local to each node on bwUniCluster 2.0. Different tasks of a parallel&lt;br /&gt;
application use different directories when they do not utilize one node. This directory should&lt;br /&gt;
be used for temporary files being accessed by single tasks. All nodes have fast SSDs &lt;br /&gt;
local storage devices which are used to store data below $TMP. &lt;br /&gt;
In addition, this directory should be used for the installation&lt;br /&gt;
of software packages. This means that the software package to be installed should be&lt;br /&gt;
unpacked, compiled and linked in a subdirectory of $TMP. The real installation of the&lt;br /&gt;
package (e.g. make install) should be made in(to) the Lustre filesystem. &lt;br /&gt;
&lt;br /&gt;
Each time a batch&lt;br /&gt;
job is started, a subdirectory is created on each node and assigned to the job. $TMP is newly&lt;br /&gt;
set; the name of the subdirectory contains the Job-id and the starting time so that the&lt;br /&gt;
subdirectory name is unique for each job. This unique name is then assigned to the&lt;br /&gt;
environment variable $TMP within the job. At the end of the job the subdirectory is removed.&lt;br /&gt;
&lt;br /&gt;
== LSDF Online Storage==&lt;br /&gt;
&lt;br /&gt;
In some cases it is useful to have access to the LSDF Online Storage on the HPC-Clusters also. Therefore the LSDF Online Storage is mounted on the Login- and Datamover-Nodes.&lt;br /&gt;
Furthermore it can be used on the compute nodes during the job runtime with the constraint flag &amp;quot;LSDF&amp;quot; ([[bwUniCluster_2.0_Slurm_common_Features|Slurm common features]]&lt;br /&gt;
). There is also an example about the LSDF batch usage: [[bwUniCluster_2.0_Slurm_common_Features#LSDF_Online_Storage|Slurm LSDF example ]] .&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
#SBATCH ...&lt;br /&gt;
#SBATCH --constraint=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 the following environment variables are available: $LSDF, $LSDFPROJECTS, $LSDFHOME.&lt;br /&gt;
Please request storage projects in the LSDF Online Storage seperately:&lt;br /&gt;
[https://www.lsdf.kit.edu/os/storagerequest/: LSDF Storage Request].&lt;br /&gt;
&lt;br /&gt;
==BeeOND (BeeGFS On-Demand)==&lt;br /&gt;
&lt;br /&gt;
Users of the HPC-Cluster have possibility to request a private BeeOND (BeeGFS) parallel filesystem for each job. The file system is created during job startup and purged after your job.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;IMPORTANT: All data on the private filesystem will be deleted after your job. Make sure you have copied your data back to the global filesystem (within job), e.g., $HOME or any workspace.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
BeeOND/BeeGFS can be used like any other parallel file system. Tools like cp or rsync can be used to copy data in and out. This feature is currently under BETA. If you encounter any problems or have questions, please contact bwUniCluster-hotline@lists.kit.edu&lt;br /&gt;
&lt;br /&gt;
For detailed usage see here:[[BwUniCluster_2.0_Slurm_common_Features#BeeOND_.28BeeGFS_On-Demand.29|Request on-demand file system]]&lt;br /&gt;
&lt;br /&gt;
==Backup and Archiving==&lt;br /&gt;
&lt;br /&gt;
There are regular backups of all data of the home directories,whereas ACLs and extended attributes will&lt;br /&gt;
not be backuped. &lt;br /&gt;
&lt;br /&gt;
Please contact the hotline if you need backuped data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:bwUniCluster 2.0|File System]][[Category:Hardware_and_Architecture|bwUniCluster 2.0]]&lt;/div&gt;</summary>
		<author><name>H Weber</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster2.0/Slurm&amp;diff=6133</id>
		<title>BwUniCluster2.0/Slurm</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster2.0/Slurm&amp;diff=6133"/>
		<updated>2020-03-19T12:06:16Z</updated>

		<summary type="html">&lt;p&gt;H Weber: /* BeeOND (BeeGFS On-Demand) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&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 [[bwUniCluster 2.0|bwUniCluster 2.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 2.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;
If your job was submitted to the &amp;quot;multiple&amp;quot; queue you can log into the allocated nodes via SSH as soon as the job is running.&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 to the submission environment instead of &amp;lt;br&amp;gt; replacing it 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;
| -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&#039;&#039; or --constraint=&#039;&#039;BEEOND&#039;&#039;&lt;br /&gt;
| #SBATCH --constraint=BEEOND&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;
* [[BwUniCluster_2.0_Batch_Queues#sbatch_-p_queue|bwUniCluster 2.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_single -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=200gb&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=fat&#039;&#039; (with &#039;&#039;--partition=(dev_)single&#039;&#039; maximum &#039;&#039;--mem=96gb&#039;&#039; is possible):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sbatch --partition=fat 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;
To submit a batch job called &#039;&#039;OpenMP_Test&#039;&#039; that runs a 40-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 single --export=ALL,OMP_NUM_THREADS=40 -J OpenMP_Test -N 1 -c 40 -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=40&lt;br /&gt;
#SBATCH --time=40:00&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;single&#039;&#039; as sbatch option:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sbatch -p single 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=single --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 a defined module environment related to OpenMPI is wished&lt;br /&gt;
module load mpi/openmpi/&amp;lt;placeholder_for_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 single -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 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=multiple -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.&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 --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 MPIRUN_OPTIONS=&amp;quot;--bind-to core --map-by socket:PE=${SLURM_CPUS_PER_TASK} -report-bindings&amp;quot;&lt;br /&gt;
export OMP_NUM_THREADS=${SLURM_CPUS_PER_TASK}&lt;br /&gt;
export NUM_CORES=${SLURM_NTASKS}*${SLURM_CPUS_PER_TASK}&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 multiple_e ./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 40-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=40&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 multiple ./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 msub_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;
==== LSDF Online Storage ====&lt;br /&gt;
On bwUniCluster 2.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 compute nodes during the job runtime with the constraint flag &amp;quot;BEEOND&amp;quot; ([[BwUniCluster_2.0_Slurm_common_Features#sbatch_Command_Parameters|Slurm Command Parameters]])&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
#SBATCH ...&lt;br /&gt;
#SBATCH --constraint=BEEOND&lt;br /&gt;
&amp;lt;/pre&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 three pre-configured directories:&lt;br /&gt;
&amp;lt;pre&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;
#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, /mnt/odfs/$SLURM_JOB_ID/stripe_16 or /mnt/odfs/$SLURM_JOB_ID/stripe_32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you request less nodes than stripe count, the stripe count will be max number of nodes, e.g., You only request 8 nodes , so the directory with stripe count 16 is basically only with a stripe count 8.&lt;br /&gt;
&lt;br /&gt;
The capacity of the private file system depends on the number of nodes. For each node you get 250Gbyte.&lt;br /&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&amp;gt;4 (4 x 250GB).  &lt;br /&gt;
&lt;br /&gt;
If you request 100 nodes for your job, the private file system is 100 * 250 Gbyte ~ 25 Tbyte (approx) capacity.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Recommendation:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The private file system is using its own metadata server. This metadata server is started on the first nodes. Depending on your application, the metadata server is consuming decent amount of CPU power. Probably adding a extra node to your job could improve the usability of the on-demand file system. Start your application with the MPI option:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mpirun -nolocal myapplication&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
With the -nolocal option the node where mpirun is initiated is not used for your application. This node is fully available for the meta data server of your requested on-demand file system.&lt;br /&gt;
&lt;br /&gt;
Example job script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
#very simple example on how to use a private on-demand file system&lt;br /&gt;
#SBATCH -N 10&lt;br /&gt;
#SBATCH --constraint=BEEOND&lt;br /&gt;
&lt;br /&gt;
#create a workspace &lt;br /&gt;
ws_allocate myresults-$SLURM_JOB_ID 90&lt;br /&gt;
RESULTDIR=`ws_find myresults-$SLURM_JOB_ID`&lt;br /&gt;
&lt;br /&gt;
#Set ENV variable to on-demand file system&lt;br /&gt;
ODFSDIR=/mnt/odfs/$SLURM_JOB_ID/stripe_16/&lt;br /&gt;
&lt;br /&gt;
#start application and write results to on-demand file system&lt;br /&gt;
mpirun -nolocal myapplication -o $ODFSDIR/results&lt;br /&gt;
&lt;br /&gt;
#Copy back data after your job application end&lt;br /&gt;
rsync -av $ODFSDIR/results $RESULTDIR&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&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;
          18088744    single CPV.sbat   ab1234 PD       0:00      1 (Priority)&lt;br /&gt;
          18098414  multiple CPV.sbat   ab1234 PD       0:00      2 (Priority) &lt;br /&gt;
          18090089  multiple CPV.sbat   ab1234  R       2:27      2 uc2n[127-128]&lt;br /&gt;
$ squeue -l&lt;br /&gt;
            JOBID PARTITION     NAME     USER    STATE       TIME TIME_LIMI  NODES NODELIST(REASON) &lt;br /&gt;
         18088654    single CPV.sbat   ab1234 COMPLETI       4:29   2:00:00      1 uc2n374&lt;br /&gt;
         18088785    single CPV.sbat   ab1234  PENDING       0:00   2:00:00      1 (Priority)&lt;br /&gt;
         18098414  multiple CPV.sbat   ab1234  PENDING       0:00   2:00:00      2 (Priority)&lt;br /&gt;
         18088683    single CPV.sbat   ab1234  RUNNING       0:14   2:00:00      1 uc2n413  &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_multiple  :      8 nodes idle&lt;br /&gt;
Partition multiple      :    332 nodes idle&lt;br /&gt;
Partition dev_single    :      4 nodes idle&lt;br /&gt;
Partition single        :     76 nodes idle&lt;br /&gt;
Partition long          :     80 nodes idle&lt;br /&gt;
Partition fat           :      5 nodes idle&lt;br /&gt;
Partition dev_special   :    342 nodes idle&lt;br /&gt;
Partition special       :    342 nodes idle&lt;br /&gt;
Partition dev_multiple_e:      7 nodes idle&lt;br /&gt;
Partition multiple_e    :    335 nodes idle&lt;br /&gt;
Partition gpu_4         :     12 nodes idle&lt;br /&gt;
Partition gpu_8         :      6 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 2.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;
          18089884  multiple CPV.sbat   bq0742  R      33:44      2 uc2n[165-166]&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 18089884&lt;br /&gt;
&lt;br /&gt;
JobId=18089884 JobName=CPV.sbatch&lt;br /&gt;
   UserId=bq0742(8946) GroupId=scc(12345) MCS_label=N/A&lt;br /&gt;
   Priority=3 Nice=0 Account=kit 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:35:06 TimeLimit=02:00:00 TimeMin=N/A&lt;br /&gt;
   SubmitTime=2020-03-16T14:14:54 EligibleTime=2020-03-16T14:14:54&lt;br /&gt;
   AccrueTime=2020-03-16T14:14:54&lt;br /&gt;
   StartTime=2020-03-16T15:12:51 EndTime=2020-03-16T17:12:51 Deadline=N/A&lt;br /&gt;
   SuspendTime=None SecsPreSuspend=0 LastSchedEval=2020-03-16T15:12:51&lt;br /&gt;
   Partition=multiple AllocNode:Sid=uc2n995:5064&lt;br /&gt;
   ReqNodeList=(null) ExcNodeList=(null)&lt;br /&gt;
   NodeList=uc2n[165-166]&lt;br /&gt;
   BatchHost=uc2n165&lt;br /&gt;
   NumNodes=2 NumCPUs=160 NumTasks=80 CPUs/Task=1 ReqB:S:C:T=0:0:*:1&lt;br /&gt;
   TRES=cpu=160,mem=96320M,node=2,billing=160&lt;br /&gt;
   Socks/Node=* NtasksPerN:B:S:C=40:0:*:1 CoreSpec=*&lt;br /&gt;
   MinCPUsNode=40 MinMemoryCPU=1204M MinTmpDiskNode=0&lt;br /&gt;
   Features=(null) DelayBoot=00:00:00&lt;br /&gt;
   OverSubscribe=NO Contiguous=0 Licenses=(null) Network=(null)&lt;br /&gt;
   Command=/pfs/data5/home/kit/scc/bq0742/git/CPV/bin/CPV.sbatch&lt;br /&gt;
   WorkDir=/pfs/data5/home/kit/scc/bq0742/git/CPV/bin&lt;br /&gt;
   StdErr=/pfs/data5/home/kit/scc/bq0742/git/CPV/bin/slurm-18089884.out&lt;br /&gt;
   StdIn=/dev/null&lt;br /&gt;
   StdOut=/pfs/data5/home/kit/scc/bq0742/git/CPV/bin/slurm-18089884.out&lt;br /&gt;
   Power=&lt;br /&gt;
   MailUser=(null) MailType=NONE&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 18089884 | grep -i State&lt;br /&gt;
   JobState=COMPLETED 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;
{| width=750px 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 msub 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 PI 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#lbAI 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;
[[Category:bwUniCluster 2.0|bwUniCluster 2.0]]&lt;br /&gt;
[[#top|Back to top]]&lt;/div&gt;</summary>
		<author><name>H Weber</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster2.0/Slurm&amp;diff=6132</id>
		<title>BwUniCluster2.0/Slurm</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster2.0/Slurm&amp;diff=6132"/>
		<updated>2020-03-19T12:04:48Z</updated>

		<summary type="html">&lt;p&gt;H Weber: /* BeeOND (BeeGFS On-Demand) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&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 [[bwUniCluster 2.0|bwUniCluster 2.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 2.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;
If your job was submitted to the &amp;quot;multiple&amp;quot; queue you can log into the allocated nodes via SSH as soon as the job is running.&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 to the submission environment instead of &amp;lt;br&amp;gt; replacing it 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;
| -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&#039;&#039; or --constraint=&#039;&#039;BEEOND&#039;&#039;&lt;br /&gt;
| #SBATCH --constraint=BEEOND&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;
* [[BwUniCluster_2.0_Batch_Queues#sbatch_-p_queue|bwUniCluster 2.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_single -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=200gb&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=fat&#039;&#039; (with &#039;&#039;--partition=(dev_)single&#039;&#039; maximum &#039;&#039;--mem=96gb&#039;&#039; is possible):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sbatch --partition=fat 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;
To submit a batch job called &#039;&#039;OpenMP_Test&#039;&#039; that runs a 40-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 single --export=ALL,OMP_NUM_THREADS=40 -J OpenMP_Test -N 1 -c 40 -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=40&lt;br /&gt;
#SBATCH --time=40:00&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;single&#039;&#039; as sbatch option:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sbatch -p single 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=single --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 a defined module environment related to OpenMPI is wished&lt;br /&gt;
module load mpi/openmpi/&amp;lt;placeholder_for_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 single -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 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=multiple -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.&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 --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 MPIRUN_OPTIONS=&amp;quot;--bind-to core --map-by socket:PE=${SLURM_CPUS_PER_TASK} -report-bindings&amp;quot;&lt;br /&gt;
export OMP_NUM_THREADS=${SLURM_CPUS_PER_TASK}&lt;br /&gt;
export NUM_CORES=${SLURM_NTASKS}*${SLURM_CPUS_PER_TASK}&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 multiple_e ./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 40-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=40&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 multiple ./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 msub_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;
==== LSDF Online Storage ====&lt;br /&gt;
On bwUniCluster 2.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 compute nodes during the job runtime with the constraint flag &amp;quot;BEEOND&amp;quot; ([[ForHLR_-_SLURM_Batch_Jobs#sbatch_Command_Parameters|Slurm Command Parameters]])&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
#SBATCH ...&lt;br /&gt;
#SBATCH --constraint=BEEOND&lt;br /&gt;
&amp;lt;/pre&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 three pre-configured directories:&lt;br /&gt;
&amp;lt;pre&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;
#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, /mnt/odfs/$SLURM_JOB_ID/stripe_16 or /mnt/odfs/$SLURM_JOB_ID/stripe_32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you request less nodes than stripe count, the stripe count will be max number of nodes, e.g., You only request 8 nodes , so the directory with stripe count 16 is basically only with a stripe count 8.&lt;br /&gt;
&lt;br /&gt;
The capacity of the private file system depends on the number of nodes. For each node you get 250Gbyte.&lt;br /&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&amp;gt;4 (4 x 250GB).  &lt;br /&gt;
&lt;br /&gt;
If you request 100 nodes for your job, the private file system is 100 * 250 Gbyte ~ 25 Tbyte (approx) capacity.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Recommendation:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The private file system is using its own metadata server. This metadata server is started on the first nodes. Depending on your application, the metadata server is consuming decent amount of CPU power. Probably adding a extra node to your job could improve the usability of the on-demand file system. Start your application with the MPI option:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mpirun -nolocal myapplication&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
With the -nolocal option the node where mpirun is initiated is not used for your application. This node is fully available for the meta data server of your requested on-demand file system.&lt;br /&gt;
&lt;br /&gt;
Example job script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
#very simple example on how to use a private on-demand file system&lt;br /&gt;
#SBATCH -N 10&lt;br /&gt;
#SBATCH --constraint=BEEOND&lt;br /&gt;
&lt;br /&gt;
#create a workspace &lt;br /&gt;
ws_allocate myresults-$SLURM_JOB_ID 90&lt;br /&gt;
RESULTDIR=`ws_find myresults-$SLURM_JOB_ID`&lt;br /&gt;
&lt;br /&gt;
#Set ENV variable to on-demand file system&lt;br /&gt;
ODFSDIR=/mnt/odfs/$SLURM_JOB_ID/stripe_16/&lt;br /&gt;
&lt;br /&gt;
#start application and write results to on-demand file system&lt;br /&gt;
mpirun -nolocal myapplication -o $ODFSDIR/results&lt;br /&gt;
&lt;br /&gt;
#Copy back data after your job application end&lt;br /&gt;
rsync -av $ODFSDIR/results $RESULTDIR&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&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;
          18088744    single CPV.sbat   ab1234 PD       0:00      1 (Priority)&lt;br /&gt;
          18098414  multiple CPV.sbat   ab1234 PD       0:00      2 (Priority) &lt;br /&gt;
          18090089  multiple CPV.sbat   ab1234  R       2:27      2 uc2n[127-128]&lt;br /&gt;
$ squeue -l&lt;br /&gt;
            JOBID PARTITION     NAME     USER    STATE       TIME TIME_LIMI  NODES NODELIST(REASON) &lt;br /&gt;
         18088654    single CPV.sbat   ab1234 COMPLETI       4:29   2:00:00      1 uc2n374&lt;br /&gt;
         18088785    single CPV.sbat   ab1234  PENDING       0:00   2:00:00      1 (Priority)&lt;br /&gt;
         18098414  multiple CPV.sbat   ab1234  PENDING       0:00   2:00:00      2 (Priority)&lt;br /&gt;
         18088683    single CPV.sbat   ab1234  RUNNING       0:14   2:00:00      1 uc2n413  &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_multiple  :      8 nodes idle&lt;br /&gt;
Partition multiple      :    332 nodes idle&lt;br /&gt;
Partition dev_single    :      4 nodes idle&lt;br /&gt;
Partition single        :     76 nodes idle&lt;br /&gt;
Partition long          :     80 nodes idle&lt;br /&gt;
Partition fat           :      5 nodes idle&lt;br /&gt;
Partition dev_special   :    342 nodes idle&lt;br /&gt;
Partition special       :    342 nodes idle&lt;br /&gt;
Partition dev_multiple_e:      7 nodes idle&lt;br /&gt;
Partition multiple_e    :    335 nodes idle&lt;br /&gt;
Partition gpu_4         :     12 nodes idle&lt;br /&gt;
Partition gpu_8         :      6 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 2.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;
          18089884  multiple CPV.sbat   bq0742  R      33:44      2 uc2n[165-166]&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 18089884&lt;br /&gt;
&lt;br /&gt;
JobId=18089884 JobName=CPV.sbatch&lt;br /&gt;
   UserId=bq0742(8946) GroupId=scc(12345) MCS_label=N/A&lt;br /&gt;
   Priority=3 Nice=0 Account=kit 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:35:06 TimeLimit=02:00:00 TimeMin=N/A&lt;br /&gt;
   SubmitTime=2020-03-16T14:14:54 EligibleTime=2020-03-16T14:14:54&lt;br /&gt;
   AccrueTime=2020-03-16T14:14:54&lt;br /&gt;
   StartTime=2020-03-16T15:12:51 EndTime=2020-03-16T17:12:51 Deadline=N/A&lt;br /&gt;
   SuspendTime=None SecsPreSuspend=0 LastSchedEval=2020-03-16T15:12:51&lt;br /&gt;
   Partition=multiple AllocNode:Sid=uc2n995:5064&lt;br /&gt;
   ReqNodeList=(null) ExcNodeList=(null)&lt;br /&gt;
   NodeList=uc2n[165-166]&lt;br /&gt;
   BatchHost=uc2n165&lt;br /&gt;
   NumNodes=2 NumCPUs=160 NumTasks=80 CPUs/Task=1 ReqB:S:C:T=0:0:*:1&lt;br /&gt;
   TRES=cpu=160,mem=96320M,node=2,billing=160&lt;br /&gt;
   Socks/Node=* NtasksPerN:B:S:C=40:0:*:1 CoreSpec=*&lt;br /&gt;
   MinCPUsNode=40 MinMemoryCPU=1204M MinTmpDiskNode=0&lt;br /&gt;
   Features=(null) DelayBoot=00:00:00&lt;br /&gt;
   OverSubscribe=NO Contiguous=0 Licenses=(null) Network=(null)&lt;br /&gt;
   Command=/pfs/data5/home/kit/scc/bq0742/git/CPV/bin/CPV.sbatch&lt;br /&gt;
   WorkDir=/pfs/data5/home/kit/scc/bq0742/git/CPV/bin&lt;br /&gt;
   StdErr=/pfs/data5/home/kit/scc/bq0742/git/CPV/bin/slurm-18089884.out&lt;br /&gt;
   StdIn=/dev/null&lt;br /&gt;
   StdOut=/pfs/data5/home/kit/scc/bq0742/git/CPV/bin/slurm-18089884.out&lt;br /&gt;
   Power=&lt;br /&gt;
   MailUser=(null) MailType=NONE&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 18089884 | grep -i State&lt;br /&gt;
   JobState=COMPLETED 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;
{| width=750px 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 msub 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 PI 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#lbAI 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;
[[Category:bwUniCluster 2.0|bwUniCluster 2.0]]&lt;br /&gt;
[[#top|Back to top]]&lt;/div&gt;</summary>
		<author><name>H Weber</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster2.0/Hardware_and_Architecture&amp;diff=6131</id>
		<title>BwUniCluster2.0/Hardware and Architecture</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster2.0/Hardware_and_Architecture&amp;diff=6131"/>
		<updated>2020-03-19T11:52:42Z</updated>

		<summary type="html">&lt;p&gt;H Weber: /* BeeOND (BeeGFS On-Demand) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Architecture of bwUniCluster 2.0 =&lt;br /&gt;
&lt;br /&gt;
The bwUniCluster 2.0 is a parallel computer with distributed memory. Each node of system consists of at least two Intel Xeon processor, local memory, disks, network adapters and optionally accelerators (NVIDIA Tesla V100). All nodes are connected by a fast InfiniBand interconnect. In addition the file system&lt;br /&gt;
Lustre, that is connected by coupling the InfiniBand of the file server with the InfiniBand&lt;br /&gt;
switch of the compute cluster, is added to bwUniCluster 2.0 to provide a fast and scalable&lt;br /&gt;
parallel file system.&lt;br /&gt;
&lt;br /&gt;
The operating system on each node is Red Hat Enterprise Linux (RHEL) 7.7. A number of additional software packages like e.g. SLURM have been installed on top. Some of these components are of special interest to end users and are briefly&lt;br /&gt;
discussed in this document. Others which are of greater importance to system&lt;br /&gt;
administrators will not be covered by this document.&lt;br /&gt;
&lt;br /&gt;
The individual nodes of the system may act in different roles. According to the services supplied by the nodes, they are separated into disjoint groups. From an end users point of view the different groups of nodes are login nodes, compute nodes, file server nodes and administrative server nodes.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Login Nodes&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The login nodes are the only nodes that are directly accessible by end users. These nodes&lt;br /&gt;
are used for interactive login, file management, program development and interactive pre-&lt;br /&gt;
and postprocessing. Two nodes are dedicated to this service but they are all accessible via&lt;br /&gt;
one address and a DNS round-robin alias distributes the login sessions to the&lt;br /&gt;
different login nodes.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Compute Node&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The majority of nodes are compute nodes which are managed by a batch system. Users &lt;br /&gt;
submit their jobs to the SLURM batch system and a job is executed when the required resources become available (depending on its fair-share priority).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;File Server Nodes&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The hardware of the parallel file system Lustre incorporates some file server nodes; the file&lt;br /&gt;
system Lustre is connected by coupling the InfiniBand of the file server with the independent InfiniBand switch of the compute cluster. In addition to shared file space there is also local storage on the disks of each node (for details see chapter &amp;quot;File Systems&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Administrative Server Nodes&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Some other nodes are delivering additional services like resource management, external&lt;br /&gt;
network connection, administration etc. These nodes can be accessed directly by system administrators only.&lt;br /&gt;
&lt;br /&gt;
= Components of bwUniCluster =&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
! style=&amp;quot;width:9%&amp;quot;|&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Compute nodes &amp;quot;Thin&amp;quot;&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Compute nodes &amp;quot;HPC&amp;quot;&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Compute nodes &amp;quot;HPC Broadwell&amp;quot;&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Compute nodes &amp;quot;Fat&amp;quot;&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| GPU x4&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| GPU x8&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Login&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Number of nodes&lt;br /&gt;
| 100&lt;br /&gt;
| 360&lt;br /&gt;
| 352&lt;br /&gt;
| 6&lt;br /&gt;
| 14&lt;br /&gt;
| 10&lt;br /&gt;
| 4 + 2 (Broadwell)&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Processors&lt;br /&gt;
| Intel Xeon Gold 6230&lt;br /&gt;
| Intel Xeon Gold 6230&lt;br /&gt;
| Intel Xeon E5-2660 v4&lt;br /&gt;
| Intel Xeon Gold 6230&lt;br /&gt;
| Intel Xeon Gold 6230&lt;br /&gt;
| Intel Xeon Gold 6248&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Number of sockets&lt;br /&gt;
| 2&lt;br /&gt;
| 2&lt;br /&gt;
| 2&lt;br /&gt;
| 4&lt;br /&gt;
| 2&lt;br /&gt;
| 2&lt;br /&gt;
| 2&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Processor frequency (GHz)&lt;br /&gt;
| 2.1 Ghz&lt;br /&gt;
| 2.1 Ghz&lt;br /&gt;
| 2.0 GHz&lt;br /&gt;
| 2.1 Ghz&lt;br /&gt;
| 2.1 Ghz&lt;br /&gt;
| 2.1 Ghz&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Total number of cores&lt;br /&gt;
| 40&lt;br /&gt;
| 40&lt;br /&gt;
| 28&lt;br /&gt;
| 80&lt;br /&gt;
| 40&lt;br /&gt;
| 40&lt;br /&gt;
| 40 / 20 (Broadwell)&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Main memory&lt;br /&gt;
| 96 GB&lt;br /&gt;
| 96 GB&lt;br /&gt;
| 128 GB&lt;br /&gt;
| 3 TB&lt;br /&gt;
| 384 GB&lt;br /&gt;
| 768 GB&lt;br /&gt;
| 384 GB / 128 GB (Broadwell)&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Local SSD&lt;br /&gt;
| 960 GB SATA&lt;br /&gt;
| 960 GB SATA&lt;br /&gt;
| 480 GB SATA&lt;br /&gt;
| 4,8 TB NVMe&lt;br /&gt;
| 3,2 TB NVMe&lt;br /&gt;
| 6,4 TB NVMe&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Accelerators&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
| 4x NVIDIA Tesla V100&lt;br /&gt;
| 8x NVIDIA Tesla V100&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Interconnect&lt;br /&gt;
| IB HDR100 (blocking)&lt;br /&gt;
| IB HDR100&lt;br /&gt;
| IB FDR&lt;br /&gt;
| IB HDR&lt;br /&gt;
| IB HDR&lt;br /&gt;
| IB HDR&lt;br /&gt;
| IB HDR100 (blocking)&lt;br /&gt;
|}&lt;br /&gt;
Table 1: Properties of the nodes&lt;br /&gt;
&lt;br /&gt;
= File Systems =&lt;br /&gt;
&lt;br /&gt;
Details about changes on the file systems between bwUniCluster 1 and bwUniCluster 2.0 are described in the [[BwUniCluster_2.0_File_System_Migration_Guide|File system migration guide]]. Note that $WORK is deprecated.&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 2.0 the parallel file system Lustre is used for most globally visible user data. Lustre is open source and Lustre solutions and support are available from different vendors. Nowadays, most of the biggest HPC systems are using Lustre. An initial home directory on a Lustre file system is created during the first login, and the environment variable $HOME holds its name. Users can create so-called workspaces on another Lustre file system for non-permanent data with temporary lifetime.&lt;br /&gt;
&lt;br /&gt;
Within a batch job further file systems are available: &lt;br /&gt;
* The directory $TMP is only available and visible on the local node. It is located on fast SSD storage devices.&lt;br /&gt;
* On request a parallel on-demand file system is created which uses the SSDs of the nodes which were allocated to the batch job.&lt;br /&gt;
* On request the external LSDF Online Storage is mounted on the nodes which were allocated to the batch job. This file system is based on the parallel file system Spectrum Scale. &lt;br /&gt;
&lt;br /&gt;
Some of the characteristics of the file systems are shown in Table 2.&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;width:100%; vertical-align:top; background:#f5fffa;border:1px solid #000000;padding:1px&amp;quot;&lt;br /&gt;
|- style=&amp;quot;width:20%;height=20px; text-align:left;padding:3px&amp;quot;&lt;br /&gt;
! style=&amp;quot;background-color:#AAA;padding:3px&amp;quot;| Property&lt;br /&gt;
! style=&amp;quot;background-color:#AAA;padding:3px&amp;quot;| $TMP&lt;br /&gt;
! style=&amp;quot;background-color:#AAA;padding:3px&amp;quot;| $HOME&lt;br /&gt;
! style=&amp;quot;background-color:#AAA;padding:3px&amp;quot;| Workspace&lt;br /&gt;
|- &lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Visibility &lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| local&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| global&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| global&lt;br /&gt;
|- &lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Lifetime &lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| batch job runtime&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| permanent&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| max. 240 days&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Disk space &lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 960 GB - 6.4 TB &amp;lt;br&amp;gt; details see table 1&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 1.2 PiB&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 4.1 PiB&lt;br /&gt;
|- &lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Capacity Quotas&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| no&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| yes &amp;lt;br&amp;gt; 1 TiB per user &amp;lt;br&amp;gt; also per organization&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| yes &amp;lt;br&amp;gt; 40 TiB per user&lt;br /&gt;
|- &lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Inode Quotas&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| no&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| yes &amp;lt;br&amp;gt; 10 million per user&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| yes &amp;lt;br&amp;gt; 30 million per user&lt;br /&gt;
|- &lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Backup&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| no&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| yes&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| no&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Read perf./node&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 420 MB/s - 6 GB/s &amp;lt;br&amp;gt; depends on type of local SSD&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 1 GB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 1 GB/s&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Write perf./node&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 380 MB/s - 2 GB/s &amp;lt;br&amp;gt; depends on type of local SSD&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 1 GB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 1 GB/s&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Total read perf.&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| n*420-6000 MB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 18 GB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 54 GB/s&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Total write perf.&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| n*380-2000 MB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 18 GB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 54 GB/s&lt;br /&gt;
|}&lt;br /&gt;
---------------------------------------------------------------------------------------------------------&lt;br /&gt;
  global: all nodes of uc1 access the same file system;&lt;br /&gt;
  local: each node has its own file system;&lt;br /&gt;
  permanent: files are stored permanently;&lt;br /&gt;
  batch job: files are removed at end of the batch job.&lt;br /&gt;
---------------------------------------------------------------------------------------------------------&lt;br /&gt;
Table 2: Properties of the file systems&lt;br /&gt;
&lt;br /&gt;
== Selecting the appropriate file system ==&lt;br /&gt;
&lt;br /&gt;
In general, you should separate your data and store it on the appropriate file system.&lt;br /&gt;
Permanently needed data like software or important results should be stored below $HOME&lt;br /&gt;
but capacity restrictions (quotas) apply. In case you accidentally deleted data on $HOME&lt;br /&gt;
you can usually restore it from backup. Permanent data which is not needed for months&lt;br /&gt;
or exceeds the capacity restrictions should be sent to bwFileStorage, to the LSDF Online Storage, &lt;br /&gt;
or to the archive and deleted from the file systems. Temporary data which is only needed on a single&lt;br /&gt;
node and which does not exceed the disk space shown in the table above should be stored&lt;br /&gt;
below $TMP. Temporary data which is only needed during job runs should be stored on a &lt;br /&gt;
parallel on-demand file system. Temporary data which can be recomputed or which is the &lt;br /&gt;
result of one job and input for another job should be stored below in workspaces. The lifetime &lt;br /&gt;
of data in workspaces is limited and depends on the lifetime of the workspace which can be &lt;br /&gt;
several months. &lt;br /&gt;
&lt;br /&gt;
The most efficient way to transfer data to/from other HPC file systems or bwFileStorage is done&lt;br /&gt;
with the tool rdata.&lt;br /&gt;
&lt;br /&gt;
For further details please check the chapters below.&lt;br /&gt;
&lt;br /&gt;
== $HOME ==&lt;br /&gt;
&lt;br /&gt;
The home directories of bwUniCluster 2.0 (uc2) users are located in the parallel file system Lustre.&lt;br /&gt;
You have access to your home directory from all nodes of uc2. A regular backup of these directories &lt;br /&gt;
to tape archive is done automatically. The directory $HOME is used to hold those files that are&lt;br /&gt;
permanently used like source codes, configuration files, executable programs etc. &lt;br /&gt;
&lt;br /&gt;
On uc2 there is a default user quota limit of 1 TiB and 10 million inodes (files and directories) per user. &lt;br /&gt;
You can chek your current usage and limits with the command&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ lfs quota -uh $(whoami) $HOME&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In addition to the user limit there is a limit of your organization (e.g. university) which depends on the financial share. This limit is enforced with so-called Lustre project quotas. You can show the current usage and limits of your organization with the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
lfs quota -ph $(grep $(echo $HOME | sed -e &amp;quot;s|/[^/]*/[^/]*$||&amp;quot;) /pfs/data5/project_ids.txt | cut -f 1 -d\ ) $HOME&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Workspaces ==&lt;br /&gt;
&lt;br /&gt;
On uc2 workspaces can be used to store large non-permanent data sets, e.g. restart files or output&lt;br /&gt;
data that has to be post-processed. The file system used for workspaces is also the parallel file system Lustre. This file system is especially designed for parallel access and for a high throughput to large&lt;br /&gt;
files. It is able to provide high data transfer rates of up to 54 GB/s write and read performance when data access is parallel. &lt;br /&gt;
&lt;br /&gt;
Workspaces have a lifetime and the data on a workspace expires as a whole after a fixed period. The maximum lifetime of a workspace is 60 days, but it can be renewed at the end of that period 3 times to a total maximum of 240 days after workspace generation. If a workspace has inadvertently expired we can restore the data during a limited time (few weeks). In this case you should create a new workspace and report the name of the new and of the expired workspace in a ticket or in an email to the hotline.&lt;br /&gt;
&lt;br /&gt;
Creating, deleting, finding and extending workspaces is explained on the  [[workspace]] page.&lt;br /&gt;
&lt;br /&gt;
On uc2 there is a default user quota limit of 40 TiB and 30 million inodes (files and directories) per user. &lt;br /&gt;
You can chek your current usage and limits with the command&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ lfs quota -uh $(whoami) /pfs/work7&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Reminder for workspace deletion ===&lt;br /&gt;
&lt;br /&gt;
Normally you will get an email every day starting 7 days before a workspace expires. You can send yourself a calender entry which reminds you when a workspace will be automatically deleted:&lt;br /&gt;
&lt;br /&gt;
 $ ws_send_ical.sh &amp;lt;workspace&amp;gt; &amp;lt;email&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Improving Performance on $HOME and workspaces ==&lt;br /&gt;
&lt;br /&gt;
The following recommendations might help to improve throughput and metadata&lt;br /&gt;
performance on Lustre filesystems.&lt;br /&gt;
&lt;br /&gt;
=== &#039;&#039;&#039;Improving Throughput Performance&#039;&#039;&#039; ===&lt;br /&gt;
&lt;br /&gt;
Depending on your application some adaptations might be necessary if you want to reach&lt;br /&gt;
the full bandwidth of the filesystems. Parallel filesystems typically stripe files over storage subsystems, i.e. large files are separated into stripes and distributed to different storage subsystems. In Lustre, the size of these stripes (sometimes also mentioned as chunks) is called stripe size and the number of used storage subsystems is called stripe count.&lt;br /&gt;
&lt;br /&gt;
When you are designing your application you should consider that the performance of&lt;br /&gt;
parallel filesystems is generally better if data is transferred in large blocks and stored in&lt;br /&gt;
few large files. In more detail, to increase throughput performance of a parallel application&lt;br /&gt;
following aspects should be considered:&lt;br /&gt;
&lt;br /&gt;
* collect large chunks of data and write them sequentially at once,&lt;br /&gt;
&lt;br /&gt;
* to exploit complete filesystem bandwidth use several clients,&lt;br /&gt;
&lt;br /&gt;
* avoid competitive file access by different tasks or use blocks with boundaries at stripe size (default is 1MB),&lt;br /&gt;
&lt;br /&gt;
* if files are small enough for the SSDs and are only used by one process store them on $TMP.&lt;br /&gt;
&lt;br /&gt;
With previous Lustre versions adapting the Lustre stripe count was the most important optimization. However, for the workspaces of uc2 the new Lustre feature Progressive File Layouts has been used to define file striping parameters. This means that the stripe count is adapted if the file size is growing. In normal cases users no longer need to adapt file striping parameters in case they have very huge files or in order to reach better performance. &lt;br /&gt;
&lt;br /&gt;
If you know what you are doing you can still change striping parameters, e.g. the stripe count, of a directory and of newly created files. New files and directories inherit the stripe count from the parent directory. E.g. if you want to enhance throughput on a single very large file which is created in the directory $HOME/my_output_dir you can use the command&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ lfs setstripe -c-1 $HOME/my_output_dir&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
to change the stripe count to -1 which means that all storage subsystems of the file system are used to store that file. If you change the stripe count of a directory the stripe count of existing files inside this&lt;br /&gt;
directory is not changed. If you want to change the stripe count of existing files, change&lt;br /&gt;
the stripe count of the parent directory, copy the files to new files, remove the old files&lt;br /&gt;
and move the new files back to the old name. In order to check the stripe setting of&lt;br /&gt;
the file my_file use&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ lfs getstripe my_file&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Also note that changes on the striping parameters (e.g. stripe count) are not saved in the&lt;br /&gt;
backup, i.e. if directories have to be recreated this information is lost and the default stripe&lt;br /&gt;
count will be used. Therefore, you should annotate for which directories you made changes&lt;br /&gt;
to the striping parameters so that you can repeat these changes if required.&lt;br /&gt;
&lt;br /&gt;
=== &#039;&#039;&#039;Improving Metadata Performance&#039;&#039;&#039; ===&lt;br /&gt;
&lt;br /&gt;
Metadata performance on parallel file systems is usually not as good as with local&lt;br /&gt;
filesystems. In addition, it is usually not scalable, i.e. a limited resource. Therefore,&lt;br /&gt;
you should omit metadata operations whenever possible. For example, it is much better&lt;br /&gt;
to have few large files than lots of small files. In more detail, to increase metadata&lt;br /&gt;
performance of a parallel application following aspects should be considered:&lt;br /&gt;
&lt;br /&gt;
* avoid creating many small files,&lt;br /&gt;
&lt;br /&gt;
* avoid competitive directory access, e.g. by creating files in separate subdirectories for each task,&lt;br /&gt;
&lt;br /&gt;
* if many small files are only used within a batch job and accessed by one process store them on $TMP,&lt;br /&gt;
&lt;br /&gt;
* change the default colorization setting of the command ls (see below).&lt;br /&gt;
&lt;br /&gt;
On modern Linux systems, the GNU ls command often uses colorization by default to&lt;br /&gt;
visually highlight the file type; this is especially true if the command is run within a terminal&lt;br /&gt;
session. This is because the default shell profile initializations usually contain an alias&lt;br /&gt;
directive similar to the following for the ls command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ alias ls=&amp;quot;ls --color=tty&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
However, running the ls command in this way for files on a Lustre file system requires&lt;br /&gt;
a stat() call to be used to determine the file type. This can result in a performance&lt;br /&gt;
overhead, because the stat() call always needs to determine the size of a file, and that&lt;br /&gt;
in turn means that the client node must query the object size of all the backing objects&lt;br /&gt;
that make up a file. As a result of the default colorization setting, running a simple&lt;br /&gt;
ls command on a Lustre file system often takes as much time as running the ls command&lt;br /&gt;
with the -l option (the same is true if the -F, -p, or the -classify option, or any other option &lt;br /&gt;
that requires information from a stat() call, is used). To avoid this performance overhead&lt;br /&gt;
when using ls commands, add an alias directive similar to the following&lt;br /&gt;
to your shell startup script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ alias ls=&amp;quot;ls --color=never&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== $TMP ==&lt;br /&gt;
&lt;br /&gt;
While all tasks of a parallel application access the same $HOME and workspace directory, the &lt;br /&gt;
$TMP directory is local to each node on bwUniCluster 2.0. Different tasks of a parallel&lt;br /&gt;
application use different directories when they do not utilize one node. This directory should&lt;br /&gt;
be used for temporary files being accessed by single tasks. All nodes have fast SSDs &lt;br /&gt;
local storage devices which are used to store data below $TMP. &lt;br /&gt;
In addition, this directory should be used for the installation&lt;br /&gt;
of software packages. This means that the software package to be installed should be&lt;br /&gt;
unpacked, compiled and linked in a subdirectory of $TMP. The real installation of the&lt;br /&gt;
package (e.g. make install) should be made in(to) the Lustre filesystem. &lt;br /&gt;
&lt;br /&gt;
Each time a batch&lt;br /&gt;
job is started, a subdirectory is created on each node and assigned to the job. $TMP is newly&lt;br /&gt;
set; the name of the subdirectory contains the Job-id and the starting time so that the&lt;br /&gt;
subdirectory name is unique for each job. This unique name is then assigned to the&lt;br /&gt;
environment variable $TMP within the job. At the end of the job the subdirectory is removed.&lt;br /&gt;
&lt;br /&gt;
== LSDF Online Storage==&lt;br /&gt;
&lt;br /&gt;
In some cases it is useful to have access to the LSDF Online Storage on the HPC-Clusters also. Therefore the LSDF Online Storage is mounted on the Login- and Datamover-Nodes.&lt;br /&gt;
Furthermore it can be used on the compute nodes during the job runtime with the constraint flag &amp;quot;LSDF&amp;quot; ([[bwUniCluster_2.0_Slurm_common_Features|Slurm common features]]&lt;br /&gt;
). There is also an example about the LSDF batch usage: [[bwUniCluster_2.0_Slurm_common_Features#LSDF_Online_Storage|Slurm LSDF example ]] .&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
#SBATCH ...&lt;br /&gt;
#SBATCH --constraint=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 the following environment variables are available: $LSDF, $LSDFPROJECTS, $LSDFHOME.&lt;br /&gt;
Please request storage projects in the LSDF Online Storage seperately:&lt;br /&gt;
[https://www.lsdf.kit.edu/os/storagerequest/: LSDF Storage Request].&lt;br /&gt;
&lt;br /&gt;
== Access to other HPC-Filesystems==&lt;br /&gt;
&lt;br /&gt;
Users of several SCC HPC-Clusters and users of the LSDF online storage have the possibility to transfer data over the &amp;quot;data mover&amp;quot; nodes via the tool &amp;quot;rdata&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The command &#039;&#039;&#039;rdata&#039;&#039;&#039; executes the filesystem operations on special &amp;quot;data mover&amp;quot; nodes and distributes the load. Examples for the command are:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rdata &amp;quot;ls $LSDFHOME/*.c&amp;quot;&lt;br /&gt;
$ rdata &amp;quot;cp $WORK/foo $LSDFHOME&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The command&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ man rdata&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
shows how to use the command &#039;&#039;&#039;rdata&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
===$WORK of SCC HPC-Clusters===&lt;br /&gt;
&lt;br /&gt;
From ForHLR I and ForHLR II can transfer data of the $WORK filesystem to the bwUniCluster via the tool &amp;quot;rdata&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===$PROJECT of the ForHLR I===&lt;br /&gt;
&lt;br /&gt;
Users of ForHLR I and ForHLR II can transfer data of the $PROJECT file system to the bwUniCluster via the tool &amp;quot;rdata&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===LSDF online storage===&lt;br /&gt;
&lt;br /&gt;
Users of the &#039;&#039;&#039;LSDF online storage&#039;&#039;&#039; can furthermore transfer data to bwUniCluster via the tool &#039;&#039;&#039;rdata&#039;&#039;&#039;.&lt;br /&gt;
Therefore the environment variables $LSDF, $LSDFPROJECTS and $LSDFHOME are set.&lt;br /&gt;
&lt;br /&gt;
===BeeOND (BeeGFS On-Demand)===&lt;br /&gt;
&lt;br /&gt;
Users of the HPC-Cluster have possibility to request a private BeeOND (BeeGFS) parallel filesystem for each job. The file system is created during job startup and purged after your job.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;IMPORTANT: All data on the private filesystem will be deleted after your job. Make sure you have copied your data back to the global filesystem (within job), e.g., $HOME or any workspace.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
BeeOND/BeeGFS can be used like any other parallel file system. Tools like cp or rsync can be used to copy data in and out. This feature is currently under BETA. If you encounter any problems or have questions, please contact fh-hotline@lists.kit.edu&lt;br /&gt;
&lt;br /&gt;
For detailed usage see here:[[BwUniCluster_2.0_Slurm_common_Features#BeeOND_.28BeeGFS_On-Demand.29|Request on-demand file system]]&lt;br /&gt;
&lt;br /&gt;
== Filetransfer to bwDataArchive and SDS@HD ==&lt;br /&gt;
&lt;br /&gt;
On the HPC-Clusters you can use the rdata tool to copy files&lt;br /&gt;
to the bwDataArchive or to the SDS@hd Storage.&lt;br /&gt;
&lt;br /&gt;
Please do the following steps for the preparation:&lt;br /&gt;
&lt;br /&gt;
1) Register for the service you want to use:&lt;br /&gt;
&lt;br /&gt;
bwDataArchive: https://www.rda.kit.edu/index.php&lt;br /&gt;
&lt;br /&gt;
SDS@hd:        https://sds-hd.urz.uni-heidelberg.de&lt;br /&gt;
&lt;br /&gt;
2) Create and transfer a ssh-key with no passphrase on the HPC-Cluster&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd .ssh&lt;br /&gt;
ssh-keygen -b 2048 -t rsa -f &amp;lt;ssh_key&amp;gt;&lt;br /&gt;
chmod 700 ./&amp;lt;ssh-key&amp;gt;.*&lt;br /&gt;
&lt;br /&gt;
# bwDataArchive&lt;br /&gt;
sftp &amp;lt;user&amp;gt;@archive-sftp.lsdf.kit.edu&lt;br /&gt;
mkdir ssh&lt;br /&gt;
put /home/&amp;lt;org&amp;gt;/&amp;lt;group&amp;gt;/&amp;lt;user&amp;gt;/.ssh/&amp;lt;ssh-key&amp;gt;.pub private/ssh/&amp;lt;ssh-key&amp;gt;.pub&lt;br /&gt;
# Inform bwDataArchive Team per Mail about your ssh-key: bwarchiv-support@lists.kit.edu&lt;br /&gt;
# They will move the key to the right place.&lt;br /&gt;
&lt;br /&gt;
# SDS@hd&lt;br /&gt;
sftp &amp;lt;user&amp;gt;@lsdf02-sshfs.urz.uni-heidelberg.de&lt;br /&gt;
put /home/&amp;lt;org&amp;gt;/&amp;lt;group&amp;gt;/&amp;lt;user&amp;gt;/.ssh/&amp;lt;ssh-key&amp;gt;.pub .ssh/authorized_keys&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3) Aggregrate files&lt;br /&gt;
Please store multiple small files in one single file with a tool like &amp;quot;tar&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
4) Create your batch file for sftp&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
vi sftpfile&lt;br /&gt;
put -p /home/&amp;lt;org&amp;gt;/&amp;lt;group&amp;gt;/&amp;lt;user&amp;gt;/&amp;lt;dir&amp;gt;/&amp;lt;file&amp;gt; private/&amp;lt;dir&amp;gt;/&amp;lt;file&amp;gt;&lt;br /&gt;
put -p /home/&amp;lt;org&amp;gt;/&amp;lt;group&amp;gt;/&amp;lt;user&amp;gt;/&amp;lt;file&amp;gt; &amp;lt;SDS-project&amp;gt;/&amp;lt;dir&amp;gt;/&amp;lt;file&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5) transfer your files with sftp or lftp&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# bwDataArchive&lt;br /&gt;
rdata sftp -b sftpfile &amp;lt;user&amp;gt;@archive-sftp.lsdf.kit.edu&lt;br /&gt;
rdata &amp;quot;lftp -u &amp;lt;user&amp;gt;,pwd sftp://archive-sftp.lsdf.kit.edu -e \&amp;quot;ls -l private/; bye\&amp;quot;&amp;quot;&lt;br /&gt;
rdata &amp;quot;lftp -u &amp;lt;user&amp;gt;,pwd sftp://archive-sftp.lsdf.kit.edu -e \&amp;quot;put &amp;lt;file&amp;gt; -o private/&amp;lt;file&amp;gt;; bye\&amp;quot;&amp;quot;&lt;br /&gt;
rdata &amp;quot;lftp -u &amp;lt;user&amp;gt;,pwd sftp://archive-sftp.lsdf.kit.edu -e \&amp;quot;mirror -c -R -P4 &amp;lt;directory&amp;gt; private/&amp;lt;directory&amp;gt;; bye\&amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# SDS@hd&lt;br /&gt;
rdata sftp -b sftpfile &amp;lt;user&amp;gt;@lsdf02-sshfs.urz.uni-heidelberg.de&lt;br /&gt;
rdata &amp;quot;lftp -u &amp;lt;user&amp;gt;,pwd sftp://lsdf02-sshfs.urz.uni-heidelberg.de -e \&amp;quot;ls -l &amp;lt;project&amp;gt;/; bye\&amp;quot;&amp;quot;&lt;br /&gt;
rdata &amp;quot;lftp -u &amp;lt;user&amp;gt;,pwd sftp://lsdf02-sshfs.urz.uni-heidelberg.de -e \&amp;quot;put &amp;lt;file&amp;gt; -o &amp;lt;project&amp;gt;/&amp;lt;file&amp;gt;; bye\&amp;quot;&amp;quot;&lt;br /&gt;
rdata &amp;quot;lftp -u &amp;lt;user&amp;gt;,pwd sftp://lsdf02-sshfs.urz.uni-heidelberg.de -e \&amp;quot;mirror -c -R -P4 &amp;lt;directory&amp;gt; &amp;lt;project&amp;gt;/&amp;lt;directory&amp;gt;; bye\&amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# with the command &amp;quot;screen&amp;quot; you can run your commands in the backgroud and log out.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Backup and Archiving==&lt;br /&gt;
&lt;br /&gt;
There are regular backups of all data of the home directories,whereas ACLs and extended attributes will&lt;br /&gt;
not be backuped. &lt;br /&gt;
Please contact the hotline if you need backuped data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:bwUniCluster 2.0|File System]][[Category:Hardware_and_Architecture|bwUniCluster 2.0]]&lt;/div&gt;</summary>
		<author><name>H Weber</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster2.0/Hardware_and_Architecture&amp;diff=6130</id>
		<title>BwUniCluster2.0/Hardware and Architecture</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster2.0/Hardware_and_Architecture&amp;diff=6130"/>
		<updated>2020-03-19T10:57:04Z</updated>

		<summary type="html">&lt;p&gt;H Weber: /* BeeOND (BeeGFS On-Demand) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Architecture of bwUniCluster 2.0 =&lt;br /&gt;
&lt;br /&gt;
The bwUniCluster 2.0 is a parallel computer with distributed memory. Each node of system consists of at least two Intel Xeon processor, local memory, disks, network adapters and optionally accelerators (NVIDIA Tesla V100). All nodes are connected by a fast InfiniBand interconnect. In addition the file system&lt;br /&gt;
Lustre, that is connected by coupling the InfiniBand of the file server with the InfiniBand&lt;br /&gt;
switch of the compute cluster, is added to bwUniCluster 2.0 to provide a fast and scalable&lt;br /&gt;
parallel file system.&lt;br /&gt;
&lt;br /&gt;
The operating system on each node is Red Hat Enterprise Linux (RHEL) 7.7. A number of additional software packages like e.g. SLURM have been installed on top. Some of these components are of special interest to end users and are briefly&lt;br /&gt;
discussed in this document. Others which are of greater importance to system&lt;br /&gt;
administrators will not be covered by this document.&lt;br /&gt;
&lt;br /&gt;
The individual nodes of the system may act in different roles. According to the services supplied by the nodes, they are separated into disjoint groups. From an end users point of view the different groups of nodes are login nodes, compute nodes, file server nodes and administrative server nodes.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Login Nodes&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The login nodes are the only nodes that are directly accessible by end users. These nodes&lt;br /&gt;
are used for interactive login, file management, program development and interactive pre-&lt;br /&gt;
and postprocessing. Two nodes are dedicated to this service but they are all accessible via&lt;br /&gt;
one address and a DNS round-robin alias distributes the login sessions to the&lt;br /&gt;
different login nodes.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Compute Node&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The majority of nodes are compute nodes which are managed by a batch system. Users &lt;br /&gt;
submit their jobs to the SLURM batch system and a job is executed when the required resources become available (depending on its fair-share priority).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;File Server Nodes&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The hardware of the parallel file system Lustre incorporates some file server nodes; the file&lt;br /&gt;
system Lustre is connected by coupling the InfiniBand of the file server with the independent InfiniBand switch of the compute cluster. In addition to shared file space there is also local storage on the disks of each node (for details see chapter &amp;quot;File Systems&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Administrative Server Nodes&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Some other nodes are delivering additional services like resource management, external&lt;br /&gt;
network connection, administration etc. These nodes can be accessed directly by system administrators only.&lt;br /&gt;
&lt;br /&gt;
= Components of bwUniCluster =&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
! style=&amp;quot;width:9%&amp;quot;|&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Compute nodes &amp;quot;Thin&amp;quot;&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Compute nodes &amp;quot;HPC&amp;quot;&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Compute nodes &amp;quot;HPC Broadwell&amp;quot;&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Compute nodes &amp;quot;Fat&amp;quot;&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| GPU x4&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| GPU x8&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Login&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Number of nodes&lt;br /&gt;
| 100&lt;br /&gt;
| 360&lt;br /&gt;
| 352&lt;br /&gt;
| 6&lt;br /&gt;
| 14&lt;br /&gt;
| 10&lt;br /&gt;
| 4 + 2 (Broadwell)&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Processors&lt;br /&gt;
| Intel Xeon Gold 6230&lt;br /&gt;
| Intel Xeon Gold 6230&lt;br /&gt;
| Intel Xeon E5-2660 v4&lt;br /&gt;
| Intel Xeon Gold 6230&lt;br /&gt;
| Intel Xeon Gold 6230&lt;br /&gt;
| Intel Xeon Gold 6248&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Number of sockets&lt;br /&gt;
| 2&lt;br /&gt;
| 2&lt;br /&gt;
| 2&lt;br /&gt;
| 4&lt;br /&gt;
| 2&lt;br /&gt;
| 2&lt;br /&gt;
| 2&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Processor frequency (GHz)&lt;br /&gt;
| 2.1 Ghz&lt;br /&gt;
| 2.1 Ghz&lt;br /&gt;
| 2.0 GHz&lt;br /&gt;
| 2.1 Ghz&lt;br /&gt;
| 2.1 Ghz&lt;br /&gt;
| 2.1 Ghz&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Total number of cores&lt;br /&gt;
| 40&lt;br /&gt;
| 40&lt;br /&gt;
| 28&lt;br /&gt;
| 80&lt;br /&gt;
| 40&lt;br /&gt;
| 40&lt;br /&gt;
| 40 / 20 (Broadwell)&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Main memory&lt;br /&gt;
| 96 GB&lt;br /&gt;
| 96 GB&lt;br /&gt;
| 128 GB&lt;br /&gt;
| 3 TB&lt;br /&gt;
| 384 GB&lt;br /&gt;
| 768 GB&lt;br /&gt;
| 384 GB / 128 GB (Broadwell)&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Local SSD&lt;br /&gt;
| 960 GB SATA&lt;br /&gt;
| 960 GB SATA&lt;br /&gt;
| 480 GB SATA&lt;br /&gt;
| 4,8 TB NVMe&lt;br /&gt;
| 3,2 TB NVMe&lt;br /&gt;
| 6,4 TB NVMe&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Accelerators&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
| 4x NVIDIA Tesla V100&lt;br /&gt;
| 8x NVIDIA Tesla V100&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Interconnect&lt;br /&gt;
| IB HDR100 (blocking)&lt;br /&gt;
| IB HDR100&lt;br /&gt;
| IB FDR&lt;br /&gt;
| IB HDR&lt;br /&gt;
| IB HDR&lt;br /&gt;
| IB HDR&lt;br /&gt;
| IB HDR100 (blocking)&lt;br /&gt;
|}&lt;br /&gt;
Table 1: Properties of the nodes&lt;br /&gt;
&lt;br /&gt;
= File Systems =&lt;br /&gt;
&lt;br /&gt;
Details about changes on the file systems between bwUniCluster 1 and bwUniCluster 2.0 are described in the [[BwUniCluster_2.0_File_System_Migration_Guide|File system migration guide]]. Note that $WORK is deprecated.&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 2.0 the parallel file system Lustre is used for most globally visible user data. Lustre is open source and Lustre solutions and support are available from different vendors. Nowadays, most of the biggest HPC systems are using Lustre. An initial home directory on a Lustre file system is created during the first login, and the environment variable $HOME holds its name. Users can create so-called workspaces on another Lustre file system for non-permanent data with temporary lifetime.&lt;br /&gt;
&lt;br /&gt;
Within a batch job further file systems are available: &lt;br /&gt;
* The directory $TMP is only available and visible on the local node. It is located on fast SSD storage devices.&lt;br /&gt;
* On request a parallel on-demand file system is created which uses the SSDs of the nodes which were allocated to the batch job.&lt;br /&gt;
* On request the external LSDF Online Storage is mounted on the nodes which were allocated to the batch job. This file system is based on the parallel file system Spectrum Scale. &lt;br /&gt;
&lt;br /&gt;
Some of the characteristics of the file systems are shown in Table 2.&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;width:100%; vertical-align:top; background:#f5fffa;border:1px solid #000000;padding:1px&amp;quot;&lt;br /&gt;
|- style=&amp;quot;width:20%;height=20px; text-align:left;padding:3px&amp;quot;&lt;br /&gt;
! style=&amp;quot;background-color:#AAA;padding:3px&amp;quot;| Property&lt;br /&gt;
! style=&amp;quot;background-color:#AAA;padding:3px&amp;quot;| $TMP&lt;br /&gt;
! style=&amp;quot;background-color:#AAA;padding:3px&amp;quot;| $HOME&lt;br /&gt;
! style=&amp;quot;background-color:#AAA;padding:3px&amp;quot;| Workspace&lt;br /&gt;
|- &lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Visibility &lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| local&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| global&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| global&lt;br /&gt;
|- &lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Lifetime &lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| batch job runtime&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| permanent&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| max. 240 days&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Disk space &lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 960 GB - 6.4 TB &amp;lt;br&amp;gt; details see table 1&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 1.2 PiB&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 4.1 PiB&lt;br /&gt;
|- &lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Capacity Quotas&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| no&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| yes &amp;lt;br&amp;gt; 1 TiB per user &amp;lt;br&amp;gt; also per organization&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| yes &amp;lt;br&amp;gt; 40 TiB per user&lt;br /&gt;
|- &lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Inode Quotas&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| no&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| yes &amp;lt;br&amp;gt; 10 million per user&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| yes &amp;lt;br&amp;gt; 30 million per user&lt;br /&gt;
|- &lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Backup&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| no&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| yes&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| no&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Read perf./node&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 420 MB/s - 6 GB/s &amp;lt;br&amp;gt; depends on type of local SSD&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 1 GB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 1 GB/s&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Write perf./node&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 380 MB/s - 2 GB/s &amp;lt;br&amp;gt; depends on type of local SSD&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 1 GB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 1 GB/s&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Total read perf.&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| n*420-6000 MB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 18 GB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 54 GB/s&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Total write perf.&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| n*380-2000 MB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 18 GB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 54 GB/s&lt;br /&gt;
|}&lt;br /&gt;
---------------------------------------------------------------------------------------------------------&lt;br /&gt;
  global: all nodes of uc1 access the same file system;&lt;br /&gt;
  local: each node has its own file system;&lt;br /&gt;
  permanent: files are stored permanently;&lt;br /&gt;
  batch job: files are removed at end of the batch job.&lt;br /&gt;
---------------------------------------------------------------------------------------------------------&lt;br /&gt;
Table 2: Properties of the file systems&lt;br /&gt;
&lt;br /&gt;
== Selecting the appropriate file system ==&lt;br /&gt;
&lt;br /&gt;
In general, you should separate your data and store it on the appropriate file system.&lt;br /&gt;
Permanently needed data like software or important results should be stored below $HOME&lt;br /&gt;
but capacity restrictions (quotas) apply. In case you accidentally deleted data on $HOME&lt;br /&gt;
you can usually restore it from backup. Permanent data which is not needed for months&lt;br /&gt;
or exceeds the capacity restrictions should be sent to bwFileStorage, to the LSDF Online Storage, &lt;br /&gt;
or to the archive and deleted from the file systems. Temporary data which is only needed on a single&lt;br /&gt;
node and which does not exceed the disk space shown in the table above should be stored&lt;br /&gt;
below $TMP. Temporary data which is only needed during job runs should be stored on a &lt;br /&gt;
parallel on-demand file system. Temporary data which can be recomputed or which is the &lt;br /&gt;
result of one job and input for another job should be stored below in workspaces. The lifetime &lt;br /&gt;
of data in workspaces is limited and depends on the lifetime of the workspace which can be &lt;br /&gt;
several months. &lt;br /&gt;
&lt;br /&gt;
The most efficient way to transfer data to/from other HPC file systems or bwFileStorage is done&lt;br /&gt;
with the tool rdata.&lt;br /&gt;
&lt;br /&gt;
For further details please check the chapters below.&lt;br /&gt;
&lt;br /&gt;
== $HOME ==&lt;br /&gt;
&lt;br /&gt;
The home directories of bwUniCluster 2.0 (uc2) users are located in the parallel file system Lustre.&lt;br /&gt;
You have access to your home directory from all nodes of uc2. A regular backup of these directories &lt;br /&gt;
to tape archive is done automatically. The directory $HOME is used to hold those files that are&lt;br /&gt;
permanently used like source codes, configuration files, executable programs etc. &lt;br /&gt;
&lt;br /&gt;
On uc2 there is a default user quota limit of 1 TiB and 10 million inodes (files and directories) per user. &lt;br /&gt;
You can chek your current usage and limits with the command&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ lfs quota -uh $(whoami) $HOME&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In addition to the user limit there is a limit of your organization (e.g. university) which depends on the financial share. This limit is enforced with so-called Lustre project quotas. You can show the current usage and limits of your organization with the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
lfs quota -ph $(grep $(echo $HOME | sed -e &amp;quot;s|/[^/]*/[^/]*$||&amp;quot;) /pfs/data5/project_ids.txt | cut -f 1 -d\ ) $HOME&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Workspaces ==&lt;br /&gt;
&lt;br /&gt;
On uc2 workspaces can be used to store large non-permanent data sets, e.g. restart files or output&lt;br /&gt;
data that has to be post-processed. The file system used for workspaces is also the parallel file system Lustre. This file system is especially designed for parallel access and for a high throughput to large&lt;br /&gt;
files. It is able to provide high data transfer rates of up to 54 GB/s write and read performance when data access is parallel. &lt;br /&gt;
&lt;br /&gt;
Workspaces have a lifetime and the data on a workspace expires as a whole after a fixed period. The maximum lifetime of a workspace is 60 days, but it can be renewed at the end of that period 3 times to a total maximum of 240 days after workspace generation. If a workspace has inadvertently expired we can restore the data during a limited time (few weeks). In this case you should create a new workspace and report the name of the new and of the expired workspace in a ticket or in an email to the hotline.&lt;br /&gt;
&lt;br /&gt;
Creating, deleting, finding and extending workspaces is explained on the  [[workspace]] page.&lt;br /&gt;
&lt;br /&gt;
On uc2 there is a default user quota limit of 40 TiB and 30 million inodes (files and directories) per user. &lt;br /&gt;
You can chek your current usage and limits with the command&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ lfs quota -uh $(whoami) /pfs/work7&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Reminder for workspace deletion ===&lt;br /&gt;
&lt;br /&gt;
Normally you will get an email every day starting 7 days before a workspace expires. You can send yourself a calender entry which reminds you when a workspace will be automatically deleted:&lt;br /&gt;
&lt;br /&gt;
 $ ws_send_ical.sh &amp;lt;workspace&amp;gt; &amp;lt;email&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Improving Performance on $HOME and workspaces ==&lt;br /&gt;
&lt;br /&gt;
The following recommendations might help to improve throughput and metadata&lt;br /&gt;
performance on Lustre filesystems.&lt;br /&gt;
&lt;br /&gt;
=== &#039;&#039;&#039;Improving Throughput Performance&#039;&#039;&#039; ===&lt;br /&gt;
&lt;br /&gt;
Depending on your application some adaptations might be necessary if you want to reach&lt;br /&gt;
the full bandwidth of the filesystems. Parallel filesystems typically stripe files over storage subsystems, i.e. large files are separated into stripes and distributed to different storage subsystems. In Lustre, the size of these stripes (sometimes also mentioned as chunks) is called stripe size and the number of used storage subsystems is called stripe count.&lt;br /&gt;
&lt;br /&gt;
When you are designing your application you should consider that the performance of&lt;br /&gt;
parallel filesystems is generally better if data is transferred in large blocks and stored in&lt;br /&gt;
few large files. In more detail, to increase throughput performance of a parallel application&lt;br /&gt;
following aspects should be considered:&lt;br /&gt;
&lt;br /&gt;
* collect large chunks of data and write them sequentially at once,&lt;br /&gt;
&lt;br /&gt;
* to exploit complete filesystem bandwidth use several clients,&lt;br /&gt;
&lt;br /&gt;
* avoid competitive file access by different tasks or use blocks with boundaries at stripe size (default is 1MB),&lt;br /&gt;
&lt;br /&gt;
* if files are small enough for the SSDs and are only used by one process store them on $TMP.&lt;br /&gt;
&lt;br /&gt;
With previous Lustre versions adapting the Lustre stripe count was the most important optimization. However, for the workspaces of uc2 the new Lustre feature Progressive File Layouts has been used to define file striping parameters. This means that the stripe count is adapted if the file size is growing. In normal cases users no longer need to adapt file striping parameters in case they have very huge files or in order to reach better performance. &lt;br /&gt;
&lt;br /&gt;
If you know what you are doing you can still change striping parameters, e.g. the stripe count, of a directory and of newly created files. New files and directories inherit the stripe count from the parent directory. E.g. if you want to enhance throughput on a single very large file which is created in the directory $HOME/my_output_dir you can use the command&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ lfs setstripe -c-1 $HOME/my_output_dir&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
to change the stripe count to -1 which means that all storage subsystems of the file system are used to store that file. If you change the stripe count of a directory the stripe count of existing files inside this&lt;br /&gt;
directory is not changed. If you want to change the stripe count of existing files, change&lt;br /&gt;
the stripe count of the parent directory, copy the files to new files, remove the old files&lt;br /&gt;
and move the new files back to the old name. In order to check the stripe setting of&lt;br /&gt;
the file my_file use&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ lfs getstripe my_file&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Also note that changes on the striping parameters (e.g. stripe count) are not saved in the&lt;br /&gt;
backup, i.e. if directories have to be recreated this information is lost and the default stripe&lt;br /&gt;
count will be used. Therefore, you should annotate for which directories you made changes&lt;br /&gt;
to the striping parameters so that you can repeat these changes if required.&lt;br /&gt;
&lt;br /&gt;
=== &#039;&#039;&#039;Improving Metadata Performance&#039;&#039;&#039; ===&lt;br /&gt;
&lt;br /&gt;
Metadata performance on parallel file systems is usually not as good as with local&lt;br /&gt;
filesystems. In addition, it is usually not scalable, i.e. a limited resource. Therefore,&lt;br /&gt;
you should omit metadata operations whenever possible. For example, it is much better&lt;br /&gt;
to have few large files than lots of small files. In more detail, to increase metadata&lt;br /&gt;
performance of a parallel application following aspects should be considered:&lt;br /&gt;
&lt;br /&gt;
* avoid creating many small files,&lt;br /&gt;
&lt;br /&gt;
* avoid competitive directory access, e.g. by creating files in separate subdirectories for each task,&lt;br /&gt;
&lt;br /&gt;
* if many small files are only used within a batch job and accessed by one process store them on $TMP,&lt;br /&gt;
&lt;br /&gt;
* change the default colorization setting of the command ls (see below).&lt;br /&gt;
&lt;br /&gt;
On modern Linux systems, the GNU ls command often uses colorization by default to&lt;br /&gt;
visually highlight the file type; this is especially true if the command is run within a terminal&lt;br /&gt;
session. This is because the default shell profile initializations usually contain an alias&lt;br /&gt;
directive similar to the following for the ls command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ alias ls=&amp;quot;ls --color=tty&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
However, running the ls command in this way for files on a Lustre file system requires&lt;br /&gt;
a stat() call to be used to determine the file type. This can result in a performance&lt;br /&gt;
overhead, because the stat() call always needs to determine the size of a file, and that&lt;br /&gt;
in turn means that the client node must query the object size of all the backing objects&lt;br /&gt;
that make up a file. As a result of the default colorization setting, running a simple&lt;br /&gt;
ls command on a Lustre file system often takes as much time as running the ls command&lt;br /&gt;
with the -l option (the same is true if the -F, -p, or the -classify option, or any other option &lt;br /&gt;
that requires information from a stat() call, is used). To avoid this performance overhead&lt;br /&gt;
when using ls commands, add an alias directive similar to the following&lt;br /&gt;
to your shell startup script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ alias ls=&amp;quot;ls --color=never&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== $TMP ==&lt;br /&gt;
&lt;br /&gt;
While all tasks of a parallel application access the same $HOME and workspace directory, the &lt;br /&gt;
$TMP directory is local to each node on bwUniCluster 2.0. Different tasks of a parallel&lt;br /&gt;
application use different directories when they do not utilize one node. This directory should&lt;br /&gt;
be used for temporary files being accessed by single tasks. All nodes have fast SSDs &lt;br /&gt;
local storage devices which are used to store data below $TMP. &lt;br /&gt;
In addition, this directory should be used for the installation&lt;br /&gt;
of software packages. This means that the software package to be installed should be&lt;br /&gt;
unpacked, compiled and linked in a subdirectory of $TMP. The real installation of the&lt;br /&gt;
package (e.g. make install) should be made in(to) the Lustre filesystem. &lt;br /&gt;
&lt;br /&gt;
Each time a batch&lt;br /&gt;
job is started, a subdirectory is created on each node and assigned to the job. $TMP is newly&lt;br /&gt;
set; the name of the subdirectory contains the Job-id and the starting time so that the&lt;br /&gt;
subdirectory name is unique for each job. This unique name is then assigned to the&lt;br /&gt;
environment variable $TMP within the job. At the end of the job the subdirectory is removed.&lt;br /&gt;
&lt;br /&gt;
== LSDF Online Storage==&lt;br /&gt;
&lt;br /&gt;
In some cases it is useful to have access to the LSDF Online Storage on the HPC-Clusters also. Therefore the LSDF Online Storage is mounted on the Login- and Datamover-Nodes.&lt;br /&gt;
Furthermore it can be used on the compute nodes during the job runtime with the constraint flag &amp;quot;LSDF&amp;quot; ([[bwUniCluster_2.0_Slurm_common_Features|Slurm common features]]&lt;br /&gt;
). There is also an example about the LSDF batch usage: [[bwUniCluster_2.0_Slurm_common_Features#LSDF_Online_Storage|Slurm LSDF example ]] .&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
#SBATCH ...&lt;br /&gt;
#SBATCH --constraint=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 the following environment variables are available: $LSDF, $LSDFPROJECTS, $LSDFHOME.&lt;br /&gt;
Please request storage projects in the LSDF Online Storage seperately:&lt;br /&gt;
[https://www.lsdf.kit.edu/os/storagerequest/: LSDF Storage Request].&lt;br /&gt;
&lt;br /&gt;
== Access to other HPC-Filesystems==&lt;br /&gt;
&lt;br /&gt;
Users of several SCC HPC-Clusters and users of the LSDF online storage have the possibility to transfer data over the &amp;quot;data mover&amp;quot; nodes via the tool &amp;quot;rdata&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The command &#039;&#039;&#039;rdata&#039;&#039;&#039; executes the filesystem operations on special &amp;quot;data mover&amp;quot; nodes and distributes the load. Examples for the command are:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rdata &amp;quot;ls $LSDFHOME/*.c&amp;quot;&lt;br /&gt;
$ rdata &amp;quot;cp $WORK/foo $LSDFHOME&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The command&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ man rdata&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
shows how to use the command &#039;&#039;&#039;rdata&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
===$WORK of SCC HPC-Clusters===&lt;br /&gt;
&lt;br /&gt;
From ForHLR I and ForHLR II can transfer data of the $WORK filesystem to the bwUniCluster via the tool &amp;quot;rdata&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===$PROJECT of the ForHLR I===&lt;br /&gt;
&lt;br /&gt;
Users of ForHLR I and ForHLR II can transfer data of the $PROJECT file system to the bwUniCluster via the tool &amp;quot;rdata&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===LSDF online storage===&lt;br /&gt;
&lt;br /&gt;
Users of the &#039;&#039;&#039;LSDF online storage&#039;&#039;&#039; can furthermore transfer data to bwUniCluster via the tool &#039;&#039;&#039;rdata&#039;&#039;&#039;.&lt;br /&gt;
Therefore the environment variables $LSDF, $LSDFPROJECTS and $LSDFHOME are set.&lt;br /&gt;
&lt;br /&gt;
===BeeOND (BeeGFS On-Demand)===&lt;br /&gt;
&lt;br /&gt;
Users of the HPC-Cluster have possibility to request a private BeeOND (BeeGFS) parallel filesystem for each job. The file system is created during job startup and purged after your job.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;IMPORTANT: All data on the private filesystem will be deleted after your job. Make sure you have copied your data back to the global filesystem (within job), e.g., $HOME or any workspace.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
BeeOND/BeeGFS can be used like any other parallel file system. Tools like cp or rsync can be used to copy data in and out. This feature is currently under BETA. If you encounter any problems or have questions, please contact fh-hotline@lists.kit.edu&lt;br /&gt;
&lt;br /&gt;
For detailed usage see here:[[BwUniCluster_2.0_Slurm_common_Features#BeeOND_.28BeeGFS_On-Demand.29&lt;br /&gt;
|Request on-demand file system]]&lt;br /&gt;
&lt;br /&gt;
== Filetransfer to bwDataArchive and SDS@HD ==&lt;br /&gt;
&lt;br /&gt;
On the HPC-Clusters you can use the rdata tool to copy files&lt;br /&gt;
to the bwDataArchive or to the SDS@hd Storage.&lt;br /&gt;
&lt;br /&gt;
Please do the following steps for the preparation:&lt;br /&gt;
&lt;br /&gt;
1) Register for the service you want to use:&lt;br /&gt;
&lt;br /&gt;
bwDataArchive: https://www.rda.kit.edu/index.php&lt;br /&gt;
&lt;br /&gt;
SDS@hd:        https://sds-hd.urz.uni-heidelberg.de&lt;br /&gt;
&lt;br /&gt;
2) Create and transfer a ssh-key with no passphrase on the HPC-Cluster&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd .ssh&lt;br /&gt;
ssh-keygen -b 2048 -t rsa -f &amp;lt;ssh_key&amp;gt;&lt;br /&gt;
chmod 700 ./&amp;lt;ssh-key&amp;gt;.*&lt;br /&gt;
&lt;br /&gt;
# bwDataArchive&lt;br /&gt;
sftp &amp;lt;user&amp;gt;@archive-sftp.lsdf.kit.edu&lt;br /&gt;
mkdir ssh&lt;br /&gt;
put /home/&amp;lt;org&amp;gt;/&amp;lt;group&amp;gt;/&amp;lt;user&amp;gt;/.ssh/&amp;lt;ssh-key&amp;gt;.pub private/ssh/&amp;lt;ssh-key&amp;gt;.pub&lt;br /&gt;
# Inform bwDataArchive Team per Mail about your ssh-key: bwarchiv-support@lists.kit.edu&lt;br /&gt;
# They will move the key to the right place.&lt;br /&gt;
&lt;br /&gt;
# SDS@hd&lt;br /&gt;
sftp &amp;lt;user&amp;gt;@lsdf02-sshfs.urz.uni-heidelberg.de&lt;br /&gt;
put /home/&amp;lt;org&amp;gt;/&amp;lt;group&amp;gt;/&amp;lt;user&amp;gt;/.ssh/&amp;lt;ssh-key&amp;gt;.pub .ssh/authorized_keys&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3) Aggregrate files&lt;br /&gt;
Please store multiple small files in one single file with a tool like &amp;quot;tar&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
4) Create your batch file for sftp&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
vi sftpfile&lt;br /&gt;
put -p /home/&amp;lt;org&amp;gt;/&amp;lt;group&amp;gt;/&amp;lt;user&amp;gt;/&amp;lt;dir&amp;gt;/&amp;lt;file&amp;gt; private/&amp;lt;dir&amp;gt;/&amp;lt;file&amp;gt;&lt;br /&gt;
put -p /home/&amp;lt;org&amp;gt;/&amp;lt;group&amp;gt;/&amp;lt;user&amp;gt;/&amp;lt;file&amp;gt; &amp;lt;SDS-project&amp;gt;/&amp;lt;dir&amp;gt;/&amp;lt;file&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5) transfer your files with sftp or lftp&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# bwDataArchive&lt;br /&gt;
rdata sftp -b sftpfile &amp;lt;user&amp;gt;@archive-sftp.lsdf.kit.edu&lt;br /&gt;
rdata &amp;quot;lftp -u &amp;lt;user&amp;gt;,pwd sftp://archive-sftp.lsdf.kit.edu -e \&amp;quot;ls -l private/; bye\&amp;quot;&amp;quot;&lt;br /&gt;
rdata &amp;quot;lftp -u &amp;lt;user&amp;gt;,pwd sftp://archive-sftp.lsdf.kit.edu -e \&amp;quot;put &amp;lt;file&amp;gt; -o private/&amp;lt;file&amp;gt;; bye\&amp;quot;&amp;quot;&lt;br /&gt;
rdata &amp;quot;lftp -u &amp;lt;user&amp;gt;,pwd sftp://archive-sftp.lsdf.kit.edu -e \&amp;quot;mirror -c -R -P4 &amp;lt;directory&amp;gt; private/&amp;lt;directory&amp;gt;; bye\&amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# SDS@hd&lt;br /&gt;
rdata sftp -b sftpfile &amp;lt;user&amp;gt;@lsdf02-sshfs.urz.uni-heidelberg.de&lt;br /&gt;
rdata &amp;quot;lftp -u &amp;lt;user&amp;gt;,pwd sftp://lsdf02-sshfs.urz.uni-heidelberg.de -e \&amp;quot;ls -l &amp;lt;project&amp;gt;/; bye\&amp;quot;&amp;quot;&lt;br /&gt;
rdata &amp;quot;lftp -u &amp;lt;user&amp;gt;,pwd sftp://lsdf02-sshfs.urz.uni-heidelberg.de -e \&amp;quot;put &amp;lt;file&amp;gt; -o &amp;lt;project&amp;gt;/&amp;lt;file&amp;gt;; bye\&amp;quot;&amp;quot;&lt;br /&gt;
rdata &amp;quot;lftp -u &amp;lt;user&amp;gt;,pwd sftp://lsdf02-sshfs.urz.uni-heidelberg.de -e \&amp;quot;mirror -c -R -P4 &amp;lt;directory&amp;gt; &amp;lt;project&amp;gt;/&amp;lt;directory&amp;gt;; bye\&amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# with the command &amp;quot;screen&amp;quot; you can run your commands in the backgroud and log out.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Backup and Archiving==&lt;br /&gt;
&lt;br /&gt;
There are regular backups of all data of the home directories,whereas ACLs and extended attributes will&lt;br /&gt;
not be backuped. &lt;br /&gt;
Please contact the hotline if you need backuped data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:bwUniCluster 2.0|File System]][[Category:Hardware_and_Architecture|bwUniCluster 2.0]]&lt;/div&gt;</summary>
		<author><name>H Weber</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster2.0/Slurm&amp;diff=6129</id>
		<title>BwUniCluster2.0/Slurm</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster2.0/Slurm&amp;diff=6129"/>
		<updated>2020-03-19T10:52:34Z</updated>

		<summary type="html">&lt;p&gt;H Weber: /* sbatch Examples */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&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 [[bwUniCluster 2.0|bwUniCluster 2.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 2.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;
If your job was submitted to the &amp;quot;multiple&amp;quot; queue you can log into the allocated nodes via SSH as soon as the job is running.&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 to the submission environment instead of &amp;lt;br&amp;gt; replacing it 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;
| -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&#039;&#039; or --constraint=&#039;&#039;BEEOND&#039;&#039;&lt;br /&gt;
| #SBATCH --constraint=BEEOND&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;
* [[BwUniCluster_2.0_Batch_Queues#sbatch_-p_queue|bwUniCluster 2.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_single -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=200gb&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=fat&#039;&#039; (with &#039;&#039;--partition=(dev_)single&#039;&#039; maximum &#039;&#039;--mem=96gb&#039;&#039; is possible):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sbatch --partition=fat 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;
To submit a batch job called &#039;&#039;OpenMP_Test&#039;&#039; that runs a 40-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 single --export=ALL,OMP_NUM_THREADS=40 -J OpenMP_Test -N 1 -c 40 -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=40&lt;br /&gt;
#SBATCH --time=40:00&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;single&#039;&#039; as sbatch option:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sbatch -p single 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=single --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 a defined module environment related to OpenMPI is wished&lt;br /&gt;
module load mpi/openmpi/&amp;lt;placeholder_for_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 single -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 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=multiple -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.&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 --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 MPIRUN_OPTIONS=&amp;quot;--bind-to core --map-by socket:PE=${SLURM_CPUS_PER_TASK} -report-bindings&amp;quot;&lt;br /&gt;
export OMP_NUM_THREADS=${SLURM_CPUS_PER_TASK}&lt;br /&gt;
export NUM_CORES=${SLURM_NTASKS}*${SLURM_CPUS_PER_TASK}&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 multiple_e ./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 40-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=40&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 multiple ./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 msub_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;
==== LSDF Online Storage ====&lt;br /&gt;
On bwUniCluster 2.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 compute nodes during the job runtime with the constraint flag &amp;quot;BEEOND&amp;quot; ([[ForHLR_-_SLURM_Batch_Jobs#sbatch_Command_Parameters | Slurm Command Parameters]])&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
#SBATCH ...&lt;br /&gt;
#SBATCH --constraint=BEEOND&lt;br /&gt;
&amp;lt;/pre&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 three pre-configured directories:&lt;br /&gt;
&amp;lt;pre&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;
#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, /mnt/odfs/$SLURM_JOB_ID/stripe_16 or /mnt/odfs/$SLURM_JOB_ID/stripe_32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you request less nodes than stripe count, the stripe count will be max number of nodes,&lt;br /&gt;
e.g., You only request 8 nodes , so the directory with stripe count 16 is basically only with a stripe count 8.&lt;br /&gt;
&lt;br /&gt;
The capacity of the private file system depends on the number of nodes. For each node you get 250Gbyte.&lt;br /&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&amp;gt;4 (4 x 250GB).  &lt;br /&gt;
&lt;br /&gt;
If you request 100 nodes for your job, the private file system is 100 * 250 Gbyte ~ 25 Tbyte (approx) capacity.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Recommendation:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The private file system is using its own metadata server. This metadata server is started on the first nodes. Depending on your application, the metadata server is consuming decent amount of CPU power. Probably adding a extra node to your job could improve the usability of the on-demand file system. Start your application with the MPI option:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mpirun -nolocal myapplication&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
With the -nolocal option the node where mpirun is initiated is not used for your application. This node is fully available for the meta data server of your requested on-demand file system.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example job script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
#very simple example on how to use a private on-demand file system&lt;br /&gt;
#SBATCH -N 10&lt;br /&gt;
#SBATCH --constraint=BEEOND&lt;br /&gt;
&lt;br /&gt;
#create a workspace &lt;br /&gt;
ws_allocate myresults-$SLURM_JOB_ID 90&lt;br /&gt;
RESULTDIR=`ws_find myresults-$SLURM_JOB_ID`&lt;br /&gt;
&lt;br /&gt;
#Set ENV variable to on-demand file system&lt;br /&gt;
ODFSDIR=/mnt/odfs/$SLURM_JOB_ID/stripe_16/&lt;br /&gt;
&lt;br /&gt;
#start application and write results to on-demand file system&lt;br /&gt;
mpirun -nolocal myapplication -o $ODFSDIR/results&lt;br /&gt;
&lt;br /&gt;
#Copy back data after your job application end&lt;br /&gt;
rsync -av $ODFSDIR/results $RESULTDIR&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
--&amp;gt;&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;
          18088744    single CPV.sbat   ab1234 PD       0:00      1 (Priority)&lt;br /&gt;
          18098414  multiple CPV.sbat   ab1234 PD       0:00      2 (Priority) &lt;br /&gt;
          18090089  multiple CPV.sbat   ab1234  R       2:27      2 uc2n[127-128]&lt;br /&gt;
$ squeue -l&lt;br /&gt;
            JOBID PARTITION     NAME     USER    STATE       TIME TIME_LIMI  NODES NODELIST(REASON) &lt;br /&gt;
         18088654    single CPV.sbat   ab1234 COMPLETI       4:29   2:00:00      1 uc2n374&lt;br /&gt;
         18088785    single CPV.sbat   ab1234  PENDING       0:00   2:00:00      1 (Priority)&lt;br /&gt;
         18098414  multiple CPV.sbat   ab1234  PENDING       0:00   2:00:00      2 (Priority)&lt;br /&gt;
         18088683    single CPV.sbat   ab1234  RUNNING       0:14   2:00:00      1 uc2n413  &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_multiple  :      8 nodes idle&lt;br /&gt;
Partition multiple      :    332 nodes idle&lt;br /&gt;
Partition dev_single    :      4 nodes idle&lt;br /&gt;
Partition single        :     76 nodes idle&lt;br /&gt;
Partition long          :     80 nodes idle&lt;br /&gt;
Partition fat           :      5 nodes idle&lt;br /&gt;
Partition dev_special   :    342 nodes idle&lt;br /&gt;
Partition special       :    342 nodes idle&lt;br /&gt;
Partition dev_multiple_e:      7 nodes idle&lt;br /&gt;
Partition multiple_e    :    335 nodes idle&lt;br /&gt;
Partition gpu_4         :     12 nodes idle&lt;br /&gt;
Partition gpu_8         :      6 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 2.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;
          18089884  multiple CPV.sbat   bq0742  R      33:44      2 uc2n[165-166]&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 18089884&lt;br /&gt;
&lt;br /&gt;
JobId=18089884 JobName=CPV.sbatch&lt;br /&gt;
   UserId=bq0742(8946) GroupId=scc(12345) MCS_label=N/A&lt;br /&gt;
   Priority=3 Nice=0 Account=kit 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:35:06 TimeLimit=02:00:00 TimeMin=N/A&lt;br /&gt;
   SubmitTime=2020-03-16T14:14:54 EligibleTime=2020-03-16T14:14:54&lt;br /&gt;
   AccrueTime=2020-03-16T14:14:54&lt;br /&gt;
   StartTime=2020-03-16T15:12:51 EndTime=2020-03-16T17:12:51 Deadline=N/A&lt;br /&gt;
   SuspendTime=None SecsPreSuspend=0 LastSchedEval=2020-03-16T15:12:51&lt;br /&gt;
   Partition=multiple AllocNode:Sid=uc2n995:5064&lt;br /&gt;
   ReqNodeList=(null) ExcNodeList=(null)&lt;br /&gt;
   NodeList=uc2n[165-166]&lt;br /&gt;
   BatchHost=uc2n165&lt;br /&gt;
   NumNodes=2 NumCPUs=160 NumTasks=80 CPUs/Task=1 ReqB:S:C:T=0:0:*:1&lt;br /&gt;
   TRES=cpu=160,mem=96320M,node=2,billing=160&lt;br /&gt;
   Socks/Node=* NtasksPerN:B:S:C=40:0:*:1 CoreSpec=*&lt;br /&gt;
   MinCPUsNode=40 MinMemoryCPU=1204M MinTmpDiskNode=0&lt;br /&gt;
   Features=(null) DelayBoot=00:00:00&lt;br /&gt;
   OverSubscribe=NO Contiguous=0 Licenses=(null) Network=(null)&lt;br /&gt;
   Command=/pfs/data5/home/kit/scc/bq0742/git/CPV/bin/CPV.sbatch&lt;br /&gt;
   WorkDir=/pfs/data5/home/kit/scc/bq0742/git/CPV/bin&lt;br /&gt;
   StdErr=/pfs/data5/home/kit/scc/bq0742/git/CPV/bin/slurm-18089884.out&lt;br /&gt;
   StdIn=/dev/null&lt;br /&gt;
   StdOut=/pfs/data5/home/kit/scc/bq0742/git/CPV/bin/slurm-18089884.out&lt;br /&gt;
   Power=&lt;br /&gt;
   MailUser=(null) MailType=NONE&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 18089884 | grep -i State&lt;br /&gt;
   JobState=COMPLETED 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;
{| width=750px 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 msub 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 PI 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#lbAI 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;
[[Category:bwUniCluster 2.0|bwUniCluster 2.0]]&lt;br /&gt;
[[#top|Back to top]]&lt;/div&gt;</summary>
		<author><name>H Weber</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster2.0/Hardware_and_Architecture&amp;diff=6128</id>
		<title>BwUniCluster2.0/Hardware and Architecture</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster2.0/Hardware_and_Architecture&amp;diff=6128"/>
		<updated>2020-03-19T10:48:18Z</updated>

		<summary type="html">&lt;p&gt;H Weber: /* BeeOND (BeeGFS On-Demand) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Architecture of bwUniCluster 2.0 =&lt;br /&gt;
&lt;br /&gt;
The bwUniCluster 2.0 is a parallel computer with distributed memory. Each node of system consists of at least two Intel Xeon processor, local memory, disks, network adapters and optionally accelerators (NVIDIA Tesla V100). All nodes are connected by a fast InfiniBand interconnect. In addition the file system&lt;br /&gt;
Lustre, that is connected by coupling the InfiniBand of the file server with the InfiniBand&lt;br /&gt;
switch of the compute cluster, is added to bwUniCluster 2.0 to provide a fast and scalable&lt;br /&gt;
parallel file system.&lt;br /&gt;
&lt;br /&gt;
The operating system on each node is Red Hat Enterprise Linux (RHEL) 7.7. A number of additional software packages like e.g. SLURM have been installed on top. Some of these components are of special interest to end users and are briefly&lt;br /&gt;
discussed in this document. Others which are of greater importance to system&lt;br /&gt;
administrators will not be covered by this document.&lt;br /&gt;
&lt;br /&gt;
The individual nodes of the system may act in different roles. According to the services supplied by the nodes, they are separated into disjoint groups. From an end users point of view the different groups of nodes are login nodes, compute nodes, file server nodes and administrative server nodes.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Login Nodes&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The login nodes are the only nodes that are directly accessible by end users. These nodes&lt;br /&gt;
are used for interactive login, file management, program development and interactive pre-&lt;br /&gt;
and postprocessing. Two nodes are dedicated to this service but they are all accessible via&lt;br /&gt;
one address and a DNS round-robin alias distributes the login sessions to the&lt;br /&gt;
different login nodes.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Compute Node&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The majority of nodes are compute nodes which are managed by a batch system. Users &lt;br /&gt;
submit their jobs to the SLURM batch system and a job is executed when the required resources become available (depending on its fair-share priority).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;File Server Nodes&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The hardware of the parallel file system Lustre incorporates some file server nodes; the file&lt;br /&gt;
system Lustre is connected by coupling the InfiniBand of the file server with the independent InfiniBand switch of the compute cluster. In addition to shared file space there is also local storage on the disks of each node (for details see chapter &amp;quot;File Systems&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Administrative Server Nodes&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Some other nodes are delivering additional services like resource management, external&lt;br /&gt;
network connection, administration etc. These nodes can be accessed directly by system administrators only.&lt;br /&gt;
&lt;br /&gt;
= Components of bwUniCluster =&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
! style=&amp;quot;width:9%&amp;quot;|&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Compute nodes &amp;quot;Thin&amp;quot;&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Compute nodes &amp;quot;HPC&amp;quot;&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Compute nodes &amp;quot;HPC Broadwell&amp;quot;&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Compute nodes &amp;quot;Fat&amp;quot;&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| GPU x4&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| GPU x8&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Login&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Number of nodes&lt;br /&gt;
| 100&lt;br /&gt;
| 360&lt;br /&gt;
| 352&lt;br /&gt;
| 6&lt;br /&gt;
| 14&lt;br /&gt;
| 10&lt;br /&gt;
| 4 + 2 (Broadwell)&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Processors&lt;br /&gt;
| Intel Xeon Gold 6230&lt;br /&gt;
| Intel Xeon Gold 6230&lt;br /&gt;
| Intel Xeon E5-2660 v4&lt;br /&gt;
| Intel Xeon Gold 6230&lt;br /&gt;
| Intel Xeon Gold 6230&lt;br /&gt;
| Intel Xeon Gold 6248&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Number of sockets&lt;br /&gt;
| 2&lt;br /&gt;
| 2&lt;br /&gt;
| 2&lt;br /&gt;
| 4&lt;br /&gt;
| 2&lt;br /&gt;
| 2&lt;br /&gt;
| 2&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Processor frequency (GHz)&lt;br /&gt;
| 2.1 Ghz&lt;br /&gt;
| 2.1 Ghz&lt;br /&gt;
| 2.0 GHz&lt;br /&gt;
| 2.1 Ghz&lt;br /&gt;
| 2.1 Ghz&lt;br /&gt;
| 2.1 Ghz&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Total number of cores&lt;br /&gt;
| 40&lt;br /&gt;
| 40&lt;br /&gt;
| 28&lt;br /&gt;
| 80&lt;br /&gt;
| 40&lt;br /&gt;
| 40&lt;br /&gt;
| 40 / 20 (Broadwell)&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Main memory&lt;br /&gt;
| 96 GB&lt;br /&gt;
| 96 GB&lt;br /&gt;
| 128 GB&lt;br /&gt;
| 3 TB&lt;br /&gt;
| 384 GB&lt;br /&gt;
| 768 GB&lt;br /&gt;
| 384 GB / 128 GB (Broadwell)&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Local SSD&lt;br /&gt;
| 960 GB SATA&lt;br /&gt;
| 960 GB SATA&lt;br /&gt;
| 480 GB SATA&lt;br /&gt;
| 4,8 TB NVMe&lt;br /&gt;
| 3,2 TB NVMe&lt;br /&gt;
| 6,4 TB NVMe&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Accelerators&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
| 4x NVIDIA Tesla V100&lt;br /&gt;
| 8x NVIDIA Tesla V100&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Interconnect&lt;br /&gt;
| IB HDR100 (blocking)&lt;br /&gt;
| IB HDR100&lt;br /&gt;
| IB FDR&lt;br /&gt;
| IB HDR&lt;br /&gt;
| IB HDR&lt;br /&gt;
| IB HDR&lt;br /&gt;
| IB HDR100 (blocking)&lt;br /&gt;
|}&lt;br /&gt;
Table 1: Properties of the nodes&lt;br /&gt;
&lt;br /&gt;
= File Systems =&lt;br /&gt;
&lt;br /&gt;
Details about changes on the file systems between bwUniCluster 1 and bwUniCluster 2.0 are described in the [[BwUniCluster_2.0_File_System_Migration_Guide|File system migration guide]]. Note that $WORK is deprecated.&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 2.0 the parallel file system Lustre is used for most globally visible user data. Lustre is open source and Lustre solutions and support are available from different vendors. Nowadays, most of the biggest HPC systems are using Lustre. An initial home directory on a Lustre file system is created during the first login, and the environment variable $HOME holds its name. Users can create so-called workspaces on another Lustre file system for non-permanent data with temporary lifetime.&lt;br /&gt;
&lt;br /&gt;
Within a batch job further file systems are available: &lt;br /&gt;
* The directory $TMP is only available and visible on the local node. It is located on fast SSD storage devices.&lt;br /&gt;
* On request a parallel on-demand file system is created which uses the SSDs of the nodes which were allocated to the batch job.&lt;br /&gt;
* On request the external LSDF Online Storage is mounted on the nodes which were allocated to the batch job. This file system is based on the parallel file system Spectrum Scale. &lt;br /&gt;
&lt;br /&gt;
Some of the characteristics of the file systems are shown in Table 2.&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;width:100%; vertical-align:top; background:#f5fffa;border:1px solid #000000;padding:1px&amp;quot;&lt;br /&gt;
|- style=&amp;quot;width:20%;height=20px; text-align:left;padding:3px&amp;quot;&lt;br /&gt;
! style=&amp;quot;background-color:#AAA;padding:3px&amp;quot;| Property&lt;br /&gt;
! style=&amp;quot;background-color:#AAA;padding:3px&amp;quot;| $TMP&lt;br /&gt;
! style=&amp;quot;background-color:#AAA;padding:3px&amp;quot;| $HOME&lt;br /&gt;
! style=&amp;quot;background-color:#AAA;padding:3px&amp;quot;| Workspace&lt;br /&gt;
|- &lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Visibility &lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| local&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| global&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| global&lt;br /&gt;
|- &lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Lifetime &lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| batch job runtime&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| permanent&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| max. 240 days&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Disk space &lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 960 GB - 6.4 TB &amp;lt;br&amp;gt; details see table 1&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 1.2 PiB&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 4.1 PiB&lt;br /&gt;
|- &lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Capacity Quotas&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| no&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| yes &amp;lt;br&amp;gt; 1 TiB per user &amp;lt;br&amp;gt; also per organization&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| yes &amp;lt;br&amp;gt; 40 TiB per user&lt;br /&gt;
|- &lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Inode Quotas&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| no&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| yes &amp;lt;br&amp;gt; 10 million per user&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| yes &amp;lt;br&amp;gt; 30 million per user&lt;br /&gt;
|- &lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Backup&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| no&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| yes&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| no&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Read perf./node&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 420 MB/s - 6 GB/s &amp;lt;br&amp;gt; depends on type of local SSD&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 1 GB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 1 GB/s&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Write perf./node&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 380 MB/s - 2 GB/s &amp;lt;br&amp;gt; depends on type of local SSD&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 1 GB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 1 GB/s&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Total read perf.&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| n*420-6000 MB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 18 GB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 54 GB/s&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Total write perf.&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| n*380-2000 MB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 18 GB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 54 GB/s&lt;br /&gt;
|}&lt;br /&gt;
---------------------------------------------------------------------------------------------------------&lt;br /&gt;
  global: all nodes of uc1 access the same file system;&lt;br /&gt;
  local: each node has its own file system;&lt;br /&gt;
  permanent: files are stored permanently;&lt;br /&gt;
  batch job: files are removed at end of the batch job.&lt;br /&gt;
---------------------------------------------------------------------------------------------------------&lt;br /&gt;
Table 2: Properties of the file systems&lt;br /&gt;
&lt;br /&gt;
== Selecting the appropriate file system ==&lt;br /&gt;
&lt;br /&gt;
In general, you should separate your data and store it on the appropriate file system.&lt;br /&gt;
Permanently needed data like software or important results should be stored below $HOME&lt;br /&gt;
but capacity restrictions (quotas) apply. In case you accidentally deleted data on $HOME&lt;br /&gt;
you can usually restore it from backup. Permanent data which is not needed for months&lt;br /&gt;
or exceeds the capacity restrictions should be sent to bwFileStorage, to the LSDF Online Storage, &lt;br /&gt;
or to the archive and deleted from the file systems. Temporary data which is only needed on a single&lt;br /&gt;
node and which does not exceed the disk space shown in the table above should be stored&lt;br /&gt;
below $TMP. Temporary data which is only needed during job runs should be stored on a &lt;br /&gt;
parallel on-demand file system. Temporary data which can be recomputed or which is the &lt;br /&gt;
result of one job and input for another job should be stored below in workspaces. The lifetime &lt;br /&gt;
of data in workspaces is limited and depends on the lifetime of the workspace which can be &lt;br /&gt;
several months. &lt;br /&gt;
&lt;br /&gt;
The most efficient way to transfer data to/from other HPC file systems or bwFileStorage is done&lt;br /&gt;
with the tool rdata.&lt;br /&gt;
&lt;br /&gt;
For further details please check the chapters below.&lt;br /&gt;
&lt;br /&gt;
== $HOME ==&lt;br /&gt;
&lt;br /&gt;
The home directories of bwUniCluster 2.0 (uc2) users are located in the parallel file system Lustre.&lt;br /&gt;
You have access to your home directory from all nodes of uc2. A regular backup of these directories &lt;br /&gt;
to tape archive is done automatically. The directory $HOME is used to hold those files that are&lt;br /&gt;
permanently used like source codes, configuration files, executable programs etc. &lt;br /&gt;
&lt;br /&gt;
On uc2 there is a default user quota limit of 1 TiB and 10 million inodes (files and directories) per user. &lt;br /&gt;
You can chek your current usage and limits with the command&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ lfs quota -uh $(whoami) $HOME&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In addition to the user limit there is a limit of your organization (e.g. university) which depends on the financial share. This limit is enforced with so-called Lustre project quotas. You can show the current usage and limits of your organization with the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
lfs quota -ph $(grep $(echo $HOME | sed -e &amp;quot;s|/[^/]*/[^/]*$||&amp;quot;) /pfs/data5/project_ids.txt | cut -f 1 -d\ ) $HOME&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Workspaces ==&lt;br /&gt;
&lt;br /&gt;
On uc2 workspaces can be used to store large non-permanent data sets, e.g. restart files or output&lt;br /&gt;
data that has to be post-processed. The file system used for workspaces is also the parallel file system Lustre. This file system is especially designed for parallel access and for a high throughput to large&lt;br /&gt;
files. It is able to provide high data transfer rates of up to 54 GB/s write and read performance when data access is parallel. &lt;br /&gt;
&lt;br /&gt;
Workspaces have a lifetime and the data on a workspace expires as a whole after a fixed period. The maximum lifetime of a workspace is 60 days, but it can be renewed at the end of that period 3 times to a total maximum of 240 days after workspace generation. If a workspace has inadvertently expired we can restore the data during a limited time (few weeks). In this case you should create a new workspace and report the name of the new and of the expired workspace in a ticket or in an email to the hotline.&lt;br /&gt;
&lt;br /&gt;
Creating, deleting, finding and extending workspaces is explained on the  [[workspace]] page.&lt;br /&gt;
&lt;br /&gt;
On uc2 there is a default user quota limit of 40 TiB and 30 million inodes (files and directories) per user. &lt;br /&gt;
You can chek your current usage and limits with the command&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ lfs quota -uh $(whoami) /pfs/work7&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Reminder for workspace deletion ===&lt;br /&gt;
&lt;br /&gt;
Normally you will get an email every day starting 7 days before a workspace expires. You can send yourself a calender entry which reminds you when a workspace will be automatically deleted:&lt;br /&gt;
&lt;br /&gt;
 $ ws_send_ical.sh &amp;lt;workspace&amp;gt; &amp;lt;email&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Improving Performance on $HOME and workspaces ==&lt;br /&gt;
&lt;br /&gt;
The following recommendations might help to improve throughput and metadata&lt;br /&gt;
performance on Lustre filesystems.&lt;br /&gt;
&lt;br /&gt;
=== &#039;&#039;&#039;Improving Throughput Performance&#039;&#039;&#039; ===&lt;br /&gt;
&lt;br /&gt;
Depending on your application some adaptations might be necessary if you want to reach&lt;br /&gt;
the full bandwidth of the filesystems. Parallel filesystems typically stripe files over storage subsystems, i.e. large files are separated into stripes and distributed to different storage subsystems. In Lustre, the size of these stripes (sometimes also mentioned as chunks) is called stripe size and the number of used storage subsystems is called stripe count.&lt;br /&gt;
&lt;br /&gt;
When you are designing your application you should consider that the performance of&lt;br /&gt;
parallel filesystems is generally better if data is transferred in large blocks and stored in&lt;br /&gt;
few large files. In more detail, to increase throughput performance of a parallel application&lt;br /&gt;
following aspects should be considered:&lt;br /&gt;
&lt;br /&gt;
* collect large chunks of data and write them sequentially at once,&lt;br /&gt;
&lt;br /&gt;
* to exploit complete filesystem bandwidth use several clients,&lt;br /&gt;
&lt;br /&gt;
* avoid competitive file access by different tasks or use blocks with boundaries at stripe size (default is 1MB),&lt;br /&gt;
&lt;br /&gt;
* if files are small enough for the SSDs and are only used by one process store them on $TMP.&lt;br /&gt;
&lt;br /&gt;
With previous Lustre versions adapting the Lustre stripe count was the most important optimization. However, for the workspaces of uc2 the new Lustre feature Progressive File Layouts has been used to define file striping parameters. This means that the stripe count is adapted if the file size is growing. In normal cases users no longer need to adapt file striping parameters in case they have very huge files or in order to reach better performance. &lt;br /&gt;
&lt;br /&gt;
If you know what you are doing you can still change striping parameters, e.g. the stripe count, of a directory and of newly created files. New files and directories inherit the stripe count from the parent directory. E.g. if you want to enhance throughput on a single very large file which is created in the directory $HOME/my_output_dir you can use the command&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ lfs setstripe -c-1 $HOME/my_output_dir&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
to change the stripe count to -1 which means that all storage subsystems of the file system are used to store that file. If you change the stripe count of a directory the stripe count of existing files inside this&lt;br /&gt;
directory is not changed. If you want to change the stripe count of existing files, change&lt;br /&gt;
the stripe count of the parent directory, copy the files to new files, remove the old files&lt;br /&gt;
and move the new files back to the old name. In order to check the stripe setting of&lt;br /&gt;
the file my_file use&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ lfs getstripe my_file&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Also note that changes on the striping parameters (e.g. stripe count) are not saved in the&lt;br /&gt;
backup, i.e. if directories have to be recreated this information is lost and the default stripe&lt;br /&gt;
count will be used. Therefore, you should annotate for which directories you made changes&lt;br /&gt;
to the striping parameters so that you can repeat these changes if required.&lt;br /&gt;
&lt;br /&gt;
=== &#039;&#039;&#039;Improving Metadata Performance&#039;&#039;&#039; ===&lt;br /&gt;
&lt;br /&gt;
Metadata performance on parallel file systems is usually not as good as with local&lt;br /&gt;
filesystems. In addition, it is usually not scalable, i.e. a limited resource. Therefore,&lt;br /&gt;
you should omit metadata operations whenever possible. For example, it is much better&lt;br /&gt;
to have few large files than lots of small files. In more detail, to increase metadata&lt;br /&gt;
performance of a parallel application following aspects should be considered:&lt;br /&gt;
&lt;br /&gt;
* avoid creating many small files,&lt;br /&gt;
&lt;br /&gt;
* avoid competitive directory access, e.g. by creating files in separate subdirectories for each task,&lt;br /&gt;
&lt;br /&gt;
* if many small files are only used within a batch job and accessed by one process store them on $TMP,&lt;br /&gt;
&lt;br /&gt;
* change the default colorization setting of the command ls (see below).&lt;br /&gt;
&lt;br /&gt;
On modern Linux systems, the GNU ls command often uses colorization by default to&lt;br /&gt;
visually highlight the file type; this is especially true if the command is run within a terminal&lt;br /&gt;
session. This is because the default shell profile initializations usually contain an alias&lt;br /&gt;
directive similar to the following for the ls command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ alias ls=&amp;quot;ls --color=tty&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
However, running the ls command in this way for files on a Lustre file system requires&lt;br /&gt;
a stat() call to be used to determine the file type. This can result in a performance&lt;br /&gt;
overhead, because the stat() call always needs to determine the size of a file, and that&lt;br /&gt;
in turn means that the client node must query the object size of all the backing objects&lt;br /&gt;
that make up a file. As a result of the default colorization setting, running a simple&lt;br /&gt;
ls command on a Lustre file system often takes as much time as running the ls command&lt;br /&gt;
with the -l option (the same is true if the -F, -p, or the -classify option, or any other option &lt;br /&gt;
that requires information from a stat() call, is used). To avoid this performance overhead&lt;br /&gt;
when using ls commands, add an alias directive similar to the following&lt;br /&gt;
to your shell startup script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ alias ls=&amp;quot;ls --color=never&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== $TMP ==&lt;br /&gt;
&lt;br /&gt;
While all tasks of a parallel application access the same $HOME and workspace directory, the &lt;br /&gt;
$TMP directory is local to each node on bwUniCluster 2.0. Different tasks of a parallel&lt;br /&gt;
application use different directories when they do not utilize one node. This directory should&lt;br /&gt;
be used for temporary files being accessed by single tasks. All nodes have fast SSDs &lt;br /&gt;
local storage devices which are used to store data below $TMP. &lt;br /&gt;
In addition, this directory should be used for the installation&lt;br /&gt;
of software packages. This means that the software package to be installed should be&lt;br /&gt;
unpacked, compiled and linked in a subdirectory of $TMP. The real installation of the&lt;br /&gt;
package (e.g. make install) should be made in(to) the Lustre filesystem. &lt;br /&gt;
&lt;br /&gt;
Each time a batch&lt;br /&gt;
job is started, a subdirectory is created on each node and assigned to the job. $TMP is newly&lt;br /&gt;
set; the name of the subdirectory contains the Job-id and the starting time so that the&lt;br /&gt;
subdirectory name is unique for each job. This unique name is then assigned to the&lt;br /&gt;
environment variable $TMP within the job. At the end of the job the subdirectory is removed.&lt;br /&gt;
&lt;br /&gt;
== LSDF Online Storage==&lt;br /&gt;
&lt;br /&gt;
In some cases it is useful to have access to the LSDF Online Storage on the HPC-Clusters also. Therefore the LSDF Online Storage is mounted on the Login- and Datamover-Nodes.&lt;br /&gt;
Furthermore it can be used on the compute nodes during the job runtime with the constraint flag &amp;quot;LSDF&amp;quot; ([[bwUniCluster_2.0_Slurm_common_Features|Slurm common features]]&lt;br /&gt;
). There is also an example about the LSDF batch usage: [[bwUniCluster_2.0_Slurm_common_Features#LSDF_Online_Storage|Slurm LSDF example ]] .&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
#SBATCH ...&lt;br /&gt;
#SBATCH --constraint=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 the following environment variables are available: $LSDF, $LSDFPROJECTS, $LSDFHOME.&lt;br /&gt;
Please request storage projects in the LSDF Online Storage seperately:&lt;br /&gt;
[https://www.lsdf.kit.edu/os/storagerequest/: LSDF Storage Request].&lt;br /&gt;
&lt;br /&gt;
== Access to other HPC-Filesystems==&lt;br /&gt;
&lt;br /&gt;
Users of several SCC HPC-Clusters and users of the LSDF online storage have the possibility to transfer data over the &amp;quot;data mover&amp;quot; nodes via the tool &amp;quot;rdata&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The command &#039;&#039;&#039;rdata&#039;&#039;&#039; executes the filesystem operations on special &amp;quot;data mover&amp;quot; nodes and distributes the load. Examples for the command are:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rdata &amp;quot;ls $LSDFHOME/*.c&amp;quot;&lt;br /&gt;
$ rdata &amp;quot;cp $WORK/foo $LSDFHOME&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The command&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ man rdata&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
shows how to use the command &#039;&#039;&#039;rdata&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
===$WORK of SCC HPC-Clusters===&lt;br /&gt;
&lt;br /&gt;
From ForHLR I and ForHLR II can transfer data of the $WORK filesystem to the bwUniCluster via the tool &amp;quot;rdata&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===$PROJECT of the ForHLR I===&lt;br /&gt;
&lt;br /&gt;
Users of ForHLR I and ForHLR II can transfer data of the $PROJECT file system to the bwUniCluster via the tool &amp;quot;rdata&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===LSDF online storage===&lt;br /&gt;
&lt;br /&gt;
Users of the &#039;&#039;&#039;LSDF online storage&#039;&#039;&#039; can furthermore transfer data to bwUniCluster via the tool &#039;&#039;&#039;rdata&#039;&#039;&#039;.&lt;br /&gt;
Therefore the environment variables $LSDF, $LSDFPROJECTS and $LSDFHOME are set.&lt;br /&gt;
&lt;br /&gt;
===BeeOND (BeeGFS On-Demand)===&lt;br /&gt;
&lt;br /&gt;
Users of the HPC-Cluster have possibility to request a private BeeOND (BeeGFS) parallel filesystem for each job. The file system is created during job startup and purged after your job.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;IMPORTANT: All data on the private filesystem will be deleted after your job. Make sure you have copied your data back to the global filesystem (within job), e.g., $HOME or any workspace.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
BeeOND/BeeGFS can be used like any other parallel file system. Tools like cp or rsync can be used to copy data in and out. This feature is currently under BETA. If you encounter any problems or have questions, please contact fh-hotline@lists.kit.edu&lt;br /&gt;
&lt;br /&gt;
For detailed usage see here: [[BwUniCluster_2.0_Slurm_common_Features#BeeOND_.28BeeGFS_On-Demand.29&lt;br /&gt;
|Request on-demand file system]]&lt;br /&gt;
&lt;br /&gt;
== Filetransfer to bwDataArchive and SDS@HD ==&lt;br /&gt;
&lt;br /&gt;
On the HPC-Clusters you can use the rdata tool to copy files&lt;br /&gt;
to the bwDataArchive or to the SDS@hd Storage.&lt;br /&gt;
&lt;br /&gt;
Please do the following steps for the preparation:&lt;br /&gt;
&lt;br /&gt;
1) Register for the service you want to use:&lt;br /&gt;
&lt;br /&gt;
bwDataArchive: https://www.rda.kit.edu/index.php&lt;br /&gt;
&lt;br /&gt;
SDS@hd:        https://sds-hd.urz.uni-heidelberg.de&lt;br /&gt;
&lt;br /&gt;
2) Create and transfer a ssh-key with no passphrase on the HPC-Cluster&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd .ssh&lt;br /&gt;
ssh-keygen -b 2048 -t rsa -f &amp;lt;ssh_key&amp;gt;&lt;br /&gt;
chmod 700 ./&amp;lt;ssh-key&amp;gt;.*&lt;br /&gt;
&lt;br /&gt;
# bwDataArchive&lt;br /&gt;
sftp &amp;lt;user&amp;gt;@archive-sftp.lsdf.kit.edu&lt;br /&gt;
mkdir ssh&lt;br /&gt;
put /home/&amp;lt;org&amp;gt;/&amp;lt;group&amp;gt;/&amp;lt;user&amp;gt;/.ssh/&amp;lt;ssh-key&amp;gt;.pub private/ssh/&amp;lt;ssh-key&amp;gt;.pub&lt;br /&gt;
# Inform bwDataArchive Team per Mail about your ssh-key: bwarchiv-support@lists.kit.edu&lt;br /&gt;
# They will move the key to the right place.&lt;br /&gt;
&lt;br /&gt;
# SDS@hd&lt;br /&gt;
sftp &amp;lt;user&amp;gt;@lsdf02-sshfs.urz.uni-heidelberg.de&lt;br /&gt;
put /home/&amp;lt;org&amp;gt;/&amp;lt;group&amp;gt;/&amp;lt;user&amp;gt;/.ssh/&amp;lt;ssh-key&amp;gt;.pub .ssh/authorized_keys&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3) Aggregrate files&lt;br /&gt;
Please store multiple small files in one single file with a tool like &amp;quot;tar&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
4) Create your batch file for sftp&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
vi sftpfile&lt;br /&gt;
put -p /home/&amp;lt;org&amp;gt;/&amp;lt;group&amp;gt;/&amp;lt;user&amp;gt;/&amp;lt;dir&amp;gt;/&amp;lt;file&amp;gt; private/&amp;lt;dir&amp;gt;/&amp;lt;file&amp;gt;&lt;br /&gt;
put -p /home/&amp;lt;org&amp;gt;/&amp;lt;group&amp;gt;/&amp;lt;user&amp;gt;/&amp;lt;file&amp;gt; &amp;lt;SDS-project&amp;gt;/&amp;lt;dir&amp;gt;/&amp;lt;file&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5) transfer your files with sftp or lftp&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# bwDataArchive&lt;br /&gt;
rdata sftp -b sftpfile &amp;lt;user&amp;gt;@archive-sftp.lsdf.kit.edu&lt;br /&gt;
rdata &amp;quot;lftp -u &amp;lt;user&amp;gt;,pwd sftp://archive-sftp.lsdf.kit.edu -e \&amp;quot;ls -l private/; bye\&amp;quot;&amp;quot;&lt;br /&gt;
rdata &amp;quot;lftp -u &amp;lt;user&amp;gt;,pwd sftp://archive-sftp.lsdf.kit.edu -e \&amp;quot;put &amp;lt;file&amp;gt; -o private/&amp;lt;file&amp;gt;; bye\&amp;quot;&amp;quot;&lt;br /&gt;
rdata &amp;quot;lftp -u &amp;lt;user&amp;gt;,pwd sftp://archive-sftp.lsdf.kit.edu -e \&amp;quot;mirror -c -R -P4 &amp;lt;directory&amp;gt; private/&amp;lt;directory&amp;gt;; bye\&amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# SDS@hd&lt;br /&gt;
rdata sftp -b sftpfile &amp;lt;user&amp;gt;@lsdf02-sshfs.urz.uni-heidelberg.de&lt;br /&gt;
rdata &amp;quot;lftp -u &amp;lt;user&amp;gt;,pwd sftp://lsdf02-sshfs.urz.uni-heidelberg.de -e \&amp;quot;ls -l &amp;lt;project&amp;gt;/; bye\&amp;quot;&amp;quot;&lt;br /&gt;
rdata &amp;quot;lftp -u &amp;lt;user&amp;gt;,pwd sftp://lsdf02-sshfs.urz.uni-heidelberg.de -e \&amp;quot;put &amp;lt;file&amp;gt; -o &amp;lt;project&amp;gt;/&amp;lt;file&amp;gt;; bye\&amp;quot;&amp;quot;&lt;br /&gt;
rdata &amp;quot;lftp -u &amp;lt;user&amp;gt;,pwd sftp://lsdf02-sshfs.urz.uni-heidelberg.de -e \&amp;quot;mirror -c -R -P4 &amp;lt;directory&amp;gt; &amp;lt;project&amp;gt;/&amp;lt;directory&amp;gt;; bye\&amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# with the command &amp;quot;screen&amp;quot; you can run your commands in the backgroud and log out.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Backup and Archiving==&lt;br /&gt;
&lt;br /&gt;
There are regular backups of all data of the home directories,whereas ACLs and extended attributes will&lt;br /&gt;
not be backuped. &lt;br /&gt;
Please contact the hotline if you need backuped data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:bwUniCluster 2.0|File System]][[Category:Hardware_and_Architecture|bwUniCluster 2.0]]&lt;/div&gt;</summary>
		<author><name>H Weber</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster2.0/Hardware_and_Architecture&amp;diff=6127</id>
		<title>BwUniCluster2.0/Hardware and Architecture</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster2.0/Hardware_and_Architecture&amp;diff=6127"/>
		<updated>2020-03-19T10:47:20Z</updated>

		<summary type="html">&lt;p&gt;H Weber: /* Access to other HPC-Filesystems */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Architecture of bwUniCluster 2.0 =&lt;br /&gt;
&lt;br /&gt;
The bwUniCluster 2.0 is a parallel computer with distributed memory. Each node of system consists of at least two Intel Xeon processor, local memory, disks, network adapters and optionally accelerators (NVIDIA Tesla V100). All nodes are connected by a fast InfiniBand interconnect. In addition the file system&lt;br /&gt;
Lustre, that is connected by coupling the InfiniBand of the file server with the InfiniBand&lt;br /&gt;
switch of the compute cluster, is added to bwUniCluster 2.0 to provide a fast and scalable&lt;br /&gt;
parallel file system.&lt;br /&gt;
&lt;br /&gt;
The operating system on each node is Red Hat Enterprise Linux (RHEL) 7.7. A number of additional software packages like e.g. SLURM have been installed on top. Some of these components are of special interest to end users and are briefly&lt;br /&gt;
discussed in this document. Others which are of greater importance to system&lt;br /&gt;
administrators will not be covered by this document.&lt;br /&gt;
&lt;br /&gt;
The individual nodes of the system may act in different roles. According to the services supplied by the nodes, they are separated into disjoint groups. From an end users point of view the different groups of nodes are login nodes, compute nodes, file server nodes and administrative server nodes.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Login Nodes&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The login nodes are the only nodes that are directly accessible by end users. These nodes&lt;br /&gt;
are used for interactive login, file management, program development and interactive pre-&lt;br /&gt;
and postprocessing. Two nodes are dedicated to this service but they are all accessible via&lt;br /&gt;
one address and a DNS round-robin alias distributes the login sessions to the&lt;br /&gt;
different login nodes.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Compute Node&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The majority of nodes are compute nodes which are managed by a batch system. Users &lt;br /&gt;
submit their jobs to the SLURM batch system and a job is executed when the required resources become available (depending on its fair-share priority).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;File Server Nodes&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The hardware of the parallel file system Lustre incorporates some file server nodes; the file&lt;br /&gt;
system Lustre is connected by coupling the InfiniBand of the file server with the independent InfiniBand switch of the compute cluster. In addition to shared file space there is also local storage on the disks of each node (for details see chapter &amp;quot;File Systems&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Administrative Server Nodes&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Some other nodes are delivering additional services like resource management, external&lt;br /&gt;
network connection, administration etc. These nodes can be accessed directly by system administrators only.&lt;br /&gt;
&lt;br /&gt;
= Components of bwUniCluster =&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
! style=&amp;quot;width:9%&amp;quot;|&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Compute nodes &amp;quot;Thin&amp;quot;&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Compute nodes &amp;quot;HPC&amp;quot;&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Compute nodes &amp;quot;HPC Broadwell&amp;quot;&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Compute nodes &amp;quot;Fat&amp;quot;&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| GPU x4&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| GPU x8&lt;br /&gt;
! style=&amp;quot;width:13%&amp;quot;| Login&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Number of nodes&lt;br /&gt;
| 100&lt;br /&gt;
| 360&lt;br /&gt;
| 352&lt;br /&gt;
| 6&lt;br /&gt;
| 14&lt;br /&gt;
| 10&lt;br /&gt;
| 4 + 2 (Broadwell)&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Processors&lt;br /&gt;
| Intel Xeon Gold 6230&lt;br /&gt;
| Intel Xeon Gold 6230&lt;br /&gt;
| Intel Xeon E5-2660 v4&lt;br /&gt;
| Intel Xeon Gold 6230&lt;br /&gt;
| Intel Xeon Gold 6230&lt;br /&gt;
| Intel Xeon Gold 6248&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Number of sockets&lt;br /&gt;
| 2&lt;br /&gt;
| 2&lt;br /&gt;
| 2&lt;br /&gt;
| 4&lt;br /&gt;
| 2&lt;br /&gt;
| 2&lt;br /&gt;
| 2&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Processor frequency (GHz)&lt;br /&gt;
| 2.1 Ghz&lt;br /&gt;
| 2.1 Ghz&lt;br /&gt;
| 2.0 GHz&lt;br /&gt;
| 2.1 Ghz&lt;br /&gt;
| 2.1 Ghz&lt;br /&gt;
| 2.1 Ghz&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Total number of cores&lt;br /&gt;
| 40&lt;br /&gt;
| 40&lt;br /&gt;
| 28&lt;br /&gt;
| 80&lt;br /&gt;
| 40&lt;br /&gt;
| 40&lt;br /&gt;
| 40 / 20 (Broadwell)&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Main memory&lt;br /&gt;
| 96 GB&lt;br /&gt;
| 96 GB&lt;br /&gt;
| 128 GB&lt;br /&gt;
| 3 TB&lt;br /&gt;
| 384 GB&lt;br /&gt;
| 768 GB&lt;br /&gt;
| 384 GB / 128 GB (Broadwell)&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Local SSD&lt;br /&gt;
| 960 GB SATA&lt;br /&gt;
| 960 GB SATA&lt;br /&gt;
| 480 GB SATA&lt;br /&gt;
| 4,8 TB NVMe&lt;br /&gt;
| 3,2 TB NVMe&lt;br /&gt;
| 6,4 TB NVMe&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Accelerators&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
| 4x NVIDIA Tesla V100&lt;br /&gt;
| 8x NVIDIA Tesla V100&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;column&amp;quot;| Interconnect&lt;br /&gt;
| IB HDR100 (blocking)&lt;br /&gt;
| IB HDR100&lt;br /&gt;
| IB FDR&lt;br /&gt;
| IB HDR&lt;br /&gt;
| IB HDR&lt;br /&gt;
| IB HDR&lt;br /&gt;
| IB HDR100 (blocking)&lt;br /&gt;
|}&lt;br /&gt;
Table 1: Properties of the nodes&lt;br /&gt;
&lt;br /&gt;
= File Systems =&lt;br /&gt;
&lt;br /&gt;
Details about changes on the file systems between bwUniCluster 1 and bwUniCluster 2.0 are described in the [[BwUniCluster_2.0_File_System_Migration_Guide|File system migration guide]]. Note that $WORK is deprecated.&lt;br /&gt;
&lt;br /&gt;
On bwUniCluster 2.0 the parallel file system Lustre is used for most globally visible user data. Lustre is open source and Lustre solutions and support are available from different vendors. Nowadays, most of the biggest HPC systems are using Lustre. An initial home directory on a Lustre file system is created during the first login, and the environment variable $HOME holds its name. Users can create so-called workspaces on another Lustre file system for non-permanent data with temporary lifetime.&lt;br /&gt;
&lt;br /&gt;
Within a batch job further file systems are available: &lt;br /&gt;
* The directory $TMP is only available and visible on the local node. It is located on fast SSD storage devices.&lt;br /&gt;
* On request a parallel on-demand file system is created which uses the SSDs of the nodes which were allocated to the batch job.&lt;br /&gt;
* On request the external LSDF Online Storage is mounted on the nodes which were allocated to the batch job. This file system is based on the parallel file system Spectrum Scale. &lt;br /&gt;
&lt;br /&gt;
Some of the characteristics of the file systems are shown in Table 2.&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;width:100%; vertical-align:top; background:#f5fffa;border:1px solid #000000;padding:1px&amp;quot;&lt;br /&gt;
|- style=&amp;quot;width:20%;height=20px; text-align:left;padding:3px&amp;quot;&lt;br /&gt;
! style=&amp;quot;background-color:#AAA;padding:3px&amp;quot;| Property&lt;br /&gt;
! style=&amp;quot;background-color:#AAA;padding:3px&amp;quot;| $TMP&lt;br /&gt;
! style=&amp;quot;background-color:#AAA;padding:3px&amp;quot;| $HOME&lt;br /&gt;
! style=&amp;quot;background-color:#AAA;padding:3px&amp;quot;| Workspace&lt;br /&gt;
|- &lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Visibility &lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| local&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| global&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| global&lt;br /&gt;
|- &lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Lifetime &lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| batch job runtime&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| permanent&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| max. 240 days&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Disk space &lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 960 GB - 6.4 TB &amp;lt;br&amp;gt; details see table 1&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 1.2 PiB&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 4.1 PiB&lt;br /&gt;
|- &lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Capacity Quotas&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| no&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| yes &amp;lt;br&amp;gt; 1 TiB per user &amp;lt;br&amp;gt; also per organization&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| yes &amp;lt;br&amp;gt; 40 TiB per user&lt;br /&gt;
|- &lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Inode Quotas&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| no&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| yes &amp;lt;br&amp;gt; 10 million per user&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| yes &amp;lt;br&amp;gt; 30 million per user&lt;br /&gt;
|- &lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Backup&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| no&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| yes&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| no&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Read perf./node&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 420 MB/s - 6 GB/s &amp;lt;br&amp;gt; depends on type of local SSD&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 1 GB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 1 GB/s&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Write perf./node&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 380 MB/s - 2 GB/s &amp;lt;br&amp;gt; depends on type of local SSD&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 1 GB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 1 GB/s&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Total read perf.&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| n*420-6000 MB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 18 GB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 54 GB/s&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
| style=&amp;quot;background-color:#d3ddd8;height=20px; text-align:left;padding:3px&amp;quot;| Total write perf.&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| n*380-2000 MB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 18 GB/s&lt;br /&gt;
| style=&amp;quot;height=20px; text-align:left;padding:3px&amp;quot;| 54 GB/s&lt;br /&gt;
|}&lt;br /&gt;
---------------------------------------------------------------------------------------------------------&lt;br /&gt;
  global: all nodes of uc1 access the same file system;&lt;br /&gt;
  local: each node has its own file system;&lt;br /&gt;
  permanent: files are stored permanently;&lt;br /&gt;
  batch job: files are removed at end of the batch job.&lt;br /&gt;
---------------------------------------------------------------------------------------------------------&lt;br /&gt;
Table 2: Properties of the file systems&lt;br /&gt;
&lt;br /&gt;
== Selecting the appropriate file system ==&lt;br /&gt;
&lt;br /&gt;
In general, you should separate your data and store it on the appropriate file system.&lt;br /&gt;
Permanently needed data like software or important results should be stored below $HOME&lt;br /&gt;
but capacity restrictions (quotas) apply. In case you accidentally deleted data on $HOME&lt;br /&gt;
you can usually restore it from backup. Permanent data which is not needed for months&lt;br /&gt;
or exceeds the capacity restrictions should be sent to bwFileStorage, to the LSDF Online Storage, &lt;br /&gt;
or to the archive and deleted from the file systems. Temporary data which is only needed on a single&lt;br /&gt;
node and which does not exceed the disk space shown in the table above should be stored&lt;br /&gt;
below $TMP. Temporary data which is only needed during job runs should be stored on a &lt;br /&gt;
parallel on-demand file system. Temporary data which can be recomputed or which is the &lt;br /&gt;
result of one job and input for another job should be stored below in workspaces. The lifetime &lt;br /&gt;
of data in workspaces is limited and depends on the lifetime of the workspace which can be &lt;br /&gt;
several months. &lt;br /&gt;
&lt;br /&gt;
The most efficient way to transfer data to/from other HPC file systems or bwFileStorage is done&lt;br /&gt;
with the tool rdata.&lt;br /&gt;
&lt;br /&gt;
For further details please check the chapters below.&lt;br /&gt;
&lt;br /&gt;
== $HOME ==&lt;br /&gt;
&lt;br /&gt;
The home directories of bwUniCluster 2.0 (uc2) users are located in the parallel file system Lustre.&lt;br /&gt;
You have access to your home directory from all nodes of uc2. A regular backup of these directories &lt;br /&gt;
to tape archive is done automatically. The directory $HOME is used to hold those files that are&lt;br /&gt;
permanently used like source codes, configuration files, executable programs etc. &lt;br /&gt;
&lt;br /&gt;
On uc2 there is a default user quota limit of 1 TiB and 10 million inodes (files and directories) per user. &lt;br /&gt;
You can chek your current usage and limits with the command&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ lfs quota -uh $(whoami) $HOME&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In addition to the user limit there is a limit of your organization (e.g. university) which depends on the financial share. This limit is enforced with so-called Lustre project quotas. You can show the current usage and limits of your organization with the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
lfs quota -ph $(grep $(echo $HOME | sed -e &amp;quot;s|/[^/]*/[^/]*$||&amp;quot;) /pfs/data5/project_ids.txt | cut -f 1 -d\ ) $HOME&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Workspaces ==&lt;br /&gt;
&lt;br /&gt;
On uc2 workspaces can be used to store large non-permanent data sets, e.g. restart files or output&lt;br /&gt;
data that has to be post-processed. The file system used for workspaces is also the parallel file system Lustre. This file system is especially designed for parallel access and for a high throughput to large&lt;br /&gt;
files. It is able to provide high data transfer rates of up to 54 GB/s write and read performance when data access is parallel. &lt;br /&gt;
&lt;br /&gt;
Workspaces have a lifetime and the data on a workspace expires as a whole after a fixed period. The maximum lifetime of a workspace is 60 days, but it can be renewed at the end of that period 3 times to a total maximum of 240 days after workspace generation. If a workspace has inadvertently expired we can restore the data during a limited time (few weeks). In this case you should create a new workspace and report the name of the new and of the expired workspace in a ticket or in an email to the hotline.&lt;br /&gt;
&lt;br /&gt;
Creating, deleting, finding and extending workspaces is explained on the  [[workspace]] page.&lt;br /&gt;
&lt;br /&gt;
On uc2 there is a default user quota limit of 40 TiB and 30 million inodes (files and directories) per user. &lt;br /&gt;
You can chek your current usage and limits with the command&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ lfs quota -uh $(whoami) /pfs/work7&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Reminder for workspace deletion ===&lt;br /&gt;
&lt;br /&gt;
Normally you will get an email every day starting 7 days before a workspace expires. You can send yourself a calender entry which reminds you when a workspace will be automatically deleted:&lt;br /&gt;
&lt;br /&gt;
 $ ws_send_ical.sh &amp;lt;workspace&amp;gt; &amp;lt;email&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Improving Performance on $HOME and workspaces ==&lt;br /&gt;
&lt;br /&gt;
The following recommendations might help to improve throughput and metadata&lt;br /&gt;
performance on Lustre filesystems.&lt;br /&gt;
&lt;br /&gt;
=== &#039;&#039;&#039;Improving Throughput Performance&#039;&#039;&#039; ===&lt;br /&gt;
&lt;br /&gt;
Depending on your application some adaptations might be necessary if you want to reach&lt;br /&gt;
the full bandwidth of the filesystems. Parallel filesystems typically stripe files over storage subsystems, i.e. large files are separated into stripes and distributed to different storage subsystems. In Lustre, the size of these stripes (sometimes also mentioned as chunks) is called stripe size and the number of used storage subsystems is called stripe count.&lt;br /&gt;
&lt;br /&gt;
When you are designing your application you should consider that the performance of&lt;br /&gt;
parallel filesystems is generally better if data is transferred in large blocks and stored in&lt;br /&gt;
few large files. In more detail, to increase throughput performance of a parallel application&lt;br /&gt;
following aspects should be considered:&lt;br /&gt;
&lt;br /&gt;
* collect large chunks of data and write them sequentially at once,&lt;br /&gt;
&lt;br /&gt;
* to exploit complete filesystem bandwidth use several clients,&lt;br /&gt;
&lt;br /&gt;
* avoid competitive file access by different tasks or use blocks with boundaries at stripe size (default is 1MB),&lt;br /&gt;
&lt;br /&gt;
* if files are small enough for the SSDs and are only used by one process store them on $TMP.&lt;br /&gt;
&lt;br /&gt;
With previous Lustre versions adapting the Lustre stripe count was the most important optimization. However, for the workspaces of uc2 the new Lustre feature Progressive File Layouts has been used to define file striping parameters. This means that the stripe count is adapted if the file size is growing. In normal cases users no longer need to adapt file striping parameters in case they have very huge files or in order to reach better performance. &lt;br /&gt;
&lt;br /&gt;
If you know what you are doing you can still change striping parameters, e.g. the stripe count, of a directory and of newly created files. New files and directories inherit the stripe count from the parent directory. E.g. if you want to enhance throughput on a single very large file which is created in the directory $HOME/my_output_dir you can use the command&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ lfs setstripe -c-1 $HOME/my_output_dir&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
to change the stripe count to -1 which means that all storage subsystems of the file system are used to store that file. If you change the stripe count of a directory the stripe count of existing files inside this&lt;br /&gt;
directory is not changed. If you want to change the stripe count of existing files, change&lt;br /&gt;
the stripe count of the parent directory, copy the files to new files, remove the old files&lt;br /&gt;
and move the new files back to the old name. In order to check the stripe setting of&lt;br /&gt;
the file my_file use&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ lfs getstripe my_file&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Also note that changes on the striping parameters (e.g. stripe count) are not saved in the&lt;br /&gt;
backup, i.e. if directories have to be recreated this information is lost and the default stripe&lt;br /&gt;
count will be used. Therefore, you should annotate for which directories you made changes&lt;br /&gt;
to the striping parameters so that you can repeat these changes if required.&lt;br /&gt;
&lt;br /&gt;
=== &#039;&#039;&#039;Improving Metadata Performance&#039;&#039;&#039; ===&lt;br /&gt;
&lt;br /&gt;
Metadata performance on parallel file systems is usually not as good as with local&lt;br /&gt;
filesystems. In addition, it is usually not scalable, i.e. a limited resource. Therefore,&lt;br /&gt;
you should omit metadata operations whenever possible. For example, it is much better&lt;br /&gt;
to have few large files than lots of small files. In more detail, to increase metadata&lt;br /&gt;
performance of a parallel application following aspects should be considered:&lt;br /&gt;
&lt;br /&gt;
* avoid creating many small files,&lt;br /&gt;
&lt;br /&gt;
* avoid competitive directory access, e.g. by creating files in separate subdirectories for each task,&lt;br /&gt;
&lt;br /&gt;
* if many small files are only used within a batch job and accessed by one process store them on $TMP,&lt;br /&gt;
&lt;br /&gt;
* change the default colorization setting of the command ls (see below).&lt;br /&gt;
&lt;br /&gt;
On modern Linux systems, the GNU ls command often uses colorization by default to&lt;br /&gt;
visually highlight the file type; this is especially true if the command is run within a terminal&lt;br /&gt;
session. This is because the default shell profile initializations usually contain an alias&lt;br /&gt;
directive similar to the following for the ls command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ alias ls=&amp;quot;ls --color=tty&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
However, running the ls command in this way for files on a Lustre file system requires&lt;br /&gt;
a stat() call to be used to determine the file type. This can result in a performance&lt;br /&gt;
overhead, because the stat() call always needs to determine the size of a file, and that&lt;br /&gt;
in turn means that the client node must query the object size of all the backing objects&lt;br /&gt;
that make up a file. As a result of the default colorization setting, running a simple&lt;br /&gt;
ls command on a Lustre file system often takes as much time as running the ls command&lt;br /&gt;
with the -l option (the same is true if the -F, -p, or the -classify option, or any other option &lt;br /&gt;
that requires information from a stat() call, is used). To avoid this performance overhead&lt;br /&gt;
when using ls commands, add an alias directive similar to the following&lt;br /&gt;
to your shell startup script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ alias ls=&amp;quot;ls --color=never&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== $TMP ==&lt;br /&gt;
&lt;br /&gt;
While all tasks of a parallel application access the same $HOME and workspace directory, the &lt;br /&gt;
$TMP directory is local to each node on bwUniCluster 2.0. Different tasks of a parallel&lt;br /&gt;
application use different directories when they do not utilize one node. This directory should&lt;br /&gt;
be used for temporary files being accessed by single tasks. All nodes have fast SSDs &lt;br /&gt;
local storage devices which are used to store data below $TMP. &lt;br /&gt;
In addition, this directory should be used for the installation&lt;br /&gt;
of software packages. This means that the software package to be installed should be&lt;br /&gt;
unpacked, compiled and linked in a subdirectory of $TMP. The real installation of the&lt;br /&gt;
package (e.g. make install) should be made in(to) the Lustre filesystem. &lt;br /&gt;
&lt;br /&gt;
Each time a batch&lt;br /&gt;
job is started, a subdirectory is created on each node and assigned to the job. $TMP is newly&lt;br /&gt;
set; the name of the subdirectory contains the Job-id and the starting time so that the&lt;br /&gt;
subdirectory name is unique for each job. This unique name is then assigned to the&lt;br /&gt;
environment variable $TMP within the job. At the end of the job the subdirectory is removed.&lt;br /&gt;
&lt;br /&gt;
== LSDF Online Storage==&lt;br /&gt;
&lt;br /&gt;
In some cases it is useful to have access to the LSDF Online Storage on the HPC-Clusters also. Therefore the LSDF Online Storage is mounted on the Login- and Datamover-Nodes.&lt;br /&gt;
Furthermore it can be used on the compute nodes during the job runtime with the constraint flag &amp;quot;LSDF&amp;quot; ([[bwUniCluster_2.0_Slurm_common_Features|Slurm common features]]&lt;br /&gt;
). There is also an example about the LSDF batch usage: [[bwUniCluster_2.0_Slurm_common_Features#LSDF_Online_Storage|Slurm LSDF example ]] .&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
#SBATCH ...&lt;br /&gt;
#SBATCH --constraint=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 the following environment variables are available: $LSDF, $LSDFPROJECTS, $LSDFHOME.&lt;br /&gt;
Please request storage projects in the LSDF Online Storage seperately:&lt;br /&gt;
[https://www.lsdf.kit.edu/os/storagerequest/: LSDF Storage Request].&lt;br /&gt;
&lt;br /&gt;
== Access to other HPC-Filesystems==&lt;br /&gt;
&lt;br /&gt;
Users of several SCC HPC-Clusters and users of the LSDF online storage have the possibility to transfer data over the &amp;quot;data mover&amp;quot; nodes via the tool &amp;quot;rdata&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The command &#039;&#039;&#039;rdata&#039;&#039;&#039; executes the filesystem operations on special &amp;quot;data mover&amp;quot; nodes and distributes the load. Examples for the command are:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ rdata &amp;quot;ls $LSDFHOME/*.c&amp;quot;&lt;br /&gt;
$ rdata &amp;quot;cp $WORK/foo $LSDFHOME&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The command&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ man rdata&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
shows how to use the command &#039;&#039;&#039;rdata&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
===$WORK of SCC HPC-Clusters===&lt;br /&gt;
&lt;br /&gt;
From ForHLR I and ForHLR II can transfer data of the $WORK filesystem to the bwUniCluster via the tool &amp;quot;rdata&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===$PROJECT of the ForHLR I===&lt;br /&gt;
&lt;br /&gt;
Users of ForHLR I and ForHLR II can transfer data of the $PROJECT file system to the bwUniCluster via the tool &amp;quot;rdata&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===LSDF online storage===&lt;br /&gt;
&lt;br /&gt;
Users of the &#039;&#039;&#039;LSDF online storage&#039;&#039;&#039; can furthermore transfer data to bwUniCluster via the tool &#039;&#039;&#039;rdata&#039;&#039;&#039;.&lt;br /&gt;
Therefore the environment variables $LSDF, $LSDFPROJECTS and $LSDFHOME are set.&lt;br /&gt;
&lt;br /&gt;
===BeeOND (BeeGFS On-Demand)===&lt;br /&gt;
&lt;br /&gt;
Users of the HPC-Cluster have possibility to request a private BeeOND (BeeGFS) parallel filesystem for each job. The file system is created during job startup and purged after your job.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;IMPORTANT: All data on the private filesystem will be deleted after your job. Make sure you have copied your data back to the global filesystem (within job), e.g., $HOME or any workspace.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
BeeOND/BeeGFS can be used like any other parallel file system. Tools like cp or rsync can be used to copy data in and out. This feature is currently under BETA. If you encounter any problems or have questions, please contact fh-hotline@lists.kit.edu&lt;br /&gt;
&lt;br /&gt;
For detailed usage see here: [[ BwUniCluster_2.0_Slurm_common_Features#BeeOND_.28BeeGFS_On-Demand.29&lt;br /&gt;
| Request on-demand file system]]&lt;br /&gt;
&lt;br /&gt;
== Filetransfer to bwDataArchive and SDS@HD ==&lt;br /&gt;
&lt;br /&gt;
On the HPC-Clusters you can use the rdata tool to copy files&lt;br /&gt;
to the bwDataArchive or to the SDS@hd Storage.&lt;br /&gt;
&lt;br /&gt;
Please do the following steps for the preparation:&lt;br /&gt;
&lt;br /&gt;
1) Register for the service you want to use:&lt;br /&gt;
&lt;br /&gt;
bwDataArchive: https://www.rda.kit.edu/index.php&lt;br /&gt;
&lt;br /&gt;
SDS@hd:        https://sds-hd.urz.uni-heidelberg.de&lt;br /&gt;
&lt;br /&gt;
2) Create and transfer a ssh-key with no passphrase on the HPC-Cluster&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd .ssh&lt;br /&gt;
ssh-keygen -b 2048 -t rsa -f &amp;lt;ssh_key&amp;gt;&lt;br /&gt;
chmod 700 ./&amp;lt;ssh-key&amp;gt;.*&lt;br /&gt;
&lt;br /&gt;
# bwDataArchive&lt;br /&gt;
sftp &amp;lt;user&amp;gt;@archive-sftp.lsdf.kit.edu&lt;br /&gt;
mkdir ssh&lt;br /&gt;
put /home/&amp;lt;org&amp;gt;/&amp;lt;group&amp;gt;/&amp;lt;user&amp;gt;/.ssh/&amp;lt;ssh-key&amp;gt;.pub private/ssh/&amp;lt;ssh-key&amp;gt;.pub&lt;br /&gt;
# Inform bwDataArchive Team per Mail about your ssh-key: bwarchiv-support@lists.kit.edu&lt;br /&gt;
# They will move the key to the right place.&lt;br /&gt;
&lt;br /&gt;
# SDS@hd&lt;br /&gt;
sftp &amp;lt;user&amp;gt;@lsdf02-sshfs.urz.uni-heidelberg.de&lt;br /&gt;
put /home/&amp;lt;org&amp;gt;/&amp;lt;group&amp;gt;/&amp;lt;user&amp;gt;/.ssh/&amp;lt;ssh-key&amp;gt;.pub .ssh/authorized_keys&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3) Aggregrate files&lt;br /&gt;
Please store multiple small files in one single file with a tool like &amp;quot;tar&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
4) Create your batch file for sftp&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
vi sftpfile&lt;br /&gt;
put -p /home/&amp;lt;org&amp;gt;/&amp;lt;group&amp;gt;/&amp;lt;user&amp;gt;/&amp;lt;dir&amp;gt;/&amp;lt;file&amp;gt; private/&amp;lt;dir&amp;gt;/&amp;lt;file&amp;gt;&lt;br /&gt;
put -p /home/&amp;lt;org&amp;gt;/&amp;lt;group&amp;gt;/&amp;lt;user&amp;gt;/&amp;lt;file&amp;gt; &amp;lt;SDS-project&amp;gt;/&amp;lt;dir&amp;gt;/&amp;lt;file&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5) transfer your files with sftp or lftp&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# bwDataArchive&lt;br /&gt;
rdata sftp -b sftpfile &amp;lt;user&amp;gt;@archive-sftp.lsdf.kit.edu&lt;br /&gt;
rdata &amp;quot;lftp -u &amp;lt;user&amp;gt;,pwd sftp://archive-sftp.lsdf.kit.edu -e \&amp;quot;ls -l private/; bye\&amp;quot;&amp;quot;&lt;br /&gt;
rdata &amp;quot;lftp -u &amp;lt;user&amp;gt;,pwd sftp://archive-sftp.lsdf.kit.edu -e \&amp;quot;put &amp;lt;file&amp;gt; -o private/&amp;lt;file&amp;gt;; bye\&amp;quot;&amp;quot;&lt;br /&gt;
rdata &amp;quot;lftp -u &amp;lt;user&amp;gt;,pwd sftp://archive-sftp.lsdf.kit.edu -e \&amp;quot;mirror -c -R -P4 &amp;lt;directory&amp;gt; private/&amp;lt;directory&amp;gt;; bye\&amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# SDS@hd&lt;br /&gt;
rdata sftp -b sftpfile &amp;lt;user&amp;gt;@lsdf02-sshfs.urz.uni-heidelberg.de&lt;br /&gt;
rdata &amp;quot;lftp -u &amp;lt;user&amp;gt;,pwd sftp://lsdf02-sshfs.urz.uni-heidelberg.de -e \&amp;quot;ls -l &amp;lt;project&amp;gt;/; bye\&amp;quot;&amp;quot;&lt;br /&gt;
rdata &amp;quot;lftp -u &amp;lt;user&amp;gt;,pwd sftp://lsdf02-sshfs.urz.uni-heidelberg.de -e \&amp;quot;put &amp;lt;file&amp;gt; -o &amp;lt;project&amp;gt;/&amp;lt;file&amp;gt;; bye\&amp;quot;&amp;quot;&lt;br /&gt;
rdata &amp;quot;lftp -u &amp;lt;user&amp;gt;,pwd sftp://lsdf02-sshfs.urz.uni-heidelberg.de -e \&amp;quot;mirror -c -R -P4 &amp;lt;directory&amp;gt; &amp;lt;project&amp;gt;/&amp;lt;directory&amp;gt;; bye\&amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# with the command &amp;quot;screen&amp;quot; you can run your commands in the backgroud and log out.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Backup and Archiving==&lt;br /&gt;
&lt;br /&gt;
There are regular backups of all data of the home directories,whereas ACLs and extended attributes will&lt;br /&gt;
not be backuped. &lt;br /&gt;
Please contact the hotline if you need backuped data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:bwUniCluster 2.0|File System]][[Category:Hardware_and_Architecture|bwUniCluster 2.0]]&lt;/div&gt;</summary>
		<author><name>H Weber</name></author>
	</entry>
</feed>