Show More
@@ -1,430 +1,412 b'' | |||||
1 | { |
|
1 | { | |
2 | "metadata": { |
|
2 | "metadata": { | |
3 | "name": "InteractiveMPI-publish-data" |
|
3 | "name": "" | |
4 | }, |
|
4 | }, | |
5 | "nbformat": 3, |
|
5 | "nbformat": 3, | |
6 | "nbformat_minor": 0, |
|
6 | "nbformat_minor": 0, | |
7 | "worksheets": [ |
|
7 | "worksheets": [ | |
8 | { |
|
8 | { | |
9 | "cells": [ |
|
9 | "cells": [ | |
10 | { |
|
10 | { | |
11 | "cell_type": "heading", |
|
11 | "cell_type": "heading", | |
12 | "level": 1, |
|
12 | "level": 1, | |
13 | "metadata": {}, |
|
13 | "metadata": {}, | |
14 | "source": [ |
|
14 | "source": [ | |
15 | "Interactive visualization of MPI simulaitons" |
|
15 | "Interactive visualization of MPI simulaitons" | |
16 | ] |
|
16 | ] | |
17 | }, |
|
17 | }, | |
18 | { |
|
18 | { | |
19 | "cell_type": "markdown", |
|
19 | "cell_type": "markdown", | |
20 | "metadata": {}, |
|
20 | "metadata": {}, | |
21 | "source": [ |
|
21 | "source": [ | |
22 | "In this example, which builds on our previous one of interactive MPI monitoring, we now demonstrate how to use the IPython data publication APIs." |
|
22 | "In this example, which builds on our previous one of interactive MPI monitoring, we now demonstrate how to use the IPython data publication APIs." | |
23 | ] |
|
23 | ] | |
24 | }, |
|
24 | }, | |
25 | { |
|
25 | { | |
26 | "cell_type": "heading", |
|
26 | "cell_type": "heading", | |
27 | "level": 2, |
|
27 | "level": 2, | |
28 | "metadata": {}, |
|
28 | "metadata": {}, | |
29 | "source": [ |
|
29 | "source": [ | |
30 | "Load IPython support for working with MPI tasks" |
|
30 | "Load IPython support for working with MPI tasks" | |
31 | ] |
|
31 | ] | |
32 | }, |
|
32 | }, | |
33 | { |
|
33 | { | |
34 | "cell_type": "markdown", |
|
34 | "cell_type": "markdown", | |
35 | "metadata": {}, |
|
35 | "metadata": {}, | |
36 | "source": [ |
|
36 | "source": [ | |
37 | "If you have not done so yet, use [the cluster tab in the Dashboard](/#tab2) to start your `mpi` cluster, it should be OK to leave the number of engines field empty (IPython will auto-detect the number of cores on your machine), unless you want to limit the run to use less cores than available in total. Once your MPI cluster is running, you can proceed with the rest of the code.\n", |
|
37 | "If you have not done so yet, use [the cluster tab in the Dashboard](/#tab2) to start your `mpi` cluster, it should be OK to leave the number of engines field empty (IPython will auto-detect the number of cores on your machine), unless you want to limit the run to use less cores than available in total. Once your MPI cluster is running, you can proceed with the rest of the code.\n", | |
38 | "\n", |
|
38 | "\n", | |
39 | "We begin by creating a cluster client that gives us a local handle on the engines running in the (possibly remote) MPI cluster. From the client we make a `view` object, which we set to use blocking mode by default as it is more convenient for interactive control. Since the real computation will be done over MPI without IPython intervention, setting the default behavior to be blocking will have no significant performance impact.\n", |
|
39 | "We begin by creating a cluster client that gives us a local handle on the engines running in the (possibly remote) MPI cluster. From the client we make a `view` object, which we set to use blocking mode by default as it is more convenient for interactive control. Since the real computation will be done over MPI without IPython intervention, setting the default behavior to be blocking will have no significant performance impact.\n", | |
40 | "\n", |
|
40 | "\n", | |
41 | "**Note:** if on first try the following cell gives you an error message, wait a few seconds and run it again. It's possible that the system is simply initializing all your MPI engines, which may take a bit of time to be completely ready if you hadn't used any MPI libraries recently and the disk cache is cold." |
|
41 | "**Note:** if on first try the following cell gives you an error message, wait a few seconds and run it again. It's possible that the system is simply initializing all your MPI engines, which may take a bit of time to be completely ready if you hadn't used any MPI libraries recently and the disk cache is cold." | |
42 | ] |
|
42 | ] | |
43 | }, |
|
43 | }, | |
44 | { |
|
44 | { | |
45 | "cell_type": "code", |
|
45 | "cell_type": "code", | |
46 | "collapsed": false, |
|
46 | "collapsed": false, | |
47 | "input": [ |
|
47 | "input": [ | |
48 | "from IPython.parallel import Client, error\n", |
|
48 | "from IPython.parallel import Client, error\n", | |
49 | "cluster = Client(profile=\"mpi\")\n", |
|
49 | "cluster = Client(profile=\"mpi\")\n", | |
50 | "view = cluster[:]\n", |
|
50 | "view = cluster[:]\n", | |
51 | "view.block = True" |
|
51 | "view.block = True" | |
52 | ], |
|
52 | ], | |
53 | "language": "python", |
|
53 | "language": "python", | |
54 | "metadata": {}, |
|
54 | "metadata": {}, | |
55 | "outputs": [], |
|
55 | "outputs": [], | |
56 | "prompt_number": 1 |
|
56 | "prompt_number": 1 | |
57 | }, |
|
57 | }, | |
58 | { |
|
58 | { | |
59 | "cell_type": "markdown", |
|
59 | "cell_type": "markdown", | |
60 | "metadata": {}, |
|
60 | "metadata": {}, | |
61 | "source": [ |
|
61 | "source": [ | |
62 | "Let's also load the plotting and numerical libraries so we have them ready for visualization later on." |
|
62 | "Let's also load the plotting and numerical libraries so we have them ready for visualization later on." | |
63 | ] |
|
63 | ] | |
64 | }, |
|
64 | }, | |
65 | { |
|
65 | { | |
66 | "cell_type": "code", |
|
66 | "cell_type": "code", | |
67 | "collapsed": false, |
|
67 | "collapsed": false, | |
68 | "input": [ |
|
68 | "input": [ | |
69 |
"% |
|
69 | "%matplotlib inline\n", | |
|
70 | "import numpy as np\n", | |||
|
71 | "import matplotlib.pyplot as plt" | |||
70 | ], |
|
72 | ], | |
71 | "language": "python", |
|
73 | "language": "python", | |
72 | "metadata": {}, |
|
74 | "metadata": {}, | |
73 | "outputs": [ |
|
75 | "outputs": [], | |
74 | { |
|
|||
75 | "output_type": "stream", |
|
|||
76 | "stream": "stdout", |
|
|||
77 | "text": [ |
|
|||
78 | "\n", |
|
|||
79 | "Welcome to pylab, a matplotlib-based Python environment [backend: module://IPython.kernel.zmq.pylab.backend_inline].\n", |
|
|||
80 | "For more information, type 'help(pylab)'.\n" |
|
|||
81 | ] |
|
|||
82 | } |
|
|||
83 | ], |
|
|||
84 | "prompt_number": 2 |
|
76 | "prompt_number": 2 | |
85 | }, |
|
77 | }, | |
86 | { |
|
78 | { | |
87 | "cell_type": "markdown", |
|
79 | "cell_type": "markdown", | |
88 | "metadata": {}, |
|
80 | "metadata": {}, | |
89 | "source": [ |
|
81 | "source": [ | |
90 | "Now, we load the MPI libraries into the engine namespaces, and do a simple printing of their MPI rank information to verify that all nodes are operational and they match our cluster's real capacity. \n", |
|
82 | "Now, we load the MPI libraries into the engine namespaces, and do a simple printing of their MPI rank information to verify that all nodes are operational and they match our cluster's real capacity. \n", | |
91 | "\n", |
|
83 | "\n", | |
92 | "Here, we are making use of IPython's special `%%px` cell magic, which marks the entire cell for parallel execution. This means that the code below will not run in this notebook's kernel, but instead will be sent to *all* engines for execution there. In this way, IPython makes it very natural to control your entire cluster from within the notebook environment:" |
|
84 | "Here, we are making use of IPython's special `%%px` cell magic, which marks the entire cell for parallel execution. This means that the code below will not run in this notebook's kernel, but instead will be sent to *all* engines for execution there. In this way, IPython makes it very natural to control your entire cluster from within the notebook environment:" | |
93 | ] |
|
85 | ] | |
94 | }, |
|
86 | }, | |
95 | { |
|
87 | { | |
96 | "cell_type": "code", |
|
88 | "cell_type": "code", | |
97 | "collapsed": false, |
|
89 | "collapsed": false, | |
98 | "input": [ |
|
90 | "input": [ | |
99 | "%%px\n", |
|
91 | "%%px\n", | |
100 | "# MPI initialization, library imports and sanity checks on all engines\n", |
|
92 | "# MPI initialization, library imports and sanity checks on all engines\n", | |
101 | "from mpi4py import MPI\n", |
|
93 | "from mpi4py import MPI\n", | |
102 | "# Load data publication API so engines can send data to notebook client\n", |
|
94 | "# Load data publication API so engines can send data to notebook client\n", | |
103 | "from IPython.kernel.zmq.datapub import publish_data\n", |
|
95 | "from IPython.kernel.zmq.datapub import publish_data\n", | |
104 | "import numpy as np\n", |
|
96 | "import numpy as np\n", | |
105 | "import time\n", |
|
97 | "import time\n", | |
106 | "\n", |
|
98 | "\n", | |
107 | "mpi = MPI.COMM_WORLD\n", |
|
99 | "mpi = MPI.COMM_WORLD\n", | |
108 | "bcast = mpi.bcast\n", |
|
100 | "bcast = mpi.bcast\n", | |
109 | "barrier = mpi.barrier\n", |
|
101 | "barrier = mpi.barrier\n", | |
110 | "rank = mpi.rank\n", |
|
102 | "rank = mpi.rank\n", | |
111 | "print \"MPI rank: %i/%i\" % (mpi.rank,mpi.size)" |
|
103 | "print \"MPI rank: %i/%i\" % (mpi.rank,mpi.size)" | |
112 | ], |
|
104 | ], | |
113 | "language": "python", |
|
105 | "language": "python", | |
114 | "metadata": {}, |
|
106 | "metadata": {}, | |
115 | "outputs": [ |
|
107 | "outputs": [ | |
116 | { |
|
108 | { | |
117 | "output_type": "stream", |
|
109 | "output_type": "stream", | |
118 | "stream": "stdout", |
|
110 | "stream": "stdout", | |
119 | "text": [ |
|
111 | "text": [ | |
120 | "[stdout:0] MPI rank: 2/4\n", |
|
112 | "[stdout:0] MPI rank: 2/4\n", | |
121 |
"[stdout:1] MPI rank: |
|
113 | "[stdout:1] MPI rank: 0/4\n", | |
122 |
"[stdout:2] MPI rank: |
|
114 | "[stdout:2] MPI rank: 3/4\n", | |
123 |
"[stdout:3] MPI rank: |
|
115 | "[stdout:3] MPI rank: 1/4\n" | |
124 | ] |
|
116 | ] | |
125 | } |
|
117 | } | |
126 | ], |
|
118 | ], | |
127 | "prompt_number": 3 |
|
119 | "prompt_number": 3 | |
128 | }, |
|
120 | }, | |
129 | { |
|
121 | { | |
130 | "cell_type": "markdown", |
|
122 | "cell_type": "markdown", | |
131 | "metadata": {}, |
|
123 | "metadata": {}, | |
132 | "source": [ |
|
124 | "source": [ | |
133 | "We write a utility that reorders a list according to the mpi ranks of the engines, since all gather operations will return data in engine id order, not in MPI rank order. We'll need this later on when we want to reassemble in IPython data structures coming from all the engines: IPython will collect the data ordered by engine ID, but our code creates data structures based on MPI rank, so we need to map from one indexing scheme to the other. This simple function does the job:" |
|
125 | "We write a utility that reorders a list according to the mpi ranks of the engines, since all gather operations will return data in engine id order, not in MPI rank order. We'll need this later on when we want to reassemble in IPython data structures coming from all the engines: IPython will collect the data ordered by engine ID, but our code creates data structures based on MPI rank, so we need to map from one indexing scheme to the other. This simple function does the job:" | |
134 | ] |
|
126 | ] | |
135 | }, |
|
127 | }, | |
136 | { |
|
128 | { | |
137 | "cell_type": "code", |
|
129 | "cell_type": "code", | |
138 | "collapsed": false, |
|
130 | "collapsed": false, | |
139 | "input": [ |
|
131 | "input": [ | |
140 | "ranks = view['rank']\n", |
|
132 | "ranks = view['rank']\n", | |
141 | "engine_mpi = np.argsort(ranks)\n", |
|
133 | "engine_mpi = np.argsort(ranks)\n", | |
142 | "\n", |
|
134 | "\n", | |
143 | "def mpi_order(seq):\n", |
|
135 | "def mpi_order(seq):\n", | |
144 | " \"\"\"Return elements of a sequence ordered by MPI rank.\n", |
|
136 | " \"\"\"Return elements of a sequence ordered by MPI rank.\n", | |
145 | "\n", |
|
137 | "\n", | |
146 | " The input sequence is assumed to be ordered by engine ID.\"\"\"\n", |
|
138 | " The input sequence is assumed to be ordered by engine ID.\"\"\"\n", | |
147 | " return [seq[x] for x in engine_mpi]" |
|
139 | " return [seq[x] for x in engine_mpi]" | |
148 | ], |
|
140 | ], | |
149 | "language": "python", |
|
141 | "language": "python", | |
150 | "metadata": {}, |
|
142 | "metadata": {}, | |
151 | "outputs": [], |
|
143 | "outputs": [], | |
152 | "prompt_number": 4 |
|
144 | "prompt_number": 4 | |
153 | }, |
|
145 | }, | |
154 | { |
|
146 | { | |
155 | "cell_type": "heading", |
|
147 | "cell_type": "heading", | |
156 | "level": 2, |
|
148 | "level": 2, | |
157 | "metadata": {}, |
|
149 | "metadata": {}, | |
158 | "source": [ |
|
150 | "source": [ | |
159 | "MPI simulation example" |
|
151 | "MPI simulation example" | |
160 | ] |
|
152 | ] | |
161 | }, |
|
153 | }, | |
162 | { |
|
154 | { | |
163 | "cell_type": "markdown", |
|
155 | "cell_type": "markdown", | |
164 | "metadata": {}, |
|
156 | "metadata": {}, | |
165 | "source": [ |
|
157 | "source": [ | |
166 | "This is our 'simulation', a toy example that computes $\\sin(f(x^2+y^2))$ for a slowly increasing frequency $f$ over a gradually refined mesh. In a real-world example, there typically is a 'simulate' method that, afer setting up initial parameters, runs the entire computation. But having this simple example will be sufficient to see something that changes visually as the computation evolves and that is quick enough for us to test.\n", |
|
158 | "This is our 'simulation', a toy example that computes $\\sin(f(x^2+y^2))$ for a slowly increasing frequency $f$ over a gradually refined mesh. In a real-world example, there typically is a 'simulate' method that, afer setting up initial parameters, runs the entire computation. But having this simple example will be sufficient to see something that changes visually as the computation evolves and that is quick enough for us to test.\n", | |
167 | "\n", |
|
159 | "\n", | |
168 | "And while simple, this example has a realistic decomposition of the spatial domain in one array per MPI node that requires care in reordering the data for visualization, as would be needed in a real-world application (unless your code accumulates data in the rank 0 node that you can grab directly)." |
|
160 | "And while simple, this example has a realistic decomposition of the spatial domain in one array per MPI node that requires care in reordering the data for visualization, as would be needed in a real-world application (unless your code accumulates data in the rank 0 node that you can grab directly)." | |
169 | ] |
|
161 | ] | |
170 | }, |
|
162 | }, | |
171 | { |
|
163 | { | |
172 | "cell_type": "code", |
|
164 | "cell_type": "code", | |
173 | "collapsed": false, |
|
165 | "collapsed": false, | |
174 | "input": [ |
|
166 | "input": [ | |
175 | "%%px\n", |
|
167 | "%%px\n", | |
176 | "\n", |
|
168 | "\n", | |
177 | "# Global flag in the namespace\n", |
|
169 | "# Global flag in the namespace\n", | |
178 | "stop = False\n", |
|
170 | "stop = False\n", | |
179 | "\n", |
|
171 | "\n", | |
180 | "def simulation(nsteps=100, delay=0.1):\n", |
|
172 | "def simulation(nsteps=100, delay=0.1):\n", | |
181 | " \"\"\"Toy simulation code, computes sin(f*(x**2+y**2)) for a slowly increasing f\n", |
|
173 | " \"\"\"Toy simulation code, computes sin(f*(x**2+y**2)) for a slowly increasing f\n", | |
182 | " over an increasingly fine mesh.\n", |
|
174 | " over an increasingly fine mesh.\n", | |
183 | "\n", |
|
175 | "\n", | |
184 | " The purpose of this code is simply to illustrate the basic features of a typical\n", |
|
176 | " The purpose of this code is simply to illustrate the basic features of a typical\n", | |
185 | " MPI code: spatial domain decomposition, a solution which is evolving in some \n", |
|
177 | " MPI code: spatial domain decomposition, a solution which is evolving in some \n", | |
186 | " sense, and local per-node computation. In this case the nodes only communicate when \n", |
|
178 | " sense, and local per-node computation. In this case the nodes only communicate when \n", | |
187 | " gathering results for publication.\"\"\"\n", |
|
179 | " gathering results for publication.\"\"\"\n", | |
188 | " # Problem geometry\n", |
|
180 | " # Problem geometry\n", | |
189 | " xmin, xmax = 0, np.pi\n", |
|
181 | " xmin, xmax = 0, np.pi\n", | |
190 | " ymin, ymax = 0, 2*np.pi\n", |
|
182 | " ymin, ymax = 0, 2*np.pi\n", | |
191 | " dy = (ymax-ymin)/mpi.size\n", |
|
183 | " dy = (ymax-ymin)/mpi.size\n", | |
192 | "\n", |
|
184 | "\n", | |
193 | " freqs = np.linspace(0.6, 1, nsteps)\n", |
|
185 | " freqs = np.linspace(0.6, 1, nsteps)\n", | |
194 | " for j in range(nsteps):\n", |
|
186 | " for j in range(nsteps):\n", | |
195 | " nx, ny = 2+j/4, 2+j/2/mpi.size\n", |
|
187 | " nx, ny = 2+j/4, 2+j/2/mpi.size\n", | |
196 | " nyt = mpi.size*ny\n", |
|
188 | " nyt = mpi.size*ny\n", | |
197 | " Xax = np.linspace(xmin, xmax, nx)\n", |
|
189 | " Xax = np.linspace(xmin, xmax, nx)\n", | |
198 | " Yax = np.linspace(ymin+rank*dy, ymin+(rank+1)*dy, ny, endpoint=rank==mpi.size)\n", |
|
190 | " Yax = np.linspace(ymin+rank*dy, ymin+(rank+1)*dy, ny, endpoint=rank==mpi.size)\n", | |
199 | " X, Y = np.meshgrid(Xax, Yax)\n", |
|
191 | " X, Y = np.meshgrid(Xax, Yax)\n", | |
200 | " f = freqs[j]\n", |
|
192 | " f = freqs[j]\n", | |
201 | " Z = np.cos(f*(X**2 + Y**2))\n", |
|
193 | " Z = np.cos(f*(X**2 + Y**2))\n", | |
202 | " \n", |
|
194 | " \n", | |
203 | " # We are now going to publish data to the clients. We take advantage of fast\n", |
|
195 | " # We are now going to publish data to the clients. We take advantage of fast\n", | |
204 | " # MPI communications and gather the Z mesh at the rank 0 node in the Zcat variable:\n", |
|
196 | " # MPI communications and gather the Z mesh at the rank 0 node in the Zcat variable:\n", | |
205 | " Zcat = mpi.gather(Z, root=0)\n", |
|
197 | " Zcat = mpi.gather(Z, root=0)\n", | |
206 | " if mpi.rank == 0:\n", |
|
198 | " if mpi.rank == 0:\n", | |
207 | " # Then we use numpy's concatenation to construct a single numpy array with the\n", |
|
199 | " # Then we use numpy's concatenation to construct a single numpy array with the\n", | |
208 | " # full mesh that can be sent to the client for visualization:\n", |
|
200 | " # full mesh that can be sent to the client for visualization:\n", | |
209 | " Zcat = np.concatenate(Zcat)\n", |
|
201 | " Zcat = np.concatenate(Zcat)\n", | |
210 | " # We now can send a dict with the variables we want the client to have access to:\n", |
|
202 | " # We now can send a dict with the variables we want the client to have access to:\n", | |
211 | " publish_data(dict(Z=Zcat, nx=nx, nyt=nyt, j=j, nsteps=nsteps))\n", |
|
203 | " publish_data(dict(Z=Zcat, nx=nx, nyt=nyt, j=j, nsteps=nsteps))\n", | |
212 | " \n", |
|
204 | " \n", | |
213 | " # We add a small delay to simulate that a real-world computation\n", |
|
205 | " # We add a small delay to simulate that a real-world computation\n", | |
214 | " # would take much longer, and we ensure all nodes are synchronized\n", |
|
206 | " # would take much longer, and we ensure all nodes are synchronized\n", | |
215 | " time.sleep(delay)\n", |
|
207 | " time.sleep(delay)\n", | |
216 | " # The stop flag can be set remotely via IPython, allowing the simulation to be\n", |
|
208 | " # The stop flag can be set remotely via IPython, allowing the simulation to be\n", | |
217 | " # cleanly stopped from the outside\n", |
|
209 | " # cleanly stopped from the outside\n", | |
218 | " if stop:\n", |
|
210 | " if stop:\n", | |
219 | " break" |
|
211 | " break" | |
220 | ], |
|
212 | ], | |
221 | "language": "python", |
|
213 | "language": "python", | |
222 | "metadata": {}, |
|
214 | "metadata": {}, | |
223 | "outputs": [], |
|
215 | "outputs": [], | |
224 |
"prompt_number": |
|
216 | "prompt_number": 5 | |
225 | }, |
|
217 | }, | |
226 | { |
|
218 | { | |
227 | "cell_type": "heading", |
|
219 | "cell_type": "heading", | |
228 | "level": 2, |
|
220 | "level": 2, | |
229 | "metadata": {}, |
|
221 | "metadata": {}, | |
230 | "source": [ |
|
222 | "source": [ | |
231 | "IPython tools to interactively monitor and plot the MPI results" |
|
223 | "IPython tools to interactively monitor and plot the MPI results" | |
232 | ] |
|
224 | ] | |
233 | }, |
|
225 | }, | |
234 | { |
|
226 | { | |
235 | "cell_type": "markdown", |
|
227 | "cell_type": "markdown", | |
236 | "metadata": {}, |
|
228 | "metadata": {}, | |
237 | "source": [ |
|
229 | "source": [ | |
238 | "We now define a local (to this notebook) plotting function that fetches data from the engines' global namespace. Once it has retrieved the current state of the relevant variables, it produces and returns a figure:" |
|
230 | "We now define a local (to this notebook) plotting function that fetches data from the engines' global namespace. Once it has retrieved the current state of the relevant variables, it produces and returns a figure:" | |
239 | ] |
|
231 | ] | |
240 | }, |
|
232 | }, | |
241 | { |
|
233 | { | |
242 | "cell_type": "code", |
|
234 | "cell_type": "code", | |
243 | "collapsed": false, |
|
235 | "collapsed": false, | |
244 | "input": [ |
|
236 | "input": [ | |
245 | "from IPython.display import clear_output\n", |
|
237 | "from IPython.display import display, clear_output\n", | |
246 | "\n", |
|
238 | "\n", | |
247 | "def plot_current_results(ar, in_place=True):\n", |
|
239 | "def plot_current_results(ar, in_place=True):\n", | |
248 | " \"\"\"Makes a blocking call to retrieve remote data and displays the solution mesh\n", |
|
240 | " \"\"\"Makes a blocking call to retrieve remote data and displays the solution mesh\n", | |
249 | " as a contour plot.\n", |
|
241 | " as a contour plot.\n", | |
250 | " \n", |
|
242 | " \n", | |
251 | " Parameters\n", |
|
243 | " Parameters\n", | |
252 | " ----------\n", |
|
244 | " ----------\n", | |
253 | " ar : async result object\n", |
|
245 | " ar : async result object\n", | |
254 | "\n", |
|
246 | "\n", | |
255 | " in_place : bool\n", |
|
247 | " in_place : bool\n", | |
256 | " By default it calls clear_output so that new plots replace old ones. Set\n", |
|
248 | " By default it calls clear_output so that new plots replace old ones. Set\n", | |
257 | " to False to allow keeping of all previous outputs.\n", |
|
249 | " to False to allow keeping of all previous outputs.\n", | |
258 | " \"\"\"\n", |
|
250 | " \"\"\"\n", | |
259 | " # Read data from MPI rank 0 engine\n", |
|
251 | " # Read data from MPI rank 0 engine\n", | |
260 | " data = ar.data[engine_mpi[0]]\n", |
|
252 | " data = ar.data[engine_mpi[0]]\n", | |
261 | " \n", |
|
253 | " \n", | |
262 | " try:\n", |
|
254 | " try:\n", | |
263 | " nx, nyt, j, nsteps = [data[k] for k in ['nx', 'nyt', 'j', 'nsteps']]\n", |
|
255 | " nx, nyt, j, nsteps = [data[k] for k in ['nx', 'nyt', 'j', 'nsteps']]\n", | |
264 | " Z = data['Z']\n", |
|
256 | " Z = data['Z']\n", | |
265 | " except KeyError:\n", |
|
257 | " except KeyError:\n", | |
266 | " # This can happen if we read from the engines so quickly that the data \n", |
|
258 | " # This can happen if we read from the engines so quickly that the data \n", | |
267 | " # hasn't arrived yet.\n", |
|
259 | " # hasn't arrived yet.\n", | |
268 | " fig, ax = plt.subplots()\n", |
|
260 | " fig, ax = plt.subplots()\n", | |
269 | " ax.plot([])\n", |
|
261 | " ax.plot([])\n", | |
270 | " ax.set_title(\"No data yet\")\n", |
|
262 | " ax.set_title(\"No data yet\")\n", | |
271 | " display(fig)\n", |
|
263 | " display(fig)\n", | |
272 | " return fig\n", |
|
264 | " return fig\n", | |
273 | " else:\n", |
|
265 | " else:\n", | |
274 | " \n", |
|
266 | " \n", | |
275 | " fig, ax = plt.subplots()\n", |
|
267 | " fig, ax = plt.subplots()\n", | |
276 | " ax.contourf(Z)\n", |
|
268 | " ax.contourf(Z)\n", | |
277 | " ax.set_title('Mesh: %i x %i, step %i/%i' % (nx, nyt, j+1, nsteps))\n", |
|
269 | " ax.set_title('Mesh: %i x %i, step %i/%i' % (nx, nyt, j+1, nsteps))\n", | |
278 | " axis('off')\n", |
|
270 | " plt.axis('off')\n", | |
279 | " # We clear the notebook output before plotting this if in-place \n", |
|
271 | " # We clear the notebook output before plotting this if in-place \n", | |
280 | " # plot updating is requested\n", |
|
272 | " # plot updating is requested\n", | |
281 | " if in_place:\n", |
|
273 | " if in_place:\n", | |
282 | " clear_output()\n", |
|
274 | " clear_output()\n", | |
283 | " display(fig)\n", |
|
275 | " display(fig)\n", | |
284 | " \n", |
|
276 | " \n", | |
285 | " return fig" |
|
277 | " return fig" | |
286 | ], |
|
278 | ], | |
287 | "language": "python", |
|
279 | "language": "python", | |
288 | "metadata": {}, |
|
280 | "metadata": {}, | |
289 | "outputs": [], |
|
281 | "outputs": [], | |
290 |
"prompt_number": |
|
282 | "prompt_number": 6 | |
291 | }, |
|
283 | }, | |
292 | { |
|
284 | { | |
293 | "cell_type": "markdown", |
|
285 | "cell_type": "markdown", | |
294 | "metadata": {}, |
|
286 | "metadata": {}, | |
295 | "source": [ |
|
287 | "source": [ | |
296 | "Finally, this is a convenience wrapper around the plotting code so that we can interrupt monitoring at any point, and that will provide basic timing information:" |
|
288 | "Finally, this is a convenience wrapper around the plotting code so that we can interrupt monitoring at any point, and that will provide basic timing information:" | |
297 | ] |
|
289 | ] | |
298 | }, |
|
290 | }, | |
299 | { |
|
291 | { | |
300 | "cell_type": "code", |
|
292 | "cell_type": "code", | |
301 | "collapsed": false, |
|
293 | "collapsed": false, | |
302 | "input": [ |
|
294 | "input": [ | |
303 | "def monitor_simulation(ar, refresh=5.0, plots_in_place=True):\n", |
|
295 | "def monitor_simulation(ar, refresh=5.0, plots_in_place=True):\n", | |
304 | " \"\"\"Monitor the simulation progress and call plotting routine.\n", |
|
296 | " \"\"\"Monitor the simulation progress and call plotting routine.\n", | |
305 | "\n", |
|
297 | "\n", | |
306 | " Supress KeyboardInterrupt exception if interrupted, ensure that the last \n", |
|
298 | " Supress KeyboardInterrupt exception if interrupted, ensure that the last \n", | |
307 | " figure is always displayed and provide basic timing and simulation status.\n", |
|
299 | " figure is always displayed and provide basic timing and simulation status.\n", | |
308 | "\n", |
|
300 | "\n", | |
309 | " Parameters\n", |
|
301 | " Parameters\n", | |
310 | " ----------\n", |
|
302 | " ----------\n", | |
311 | " ar : async result object\n", |
|
303 | " ar : async result object\n", | |
312 | "\n", |
|
304 | "\n", | |
313 | " refresh : float\n", |
|
305 | " refresh : float\n", | |
314 | " Refresh interval between calls to retrieve and plot data. The default\n", |
|
306 | " Refresh interval between calls to retrieve and plot data. The default\n", | |
315 | " is 5s, adjust depending on the desired refresh rate, but be aware that \n", |
|
307 | " is 5s, adjust depending on the desired refresh rate, but be aware that \n", | |
316 | " very short intervals will start having a significant impact.\n", |
|
308 | " very short intervals will start having a significant impact.\n", | |
317 | "\n", |
|
309 | "\n", | |
318 | " plots_in_place : bool\n", |
|
310 | " plots_in_place : bool\n", | |
319 | " If true, every new figure replaces the last one, producing a (slow)\n", |
|
311 | " If true, every new figure replaces the last one, producing a (slow)\n", | |
320 | " animation effect in the notebook. If false, all frames are plotted\n", |
|
312 | " animation effect in the notebook. If false, all frames are plotted\n", | |
321 | " in sequence and appended in the output area.\n", |
|
313 | " in sequence and appended in the output area.\n", | |
322 | " \"\"\"\n", |
|
314 | " \"\"\"\n", | |
323 | " import datetime as dt, time\n", |
|
315 | " import datetime as dt, time\n", | |
324 | " \n", |
|
316 | " \n", | |
325 | " if ar.ready():\n", |
|
317 | " if ar.ready():\n", | |
326 | " plot_current_results(ar, in_place=plots_in_place)\n", |
|
318 | " plot_current_results(ar, in_place=plots_in_place)\n", | |
327 | " plt.close('all')\n", |
|
319 | " plt.close('all')\n", | |
328 | " print 'Simulation has already finished, no monitoring to do.'\n", |
|
320 | " print 'Simulation has already finished, no monitoring to do.'\n", | |
329 | " return\n", |
|
321 | " return\n", | |
330 | " \n", |
|
322 | " \n", | |
331 | " t0 = dt.datetime.now()\n", |
|
323 | " t0 = dt.datetime.now()\n", | |
332 | " fig = None\n", |
|
324 | " fig = None\n", | |
333 | " try:\n", |
|
325 | " try:\n", | |
334 | " while not ar.ready():\n", |
|
326 | " while not ar.ready():\n", | |
335 | " fig = plot_current_results(ar, in_place=plots_in_place)\n", |
|
327 | " fig = plot_current_results(ar, in_place=plots_in_place)\n", | |
336 | " plt.close('all') # prevent re-plot of old figures\n", |
|
328 | " plt.close('all') # prevent re-plot of old figures\n", | |
337 | " time.sleep(refresh)\n", |
|
329 | " time.sleep(refresh)\n", | |
338 | " except (KeyboardInterrupt, error.TimeoutError):\n", |
|
330 | " except (KeyboardInterrupt, error.TimeoutError):\n", | |
339 | " msg = 'Monitoring interrupted, simulation is ongoing!'\n", |
|
331 | " msg = 'Monitoring interrupted, simulation is ongoing!'\n", | |
340 | " else:\n", |
|
332 | " else:\n", | |
341 | " msg = 'Simulation completed!'\n", |
|
333 | " msg = 'Simulation completed!'\n", | |
342 | " tmon = dt.datetime.now() - t0\n", |
|
334 | " tmon = dt.datetime.now() - t0\n", | |
343 | " if plots_in_place and fig is not None:\n", |
|
335 | " if plots_in_place and fig is not None:\n", | |
344 | " clear_output()\n", |
|
336 | " clear_output()\n", | |
345 | " plt.close('all')\n", |
|
337 | " plt.close('all')\n", | |
346 | " display(fig)\n", |
|
338 | " display(fig)\n", | |
347 | " print msg\n", |
|
339 | " print msg\n", | |
348 | " print 'Monitored for: %s.' % tmon" |
|
340 | " print 'Monitored for: %s.' % tmon" | |
349 | ], |
|
341 | ], | |
350 | "language": "python", |
|
342 | "language": "python", | |
351 | "metadata": {}, |
|
343 | "metadata": {}, | |
352 | "outputs": [], |
|
344 | "outputs": [], | |
353 |
"prompt_number": |
|
345 | "prompt_number": 7 | |
354 | }, |
|
346 | }, | |
355 | { |
|
347 | { | |
356 | "cell_type": "heading", |
|
348 | "cell_type": "heading", | |
357 | "level": 2, |
|
349 | "level": 2, | |
358 | "metadata": {}, |
|
350 | "metadata": {}, | |
359 | "source": [ |
|
351 | "source": [ | |
360 | "Interactive monitoring in the client of the published data" |
|
352 | "Interactive monitoring in the client of the published data" | |
361 | ] |
|
353 | ] | |
362 | }, |
|
354 | }, | |
363 | { |
|
355 | { | |
364 | "cell_type": "markdown", |
|
356 | "cell_type": "markdown", | |
365 | "metadata": {}, |
|
357 | "metadata": {}, | |
366 | "source": [ |
|
358 | "source": [ | |
367 | "Now, we can monitor the published data. We submit the simulation for execution as an asynchronous task, and then monitor this task at any frequency we desire." |
|
359 | "Now, we can monitor the published data. We submit the simulation for execution as an asynchronous task, and then monitor this task at any frequency we desire." | |
368 | ] |
|
360 | ] | |
369 | }, |
|
361 | }, | |
370 | { |
|
362 | { | |
371 | "cell_type": "code", |
|
363 | "cell_type": "code", | |
372 | "collapsed": false, |
|
364 | "collapsed": false, | |
373 | "input": [ |
|
365 | "input": [ | |
374 | "# Create the local client that controls our IPython cluster with MPI support\n", |
|
366 | "# Create the local client that controls our IPython cluster with MPI support\n", | |
375 | "from IPython.parallel import Client\n", |
|
367 | "from IPython.parallel import Client\n", | |
376 | "cluster = Client(profile=\"mpi\")\n", |
|
368 | "cluster = Client(profile=\"mpi\")\n", | |
377 | "# We make a view that encompasses all the engines\n", |
|
369 | "# We make a view that encompasses all the engines\n", | |
378 | "view = cluster[:]\n", |
|
370 | "view = cluster[:]\n", | |
379 | "# And now we call on all available nodes our simulation routine,\n", |
|
371 | "# And now we call on all available nodes our simulation routine,\n", | |
380 | "# as an asynchronous task\n", |
|
372 | "# as an asynchronous task\n", | |
381 | "nsteps = 10\n", |
|
373 | "ar = view.apply_async(lambda : simulation(nsteps=10, delay=0.1))" | |
382 | "delay = 0.1\n", |
|
|||
383 | "ar = view.apply_async(lambda : simulation(nsteps, delay))" |
|
|||
384 | ], |
|
374 | ], | |
385 | "language": "python", |
|
375 | "language": "python", | |
386 | "metadata": {}, |
|
376 | "metadata": {}, | |
387 | "outputs": [], |
|
377 | "outputs": [], | |
388 |
"prompt_number": |
|
378 | "prompt_number": 8 | |
389 | }, |
|
379 | }, | |
390 | { |
|
380 | { | |
391 | "cell_type": "code", |
|
381 | "cell_type": "code", | |
392 | "collapsed": false, |
|
382 | "collapsed": false, | |
393 | "input": [ |
|
383 | "input": [ | |
394 | "monitor_simulation(ar, refresh=1)" |
|
384 | "monitor_simulation(ar, refresh=1)" | |
395 | ], |
|
385 | ], | |
396 | "language": "python", |
|
386 | "language": "python", | |
397 | "metadata": {}, |
|
387 | "metadata": {}, | |
398 | "outputs": [ |
|
388 | "outputs": [ | |
399 | { |
|
389 | { | |
400 | "metadata": {}, |
|
390 | "metadata": {}, | |
401 | "output_type": "display_data", |
|
391 | "output_type": "display_data", | |
402 | "png": "iVBORw0KGgoAAAANSUhEUgAAAXIAAAEICAYAAABCnX+uAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJztnXusVcX1x78HG1C5CNeKcHk/TB+IUDXWRhStTayPFFsb\nH1SgVVOtta/EalVSmbQYtT8fjW1slT7EirQa+UNFCipVq1QaX6CiERBB0MpTuSiCyvz+oOf0Ps45\ne8/Mmpk1e69PYtJ79z6zN3TOZy3Wnj2rorXWEARBEJKlR+wbEARBENwQkQuCICSOiFwQBCFxROSC\nIAiJIyIXBEFIHBG5IAhC4ojIhW6MGDECjz76aOzbEAQhJyLyBBkxYgR69eqFLVu2dPr94Ycfjh49\nemDdunVO41cqFVQqFavPzp8/H8ceeyxaW1vR1taG7373u9ixY0encx555BEcccQRaGlpwdChQ3Hv\nvfc63S8AvPHGG+jRowf69OlT+++aa67pdM5zzz2HiRMnok+fPhg4cCBuueUW5+v26NEDr7/+uvM4\njbjmmmswfPhw9O3bF5MnT0Z7e3vt2IYNG3D66afj05/+NIYOHYrbbrut2+fnzp2Lc889FwBw4YUX\n4nOf+xz22WcfzJ49u9u5N998M9ra2tC3b19ccMEF2L17d+3Y1q1b8Y1vfAMtLS0YMWIE5s6d6+FP\nK9giIk+QSqWCUaNGdfoyvfjii9i5c6e1gKnYvn07rr76arz99tt45ZVXsGHDBlx22WW14ytWrMC5\n556La6+9Ftu3b8fy5ctx5JFHkl6/vb0d7e3tmD59eu33mzdvximnnIKLL74YW7duxerVq3HSSSeR\nXNPXO3WzZ8/GXXfdhSVLluCtt97Czp078cMf/rB2fMqUKRg9ejQ2btyI+fPn46qrrsJjjz3WaYz5\n8+fjtNNOAwB84QtfwK233oojjjii2zxZuHAhrr/+eixevBhr167F66+/jhkzZtSOX3LJJdh3332x\nceNGzJkzBxdffDFWrFjh5c8tWKCF5BgxYoSeOXOmPuqoo2q/u/TSS/U111yjK5WKXrt2rdZa6w8/\n/FBfeumletiwYXrAgAH6e9/7nt65c6fWWutNmzbp0047Tffr108feOCB+rjjjus0/g033KDHjRun\n+/btq88++2z94YcfWt3rvHnz9GGHHVb7efLkyfrqq6/O9dnrrrtOH3300frjjz/WWmt966236kMP\nPVTv2rWr27lr1qzRlUqldm5XrrzySj1t2jSLP4HWK1eu1BMnTtR9+/bVBx10kD7nnHO01lofd9xx\nulKp6N69e+uWlhZ9zz33aK21fuCBB/T48eN1v3799DHHHKOXL19eG2v48OH62muv1WPGjNGtra36\nvPPOa/h3+81vflP/3//9X+3nJUuW6H333Vfv3LlTt7e360qlojdt2lQ7fuGFF+qpU6fWfv7kk0/0\ngAED9JYtWzqNe+yxx+rZs2d3+t3kyZP19OnTaz8vXrxYDxw4UGut9Y4dO3TPnj31ypUra8enTZum\nr7jiinx/gYJ3JCNPlC996UvYvn07Xn31VXzyySf429/+hilTpnQ654orrsCqVauwbNkyrFq1Chs2\nbMAvfvELAMCNN96IoUOHYvPmzdi4cSOuvfba2ue01rj33nuxcOFCrFmzBsuXL8cdd9xRO97a2ool\nS5bkus/HH38cY8eOrf28dOlSaK0xbtw4DBo0CFOnTsW2bdvqfvbyyy9Hr169MHPmTKxcuRLTp0/H\nnDlz0LNnz4bXGz58OIYOHYrzzz+/U+lp6dKlaG1txYQJEzBgwABMmjQJb775Zq4/w89//nOcfPLJ\nePfdd7Fhw4ZaVvzEE08AAJYvX4729naceeaZeP7553HBBRdg1qxZ2Lp1Ky666CJMmjQJH330UW28\nu+++G4sWLcLq1avx2muvYebMmXWvW6lUOmX7e/bswa5du7By5cra77sef+mll2o///vf/8aoUaNw\n4IEHZv4Z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c/+1mWZR/87BoaGrINGzZstszzzz+fdevWLVu1\natV257Vo0aJs4MCBbb73k5/8JJsyZUq76/7vfzsfuvPOO7MRI0a0uXy/fv2yJUuWbHdOQMc44gQl\nMn78+Fi6dGksXbo0Vq9eHQ888ECcc845Wy33/vvvx5/+9KcYPXp01NXVtf7p3r17/Pe//41ly5bF\n/vvvH6NHj44hQ4bEWWedFbfddlts3LixdYy+fftudcpnr732irfeeqvD816/fn18+ctfjr59+8b8\n+fO3u/zgwYPj6quvjnPPPTfOP//8dk/rRUQ899xz8fvf/z7mzZsXDQ0NUV9fH+eff34cffTR8ctf\n/jJ5jlOmTInvfOc7cdRRR8XVV18dK1eu3Obyf/jDH2Lu3LmbfX/r6urilltuiWXLlrUuN2bMmDZP\nizU0NGx16rMjWlpa4uabb45JkyZ1aL3evXvHunXr2hxv3bp1sfvuu3d6TkDbhBOUyG677Rannnpq\nzJw5M+bOnRuf+9znWh9UueVt54VCIf7+979HS0vLZn82bdoUI0eOjEKhEPfff3888MAD0dDQEFde\neWWMGjUqmpubI+KDC9K3tMsuu3T4Qun3338/xo0bFy0tLfHQQw9tFRFtybIs5s+fH/vvv3/cdddd\nmwXdlpYvXx5DhgzZar4HHXRQLF++PHmep59+erz00ktx6qmnxuLFi2P48OFt3sX4obq6upgyZUqb\n398PT3kWCoVtfr925PERjzzySAwaNCiGDh3aofUaGhrixRdf3Op7unz58mhpadnuM6OAjhNO0IW2\n3LlOmjQpbr311pg1a1a7Rxt22WWXOOyww+K2227b7PVNmzbF0qVLW//e3NwcI0aMiGnTpkVTU1Ms\nW7Ys18cEZFkWEydOjNdffz0eeeSR6NWrV9J61157bWzYsCGWLFkSPXr0iO9973vtLrvnnnvGihUr\ntnpm07PPPhsDBw5Mnmtzc3MMGDAgzjnnnLjvvvti/PjxMW/evHaX/8IXvhB33333VgHS1NTU+r+z\nLIsHHngg3n333c2WWb58eaxYsSIOO+yw5Pltqa2LwrfUVpg1NDTE4MGDt3rg5YMPPhijR4/e7l18\nQMcJJ+hCWx6xGDFiRAwYMCBWr14dX/nKV9pd7uc//3lcf/318Ytf/CLWrFkTr7zySpx++ukxZcqU\niIh44oknYtiwYdHU1BTvvvtu3HvvvbFp06btxsb/bmfChAnbfKL51KlTY8mSJbFgwYLo3bt30tf7\n17/+Na6++uqYO3dudOvWLebNmxe33XZb3HvvvW0u//nPfz4OO+ywmDBhQqxcuTLWrl0bN9xwQ9x/\n//1x0UUXtS43ffr0GDZsWJtjNDc3x4EHHhjTp0+PDRs2xAsvvBBPP/107LPPPq3L9O/fP5588slY\ns2ZNrF+/Ps4666zo06dPnHzyyfHCCy/Ev//977jpppti9OjR8fLLL7eu9/7778cJJ5wQzz33XPzn\nP/+Jxx9/PMaOHRuTJ0+OPffcM+l7sqU33ngjFi9eHKeccso2l2vvaNdll10WkydPjqeffjo2bNgQ\nDz74YFx11VXR2NjYqfkA2yacoAsVCoU2jzp9/etfj1122aXd5Q4++OB44okn4u67744999wzRowY\nEXvssUfcddddEfHBEZMzzzwzTjzxxOjdu3dcc801cd9990W/fv1ax2tvPh/6xz/+0XprflsWL14c\nL7/8cgwYMGCra4Hmzp271fLr16+Pr33ta3H55Ze3PpdoyJAhcd1118U555wTr7/+epvbmT9/fgwe\nPDgOP/zwGDx4cNx3333x+OOPR0NDQ+syjz32WLt3n+28885xww03xK233hq77757fPGLX4wxY8bE\n5MmTW5e59NJL4/jjj49Pf/rT8eabb0ZdXV0sWrQoBg0aFCNHjoz+/fvH/Pnz45FHHom999679Xs1\nYcKEGDduXJx22mnRp0+fOO+88+KCCy6Ia6+9tt3v25a2/FnMmTMnxo8fv92jQ239txMRcdppp8UV\nV1zRGn/Tpk2LefPmxaGHHpo8JyBdIevoRQ4AJdTS0hJ9+/aNhQsXxoEHHthl27300kujubk5Lrvs\nslzHXbt2bWzatCn69OmT67hAcexc6gkAdMRf/vKXqK+v79JoKqb6+vpSTwHoAKfqgIpyyCGHbHbd\nEUBXEk4AiXbkkQNAdXCNEwBAotyucXqqg/8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AIBKIZwAABJV/8XhAEDVeeqOHVt/5O2dW084AUCN2dHoqGXCCQASCQ6EEwBFJzioFsIJ\noIwJDigvwgmoSoIDKAbhBGxGcAC0TzhBTgQHQPUTTpQF0QFAJRBOFU5wAEDXqdlwEhwAQEcVsizL\n8hjoqUIhj2EAAIpuZCfzx4f8AgAkEk4AAImEEwBAIuEEAJBIOAEAJBJOAACJhBMAQCLhBACQSDgB\nACQSTgAAiYQTAEAi4QQAkEg4AQAkEk4AAImEEwBAIuEEAJBIOAEAJBJOAACJhBMAQCLhBACQSDgB\nACQSTgAAiYQTAEAi4QQAkEg4AQAkEk4AAImEEwBAIuEEAJBIOAEAJBJOAACJhBMAQCLhBACQSDgB\nACQSTgAAiYQTAEAi4QQAkEg4AQAkEk4AAImEEwBAIuEEAJBIOAEAJBJOAACJhBMAQCLhBACQSDgB\nACQSTgAAiYQTAEAi4QQAkEg4AQAkEk4AAImEEwBAIuEEAJBIOAEAJBJOAACJhBMAQCLhBACQSDgB\nACQSTgAAiYQTAEAi4QQAkKiQZVlW6kkAAFQCR5wAABIJJwCARMIJACCRcAIASCScAAASCScAgETC\nCQAgkXACAEgknAAAEgknAIBEwgkAIJFwAgBIJJwAABIJJwCARMIJACCRcAIASCScAAASCScAgETC\nCQAgkXACAEgknAAAEgknAIBEwgkAINH/Acd8GCUQEYlkAAAAAElFTkSuQmCC\n", | |
403 | "text": [ |
|
393 | "text": [ | |
404 |
"<matplotlib.figure.Figure at 0x5 |
|
394 | "<matplotlib.figure.Figure at 0x10b00b350>" | |
405 | ] |
|
395 | ] | |
406 | }, |
|
396 | }, | |
407 | { |
|
397 | { | |
408 | "output_type": "stream", |
|
398 | "output_type": "stream", | |
409 | "stream": "stdout", |
|
399 | "stream": "stdout", | |
410 | "text": [ |
|
400 | "text": [ | |
411 | "Simulation completed!\n", |
|
401 | "Simulation completed!\n", | |
412 |
"Monitored for: 0:00: |
|
402 | "Monitored for: 0:00:01.229672.\n" | |
413 | ] |
|
403 | ] | |
414 | } |
|
404 | } | |
415 | ], |
|
405 | ], | |
416 |
"prompt_number": |
|
406 | "prompt_number": 9 | |
417 | }, |
|
|||
418 | { |
|
|||
419 | "cell_type": "code", |
|
|||
420 | "collapsed": false, |
|
|||
421 | "input": [], |
|
|||
422 | "language": "python", |
|
|||
423 | "metadata": {}, |
|
|||
424 | "outputs": [] |
|
|||
425 | } |
|
407 | } | |
426 | ], |
|
408 | ], | |
427 | "metadata": {} |
|
409 | "metadata": {} | |
428 | } |
|
410 | } | |
429 | ] |
|
411 | ] | |
430 | } No newline at end of file |
|
412 | } |
@@ -1,555 +1,543 b'' | |||||
1 | { |
|
1 | { | |
2 | "metadata": { |
|
2 | "metadata": { | |
3 |
"name": " |
|
3 | "name": "" | |
4 | }, |
|
4 | }, | |
5 | "nbformat": 3, |
|
5 | "nbformat": 3, | |
6 | "nbformat_minor": 0, |
|
6 | "nbformat_minor": 0, | |
7 | "worksheets": [ |
|
7 | "worksheets": [ | |
8 | { |
|
8 | { | |
9 | "cells": [ |
|
9 | "cells": [ | |
10 | { |
|
10 | { | |
11 | "cell_type": "heading", |
|
11 | "cell_type": "heading", | |
12 | "level": 1, |
|
12 | "level": 1, | |
13 | "metadata": { |
|
13 | "metadata": { | |
14 | "slideshow": { |
|
14 | "slideshow": { | |
15 | "slide_start": false |
|
15 | "slide_start": false | |
16 | } |
|
16 | } | |
17 | }, |
|
17 | }, | |
18 | "source": [ |
|
18 | "source": [ | |
19 | "Interactive monitoring of a parallel MPI simulation with the IPython Notebook" |
|
19 | "Interactive monitoring of a parallel MPI simulation with the IPython Notebook" | |
20 | ] |
|
20 | ] | |
21 | }, |
|
21 | }, | |
22 | { |
|
22 | { | |
23 | "cell_type": "code", |
|
23 | "cell_type": "code", | |
24 | "collapsed": false, |
|
24 | "collapsed": false, | |
25 | "input": [ |
|
25 | "input": [ | |
26 |
"% |
|
26 | "%matplotlib inline\n", | |
|
27 | "import numpy as np\n", | |||
|
28 | "import matplotlib.pyplot as plt\n", | |||
|
29 | "\n", | |||
|
30 | "from IPython.display import display\n", | |||
27 | "from IPython.parallel import Client, error\n", |
|
31 | "from IPython.parallel import Client, error\n", | |
|
32 | "\n", | |||
28 | "cluster = Client(profile=\"mpi\")\n", |
|
33 | "cluster = Client(profile=\"mpi\")\n", | |
29 | "view = cluster[:]\n", |
|
34 | "view = cluster[:]\n", | |
30 | "view.block = True" |
|
35 | "view.block = True" | |
31 | ], |
|
36 | ], | |
32 | "language": "python", |
|
37 | "language": "python", | |
33 | "metadata": { |
|
38 | "metadata": { | |
34 | "slideshow": { |
|
39 | "slideshow": { | |
35 | "slide_start": false |
|
40 | "slide_start": false | |
36 | } |
|
41 | } | |
37 | }, |
|
42 | }, | |
38 | "outputs": [ |
|
43 | "outputs": [], | |
39 | { |
|
44 | "prompt_number": 1 | |
40 | "output_type": "stream", |
|
|||
41 | "stream": "stdout", |
|
|||
42 | "text": [ |
|
|||
43 | "\n", |
|
|||
44 | "Welcome to pylab, a matplotlib-based Python environment [backend: module://IPython.kernel.zmq.pylab.backend_inline].\n", |
|
|||
45 | "For more information, type 'help(pylab)'.\n" |
|
|||
46 | ] |
|
|||
47 | } |
|
|||
48 | ], |
|
|||
49 | "prompt_number": 12 |
|
|||
50 | }, |
|
45 | }, | |
51 | { |
|
46 | { | |
52 | "cell_type": "code", |
|
47 | "cell_type": "code", | |
53 | "collapsed": false, |
|
48 | "collapsed": false, | |
54 | "input": [ |
|
49 | "input": [ | |
55 | "cluster.ids" |
|
50 | "cluster.ids" | |
56 | ], |
|
51 | ], | |
57 | "language": "python", |
|
52 | "language": "python", | |
58 | "metadata": {}, |
|
53 | "metadata": {}, | |
59 | "outputs": [ |
|
54 | "outputs": [ | |
60 | { |
|
55 | { | |
61 | "metadata": {}, |
|
56 | "metadata": {}, | |
62 | "output_type": "pyout", |
|
57 | "output_type": "pyout", | |
63 |
"prompt_number": |
|
58 | "prompt_number": 2, | |
64 | "text": [ |
|
59 | "text": [ | |
65 | "[0, 1, 2, 3]" |
|
60 | "[0, 1, 2, 3]" | |
66 | ] |
|
61 | ] | |
67 | } |
|
62 | } | |
68 | ], |
|
63 | ], | |
69 |
"prompt_number": |
|
64 | "prompt_number": 2 | |
70 | }, |
|
65 | }, | |
71 | { |
|
66 | { | |
72 | "cell_type": "markdown", |
|
67 | "cell_type": "markdown", | |
73 | "metadata": { |
|
68 | "metadata": { | |
74 | "slideshow": { |
|
69 | "slideshow": { | |
75 | "slide_start": false |
|
70 | "slide_start": false | |
76 | } |
|
71 | } | |
77 | }, |
|
72 | }, | |
78 | "source": [ |
|
73 | "source": [ | |
79 | "Now, we load the MPI libraries into the engine namespaces, and do a simple printing of their MPI rank information to verify that all nodes are operational and they match our cluster's real capacity. \n", |
|
74 | "Now, we load the MPI libraries into the engine namespaces, and do a simple printing of their MPI rank information to verify that all nodes are operational and they match our cluster's real capacity. \n", | |
80 | "\n", |
|
75 | "\n", | |
81 | "Here, we are making use of IPython's special `%%px` cell magic, which marks the entire cell for parallel execution. This means that the code below will not run in this notebook's kernel, but instead will be sent to *all* engines for execution there. In this way, IPython makes it very natural to control your entire cluster from within the notebook environment:" |
|
76 | "Here, we are making use of IPython's special `%%px` cell magic, which marks the entire cell for parallel execution. This means that the code below will not run in this notebook's kernel, but instead will be sent to *all* engines for execution there. In this way, IPython makes it very natural to control your entire cluster from within the notebook environment:" | |
82 | ] |
|
77 | ] | |
83 | }, |
|
78 | }, | |
84 | { |
|
79 | { | |
85 | "cell_type": "code", |
|
80 | "cell_type": "code", | |
86 | "collapsed": false, |
|
81 | "collapsed": false, | |
87 | "input": [ |
|
82 | "input": [ | |
88 | "%%px\n", |
|
83 | "%%px\n", | |
89 | "# MPI initialization, library imports and sanity checks on all engines\n", |
|
84 | "# MPI initialization, library imports and sanity checks on all engines\n", | |
90 | "from mpi4py import MPI\n", |
|
85 | "from mpi4py import MPI\n", | |
91 | "import numpy as np\n", |
|
86 | "import numpy as np\n", | |
92 | "import time\n", |
|
87 | "import time\n", | |
93 | "\n", |
|
88 | "\n", | |
94 | "mpi = MPI.COMM_WORLD\n", |
|
89 | "mpi = MPI.COMM_WORLD\n", | |
95 | "bcast = mpi.bcast\n", |
|
90 | "bcast = mpi.bcast\n", | |
96 | "barrier = mpi.barrier\n", |
|
91 | "barrier = mpi.barrier\n", | |
97 | "rank = mpi.rank\n", |
|
92 | "rank = mpi.rank\n", | |
98 | "print \"MPI rank: %i/%i\" % (mpi.rank,mpi.size)" |
|
93 | "print \"MPI rank: %i/%i\" % (mpi.rank,mpi.size)" | |
99 | ], |
|
94 | ], | |
100 | "language": "python", |
|
95 | "language": "python", | |
101 | "metadata": { |
|
96 | "metadata": { | |
102 | "slideshow": { |
|
97 | "slideshow": { | |
103 | "slide_start": false |
|
98 | "slide_start": false | |
104 | } |
|
99 | } | |
105 | }, |
|
100 | }, | |
106 | "outputs": [ |
|
101 | "outputs": [ | |
107 | { |
|
102 | { | |
108 | "output_type": "stream", |
|
103 | "output_type": "stream", | |
109 | "stream": "stdout", |
|
104 | "stream": "stdout", | |
110 | "text": [ |
|
105 | "text": [ | |
111 | "[stdout:0] MPI rank: 3/4\n", |
|
106 | "[stdout:0] MPI rank: 3/4\n", | |
112 | "[stdout:1] MPI rank: 2/4\n", |
|
107 | "[stdout:1] MPI rank: 2/4\n", | |
113 | "[stdout:2] MPI rank: 0/4\n", |
|
108 | "[stdout:2] MPI rank: 0/4\n", | |
114 | "[stdout:3] MPI rank: 1/4\n" |
|
109 | "[stdout:3] MPI rank: 1/4\n" | |
115 | ] |
|
110 | ] | |
116 | } |
|
111 | } | |
117 | ], |
|
112 | ], | |
118 |
"prompt_number": |
|
113 | "prompt_number": 3 | |
119 | }, |
|
114 | }, | |
120 | { |
|
115 | { | |
121 | "cell_type": "markdown", |
|
116 | "cell_type": "markdown", | |
122 | "metadata": { |
|
117 | "metadata": { | |
123 | "slideshow": { |
|
118 | "slideshow": { | |
124 | "slide_start": false |
|
119 | "slide_start": false | |
125 | } |
|
120 | } | |
126 | }, |
|
121 | }, | |
127 | "source": [ |
|
122 | "source": [ | |
128 | "We write a utility that reorders a list according to the mpi ranks of the engines, since all gather operations will return data in engine id order, not in MPI rank order. We'll need this later on when we want to reassemble in IPython data structures coming from all the engines: IPython will collect the data ordered by engine ID, but our code creates data structures based on MPI rank, so we need to map from one indexing scheme to the other. This simple function does the job:" |
|
123 | "We write a utility that reorders a list according to the mpi ranks of the engines, since all gather operations will return data in engine id order, not in MPI rank order. We'll need this later on when we want to reassemble in IPython data structures coming from all the engines: IPython will collect the data ordered by engine ID, but our code creates data structures based on MPI rank, so we need to map from one indexing scheme to the other. This simple function does the job:" | |
129 | ] |
|
124 | ] | |
130 | }, |
|
125 | }, | |
131 | { |
|
126 | { | |
132 | "cell_type": "code", |
|
127 | "cell_type": "code", | |
133 | "collapsed": false, |
|
128 | "collapsed": false, | |
134 | "input": [ |
|
129 | "input": [ | |
135 | "ranks = view['rank']\n", |
|
130 | "ranks = view['rank']\n", | |
136 | "rank_indices = np.argsort(ranks)\n", |
|
131 | "rank_indices = np.argsort(ranks)\n", | |
137 | "\n", |
|
132 | "\n", | |
138 | "def mpi_order(seq):\n", |
|
133 | "def mpi_order(seq):\n", | |
139 | " \"\"\"Return elements of a sequence ordered by MPI rank.\n", |
|
134 | " \"\"\"Return elements of a sequence ordered by MPI rank.\n", | |
140 | "\n", |
|
135 | "\n", | |
141 | " The input sequence is assumed to be ordered by engine ID.\"\"\"\n", |
|
136 | " The input sequence is assumed to be ordered by engine ID.\"\"\"\n", | |
142 | " return [seq[x] for x in rank_indices]" |
|
137 | " return [seq[x] for x in rank_indices]" | |
143 | ], |
|
138 | ], | |
144 | "language": "python", |
|
139 | "language": "python", | |
145 | "metadata": { |
|
140 | "metadata": { | |
146 | "slideshow": { |
|
141 | "slideshow": { | |
147 | "slide_start": false |
|
142 | "slide_start": false | |
148 | } |
|
143 | } | |
149 | }, |
|
144 | }, | |
150 | "outputs": [], |
|
145 | "outputs": [], | |
151 |
"prompt_number": |
|
146 | "prompt_number": 4 | |
152 | }, |
|
147 | }, | |
153 | { |
|
148 | { | |
154 | "cell_type": "heading", |
|
149 | "cell_type": "heading", | |
155 | "level": 2, |
|
150 | "level": 2, | |
156 | "metadata": { |
|
151 | "metadata": { | |
157 | "slideshow": { |
|
152 | "slideshow": { | |
158 | "slide_start": false |
|
153 | "slide_start": false | |
159 | } |
|
154 | } | |
160 | }, |
|
155 | }, | |
161 | "source": [ |
|
156 | "source": [ | |
162 | "MPI simulation example" |
|
157 | "MPI simulation example" | |
163 | ] |
|
158 | ] | |
164 | }, |
|
159 | }, | |
165 | { |
|
160 | { | |
166 | "cell_type": "markdown", |
|
161 | "cell_type": "markdown", | |
167 | "metadata": { |
|
162 | "metadata": { | |
168 | "slideshow": { |
|
163 | "slideshow": { | |
169 | "slide_start": false |
|
164 | "slide_start": false | |
170 | } |
|
165 | } | |
171 | }, |
|
166 | }, | |
172 | "source": [ |
|
167 | "source": [ | |
173 | "This is our 'simulation', a toy example that computes $\\sin(f(x^2+y^2))$ for a slowly increasing frequency $f$ over a gradually refined mesh. In a real-world example, there typically is a 'simulate' method that, afer setting up initial parameters, runs the entire computation. But having this simple example will be sufficient to see something that changes visually as the computation evolves and that is quick enough for us to test.\n", |
|
168 | "This is our 'simulation', a toy example that computes $\\sin(f(x^2+y^2))$ for a slowly increasing frequency $f$ over a gradually refined mesh. In a real-world example, there typically is a 'simulate' method that, afer setting up initial parameters, runs the entire computation. But having this simple example will be sufficient to see something that changes visually as the computation evolves and that is quick enough for us to test.\n", | |
174 | "\n", |
|
169 | "\n", | |
175 | "And while simple, this example has a realistic decomposition of the spatial domain in one array per MPI node that requires care in reordering the data for visualization, as would be needed in a real-world application (unless your code accumulates data in the rank 0 node that you can grab directly)." |
|
170 | "And while simple, this example has a realistic decomposition of the spatial domain in one array per MPI node that requires care in reordering the data for visualization, as would be needed in a real-world application (unless your code accumulates data in the rank 0 node that you can grab directly)." | |
176 | ] |
|
171 | ] | |
177 | }, |
|
172 | }, | |
178 | { |
|
173 | { | |
179 | "cell_type": "code", |
|
174 | "cell_type": "code", | |
180 | "collapsed": false, |
|
175 | "collapsed": false, | |
181 | "input": [ |
|
176 | "input": [ | |
182 | "%%px\n", |
|
177 | "%%px\n", | |
183 | "\n", |
|
178 | "\n", | |
184 | "stop = False\n", |
|
179 | "stop = False\n", | |
185 | "nsteps = 100\n", |
|
180 | "nsteps = 100\n", | |
186 | "delay = 0.1\n", |
|
181 | "delay = 0.1\n", | |
187 | "\n", |
|
182 | "\n", | |
188 | "xmin, xmax = 0, np.pi\n", |
|
183 | "xmin, xmax = 0, np.pi\n", | |
189 | "ymin, ymax = 0, 2*np.pi\n", |
|
184 | "ymin, ymax = 0, 2*np.pi\n", | |
190 | "dy = (ymax-ymin)/mpi.size\n", |
|
185 | "dy = (ymax-ymin)/mpi.size\n", | |
191 | "\n", |
|
186 | "\n", | |
192 | "def simulation():\n", |
|
187 | "def simulation():\n", | |
193 | " \"\"\"Toy simulation code, computes sin(f*(x**2+y**2)) for a slowly increasing f\n", |
|
188 | " \"\"\"Toy simulation code, computes sin(f*(x**2+y**2)) for a slowly increasing f\n", | |
194 | " over an increasingly fine mesh.\n", |
|
189 | " over an increasingly fine mesh.\n", | |
195 | "\n", |
|
190 | "\n", | |
196 | " The purpose of this code is simply to illustrate the basic features of a typical\n", |
|
191 | " The purpose of this code is simply to illustrate the basic features of a typical\n", | |
197 | " MPI code: spatial domain decomposition, a solution which is evolving in some \n", |
|
192 | " MPI code: spatial domain decomposition, a solution which is evolving in some \n", | |
198 | " sense, and local per-node computation. In this case the nodes don't really\n", |
|
193 | " sense, and local per-node computation. In this case the nodes don't really\n", | |
199 | " communicate at all.\n", |
|
194 | " communicate at all.\n", | |
200 | " \"\"\"\n", |
|
195 | " \"\"\"\n", | |
201 | " # By making these few variables global, we allow the IPython client to access them\n", |
|
196 | " # By making these few variables global, we allow the IPython client to access them\n", | |
202 | " # remotely for interactive introspection\n", |
|
197 | " # remotely for interactive introspection\n", | |
203 | " global j, Z, nx, nyt\n", |
|
198 | " global j, Z, nx, nyt\n", | |
204 | " freqs = np.linspace(0.6, 1, nsteps)\n", |
|
199 | " freqs = np.linspace(0.6, 1, nsteps)\n", | |
205 | " for j in range(nsteps):\n", |
|
200 | " for j in range(nsteps):\n", | |
206 | " nx, ny = 2+j/4, 2+j/2/mpi.size\n", |
|
201 | " nx, ny = 2+j/4, 2+j/2/mpi.size\n", | |
207 | " nyt = mpi.size*ny\n", |
|
202 | " nyt = mpi.size*ny\n", | |
208 | " Xax = np.linspace(xmin, xmax, nx)\n", |
|
203 | " Xax = np.linspace(xmin, xmax, nx)\n", | |
209 | " Yax = np.linspace(ymin+rank*dy, ymin+(rank+1)*dy, ny, endpoint=rank==mpi.size)\n", |
|
204 | " Yax = np.linspace(ymin+rank*dy, ymin+(rank+1)*dy, ny, endpoint=rank==mpi.size)\n", | |
210 | " X, Y = np.meshgrid(Xax, Yax)\n", |
|
205 | " X, Y = np.meshgrid(Xax, Yax)\n", | |
211 | " f = freqs[j]\n", |
|
206 | " f = freqs[j]\n", | |
212 | " Z = np.cos(f*(X**2 + Y**2))\n", |
|
207 | " Z = np.cos(f*(X**2 + Y**2))\n", | |
213 | " # We add a small delay to simulate that a real-world computation\n", |
|
208 | " # We add a small delay to simulate that a real-world computation\n", | |
214 | " # would take much longer, and we ensure all nodes are synchronized\n", |
|
209 | " # would take much longer, and we ensure all nodes are synchronized\n", | |
215 | " time.sleep(delay)\n", |
|
210 | " time.sleep(delay)\n", | |
216 | " # The stop flag can be set remotely via IPython, allowing the simulation to be\n", |
|
211 | " # The stop flag can be set remotely via IPython, allowing the simulation to be\n", | |
217 | " # cleanly stopped from the outside\n", |
|
212 | " # cleanly stopped from the outside\n", | |
218 | " if stop:\n", |
|
213 | " if stop:\n", | |
219 | " break" |
|
214 | " break" | |
220 | ], |
|
215 | ], | |
221 | "language": "python", |
|
216 | "language": "python", | |
222 | "metadata": { |
|
217 | "metadata": { | |
223 | "slideshow": { |
|
218 | "slideshow": { | |
224 | "slide_start": false |
|
219 | "slide_start": false | |
225 | } |
|
220 | } | |
226 | }, |
|
221 | }, | |
227 | "outputs": [], |
|
222 | "outputs": [], | |
228 |
"prompt_number": |
|
223 | "prompt_number": 5 | |
229 | }, |
|
224 | }, | |
230 | { |
|
225 | { | |
231 | "cell_type": "heading", |
|
226 | "cell_type": "heading", | |
232 | "level": 2, |
|
227 | "level": 2, | |
233 | "metadata": { |
|
228 | "metadata": { | |
234 | "slideshow": { |
|
229 | "slideshow": { | |
235 | "slide_start": false |
|
230 | "slide_start": false | |
236 | } |
|
231 | } | |
237 | }, |
|
232 | }, | |
238 | "source": [ |
|
233 | "source": [ | |
239 | "IPython tools to interactively monitor and plot the MPI results" |
|
234 | "IPython tools to interactively monitor and plot the MPI results" | |
240 | ] |
|
235 | ] | |
241 | }, |
|
236 | }, | |
242 | { |
|
237 | { | |
243 | "cell_type": "markdown", |
|
238 | "cell_type": "markdown", | |
244 | "metadata": { |
|
239 | "metadata": { | |
245 | "slideshow": { |
|
240 | "slideshow": { | |
246 | "slide_start": false |
|
241 | "slide_start": false | |
247 | } |
|
242 | } | |
248 | }, |
|
243 | }, | |
249 | "source": [ |
|
244 | "source": [ | |
250 | "We now define a local (to this notebook) plotting function that fetches data from the engines' global namespace. Once it has retrieved the current state of the relevant variables, it produces and returns a figure:" |
|
245 | "We now define a local (to this notebook) plotting function that fetches data from the engines' global namespace. Once it has retrieved the current state of the relevant variables, it produces and returns a figure:" | |
251 | ] |
|
246 | ] | |
252 | }, |
|
247 | }, | |
253 | { |
|
248 | { | |
254 | "cell_type": "code", |
|
249 | "cell_type": "code", | |
255 | "collapsed": false, |
|
250 | "collapsed": false, | |
256 | "input": [ |
|
251 | "input": [ | |
257 | "from IPython.display import clear_output\n", |
|
252 | "from IPython.display import clear_output\n", | |
258 | "\n", |
|
253 | "\n", | |
259 | "def plot_current_results(in_place=True):\n", |
|
254 | "def plot_current_results(in_place=True):\n", | |
260 | " \"\"\"Makes a blocking call to retrieve remote data and displays the solution mesh\n", |
|
255 | " \"\"\"Makes a blocking call to retrieve remote data and displays the solution mesh\n", | |
261 | " as a contour plot.\n", |
|
256 | " as a contour plot.\n", | |
262 | " \n", |
|
257 | " \n", | |
263 | " Parameters\n", |
|
258 | " Parameters\n", | |
264 | " ----------\n", |
|
259 | " ----------\n", | |
265 | " in_place : bool\n", |
|
260 | " in_place : bool\n", | |
266 | " By default it calls clear_output so that new plots replace old ones. Set\n", |
|
261 | " By default it calls clear_output so that new plots replace old ones. Set\n", | |
267 | " to False to allow keeping of all previous outputs.\n", |
|
262 | " to False to allow keeping of all previous outputs.\n", | |
268 | " \"\"\"\n", |
|
263 | " \"\"\"\n", | |
269 | " \n", |
|
264 | " \n", | |
270 | " # We make a blocking call to load the remote data from the simulation into simple named \n", |
|
265 | " # We make a blocking call to load the remote data from the simulation into simple named \n", | |
271 | " # variables we can read from the engine namespaces\n", |
|
266 | " # variables we can read from the engine namespaces\n", | |
272 | " #view.apply_sync(load_simulation_globals)\n", |
|
267 | " #view.apply_sync(load_simulation_globals)\n", | |
273 | " # And now we can use the view to read these variables from all the engines. Then we\n", |
|
268 | " # And now we can use the view to read these variables from all the engines. Then we\n", | |
274 | " # concatenate all of them into single arrays for local plotting\n", |
|
269 | " # concatenate all of them into single arrays for local plotting\n", | |
275 | " try:\n", |
|
270 | " try:\n", | |
276 | " Z = np.concatenate(mpi_order(view['Z']))\n", |
|
271 | " Z = np.concatenate(mpi_order(view['Z']))\n", | |
277 | " except ValueError:\n", |
|
272 | " except ValueError:\n", | |
278 | " print \"dimension mismatch in Z, not plotting\"\n", |
|
273 | " print \"dimension mismatch in Z, not plotting\"\n", | |
279 | " ax = plt.gca()\n", |
|
274 | " ax = plt.gca()\n", | |
280 | " return ax.figure\n", |
|
275 | " return ax.figure\n", | |
281 | " \n", |
|
276 | " \n", | |
282 | " nx, nyt, j, nsteps = view.pull(['nx', 'nyt', 'j', 'nsteps'], targets=0)\n", |
|
277 | " nx, nyt, j, nsteps = view.pull(['nx', 'nyt', 'j', 'nsteps'], targets=0)\n", | |
283 | " fig, ax = plt.subplots()\n", |
|
278 | " fig, ax = plt.subplots()\n", | |
284 | " ax.contourf(Z)\n", |
|
279 | " ax.contourf(Z)\n", | |
285 | " ax.set_title('Mesh: %i x %i, step %i/%i' % (nx, nyt, j+1, nsteps))\n", |
|
280 | " ax.set_title('Mesh: %i x %i, step %i/%i' % (nx, nyt, j+1, nsteps))\n", | |
286 | " axis('off')\n", |
|
281 | " plt.axis('off')\n", | |
287 | " # We clear the notebook output before plotting this if in-place plot updating is requested\n", |
|
282 | " # We clear the notebook output before plotting this if in-place plot updating is requested\n", | |
288 | " if in_place:\n", |
|
283 | " if in_place:\n", | |
289 | " clear_output()\n", |
|
284 | " clear_output()\n", | |
290 | " display(fig)\n", |
|
285 | " display(fig)\n", | |
291 | " return fig" |
|
286 | " return fig" | |
292 | ], |
|
287 | ], | |
293 | "language": "python", |
|
288 | "language": "python", | |
294 | "metadata": { |
|
289 | "metadata": { | |
295 | "slideshow": { |
|
290 | "slideshow": { | |
296 | "slide_start": false |
|
291 | "slide_start": false | |
297 | } |
|
292 | } | |
298 | }, |
|
293 | }, | |
299 | "outputs": [], |
|
294 | "outputs": [], | |
300 |
"prompt_number": |
|
295 | "prompt_number": 6 | |
301 | }, |
|
296 | }, | |
302 | { |
|
297 | { | |
303 | "cell_type": "markdown", |
|
298 | "cell_type": "markdown", | |
304 | "metadata": { |
|
299 | "metadata": { | |
305 | "slideshow": { |
|
300 | "slideshow": { | |
306 | "slide_start": false |
|
301 | "slide_start": false | |
307 | } |
|
302 | } | |
308 | }, |
|
303 | }, | |
309 | "source": [ |
|
304 | "source": [ | |
310 | "It will also be useful to be able to check whether the simulation is still alive or not. Below we will wrap the main simulation function into a thread to allow IPython to pull data from the engines, and we will call this object `simulation_thread`. So to check whether the code is still running, all we have to do is call the `is_alive` method on all of our engines and see whether any of them returns True:" |
|
305 | "It will also be useful to be able to check whether the simulation is still alive or not. Below we will wrap the main simulation function into a thread to allow IPython to pull data from the engines, and we will call this object `simulation_thread`. So to check whether the code is still running, all we have to do is call the `is_alive` method on all of our engines and see whether any of them returns True:" | |
311 | ] |
|
306 | ] | |
312 | }, |
|
307 | }, | |
313 | { |
|
308 | { | |
314 | "cell_type": "code", |
|
309 | "cell_type": "code", | |
315 | "collapsed": false, |
|
310 | "collapsed": false, | |
316 | "input": [ |
|
311 | "input": [ | |
317 | "def simulation_alive():\n", |
|
312 | "def simulation_alive():\n", | |
318 | " \"\"\"Return True if the simulation thread is still running on any engine.\n", |
|
313 | " \"\"\"Return True if the simulation thread is still running on any engine.\n", | |
319 | " \"\"\"\n", |
|
314 | " \"\"\"\n", | |
320 | " return any(view.apply_sync(lambda : simulation_thread.is_alive()))" |
|
315 | " return any(view.apply_sync(lambda : simulation_thread.is_alive()))" | |
321 | ], |
|
316 | ], | |
322 | "language": "python", |
|
317 | "language": "python", | |
323 | "metadata": { |
|
318 | "metadata": { | |
324 | "slideshow": { |
|
319 | "slideshow": { | |
325 | "slide_start": false |
|
320 | "slide_start": false | |
326 | } |
|
321 | } | |
327 | }, |
|
322 | }, | |
328 | "outputs": [], |
|
323 | "outputs": [], | |
329 |
"prompt_number": |
|
324 | "prompt_number": 7 | |
330 | }, |
|
325 | }, | |
331 | { |
|
326 | { | |
332 | "cell_type": "markdown", |
|
327 | "cell_type": "markdown", | |
333 | "metadata": { |
|
328 | "metadata": { | |
334 | "slideshow": { |
|
329 | "slideshow": { | |
335 | "slide_start": false |
|
330 | "slide_start": false | |
336 | } |
|
331 | } | |
337 | }, |
|
332 | }, | |
338 | "source": [ |
|
333 | "source": [ | |
339 | "Finally, this is a convenience wrapper around the plotting code so that we can interrupt monitoring at any point, and that will provide basic timing information:" |
|
334 | "Finally, this is a convenience wrapper around the plotting code so that we can interrupt monitoring at any point, and that will provide basic timing information:" | |
340 | ] |
|
335 | ] | |
341 | }, |
|
336 | }, | |
342 | { |
|
337 | { | |
343 | "cell_type": "code", |
|
338 | "cell_type": "code", | |
344 | "collapsed": false, |
|
339 | "collapsed": false, | |
345 | "input": [ |
|
340 | "input": [ | |
346 | "def monitor_simulation(refresh=5.0, plots_in_place=True):\n", |
|
341 | "def monitor_simulation(refresh=5.0, plots_in_place=True):\n", | |
347 | " \"\"\"Monitor the simulation progress and call plotting routine.\n", |
|
342 | " \"\"\"Monitor the simulation progress and call plotting routine.\n", | |
348 | "\n", |
|
343 | "\n", | |
349 | " Supress KeyboardInterrupt exception if interrupted, ensure that the last \n", |
|
344 | " Supress KeyboardInterrupt exception if interrupted, ensure that the last \n", | |
350 | " figure is always displayed and provide basic timing and simulation status.\n", |
|
345 | " figure is always displayed and provide basic timing and simulation status.\n", | |
351 | "\n", |
|
346 | "\n", | |
352 | " Parameters\n", |
|
347 | " Parameters\n", | |
353 | " ----------\n", |
|
348 | " ----------\n", | |
354 | " refresh : float\n", |
|
349 | " refresh : float\n", | |
355 | " Refresh interval between calls to retrieve and plot data. The default\n", |
|
350 | " Refresh interval between calls to retrieve and plot data. The default\n", | |
356 | " is 5s, adjust depending on the desired refresh rate, but be aware that \n", |
|
351 | " is 5s, adjust depending on the desired refresh rate, but be aware that \n", | |
357 | " very short intervals will start having a significant impact.\n", |
|
352 | " very short intervals will start having a significant impact.\n", | |
358 | "\n", |
|
353 | "\n", | |
359 | " plots_in_place : bool\n", |
|
354 | " plots_in_place : bool\n", | |
360 | " If true, every new figure replaces the last one, producing a (slow)\n", |
|
355 | " If true, every new figure replaces the last one, producing a (slow)\n", | |
361 | " animation effect in the notebook. If false, all frames are plotted\n", |
|
356 | " animation effect in the notebook. If false, all frames are plotted\n", | |
362 | " in sequence and appended in the output area.\n", |
|
357 | " in sequence and appended in the output area.\n", | |
363 | " \"\"\"\n", |
|
358 | " \"\"\"\n", | |
364 | " import datetime as dt, time\n", |
|
359 | " import datetime as dt, time\n", | |
365 | " \n", |
|
360 | " \n", | |
366 | " if not simulation_alive():\n", |
|
361 | " if not simulation_alive():\n", | |
367 | " plot_current_results(in_place=plots_in_place)\n", |
|
362 | " plot_current_results(in_place=plots_in_place)\n", | |
368 | " plt.close('all')\n", |
|
363 | " plt.close('all')\n", | |
369 | " print 'Simulation has already finished, no monitoring to do.'\n", |
|
364 | " print 'Simulation has already finished, no monitoring to do.'\n", | |
370 | " return\n", |
|
365 | " return\n", | |
371 | " \n", |
|
366 | " \n", | |
372 | " t0 = dt.datetime.now()\n", |
|
367 | " t0 = dt.datetime.now()\n", | |
373 | " fig = None\n", |
|
368 | " fig = None\n", | |
374 | " try:\n", |
|
369 | " try:\n", | |
375 | " while simulation_alive():\n", |
|
370 | " while simulation_alive():\n", | |
376 | " fig = plot_current_results(in_place=plots_in_place)\n", |
|
371 | " fig = plot_current_results(in_place=plots_in_place)\n", | |
377 | " plt.close('all') # prevent re-plot of old figures\n", |
|
372 | " plt.close('all') # prevent re-plot of old figures\n", | |
378 | " time.sleep(refresh) # so we don't hammer the server too fast\n", |
|
373 | " time.sleep(refresh) # so we don't hammer the server too fast\n", | |
379 | " except (KeyboardInterrupt, error.TimeoutError):\n", |
|
374 | " except (KeyboardInterrupt, error.TimeoutError):\n", | |
380 | " msg = 'Monitoring interrupted, simulation is ongoing!'\n", |
|
375 | " msg = 'Monitoring interrupted, simulation is ongoing!'\n", | |
381 | " else:\n", |
|
376 | " else:\n", | |
382 | " msg = 'Simulation completed!'\n", |
|
377 | " msg = 'Simulation completed!'\n", | |
383 | " tmon = dt.datetime.now() - t0\n", |
|
378 | " tmon = dt.datetime.now() - t0\n", | |
384 | " if plots_in_place and fig is not None:\n", |
|
379 | " if plots_in_place and fig is not None:\n", | |
385 | " clear_output()\n", |
|
380 | " clear_output()\n", | |
386 | " plt.close('all')\n", |
|
381 | " plt.close('all')\n", | |
387 | " display(fig)\n", |
|
382 | " display(fig)\n", | |
388 | " print msg\n", |
|
383 | " print msg\n", | |
389 | " print 'Monitored for: %s.' % tmon" |
|
384 | " print 'Monitored for: %s.' % tmon" | |
390 | ], |
|
385 | ], | |
391 | "language": "python", |
|
386 | "language": "python", | |
392 | "metadata": { |
|
387 | "metadata": { | |
393 | "slideshow": { |
|
388 | "slideshow": { | |
394 | "slide_start": false |
|
389 | "slide_start": false | |
395 | } |
|
390 | } | |
396 | }, |
|
391 | }, | |
397 | "outputs": [], |
|
392 | "outputs": [], | |
398 |
"prompt_number": |
|
393 | "prompt_number": 8 | |
399 | }, |
|
394 | }, | |
400 | { |
|
395 | { | |
401 | "cell_type": "heading", |
|
396 | "cell_type": "heading", | |
402 | "level": 2, |
|
397 | "level": 2, | |
403 | "metadata": { |
|
398 | "metadata": { | |
404 | "slideshow": { |
|
399 | "slideshow": { | |
405 | "slide_start": false |
|
400 | "slide_start": false | |
406 | } |
|
401 | } | |
407 | }, |
|
402 | }, | |
408 | "source": [ |
|
403 | "source": [ | |
409 | "Making a simulation object that can be monitored interactively" |
|
404 | "Making a simulation object that can be monitored interactively" | |
410 | ] |
|
405 | ] | |
411 | }, |
|
406 | }, | |
412 | { |
|
407 | { | |
413 | "cell_type": "code", |
|
408 | "cell_type": "code", | |
414 | "collapsed": false, |
|
409 | "collapsed": false, | |
415 | "input": [ |
|
410 | "input": [ | |
416 | "%%px\n", |
|
411 | "%%px\n", | |
417 | "from threading import Thread\n", |
|
412 | "from threading import Thread\n", | |
418 | "stop = False\n", |
|
413 | "stop = False\n", | |
419 | "nsteps = 100\n", |
|
414 | "nsteps = 100\n", | |
420 | "delay=0.5\n", |
|
415 | "delay=0.5\n", | |
421 | "# Create a thread wrapper for the simulation. The target must be an argument-less\n", |
|
416 | "# Create a thread wrapper for the simulation. The target must be an argument-less\n", | |
422 | "# function so we wrap the call to 'simulation' in a simple lambda:\n", |
|
417 | "# function so we wrap the call to 'simulation' in a simple lambda:\n", | |
423 | "simulation_thread = Thread(target = lambda : simulation())\n", |
|
418 | "simulation_thread = Thread(target = lambda : simulation())\n", | |
424 | "# Now we actually start the simulation\n", |
|
419 | "# Now we actually start the simulation\n", | |
425 | "simulation_thread.start()" |
|
420 | "simulation_thread.start()" | |
426 | ], |
|
421 | ], | |
427 | "language": "python", |
|
422 | "language": "python", | |
428 | "metadata": { |
|
423 | "metadata": { | |
429 | "slideshow": { |
|
424 | "slideshow": { | |
430 | "slide_start": false |
|
425 | "slide_start": false | |
431 | } |
|
426 | } | |
432 | }, |
|
427 | }, | |
433 | "outputs": [], |
|
428 | "outputs": [], | |
434 |
"prompt_number": |
|
429 | "prompt_number": 9 | |
435 | }, |
|
430 | }, | |
436 | { |
|
431 | { | |
437 | "cell_type": "code", |
|
432 | "cell_type": "code", | |
438 | "collapsed": false, |
|
433 | "collapsed": false, | |
439 | "input": [ |
|
434 | "input": [ | |
440 | "monitor_simulation(refresh=1);" |
|
435 | "monitor_simulation(refresh=1);" | |
441 | ], |
|
436 | ], | |
442 | "language": "python", |
|
437 | "language": "python", | |
443 | "metadata": { |
|
438 | "metadata": { | |
444 | "slideshow": { |
|
439 | "slideshow": { | |
445 | "slide_start": false |
|
440 | "slide_start": false | |
446 | } |
|
441 | } | |
447 | }, |
|
442 | }, | |
448 | "outputs": [ |
|
443 | "outputs": [ | |
449 | { |
|
444 | { | |
450 | "metadata": {}, |
|
445 | "metadata": {}, | |
451 | "output_type": "display_data", |
|
446 | "output_type": "display_data", | |
452 | "png": "iVBORw0KGgoAAAANSUhEUgAAAXMAAAEICAYAAACtXxSQAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XuMlNXBx/Hf7BbLZXdhAYXKJQvFUGsBKchrJTVKoqYQ\nQGkjEbmIRUuiVgox2lbKwUsMasHQ/vFaY6o21ba2b1vaSpYGsGttMEJlUbCpq+0WQbk0i0Bhueye\n9w86w87uzDy3c55zeX6fxNTuzHNB5fsczjxznpyUUoKIiJxWZfoEiIgoOcaciMgDjDkRkQcYcyIi\nDzDmREQeYMyJiDzAmFNFDQ0N2Lx5s+nTIKIAjLnjGhoa8OlPfxr//ve/i34+ceJEVFVV4V//+lei\n/edyOeRyuVjbvvrqq6iqq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uvY9oknnsCIESPwq1/9yvs8pk2bhmHDhrX85w/+4A86tn3llVewzTbb4Cc/+Yn3ecRm3rx52G+/\n/TBixAhMnDgRt956a8v3GzduxD/+4z9izz33xMiRIzFp0iTcc889Xfu77rrr8NWvfrXlsx/96EcY\nOXIkFi9e3Nb+nXfewbnnnovx48dj3LhxOOWUU/Dqq6+2tFm1ahU++9nPYty4cRg/fjzOO+88rF27\ntsKfmpD8oEwRUpFRo0bhlltu6fr9vHnzMHr0aDQajYiz6s/bb7+N448/HrvtthtWrFiBJ554Au+/\n/z4+9alPdWx/0UUX4eyzz8bBBx/sfS6NRgPz5s3Dpk2bmv/54IMPOra97LLLMGXKFMycOdP7PGJy\n3XXX4brrrsPNN9+MNWvWYO7cubj22mvxr//6r802F110EebPn4/58+dj9erV+Pu//3ucc845uPvu\nu9v6s9billtuwcknn9z87Otf/zr+5m/+BiNHjuw4h1NPPRW///3v8fTTT2PlypXYddddccIJJzT/\n3b/33nuYMWMGdt99dzz//PN46qmn8Pbbb2P27Nme/20QohxLCCmNMcZ++tOftmPHjrWPPPJI2/cv\nvfSS3WqrreyZZ55pzzrrLC9jPv/883avvfaq3M+9995rp06d2vLZ+vXr7YgRI+yyZctaPr/tttvs\ntttua19//fXK43Zi2rRp9pZbbunbbunSpXb48OH2mWee8T6H+++/306bNs17v51477337NZbb22X\nLFnS8vmDDz5ot9tuO/v+++/b3/zmN3bYsGH2xRdfbGlz66232oMOOqitz5/+9Kd2ypQpzX/+/ve/\nb3fZZRf71FNP2b322sved999Le0feughu/POO9v169e3fH7wwQfb22+/3Vpr7Q9+8AN72GGHtXy/\nbt06O378+I5/3wmpK8xMEVKRMWPG4IwzzsC8efPavvvOd76D448/HnvssUeCmfXm+OOPx4MPPtjy\n2YgRIzBq1KiW2pu1a9fisssuwxVXXIHx48cHm4/tc7PVpk2bcNFFF+Hcc8/FQQcdFGweMXjjjTew\ndu1aTJ48ueXzww8/HL/73e/w6quv4oUXXsB2222H3Xffva3N//7v/7b1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CZZddhjlz5uDhhx/GunXr8Mgjj2DOnDk4+uijsc0222C33XbDX/7lX2L27Nl4+umn\nsXbtWixatAiXXXYZZsyY0dLfd7/7XXzuc59ryzL14re//S223Xbbts+322675r/Xbm3Gjh3r9O+e\nkOxJucdIiHauueYa+/nPf95aa+2NN95ojzrqqOZ3p556qr3iiiustdZeeeWVLTVTRx99tL3//vtb\n+tqwYYPdeuut7erVq+2yZcvsmDFj7FtvvdU25vPPP28bjYZdvnx5y+e77rpr6VqiN9980x544IH2\nz/7sz1o+v/LKK+3w4cOtMcY+/vjjduHChfbwww+3J510Us/+Hn30UbvNNtvYW265xf7hH/6hfe21\n15zm86tf/coOHz7cPvfcc9Zaa2+++WbbaDTsRRddZB977DG7ePFi+6d/+qf2sMMOsxs3bizU51tv\nvWWHDRtmn3322Y7fd6qZOu200+x3v/vdtrb77bef/e///m9rrbXHHnusPf3009va3HTTTXbixIld\n57Np0yZ7/fXX2913392OGDHC7r///rbRaNj58+c322zYsMFeccUVdqeddrKjRo2yEyZMsMOGDbOP\nP/54Sz/77befffrpp7uO1almaubMmfamm25qa3vPPffYAw880Fpr7YEHHmgXLVrU1uZb3/qWnTlz\nZtfxCKkbzEwR4onTTz8dzzzzDJ555hm8+eabuOuuu3Deeee1tdu4cSMeffRRTJ8+veUogJEjR2Ld\nunVYvnw5DjnkEEyfPh0TJkzA2WefjR/+8IfYsGFDs48dd9wRBxxwQEu/e++9N1avXu0877Vr1+Kk\nk07CjjvuiDvuuKPlu0WLFuGSSy7BNddcg8mTJ2PmzJn4z//8Tzz44IN45JFHuvZ55JFH4gtf+ALO\nO+88XHfdddhpp52c5vTRj34U++yzDx577LHmPE499VTccMMNOOKII3Dcccfh7rvvxm9/+1v8+7//\ne6E+x44diwsuuACHH344TjvtNMydOxdvv/12z2ceeughnHPOOW3HNjz33HNYvnw5gM2ZqdNPP73t\n2U996lN49tln8cYbb3Tsu9Fo4JJLLsGLL76I9evXY+rUqTjmmGPw6U9/utlmq622wle+8hW89tpr\nWLduHfbZZx+cdtppLbVWixcvxo477uj8luW4cePwu9/9ru3zt956CzvssEPfNttvv73TeITkDGWK\nEE9su+22mD17Nm6++WZ8//vfx8c//vHm4ZpDj0VoNBp4+umnW44CGDgOYMqUKWg0GliwYAHuuusu\n7LvvvviHf/gHTJ06tVlHNGbMmLbxhw8f3reIeygbN27EKaecgk2bNmHhwoVtr9C//fbb+PjHP97y\n2fjx43HAAQf0rJl59913sWDBAhxyyCH4t3/7N6c5DbDVVls1z5rqNI+RI0fiiCOOwIoVKwr3+a1v\nfQs///nPccQRR2DevHmYPHlyR1kYYNiwYbjrrrs6/v/053/+5812rv/eh/LUU0/he9/7Hv7lX/6l\na5u7774bS5cuxde//vWWz+fOndtzC7Ub++67L5YtW9b2+ZNPPol99923b5sJEyY4j0lIrlCmCKnA\nUEmaM2cOfvCDH2DevHldf8ANHz4cxxxzDH74wx+2fP7BBx/gmWeeaf7z+++/j6OPPhpXXXUVli1b\nhuXLl+Opp57yNndrLc466yz85je/waJFi7D11lu3tdl///1b5gQA69atw8qVK7Hnnnt27fvSSy/F\nRz/6UTz00EP49a9/ja997Wtd2z733HP49re/3fLZypUrsWLFChx11FFd57Fp0yY888wzPYush/L+\n++/j0EMPxaWXXorHHnsMw4cPbxb2NxqNthPEjz322Lb/nwC0CIa1Fj/+8Y/b2tx5552YOHFioTcg\nL774Ypx11lk4/PDDO36/ceNGfOlLX8IVV1yBXXfdtfn5G2+8gfvvvx+nnXZa3zGGcsIJJ+BnP/sZ\n1q9f3/JnWbhwYfMMrxNOOKHtTKt169bhgQceUH/OFyFeSbrJSIhyBtdMDXDwwQfb8ePH2/fee6/5\n2dCaqV/+8pd2zJgx9pvf/KZdvXq1ff755+3s2bPtjBkzrLXWPvDAA3a//fazTz75pH333XftHXfc\nYUePHm1fe+21rudMTZs2zT7wwAPNf/785z9vv/GNb3Sd+5e//GU7YcIEu2rVqq5tHn/8cbv99tvb\nH//4x/btt9+2K1assCeffLL9xCc+0fWZBQsW2F122cWuXr3aWmvtz3/+cztq1Cj72GOPdWz/i1/8\nwm611Vb2G9/4hn3nnXfs448/bidPnmwvv/zyZpuXX37Z7rDDDvbb3/62XbNmjX355Zft+eefbw8+\n+GC7YcOGZrtTTz3V/tVf/VXHcX7961/b3XbbzT7wwAN2/fr19r777rPbbLONffLJJ6211v7P//yP\n3Xnnne3rr79u/+///s9aa+2LL75ox44da6+44gr76quv2lWrVtkLL7zQHnTQQfaDDz6w1m6umdpz\nzz3txRdfbFeuXGnXrFljb731Vrv99tvbO++8s+u/pwHmz59vt9tuO/vGG290bXP99dfbffbZp+XP\naq21X/va1+xf//Vf9x2jU82UtZvrpmbPnm1XrVplV69ebS+88EI7efLk5p9t48aN9tBDD7UXXXSR\nXbNmjX3llVfsKaecYj/5yU/2HZOQOkGZIqQCxhj7F3/xFy2f3XDDDfbSSy9t+eyqq66yZ599dstn\n//Vf/2X/5E/+xI4cOdLuvPPO9sILL7TvvPNO8/trr73W7rHHHnbkyJH2j/7oj+y9995rrd1cgL73\n3nu3zWXatGn2wQcfbP7zEUccYS+55JKuc582bZodNmyYbTQabf+59dZbm+0efvhhe8wxx9iRI0fa\nnXbayV5yySUt8xzMK6+8YnfaaSd7zz33tHx+9dVX2wkTJtjf//73HZ+799577ZFHHmlHjRpl99xz\nT3vDDTe0tVm+fLmdMWOGHT16tB03bpw9++yzWwrbN23aZHfccUf7s5/9rOufee7cuXbixIl25MiR\n9qCDDmoeTjnAOeecY0eMGGEPP/zw5mcrVqywJ554oh0zZozdfvvt7ZlnnmlfffXVln+Pd911l/3i\nF79od955Zzty5Eg7ZcqUQodabtiwwU6YMKGn9L755pt23Lhx9j/+4z/avtt///2bMtiLbjL1zjvv\n2HPPPdfusMMOduzYsfaUU05pe1lg1apV9rOf/awdO3as3WGHHex5551n165d23dMQupEw9qKm/2E\nECKAxx9/HJ/4xCfwxhtvYNiweBUMxx13HK6++mpMnz492pgDrFixgrVLhAiANVOEkCy47777MGvW\nrKgilRqKFCEy+Ejq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3RekvUJQpIg4KlRvihMr46aaJ0uCaG1qzU9zq6w63+vxBmSIiEVGYrui3O6bja4rQ\ne81cYHbKjdhxkbGlGJQpIpqchUpi/RSzUzXDhOtaUnaqlij6ZbANheudMkXEQ6EqBrf7SGhCnTvl\nRInsFLf6uhPllzoTfojUUKYIKULNhIooom6F6EQcfIGFMkWUkDw7BehOmzvC7BTphtZC9Jxg3ZQ8\nKFNEDSKEKhDMThHiAAvRi1GjXwBTQ5kixIUaBSem7hWRwVt9oWHdVHdE1k0py0JTpogqmJ1SiPHc\nn7IgqwKTegKsmyK6oUwRdSQXKgXZKW71kZCwbooMpe6ZbMoUIaQrdQ+QqqjbVh/rpqLCX9B6Q5ki\nhBBCCKkAZYqoJPlWXyCyfavPeO6PdVOEEEFQpgghhBASHpN6AuGgTBFSBgVF6IRog2/0Fadwdr5g\nrMr2beJIUKYIIYRknTUYgGdNkVBQpohacq2bIkQDIi49JkQIDWutTT0JQgghhBCtMDNFCCGEEFIB\nyhQhhBBCSAUoU4QQQgghFaBMEUIIIYRUgDJFCCGEEFIByhQhhBBCSAUoU4QQQgghFaBMEUIIIYRU\ngDJFCCGEEFIByhQhhBBCSAUoU4QQQgghFaBMEUIIIYRUgDJFCCGEEFIByhQhhBBCSAUoU4QQQggh\nFaBMEUIIIYRUgDJFCCGEEFIByhQhhBBCSAUoU4QQQgghFaBMEUIIIYRUgDJFCCGEEFIByhQhhBBC\nSAUoU4QQQgghFfj/AcxNvvk8Uc7VAAAAAElFTkSuQmCC\n", | |
453 | "text": [ |
|
448 | "text": [ | |
454 |
"<matplotlib.figure.Figure at 0x5 |
|
449 | "<matplotlib.figure.Figure at 0x1141a1450>" | |
455 | ] |
|
450 | ] | |
456 | }, |
|
451 | }, | |
457 | { |
|
452 | { | |
458 | "output_type": "stream", |
|
453 | "output_type": "stream", | |
459 | "stream": "stdout", |
|
454 | "stream": "stdout", | |
460 | "text": [ |
|
455 | "text": [ | |
461 | "Simulation has already finished, no monitoring to do.\n" |
|
456 | "Simulation completed!\n", | |
|
457 | "Monitored for: 0:00:50.653178.\n" | |||
462 | ] |
|
458 | ] | |
463 | } |
|
459 | } | |
464 | ], |
|
460 | ], | |
465 |
"prompt_number": |
|
461 | "prompt_number": 10 | |
466 | }, |
|
462 | }, | |
467 | { |
|
463 | { | |
468 | "cell_type": "markdown", |
|
464 | "cell_type": "markdown", | |
469 | "metadata": { |
|
465 | "metadata": { | |
470 | "slideshow": { |
|
466 | "slideshow": { | |
471 | "slide_start": false |
|
467 | "slide_start": false | |
472 | } |
|
468 | } | |
473 | }, |
|
469 | }, | |
474 | "source": [ |
|
470 | "source": [ | |
475 | "If you execute the following cell before the MPI code is finished running, it will stop the simulation at that point, which you can verify by calling the monitoring again:" |
|
471 | "If you execute the following cell before the MPI code is finished running, it will stop the simulation at that point, which you can verify by calling the monitoring again:" | |
476 | ] |
|
472 | ] | |
477 | }, |
|
473 | }, | |
478 | { |
|
474 | { | |
479 | "cell_type": "code", |
|
475 | "cell_type": "code", | |
480 | "collapsed": false, |
|
476 | "collapsed": false, | |
481 | "input": [ |
|
477 | "input": [ | |
482 | "view['stop'] = True" |
|
478 | "view['stop'] = True" | |
483 | ], |
|
479 | ], | |
484 | "language": "python", |
|
480 | "language": "python", | |
485 | "metadata": { |
|
481 | "metadata": { | |
486 | "slideshow": { |
|
482 | "slideshow": { | |
487 | "slide_start": false |
|
483 | "slide_start": false | |
488 | } |
|
484 | } | |
489 | }, |
|
485 | }, | |
490 | "outputs": [], |
|
486 | "outputs": [], | |
491 |
"prompt_number": |
|
487 | "prompt_number": 11 | |
492 | }, |
|
488 | }, | |
493 | { |
|
489 | { | |
494 | "cell_type": "code", |
|
490 | "cell_type": "code", | |
495 | "collapsed": false, |
|
491 | "collapsed": false, | |
496 | "input": [ |
|
492 | "input": [ | |
497 | "%%px --target 0\n", |
|
493 | "%%px --target 0\n", | |
498 | "from IPython.parallel import bind_kernel; bind_kernel()\n", |
|
494 | "from IPython.parallel import bind_kernel; bind_kernel()\n", | |
499 | "%connect_info" |
|
495 | "%connect_info" | |
500 | ], |
|
496 | ], | |
501 | "language": "python", |
|
497 | "language": "python", | |
502 | "metadata": {}, |
|
498 | "metadata": {}, | |
503 | "outputs": [ |
|
499 | "outputs": [ | |
504 | { |
|
500 | { | |
505 | "output_type": "stream", |
|
501 | "output_type": "stream", | |
506 | "stream": "stdout", |
|
502 | "stream": "stdout", | |
507 | "text": [ |
|
503 | "text": [ | |
508 | "{\n", |
|
504 | "{\n", | |
509 |
" \"stdin_port\": 6 |
|
505 | " \"stdin_port\": 65310, \n", | |
510 | " \"ip\": \"127.0.0.1\", \n", |
|
506 | " \"ip\": \"127.0.0.1\", \n", | |
511 |
" \"control_port\": |
|
507 | " \"control_port\": 58188, \n", | |
512 |
" \"hb_port\": |
|
508 | " \"hb_port\": 58187, \n", | |
513 |
" \"key\": \" |
|
509 | " \"key\": \"e4f5cda8-faa8-48d3-a62c-dbde67db9827\", \n", | |
514 |
" \"shell_port\": 60 |
|
510 | " \"shell_port\": 65083, \n", | |
515 | " \"transport\": \"tcp\", \n", |
|
511 | " \"transport\": \"tcp\", \n", | |
516 |
" \"iopub_port\": 5 |
|
512 | " \"iopub_port\": 54934\n", | |
517 | "}\n", |
|
513 | "}\n", | |
518 | "\n", |
|
514 | "\n", | |
519 | "Paste the above JSON into a file, and connect with:\n", |
|
515 | "Paste the above JSON into a file, and connect with:\n", | |
520 | " $> ipython <app> --existing <file>\n", |
|
516 | " $> ipython <app> --existing <file>\n", | |
521 | "or, if you are local, you can connect with just:\n", |
|
517 | "or, if you are local, you can connect with just:\n", | |
522 |
" $> ipython <app> --existing kernel- |
|
518 | " $> ipython <app> --existing kernel-64604.json \n", | |
523 | "or even just:\n", |
|
519 | "or even just:\n", | |
524 | " $> ipython <app> --existing \n", |
|
520 | " $> ipython <app> --existing \n", | |
525 | "if this is the most recent IPython session you have started.\n" |
|
521 | "if this is the most recent IPython session you have started.\n" | |
526 | ] |
|
522 | ] | |
527 | } |
|
523 | } | |
528 | ], |
|
524 | ], | |
529 |
"prompt_number": 1 |
|
525 | "prompt_number": 12 | |
530 | }, |
|
526 | }, | |
531 | { |
|
527 | { | |
532 | "cell_type": "code", |
|
528 | "cell_type": "code", | |
533 | "collapsed": false, |
|
529 | "collapsed": false, | |
534 | "input": [ |
|
530 | "input": [ | |
535 | "%%px --target 0\n", |
|
531 | "%%px --target 0\n", | |
536 | "%qtconsole" |
|
532 | "%qtconsole" | |
537 | ], |
|
533 | ], | |
538 | "language": "python", |
|
534 | "language": "python", | |
539 | "metadata": {}, |
|
535 | "metadata": {}, | |
540 | "outputs": [], |
|
536 | "outputs": [], | |
541 |
"prompt_number": 1 |
|
537 | "prompt_number": 13 | |
542 | }, |
|
|||
543 | { |
|
|||
544 | "cell_type": "code", |
|
|||
545 | "collapsed": false, |
|
|||
546 | "input": [], |
|
|||
547 | "language": "python", |
|
|||
548 | "metadata": {}, |
|
|||
549 | "outputs": [] |
|
|||
550 | } |
|
538 | } | |
551 | ], |
|
539 | ], | |
552 | "metadata": {} |
|
540 | "metadata": {} | |
553 | } |
|
541 | } | |
554 | ] |
|
542 | ] | |
555 | } No newline at end of file |
|
543 | } |
@@ -1,475 +1,487 b'' | |||||
1 | { |
|
1 | { | |
2 | "metadata": { |
|
2 | "metadata": { | |
3 |
"name": " |
|
3 | "name": "" | |
4 | }, |
|
4 | }, | |
5 | "nbformat": 3, |
|
5 | "nbformat": 3, | |
6 | "nbformat_minor": 0, |
|
6 | "nbformat_minor": 0, | |
7 | "worksheets": [ |
|
7 | "worksheets": [ | |
8 | { |
|
8 | { | |
9 | "cells": [ |
|
9 | "cells": [ | |
10 | { |
|
10 | { | |
11 | "cell_type": "heading", |
|
11 | "cell_type": "heading", | |
12 | "level": 1, |
|
12 | "level": 1, | |
13 | "metadata": {}, |
|
13 | "metadata": {}, | |
14 | "source": [ |
|
14 | "source": [ | |
15 | "Using Parallel Magics" |
|
15 | "Using Parallel Magics" | |
16 | ] |
|
16 | ] | |
17 | }, |
|
17 | }, | |
18 | { |
|
18 | { | |
19 | "cell_type": "markdown", |
|
19 | "cell_type": "markdown", | |
20 | "metadata": {}, |
|
20 | "metadata": {}, | |
21 | "source": [ |
|
21 | "source": [ | |
22 | "IPython has a few magics for working with your engines.\n", |
|
22 | "IPython has a few magics for working with your engines.\n", | |
23 | "\n", |
|
23 | "\n", | |
24 | "This assumes you have started an IPython cluster, either with the notebook interface,\n", |
|
24 | "This assumes you have started an IPython cluster, either with the notebook interface,\n", | |
25 | "or the `ipcluster/controller/engine` commands." |
|
25 | "or the `ipcluster/controller/engine` commands." | |
26 | ] |
|
26 | ] | |
27 | }, |
|
27 | }, | |
28 | { |
|
28 | { | |
29 | "cell_type": "code", |
|
29 | "cell_type": "code", | |
30 | "collapsed": false, |
|
30 | "collapsed": false, | |
31 | "input": [ |
|
31 | "input": [ | |
32 | "from IPython import parallel\n", |
|
32 | "from IPython import parallel\n", | |
33 | "rc = parallel.Client()\n", |
|
33 | "rc = parallel.Client()\n", | |
34 | "dv = rc[:]\n", |
|
34 | "dv = rc[:]\n", | |
35 | "rc.ids" |
|
35 | "rc.ids" | |
36 | ], |
|
36 | ], | |
37 | "language": "python", |
|
37 | "language": "python", | |
38 | "metadata": {}, |
|
38 | "metadata": {}, | |
39 | "outputs": [] |
|
39 | "outputs": [] | |
40 | }, |
|
40 | }, | |
41 | { |
|
41 | { | |
42 | "cell_type": "markdown", |
|
42 | "cell_type": "markdown", | |
43 | "metadata": {}, |
|
43 | "metadata": {}, | |
44 | "source": [ |
|
44 | "source": [ | |
45 | "Creating a Client registers the parallel magics `%px`, `%%px`, `%pxresult`, `pxconfig`, and `%autopx`. \n", |
|
45 | "Creating a Client registers the parallel magics `%px`, `%%px`, `%pxresult`, `pxconfig`, and `%autopx`. \n", | |
46 | "These magics are initially associated with a DirectView always associated with all currently registered engines." |
|
46 | "These magics are initially associated with a DirectView always associated with all currently registered engines." | |
47 | ] |
|
47 | ] | |
48 | }, |
|
48 | }, | |
49 | { |
|
49 | { | |
50 | "cell_type": "markdown", |
|
50 | "cell_type": "markdown", | |
51 | "metadata": {}, |
|
51 | "metadata": {}, | |
52 | "source": [ |
|
52 | "source": [ | |
53 | "Now we can execute code remotely with `%px`:" |
|
53 | "Now we can execute code remotely with `%px`:" | |
54 | ] |
|
54 | ] | |
55 | }, |
|
55 | }, | |
56 | { |
|
56 | { | |
57 | "cell_type": "code", |
|
57 | "cell_type": "code", | |
58 | "collapsed": false, |
|
58 | "collapsed": false, | |
59 | "input": [ |
|
59 | "input": [ | |
60 | "%px a=5" |
|
60 | "%px a=5" | |
61 | ], |
|
61 | ], | |
62 | "language": "python", |
|
62 | "language": "python", | |
63 | "metadata": {}, |
|
63 | "metadata": {}, | |
64 | "outputs": [] |
|
64 | "outputs": [] | |
65 | }, |
|
65 | }, | |
66 | { |
|
66 | { | |
67 | "cell_type": "code", |
|
67 | "cell_type": "code", | |
68 | "collapsed": false, |
|
68 | "collapsed": false, | |
69 | "input": [ |
|
69 | "input": [ | |
70 | "%px print a" |
|
70 | "%px print a" | |
71 | ], |
|
71 | ], | |
72 | "language": "python", |
|
72 | "language": "python", | |
73 | "metadata": {}, |
|
73 | "metadata": {}, | |
74 | "outputs": [] |
|
74 | "outputs": [] | |
75 | }, |
|
75 | }, | |
76 | { |
|
76 | { | |
77 | "cell_type": "code", |
|
77 | "cell_type": "code", | |
78 | "collapsed": false, |
|
78 | "collapsed": false, | |
79 | "input": [ |
|
79 | "input": [ | |
80 | "%px a" |
|
80 | "%px a" | |
81 | ], |
|
81 | ], | |
82 | "language": "python", |
|
82 | "language": "python", | |
83 | "metadata": {}, |
|
83 | "metadata": {}, | |
84 | "outputs": [] |
|
84 | "outputs": [] | |
85 | }, |
|
85 | }, | |
86 | { |
|
86 | { | |
87 | "cell_type": "code", |
|
87 | "cell_type": "code", | |
88 | "collapsed": false, |
|
88 | "collapsed": false, | |
89 | "input": [ |
|
89 | "input": [ | |
90 | "with dv.sync_imports():\n", |
|
90 | "with dv.sync_imports():\n", | |
91 | " import sys" |
|
91 | " import sys" | |
92 | ], |
|
92 | ], | |
93 | "language": "python", |
|
93 | "language": "python", | |
94 | "metadata": {}, |
|
94 | "metadata": {}, | |
95 | "outputs": [] |
|
95 | "outputs": [] | |
96 | }, |
|
96 | }, | |
97 | { |
|
97 | { | |
98 | "cell_type": "code", |
|
98 | "cell_type": "code", | |
99 | "collapsed": false, |
|
99 | "collapsed": false, | |
100 | "input": [ |
|
100 | "input": [ | |
101 | "%px print >> sys.stderr, \"ERROR\"" |
|
101 | "%px print >> sys.stderr, \"ERROR\"" | |
102 | ], |
|
102 | ], | |
103 | "language": "python", |
|
103 | "language": "python", | |
104 | "metadata": {}, |
|
104 | "metadata": {}, | |
105 | "outputs": [] |
|
105 | "outputs": [] | |
106 | }, |
|
106 | }, | |
107 | { |
|
107 | { | |
108 | "cell_type": "markdown", |
|
108 | "cell_type": "markdown", | |
109 | "metadata": {}, |
|
109 | "metadata": {}, | |
110 | "source": [ |
|
110 | "source": [ | |
111 | "You don't have to wait for results. The `%pxconfig` magic lets you change the default blocking/targets for the `%px` magics:" |
|
111 | "You don't have to wait for results. The `%pxconfig` magic lets you change the default blocking/targets for the `%px` magics:" | |
112 | ] |
|
112 | ] | |
113 | }, |
|
113 | }, | |
114 | { |
|
114 | { | |
115 | "cell_type": "code", |
|
115 | "cell_type": "code", | |
116 | "collapsed": false, |
|
116 | "collapsed": false, | |
117 | "input": [ |
|
117 | "input": [ | |
118 | "%pxconfig --noblock" |
|
118 | "%pxconfig --noblock" | |
119 | ], |
|
119 | ], | |
120 | "language": "python", |
|
120 | "language": "python", | |
121 | "metadata": {}, |
|
121 | "metadata": {}, | |
122 | "outputs": [] |
|
122 | "outputs": [] | |
123 | }, |
|
123 | }, | |
124 | { |
|
124 | { | |
125 | "cell_type": "code", |
|
125 | "cell_type": "code", | |
126 | "collapsed": false, |
|
126 | "collapsed": false, | |
127 | "input": [ |
|
127 | "input": [ | |
128 | "%px import time\n", |
|
128 | "%px import time\n", | |
129 | "%px time.sleep(5)\n", |
|
129 | "%px time.sleep(5)\n", | |
130 | "%px time.time()" |
|
130 | "%px time.time()" | |
131 | ], |
|
131 | ], | |
132 | "language": "python", |
|
132 | "language": "python", | |
133 | "metadata": {}, |
|
133 | "metadata": {}, | |
134 | "outputs": [] |
|
134 | "outputs": [] | |
135 | }, |
|
135 | }, | |
136 | { |
|
136 | { | |
137 | "cell_type": "markdown", |
|
137 | "cell_type": "markdown", | |
138 | "metadata": {}, |
|
138 | "metadata": {}, | |
139 | "source": [ |
|
139 | "source": [ | |
140 | "But you will notice that this didn't output the result of the last command.\n", |
|
140 | "But you will notice that this didn't output the result of the last command.\n", | |
141 | "For this, we have `%pxresult`, which displays the output of the latest request:" |
|
141 | "For this, we have `%pxresult`, which displays the output of the latest request:" | |
142 | ] |
|
142 | ] | |
143 | }, |
|
143 | }, | |
144 | { |
|
144 | { | |
145 | "cell_type": "code", |
|
145 | "cell_type": "code", | |
146 | "collapsed": false, |
|
146 | "collapsed": false, | |
147 | "input": [ |
|
147 | "input": [ | |
148 | "%pxresult" |
|
148 | "%pxresult" | |
149 | ], |
|
149 | ], | |
150 | "language": "python", |
|
150 | "language": "python", | |
151 | "metadata": {}, |
|
151 | "metadata": {}, | |
152 | "outputs": [] |
|
152 | "outputs": [] | |
153 | }, |
|
153 | }, | |
154 | { |
|
154 | { | |
155 | "cell_type": "markdown", |
|
155 | "cell_type": "markdown", | |
156 | "metadata": {}, |
|
156 | "metadata": {}, | |
157 | "source": [ |
|
157 | "source": [ | |
158 | "Remember, an IPython engine is IPython, so you can do magics remotely as well!" |
|
158 | "Remember, an IPython engine is IPython, so you can do magics remotely as well!" | |
159 | ] |
|
159 | ] | |
160 | }, |
|
160 | }, | |
161 | { |
|
161 | { | |
162 | "cell_type": "code", |
|
162 | "cell_type": "code", | |
163 | "collapsed": false, |
|
163 | "collapsed": false, | |
164 | "input": [ |
|
164 | "input": [ | |
165 | "%pxconfig --block\n", |
|
165 | "%pxconfig --block\n", | |
166 |
"%px % |
|
166 | "%px %matplotlib inline" | |
|
167 | ], | |||
|
168 | "language": "python", | |||
|
169 | "metadata": {}, | |||
|
170 | "outputs": [] | |||
|
171 | }, | |||
|
172 | { | |||
|
173 | "cell_type": "code", | |||
|
174 | "collapsed": false, | |||
|
175 | "input": [ | |||
|
176 | "%%px\n", | |||
|
177 | "import numpy as np\n", | |||
|
178 | "import matplotlib.pyplot as plt" | |||
167 | ], |
|
179 | ], | |
168 | "language": "python", |
|
180 | "language": "python", | |
169 | "metadata": {}, |
|
181 | "metadata": {}, | |
170 | "outputs": [] |
|
182 | "outputs": [] | |
171 | }, |
|
183 | }, | |
172 | { |
|
184 | { | |
173 | "cell_type": "markdown", |
|
185 | "cell_type": "markdown", | |
174 | "metadata": {}, |
|
186 | "metadata": {}, | |
175 | "source": [ |
|
187 | "source": [ | |
176 | "`%%px` can also be used as a cell magic, for submitting whole blocks.\n", |
|
188 | "`%%px` can also be used as a cell magic, for submitting whole blocks.\n", | |
177 | "This one acceps `--block` and `--noblock` flags to specify\n", |
|
189 | "This one acceps `--block` and `--noblock` flags to specify\n", | |
178 | "the blocking behavior, though the default is unchanged.\n" |
|
190 | "the blocking behavior, though the default is unchanged.\n" | |
179 | ] |
|
191 | ] | |
180 | }, |
|
192 | }, | |
181 | { |
|
193 | { | |
182 | "cell_type": "code", |
|
194 | "cell_type": "code", | |
183 | "collapsed": false, |
|
195 | "collapsed": false, | |
184 | "input": [ |
|
196 | "input": [ | |
185 | "dv.scatter('id', dv.targets, flatten=True)\n", |
|
197 | "dv.scatter('id', dv.targets, flatten=True)\n", | |
186 | "dv['stride'] = len(dv)" |
|
198 | "dv['stride'] = len(dv)" | |
187 | ], |
|
199 | ], | |
188 | "language": "python", |
|
200 | "language": "python", | |
189 | "metadata": {}, |
|
201 | "metadata": {}, | |
190 | "outputs": [] |
|
202 | "outputs": [] | |
191 | }, |
|
203 | }, | |
192 | { |
|
204 | { | |
193 | "cell_type": "code", |
|
205 | "cell_type": "code", | |
194 | "collapsed": false, |
|
206 | "collapsed": false, | |
195 | "input": [ |
|
207 | "input": [ | |
196 | "%%px --noblock\n", |
|
208 | "%%px --noblock\n", | |
197 | "x = linspace(0,pi,1000)\n", |
|
209 | "x = np.linspace(0,np.pi,1000)\n", | |
198 | "for n in range(id,12, stride):\n", |
|
210 | "for n in range(id,12, stride):\n", | |
199 | " print n\n", |
|
211 | " print n\n", | |
200 | " plt.plot(x,sin(n*x))\n", |
|
212 | " plt.plot(x,np.sin(n*x))\n", | |
201 | "plt.title(\"Plot %i\" % id)" |
|
213 | "plt.title(\"Plot %i\" % id)" | |
202 | ], |
|
214 | ], | |
203 | "language": "python", |
|
215 | "language": "python", | |
204 | "metadata": {}, |
|
216 | "metadata": {}, | |
205 | "outputs": [] |
|
217 | "outputs": [] | |
206 | }, |
|
218 | }, | |
207 | { |
|
219 | { | |
208 | "cell_type": "code", |
|
220 | "cell_type": "code", | |
209 | "collapsed": false, |
|
221 | "collapsed": false, | |
210 | "input": [ |
|
222 | "input": [ | |
211 | "%pxresult" |
|
223 | "%pxresult" | |
212 | ], |
|
224 | ], | |
213 | "language": "python", |
|
225 | "language": "python", | |
214 | "metadata": {}, |
|
226 | "metadata": {}, | |
215 | "outputs": [] |
|
227 | "outputs": [] | |
216 | }, |
|
228 | }, | |
217 | { |
|
229 | { | |
218 | "cell_type": "markdown", |
|
230 | "cell_type": "markdown", | |
219 | "metadata": {}, |
|
231 | "metadata": {}, | |
220 | "source": [ |
|
232 | "source": [ | |
221 | "It also lets you choose some amount of the grouping of the outputs with `--group-outputs`:\n", |
|
233 | "It also lets you choose some amount of the grouping of the outputs with `--group-outputs`:\n", | |
222 | "\n", |
|
234 | "\n", | |
223 | "The choices are:\n", |
|
235 | "The choices are:\n", | |
224 | "\n", |
|
236 | "\n", | |
225 | "* `engine` - all of an engine's output is collected together\n", |
|
237 | "* `engine` - all of an engine's output is collected together\n", | |
226 | "* `type` - where stdout of each engine is grouped, etc. (the default)\n", |
|
238 | "* `type` - where stdout of each engine is grouped, etc. (the default)\n", | |
227 | "* `order` - same as `type`, but individual displaypub outputs are interleaved.\n", |
|
239 | "* `order` - same as `type`, but individual displaypub outputs are interleaved.\n", | |
228 | " That is, it will output the first plot from each engine, then the second from each,\n", |
|
240 | " That is, it will output the first plot from each engine, then the second from each,\n", | |
229 | " etc." |
|
241 | " etc." | |
230 | ] |
|
242 | ] | |
231 | }, |
|
243 | }, | |
232 | { |
|
244 | { | |
233 | "cell_type": "code", |
|
245 | "cell_type": "code", | |
234 | "collapsed": false, |
|
246 | "collapsed": false, | |
235 | "input": [ |
|
247 | "input": [ | |
236 | "%%px --group-outputs=engine\n", |
|
248 | "%%px --group-outputs=engine\n", | |
237 | "x = linspace(0,pi,1000)\n", |
|
249 | "x = np.linspace(0,np.pi,1000)\n", | |
238 | "for n in range(id+1,12, stride):\n", |
|
250 | "for n in range(id+1,12, stride):\n", | |
239 | " print n\n", |
|
251 | " print n\n", | |
240 | " plt.figure()\n", |
|
252 | " plt.figure()\n", | |
241 | " plt.plot(x,sin(n*x))\n", |
|
253 | " plt.plot(x,np.sin(n*x))\n", | |
242 | " plt.title(\"Plot %i\" % n)" |
|
254 | " plt.title(\"Plot %i\" % n)" | |
243 | ], |
|
255 | ], | |
244 | "language": "python", |
|
256 | "language": "python", | |
245 | "metadata": {}, |
|
257 | "metadata": {}, | |
246 | "outputs": [] |
|
258 | "outputs": [] | |
247 | }, |
|
259 | }, | |
248 | { |
|
260 | { | |
249 | "cell_type": "markdown", |
|
261 | "cell_type": "markdown", | |
250 | "metadata": {}, |
|
262 | "metadata": {}, | |
251 | "source": [ |
|
263 | "source": [ | |
252 | "When you specify 'order', then individual display outputs (e.g. plots) will be interleaved.\n", |
|
264 | "When you specify 'order', then individual display outputs (e.g. plots) will be interleaved.\n", | |
253 | "\n", |
|
265 | "\n", | |
254 | "`%pxresult` takes the same output-ordering arguments as `%%px`, \n", |
|
266 | "`%pxresult` takes the same output-ordering arguments as `%%px`, \n", | |
255 | "so you can view the previous result in a variety of different ways with a few sequential calls to `%pxresult`:" |
|
267 | "so you can view the previous result in a variety of different ways with a few sequential calls to `%pxresult`:" | |
256 | ] |
|
268 | ] | |
257 | }, |
|
269 | }, | |
258 | { |
|
270 | { | |
259 | "cell_type": "code", |
|
271 | "cell_type": "code", | |
260 | "collapsed": false, |
|
272 | "collapsed": false, | |
261 | "input": [ |
|
273 | "input": [ | |
262 | "%pxresult --group-outputs=order" |
|
274 | "%pxresult --group-outputs=order" | |
263 | ], |
|
275 | ], | |
264 | "language": "python", |
|
276 | "language": "python", | |
265 | "metadata": {}, |
|
277 | "metadata": {}, | |
266 | "outputs": [] |
|
278 | "outputs": [] | |
267 | }, |
|
279 | }, | |
268 | { |
|
280 | { | |
269 | "cell_type": "heading", |
|
281 | "cell_type": "heading", | |
270 | "level": 2, |
|
282 | "level": 2, | |
271 | "metadata": {}, |
|
283 | "metadata": {}, | |
272 | "source": [ |
|
284 | "source": [ | |
273 | "Single-engine views" |
|
285 | "Single-engine views" | |
274 | ] |
|
286 | ] | |
275 | }, |
|
287 | }, | |
276 | { |
|
288 | { | |
277 | "cell_type": "markdown", |
|
289 | "cell_type": "markdown", | |
278 | "metadata": {}, |
|
290 | "metadata": {}, | |
279 | "source": [ |
|
291 | "source": [ | |
280 | "When a DirectView has a single target, the output is a bit simpler (no prefixes on stdout/err, etc.):" |
|
292 | "When a DirectView has a single target, the output is a bit simpler (no prefixes on stdout/err, etc.):" | |
281 | ] |
|
293 | ] | |
282 | }, |
|
294 | }, | |
283 | { |
|
295 | { | |
284 | "cell_type": "code", |
|
296 | "cell_type": "code", | |
285 | "collapsed": false, |
|
297 | "collapsed": false, | |
286 | "input": [ |
|
298 | "input": [ | |
287 | "def generate_output():\n", |
|
299 | "def generate_output():\n", | |
288 | " \"\"\"function for testing output\n", |
|
300 | " \"\"\"function for testing output\n", | |
289 | " \n", |
|
301 | " \n", | |
290 | " publishes two outputs of each type, and returns something\n", |
|
302 | " publishes two outputs of each type, and returns something\n", | |
291 | " \"\"\"\n", |
|
303 | " \"\"\"\n", | |
292 | " \n", |
|
304 | " \n", | |
293 | " import sys,os\n", |
|
305 | " import sys,os\n", | |
294 |
" from IPython. |
|
306 | " from IPython.display import display, HTML, Math\n", | |
295 | " \n", |
|
307 | " \n", | |
296 | " print \"stdout\"\n", |
|
308 | " print \"stdout\"\n", | |
297 | " print >> sys.stderr, \"stderr\"\n", |
|
309 | " print >> sys.stderr, \"stderr\"\n", | |
298 | " \n", |
|
310 | " \n", | |
299 | " display(HTML(\"<b>HTML</b>\"))\n", |
|
311 | " display(HTML(\"<b>HTML</b>\"))\n", | |
300 | " \n", |
|
312 | " \n", | |
301 | " print \"stdout2\"\n", |
|
313 | " print \"stdout2\"\n", | |
302 | " print >> sys.stderr, \"stderr2\"\n", |
|
314 | " print >> sys.stderr, \"stderr2\"\n", | |
303 | " \n", |
|
315 | " \n", | |
304 | " display(Math(r\"\\alpha=\\beta\"))\n", |
|
316 | " display(Math(r\"\\alpha=\\beta\"))\n", | |
305 | " \n", |
|
317 | " \n", | |
306 | " return os.getpid()\n", |
|
318 | " return os.getpid()\n", | |
307 | "\n", |
|
319 | "\n", | |
308 | "dv['generate_output'] = generate_output" |
|
320 | "dv['generate_output'] = generate_output" | |
309 | ], |
|
321 | ], | |
310 | "language": "python", |
|
322 | "language": "python", | |
311 | "metadata": {}, |
|
323 | "metadata": {}, | |
312 | "outputs": [] |
|
324 | "outputs": [] | |
313 | }, |
|
325 | }, | |
314 | { |
|
326 | { | |
315 | "cell_type": "markdown", |
|
327 | "cell_type": "markdown", | |
316 | "metadata": {}, |
|
328 | "metadata": {}, | |
317 | "source": [ |
|
329 | "source": [ | |
318 | "You can also have more than one set of parallel magics registered at a time.\n", |
|
330 | "You can also have more than one set of parallel magics registered at a time.\n", | |
319 | "\n", |
|
331 | "\n", | |
320 | "The `View.activate()` method takes a suffix argument, which is added to `'px'`." |
|
332 | "The `View.activate()` method takes a suffix argument, which is added to `'px'`." | |
321 | ] |
|
333 | ] | |
322 | }, |
|
334 | }, | |
323 | { |
|
335 | { | |
324 | "cell_type": "code", |
|
336 | "cell_type": "code", | |
325 | "collapsed": false, |
|
337 | "collapsed": false, | |
326 | "input": [ |
|
338 | "input": [ | |
327 | "e0 = rc[-1]\n", |
|
339 | "e0 = rc[-1]\n", | |
328 | "e0.block = True\n", |
|
340 | "e0.block = True\n", | |
329 | "e0.activate('0')" |
|
341 | "e0.activate('0')" | |
330 | ], |
|
342 | ], | |
331 | "language": "python", |
|
343 | "language": "python", | |
332 | "metadata": {}, |
|
344 | "metadata": {}, | |
333 | "outputs": [] |
|
345 | "outputs": [] | |
334 | }, |
|
346 | }, | |
335 | { |
|
347 | { | |
336 | "cell_type": "code", |
|
348 | "cell_type": "code", | |
337 | "collapsed": false, |
|
349 | "collapsed": false, | |
338 | "input": [ |
|
350 | "input": [ | |
339 | "%px0 generate_output()" |
|
351 | "%px0 generate_output()" | |
340 | ], |
|
352 | ], | |
341 | "language": "python", |
|
353 | "language": "python", | |
342 | "metadata": {}, |
|
354 | "metadata": {}, | |
343 | "outputs": [] |
|
355 | "outputs": [] | |
344 | }, |
|
356 | }, | |
345 | { |
|
357 | { | |
346 | "cell_type": "code", |
|
358 | "cell_type": "code", | |
347 | "collapsed": false, |
|
359 | "collapsed": false, | |
348 | "input": [ |
|
360 | "input": [ | |
349 | "%px generate_output()" |
|
361 | "%px generate_output()" | |
350 | ], |
|
362 | ], | |
351 | "language": "python", |
|
363 | "language": "python", | |
352 | "metadata": {}, |
|
364 | "metadata": {}, | |
353 | "outputs": [] |
|
365 | "outputs": [] | |
354 | }, |
|
366 | }, | |
355 | { |
|
367 | { | |
356 | "cell_type": "markdown", |
|
368 | "cell_type": "markdown", | |
357 | "metadata": {}, |
|
369 | "metadata": {}, | |
358 | "source": [ |
|
370 | "source": [ | |
359 | "As mentioned above, we can redisplay those same results with various grouping:" |
|
371 | "As mentioned above, we can redisplay those same results with various grouping:" | |
360 | ] |
|
372 | ] | |
361 | }, |
|
373 | }, | |
362 | { |
|
374 | { | |
363 | "cell_type": "code", |
|
375 | "cell_type": "code", | |
364 | "collapsed": false, |
|
376 | "collapsed": false, | |
365 | "input": [ |
|
377 | "input": [ | |
366 | "%pxresult --group-outputs order" |
|
378 | "%pxresult --group-outputs order" | |
367 | ], |
|
379 | ], | |
368 | "language": "python", |
|
380 | "language": "python", | |
369 | "metadata": {}, |
|
381 | "metadata": {}, | |
370 | "outputs": [] |
|
382 | "outputs": [] | |
371 | }, |
|
383 | }, | |
372 | { |
|
384 | { | |
373 | "cell_type": "code", |
|
385 | "cell_type": "code", | |
374 | "collapsed": false, |
|
386 | "collapsed": false, | |
375 | "input": [ |
|
387 | "input": [ | |
376 | "%pxresult --group-outputs engine" |
|
388 | "%pxresult --group-outputs engine" | |
377 | ], |
|
389 | ], | |
378 | "language": "python", |
|
390 | "language": "python", | |
379 | "metadata": {}, |
|
391 | "metadata": {}, | |
380 | "outputs": [] |
|
392 | "outputs": [] | |
381 | }, |
|
393 | }, | |
382 | { |
|
394 | { | |
383 | "cell_type": "heading", |
|
395 | "cell_type": "heading", | |
384 | "level": 2, |
|
396 | "level": 2, | |
385 | "metadata": {}, |
|
397 | "metadata": {}, | |
386 | "source": [ |
|
398 | "source": [ | |
387 | "Parallel Exceptions" |
|
399 | "Parallel Exceptions" | |
388 | ] |
|
400 | ] | |
389 | }, |
|
401 | }, | |
390 | { |
|
402 | { | |
391 | "cell_type": "markdown", |
|
403 | "cell_type": "markdown", | |
392 | "metadata": {}, |
|
404 | "metadata": {}, | |
393 | "source": [ |
|
405 | "source": [ | |
394 | "When you raise exceptions with the parallel exception,\n", |
|
406 | "When you raise exceptions with the parallel exception,\n", | |
395 | "the CompositeError raised locally will display your remote traceback." |
|
407 | "the CompositeError raised locally will display your remote traceback." | |
396 | ] |
|
408 | ] | |
397 | }, |
|
409 | }, | |
398 | { |
|
410 | { | |
399 | "cell_type": "code", |
|
411 | "cell_type": "code", | |
400 | "collapsed": false, |
|
412 | "collapsed": false, | |
401 | "input": [ |
|
413 | "input": [ | |
402 | "%%px\n", |
|
414 | "%%px\n", | |
403 | "from numpy.random import random\n", |
|
415 | "from numpy.random import random\n", | |
404 | "A = random((100,100,'invalid shape'))" |
|
416 | "A = random((100,100,'invalid shape'))" | |
405 | ], |
|
417 | ], | |
406 | "language": "python", |
|
418 | "language": "python", | |
407 | "metadata": {}, |
|
419 | "metadata": {}, | |
408 | "outputs": [] |
|
420 | "outputs": [] | |
409 | }, |
|
421 | }, | |
410 | { |
|
422 | { | |
411 | "cell_type": "heading", |
|
423 | "cell_type": "heading", | |
412 | "level": 2, |
|
424 | "level": 2, | |
413 | "metadata": {}, |
|
425 | "metadata": {}, | |
414 | "source": [ |
|
426 | "source": [ | |
415 | "Remote Cell Magics" |
|
427 | "Remote Cell Magics" | |
416 | ] |
|
428 | ] | |
417 | }, |
|
429 | }, | |
418 | { |
|
430 | { | |
419 | "cell_type": "markdown", |
|
431 | "cell_type": "markdown", | |
420 | "metadata": {}, |
|
432 | "metadata": {}, | |
421 | "source": [ |
|
433 | "source": [ | |
422 | "Remember, Engines are IPython too, so the cell that is run remotely by %%px can in turn use a cell magic." |
|
434 | "Remember, Engines are IPython too, so the cell that is run remotely by %%px can in turn use a cell magic." | |
423 | ] |
|
435 | ] | |
424 | }, |
|
436 | }, | |
425 | { |
|
437 | { | |
426 | "cell_type": "code", |
|
438 | "cell_type": "code", | |
427 | "collapsed": false, |
|
439 | "collapsed": false, | |
428 | "input": [ |
|
440 | "input": [ | |
429 | "%%px\n", |
|
441 | "%%px\n", | |
430 | "%%timeit\n", |
|
442 | "%%timeit\n", | |
431 | "from numpy.random import random\n", |
|
443 | "from numpy.random import random\n", | |
432 | "from numpy.linalg import norm\n", |
|
444 | "from numpy.linalg import norm\n", | |
433 | "A = random((100,100))\n", |
|
445 | "A = random((100,100))\n", | |
434 |
"norm(A, 2) |
|
446 | "norm(A, 2)" | |
435 | ], |
|
447 | ], | |
436 | "language": "python", |
|
448 | "language": "python", | |
437 | "metadata": {}, |
|
449 | "metadata": {}, | |
438 | "outputs": [] |
|
450 | "outputs": [] | |
439 | }, |
|
451 | }, | |
440 | { |
|
452 | { | |
441 | "cell_type": "heading", |
|
453 | "cell_type": "heading", | |
442 | "level": 2, |
|
454 | "level": 2, | |
443 | "metadata": {}, |
|
455 | "metadata": {}, | |
444 | "source": [ |
|
456 | "source": [ | |
445 | "Local Execution" |
|
457 | "Local Execution" | |
446 | ] |
|
458 | ] | |
447 | }, |
|
459 | }, | |
448 | { |
|
460 | { | |
449 | "cell_type": "markdown", |
|
461 | "cell_type": "markdown", | |
450 | "metadata": {}, |
|
462 | "metadata": {}, | |
451 | "source": [ |
|
463 | "source": [ | |
452 | "As of IPython 0.14, you can instruct `%%px` to also execute the cell locally.\n", |
|
464 | "As of IPython 0.14, you can instruct `%%px` to also execute the cell locally.\n", | |
453 | "This is useful for interactive definitions,\n", |
|
465 | "This is useful for interactive definitions,\n", | |
454 | "or if you want to load a data source everywhere,\n", |
|
466 | "or if you want to load a data source everywhere,\n", | |
455 | "not just on the engines." |
|
467 | "not just on the engines." | |
456 | ] |
|
468 | ] | |
457 | }, |
|
469 | }, | |
458 | { |
|
470 | { | |
459 | "cell_type": "code", |
|
471 | "cell_type": "code", | |
460 | "collapsed": false, |
|
472 | "collapsed": false, | |
461 | "input": [ |
|
473 | "input": [ | |
462 | "%%px --local\n", |
|
474 | "%%px --local\n", | |
463 | "import os\n", |
|
475 | "import os\n", | |
464 | "thispid = os.getpid()\n", |
|
476 | "thispid = os.getpid()\n", | |
465 | "print thispid" |
|
477 | "print thispid" | |
466 | ], |
|
478 | ], | |
467 | "language": "python", |
|
479 | "language": "python", | |
468 | "metadata": {}, |
|
480 | "metadata": {}, | |
469 | "outputs": [] |
|
481 | "outputs": [] | |
470 | } |
|
482 | } | |
471 | ], |
|
483 | ], | |
472 | "metadata": {} |
|
484 | "metadata": {} | |
473 | } |
|
485 | } | |
474 | ] |
|
486 | ] | |
475 | } No newline at end of file |
|
487 | } |
General Comments 0
You need to be logged in to leave comments.
Login now