-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathindex.html
1341 lines (1104 loc) · 37.3 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html>
<head>
<title>Next Generation HPC?</title>
<meta charset="utf-8">
<meta name="description" content="Next Generation HPC?">
<meta name="author" content="Jonathan Dursi">
<meta name="generator" content="slidify" />
<meta name="apple-mobile-web-app-capable" content="yes">
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<link rel="stylesheet" href="libraries/frameworks/io2012/css/default.css" media="all" >
<link rel="stylesheet" href="libraries/frameworks/io2012/css/phone.css"
media="only screen and (max-device-width: 480px)" >
<link rel="stylesheet" href="libraries/frameworks/io2012/css/slidify.css" >
<link rel="stylesheet" href="libraries/highlighters/highlight.js/css/tomorrow.css" />
<base target="_blank"> <!-- This amazingness opens all links in a new tab. -->
<!-- Grab CDN jQuery, fall back to local if offline -->
<script src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.7.min.js"></script>
<script>window.jQuery || document.write('<script src="libraries/widgets/quiz/js/jquery.js"><\/script>')</script>
<script data-main="libraries/frameworks/io2012/js/slides"
src="libraries/frameworks/io2012/js/require-1.0.8.min.js">
</script>
</head>
<body style="opacity: 0">
<slides class="layout-widescreen">
<!-- LOGO SLIDE -->
<slide class="title-slide segue nobackground">
<aside class="gdbar">
<img src="assets/img/oicr-trans.png">
</aside>
<hgroup class="auto-fadein">
<h1>Next Generation HPC?</h1>
<h2>Spark, Chapel, and TensorFlow</h2>
<p>Jonathan Dursi<br/>Scientific Associate/Software Engineer, Informatics and Biocomputing, OICR</p>
</hgroup>
<a href="https://github.com/ljdursi/Spark-Chapel-TF-UMich-2016/zipball/gh-pages" class="example">
Download
</a>
<article></article>
<footer class = 'license'>
<a href='http://creativecommons.org/licenses/by-nc-sa/3.0/'>
<img width = '80px' src = 'http://mirrors.creativecommons.org/presskit/buttons/88x31/png/by-nc-sa.png'>
</a>
</footer>
</slide>
<!-- SLIDES -->
<slide class="" id="slide-1" style="background:;">
<article data-timings="">
<style type="text/css">
.title-slide {
background-color: #EDEDED;
}
article p {
text-align:left;
}
p {
text-align:left;
}
ul li {
text-align:left;
}
img {
max-width: 90%;
max-height: 90%;
vertical-align: middle;
}
</style>
<script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.7.min.js"></script>
<script type="text/javascript">
$(function() {
$("p:has(img)").addClass('centered');
});
</script>
<h2>Exciting Time to be Doing Large-Scale Scientific Computing</h2>
<p>Large scale scientific computing, 1995-2005 (ish):</p>
<ul>
<li>~20 years of stability</li>
<li>Bunch of x86, MPI, ethernet or infiniband</li>
<li>No one outside of academia was much doing big number crunching</li>
</ul>
</article>
<!-- Presenter Notes -->
</slide>
<slide class="" id="slide-2" style="background:;">
<hgroup>
<h2>New Communities Make things Exciting!</h2>
</hgroup>
<article data-timings="">
<div style='float:left;width:48%;' class='centered'>
<ul>
<li>Internet-scale companies (Yahoo!, Google)</li>
<li>Very large-scale image processing</li>
<li>Machine learning:
<ul>
<li>Sparse linear algebra</li>
<li>k-d trees</li>
<li>Calculations on unstructured meshes (graphs)</li>
<li>Numerical optimization</li>
</ul></li>
<li>Building new frameworks</li>
</ul>
</div>
<div style='float:right;width:48%;'>
<p><img src="assets/img/new-communities.png" alt=""></p>
</div>
</article>
<!-- Presenter Notes -->
</slide>
<slide class="" id="slide-3" style="background:;">
<hgroup>
<h2>New Hardware Makes things Exciting!</h2>
</hgroup>
<article data-timings="">
<div style='float:left;width:48%;' class='centered'>
<ul>
<li>Now:
<ul>
<li>Large numbers of cores per socket</li>
<li>GPUs/Phis</li>
</ul></li>
<li>Next few years:
<ul>
<li>FPGA (Intel: Broadwell + Arria 10, shipping 2017)</li>
<li>Non-volatile Memory (external memory/out-of-core algorithms)</li>
</ul></li>
</ul>
</div>
<div style='float:right;width:48%;'>
<p><img src="assets/img/fpga.png" alt=""></p>
</div>
</article>
<!-- Presenter Notes -->
</slide>
<slide class="" id="slide-4" style="background:;">
<hgroup>
<h2>New Hardware Makes things Exciting?</h2>
</hgroup>
<article data-timings="">
<p><img src="assets/img/cray-stream-triad-1.png" alt=""></p>
</article>
<!-- Presenter Notes -->
</slide>
<slide class="" id="slide-5" style="background:;">
<hgroup>
<h2>New Hardware Makes things Exciting?</h2>
</hgroup>
<article data-timings="">
<p><img src="assets/img/cray-stream-triad-2.png" alt=""></p>
</article>
<!-- Presenter Notes -->
</slide>
<slide class="" id="slide-6" style="background:;">
<hgroup>
<h2>New Hardware Makes things Exciting?</h2>
</hgroup>
<article data-timings="">
<p><img src="assets/img/cray-stream-triad-3.png" alt=""></p>
</article>
<!-- Presenter Notes -->
</slide>
<slide class="" id="slide-7" style="background:;">
<hgroup>
<h2>Programming Time is More Precious Than Compute</h2>
</hgroup>
<article data-timings="">
<p><img src="assets/graphs/grad-student-vs-cpu/gradstudents-per-cpu.png" alt=""></p>
</article>
<!-- Presenter Notes -->
</slide>
<slide class="" id="slide-8" style="background:;">
<hgroup>
<h2>Programming Time is More Precious Than Compute</h2>
</hgroup>
<article data-timings="">
<div style='float:left;width:48%;' class='centered'>
<p>And this only becomes more pronounced with other trends which make scientific programming harder:</p>
<ul>
<li>New variations of hardware</li>
<li>New science demands: cutting edge models are more complex. An Astro example:
<ul>
<li>80s - gravity only N-body, galaxy-scale</li>
<li>90s - N-body, cosmological</li>
<li>00s - Hydrodynamics, cosmological</li>
<li>10s - Hydrodynamics + rad transport + cosmological</li>
</ul></li>
</ul>
</div>
<div style='float:right;width:48%;'>
<p><img src="assets/graphs/grad-student-vs-cpu/gradstudents-per-cpu.png" alt=""></p>
</div>
</article>
<!-- Presenter Notes -->
</slide>
<slide class="" id="slide-9" style="background:;">
<hgroup>
<h2>Things are currently harder than they have to be</h2>
</hgroup>
<article data-timings="">
<div style='float:left;width:48%;' class='centered'>
<p><em>Computational</em> scientists have learned a lot about <em>computer</em> science in the last 20+ years.</p>
<ul>
<li>Encapsulation</li>
<li>Higher level programming languages (<em>e.g.</em>, python-as-glue)</li>
<li>Code collaboration, sharing (github, etc)</li>
<li>Division of labour - more distinction between people who work on libraries and people who build software that implements a scientific model</li>
</ul>
</div>
<div style='float:right;width:48%;'>
<p><img src="assets/img/mpi-ex.png" alt=""></p>
</div>
</article>
<!-- Presenter Notes -->
</slide>
<slide class="" id="slide-10" style="background:;">
<hgroup>
<h2>We're programming at the transport layer...</h2>
</hgroup>
<article data-timings="">
<div style='float:left;width:48%;' class='centered'>
<p>But our frameworks are letting us down.</p>
<p>MPI, which has served us very well for >25 years, is 90+% low level. </p>
<ul>
<li>"Send 100 floats to task 7"</li>
<li>Close to a network-agnostic sockets API (So maybe network level)
<ul>
<li>But a sockets API where everyone's browser crashes if a web server goes down.</li>
</ul></li>
<li>Assumptions made to make it easy for scientists to directly program in make it very difficult to build general frameworks upon (new MPI-3 one-sided stuff being an honourable exception)</li>
</ul>
</div>
<div style='float:right;width:48%;'>
<p><img src="assets/img/osi-1.png" alt=""></p>
</div>
</article>
<!-- Presenter Notes -->
</slide>
<slide class="" id="slide-11" style="background:;">
<hgroup>
<h2>When we want to think about models, systems</h2>
</hgroup>
<article data-timings="">
<div style='float:left;width:48%;' class='centered'>
<p>Programming at that level is worse than just hard.</p>
<ul>
<li>Makes the code very resistant to change.</li>
<li>Changing how the data is distributed means completely rewriting every line of code that assumes the current distribution, communications pattern.</li>
<li>“I have an idea! I <em>think</em> it will speed up the code 25%! But it means rewriting 50,000 lines of code.”
<ul>
<li>#ExperimentsThatWillNeverHappen</li>
</ul></li>
<li>Makes it hard to take advantage of the opportunities new technologies present.</li>
</ul>
</div>
<div style='float:right;width:48%;'>
<p><img src="assets/img/osi-2.png" alt=""></p>
</div>
</article>
<!-- Presenter Notes -->
</slide>
<slide class="" id="slide-12" style="background:;">
<hgroup>
<h2>We know things can be better, from...</h2>
</hgroup>
<article data-timings="">
<p>There have been many projects from within scientific computing that have tried to provide a higher-level approach - most have not been wildly successful.</p>
<ul>
<li>Many were focussed to specifically on one kind of problem (HPF)</li>
<li>Or solved one research group's problems but people working in other areas weren't enthusiastic (Charm++)</li>
</ul>
<p>But new communties are reawakining these efforts with the sucesses they're having with their approaches.</p>
<p>And we know we can have <em>both</em> high performance and higher-level primitives from a parallel library I use pretty routinely. </p>
<p>It's called MPI.</p>
</article>
<!-- Presenter Notes -->
</slide>
<slide class="" id="slide-13" style="background:;">
<hgroup>
<h2>We know things can be better, from MPI</h2>
</hgroup>
<article data-timings="">
<div style='float:left;width:48%;' class='centered'>
<p><strong>Collective</strong> operations - scatter, gather, broadcast, or interleave data from all participating tasks.</p>
<p>Are implemented with:</p>
<ul>
<li>Linear sends</li>
<li>Binary trees</li>
<li>Split rings</li>
<li>Topology aware
...</li>
</ul>
<p>Make decisions about which to use size of communicator, size of message, etc without researcher intervention.</p>
<p>Can influence choice with implementation-dependant runtime options.</p>
</div>
<div style='float:right;width:48%;'>
<p><img src="assets/img/collectives.png" alt=""></p>
</div>
</article>
<!-- Presenter Notes -->
</slide>
<slide class="" id="slide-14" style="background:;">
<hgroup>
<h2>We know things can be better, from MPI</h2>
</hgroup>
<article data-timings="">
<div style='float:left;width:48%;' class='centered'>
<p><strong>Parallel I/O</strong> operations - interacting with a filesystem</p>
<p>Many high-level optimizations possible </p>
<ul>
<li>Data sieving</li>
<li>Two-phase I/O</li>
<li>File-system dependant optimizations</li>
</ul>
<p>Algorithmic decisions made at run time, with researcher only able to issue 'hints' as to behaviour</p>
</div>
<div style='float:right;width:48%;'>
<p><img src="assets/img/mpi-io.png" alt=""></p>
</div>
</article>
<!-- Presenter Notes -->
</slide>
<slide class="" id="slide-15" style="background:;">
<hgroup>
<h2>We know things can be better, from MPI</h2>
</hgroup>
<article data-timings="">
<p>These work <em>extremely</em> well.</p>
<p>Before available, how many researchers had to (poorly) re-implement these things themselves?</p>
<p>Nobody suggests now that researchers re-write them at low level “for best performance”.</p>
<p>Researchers constantly re-implementing mesh data exchanges, distributed-memory tree algorithms, etc. make no more sense.</p>
</article>
<!-- Presenter Notes -->
</slide>
<slide class="" id="slide-16" style="background:;">
<hgroup>
<h2>The Plan</h2>
</hgroup>
<article data-timings="">
<p>For the rest of our time together, will introduce you to three technologies - one from within HPC, two from without - that I think have promise:</p>
<ul>
<li>Chapel - an HPC PGAS language from Cray</li>
<li>Spark - a data-processing framework, originally out of UC Berkeley</li>
<li>TensorFlow - data processing for "deep learning", from Google</li>
</ul>
<p>All of these can be used for some HPC tasks now with the promise of much wider HPC relevance in the coming couple of years.</p>
</article>
<!-- Presenter Notes -->
</slide>
<slide class="segue dark" id="slide-17" style="background:;">
<hgroup>
<h2>Chapel: <a href="http://chapel.cray.com">http://chapel.cray.com</a></h2>
</hgroup>
<article data-timings="">
</article>
<!-- Presenter Notes -->
</slide>
<slide class="" id="slide-18" style="background:;">
<hgroup>
<h2>An Very Quick Intro to Chapel</h2>
</hgroup>
<article data-timings="">
<p>Chapel was one of several languages funded through DARPA HPCS (High Productivity Computing Systems)
project. Successor of <a href="http://research.cs.washington.edu/zpl/home/">ZPL</a>.</p>
<p>A PGAS language with global view; that is, code can be written as if there was only one thread (think OpenMP)</p>
<pre><code>config const m = 1000, alpha = 3.0;
const ProblemSpace = {1..m} dmapped Block({1..m});
var A, B, C: [ProblemSpace] real;
B = 2.0;
C = 3.0;
A = B + C;
</code></pre>
<p><code>$ ./a.out --numLocales=8 --m=50000</code></p>
</article>
<!-- Presenter Notes -->
</slide>
<slide class="" id="slide-19" style="background:;">
<hgroup>
<h2>Domain Maps</h2>
</hgroup>
<article data-timings="">
<p>Chapel, and ZPL before it:</p>
<ul>
<li>Separate the expression of the concurrency from that of the locality.</li>
<li>Encapsulate <em>layout</em> of data in a "Domain Map"</li>
<li>Express the currency directly in the code - programmer can take control</li>
<li>Allows "what ifs", different layouts of different variables.</li>
</ul>
</article>
<!-- Presenter Notes -->
</slide>
<slide class="" id="slide-20" style="background:;">
<hgroup>
<h2>Domain Maps</h2>
</hgroup>
<article data-timings="">
<p>What distinguishes Chapel from HPL (say) is that it has these maps for other structures - and user can supply domain maps:</p>
<p><img src="assets/img/domain-maps.png" alt=""></p>
<p><a href="http://chapel.cray.com/tutorials/SC09/Part4_CHAPEL.pdf">http://chapel.cray.com/tutorials/SC09/Part4_CHAPEL.pdf</a></p>
</article>
<!-- Presenter Notes -->
</slide>
<slide class="" id="slide-21" style="background:;">
<hgroup>
<h2>Playing with Chapel</h2>
</hgroup>
<article data-timings="">
<div style='float:left;width:48%;' class='centered'>
<p>There's a nascent Chapel REPL that you can use to familiarize yourself with the type system, etc,
but you can't do any real work with it yet; it's on the VM as <code>chpl-ipe</code>.</p>
</div>
<div style='float:right;width:48%;'>
<p><img src="assets/img/chpl-ipe.png" alt=""></p>
</div>
</article>
<!-- Presenter Notes -->
</slide>
<slide class="" id="slide-22" style="background:;">
<hgroup>
<h2>Jacobi</h2>
</hgroup>
<article data-timings="">
<p>Running the Jacobi example shows a standard stencil-on-regular grid calculation:</p>
<pre><code>$ cd ~/examples/chapel_examples
$ chpl jacobi.chpl -o jacobi
$ ./jacobi
Jacobi computation complete.
Delta is 9.92124e-06 (< epsilon = 1e-05)
# of iterations: 60
</code></pre>
</article>
<!-- Presenter Notes -->
</slide>
<slide class="" id="slide-23" style="background:;">
<hgroup>
<h2>Jacobi</h2>
</hgroup>
<article data-timings="">
<p><img src="assets/img/chpl-jacobi.png" alt=""></p>
</article>
<!-- Presenter Notes -->
</slide>
<slide class="" id="slide-24" style="background:;">
<hgroup>
<h2>Tree Walks</h2>
</hgroup>
<article data-timings="">
<p>Lots of things do stencils on fixed rectangular grids well; maybe more impressively, Chapel's concurrency primitives allow things like distributed tree walks simply, too:</p>
<p><img src="assets/img/chpl-tree.png" alt=""></p>
</article>
<!-- Presenter Notes -->
</slide>
<slide class="" id="slide-25" style="background:;">
<hgroup>
<h2>Chapel: Caveats</h2>
</hgroup>
<article data-timings="">
<ul>
<li>Compiler still quite slow</li>
<li>Domain maps are static, making (say) AMR a ways away.
<ul>
<li>(dynamic associative arrays would be a <em>huge</em> win in bioinformatics)</li>
</ul></li>
<li>Irregular domain maps are not as mature</li>
</ul>
<h2>Chapel: Pros</h2>
<ul>
<li>Growing community</li>
<li>Developers very interested in "onboarding" new projects</li>
<li>Open source, very portable</li>
<li>Using mature approach (PGAS) in interesting ways</li>
</ul>
</article>
<!-- Presenter Notes -->
</slide>
<slide class="segue dark" id="slide-26" style="background:;">
<hgroup>
<h2>Spark: <a href="http://spark.apache.com">http://spark.apache.com</a></h2>
</hgroup>
<article data-timings="">
</article>
<!-- Presenter Notes -->
</slide>
<slide class="" id="slide-27" style="background:;">
<hgroup>
<h2>A Very Quick Intro to Spark</h2>
</hgroup>
<article data-timings="">
<p>Spark is a "Big Data" technology originally out of the
<a href="https://amplab.cs.berkeley.edu">AMPLab at UC Berkeley</a> that is rapidly becoming extremely popular.</p>
<p><img src="assets/img/spark-interest.png" alt=""></p>
</article>
<!-- Presenter Notes -->
</slide>
<slide class="" id="slide-28" style="background:;">
<hgroup>
<h2>A Very Quick Intro to Spark</h2>
</hgroup>
<article data-timings="">
<p>Hadoop came out in ~2006 with MapReduce as a computational engine, which wasn't that useful for scientific computation.</p>
<ul>
<li>One pass through data</li>
<li>Going back to disk every iteration</li>
</ul>
<p>However, the ecosystem flourished, particularly around the Hadoop file system (HDFS) and new databases
and processing packages that grew up around it.</p>
</article>
<!-- Presenter Notes -->
</slide>
<slide class="" id="slide-29" style="background:;">
<hgroup>
<h2>A Very Quick Intro to Spark</h2>
</hgroup>
<article data-timings="">
<div style='float:left;width:48%;' class='centered'>
<p>Spark is in some ways "post-Hadoop"; it can happily interact with the Hadoop stack but doesn't require it.</p>
<p>Built around concept of resilient distributed datasets</p>
<ul>
<li>Tables of rows, distributed across the job, normally in-memory</li>
<li>Restricted to certain transformations - map, reduce, join, etc</li>
<li>Lineage kept</li>
<li>If a node fails, rows recalculated </li>
</ul>
</div>
<div style='float:right;width:48%;'>
<p><img src="assets/img/spark-rdd.png" alt=""></p>
</div>
</article>
<!-- Presenter Notes -->
</slide>
<slide class="" id="slide-30" style="background:;">
<hgroup>
<h2>More than just analytics</h2>
</hgroup>
<article data-timings="">
<p>Don't need to justify Spark for those analyzing large emounts of data:</p>
<ul>
<li>Already widely successful for large-scale data processing</li>
</ul>
<p>Want to show how close it is to being ready to use for more traditional
HPC applications, too, like simulation:</p>
<ul>
<li>Simulation is "data intensive", too.</li>
</ul>
</article>
<!-- Presenter Notes -->
</slide>
<slide class="" id="slide-31" style="background:;">
<hgroup>
<h2>Spark RDDs</h2>
</hgroup>
<article data-timings="">
<div style='float:left;width:48%;' class='centered'>
<p>Spark RDDs prove to be a very powerful abstraction.</p>
<p>Key-Value RDDs are a special case - a pair of values, first is key, second is value associated with.</p>
<p>Can easily use join, etc to bring all values associated with a key together:</p>
<ul>
<li>Like all terms that are contribute to a particular point</li>
</ul>
<p>Linda tuple spaces, which underly Gaussian.</p>
<p>Notebook: Spark 1 - diffusion</p>
</div>
<div style='float:right;width:48%;'>
<p><img src="assets/img/spark-rdds-diffusion.png" alt=""></p>
</div>
</article>
<!-- Presenter Notes -->
</slide>
<slide class="" id="slide-32" style="background:;">
<hgroup>
<h2>Spark execution graphs</h2>
</hgroup>
<article data-timings="">
<div style='float:left;width:48%;' class='centered'>
<p>Operations on Spark RDDs can be:</p>
<ul>
<li>Transformations, like map, filter, join...</li>
<li>Actions like collect, foreach, ..</li>
</ul>
<p>You boild a Spark computation by chaining together operations; but no data starts moving until part of the computation is materialized with an action.</p>
<p>Allows optimizations over the entire computation graph.</p>
</div>
<div style='float:right;width:48%;'>
<p><img src="assets/img/spark-rdd.png" alt=""></p>
</div>
</article>
<!-- Presenter Notes -->
</slide>
<slide class="" id="slide-33" style="background:;">
<hgroup>
<h2>Spark execution graphs</h2>
</hgroup>
<article data-timings="">
<p>So for instance here, nothing starts happening in earnest until the <code>plot_data()</code></p>
<pre><code> # Main loop: For each iteration,
# - calculate terms in the next step
# - and sum
for step in range(nsteps):
data = data.flatMap(stencil) \
.reduceByKey(lambda x, y:x+y)
# Plot final results in black
plot_data(data, usecolor='black')
</code></pre>
</article>
<!-- Presenter Notes -->
</slide>
<slide class="" id="slide-34" style="background:;">
<hgroup>
<h2>Spark Dataframes</h2>
</hgroup>
<article data-timings="">
<div style='float:left;width:48%;' class='centered'>
<p><img src="assets/img/spark-dataframes.png" alt=""></p>
</div>
<div style='float:right;width:48%;'>
<p>But RDDs are also building blocks.</p>
<p>Spark Data Frames are lists of columns, like pandas or R data frames.</p>
<p>Can use SQL-like queries to perform calculations. But this allows bringing the entire mature machinery of SQL query optimizers to bear, allowing further automated optimization of data movement, and computation.</p>
<p>Notebook: Spark 2 - data frames</p>
</div>
</article>
<!-- Presenter Notes -->
</slide>
<slide class="" id="slide-35" style="background:;">
<hgroup>
<h2>Spark Graphs - GraphX</h2>
</hgroup>
<article data-timings="">
<div style='float:left;width:48%;' class='centered'>
<p>Using RDDs, a graph library has also been implemented: GraphX.</p>
<p>Many interesting features, but for us: <a href="http://blog.acolyer.org/2015/05/26/pregel-a-system-for-large-scale-graph-processing/">Pregel</a>-like algorithms on graphs.</p>
<p>Nodes passes messages to their neighbours along edges.</p>
<p>Like MPI (BSP) on unstructured graphs!</p>
</div>
<div style='float:right;width:48%;'>
<p><img src="assets/img/graphx.png" alt=""></p>
</div>
</article>
<!-- Presenter Notes -->
</slide>
<slide class="" id="slide-36" style="background:;">
<hgroup>
<h2>Spark Graphs - GraphX</h2>
</hgroup>
<article data-timings="">
<div style='float:left;width:48%;' class='centered'>
<p>Maddeningly, graph algorithms are not yet fully available from Python - in particular, Pregel.</p>
<p>Can try to mock communications up along edges of an unstructured mesh, but unbelievably slow.</p>
<p>Still, gives a hint what's possible.</p>
</div>
<div style='float:right;width:48%;'>
<p><img src="assets/img/unstructured-mesh.png" alt=""></p>
<p>Notebook: Spark 3 - Unstructured Mesh</p>
</div>
</article>
<!-- Presenter Notes -->
</slide>
<slide class="" id="slide-37" style="background:;">
<hgroup>
<h2>Spark's Capabilities</h2>
</hgroup>
<article data-timings="">
<p>For data analysis, Spark is already there - like parallel R without the headaches and with a growing level of packages.</p>
<p>Lots of typical statstics + machine learning.</p>
<p>For traditional high performance computing, seems a little funny so far: Scalapack-style distributed block matricies are there, with things like PCA, but not linear solves! </p>
<p>Graph support will enable a lot of really interesting applications (Spark 2.x - this year?)</p>
<p>Very easy to set up a local Spark install on your laptop.</p>
</article>
<!-- Presenter Notes -->
</slide>
<slide class="" id="slide-38" style="background:;">
<hgroup>
<h2>Spark Cons</h2>
</hgroup>
<article data-timings="">
<p>JVM Based (Scala) means C/Python interoperability always fraught.</p>
<p>Not much support for high-performance interconnects (although that's coming from third parties - <a href="http://hibd.cse.ohio-state.edu">HiBD group at OSU</a>)</p>
<p>Very little explicit support for multicore yet, which leaves some performance on the ground.</p>
</article>
<!-- Presenter Notes -->
</slide>
<slide class="segue dark" id="slide-39" style="background:;">
<hgroup>
<h2>Tensorflow: <a href="http://tensorflow.org">http://tensorflow.org</a></h2>
</hgroup>
<article data-timings="">
</article>
<!-- Presenter Notes -->
</slide>
<slide class="" id="slide-40" style="background:;">
<hgroup>
<h2>A Quick Intro to TensorFlow</h2>
</hgroup>
<article data-timings="">
<div style='float:left;width:48%;' class='centered'>
<p>TensorFlow is an open-source dataflow for numerical computation with dataflow graphs, where the data is always in the form of tensors (n-d arrays).</p>
<p>From Google, who uses it for machine learning.</p>
<p>Heavy number crunching, can use GPUs or CPUs, and will distribute tasks of a complex workflow across resources.</p>
<p>(Current version only has initial support for distributed; taking longer to de-google the distributed part than anticipated)</p>
</div>
<div style='float:right;width:48%;'>
<p><img src="assets/img/tensors_flowing.gif" alt=""></p>
<p><a href="http://www.tensorflow.org">http://www.tensorflow.org</a></p>
</div>
</article>
<!-- Presenter Notes -->
</slide>
<slide class="" id="slide-41" style="background:;">
<hgroup>
<h2>TensorFlow Graphs</h2>
</hgroup>
<article data-timings="">
<div style='float:left;width:48%;' class='centered'>
<p>As an example of how a computation is set up, here is a linear regression example.</p>
<p>Linear regression is already built in, and doesn't need to be iterative, but this example is quite general and shows how it works.</p>
<p>Variables are explicitly introduced to the TensorFlow runtime, and a series of transformations on the
variables are defined.</p>
<p>When the entire flowgraph is set up, the system can be run.</p>
<p>The integration of tensorflow tensors and numpy arrays is very nice.</p>
</div>
<div style='float:right;width:48%;'>
<p><img src="assets/img/tf_regression_code.png" alt="">
<img src="assets/img/tf_regression_fit.png" alt=""></p>
</div>
</article>
<!-- Presenter Notes -->
</slide>
<slide class="" id="slide-42" style="background:;">
<hgroup>
<h2>TensorFlow Mandelbrot</h2>
</hgroup>
<article data-timings="">
<div style='float:left;width:48%;' class='centered'>
<p>All sorts of computations on regular arrays can be performed.</p>
<p>Some computations can be split across GPUs, or (eventually) even nodes.</p>
<p>All are multi-threaded.</p>
</div>
<div style='float:right;width:48%;'>
<p><img src="assets/img/tf_mandelbrot.png" alt=""></p>
</div>
</article>
<!-- Presenter Notes -->
</slide>
<slide class="" id="slide-43" style="background:;">
<hgroup>
<h2>TensorFlow Wave Equation</h2>
</hgroup>
<article data-timings="">
<div style='float:left;width:48%;' class='centered'>
<p>All sorts of computations on regular arrays can be performed.</p>
<p>Some computations can be split across GPUs, or (eventually) even nodes.</p>
<p>All are multi-threaded.</p>
</div>
<div style='float:right;width:48%;'>
<p><img src="assets/img/tf_wave_eqn.png" alt=""></p>
</div>
</article>
<!-- Presenter Notes -->
</slide>
<slide class="" id="slide-44" style="background:;">
<hgroup>
<h2>TensorFlow: Caveats</h2>
</hgroup>
<article data-timings="">
<ul>
<li>Tensors only means limited support for, eg, unstructured meshes, hash tables (bioinformatics)</li>
<li>Distribution of work remains limited and manual (but is expected to improve - Google uses this)</li>
</ul>
<h2>TensorFlow: Pros</h2>
<ul>
<li>C++ - interfacing is much simpler than </li>
<li>Fast</li>
<li>GPU, CPU support, not unreasonble to expect Phi support shortly</li>
<li>Great for data processing, image processing, or computations on n-d arrays</li>
</ul>