You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/summary2.rst
+21-9Lines changed: 21 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,35 +8,47 @@ Summary day 2
8
8
.. keypoints::
9
9
10
10
- Load and run and pre-installed packages
11
+
11
12
- Use python from module system
12
13
- Start a Python shell session either with ``python`` or ``ipython``
13
14
- run scripts with ``python3 <script.py>``
14
15
- Check for preinstalled packages
16
+
15
17
- from the Python shell with the ``import`` command
16
18
- from BASH shell with the
19
+
17
20
- ``pip list`` command at both centers
18
-
- ``ml help python/3.11.8`` at UPPMAX
19
-
- ``module -r spider '.*Python.*'`` at otherwise
21
+
- ``module spider <package>`` at otherwise
20
22
21
23
- Install packages and use isolated environments
24
+
22
25
- With a virtual environment you can tailor an environment with specific versions for Python and packages, not interfering with other installed python versions and packages.
23
26
- Make it for each project you have for reproducibility.
24
27
- There are different tools to create virtual environments.
25
-
- ``virtualenv`` and ``venv``
28
+
29
+
- ``venv``
26
30
- install packages with ``pip``.
27
31
- the flag ``--system-site-packages`` includes preinstalled packages as well
28
-
- Conda (available everywhere but not HPC2N)
29
-
- Conda is an installer of packages but also bigger toolkits
32
+
- Conda (available everywhere but not HPC2N)
33
+
- Conda is an installer of packages but also bigger toolkits
30
34
- Conda creates isolated environments as well
31
35
- requires that you install all packages needed.
32
-
- Rackham: Pip or secondary conda
33
-
- Bianca: conda and secondary wharf + (pip or conda)
36
+
37
+
- Slurm and batch
38
+
39
+
- The SLURM scheduler handles allocations to the calculation nodes
40
+
- Batch jobs runs without interaction with user
41
+
- A batch script consists of a part with *SLURM parameters* describing the allocation and a second part describing the actual work within the job, for instance one or several Python scripts.
42
+
- Remember to include possible input arguments to the Python script in the batch script.
34
43
35
44
- Interactive work on calculation nodes
45
+
36
46
- Start an interactive session on a calculation node by a SLURM allocation (similar flags)
37
-
- At HPC2N: ``salloc`` ...
47
+
48
+
- At HPC2N/PDC: ``salloc`` ...
38
49
- At UPPMAX/NSC: ``interactive`` ...
39
-
- At LUNARC: Desktop on demand
50
+
- At LUNARC/C3SE: Desktop on demand
51
+
40
52
- Follow the same procedure as usual by loading the Python module and possible prerequisites.
0 commit comments