Skip to content

Commit 01337ef

Browse files
committed
examples: Fix tutorial
1 parent 33083cc commit 01337ef

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

examples/userapi/02_apply.ipynb

+13-9
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,11 @@
142142
" 'y_m': 0,\n",
143143
" 'y_size': 4,\n",
144144
" 'y_M': 3,\n",
145-
" 'timers': <cparam 'P' (0x7fb0d0550918)>}"
145+
" 'h_x': 0.33333334,\n",
146+
" 'h_y': 0.33333334,\n",
147+
" 'o_x': 0.0,\n",
148+
" 'o_y': 0.0,\n",
149+
" 'timers': <cparam 'P' (0x7f3ce4f15110)>}"
146150
]
147151
},
148152
"execution_count": 5,
@@ -246,14 +250,14 @@
246250
"name": "stdout",
247251
"output_type": "stream",
248252
"text": [
249-
"OOB detected due to time_M=2\n"
253+
"OOB detected due to time_M=3\n"
250254
]
251255
}
252256
],
253257
"source": [
254258
"from devito.exceptions import InvalidArgument\n",
255259
"try:\n",
256-
" op.apply(time_M=2)\n",
260+
" op.apply(time_M=3)\n",
257261
"except InvalidArgument as e:\n",
258262
" print(e)"
259263
]
@@ -419,8 +423,8 @@
419423
{
420424
"data": {
421425
"text/plain": [
422-
"PerformanceSummary([('section0',\n",
423-
" PerfEntry(time=3e-06, gflopss=0.0, gpointss=0.0, oi=0.0, ops=0, itershapes=[]))])"
426+
"PerformanceSummary([(PerfKey(name='section0', rank=None),\n",
427+
" PerfEntry(time=1e-06, gflopss=0.0, gpointss=0.0, oi=0.0, ops=0, itershapes=[]))])"
424428
]
425429
},
426430
"execution_count": 14,
@@ -449,14 +453,14 @@
449453
"name": "stderr",
450454
"output_type": "stream",
451455
"text": [
452-
"Operator `Kernel` run in 0.00 s\n"
456+
"Operator `Kernel` ran in 0.01 s\n"
453457
]
454458
},
455459
{
456460
"data": {
457461
"text/plain": [
458-
"PerformanceSummary([('section0',\n",
459-
" PerfEntry(time=3e-06, gflopss=0.021333333333333333, gpointss=0.010666666666666666, oi=0.16666666666666666, ops=2, itershapes=[(2, 4, 4)]))])"
462+
"PerformanceSummary([(PerfKey(name='section0', rank=None),\n",
463+
" PerfEntry(time=1e-06, gflopss=0.064, gpointss=0.032, oi=0.16666666666666666, ops=2, itershapes=((2, 4, 4),)))])"
460464
]
461465
},
462466
"execution_count": 15,
@@ -527,7 +531,7 @@
527531
"name": "python",
528532
"nbconvert_exporter": "python",
529533
"pygments_lexer": "ipython3",
530-
"version": "3.6.8"
534+
"version": "3.10.12"
531535
}
532536
},
533537
"nbformat": 4,

0 commit comments

Comments
 (0)