Exercise: Python

Exercise: Python#

Timing

75 min

Goals

  • Get to know the geoconda Python environment on Puhti

  • Try out different ways of parallelizing Python code

  • Understand when to go for internal vs external parallelization

Prerequisites

  • Access to the Puhti web interface

  • Some experience with Python and GIS Python tools

Python exercise materials in Geocomputing Github

Check out at least the sections about serial jobs and parallelizing within Python.

Additionally, you can check out some of the other Python examples in CSC geocomputing repository.

Key points

  • GNU parallel for embarassingly parallel tasks, without changing the Python code

  • dask.delayed or multiprocessing can be used to parallelize a for-loop