Exercise: Python

Exercise: Python#

Timing

75 min

Goals

  • Get to know the python-geo Python environment on Roihu

  • Try out different ways of parallelizing Python code

  • Understand when to go for internal vs external parallelization

Prerequisites

  • Access to the Roihu 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

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

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