# examples

Here you will find example notebooks and scripts for working with IPython Parallel.

## Tutorials

- Cluster API
  - Cluster as a context manager
  - Launcher classes
  - Connecting to existing clusters
- Parallel Magics
  - The magics
    - `%px`
    - %%px cell magic
      - Targets
      - Blocking (or not)
    - Configuring defaults with `%pxconfig`
      - Remote parallel magics
    - Output
  - Magics for multiple views
  - Parallel Exceptions
  - Engines as Kernels
  - Legacy magics: `%autopx`
  - Linting and formatting notebooks with IPython Parallel magics
- Using widgets in IPython Parallel
- IPython’s Data Publication API
  - Setup
  - Simple publication
  - Simulation loop
- Visualizing an AsyncResult in progress
- Broadcast View
- Tuning broadcast views
  - Coalescing replies
- More efficient broadcast of arrays with memmap
- More efficient data movement with MPI

## Examples

- Interactive monitoring of a parallel MPI simulation from a notebook
  - MPI simulation example
  - IPython tools to interactively monitor and plot the MPI results
  - Making a simulation object that can be monitored interactively
- Interactive visualization of MPI simulaitons
  - Load IPython support for working with MPI tasks
  - MPI simulation example
  - IPython tools to interactively monitor and plot the MPI results
  - Interactive monitoring in the client of the published data
- Load balanced map and parallel function decorator
- Simple usage of a set of MPI engines
- Parallel Monto-Carlo options pricing
  - Problem setup
  - Monte-Carlo option pricing function
  - Parallel computation across strike prices and volatilities
  - Process and visualize results
- Eigenvalue distribution of Gaussian orthogonal random matrices
  - Wigner’s nearest neighbor eigenvalue distribution
  - Serial calculation of nearest neighbor eigenvalue distribution
  - Parallel calculation of nearest neighbor eigenvalue distribution

## Integrating IPython Parallel with other tools

There are lots of cool tools for working with asynchronous and parallel execution. IPython Parallel aims to be fairly compatible with these, both by implementing explicit support via methods such as `Client.become_dask`, and by using standards such as the `concurrent.futures.Future` API.

- Futures in IPython Parallel
  - Executors
  - Comparing Executors
- Using IPython Parallel as a joblib backend
- Working with IPython and dask.distributed
  - Debugging distributed with IPython
- Using dill to pickle anything
  - Using dill in IPython Parallel

## Non-notebook examples

This directory also contains some examples that are scripts instead of notebooks.

./
iopubwatcher.py
task_profiler.py
task_mod.py
fetchparse.py
phistogram.py
dependencies.py
dagdeps.py
nwmerge.py
customresults.py
throughput.py
itermapresult.py
./daVinci Word Count/
pwordfreq.py
wordfreq.py
./interengine/
bintree_script.py
interengine.py
communicator.py
bintree.py
./pi/
pidigits.py
parallelpi.py
./rmt/
rmtkernel.py
./wave2D/
wavesolver.py
parallelwave-mpi.py
communicator.py
parallelwave.py
RectPartitioner.py