<?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=S+Fischer</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=S+Fischer"/>
	<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/e/Special:Contributions/S_Fischer"/>
	<updated>2026-06-19T02:43:37Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.17</generator>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=HPC_Glossary/Batch_system&amp;diff=16122</id>
		<title>HPC Glossary/Batch system</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=HPC_Glossary/Batch_system&amp;diff=16122"/>
		<updated>2026-06-03T14:25:45Z</updated>

		<summary type="html">&lt;p&gt;S Fischer: /* Resource Management Systems on bwHPC Clusters */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;← This page is part of the [[HPC Glossary]]&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
When we speak of a &#039;&#039;&#039;batch system&#039;&#039;&#039; on compute clusters, we mean the system that knows which compute nodes are used by whom and when they will become available. It also knows about all waiting jobs and determines which job are going to start next on which node whenever a node bekomes available.&lt;br /&gt;
&lt;br /&gt;
== Why do we need a Resource Management System? ==&lt;br /&gt;
&lt;br /&gt;
An HPC cluster is a multi-user system. Users have compute jobs with different demands on number of processor cores, memory, disk space and run-time. Some users run a program only occasionally for a big task, other users must run many simulations to finish their projects. &lt;br /&gt;
&lt;br /&gt;
The cluster only provides a limited number of compute resources with certain features. Free access for all users to all compute nodes without time limit will not work. Therefore we need a resource management system (batch system) for the scheduling and the distribution of compute jobs on suitable compute resources.&lt;br /&gt;
The use of a resource management system pursues several objectives:&lt;br /&gt;
&lt;br /&gt;
* Fair distribution of resources among users&lt;br /&gt;
* Compute jobs should start as soon as possible&lt;br /&gt;
* Full load and efficient usage of all resources&lt;br /&gt;
[[image:distributing_jobs1.svg]]&lt;br /&gt;
&lt;br /&gt;
== How does a Resource Management System work? ==&lt;br /&gt;
A resource management system or batch system manages the compute nodes, jobs and queues and basically consists of two components:&lt;br /&gt;
&lt;br /&gt;
* A resource manager which is responsible for the node status and for the distribution of jobs over the compute nodes.&lt;br /&gt;
* workload manager (scheduler) which is in charge of job scheduling, job managing, job monitoring and job reporting.&lt;br /&gt;
&lt;br /&gt;
A resource management system works as follows:&lt;br /&gt;
&lt;br /&gt;
* The user creates a job script containing requests for compute resources and submits the script to the resource management system.&lt;br /&gt;
* The scheduler parses the job script for resource requests and determines where to run the job and how to schedule it.&lt;br /&gt;
* The scheduler delegates the job to the resource manager.&lt;br /&gt;
* The resource manager executes the job and communicates the status information to the scheduler.&lt;br /&gt;
&lt;br /&gt;
== How does a Job Scheduler work?== &lt;br /&gt;
&lt;br /&gt;
The job scheduling process is influenced by many and sometimes contrasting parameters which are used as metrics for the scheduling algorithm. The objectives of a resource management system are approached in the following way:&lt;br /&gt;
&lt;br /&gt;
* Fair distribution of resources among users: Ensure that all users get a fair share of processing time for their jobs.&lt;br /&gt;
* Compute jobs should start as soon as possible: Minimize the time jobs have to wait until they start.&lt;br /&gt;
* Full load and efficient usage of all resources: Aim for the highest possible utilization with the available jobs, because cluster resources are very expensive&lt;br /&gt;
&lt;br /&gt;
The following simple example illustrates how a scheduler works.&lt;br /&gt;
Let us consider a system with 4 nodes. Each node has 4 processor cores.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here the cluster is empty. No jobs are scheduled:&lt;br /&gt;
&lt;br /&gt;
[[image:Scheduling-workload0.svg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now jobs with different resource requests are scheduled:&lt;br /&gt;
&lt;br /&gt;
* one job which needs two nodes (blue)&lt;br /&gt;
* one job which needs one node (red)&lt;br /&gt;
* multiple jobs, which need only one core (yellow, orange)&lt;br /&gt;
* some jobs are short running, others are long running (see time axis)&lt;br /&gt;
&lt;br /&gt;
[[image:Scheduling-workload1.svg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Up to now enough resources are available so that all jobs can start instantly.&lt;br /&gt;
&lt;br /&gt;
More jobs are submitted. Now not all job can start immediately on the available hardware resources. Some jobs are scheduled to run at a later time. &lt;br /&gt;
&lt;br /&gt;
* Big jobs (in terms of hardware resources) often have to wait longer, because they cannot be scheduled flexibly.&lt;br /&gt;
* Long running jobs can delay the scheduling of big jobs, because they block needed hardware resources.&lt;br /&gt;
* Small and short jobs can be scheduled to fill gaps. &lt;br /&gt;
* If a job stops prematurely, short jobs can be rescheduled to start earlier (back filling).&lt;br /&gt;
&lt;br /&gt;
[[image:Scheduling-workload2.svg]]&lt;br /&gt;
&lt;br /&gt;
In addition to cores and time a scheduler has to consider many more metrics like memory, co-processors, fair share, and priority. Scheduling is a multi-dimensional optimization problem.&lt;br /&gt;
&lt;br /&gt;
== Resource Management Systems on bwHPC Clusters ==&lt;br /&gt;
&lt;br /&gt;
Slurm: complete resource management system with integrated resource manager and scheduler&lt;br /&gt;
&lt;br /&gt;
All bwHPC cluster follow a fairshare policy. The waiting time of jobs depends on:&lt;br /&gt;
&lt;br /&gt;
* your job&#039;s resource requests: Jobs with large resource requests wait longer for free resources.&lt;br /&gt;
* your usage history: High resource usage in a short time leads to a lower job priority.&lt;br /&gt;
* your university&#039;s share (bwUniCluster only): If the usage exceeds the university&#039;s share, the job priority decreases.&lt;br /&gt;
&lt;br /&gt;
bwHPC clusters have specific configurations for the resource management system concerning:&lt;br /&gt;
&lt;br /&gt;
* Job submission and monitoring commands (via Slurm)&lt;br /&gt;
* Queues and limits for the available hardware&lt;br /&gt;
* Node access policy:&lt;br /&gt;
** shared: compute nodes can be shared by jobs of different users&lt;br /&gt;
** single user: compute nodes can be shared by jobs of a single user&lt;br /&gt;
** single job: compute nodes are allocated exclusively for a single job&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
FAQ: How many jobs can run on a single node at the same time?&lt;br /&gt;
&lt;br /&gt;
This depends on the node access policy:&lt;br /&gt;
&lt;br /&gt;
* On &amp;quot;shared nodes&amp;quot;, more than one job can run simultaneously if the requested resources are available, and these jobs may have been submitted by different users.&lt;br /&gt;
* On &amp;quot;single user nodes&amp;quot;, more than one job can run simultaneously, but the jobs have to be submitted by one and the same user&lt;br /&gt;
* On &amp;quot;single job nodes&amp;quot;, the access is exclusive for one job, irrespective of the number of requested cores.&lt;/div&gt;</summary>
		<author><name>S Fischer</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=Energy_Efficient_Cluster_Usage&amp;diff=16111</id>
		<title>Energy Efficient Cluster Usage</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=Energy_Efficient_Cluster_Usage&amp;diff=16111"/>
		<updated>2026-05-29T09:10:12Z</updated>

		<summary type="html">&lt;p&gt;S Fischer: /* Summary: General Recommendations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Energy consumption of data centers has been increasing continuously throughout the last decade. In 2020, the energy consumption of all data centers in Germany amounted to around  [https://www.bundestag.de/resource/blob/863850/423c11968fcb5c9995e9ef9090edf9e6/WD-8-070-21-pdf-data.pdf 3 percent] of the total electricity produced. Accompanying this large energy consumption are large-scale emissions of CO2 to the atmosphere and thus significant contributions to climate change.&lt;br /&gt;
To illustrate this, an average compute job running on a single node for one day may easily consume 10 kWh or even more. That translates roughly to brewing 700 cups of coffee.&lt;br /&gt;
Assuming that a typical bwHPC cluster has a few hundred compute nodes, this amounts to the energy consumption of a village for each cluster. &lt;br /&gt;
&lt;br /&gt;
Although a large amount of this energy consumption is an intrinsic requirement of running large HPC clusters (even when it&#039;s processors are idle, a cluster uses a lot of energy), efficient use of the available resources is important. Using as many resources as possible does not make a power user. Using them wisely does.&lt;br /&gt;
In the following, a basic introduction to some of the most important aspects of energy-efficient HPC usage from a user perspective is given. &lt;br /&gt;
&lt;br /&gt;
We can generally distinguish three tasks when optimizing for running HPC jobs efficiently.&lt;br /&gt;
&lt;br /&gt;
&amp;amp;rarr;  What do I want to do and why do I need an HPC Cluster for it?&lt;br /&gt;
&lt;br /&gt;
&amp;amp;rarr;  How many and which kind of hardware resources do I require for it?&lt;br /&gt;
&lt;br /&gt;
&amp;amp;rarr;  How do I optimize my code to use these resources most efficiently?&lt;br /&gt;
&lt;br /&gt;
= What do I want to do and why do I need an HPC Cluster for it? =&lt;br /&gt;
&lt;br /&gt;
The bwHPC clusters are used to almost full capacity, and running a job on an HPC node consumes a lot of energy, as shown above. &lt;br /&gt;
Therefore, users are requested to run only necessary jobs.&lt;br /&gt;
&lt;br /&gt;
Please consider testing new setups and their output for validity prior to submitting jobs that require lots of resources. This also includes projects where a lot of (smaller) similar jobs are submitted. &lt;br /&gt;
&lt;br /&gt;
Make sure to double-check your jobs prior to the submission, as having to discard the output data of an HPC project due to faulty input files is wasting a lot of computational resources.&lt;br /&gt;
&lt;br /&gt;
Finally, identifying the specific resource requirements for a given job is important to allocate the optimal amount for your compute job, and to decide if an HPC cluster is needed at all.&lt;br /&gt;
&lt;br /&gt;
= How many and which kind of hardware resources do I require for it =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Resource allocation is a crucial part when working on an HPC cluster. &lt;br /&gt;
As this is dependent on both the job as well as the specific cluster hardware and architecture available. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&lt;br /&gt;
A small number of jobs and few resources&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;rarr;  Submit to the scheduler. No extended testing and resource scaling analysis are needed. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&lt;br /&gt;
Medium-sized projects&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;rarr;  Run only necessary jobs: Please consider testing new setups and their output for validity prior to submitting a huge amount of similar jobs&lt;br /&gt;
&lt;br /&gt;
&amp;amp;rarr;  Start small: Run your problem on a small set of resources first.&lt;br /&gt;
&lt;br /&gt;
&amp;amp;rarr;  Use the proper tools for development: If you develop your own code, please use the proper tools for debugging and parallel performance analysis. See: [[Development#Documentation_in_the_Wiki|Development]].&lt;br /&gt;
&lt;br /&gt;
&amp;amp;rarr;  A look at the job feedback can help you determine if you are using the cluster efficiently&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Large projects&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;rarr;  Same approach as for medium-sized projects. &lt;br /&gt;
&lt;br /&gt;
&amp;amp;rarr;  Run a scaling analysis for your project with regard to how many resources work best. See: [[Scaling]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Many short jobs&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;rarr;  Handling via the scheduler is inefficient. &lt;br /&gt;
&lt;br /&gt;
&amp;amp;rarr;  Simple parallelization by hand is advisable. See: A basic introduction to [[Development/Parallel_Programming | Parallel Programming]].&lt;br /&gt;
&lt;br /&gt;
= How do I optimize my code to use these resources most efficiently? =&lt;br /&gt;
&lt;br /&gt;
The above recommendations will help use the cluster resources more efficiently.&lt;br /&gt;
Regarding software development, power efficiency correlates obviously heavily with &#039;&#039;&#039;computing performance&#039;&#039;&#039;, but also with memory usage, i.e. the amount of memory used, but also memory efficiency.&lt;br /&gt;
&lt;br /&gt;
Here, we have gathered a few results based on other research:&lt;br /&gt;
&amp;amp;rarr;  Use an efficient programming language such as Rust, C, and C++ -- well any compiled language. Do not use any interpreted language like Perl or Python. Since Machine Learning is a hot topic, this deserves a few words: Any ML-Python code using Tensorflow or other libraries will make heavy usage of NumPy and other math packages, which will use C-based implementations. Please make sure, you use the provided Python modules, which are optimized to use Intel MKL and other mathematical libraries.&lt;br /&gt;
&lt;br /&gt;
Further reading:&lt;br /&gt;
Rui Pereira, et al: &amp;quot;&#039;&#039;Energy efficiency across programming languages: how do energy, time, and memory relate?&#039;&#039;&amp;quot;, SLE 2017: Proc. of the 10th ACM SIGPLAN Int. Conf. on SW Language Eng., Oct. 2017, pp. 256–267, [https://doi.org/10.1145/3136014.3136031 doi:10.1145/3136014.3136031]&lt;br /&gt;
&lt;br /&gt;
&amp;amp;rarr;  Analyse memory access patterns&lt;br /&gt;
&lt;br /&gt;
&amp;amp;rarr;  For small tight loops checking for locks, use the &amp;lt;code&amp;gt;pause&amp;lt;/code&amp;gt; instruction.&lt;br /&gt;
&lt;br /&gt;
= Summary: General Recommendations =&lt;br /&gt;
&lt;br /&gt;
* Choose the most &#039;&#039;&#039;efficient algorithms&#039;&#039;&#039; for the given problem.&lt;br /&gt;
* Run only &#039;&#039;&#039;necessary&#039;&#039;&#039; jobs: Please consider testing new setups and their output for validity prior to submitting a huge amount of similar jobs.&lt;br /&gt;
* Start &#039;&#039;&#039;small&#039;&#039;&#039;: Run your problem on a small number of parallel entities (be it processes or threads) first.&lt;br /&gt;
* &#039;&#039;&#039;Estimate&#039;&#039;&#039; the runtime of the parallel job as &#039;&#039;&#039;exactly&#039;&#039;&#039; as possible to increase the efficiency of the scheduling of the whole system.&lt;br /&gt;
* Use the proper tools for development: If you develop your own code, please use the proper tools for debugging and parallel performance analysis. More information is available on the bwHPC Wiki.&lt;br /&gt;
* A look at the &#039;&#039;&#039;job feedback&#039;&#039;&#039; can help you determine if you are using the cluster efficiently.&lt;/div&gt;</summary>
		<author><name>S Fischer</name></author>
	</entry>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster3.0/Jupyter&amp;diff=16027</id>
		<title>BwUniCluster3.0/Jupyter</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=BwUniCluster3.0/Jupyter&amp;diff=16027"/>
		<updated>2026-05-04T12:25:13Z</updated>

		<summary type="html">&lt;p&gt;S Fischer: fixed broken links&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Jupyter can be used as an alternative to accessing HPC resources via SSH. For this purpose only a web browser is required. Within the website source code of different programming languages can be edited and executed. Furthermore different user interfaces and terminals are available.&lt;br /&gt;
&lt;br /&gt;
= Short description of Jupyter =&lt;br /&gt;
&lt;br /&gt;
Jupyter is a web application, central component of Jupyter is the &#039;&#039;&#039;Jupyter Notebook&#039;&#039;&#039;. It is a document, which can contain formatted text, executable code sections and (interactive) visualizations (image, sound, video, 3D views).&lt;br /&gt;
&lt;br /&gt;
The Jupyter notebooks are executed in an interactive session on the compute nodes of the respective cluster. Access is via any modern web browser. Data is prepared and visualized on the server and therefore does not have to be transmitted over the network. Only the resulting text, image, sound and video data is transmitted. Starting point of a Jupyter session is the HOME directory of the user on the respective cluster. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;JupyterLab&#039;&#039;&#039; is a modern user interface, within which one or more Jupyter notebooks can be opened, edited and executed. The individual notebooks can be arranged as tabs or tiled. JupyterLab is the standard user interface. Besides JupyterLab the classic notebook user interface is available, in which only one Jupyter notebook per browser tab can be opened at a time.&lt;br /&gt;
&lt;br /&gt;
A &#039;&#039;&#039;Jupyter Kernel&#039;&#039;&#039; describes a separate process, in which one Jupyter Notebook is executed at a time. Different kernels are available for different programming languages or language versions.&lt;br /&gt;
&lt;br /&gt;
Before a Jupyter session is started, the access authorization must be checked first. This is done via &#039;&#039;&#039;JupyterHub&#039;&#039;&#039;, where the resources are selected, for example the number of CPU cores, GPUs or the required main memory.&lt;br /&gt;
&lt;br /&gt;
A detailed documentation of the Jupyter project can be found at [https://jupyter.readthedocs.io https://jupyter.readthedocs.io].&lt;br /&gt;
&lt;br /&gt;
= Access requirements =&lt;br /&gt;
&lt;br /&gt;
{|style=&amp;quot;background:#deffee; width:100%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;padding:5px; background:#cef2e0; text-align:left&amp;quot;|&lt;br /&gt;
[[Image:Attention.svg|center|25px]]&lt;br /&gt;
|style=&amp;quot;padding:5px; background:#cef2e0; text-align:left&amp;quot;|&lt;br /&gt;
Access to Jupyter is &#039;&#039;&#039;limited to IP addresses from the BelWü network&#039;&#039;&#039;.&lt;br /&gt;
All home institutions of our current users are connected to BelWü, so if you are on your campus network (e.g. in your office or on the Campus WiFi) you should be able to connect to bwUniCluster 3.0 without restrictions.&lt;br /&gt;
If you are outside one of the BelWü networks (e.g. at home), a VPN connection to the home institution or a connection to an SSH jump host at the home institution must be established first.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
To use Jupyter on the HPC resources of SCC, the access requirements for [https://wiki.bwhpc.de/e/Registration/bwUniCluster bwUniCluster 3.0] apply. A [https://wiki.bwhpc.de/e/Registration/bwUniCluster registration] is required. Please note, You should&#039;ve completed registration and tested your login once using [https://wiki.bwhpc.de/e/Registration/SSH Secure Shell (ssh)].&lt;br /&gt;
&lt;br /&gt;
= Login process =&lt;br /&gt;
&lt;br /&gt;
Login takes place at &lt;br /&gt;
* bwUniCluster 3.0: [https://uc3-jupyter.scc.kit.edu uc3-jupyter.scc.kit.edu]&lt;br /&gt;
* SDIL: [https://sdil-jupyter.scc.kit.edu sdil-jupyter.scc.kit.edu]&lt;br /&gt;
* HoreKa: [https://hk-jupyter.scc.kit.edu hk-jupyter.scc.kit.edu]&lt;br /&gt;
* HAICORE: [https://haicore-jupyter.scc.kit.edu haicore-jupyter.scc.kit.edu]&lt;br /&gt;
&lt;br /&gt;
For login, your username, your password and a 2-factor authentication are required.&lt;br /&gt;
&lt;br /&gt;
You will first find yourself on a landing page that also gives more information about the currently installed software versions.&lt;br /&gt;
By pressing the login button you will be redirected to the JupyterHub page. Click on Enter JupyterHub to start the login process. Select the organization (e.g. KIT) that has granted you access to the HPC system and press Continue. In the Login section that appears, enter your username and password (not the service password). &lt;br /&gt;
After pressing the Login button you will be redirected to the second factor query page. Enter the one-time password (e.g. from KIT Token or Google Authenticator App) and press Validate. Now you are done with the login process and can start selecting your computing resources.&lt;br /&gt;
&lt;br /&gt;
[[File:Jupyter_Anmeldung.gif|700px]]&lt;br /&gt;
&lt;br /&gt;
= Selection of the compute resources =&lt;br /&gt;
&lt;br /&gt;
The Jupyter notebooks are executed in an interactive session on the compute nodes of the HPC clusters. Just like accessing an interactive session with SSH, resource allocation is done by the Workload Manager Slurm. The selection of resources for Jupyter is realized via drop-down menus. Only jobs with a maximum of one node are possible.&lt;br /&gt;
&lt;br /&gt;
Available resources for selection are&lt;br /&gt;
&lt;br /&gt;
* Number of CPU cores&lt;br /&gt;
* Number of GPUs&lt;br /&gt;
* Runtime&lt;br /&gt;
* Partition/Queue&lt;br /&gt;
* Amount of main memory&lt;br /&gt;
&lt;br /&gt;
If Auto-Reservation is selected the automatic Jupyter reservation of the cluster is enabled.&lt;br /&gt;
&lt;br /&gt;
In normal mode, the grayed-out fields contain reasonable presets, depending on the number of required CPU cores or GPUs respectively. The presets can be bypassed in advanced mode, where further options are available. &lt;br /&gt;
&lt;br /&gt;
Advanced Mode can be activated by clicking on the checkbox of the same name. The following additional options then become available:&lt;br /&gt;
&lt;br /&gt;
* Specification of a reservation&lt;br /&gt;
* LSDF mount option&lt;br /&gt;
* BEEOND mount option&lt;br /&gt;
&lt;br /&gt;
After the selection is made, the interactive job is started with the spawn button. As when requesting interactive compute resources with the `salloc` command, waiting times may occur. These are usually the longer the larger the requested resources are.&lt;br /&gt;
Even if the chosen resources are available immediately, the spawning process may take up to one minute.&lt;br /&gt;
&lt;br /&gt;
[[File:Ressources_neu.gif|500px]]&lt;br /&gt;
&lt;br /&gt;
Please note that in advanced mode, resource combinations can be selected that are impossible to be met. In this case, an error message will appear when the job is spawned.&lt;br /&gt;
&lt;br /&gt;
[[File:Jupyter_Falsche_ressourcen.gif|500px]]&lt;br /&gt;
&lt;br /&gt;
The spawning timeout is currently set to 10 minutes. With a normal workload of the HPC facility, this time is usually sufficient to get interactive resources.&lt;br /&gt;
&lt;br /&gt;
== Prioritized access to computing resources on bwUniCluster 3.0 ==&lt;br /&gt;
The use of Jupyter requires the immediate availability of computing resources since the JupyterLab server is started within an interactive Slurm session. To improve the availability of CPUs/GPUs for interactive supercomputing with Jupyter, &#039;&#039;&#039;automatic reservation&#039;&#039;&#039; for CPU (cpu_il) and GPU (gpu_a100_il) resources has been set up on &#039;&#039;&#039;bwUniCluster 3.0&#039;&#039;&#039;. It is active &#039;&#039;&#039;between 8am and 8pm&#039;&#039;&#039; every weekday. The reservation is automatically active if&lt;br /&gt;
&lt;br /&gt;
* no other reservation is set manually&lt;br /&gt;
* Auto-Reservation is enabled&lt;br /&gt;
&lt;br /&gt;
To give you a better overview of the currently available resources, a status indicator has been implemented. It appears when selecting the number of required CPUs/GPUs and shows whether a Jupyter job of the selected size can currently be started or not. Green means the selected CPU/GPU resources are available instantly. Yellow means only a single additional job of the selected size can be started. Red means there are no GPU resources left that could satisfy the selected amount of resources.&lt;br /&gt;
&lt;br /&gt;
If there are no more resources available within the reservation, you can try selecting a different amount of CPUs/GPUs or activate Advanced Mode and select a different partition. Availability can be estimated using sinfo_t_idle, which is available when logging in via SSH.&lt;br /&gt;
&lt;br /&gt;
= JupyterLab =&lt;br /&gt;
&lt;br /&gt;
JupyterLab is the standard user interface. In the following only its essential functions are briefly introduced. A detailed documentation is available at &lt;br /&gt;
[https://jupyterlab.readthedocs.io https://jupyterlab.readthedocs.io].&lt;br /&gt;
&lt;br /&gt;
== Menu bar ==&lt;br /&gt;
&lt;br /&gt;
The menu bar at the upper edge of JupyterLab has higher-level menus that display the actions available in JupyterLab along with their shortcut keys. The default menus are:&lt;br /&gt;
&lt;br /&gt;
* File: Actions related to files and directories&lt;br /&gt;
* Edit: Actions related to editing documents and other activities&lt;br /&gt;
* View: actions that change the appearance of JupyterLab&lt;br /&gt;
* Run: Actions to execute code in various activities like notebooks and code consoles&lt;br /&gt;
* Kernel: Actions to manage kernels that are separate processes for executing code&lt;br /&gt;
* Tabs: a list of open documents and activities in the Dock Panel&lt;br /&gt;
* Settings: general settings and an editor for advanced settings&lt;br /&gt;
* Help: a list of help links to JupyterLab and the kernel&lt;br /&gt;
&lt;br /&gt;
== Left sidebar ==&lt;br /&gt;
&lt;br /&gt;
In the left sidebar there are foldable tabs. The most relevant ones are:&lt;br /&gt;
&lt;br /&gt;
* File browser: Switch to directories and open files with left mouse button, context menu with right mouse button&lt;br /&gt;
* Running kernels: Overview of running kernels&lt;br /&gt;
* Command overview&lt;br /&gt;
* Tab Overview&lt;br /&gt;
* Lmod software selection: Search and load/unload Lmod software modules&lt;br /&gt;
&lt;br /&gt;
== Main working area ==&lt;br /&gt;
The main working area in JupyterLab allows to arrange, resize and divide documents (notebooks, text files, etc.) and other activities (terminals, code consoles, etc.) in tabs. By holding down the left mouse button, the tabs can be grabbed and repositioned.&lt;br /&gt;
&lt;br /&gt;
In a new JupyterLab session the Launcher tab is opened first. It contains buttons for starting new notebooks, code consoles and other functions. When a notebook is open, a new Launcher tab can be started by pressing the plus symbol in the file browser tab of the left sidebar, by calling &#039;&#039;File &amp;gt; New Launcher&#039;&#039; in the upper menu bar or by the key combination &#039;&#039;Ctrl+Shift+L&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
== Classic Notebook ==&lt;br /&gt;
&lt;br /&gt;
The classic Jupyter Notebook user interface offers only one open Jupyter Notebook or terminal per browser tab. From the JupyterLab user interface the classic display can be reached in the menu bar under &#039;&#039;Help &amp;gt; Launch Classic Notebook&#039;&#039;. Clicking on the JupyterHub logo in the upper left corner will take you back to the JupyterLab interface.&lt;br /&gt;
&lt;br /&gt;
= Log out =&lt;br /&gt;
&lt;br /&gt;
You can log out from a running Jupyter session by calling &#039;&#039;File &amp;gt; Log Out&#039;&#039; in the upper menu bar. &lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;width: 100%; margin:4px 0 0 0; background:none; border-spacing: 0px;&amp;quot;&lt;br /&gt;
| style=&amp;quot;width:100%; border:1px solid #BBBBBB; background:#fff5fa; vertical-align:top; color:#000;&amp;quot; |&lt;br /&gt;
{| style=&amp;quot;width:100%; vertical-align:top; border:0px solid #BBBBBB; padding:4px;&amp;quot; |&lt;br /&gt;
|-&lt;br /&gt;
|{{Red}}| Attention&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Please note that your interactive session will continue in the background!  &lt;br /&gt;
&amp;lt;!--For example, this affects your computing time quota on the ForHLR.--&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
As long as the interactive session is running, you can re-enter it at any time. Depending on the duration of your absence, it may be necessary to re-enter your one-time password and possibly KIT password.&lt;br /&gt;
&lt;br /&gt;
If you want to end the interactive session before it has reached its runtime, you can do so via the Hub Control Panel. Under &#039;&#039;File &amp;gt; Hub Control Panel&#039;&#039; in the upper menu bar, it is opened in a new browser tab. By pressing the &#039;&#039;Stop My Server&#039;&#039; button the session will be terminated. You can now log out using the &#039;&#039;Logout&#039;&#039; button in the upper right corner or start a new session directly using the &#039;&#039;Start My Server&#039;&#039; button, for example with a changed resource selection.&lt;br /&gt;
&lt;br /&gt;
[[File:logout_small.gif|750px]]&lt;br /&gt;
&lt;br /&gt;
= Selection of software =&lt;br /&gt;
&lt;br /&gt;
For the selection of the required Lmod software modules the corresponding tab &#039;&#039;Softwares&#039;&#039; is available in the left sidebar. The list of available modules can be narrowed down by entering the search field. The desired module is loaded by pressing the &#039;&#039;Load&#039;&#039; button. In the list with the loaded modules you can remove them with the &#039;&#039;Unload&#039;&#039; button.&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;width: 100%; margin:4px 0 0 0; background:none; border-spacing: 0px;&amp;quot;&lt;br /&gt;
| style=&amp;quot;width:100%; border:1px solid #BBBBBB; background:#f5fffa; vertical-align:top; color:#000;&amp;quot; |&lt;br /&gt;
{| style=&amp;quot;width:100%; vertical-align:top; border:0px solid #BBBBBB; padding:4px;&amp;quot; |&lt;br /&gt;
|-&lt;br /&gt;
|{{Green}}| Note&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On already opened Jupyter Notebooks, newly loaded software modules become active only after restarting the kernel (&#039;&#039;Kernel &amp;gt; Restart Kernel&#039;&#039; in the upper menu bar). Terminals must be closed and reopened.&lt;br /&gt;
|}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[File:software_small.gif|750px]]&lt;br /&gt;
&lt;br /&gt;
== Software Stacks for Jupyter ==&lt;br /&gt;
Currently 3 special Jupyter software stacks are available via Lmod:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;jupyter/minimal&amp;lt;/code&amp;gt;&lt;br /&gt;
*: Minimal installation of JupyterLab&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;jupyter/base&amp;lt;/code&amp;gt; &lt;br /&gt;
*: Basic installation of JupyterLab.&lt;br /&gt;
*: For a complete list of pre-installed packages, please refer to [https://uc3-jupyter.scc.kit.edu/software-modules/#pre-installed-software-packages this site].&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;jupyter/tensorflow&amp;lt;/code&amp;gt; (default at login, will be deprecated with the advent of bwUniCluster 3.0)&lt;br /&gt;
*: Preinstalled software packages for machine learning applications. Includes among others TensorFlow, Keras, Torch, Pandas, Matplotlib, SKLearn.&lt;br /&gt;
*: For a complete list of pre-installed packages and their respective version, please refer to [https://uc3-jupyter.scc.kit.edu/software-modules/#pre-installed-software-packages this site].&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;jupyter/ai&amp;lt;/code&amp;gt; (will be the new default at login für bwUniCluster 3.0, contains all latest and greatest software for AI workflows)&lt;br /&gt;
*: Preinstalled software packages for machine learning applications. Includes among others TensorFlow, Keras, Torch, Torchvision, Lighning, Pandas, Matplotlib, SKLearn.&lt;br /&gt;
*: For a complete list of pre-installed packages and their respective version, please refer to [https://uc3-jupyter.scc.kit.edu/software-modules/#pre-installed-software-packages this site].&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;jupyter/extensions&amp;lt;/code&amp;gt;&lt;br /&gt;
*: Same packages as tensorflow + extensions&lt;br /&gt;
&lt;br /&gt;
These software stacks can be used both when accessing the cluster via JupyterHub, as well as for conventional access via SSH via module load.&lt;br /&gt;
&lt;br /&gt;
A continuously updated list with the installed packages can be found on the corresponding subpage of the respective cluster:&lt;br /&gt;
&lt;br /&gt;
* bwUniCluster 3.0: [https://uc3-jupyter.scc.kit.edu/software-modules uc3-jupyter.scc.kit.edu/software-modules]&lt;br /&gt;
* HoreKa: [https://hk-jupyter.scc.kit.edu/software-modules hk-jupyter.scc.kit.edu/software-modules]&lt;br /&gt;
&lt;br /&gt;
= Installation of further software =&lt;br /&gt;
The software provided by the Lmod modules jupyter/minimal, jupyter/base and jupyter/tensorflow can be easily supplemented by additional Python packages. There are 2 procedures for this.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;User-Installation (not recommended)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;pip install --user &amp;lt;packageName&amp;gt; &amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The additional packages are installed under $HOME/.local/lib/python3.11/site-packages/ which is part of PYTHONPATH.&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Virtual environments (recommended)&amp;lt;br&amp;gt;&lt;br /&gt;
The user can create and use virtual environments (cf. Virtual environments). Packages provided by the jupyter Lmod modules remain visible and usable.&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Virtual environments ==&lt;br /&gt;
&lt;br /&gt;
Python virtual environments allow to use different versions of a package and to keep your local site-packages (accessible under &amp;lt;code&amp;gt;$PYTHONPATH&amp;lt;/code&amp;gt;) free from conflicts.&lt;br /&gt;
&lt;br /&gt;
=== Creation of virtual environment ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
python -m venv &amp;lt;myEnv&amp;gt;&lt;br /&gt;
source &amp;lt;myEnv&amp;gt;/bin/activate  &lt;br /&gt;
pip install &amp;lt;packageName&amp;gt;  &lt;br /&gt;
deactivate&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The additional packages are installed under &amp;lt;code&amp;gt;&amp;lt;myEnv&amp;gt;/lib/python3.11/site-packages/&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Usage of virtual environment ===&lt;br /&gt;
&lt;br /&gt;
In order to use the virtual environment, it has to be activated via &amp;lt;code&amp;gt;source &amp;lt;myEnv&amp;gt;/bin/activate&amp;lt;/code&amp;gt;. &amp;lt;code&amp;gt;PYTHONPATH&amp;lt;/code&amp;gt; is set accordingly. Deactivation of the venv is done via &amp;lt;code&amp;gt;deactivate&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Usage of virtual environment in JupyterLab ===&lt;br /&gt;
&lt;br /&gt;
To be able to use the virtual environments within JupyterLab, a corresponding kernel has to be installed:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
source &amp;lt;myEnv&amp;gt;/bin/activate&lt;br /&gt;
python -m ipykernel install \&lt;br /&gt;
    --user \&lt;br /&gt;
    --name myEnv \&lt;br /&gt;
    --display-name &amp;quot;Python (myEnv)&amp;quot; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After installing the kernel (and possibly refreshing the browser window), a button named &amp;quot;myEnv&amp;quot; is available in JupyterLab. The kernel can also be selected from the drop-down menu.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Attention&#039;&#039;&#039;&lt;br /&gt;
The (Lmod) base module you used in the Creation of virtual environment step must be loaded to use the venv. However, to be on the safe side, you can also use the system Python (&amp;lt;code&amp;gt;/usr/bin/python3.11&amp;lt;/code&amp;gt;) at creation time, which is available even without any &amp;lt;code&amp;gt;jupyter/{base,tensorflow}&amp;lt;/code&amp;gt; module loaded.&lt;br /&gt;
&lt;br /&gt;
== Examples on Data processing, Machine Learning &amp;amp; Visualization ==&lt;br /&gt;
&lt;br /&gt;
In the [https://github.com/hpcraink/workshop-parallel-jupyter/ workshop repository] the usage and best practices on Python in general, and the packages NumPy, Pandas, SciKit and Dask are provided, containing running examples based on open data. It also explains, how Jupyter interacts with pre-installed and your own provided environments.&lt;br /&gt;
&lt;br /&gt;
== R language ==&lt;br /&gt;
&lt;br /&gt;
In order to use R language in JupyterLab, the Lmod module &amp;lt;code&amp;gt;math/R&amp;lt;/code&amp;gt; has to be loaded (blue button in JupyterLab or &amp;lt;code&amp;gt;module add math/R&amp;lt;/code&amp;gt; in terminal) and a corresponding kernel has to be installed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
R&lt;br /&gt;
install.packages(&#039;IRkernel&#039;)&lt;br /&gt;
IRkernel::installspec()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After installing the kernel , a button named &amp;quot;R&amp;quot; is available in JupyterLab. The kernel can also be selected from the drop-down menu.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Attention:&#039;&#039;&#039;&lt;br /&gt;
Don&#039;t forget to load the &amp;lt;code&amp;gt;math/R&amp;lt;/code&amp;gt; module (blue button) before using the kernel.&lt;br /&gt;
&lt;br /&gt;
== Julia language ==&lt;br /&gt;
&lt;br /&gt;
In order to use Julia language in JupyterLab, the Lmod module &amp;lt;code&amp;gt;math/julia/1.10.8&amp;lt;/code&amp;gt; has to be loaded (blue button in JupyterLab or &amp;lt;code&amp;gt;module math/julia/1.10.8&amp;lt;/code&amp;gt; in terminal). When the module is loaded from the JupytherLab UI, the corresponding kernel will be installed. If you use the terminal, this has to be done manually&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
julia&lt;br /&gt;
]&lt;br /&gt;
add IJulia&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After installing the kernel, a button named &amp;quot;Julia 1.10.8&amp;quot; is available in JupyterLab. The kernel can also be selected from the drop-down menu.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Attention:&#039;&#039;&#039;&lt;br /&gt;
Don&#039;t forget to load the &amp;lt;code&amp;gt;math/julia/1.10.8&amp;lt;/code&amp;gt; module (blue button) before using the kernel.&lt;br /&gt;
&lt;br /&gt;
= Jupyter Container Mode =&lt;br /&gt;
&lt;br /&gt;
The container integration on the jupyterhub is done via pyxis. In order to use it the checkmark for container mode has to be clicked. Available options are:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt; --container-image:&amp;lt;/code&amp;gt; The container image to use. Corresponds to the pyxis option --container-image&lt;br /&gt;
* &amp;lt;code&amp;gt; --container-name:&amp;lt;/code&amp;gt; The name of the image to use. Corresponds to the pyxis option --container-name. Already downloaded containers in ~/.local/share/enroot can be startet by simply specifing their name.&lt;br /&gt;
* &amp;lt;code&amp;gt; --container-mount-home:&amp;lt;/code&amp;gt; Corresponds to the pyxis option --container-mount-home. Mounts the home-directory&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Attention:&#039;&#039;&#039;&lt;br /&gt;
Make sure Python3.11 and pip are installed in the Container or the notebook will not spawn. This can be checked via command python3.11 -m pip list inside your container&lt;br /&gt;
&lt;br /&gt;
It is advised to create the container prior via e.G. enroot and install all necessary software. For more information see [https://wiki.bwhpc.de/e/BwUniCluster2.0/Containers#SLURM_Integration here]&lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>S Fischer</name></author>
	</entry>
</feed>