mandelbrot_set

Module: run.scripts.mandelbrot_set

Example module that can be used with the generic operation.

This module shows how the mandelbrot set can be computed in a distributed fashion. For this, it is required that two module-level functions are defined: “process” and “consolidate”. The actual subpart of the computation is performed by the function “process” (which is called once for each process) and the function “consolidate” is called once at the end of an operation and is responsible for merging the results of the sub-computations into the the overall result.

Author:Jan Hendrik Metzen
Created:2012/11/30

Function Summary

process(process_id, result_directory, ...) Perform computation for specific configuration and store results.
consolidate(result_directory, config_template) Consolidates results of single processes.

Functions

process()

pySPACE.run.scripts.mandelbrot_set.process(process_id, result_directory, config, parameter_setting)[source]

Perform computation for specific configuration and store results.

This function is called once per process for the specific configuration.

Parameters
process_id:

Globally unique id of this process. Might be used e.g. for creating a file into which the results of this function are stored.

(obligatory)

result_directory:
 

Directory into which the results of the computation of this function are stored.

(obligatory)

config:

Configuration parameters. All parameters which parametrize the actual computation MUST go into this dictionary.

(obligatory)

parameter_setting:
 

Dictionary containing the mapping from parameter name (must be contained in configuration_template string) to parameter value. The specific parameter values define this particular computation.

(obligatory)

consolidate()

pySPACE.run.scripts.mandelbrot_set.consolidate(result_directory, config_template)[source]

Consolidates results of single processes.

This function is called once per operation.

Parameters
result_directory:
 

Directory into which the results of the computation of this function are stored.

(obligatory)

config_template:
 

Configuration parameters template which might include placeholders instead of real parameters.

(obligatory)