<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.anunna.wur.nl/index.php?action=history&amp;feed=atom&amp;title=HPC_Advanced%2FPreparation_Exercise</id>
	<title>HPC Advanced/Preparation Exercise - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.anunna.wur.nl/index.php?action=history&amp;feed=atom&amp;title=HPC_Advanced%2FPreparation_Exercise"/>
	<link rel="alternate" type="text/html" href="https://wiki.anunna.wur.nl/index.php?title=HPC_Advanced/Preparation_Exercise&amp;action=history"/>
	<updated>2026-06-20T06:11:06Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.3</generator>
	<entry>
		<id>https://wiki.anunna.wur.nl/index.php?title=HPC_Advanced/Preparation_Exercise&amp;diff=2787&amp;oldid=prev</id>
		<title>Honfi001: /* Part 3 — The Launcher Script weather.sh */</title>
		<link rel="alternate" type="text/html" href="https://wiki.anunna.wur.nl/index.php?title=HPC_Advanced/Preparation_Exercise&amp;diff=2787&amp;oldid=prev"/>
		<updated>2026-06-17T06:24:53Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Part 3 — The Launcher Script weather.sh&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 06:24, 17 June 2026&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l143&quot;&gt;Line 143:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 143:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;source &amp;quot;$myScratch/hpcCourse/venv/bin/activate&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;source &amp;quot;$myScratch/hpcCourse/venv/bin/activate&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# Run the analyser (240 = &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;months &lt;/del&gt;of &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;data to plot, ~20 years&lt;/del&gt;)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# Run the analyser (240 = &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;ID &lt;/ins&gt;of &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;this specific weather station&lt;/ins&gt;)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;python &amp;quot;$myScratch/hpcCourse/weer_vanaf_2000.py&amp;quot; 240&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;python &amp;quot;$myScratch/hpcCourse/weer_vanaf_2000.py&amp;quot; 240&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l175&quot;&gt;Line 175:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 175:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# &amp;#039;&amp;#039;&amp;#039;Write&amp;#039;&amp;#039;&amp;#039; a SLURM script for the job using the resource requirements you determined in Step 2. Label it &amp;#039;&amp;#039;&amp;#039;&amp;lt;code&amp;gt;weather.slurm&amp;lt;/code&amp;gt;&amp;#039;&amp;#039;&amp;#039;.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# &amp;#039;&amp;#039;&amp;#039;Write&amp;#039;&amp;#039;&amp;#039; a SLURM script for the job using the resource requirements you determined in Step 2. Label it &amp;#039;&amp;#039;&amp;#039;&amp;lt;code&amp;gt;weather.slurm&amp;lt;/code&amp;gt;&amp;#039;&amp;#039;&amp;#039;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# &amp;#039;&amp;#039;&amp;#039;Submit&amp;#039;&amp;#039;&amp;#039; the job with &amp;lt;code&amp;gt;sbatch&amp;lt;/code&amp;gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# &amp;#039;&amp;#039;&amp;#039;Submit&amp;#039;&amp;#039;&amp;#039; the job with &amp;lt;code&amp;gt;sbatch&amp;lt;/code&amp;gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# &#039;&#039;&#039;Check the status&#039;&#039;&#039; of your job and cancel it if needed.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# &#039;&#039;&#039;Check the status&#039;&#039;&#039; of your job and cancel it if needed&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;, though probably not since the jobs are very short&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# &amp;#039;&amp;#039;&amp;#039;Check the figures&amp;#039;&amp;#039;&amp;#039; generated by the Python script.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# &amp;#039;&amp;#039;&amp;#039;Check the figures&amp;#039;&amp;#039;&amp;#039; generated by the Python script.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Honfi001</name></author>
	</entry>
	<entry>
		<id>https://wiki.anunna.wur.nl/index.php?title=HPC_Advanced/Preparation_Exercise&amp;diff=2786&amp;oldid=prev</id>
		<title>Honfi001: Fix headers</title>
		<link rel="alternate" type="text/html" href="https://wiki.anunna.wur.nl/index.php?title=HPC_Advanced/Preparation_Exercise&amp;diff=2786&amp;oldid=prev"/>
		<updated>2026-06-17T06:20:26Z</updated>

		<summary type="html">&lt;p&gt;Fix headers&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 06:20, 17 June 2026&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l82&quot;&gt;Line 82:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 82:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Then &amp;lt;code&amp;gt;source ~/.bashrc&amp;lt;/code&amp;gt; once more.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Then &amp;lt;code&amp;gt;source ~/.bashrc&amp;lt;/code&amp;gt; once more.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Part 2 &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;(Step 0) &lt;/del&gt;— Python Virtual Environment ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Part 2 — Python Virtual Environment ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;We isolate the analyser&amp;#039;s dependencies in a virtual environment living on Lustre scratch.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;We isolate the analyser&amp;#039;s dependencies in a virtual environment living on Lustre scratch.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l118&quot;&gt;Line 118:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 118:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Part 3 &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;(Step 1) &lt;/del&gt;— The Launcher Script &amp;lt;code&amp;gt;weather.sh&amp;lt;/code&amp;gt; ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Part 3 — The Launcher Script &amp;lt;code&amp;gt;weather.sh&amp;lt;/code&amp;gt; ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== Tasks ===&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== Tasks ===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l153&quot;&gt;Line 153:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 153:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Part 4 &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;(Step 2) &lt;/del&gt;— Find the Job Requirements ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Part 4 — Find the Job Requirements ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Before submitting a batch job you need to know how much memory it needs. We start with a deliberately small allocation and increase it until the job stops crashing.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Before submitting a batch job you need to know how much memory it needs. We start with a deliberately small allocation and increase it until the job stops crashing.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l169&quot;&gt;Line 169:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 169:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;If the job is killed (out-of-memory), exit the interactive session, re-launch &amp;lt;code&amp;gt;sinteractive&amp;lt;/code&amp;gt; with a larger &amp;lt;code&amp;gt;--mem&amp;lt;/code&amp;gt; value (e.g. &amp;lt;code&amp;gt;200M&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;500M&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;1G&amp;lt;/code&amp;gt;, …) and run again. Repeat until &amp;lt;code&amp;gt;weather.sh&amp;lt;/code&amp;gt; completes cleanly. &amp;#039;&amp;#039;&amp;#039;Note the smallest &amp;lt;code&amp;gt;--mem&amp;lt;/code&amp;gt; value that works&amp;#039;&amp;#039;&amp;#039; — you will use it in Step 3.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;If the job is killed (out-of-memory), exit the interactive session, re-launch &amp;lt;code&amp;gt;sinteractive&amp;lt;/code&amp;gt; with a larger &amp;lt;code&amp;gt;--mem&amp;lt;/code&amp;gt; value (e.g. &amp;lt;code&amp;gt;200M&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;500M&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;1G&amp;lt;/code&amp;gt;, …) and run again. Repeat until &amp;lt;code&amp;gt;weather.sh&amp;lt;/code&amp;gt; completes cleanly. &amp;#039;&amp;#039;&amp;#039;Note the smallest &amp;lt;code&amp;gt;--mem&amp;lt;/code&amp;gt; value that works&amp;#039;&amp;#039;&amp;#039; — you will use it in Step 3.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Part 5 &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;(Step 3) &lt;/del&gt;— Write and Submit a SLURM Script ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Part 5 — Write and Submit a SLURM Script ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== Tasks ===&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== Tasks ===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Honfi001</name></author>
	</entry>
	<entry>
		<id>https://wiki.anunna.wur.nl/index.php?title=HPC_Advanced/Preparation_Exercise&amp;diff=2771&amp;oldid=prev</id>
		<title>Honfi001: /* 1.1 — Set up the variables */</title>
		<link rel="alternate" type="text/html" href="https://wiki.anunna.wur.nl/index.php?title=HPC_Advanced/Preparation_Exercise&amp;diff=2771&amp;oldid=prev"/>
		<updated>2026-06-16T13:55:10Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;1.1 — Set up the variables&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 13:55, 16 June 2026&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l24&quot;&gt;Line 24:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 24:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;# Provided it does not exist&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# Create an empty ~/.bash_aliases if you do not already have one&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# Create an empty ~/.bash_aliases if you do not already have one&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;$ touch ~/.bash_aliases&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;$ touch ~/.bash_aliases&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# Load the anunna module &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;(this provides getLustreDir)&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# Load the anunna module  &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;$ module load anunna&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;$ module load anunna&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l116&quot;&gt;Line 116:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 117:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;$ pip freeze          # for checking what is installed&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;$ pip freeze          # for checking what is installed&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;{{Note|&#039;&#039;&#039;Note on &amp;lt;code&amp;gt;datetime&amp;lt;/code&amp;gt;:&#039;&#039;&#039; &amp;lt;code&amp;gt;datetime&amp;lt;/code&amp;gt; is part of the Python &#039;&#039;&#039;standard library&#039;&#039;&#039; — it ships with the interpreter and does not actually need to be installed. The analyser imports the built-in module. The line above is kept for parity with the course slides; you only truly need &amp;lt;code&amp;gt;matplotlib&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;pandas&amp;lt;/code&amp;gt;.}}&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Part 3 (Step 1) — The Launcher Script &amp;lt;code&amp;gt;weather.sh&amp;lt;/code&amp;gt; ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Part 3 (Step 1) — The Launcher Script &amp;lt;code&amp;gt;weather.sh&amp;lt;/code&amp;gt; ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Honfi001</name></author>
	</entry>
	<entry>
		<id>https://wiki.anunna.wur.nl/index.php?title=HPC_Advanced/Preparation_Exercise&amp;diff=2770&amp;oldid=prev</id>
		<title>Honfi001: Created page with &quot;= HPC Basics Refresher — Weather Data Analyser =  {{Note|&#039;&#039;&#039;Who is this for?&#039;&#039;&#039; This is a self-paced preparation exercise for people who are attending the &#039;&#039;&#039;HPC Advanced&#039;&#039;&#039; course but did &#039;&#039;&#039;not&#039;&#039;&#039; attend &#039;&#039;&#039;HPC Basics&#039;&#039;&#039;. Working through it end to end means you arrive at the advanced course already comfortable with environment variables, virtual environments, launcher scripts, interactive jobs, and SLURM batch submission on &#039;&#039;&#039;Anunna&#039;&#039;&#039;.}}  &#039;&#039;&#039;The application:&#039;&#039;&#039; a s...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.anunna.wur.nl/index.php?title=HPC_Advanced/Preparation_Exercise&amp;diff=2770&amp;oldid=prev"/>
		<updated>2026-06-16T13:48:31Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;= HPC Basics Refresher — Weather Data Analyser =  {{Note|&amp;#039;&amp;#039;&amp;#039;Who is this for?&amp;#039;&amp;#039;&amp;#039; This is a self-paced preparation exercise for people who are attending the &amp;#039;&amp;#039;&amp;#039;HPC Advanced&amp;#039;&amp;#039;&amp;#039; course but did &amp;#039;&amp;#039;&amp;#039;not&amp;#039;&amp;#039;&amp;#039; attend &amp;#039;&amp;#039;&amp;#039;HPC Basics&amp;#039;&amp;#039;&amp;#039;. Working through it end to end means you arrive at the advanced course already comfortable with environment variables, virtual environments, launcher scripts, interactive jobs, and SLURM batch submission on &amp;#039;&amp;#039;&amp;#039;Anunna&amp;#039;&amp;#039;&amp;#039;.}}  &amp;#039;&amp;#039;&amp;#039;The application:&amp;#039;&amp;#039;&amp;#039; a s...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= HPC Basics Refresher — Weather Data Analyser =&lt;br /&gt;
&lt;br /&gt;
{{Note|&amp;#039;&amp;#039;&amp;#039;Who is this for?&amp;#039;&amp;#039;&amp;#039; This is a self-paced preparation exercise for people who are attending the &amp;#039;&amp;#039;&amp;#039;HPC Advanced&amp;#039;&amp;#039;&amp;#039; course but did &amp;#039;&amp;#039;&amp;#039;not&amp;#039;&amp;#039;&amp;#039; attend &amp;#039;&amp;#039;&amp;#039;HPC Basics&amp;#039;&amp;#039;&amp;#039;. Working through it end to end means you arrive at the advanced course already comfortable with environment variables, virtual environments, launcher scripts, interactive jobs, and SLURM batch submission on &amp;#039;&amp;#039;&amp;#039;Anunna&amp;#039;&amp;#039;&amp;#039;.}}&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;The application:&amp;#039;&amp;#039;&amp;#039; a small Python script that loads weather data from a Dutch weather station and draws some figures.&lt;br /&gt;
&lt;br /&gt;
Source: &amp;lt;code&amp;gt;/lustre/shared/hpcCourses/Basics/weer_vanaf_2000.py&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
By the end you will have:&lt;br /&gt;
&lt;br /&gt;
* Set up handy Lustre path variables (&amp;lt;code&amp;gt;$myScratch&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;$myBkp&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;$myNoBkp&amp;lt;/code&amp;gt;) and aliases&lt;br /&gt;
* Created a Python virtual environment on Lustre scratch&lt;br /&gt;
* Written an executable launcher script (&amp;lt;code&amp;gt;weather.sh&amp;lt;/code&amp;gt;)&lt;br /&gt;
* Measured the job&amp;#039;s memory requirement interactively&lt;br /&gt;
* Written and submitted a SLURM batch script (&amp;lt;code&amp;gt;weather.slurm&amp;lt;/code&amp;gt;) and collected the figures&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Conventions in this document:&amp;#039;&amp;#039; lines starting with &amp;lt;code&amp;gt;$&amp;lt;/code&amp;gt; are commands you type at the shell (do not type the &amp;lt;code&amp;gt;$&amp;lt;/code&amp;gt;). &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;placeholder&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; means &amp;#039;&amp;#039;substitute your own value&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
== Part 1 — Environment Variables &amp;amp; Aliases ==&lt;br /&gt;
&lt;br /&gt;
The Anunna &amp;lt;code&amp;gt;getLustreDir&amp;lt;/code&amp;gt; helper writes your personal Lustre directories (&amp;lt;code&amp;gt;$myScratch&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;$myBkp&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;$myNoBkp&amp;lt;/code&amp;gt;) into your environment so you never have to type long paths again.&lt;br /&gt;
&lt;br /&gt;
=== 1.1 — Set up the variables ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Create an empty ~/.bash_aliases if you do not already have one&lt;br /&gt;
$ touch ~/.bash_aliases&lt;br /&gt;
&lt;br /&gt;
# Load the anunna module (this provides getLustreDir)&lt;br /&gt;
$ module load anunna&lt;br /&gt;
&lt;br /&gt;
# Inspect what getLustreDir does&lt;br /&gt;
$ getLustreDir -h&lt;br /&gt;
&lt;br /&gt;
# Append the export lines to your ~/.bash_aliases&lt;br /&gt;
$ getLustreDir -e &amp;gt;&amp;gt; ~/.bash_aliases&lt;br /&gt;
&lt;br /&gt;
# Check the result (cat, less, more or nano all work)&lt;br /&gt;
$ cat ~/.bash_aliases&lt;br /&gt;
&lt;br /&gt;
# Reload your environment so the new variables take effect&lt;br /&gt;
$ source ~/.bashrc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 1.2 — Test the variables ===&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Test 1 — does this print your scratch folder location?&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ echo $myScratch&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Test 2 — does this take you to your scratch folder?&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ cd $myScratch&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If both work, your variables are live.&lt;br /&gt;
&lt;br /&gt;
=== 1.3 — Bonus: convenience aliases ===&lt;br /&gt;
&lt;br /&gt;
Add these lines to your &amp;lt;code&amp;gt;~/.bash_aliases&amp;lt;/code&amp;gt; and reload your environment again:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
alias cds=&amp;quot;cd $myScratch&amp;quot;&lt;br /&gt;
alias cdb=&amp;quot;cd $myBkp&amp;quot;&lt;br /&gt;
alias cdn=&amp;quot;cd $myNoBkp&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Note|&amp;#039;&amp;#039;&amp;#039;Important:&amp;#039;&amp;#039;&amp;#039; the alias lines must come &amp;#039;&amp;#039;&amp;#039;after&amp;#039;&amp;#039;&amp;#039; the variable definitions in &amp;lt;code&amp;gt;~/.bash_aliases&amp;lt;/code&amp;gt;, because they reference those variables.}}&lt;br /&gt;
&lt;br /&gt;
If your aliases still do not work after &amp;lt;code&amp;gt;source ~/.bashrc&amp;lt;/code&amp;gt;, your &amp;lt;code&amp;gt;~/.bashrc&amp;lt;/code&amp;gt; may not be sourcing &amp;lt;code&amp;gt;~/.bash_aliases&amp;lt;/code&amp;gt; at all. Add this block to the &amp;#039;&amp;#039;&amp;#039;end&amp;#039;&amp;#039;&amp;#039; of your &amp;lt;code&amp;gt;~/.bashrc&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
if [ -f ~/.bash_aliases ]; then&lt;br /&gt;
    . ~/.bash_aliases&lt;br /&gt;
fi&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then &amp;lt;code&amp;gt;source ~/.bashrc&amp;lt;/code&amp;gt; once more.&lt;br /&gt;
&lt;br /&gt;
== Part 2 (Step 0) — Python Virtual Environment ==&lt;br /&gt;
&lt;br /&gt;
We isolate the analyser&amp;#039;s dependencies in a virtual environment living on Lustre scratch.&lt;br /&gt;
&lt;br /&gt;
=== 2.1 — Load the software stack and Python ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ module purge&lt;br /&gt;
$ module load 2024&lt;br /&gt;
$ module load Python/3.12.3&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 2.2 — Create the virtual environment (in Lustre scratch) ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ mkdir $myScratch/hpcCourse; cd $_&lt;br /&gt;
$ python -m venv $myScratch/hpcCourse/venv&lt;br /&gt;
$ source $myScratch/hpcCourse/venv/bin/activate&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Note|&amp;lt;code&amp;gt;cd $_&amp;lt;/code&amp;gt; reuses the last argument of the previous command — here, the directory you just created.}}&lt;br /&gt;
&lt;br /&gt;
=== 2.3 — Check you are using the venv&amp;#039;s Python ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ which python      # should point inside .../hpcCourse/venv/bin&lt;br /&gt;
$ python -V          # should report Python 3.12.3&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 2.4 — Install the required libraries ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ pip install matplotlib pandas datetime&lt;br /&gt;
$ pip freeze          # for checking what is installed&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Note|&amp;#039;&amp;#039;&amp;#039;Note on &amp;lt;code&amp;gt;datetime&amp;lt;/code&amp;gt;:&amp;#039;&amp;#039;&amp;#039; &amp;lt;code&amp;gt;datetime&amp;lt;/code&amp;gt; is part of the Python &amp;#039;&amp;#039;&amp;#039;standard library&amp;#039;&amp;#039;&amp;#039; — it ships with the interpreter and does not actually need to be installed. The analyser imports the built-in module. The line above is kept for parity with the course slides; you only truly need &amp;lt;code&amp;gt;matplotlib&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;pandas&amp;lt;/code&amp;gt;.}}&lt;br /&gt;
&lt;br /&gt;
== Part 3 (Step 1) — The Launcher Script &amp;lt;code&amp;gt;weather.sh&amp;lt;/code&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
=== Tasks ===&lt;br /&gt;
&lt;br /&gt;
# Copy the Python script into your course folder:&lt;br /&gt;
#: &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; inline&amp;gt;cp /lustre/shared/hpcCourses/Basics/weer_vanaf_2000.py $myScratch/hpcCourse/&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
# Write a bash script called &amp;#039;&amp;#039;&amp;#039;&amp;lt;code&amp;gt;weather.sh&amp;lt;/code&amp;gt;&amp;#039;&amp;#039;&amp;#039; that loads the modules and activates the virtual environment you created, and make it executable.&lt;br /&gt;
# The script should end with the run command below. &amp;#039;&amp;#039;&amp;#039;Hint:&amp;#039;&amp;#039;&amp;#039; use variables for paths.&lt;br /&gt;
#: &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; inline&amp;gt;python $myScratch/hpcCourse/weer_vanaf_2000.py 240&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
#: (&amp;lt;code&amp;gt;240&amp;lt;/code&amp;gt; is the argument passed to the analyser — the number of months of data to plot, i.e. ~20 years.)&lt;br /&gt;
&lt;br /&gt;
=== Example solution — &amp;lt;code&amp;gt;weather.sh&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
# weather.sh — load the environment and run the Weather Data Analyser&lt;br /&gt;
&lt;br /&gt;
# Load the software stack and Python&lt;br /&gt;
module purge&lt;br /&gt;
module load 2024&lt;br /&gt;
module load Python/3.12.3&lt;br /&gt;
&lt;br /&gt;
# Activate the virtual environment&lt;br /&gt;
source &amp;quot;$myScratch/hpcCourse/venv/bin/activate&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Run the analyser (240 = months of data to plot, ~20 years)&lt;br /&gt;
python &amp;quot;$myScratch/hpcCourse/weer_vanaf_2000.py&amp;quot; 240&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make it executable:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ chmod +x $myScratch/hpcCourse/weather.sh&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Part 4 (Step 2) — Find the Job Requirements ==&lt;br /&gt;
&lt;br /&gt;
Before submitting a batch job you need to know how much memory it needs. We start with a deliberately small allocation and increase it until the job stops crashing.&lt;br /&gt;
&lt;br /&gt;
=== Task ===&lt;br /&gt;
&lt;br /&gt;
Find the job requirements (e.g. memory) of the Python script using &amp;lt;code&amp;gt;sinteractive&amp;lt;/code&amp;gt;. Increase the amount of RAM until the job no longer crashes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ sinteractive --mem 100M --time=0-0:10 -c 1&lt;br /&gt;
$ cd $myScratch/hpcCourse&lt;br /&gt;
$ ./weather.sh&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the job is killed (out-of-memory), exit the interactive session, re-launch &amp;lt;code&amp;gt;sinteractive&amp;lt;/code&amp;gt; with a larger &amp;lt;code&amp;gt;--mem&amp;lt;/code&amp;gt; value (e.g. &amp;lt;code&amp;gt;200M&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;500M&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;1G&amp;lt;/code&amp;gt;, …) and run again. Repeat until &amp;lt;code&amp;gt;weather.sh&amp;lt;/code&amp;gt; completes cleanly. &amp;#039;&amp;#039;&amp;#039;Note the smallest &amp;lt;code&amp;gt;--mem&amp;lt;/code&amp;gt; value that works&amp;#039;&amp;#039;&amp;#039; — you will use it in Step 3.&lt;br /&gt;
&lt;br /&gt;
== Part 5 (Step 3) — Write and Submit a SLURM Script ==&lt;br /&gt;
&lt;br /&gt;
=== Tasks ===&lt;br /&gt;
&lt;br /&gt;
# &amp;#039;&amp;#039;&amp;#039;Write&amp;#039;&amp;#039;&amp;#039; a SLURM script for the job using the resource requirements you determined in Step 2. Label it &amp;#039;&amp;#039;&amp;#039;&amp;lt;code&amp;gt;weather.slurm&amp;lt;/code&amp;gt;&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
# &amp;#039;&amp;#039;&amp;#039;Submit&amp;#039;&amp;#039;&amp;#039; the job with &amp;lt;code&amp;gt;sbatch&amp;lt;/code&amp;gt;.&lt;br /&gt;
# &amp;#039;&amp;#039;&amp;#039;Check the status&amp;#039;&amp;#039;&amp;#039; of your job and cancel it if needed.&lt;br /&gt;
# &amp;#039;&amp;#039;&amp;#039;Check the figures&amp;#039;&amp;#039;&amp;#039; generated by the Python script.&lt;br /&gt;
&lt;br /&gt;
{{Note|&amp;#039;&amp;#039;&amp;#039;Tip:&amp;#039;&amp;#039;&amp;#039; a SLURM template is available at &amp;lt;code&amp;gt;/lustre/shared/hpcCourses/Basics/script_slurm.sh&amp;lt;/code&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
=== Example solution — &amp;lt;code&amp;gt;weather.slurm&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
#SBATCH --job-name=weather&lt;br /&gt;
#SBATCH --mem=&amp;lt;RAM-from-Step-2&amp;gt;     # e.g. 500M — the value you found in Step 2&lt;br /&gt;
#SBATCH --time=0-0:10&lt;br /&gt;
#SBATCH --cpus-per-task=1&lt;br /&gt;
#SBATCH --output=weather-%j.out&lt;br /&gt;
#SBATCH --error=weather-%j.err&lt;br /&gt;
&lt;br /&gt;
cd &amp;quot;$myScratch/hpcCourse&amp;quot;&lt;br /&gt;
./weather.sh&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Submit, monitor, and collect results ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Submit the job&lt;br /&gt;
$ sbatch weather.slurm&lt;br /&gt;
&lt;br /&gt;
# Check the status of your jobs&lt;br /&gt;
$ squeue --me&lt;br /&gt;
&lt;br /&gt;
# Cancel a job if needed (replace &amp;lt;jobid&amp;gt; with the ID from squeue / sbatch)&lt;br /&gt;
$ scancel &amp;lt;jobid&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Once finished, inspect the output and the generated figures&lt;br /&gt;
$ ls $myScratch/hpcCourse&lt;br /&gt;
$ cat weather-&amp;lt;jobid&amp;gt;.out&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The analyser writes its figures into your course folder — open them to confirm the run succeeded.&lt;br /&gt;
&lt;br /&gt;
== Checklist ==&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;echo $myScratch&amp;lt;/code&amp;gt; prints your scratch path and &amp;lt;code&amp;gt;cd $myScratch&amp;lt;/code&amp;gt; works&lt;br /&gt;
* &amp;lt;code&amp;gt;cds&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;cdb&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;cdn&amp;lt;/code&amp;gt; aliases jump to the right folders&lt;br /&gt;
* Virtual environment activates and &amp;lt;code&amp;gt;which python&amp;lt;/code&amp;gt; points inside it&lt;br /&gt;
* &amp;lt;code&amp;gt;weather.sh&amp;lt;/code&amp;gt; is executable and runs the analyser interactively&lt;br /&gt;
* You know the minimum &amp;lt;code&amp;gt;--mem&amp;lt;/code&amp;gt; the job needs (from Step 2)&lt;br /&gt;
* &amp;lt;code&amp;gt;weather.slurm&amp;lt;/code&amp;gt; submits with &amp;lt;code&amp;gt;sbatch&amp;lt;/code&amp;gt; and the figures are generated&lt;br /&gt;
&lt;br /&gt;
You are now ready for the &amp;#039;&amp;#039;&amp;#039;HPC Advanced&amp;#039;&amp;#039;&amp;#039; course.&lt;/div&gt;</summary>
		<author><name>Honfi001</name></author>
	</entry>
</feed>