Introduction
- Welcome page and syllabus
Also link at House symbol 🏠 at top of page
Learning outcomes
Load Python modules and site-installed Python packages
Create a virtual environment
Install Python packages with pip (Kebnekaise, Rackham, Snowy)
Write a batch script for running Python
Use the compute nodes interactively
Use Python in parallel
Use Python for ML
Use GPUs with Python
What is python?
As you probably already know…
“Python combines remarkable power with very clear syntax.
It has modules, classes, exceptions, very high level dynamic data types, and dynamic typing.
There are interfaces to many system calls and libraries, as well as to various windowing systems. …“
In particular, what sets Python apart from other languages is its fantastic open-source ecosystem for scientific computing and machine learning with libraries like NumPy, SciPy, scikit-learn and Pytorch.
Official Python documentation is found here <https://www.python.org/doc/>_
Python forum is found here <https://python-forum.io/>_
A nice introduction to packages can be found here: https://aaltoscicomp.github.io/python-for-scicomp/dependencies/
The youtube video Thinking about Concurrency is a good introduction to writing concurrent programs in Python and the book High Performance Python is a good resource for ways of speeding up Python code.
And, if you feel a little unfamiliar to the LINUX world, have a look at the Introduction to UPPMAX course material here: https://www.uppmax.uu.se/support/courses-and-workshops/introductory-course-winter-2022/
The two HPC centers UPPMAX and HPC2N
Warning
At both HPC2N UPPMAX we call the applications available via the module system modules.
To distinguish these modules from the python modules that work as libraries we refer to the later ones as packages.
Material for improving your programming skills
First level
The Carpentries teaches basic lab skills for research computing.
General introduction to Python by UPPMAX at https://www.uppmax.uu.se/support/courses-and-workshops/introductory-course-summer-2023/
Second level
CodeRefinery develops and maintains training material on software best practices for researchers that already write code. Their material addresses all academic disciplines and tries to be as programming language-independent as possible.
Aalto Scientific Computing
Third level
ENCCS (EuroCC National Competence Centre Sweden) is a national centre that supports industry, public administration and academia accessing and using European supercomputers. They give higher-level training of programming and specific software.
The youtube video Thinking about Concurrency is a good introduction to writing concurrent programs in Python
The book High Performance Python is a good resource for ways of speeding up Python code.
Other NAISS centres
Objectives
We will:
teach you how to navigate the module system at HPC2N and UPPMAX
show you how to find out which versions of Python and packages are installed
look at the package handler pip (and Conda for UPPMAX)
explain how to create and use virtual environments
show you how to run batch jobs
show some examples with parallel computing and using GPUs
guide you in how to start Python tools for Machine Learning