Artigo Acesso aberto

Simplifying the parallelization of scientific codes by a function-centric approach in Python

2010; IOP Publishing; Volume: 3; Issue: 1 Linguagem: Inglês

10.1088/1749-4699/3/1/015003

ISSN

1749-4699

Autores

Jon Kristian Nilsen, Xing Cai, Bjørn Høyland, Hans Petter Langtangen,

Tópico(s)

Algorithms and Data Compression

Resumo

The purpose of this paper is to show how existing scientific software can be parallelized using a separate thin layer of Python code where all parallelization-specific tasks are implemented. We provide specific examples of such a Python code layer, which can act as templates for parallelizing a wide set of serial scientific codes. The use of Python for parallelization is motivated by the fact that the language is well suited for reusing existing serial codes programmed in other languages. The extreme flexibility of Python with regard to handling functions makes it very easy to wrap up decomposed computational tasks of a serial scientific application as Python functions. Many parallelization-specific components can be implemented as generic Python functions, which may take as input those wrapped functions that perform concrete computational tasks. The overall programming effort needed by this parallelization approach is limited, and the resulting parallel Python scripts have a compact and clean structure. The usefulness of the parallelization approach is exemplified by three different classes of application in natural and social sciences.

Referência(s)