OGGM is designed to use the available resources as well as possible. For single nodes machines but with more than one processor (frequent case for personal computers) OGGM ships with a multiprocessing approach which is fairly simple to use. For cluster environments, use MPI.
Most OGGM computations are embarrassingly parallel: they are standalone operations to be realized on one single glacier entity and therefore independent from each other (they are called entity tasks, as opposed to the non-parallelizable global tasks).
When given a list of Glacier working directories on which to apply a given task,
workflow.execute_entity_task() will distribute the operations on
the available processors using Python’s multiprocessing module.
You can control this behavior with the
parameter and the number of processors with
The default in OGGM is:
In : from oggm import cfg In : cfg.initialize() In : cfg.PARAMS['use_multiprocessing'] # whether to use multiprocessing Out: True In : cfg.PARAMS['mp_processes'] # number of processors to use