{ "cells": [ { "cell_type": "markdown", "metadata": { "tags": [] }, "source": [ "# examples\n", "\n", "Here you will find example notebooks and scripts for working with IPython Parallel." ] }, { "cell_type": "markdown", "metadata": { "tags": [] }, "source": [ "## Tutorials" ] }, { "cell_type": "markdown", "metadata": { "tags": [ "nbsphinx-toctree" ] }, "source": [ "* [Creating Clusters from Python](Cluster%20API.ipynb)\n", "* [Data Publication API](Data%20Publication%20API.ipynb)\n", "* [Parallel Magics](Parallel%20Magics.ipynb)\n", "* [Visualizing AsyncResults](visualizing-tasks.ipynb)\n", "* [Interactive widgets in IPython Parallel](progress.ipynb)\n", "* [Broadcast View](broadcast/Broadcast%20view.ipynb)\n", "* [Broadcasting arrays with memmap](broadcast/memmap%20Broadcast.ipynb)\n", "* [Broadcasting arrays with MPI](broadcast/MPI%20Broadcast.ipynb)\n" ] }, { "cell_type": "markdown", "metadata": { "tags": [] }, "source": [ "## Examples" ] }, { "cell_type": "markdown", "metadata": { "tags": [ "nbsphinx-toctree" ] }, "source": [ "[Monitoring an MPI Simulation - 1](Monitoring%20an%20MPI%20Simulation%20-%201.ipynb)\n", "\n", "[Monitoring an MPI Simulation - 2](Monitoring%20an%20MPI%20Simulation%20-%202.ipynb)\n", "\n", "[Parallel decorator and map](Parallel%20Decorator%20and%20map.ipynb)\n", "\n", "[Using MPI with IPython Parallel](Using%20MPI%20with%20IPython%20Parallel.ipynb)\n", "\n", "[Monte Carlo Options](Monte%20Carlo%20Options.ipynb)\n", "\n", "[Random Matrices](rmt/rmt.ipynb)" ] }, { "cell_type": "markdown", "metadata": { "tags": [] }, "source": [ "## Integrating IPython Parallel with other tools\n", "\n", "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." ] }, { "cell_type": "markdown", "metadata": { "tags": [ "nbsphinx-toctree" ] }, "source": [ "* [Using Futures with IPython Parallel](Futures.ipynb)\n", "* [IPython Parallel as a joblib backend](joblib.ipynb)\n", "* [Working with IPython and dask.distributed](dask.ipynb)\n", "* [Using dill to serialize anything](Using%20Dill.ipynb)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Non-notebook examples" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "This directory also contains some examples that are scripts instead of notebooks." ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "tags": [] }, "outputs": [ { "data": { "text/html": [ "./
\n", "  dagdeps.py
\n", "  customresults.py
\n", "  throughput.py
\n", "  itermapresult.py
\n", "  task_profiler.py
\n", "  fetchparse.py
\n", "  iopubwatcher.py
\n", "  nwmerge.py
\n", "  phistogram.py
\n", "  dependencies.py
" ], "text/plain": [ "./\n", " dagdeps.py\n", " customresults.py\n", " throughput.py\n", " itermapresult.py\n", " task_profiler.py\n", " fetchparse.py\n", " iopubwatcher.py\n", " nwmerge.py\n", " phistogram.py\n", " dependencies.py" ] }, "execution_count": 2, "metadata": {}, "output_type": "execute_result" } ], "source": [ "import glob\n", "import os\n", "\n", "from IPython.display import FileLink, FileLinks, display\n", "\n", "FileLinks(\".\", included_suffixes=[\".py\"], recursive=False)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "More substantial examples can be found in subdirectories:" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "data": { "text/html": [ "wave2D/
\n", "  wavesolver.py
\n", "  RectPartitioner.py
\n", "  parallelwave-mpi.py
\n", "  communicator.py
\n", "  parallelwave.py
" ], "text/plain": [ "wave2D/\n", " wavesolver.py\n", " RectPartitioner.py\n", " parallelwave-mpi.py\n", " communicator.py\n", " parallelwave.py" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "pi/
\n", "  pidigits.py
\n", "  parallelpi.py
" ], "text/plain": [ "pi/\n", " pidigits.py\n", " parallelpi.py" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "daVinci Word Count/
\n", "  wordfreq.py
\n", "  pwordfreq.py
" ], "text/plain": [ "daVinci Word Count/\n", " wordfreq.py\n", " pwordfreq.py" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "interengine/
\n", "  bintree_script.py
\n", "  bintree.py
\n", "  communicator.py
\n", "  interengine.py
" ], "text/plain": [ "interengine/\n", " bintree_script.py\n", " bintree.py\n", " communicator.py\n", " interengine.py" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "broadcast/
\n", "  test.py
" ], "text/plain": [ "broadcast/\n", " test.py" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "rmt/
\n", "  rmtkernel.py
\n", "  rmt.ipynb
" ], "text/plain": [ "rmt/\n", " rmtkernel.py\n", " rmt.ipynb" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "for path in os.listdir(\".\"):\n", " if os.path.isdir(path) and not path.startswith(\".\"):\n", " display(FileLinks(path, included_suffixes=['.py', '.ipynb']))" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.9.6" }, "nbsphinx": { "execute": "always" }, "widgets": { "application/vnd.jupyter.widget-state+json": { "state": {}, "version_major": 2, "version_minor": 0 } } }, "nbformat": 4, "nbformat_minor": 4 }