{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "
bash
kernel and repeat the execution of the previous cell.\n",
"\n", " PARTITION AVAIL TIMELIMIT NODES STATE NODELIST\n", "visualize up 2-00:00:00 1 alloc lg1\n", "visualize up 2-00:00:00 3 idle lg[0,2-3]\n", "gpu up 12:00:00 4 resv l[50018,50033,50048,50175]\n", "gpu up 12:00:00 13 plnd l[50109,50112,50115,50118,50121,50124,50130,50133,50136,50139,50142,50145,50148]\n", "gpu up 12:00:00 4 drain$ l[40363,50000,50063,50072]\n", "gpu up 12:00:00 24 mix l[50003,50006,50009,50012,50015,50021,50024,50027,50030,50036,50039,50045,50051,50057,50066,50069,50075,50078,50081,50100,50103,50106,50127,50154]\n", "gpu up 12:00:00 15 alloc l[40360,40366,40369,50042,50054,50060,50151,50157,50160,50163,50166,50169,50172,50178,50181]\n", "compute up 8:00:00 100 plnd l[20400,20405,20408,20410-20416,20421-20429,20439-20441,20444,20449,20451-20452,20455-20457,20500-20503,20505-20514,20517-20518,20520-20531,20533-20539,20542-20547,20648,20654-20662,20666,20673-20690,20692]\n", "compute up 8:00:00 8 comp l[10115-10122]\n", "compute up 8:00:00 8 resv l[10028,10567,20348-20349,20351,20353,20356-20357]\n", "compute up 8:00:00 2637 alloc l[10000-10027,10029-10058,10060-10095,10100-10114,10123-10158,10160-10195,10200-10258,10260-10295,10300,10309-10322,10324-10395,10400-10491,10500-10566,10568-10595,10608,10626-10627,10636-10695,10700-10787,10789-10795,20000-20095,20100-20195,20200-20295,20300-20347,20350,20352,20354-20355,20358-20395,20401-20404,20406-20407,20409,20417-20420,20430-20438,20442-20443,20445-20448,20450,20453-20454,20461-20463,20471,20504,20515-20516,20519,20532,20540-20541,20548-20595,20600-20647,20649-20653,20663-20665,20667-20672,20691,20693-20695,30000-30095,30100-30195,30200-30295,30300-30316,30318-30339,30344-30395,30400-30487,30489-30495,30500-30553,30600-30637,30639-30689,30691-30695,30700-30795,40021-40047,40072-40083,40090-40095,40100-40183,40190-40192,40194-40195,40200-40283,40287-40295,40300-40347,40349-40359,40400-40459,40500-40571,40577,40580,40582-40585,40592-40595,40600-40683,40687-40695,50200-50295,50300-50333,50335-50359,50369-50371]\n", "compute up 8:00:00 184 idle l[10301-10308,10323,10492-10495,10600-10607,10609-10625,10628-10635,10788,20458-20460,20464-20470,20472-20495,30317,30340-30343,30488,30554-30595,30638,30690,40193,40348,40460-40495,40572-40576,40578-40579,40581,40586-40591,50334]\n", "shared up 7-00:00:00 2 resv l[10028,10567]\n", "shared up 7-00:00:00 16 mix l[40000-40010,40012-40014,40016,40020]\n", "shared up 7-00:00:00 3 alloc l[40011,40015,40017]\n", "shared up 7-00:00:00 2 idle l[40018-40019]\n", "interactive up 12:00:00 5 mix l[40048-40050,40055,40057]\n", "interactive up 12:00:00 6 alloc l[40072-40077]\n", "interactive up 12:00:00 19 idle l[40051-40054,40056,40058-40071]\n", "daki up 14-00:00:0 3 idle l[50187,50190,50193]\n", "vader up 2-00:00:00 3 idle vader[1-3]\n", "gpu-devel up 30:00 3 idle vader[1-3]\n", "dolpung up 12:00:00 1 inval l50437\n", "dolpung up 12:00:00 1 drain~ l50436\n", "dolpung up 12:00:00 1 mix l50432\n", "dolpung up 12:00:00 41 resv l[50400-50431,50433-50435,50438-50443]\n", "\n", "
SBATCH
options with the above information.\n",
""
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"cat > $HOME/test.sbatch << 'EOF'\n",
"#!/bin/bash\n",
"#SBATCH --job-name=testjob\n",
"#SBATCH --partition=???????? # Specify partition name\n",
"#SBATCH --output=slurm.%j.out\n",
"#SBATCH --time=00:30:00\n",
"\n",
"export NUMEXPR_MAX_THREADS=2\n",
"module load python3\n",
"\n",
"python3 $HOME/test.py\n",
"\n",
"################################\n",
"sleep 500\n",
"\n",
"EOF"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"squeue
command.\n",
" Hint: The output gets shorter when specifying the user ID.\n",
"scancel <jobid>
on the login node to abort the running batch job. Make sure afterwards (using squeue
) that the job has actually been finished!\n",
"squeue.ipynb
, showing how to do this."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"---"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Congratulations! You have reached the end of this exercise! - To be continued!"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"---"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Further Reading and Resources\n",
"\n",
"- JupyterLab\n",
" - User interface: https://jupyterlab.readthedocs.io/en/stable/user/interface.html\n",
"- Slurm job scheduler\n",
" - DKRZ Slurm introduction: https://docs.dkrz.de/doc/levante/running-jobs/slurm-introduction.html\n",
" - Slurm quick start user guide: https://slurm.schedmd.com/quickstart.html\n",
"- Levante file systems: https://docs.dkrz.de/doc/levante/file-systems.html"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"---\n",
"\n",
"*Author info: Deutscher Wetterdienst (DWD) 2025 :: icon@dwd.de. For a full list of contributors, see CONTRIBUTING in the root directory. License info: see LICENSE file.*"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "1 Python 3 (based on the module python3/2023.01)",
"language": "python",
"name": "python3_2023_01"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.10"
}
},
"nbformat": 4,
"nbformat_minor": 4
}