WEBVTT 1 00:06:47.788 --> 00:06:50.999 Okay, good afternoon parallel people. 2 00:06:50.999 --> 00:06:59.338 So, this is class 16, March, 22nd, 2021 and my universal question. 3 00:06:59.338 --> 00:07:08.519 Can you hear me thank you, Blaine. Isaac so. 4 00:07:08.519 --> 00:07:13.528 What's happening today as I get to shut up and several of you get to talk. 5 00:07:13.528 --> 00:07:25.079 And then if there's time, and we're still bored, then do a little more thrashed other than that goal through Thursday. Okay. 6 00:07:25.079 --> 00:07:34.408 So, I mean, the order I've got here recently, Connor, would you like to tell us about clouds and Docker and so on. 7 00:07:36.869 --> 00:07:40.798 Silence. 8 00:07:51.509 --> 00:07:59.879 Not there connor's not around um. 9 00:07:59.879 --> 00:08:08.309 Having Internet problems okay, the other tubes are clogged up Joseph. 10 00:08:08.309 --> 00:08:11.668 Sure, I'd like to tell us about open. 11 00:08:11.668 --> 00:08:14.908 Sorry, can I just get 1 minute to pull up the notes I took on the subject? 12 00:08:16.769 --> 00:08:23.069 Okay, cool. So hi. I'm Joseph. Parents and your cell phone and share stuff. 13 00:08:23.069 --> 00:08:28.559 I, I was just going to give a little talk and hope to discussion if that's. 14 00:08:28.559 --> 00:08:31.918 Everything a share a screen if that's okay. 15 00:08:31.918 --> 00:08:35.788 1st off can everyone hear me. 16 00:08:35.788 --> 00:08:41.788 Can you guys hear me. 17 00:08:41.788 --> 00:08:45.599 Okay, cool. Thank you. Okay. 18 00:08:45.599 --> 00:08:54.058 So, the idea from what I've seen from open, it's run by the Chrome by I believe what is pronounced is the script. 19 00:08:54.058 --> 00:08:58.948 If that's how you pronounce it. No, I cannot hear you if you're talking. 20 00:08:58.948 --> 00:09:03.389 I can't hear you, but you're I see your Mike is on. 21 00:09:03.389 --> 00:09:06.599 It looks like other people. Can you hear me? Right? 22 00:09:08.458 --> 00:09:15.568 Okay oh, let me see. 23 00:09:16.798 --> 00:09:24.869 Just okay now I can hear you. Okay. Sorry. 24 00:09:24.869 --> 00:09:28.318 Okay. 25 00:09:28.318 --> 00:09:33.359 All right, then I'll restart I pulled up my notes on the subject, so. 26 00:09:33.359 --> 00:09:41.099 Open it's made by the Kronos group, and their goal is to have a way to write your parallel cold. 27 00:09:41.099 --> 00:09:49.769 For 1, architecture, and be able to port it as we've seen class itself you also have the Apple way version of quota, but. 28 00:09:49.769 --> 00:09:55.678 We're not going to that 1 open means open computer language. It's a subset of C. 29 00:09:55.678 --> 00:09:58.678 And you can also use it or do it up. 30 00:09:58.678 --> 00:10:02.339 I'm going to put the include guard for. 31 00:10:02.339 --> 00:10:11.729 Open in chat I'm just looking at what I wrote down. 32 00:10:14.818 --> 00:10:19.469 There as well, that's how you include your open. See how. 33 00:10:19.469 --> 00:10:33.688 So, basically, what's going to happen is when you run an open sale, when you compile an open sale program, that code is going to be turned into kernels, then the kernels are run separately. So you have multiple compute panels. 34 00:10:33.688 --> 00:10:39.599 With open, if it's possible to target both your and use. 35 00:10:40.798 --> 00:10:44.489 And performance or vary, so. 36 00:10:45.808 --> 00:10:52.078 Depends can be a little bit better because they have generally more course than even multiple cpu's but. 37 00:10:52.078 --> 00:10:57.448 If you want something, that's just going to be pure processing, you don't need as many course. See if you could end up being better. 38 00:10:57.448 --> 00:11:02.219 With an open sale project. 39 00:11:02.219 --> 00:11:12.208 Something that I did find interesting. Don't necessarily have to program an open seal to get its benefits. If you want to compile for open, you may still get a few benefits. 40 00:11:12.208 --> 00:11:22.139 From it, without ever writing a line of open CEO you I said, it was a subset of C. it will also work with C. plus plus. 41 00:11:22.139 --> 00:11:27.778 And if you want to learn open knowledge of both those languages, we'll end up helping you in the long run. 42 00:11:27.778 --> 00:11:32.578 Because the code is fairly similar now. 43 00:11:32.578 --> 00:11:38.038 You'll see people use it in graphics processing as well. 44 00:11:39.208 --> 00:11:44.369 Reason being is it's high core. Is it a bunch of high core efficient products? 45 00:11:44.369 --> 00:11:49.139 That's my feeling, there's a bit of them. 46 00:11:49.139 --> 00:11:57.119 There are people who believe this is very unfriendly to use. Some people believe it is very friendly to use. I'm of the opinion that. 47 00:11:57.119 --> 00:12:04.288 Well, it's either friendly, or it can be friendly or and friendly, depending on how much you want to use something like that. 48 00:12:04.288 --> 00:12:12.749 If you don't use it very often, then it's not going to be friendly to use if you get used to working with it. And it becomes very friendly to use. 49 00:12:12.749 --> 00:12:18.149 Overall, this is very much an API and a framework that is meant to allow you to. 50 00:12:18.149 --> 00:12:23.339 Right. You're called 1 through 1 architecture, and then be able to run on a different 1. 51 00:12:23.339 --> 00:12:29.339 Unfortunately, it does not appear to be code itself not appear to be portable across operating systems. 52 00:12:29.339 --> 00:12:34.229 Once you've been compiled executionable so you'll have to recompile for operating system, but. 53 00:12:34.229 --> 00:12:38.818 Kronos group was distributing different versions of the. 54 00:12:38.818 --> 00:12:43.168 Open for Windows Linux and Mackintosh. 55 00:12:43.168 --> 00:12:48.629 So, there are options and they are trying to include everyone. They are still fairly active. 56 00:12:48.629 --> 00:12:51.778 Which is very nice. It's growing. 57 00:12:51.778 --> 00:12:56.639 But as we're seeing in class, the every day, as long as kudo holds the dominant. 58 00:12:56.639 --> 00:13:02.278 Part of it as long as is the dominant market share open seal is always going to be kind of on the back burner. 59 00:13:02.278 --> 00:13:05.698 Because well, who does industry standard. 60 00:13:07.558 --> 00:13:14.879 In video still have some open seal support as well you can find the documentation for that on their website. 61 00:13:14.879 --> 00:13:19.408 If you ever do want to work with open Seattle, there is some very nice documentation available. 62 00:13:19.408 --> 00:13:26.759 It will be very helpful. That's really all I've got to say on the matter is anyone to have questions. 63 00:13:26.759 --> 00:13:32.099 Yeah, thank you. So who are the main players behind it? 64 00:13:32.099 --> 00:13:38.578 You should apple's 1 of them and then the Kronos group, I'll pull their web page up real quick. 65 00:13:41.009 --> 00:13:46.948 I'm not seeing anything I'm just going to the site right now. I'm not sharing yet. 66 00:13:46.948 --> 00:13:51.538 Oh, okay. So if you go to. 67 00:13:51.538 --> 00:13:58.469 Silence. 68 00:13:58.469 --> 00:14:02.489 Here's their little here's the cross group. 69 00:14:02.489 --> 00:14:05.609 Oh, okay so what they have is they have all their. 70 00:14:05.609 --> 00:14:12.688 You're here about how do we have the open standard for parallel? They're trying to make it. 71 00:14:14.158 --> 00:14:22.948 More accessible, and now there's people who are actually adopting it, which is interesting to me cause I saw that tesla's. Now, here as last started to adopt it. 72 00:14:22.948 --> 00:14:27.058 Which is interesting. 73 00:14:27.058 --> 00:14:34.499 That's not something I would have expected. They would have it, but as you can see, there's a whole host of people starting to use this. 74 00:14:34.499 --> 00:14:37.948 And we're using it more, so just definitely work for your time. 75 00:14:37.948 --> 00:14:41.519 Even though 1 video is the dominant player. 76 00:14:41.519 --> 00:14:50.458 Hey, thanks anyone else have a question? No, in that case. Great. No problem. 77 00:14:50.458 --> 00:14:53.938 Blaine, can you tell us about cubernetti's? 78 00:14:53.938 --> 00:14:57.538 K, yes, sure. Uh, can everyone hear me. 79 00:14:57.538 --> 00:15:04.048 I can hear you don't see any video. Okay. Yeah, I've got a presentation. Just give me a 2nd, just to share it. 80 00:15:05.129 --> 00:15:12.778 Do you see this presentation. 81 00:15:12.778 --> 00:15:22.014 Yes. Okay. Great. So I'm doing a talk on cubernetti's so just to start what is cuberneties it say open source container orchestration system. 82 00:15:22.163 --> 00:15:31.644 So, basically, what that means is that when you have stuff, like, Docker, you can use multiple different computers and wrap them all together as 1, big cluster. 83 00:15:31.884 --> 00:15:41.033 And each 1 of those, uh, computers can run, um, different containers or different containerized programs on them. And all of that is orchestrated by cuberneties. 84 00:15:41.278 --> 00:15:49.198 There's a couple of alternatives around that do similar things, but cubernetti's is sort of like the, the popular 1 at the moment for doing it over. 85 00:15:49.198 --> 00:15:53.219 Uh, for controlling large stacks of stuff. 86 00:15:53.484 --> 00:16:07.193 So, just to try to break it down and give some diagrams into how cuberneties structures itself. So, overall there's like a central controller. And then each 1 of the machines that's hooked into cuberneties is referred to as a node. 87 00:16:07.433 --> 00:16:08.964 And each 1 of those nodes is. 88 00:16:09.208 --> 00:16:13.288 Has a, um, uh, program on it that. 89 00:16:13.288 --> 00:16:16.349 Ah, talks to the main cubernetti's host and all of that is. 90 00:16:16.349 --> 00:16:27.178 Part of the package and then what you do is you're able to deploy different programs out and it'll run them on whatever notes or however many containers. You need to be running. 91 00:16:27.178 --> 00:16:31.408 Uh, with your codes on all of these different. 92 00:16:31.408 --> 00:16:35.038 Nodes in what are referred to as pods. 93 00:16:35.038 --> 00:16:47.278 So, the breakdown is, there's a cluster of machines each machine is referred to as a note, each node can run pods and the pods have different containers in them and those containers are the things actually running your program. 94 00:16:47.278 --> 00:16:55.048 And the containers inside of a pod can share, um, disk and memory and stuff like that to a certain extent. And. 95 00:16:55.048 --> 00:17:02.369 Whenever you when the advantage of running this through cubineties is you can just ask the cubernetti's system given a certain container to. 96 00:17:02.369 --> 00:17:08.638 Creates a certain number of those programs, and it will figure out how to distribute them amongst the machines to have them all running. 97 00:17:09.659 --> 00:17:16.528 And whenever 1 of them breaks or stops responding, it'll just automatically, like, allocate the resources for it and create a new 1 in its spot. 98 00:17:18.118 --> 00:17:32.729 So it's basically, like, um, if you had like, a, just to make an analogy, if you had, like, a farm of computers or desktop sitting in a room, it would be just like having the 1 that was controlling all of them. And what programs are running on them at any given time. 99 00:17:34.078 --> 00:17:39.689 So, there's a couple of simple command line examples for getting started. cuberneties has a lot of. 100 00:17:39.689 --> 00:17:51.148 Documentation associated with it, especially since it's gotten relatively popular recently since a W. S. and Google and lots of other similar, um, cloud computing companies tend to offer. 101 00:17:51.324 --> 00:18:04.733 I'm hosting a cuberneties cluster is 1 of their services, so you can create a program running on cuberneties by specifying the path to a Docker image, and then giving it a name and you can also change other parameters. 102 00:18:04.733 --> 00:18:12.894 Like, how many of these nodes you want running with it or how many pods you want it to create That'll be running it and then you can, um, each 1 of them is. 103 00:18:13.138 --> 00:18:28.104 Running in Docker, which has a certain level of virtualization and you can change, um, you can link all their networks so that you can actually communicate with those individual pods. And then finally you can, like, look at the output of them by asking, uh, the. 104 00:18:28.439 --> 00:18:40.769 cubernetti's commands to, um, look at the logs after opening the proxy for testing on your machine. There's this program called Mini cube, which just makes a single node cubineties cluster running on your own machine. So you can play around with it. 105 00:18:40.769 --> 00:18:43.769 Which is at least what I did when I was getting ready for this presentation. 106 00:18:43.769 --> 00:18:56.308 So, there's a couple of advantages it lets you pull together a lot of different resources. And if something happens to an individual resource, like a machine goes down or restarts or anything, uh, it'll just move where the, uh. 107 00:18:56.308 --> 00:19:00.058 Like, process would have been running, although there is, um. 108 00:19:02.038 --> 00:19:07.888 Although there is, um, like a not perfect state transition there, and you'd have to have like, some. 109 00:19:07.888 --> 00:19:17.398 Central memory where stuff's getting periodically backed up to, but the process would just be running on a different machine instead to meet the requisite number of pods that you told it to run. 110 00:19:17.398 --> 00:19:26.489 Uh, Additionally, it often uses Docker for the containers, just because doctors are really popular container type, but it can technically use any like, um. 111 00:19:26.489 --> 00:19:30.388 I've heard of some using NVIDIA Dockers, which are a type of, um. 112 00:19:30.388 --> 00:19:38.548 Docker container that allows you to interface with the GPU instead of, um, Dockers, normal isolation, which really only lets you, um. 113 00:19:38.548 --> 00:19:48.028 Like, control of your resources, and you can do this over a large number of machines without having to orchestrate them individually and change the scale as you need. 114 00:19:49.378 --> 00:19:56.278 But there are a lot of disadvantages with this, mainly that this is relatively complicated. It's probably overkill for a lot of things that aren't like um. 115 00:19:56.278 --> 00:20:02.009 Big web applications that have millions of users going them to any time and that having. 116 00:20:02.009 --> 00:20:09.148 It always working at any given time and also having the load balance between all these different processes. 117 00:20:09.148 --> 00:20:13.439 Spread out amongst different computers across the world would make it helpful. 118 00:20:13.439 --> 00:20:20.189 And, um, it also sort of requires that many of the problems be really decoupled because there's no. 119 00:20:20.189 --> 00:20:26.308 Architecture for high speed, um, shared memory between the processes, it's really just meant to be like, communicating. 120 00:20:26.308 --> 00:20:29.608 Database or over the network between them. 121 00:20:29.608 --> 00:20:43.588 So, you can use libraries within it to take advantage of local parallel resources as well or you can also do stuff like to communicate between them. But all of that has to be done separately from cubernetti's and, you. 122 00:20:43.588 --> 00:20:49.259 Fall for the standard problems that you have, when you're doing message passing between all these different nodes. 123 00:20:51.088 --> 00:21:01.409 Okay, so that's a summary. It allows you for managing containers running a large number of machines. It doesn't explicitly how fertilization other than the fact that you can run your code on many machines at the same time. The same code. 124 00:21:01.409 --> 00:21:11.788 But it does permit using other tools since you are running in a container environment. So you can just make the code whatever you need to be. And there's a bit of steep learning curve but there's lots of documentation to learn from it. 125 00:21:11.788 --> 00:21:15.239 And I've just got some references because there's, um. 126 00:21:15.239 --> 00:21:20.848 Example tutorials, you can run and I believe both Google and WS let you do like. 127 00:21:20.848 --> 00:21:28.469 Free small cubineties clusters for learning how to use cuberneties clusters since they seem to be encouraging people to learn how to do this. 128 00:21:32.368 --> 00:21:37.378 Well, thank you any questions or like. 129 00:21:37.378 --> 00:21:44.189 A good 1 so what would be a typical application where you'd want to have a form of virtual machines. 130 00:21:44.189 --> 00:21:54.388 I've only ever seen people do this when they were doing something with, like, um, a microservice architecture where they had, like, something that was going to have to. 131 00:21:54.388 --> 00:22:04.409 Like say, they had an API that they needed to run, and it was going to have a lot of things going through it. They could put cuberneties allows you to load balance between, like, all the different, um. 132 00:22:04.409 --> 00:22:11.848 Pods that would get the API that would actually be, like, processing the API response. So, if you like, say, had, um. 133 00:22:11.848 --> 00:22:16.229 A big machine learning problem and you were, like, doing image classification for someone. 134 00:22:16.229 --> 00:22:20.608 Then it could just like, um, switch between all the different computers. 135 00:22:20.608 --> 00:22:26.699 Um, which 1 would be handling your particular problem and then send back the response. 136 00:22:26.699 --> 00:22:33.628 Okay, it's a big problem. So if I had a server farm doing working for Tesla or whatever. 137 00:22:33.628 --> 00:22:38.699 Like you said, I guess, okay, anyone else. 138 00:22:38.699 --> 00:22:45.239 No. Okay well, thanks, Dan. Could you tell us about insight? 139 00:22:46.679 --> 00:22:52.108 However, you pronounce it yeah, I think it's enzyme and site. Okay. Yeah. 140 00:22:52.108 --> 00:22:55.439 Cool. Yeah, let me share. 141 00:22:55.439 --> 00:22:59.278 This presentation. 142 00:23:02.729 --> 00:23:08.848 Are you able to see that? Yes here sharing nicely and you can hear you guys like cool. 143 00:23:08.848 --> 00:23:12.538 Okay, so Nvidia insight. 144 00:23:12.538 --> 00:23:15.659 So. 145 00:23:15.659 --> 00:23:19.138 It's a development environment. 146 00:23:19.138 --> 00:23:28.199 That you can add on to your favorite ID, which you can either choose Visual studio or eclipse. 147 00:23:28.199 --> 00:23:33.538 And I personally use Visual Studio on so it's really. 148 00:23:33.538 --> 00:23:38.939 Nice to they added this so it's a tool. 149 00:23:38.939 --> 00:23:48.959 What's multiple tool extensions on the ID, and they kind of focus to the ID and give you a lot of different tools to analyze. 150 00:23:48.959 --> 00:23:54.628 Uh, GPU applications, so it. 151 00:23:54.628 --> 00:23:59.368 When you install 1 of these tools, it allows you to compile. 152 00:23:59.368 --> 00:24:05.969 A code code a code, right? From the. 153 00:24:05.969 --> 00:24:09.868 It has a bunch of built in debugging. 154 00:24:09.868 --> 00:24:16.078 Tools and if you use for what's happening in a parallel program. 155 00:24:16.078 --> 00:24:23.669 Like, looking at graphics card usage, you can look at individual threads, which I'll get it to later. 156 00:24:23.669 --> 00:24:34.499 It has the could a de B*** integrated directly into it and then, of course, you can still debugging normal C and C. plus plus code as well. 157 00:24:34.499 --> 00:24:37.558 So this is kind of a few of all the. 158 00:24:37.558 --> 00:24:40.888 Crazy new Windows that it adds. 159 00:24:40.888 --> 00:24:46.528 So, in the normal kind of debugging that it allows. 160 00:24:46.528 --> 00:24:51.479 But it adds on so you can if you. 161 00:24:52.648 --> 00:24:58.949 A individual kernel as it's executing so you can add break points within the colonel. 162 00:24:58.949 --> 00:25:03.088 Um, you can see you. 163 00:25:03.088 --> 00:25:07.528 It's registers of the GPU. What's awesome. 164 00:25:07.528 --> 00:25:11.068 How the warps are operating and what's on each thread. 165 00:25:11.068 --> 00:25:14.638 At a break point. 166 00:25:14.638 --> 00:25:18.689 There's a watch Windows, which allow viewing of. 167 00:25:18.689 --> 00:25:28.138 Any variables executing on the GPU, any data structures that are stored on the GPU and it also produces errors. 168 00:25:28.138 --> 00:25:32.729 During kernal execution. 169 00:25:32.729 --> 00:25:36.419 This window shows. 170 00:25:37.709 --> 00:25:43.259 It shows and SAS code so, assembly source code that's. 171 00:25:43.259 --> 00:25:48.419 Sent to the GPU, and you can set breakpoints in this as well. 172 00:25:48.419 --> 00:25:51.868 Pts is kind of the general instructions that. 173 00:25:51.868 --> 00:25:55.019 That's made for kudo and. 174 00:25:55.019 --> 00:26:05.818 Yeah, so it's, it's made to be really efficient, so it's not meant to slow down the actual execution of your programs as much. 175 00:26:05.818 --> 00:26:12.598 Um, so this really full window shows. 176 00:26:12.598 --> 00:26:20.159 The viewing of a work on the GPU as the program's running, and you can. 177 00:26:20.159 --> 00:26:29.068 So, each warp is color coded and this is the nice table they give with what each color means. So you can. 178 00:26:29.068 --> 00:26:38.009 This is a view of individual work, but you can also view the list of warps, click on a work and then click on a thread as well. 179 00:26:38.009 --> 00:26:48.509 And then, uh, I can go back and then you can click on a thread and watch an individual thread of what's executing mode. Very local memory it has and everything. It's very cool. 180 00:26:48.509 --> 00:26:52.229 So, then it split into kind of 3 tools. So you have. 181 00:26:52.229 --> 00:26:57.509 And cite compute graphics and systems each, having their own kind of like. 182 00:26:57.509 --> 00:27:01.558 Uh, huh. Surface. So compute. 183 00:27:01.558 --> 00:27:06.449 Is met to analyze individual kernels so. 184 00:27:06.449 --> 00:27:13.828 Helping improve the performance of your current also, it gives you a lot of. 185 00:27:13.828 --> 00:27:25.769 Statistics you can make your own statistics, gives you performance. There's a performance, a limiter to kind of find the throttle points of a kernel. So. 186 00:27:25.769 --> 00:27:28.888 Finding unnecessary synchronization. 187 00:27:28.888 --> 00:27:34.528 Memory copying that might not need to be done. 188 00:27:35.969 --> 00:27:45.179 Also, if not enough threads are being used, so if you'd like to do more words and threads to a or blocks and threads to a. 189 00:27:45.179 --> 00:27:48.838 Application and might speed up the performance. 190 00:27:48.838 --> 00:27:53.429 Gives a lot of visualizations graphs charts. 191 00:27:53.429 --> 00:27:56.548 Of the maximum performance, assuming. 192 00:27:56.548 --> 00:28:02.459 You had a amazing computer, then we have. 193 00:28:02.459 --> 00:28:10.648 That graphics version, which is more driven towards kind of modeling Ray, tracing stuff on the GPU. 194 00:28:10.648 --> 00:28:13.709 So, again you have a performance limiter so. 195 00:28:13.709 --> 00:28:24.959 You can kind of throttle that usage of the computer and see what points of the program are really running poorly. And it kind of gives you. 196 00:28:24.959 --> 00:28:30.028 Advice on how to fix that either. 197 00:28:30.028 --> 00:28:37.499 Partitioning giving him more threats to use more memory kind of stuff also. Cool. 198 00:28:37.499 --> 00:28:45.989 Integrated crafts re, tracing B***. So you kind of kind of pause on a frame of your rate trace and for you. 199 00:28:45.989 --> 00:28:59.429 All the, the current scene and what rays and pixels are being viewed another picture, which I didn't add you can if you the color history of each individual pixel on the screen and what. 200 00:29:00.568 --> 00:29:06.419 Parts of the program, cause those changes of color of the pixels. Very cool. 201 00:29:06.419 --> 00:29:16.318 And then finally is the system's version of the tool, which is more a general kind of system wide. 202 00:29:16.318 --> 00:29:24.088 Application tool, so as opposed to compute what you're looking at a kernel, this is looking at your entire application. 203 00:29:24.088 --> 00:29:27.088 And it's meant to. 204 00:29:28.709 --> 00:29:31.979 It was developed to be used on any type of systems. So like. 205 00:29:31.979 --> 00:29:36.749 On that small little chats and video chats and. 206 00:29:36.749 --> 00:29:41.548 So, looking at your program, looking at all the algorithms, you have. 207 00:29:41.548 --> 00:29:47.848 Again to menu timings run times. 208 00:29:47.848 --> 00:29:51.868 Possible areas for improvement in wrong time. 209 00:29:51.868 --> 00:30:01.199 Uh, very low overhead, so not to influence the wrong time of your program as much and you can. 210 00:30:01.199 --> 00:30:07.558 Spot things like starting the GPU unnecessary syncs like before. 211 00:30:07.558 --> 00:30:12.749 I don't know if, and any expensive algorithms. 212 00:30:12.749 --> 00:30:17.909 I think that's it. 213 00:30:19.769 --> 00:30:26.909 Oh, thanks, Dan. Anyone have any questions. 214 00:30:30.628 --> 00:30:40.588 So you said it's good performance it doesn't enormously slow down the program to be using. That's what they say. They said it's a very low overhead. 215 00:30:40.588 --> 00:30:48.239 Yeah, especially okay the GPU analysis stuff so any kernels the timings and stuff. 216 00:30:48.239 --> 00:30:53.278 Influence the performance of that too much. 217 00:30:55.259 --> 00:30:59.818 Your questions okay. And she. 218 00:30:59.818 --> 00:31:03.838 Tell us also about the bugging or other types of debugging. 219 00:31:03.838 --> 00:31:07.108 Yeah, so I'm going to talk about, um. 220 00:31:07.108 --> 00:31:14.278 Could be and could then check so that's a bit. Let me just share my screen. 221 00:31:19.469 --> 00:31:22.558 So, your screens coming through. 222 00:31:22.854 --> 00:31:35.213 Yeah, sure. So I'm going to talk about on the beginning tours basically both uh, uh, and could could chat a. so, could the tool for debugging could applications. 223 00:31:35.423 --> 00:31:39.054 So is also a extension to a CDB. 224 00:31:39.054 --> 00:31:39.443 So, 225 00:31:39.713 --> 00:31:48.294 which is a like a commercial we're used to to bug a PCI program and so could that be support both and, 226 00:31:49.884 --> 00:31:50.453 um, 227 00:31:50.574 --> 00:31:52.673 and so the compilation as we see, 228 00:31:53.034 --> 00:32:03.023 the periods class is pretty simple and this bigger to include the dash g flag to enable the debugging function. 229 00:32:03.923 --> 00:32:13.523 And in that gdb, um, command line interface on, uh, you need to do some simple, um, syntax combination lights come at the command line. 230 00:32:13.523 --> 00:32:19.703 And comments on the left is how you see all the information of a host. 231 00:32:22.648 --> 00:32:36.239 And if you want to see a quick strategy, you need to include us. In part I could, uh, could have syntax could, uh, key words to a test line to view your. 232 00:32:36.239 --> 00:32:44.729 Yes, and, uh, the stepping in the different with a standard gdb. 233 00:32:44.729 --> 00:32:58.469 So, unlike the host code, a single staffing device coast, and goes to having works as the work level, which means, uh, advanced. So, so single 7 will advise all the active in focus. 234 00:32:58.469 --> 00:33:11.338 And also, the direct distressing the work are not a single step about, uh, I'm a little confused about his explanation, but on the official documents, they didn't like. 235 00:33:11.338 --> 00:33:14.578 I'll just explain more in detail. 236 00:33:14.578 --> 00:33:28.648 So, and also for the break points, uh, how you set up break points as you'll see a break syntax, and you can specific a function name, or, uh, uh, like, uh. 237 00:33:28.648 --> 00:33:33.778 Of a function for a class on the left and. 238 00:33:33.778 --> 00:33:44.818 Excuse me, and you can also set up a template of a function and to set up break point for a, uh, like a template for all this kind of function. 239 00:33:44.818 --> 00:33:57.538 And so it's also support, um, uh, like a voice with a specific line number and also submitting a memory address when she wants to outbreak. 240 00:33:57.538 --> 00:34:01.888 I'll add see, uh, exact memory address. 241 00:34:03.354 --> 00:34:14.514 So the next thing, as a quick check, so condemn tech is a functional Karl correctness checking suit. So, in this suit includes a basically, 4 major functions. 242 00:34:14.543 --> 00:34:20.574 So which tag and attribute of a balance and misaligned member access arrows, 243 00:34:20.963 --> 00:34:22.344 and the Knights will check, 244 00:34:22.494 --> 00:34:35.574 which report to share memory data access and a case where that performs annualized access to global memory and synchronize check report cases, 245 00:34:35.603 --> 00:34:41.034 where application is tempting invalid usage of synchronization parameters. 246 00:34:41.398 --> 00:34:49.079 So, how you use the check is a simple you need to, um. 247 00:34:49.079 --> 00:34:59.338 bronzie could check as could both, uh, with, uh, let's see, uh, options, uh, you app name and your, uh, app, uh, options. 248 00:35:01.739 --> 00:35:14.728 Uh, and so it's couldn't check it's also integrate into the could that gdb, but only the 1st, um, uh, 1st, uh, map check model is integrated, not the artistry. So, in the could actually be you can, um. 249 00:35:15.414 --> 00:35:15.744 So, 250 00:35:15.864 --> 00:35:18.684 Ron says for this command on the 1st line, 251 00:35:18.983 --> 00:35:22.733 which I think has a check function, 252 00:35:22.733 --> 00:35:30.594 and then run your application into a database debugging interface and the interface will automatically to see, 253 00:35:30.893 --> 00:35:31.434 um, 254 00:35:31.554 --> 00:35:32.483 a memory check. 255 00:35:33.083 --> 00:35:36.054 Well, and who are doing the bugging. 256 00:35:38.369 --> 00:35:42.898 So here in my reference, yeah any questions. 257 00:35:42.898 --> 00:35:47.099 Okay, thank you very much. 258 00:35:50.039 --> 00:35:58.018 So, the others that are not integrated, you just run them separately then? Yeah. Okay. Ryan was Aflac on the. 259 00:35:58.018 --> 00:36:05.398 Okay, and do you have an idea how much overhead they might have. 260 00:36:05.398 --> 00:36:11.938 If you ran them on a big program, um, I didn't look into it as problems. 261 00:36:11.938 --> 00:36:26.068 Okay, yeah, well, thank you. So now we have a joint presentation by Justin and mark on HPC, which stands for huge PCs, I guess, or. 262 00:36:26.068 --> 00:36:29.849 High performance computing actually. 263 00:36:29.849 --> 00:36:32.938 Okay, I can see you. 264 00:36:32.938 --> 00:36:40.708 Yeah, we actually scratched out H PPC plus plus because we realized there was a super old, super, super old. 265 00:36:40.708 --> 00:36:45.628 I'm not even on the current technology now, watch this year's buzzword. 266 00:36:45.628 --> 00:36:55.708 Oh, well, we're going to focus on some more Microsoft tools so kind of the built in tools into C. plus plus. Okay. Just start with that. 1st, I'll shut up. 267 00:36:55.708 --> 00:36:59.699 Mark you here, right? Yup. I'm here. All right. Sounds good. 268 00:36:59.699 --> 00:37:08.278 Yeah, so 1st, I'm going to talk about yeah C plus plus accelerated massive parallelism, which is for short. 269 00:37:08.278 --> 00:37:11.309 Uh, so this is pretty much, uh, will help to accelerate. 270 00:37:11.309 --> 00:37:17.728 Execution of C plus plus code by taking advantage of the data parallel hardware, which will typically be here. 271 00:37:17.728 --> 00:37:25.798 Your dedicated graphics card uh, so the, a, and P programming model includes support for multi dimensional arrays indexing. 272 00:37:25.798 --> 00:37:32.309 And that may transfer and tiling, and it allows us to control how data is moved between the CPU. 273 00:37:32.309 --> 00:37:38.849 And it keeps you somewhat to mainly cover an example to so again idea of how to use it. 274 00:37:38.849 --> 00:37:44.309 So, the picture on the left is a serial example of just adding to a raise. 275 00:37:44.309 --> 00:37:47.369 Uh, so very basic it just uses a 4 loop. 276 00:37:47.369 --> 00:37:56.489 And an index to add, plus into the summary and the picture on the right side is using the. 277 00:37:56.489 --> 00:38:00.329 A, a library, so. 278 00:38:00.329 --> 00:38:05.998 There's a, there's a new type of a re call to review, which I'm going to get into detail later. 279 00:38:05.998 --> 00:38:11.670 And then there's also a parallel for each section, which uses a, which is based on 2 constructions. 280 00:38:11.670 --> 00:38:20.610 Uh, to not constructs to kind of like, details 2 arguments to get to run properly. So I'll come back to this after I explain. 281 00:38:20.610 --> 00:38:25.260 I'm not the more detailed parts of how to use it. 282 00:38:25.260 --> 00:38:38.820 So the 1st part is a re view, very similar to the standard array class, but underlying behavior is different. So, in the regular array data is replicated on the. 283 00:38:38.820 --> 00:38:47.579 I believe at run time, but for our review data is not replicated on the, but it's only done. 284 00:38:47.579 --> 00:38:50.610 Uh, as necessary, so the next slide is. 285 00:38:50.610 --> 00:38:57.119 It's copy to the accelerator when the colonel function is executed and so data is moved only when necessary. 286 00:38:57.119 --> 00:39:02.429 At this table, but that shows that it's really, really similar. 287 00:39:02.429 --> 00:39:07.019 Except for that data ritual part, it's just. 288 00:39:07.019 --> 00:39:15.900 You do it when necessary. So I think we saw 1 of the homeworks. We saw a lot of delay because we kept passing data back and forth. 289 00:39:15.900 --> 00:39:22.110 Which was unnecessary, so we kind of shifted that data part to only do it 1 time at the very end. 290 00:39:22.110 --> 00:39:26.250 Which is a advantage of this array view. 291 00:39:27.360 --> 00:39:35.460 So, the parallel for each section, it defines the code that you want to run on the accelerator with the data that you want to run the code with. 292 00:39:35.460 --> 00:39:39.300 So, there's 2 sections, there's the compute domain. 293 00:39:39.300 --> 00:39:43.559 Which is based on a, on the extent or tiled extent object. 294 00:39:43.559 --> 00:39:47.519 Object, which will specify how many threads, uh, the parallel. 295 00:39:47.519 --> 00:39:58.110 Region we'll use, so 1 thread is created for each element and the compute domain so quick example, if you give it integrate view, that is 1 dimensional and 5 elements. 296 00:39:58.110 --> 00:40:02.789 And using these statement hard that extent, extend the parallel for each. 297 00:40:02.789 --> 00:40:05.849 I will create 5 threads so 1 for index. 298 00:40:05.849 --> 00:40:10.739 And there's also a land expression, which defines the code that runs on each. 299 00:40:10.739 --> 00:40:14.670 Or the Landa expression, you can call a separate colonel function. 300 00:40:14.670 --> 00:40:24.480 More about parallel for each it allows for iterating through the data elements. I'm sure you guys all know parallel for each. 301 00:40:24.480 --> 00:40:27.960 Again, the computer domain and specified by some of that extent. 302 00:40:27.960 --> 00:40:34.590 And the code executed is in the land expression. So this picture was from the. 303 00:40:34.590 --> 00:40:39.059 The big picture on the other side so, in this case, we see the parallel for each. 304 00:40:39.059 --> 00:40:42.929 The array some extent will specify. 305 00:40:42.929 --> 00:40:47.699 Let's see how many items as 55 threads cause the summit is going to. 306 00:40:47.699 --> 00:40:56.519 Be the addition of the, a, and the beer, and then we have the Lambda expression, which is below the find the code comment. 307 00:40:56.519 --> 00:41:02.159 So this is new index part, which I'll explain next, but we can see how. 308 00:41:02.159 --> 00:41:06.210 Uh, we have kind of 2 main parts, the extent, and the code itself. 309 00:41:06.210 --> 00:41:13.050 So this index part really specify a location in array or a review. 310 00:41:13.050 --> 00:41:19.409 So, typically, you would normally do a 2 dimensional rate with, like, 2 crappy indexes. 311 00:41:19.409 --> 00:41:25.590 But if you use the index object, uh, you can specify that the index object. It's like, 2 dimensional index. 312 00:41:25.590 --> 00:41:30.420 So, then you don't have to do the double brackets. So there's a couple of examples here. 313 00:41:30.420 --> 00:41:34.769 If you look at the 3 dimensional array, which is the picture on the right. 314 00:41:34.769 --> 00:41:40.889 You can see how this index arrow 3, which is going to be like a 3 dimensional index. 315 00:41:40.889 --> 00:41:44.130 And then called, and then they can specify. 316 00:41:44.130 --> 00:41:48.090 The depth row and column, so going back to here. 317 00:41:48.090 --> 00:41:51.989 You can see, in this case, the index is a 1 dimensional index. 318 00:41:51.989 --> 00:41:57.239 Uh, and they use that to index through some, a, and B. 319 00:41:59.550 --> 00:42:06.119 And the extent is the last big piece is specified the length of the data dimension of the array. 320 00:42:06.119 --> 00:42:10.409 Or re, view object. So if you have a 1 dimensional. 321 00:42:10.409 --> 00:42:17.579 Array of size 5 and you call like, array dot extent. It's going to return. It's dimension. It's just 5. 322 00:42:17.579 --> 00:42:21.719 Yeah, so that's really quick really easy. 323 00:42:21.719 --> 00:42:25.289 And that Mark's going to talk about the concurrency runtime library. 324 00:42:25.289 --> 00:42:30.000 Yeah, so concurrency run time um. 325 00:42:30.000 --> 00:42:33.449 You know, it's it's, I guess, kind of like open emptying. 326 00:42:33.449 --> 00:42:38.039 Those, but it's, you know, for writing. 327 00:42:38.039 --> 00:42:41.909 Scalable a responsible like parallel applications, um. 328 00:42:41.909 --> 00:42:44.969 And it, it raises the level of abstraction. 329 00:42:44.969 --> 00:42:48.090 So, you don't really have to manage the, you know. 330 00:42:48.090 --> 00:42:52.559 Architectural details. 331 00:42:52.559 --> 00:42:59.039 And you can, um, you know, use different scheduling policies. 332 00:42:59.039 --> 00:43:04.079 That meet your quality of service demands, you know, there's. 333 00:43:05.400 --> 00:43:09.659 Anyway, I guess I'll talk more later, so the next slide. 334 00:43:10.800 --> 00:43:17.039 So, the concurrency runtime architecture's made up of 4 components. Um. 335 00:43:17.039 --> 00:43:23.940 To them are libraries themselves, the parallel patterns library and the asynchronous agent's library. 336 00:43:23.940 --> 00:43:27.480 And then the other. 337 00:43:27.480 --> 00:43:32.130 2 components, task, schedule and resource manager. They are kind of. 338 00:43:32.130 --> 00:43:39.480 I guess more a lower level, or you don't necessarily have to deal with those as much. Um, but you can, but. 339 00:43:39.480 --> 00:43:43.170 Probably normally wouldn't so. 340 00:43:43.170 --> 00:43:51.000 And these, so these are the components that live in between, like, the operating system, and the applications that you write. 341 00:43:52.380 --> 00:43:56.190 Um, next slide. 342 00:43:58.590 --> 00:44:03.179 So the parallel patterns library, or. 343 00:44:03.179 --> 00:44:06.239 Um, it. 344 00:44:06.239 --> 00:44:10.710 Enables like data parallelism. 345 00:44:10.710 --> 00:44:15.179 By basically providing algorithms. 346 00:44:15.179 --> 00:44:20.250 Um, you know, kind of like the parallel for each that that's from the. 347 00:44:20.250 --> 00:44:24.570 Or, you know, from this library, um. 348 00:44:24.570 --> 00:44:28.349 And it distributes computations. 349 00:44:28.349 --> 00:44:31.530 On, like, sets of data of. 350 00:44:31.530 --> 00:44:34.619 Across different computing resources. 351 00:44:34.619 --> 00:44:37.920 That are that are available. 352 00:44:39.090 --> 00:44:43.230 And enables task parallelism as well by writing. 353 00:44:43.230 --> 00:44:48.420 Uh, task objects that district multiple independent operations. 354 00:44:48.420 --> 00:44:53.309 Across computing resources. 355 00:44:53.309 --> 00:44:57.960 Okay, and here's an example of 1 of the algorithms. 356 00:44:57.960 --> 00:45:02.909 Um, you know, parallel for each, as we saw earlier. 357 00:45:02.909 --> 00:45:09.510 But this is not without using the, um. 358 00:45:09.510 --> 00:45:12.599 You know, the special vectors, so. 359 00:45:12.599 --> 00:45:17.280 This is just an example, the code snippet here is just an example from. 360 00:45:17.280 --> 00:45:22.710 A program that compares Fibonacci cereal and. 361 00:45:22.710 --> 00:45:27.329 I'm using parallel for each and, you know, obviously the parallel for each. 362 00:45:27.329 --> 00:45:32.070 Version was faster. Um, so you could see. 363 00:45:32.070 --> 00:45:35.579 In the, in the middle, so let, you know, you set up. 364 00:45:35.579 --> 00:45:40.349 The concurrent vector. Okay. Yeah. Concurrent vector. That's. 365 00:45:40.349 --> 00:45:44.159 Used here for the concurrency your own time. 366 00:45:44.159 --> 00:45:47.489 Um, and. 367 00:45:47.489 --> 00:45:52.619 I guess it's similar to what was the, um, extra call, Justin that was using the again. 368 00:45:53.639 --> 00:46:05.579 I use array view, so the biggest difference, the arguments. So this parallel for each will take in innovators for the start and the parallel for each. 369 00:46:05.579 --> 00:46:09.960 Didn't quite take arguments, but you have to specify them within the region. 370 00:46:09.960 --> 00:46:13.289 Yeah, and so, um. 371 00:46:13.289 --> 00:46:21.630 You can see the everything gets pushed back to yeah, this concurrency factor. Add something to note. Here is, you know. 372 00:46:21.630 --> 00:46:25.260 You know, as we've seen in, like the 1st. 373 00:46:25.260 --> 00:46:28.289 I think the 1st, day of class or 2nd day, whatever. 374 00:46:28.289 --> 00:46:32.820 Uh, you know, it's how asynchronous. 375 00:46:32.820 --> 00:46:38.400 So, the concurrency vector will be out of order like, after it's done. 376 00:46:38.400 --> 00:46:42.300 And since this program was comparing the results. 377 00:46:42.300 --> 00:46:46.769 To serial X, like version of it, they sorted it at the end. 378 00:46:46.769 --> 00:46:50.130 But even with the sorry, it was still like, almost twice fast. 379 00:46:52.320 --> 00:46:58.980 And so I mentioned there are 4 components of the concurrency run time. 380 00:46:58.980 --> 00:47:05.219 I think the is the 1 that's used most by the 1 that you'll deal with the most. 381 00:47:05.219 --> 00:47:11.219 Asynchronous agents library also maybe deserves its own slide, but I just put the. 382 00:47:11.219 --> 00:47:15.630 You know, the next 3 altogether, so. 383 00:47:15.630 --> 00:47:18.719 The agents library. 384 00:47:18.719 --> 00:47:22.079 It uses a data flow programming model. 385 00:47:23.519 --> 00:47:30.059 And you would use that when you have multiple operations that communicate with each other asynchronously. 386 00:47:30.059 --> 00:47:34.860 You know, like, for example, if you're reading from a file or. 387 00:47:34.860 --> 00:47:40.050 Network connection and you need processes that have message passing. 388 00:47:40.050 --> 00:47:45.599 So, um, the agent's library. 389 00:47:45.599 --> 00:47:49.530 Uh, you know, abstracts that a lot and. 390 00:47:49.530 --> 00:47:55.800 Uses like, like, uses message blocking and. 391 00:47:55.800 --> 00:47:59.039 Stuff like that and while. 392 00:47:59.039 --> 00:48:02.699 1 thing is waiting for its data. 393 00:48:02.699 --> 00:48:07.050 It'll allocate that, like, unused resources for other things. 394 00:48:07.050 --> 00:48:11.309 So more efficient use. 395 00:48:12.480 --> 00:48:16.050 And so the task scheduler. 396 00:48:16.050 --> 00:48:23.579 So, the concurrency runtime provides a default scheduler, so you don't really need to. 397 00:48:23.579 --> 00:48:27.510 Manage the like, infrastructure details, but. 398 00:48:27.510 --> 00:48:30.840 Um, you can so. 399 00:48:30.840 --> 00:48:34.530 Task scheduler, you know, like what? It sounds like. Um. 400 00:48:34.530 --> 00:48:40.769 It schedules and coordinates the tasks and are at run time and then. 401 00:48:40.769 --> 00:48:44.489 Kind of like, reallocate and move things around as. 402 00:48:44.489 --> 00:48:47.849 Resources open up and are waiting. 403 00:48:47.849 --> 00:48:54.059 Stuff like that so yeah, you can optimize that. You want better performance. 404 00:48:54.059 --> 00:48:58.889 And again, the resource manager also, I guess kind of what it sounds like. 405 00:48:58.889 --> 00:49:03.119 And resource manager. 406 00:49:04.650 --> 00:49:08.880 You know, like an abstraction over, um, using the resources. 407 00:49:08.880 --> 00:49:12.269 Processors and all that. 408 00:49:12.269 --> 00:49:17.969 And again, you can use it to fine tune the performance of your. 409 00:49:17.969 --> 00:49:22.110 Like, libraries and applications, but, um, typically. 410 00:49:22.110 --> 00:49:26.219 The, the functionality. 411 00:49:27.510 --> 00:49:30.900 Typically, you would use like, the functionality from the. 412 00:49:30.900 --> 00:49:34.650 Ppl or parallel pattern library and the. 413 00:49:34.650 --> 00:49:39.900 Agent's library the most and and then and in the task scheduler. 414 00:49:39.900 --> 00:49:43.710 And these resources use. 415 00:49:43.710 --> 00:49:52.349 Are these, you know, those components use the resource manager to dynamically rebalance the resources and workload changes. 416 00:49:52.349 --> 00:49:56.699 And that's pretty much it for for me for what I'm. 417 00:49:56.699 --> 00:50:02.579 Concurrency run time. 418 00:50:04.739 --> 00:50:08.760 Well, thank you, Justin and mark. 419 00:50:08.760 --> 00:50:13.860 So, I'm giving us your evaluation of this. Does that look. 420 00:50:13.860 --> 00:50:18.239 Is it widely used? Should it be widely used. 421 00:50:18.239 --> 00:50:23.460 Well, personally, looking at someone like the. 422 00:50:23.460 --> 00:50:27.510 Functions are algorithms provided by email, like, and. 423 00:50:27.510 --> 00:50:31.559 So it seems to me, like, it might be a little easier to use an open MP. 424 00:50:31.559 --> 00:50:36.869 And, you know, there was like, um, guides on transitioning from open MP to. 425 00:50:36.869 --> 00:50:40.650 Well, I'm talking about concurrency run time. Um. 426 00:50:40.650 --> 00:50:49.289 Which I guess is related to M. P. but yeah, in general, the parallel for each is very easy to use. 427 00:50:49.289 --> 00:50:55.230 Very, very easy to use. Okay. 428 00:50:56.280 --> 00:51:00.239 Anyone else have a question. 429 00:51:01.650 --> 00:51:07.500 So, Ben, I can't remember. Did you want to talk to day or did you prefer to talk to Thursday? 430 00:51:07.500 --> 00:51:11.789 Either is fine. I'm happy to talk today if you'd like to. 431 00:51:11.789 --> 00:51:17.760 Here, but doctor sure. Yeah absolutely great. Tell us about Docker. 432 00:51:17.760 --> 00:51:20.789 Let me get my slides up. 433 00:51:38.400 --> 00:51:44.039 All right can you see it? I, yes, I can. 434 00:51:45.750 --> 00:51:52.170 Great. Okay so I'll be talking about Docker. 435 00:51:52.170 --> 00:51:57.570 Darker as a product as a concept was started in 2010. 436 00:51:57.570 --> 00:52:04.320 At a startup incubator group, which shown to the public for the 1st time in 2013 at pike on. 437 00:52:04.320 --> 00:52:10.530 And which a release as an open source project in March of 2013, and it is. 438 00:52:10.530 --> 00:52:14.699 Um, maintained by Docker ink. 439 00:52:14.699 --> 00:52:21.929 A little bit of background traditionally, if you want to set up an application, you would have to run it directly on your machine. 440 00:52:21.929 --> 00:52:29.550 Or on a virtual machine, and if you run something locally, it's not super easy to turn on and off and manage. 441 00:52:29.550 --> 00:52:36.300 You know, what has access to it and the and whatnot, but with the virtual machine. 442 00:52:36.300 --> 00:52:39.840 Every virtual machine needs and OS image. 443 00:52:39.840 --> 00:52:43.889 And so if you want to run a micro service, for example. 444 00:52:43.889 --> 00:52:48.869 Having an OS image for every little bit of your API platform. 445 00:52:48.869 --> 00:52:52.409 For example, starts to take a lot of space as a bit cumbersome. 446 00:52:52.409 --> 00:52:57.599 And if you want to tear down, it also makes it difficult. 447 00:52:57.599 --> 00:53:01.380 Uh, Docker allows you to package all your different applications. 448 00:53:01.380 --> 00:53:11.699 Into containers, these containers don't require a dedicated OS image for every application and they sit on top of something called the Docker engine. 449 00:53:11.699 --> 00:53:17.579 Or multiple containers current at the same time. So again, if you're trying to run a microservice, for example, you can have. 450 00:53:17.579 --> 00:53:22.050 No, 10 different Docker containers running all on this 1. Docker engine. 451 00:53:22.050 --> 00:53:25.590 Um, they don't require multiple OS images. 452 00:53:25.590 --> 00:53:31.469 And they all have externally controlled network permissions and. 453 00:53:31.469 --> 00:53:42.000 All that kind of stuff so it's self contained. You can isolate the application, its dependencies you can deploy and tear down very easily. 454 00:53:42.000 --> 00:53:46.079 Um, and this helps you be more efficient with your system resources. 455 00:53:46.079 --> 00:53:49.199 Makes general software develop easier. 456 00:53:49.199 --> 00:53:52.619 As having your containers easily separate and dress. 457 00:53:52.619 --> 00:53:57.179 Again makes operating micro services much easier. 458 00:53:57.179 --> 00:54:02.219 I personally used Docker myself at my job. 459 00:54:02.219 --> 00:54:07.769 Worked for a company that has a data platform, we use Docker for. 460 00:54:07.769 --> 00:54:11.010 Many of our little micro services. 461 00:54:11.010 --> 00:54:16.349 Um, every day, so I have some examples. 462 00:54:16.349 --> 00:54:21.269 Of using Docker, if you just like getting started. 463 00:54:21.269 --> 00:54:25.619 So, busy box is already existing. Docker. 464 00:54:25.619 --> 00:54:29.250 Image that you can pull for. 465 00:54:29.250 --> 00:54:32.820 It's for just to mess around with so you would. 466 00:54:32.820 --> 00:54:36.269 Address 1st, you want to install a Docker horse, but then you would. 467 00:54:36.269 --> 00:54:40.949 Say pull busy box, you can look at your images, which will show you. 468 00:54:40.949 --> 00:54:46.800 Which doctor images you currently have pulled, you can quickly address. 469 00:54:46.800 --> 00:54:50.309 Sorry, you can dress the container. 470 00:54:50.309 --> 00:54:54.809 By running busy box and running. Hello? 471 00:54:54.809 --> 00:55:00.570 The command Docker PS, you can see all of the images that you have. 472 00:55:00.570 --> 00:55:04.860 When they're created, what not and you can easily remove them. 473 00:55:04.860 --> 00:55:08.489 So, easy deployment, you see tear down. 474 00:55:08.489 --> 00:55:17.670 Docker used to be command line only in the past few months they implemented a new version that actually has a so you can visually see. 475 00:55:17.670 --> 00:55:23.699 All the different images and all the different containers. So it's not just. 476 00:55:23.699 --> 00:55:27.869 Um, a command line program anymore. 477 00:55:27.869 --> 00:55:31.170 That's about what I had if anyone has any questions. 478 00:55:33.750 --> 00:55:41.280 Oh, thank you. Question. Well, good question. What about security? Could you run this? 479 00:55:41.280 --> 00:55:46.710 Trusted if say the various clients, you didn't trust them. 480 00:55:46.710 --> 00:55:55.500 Yeah, so Docker doesn't really do anything to improve security or anything. I mean, if your original application that you've developed. 481 00:55:55.500 --> 00:56:00.690 Isn't too great on security containerizing. It isn't really going to. 482 00:56:00.690 --> 00:56:06.510 Change that so I think I was reading some people had misconceptions about that by. 483 00:56:06.510 --> 00:56:10.349 containerizing, it'll help your security issues, so. 484 00:56:10.349 --> 00:56:15.539 Um, yeah, that's something you would want to address before you start. 485 00:56:15.539 --> 00:56:25.170 Put into a Docker also, how would you exchange files between the container and the host? Could that be done? 486 00:56:25.170 --> 00:56:28.170 How would you get stuff in and out of the container. 487 00:56:28.170 --> 00:56:36.510 You can when you make a Docker image, those can't be changed, but there's like a little layer on top that you can address. 488 00:56:36.510 --> 00:56:39.659 And so you can. 489 00:56:39.659 --> 00:56:48.989 I don't know the exact syntax off the top of my head, but you can, you can interact between the host and the containers through the command line. 490 00:56:48.989 --> 00:56:52.409 Okay, thank you. 491 00:56:52.409 --> 00:56:57.690 Any other questions? No. 492 00:56:57.690 --> 00:57:01.889 Okay, great. So I'm learning a lot. 493 00:57:01.889 --> 00:57:10.139 People get ahead of me in some of the stuff. So I'm actually learning information from these talks. So there is an ulterior motive I have. So. 494 00:57:10.139 --> 00:57:15.179 Thursday, you will have a couple of talks and. 495 00:57:15.179 --> 00:57:19.679 Isaac, if Congress back and so on and another talk, maybe. 496 00:57:21.780 --> 00:57:25.980 Okay, so since we do have. 497 00:57:25.980 --> 00:57:34.199 Good bit of time left. What I would like to do is continue on about thrust and. 498 00:57:34.199 --> 00:57:40.500 1st, before I get into the stand, for course notes, pull them up. 499 00:57:40.500 --> 00:57:50.820 Talk a little about thrust up so it's a parallel version of the standard template library and designed to run on the whole store on the device. 500 00:57:50.820 --> 00:57:57.360 And the theory is, you don't need to change the code if you're careful with your coating. So. 501 00:57:57.360 --> 00:58:06.809 And and trust itself is a header only package, it says header files and of course, the header files have coded in them as part of the class. 502 00:58:06.809 --> 00:58:12.869 You know, various class functions, but so you, you run thrust by just having. 503 00:58:15.235 --> 00:58:29.485 Just including the header files, and then have your code. So, in Katie has got, like, 3 different locations for this stuff. And there may be different versions. So if you've got installed, then at least on my local machine, the header libraries are here. 504 00:58:29.730 --> 00:58:38.699 And via and video, so, and videos got this so they also have the K. 505 00:58:38.699 --> 00:58:42.960 Which has in it and which has also has the thrust. 506 00:58:42.960 --> 00:58:48.000 And her files, and then India and video has a GitHub repository. 507 00:58:48.000 --> 00:58:52.739 Also, and that has. 508 00:58:54.090 --> 00:58:59.010 Various things, um, see, just a 2nd, here. 509 00:59:02.309 --> 00:59:09.869 Not sharing. 510 00:59:09.869 --> 00:59:15.059 Good. Okay so I can get this way. 511 00:59:16.409 --> 00:59:20.730 Yeah. 512 00:59:21.445 --> 00:59:33.505 So you can browse around in here so any case, so thrust has the header files. It also has some examples and so on, which are in some of these places but not all of them. We'll see. And the examples are a good way to see. 513 00:59:33.684 --> 00:59:37.315 You wouldn't believe what you can do with parallel scan and that sort of thing. 514 00:59:37.590 --> 00:59:44.639 Okay, um, got some documentation online. Um, this is. 515 00:59:44.639 --> 00:59:49.019 The thing about the doc, so this is probably. 516 00:59:49.019 --> 00:59:53.280 Okay, so this is invidious documentation. 517 00:59:53.280 --> 01:00:00.539 And this is, this is the master authoritative version of it. It's got the latest version of it. 518 01:00:00.539 --> 01:00:08.159 But it can be rather dry, but you want to precise, accurate definition. We have that here. 519 01:00:08.159 --> 01:00:12.420 Um, and. 520 01:00:13.800 --> 01:00:19.590 Yes, this is a good place to go. I'm going from other things like the Stanford thing, because they've got more health to. 521 01:00:19.590 --> 01:00:24.090 They're easier to read, but you want the concise stopped. You go to. 522 01:00:24.090 --> 01:00:33.239 Video only a summarize think I may be wrong 1 thing only a summary and they also have some. 523 01:00:33.239 --> 01:00:36.239 Information here that you can go through. 524 01:00:36.239 --> 01:00:40.920 And now. 525 01:00:40.920 --> 01:00:46.710 I actually am not enormously enamored with oxygen. I. 526 01:00:46.710 --> 01:00:53.699 I don't actually like it's output, but that's just me what you can go to oxygen. What's there? Okay and we'll look at some. 527 01:00:53.699 --> 01:00:58.679 And now, the thing is the 3rd party stuff like Stanford, which I get. 528 01:00:58.679 --> 01:01:09.030 It's a few years old, but I'll spend time with it because it's very well done. So, if you accept the fact is some new things that are not in it, it's worth spending time on. 529 01:01:09.534 --> 01:01:14.815 And some new things are lambdas, which are really useful for us. 530 01:01:14.844 --> 01:01:24.744 And most of you see in lab, I'll summarize some, but just for those of you that know lamb does what I'm going to type in the chat window is a legal. 531 01:01:25.019 --> 01:01:28.380 C, plus, plus, um, um, depth. 532 01:01:30.960 --> 01:01:40.110 And everyone who knows C plus plus knows what that means, I guess square bracket parentheses racist. Okay. 533 01:01:40.110 --> 01:01:44.369 In any case, so the new tutorials don't have that and there's a new thing. 534 01:01:44.369 --> 01:01:47.730 It's the latest version of thrust has some unified memory. 535 01:01:47.730 --> 01:01:56.489 Additions so okay. And these other alternatives is a lower level thing from 1, at the energy Labs. 536 01:01:56.489 --> 01:02:00.510 Los Alamos pause I forget if it's salts Alamos or. 537 01:02:00.510 --> 01:02:08.280 Our lever March is a lower level parallel thing. You have to pay more attention to the. 538 01:02:08.815 --> 01:02:23.065 Threads and warps, but it's going to be faster and I was worried about thrust last year, because it hadn't changed much lately and invidia had a proprietary components and wasn't on get help. So it looked like they abandoned it and stopped it. 539 01:02:23.065 --> 01:02:25.494 But now it's sped up again, so that's good. 540 01:02:25.769 --> 01:02:30.750 So, for Stanford, let's see here. 541 01:02:30.750 --> 01:02:35.670 Okay. 542 01:02:35.670 --> 01:02:39.119 Got it over here. 543 01:02:39.119 --> 01:02:49.079 And I'm running this on my local laptop, but it's a Git repository. So I synchronized it to. 544 01:02:55.349 --> 01:03:00.750 Silence. 545 01:03:05.099 --> 01:03:12.210 Okay, so we had started 7. let me just refresh you. I'll go back to the start again now. 546 01:03:12.210 --> 01:03:15.269 So, what we're seeing here are some. 547 01:03:18.179 --> 01:03:27.809 We're seeing some programming paradigms, which are really especially useful for parallel programming. In fact, for sequential programming. They may not actually. 548 01:03:27.809 --> 01:03:31.440 Benefit at all segmented. Okay. Okay. 549 01:03:31.440 --> 01:03:46.320 I talk about this, we'll see examples. So you saw the scan it did a series of parcel thumbs the segmented scan puts barriers in the thing and doesn't scan across and doesn't scan across the. 550 01:03:46.320 --> 01:03:49.920 It doesn't scan across the barriers and. 551 01:03:51.719 --> 01:03:55.440 This really wasn't showing at that exact that well. 552 01:03:57.389 --> 01:04:01.829 Yeah, it shows it. Well, okay, so what we have here. 553 01:04:05.364 --> 01:04:19.644 We have the 1st row here is a set wherever there's a 1 it's a barrier and the partial sums will not cross the barrier. Okay the data here is down here. If you can see where I've got the curse. 554 01:04:19.795 --> 01:04:26.574 So, 141215232 and the, the vertical dash lines are the barriers. So the scan operation. 555 01:04:31.889 --> 01:04:43.050 Is scanning 3 separate erase that are just pasted together so the 1st array is 3 elements 141 and this would be an inclusive scan. Would be. 556 01:04:43.050 --> 01:04:56.699 156, so the data is the data we're scanning 2 rows before it steps in the scan and the bottom is the result. So we do the, we scan the 1 for 1. we get 1 5, 6. 557 01:04:56.699 --> 01:05:11.514 Other side is a barrier we've got 215 and we scan it in 3 steps and it gets to be 238. so the 2 did not go left and cross the barrier to the left. And the final array, or summing is 32 and becomes 35 was an inclusive scan. 558 01:05:11.514 --> 01:05:13.974 So this is done in parallel taking steps. 559 01:05:16.829 --> 01:05:22.320 And the advantage of it is that if you have a number of different. 560 01:05:22.320 --> 01:05:27.030 A raise and you want to do inclusive scan in the mall you put them all together. 561 01:05:27.030 --> 01:05:30.840 And, um, do the whole thing in 1 step. 562 01:05:30.840 --> 01:05:35.039 And these, all these separate arrays can be all different sizes. 563 01:05:35.039 --> 01:05:48.355 So something would 1 place where it's useful is run linked to encoding. We saw, we could do run length decoding as a scan, because you scan down the runs and you get adult factor tour. 564 01:05:48.355 --> 01:06:00.744 Each run will start and the output array. This can also be used with run length. Encoding was the actual code data, but the high level thing was from linked to end coding is wherever the run changes you make that into a barrier. 565 01:06:01.050 --> 01:06:09.179 And you basically, and then scan inside, you actually get the length of each front and then you can turn it into. 566 01:06:09.179 --> 01:06:12.480 There's a few other stages in some handwaving to the output. 567 01:06:12.480 --> 01:06:23.639 Okay, so it's called the segmented scan and the difference is, you got your data, right? And you've got the flags or wherever there's a 1 flag that means a barrier. 568 01:06:23.639 --> 01:06:29.730 And if we look back here, the 1 is the start of a new segment segmented scan. Okay. 569 01:06:29.730 --> 01:06:33.780 And this is how it could be coded. 570 01:06:33.780 --> 01:06:38.519 And I'll skip over that you can look at that. 571 01:06:38.519 --> 01:06:44.820 Reductions of unpredictable size you could also not just for scanning. You could do reductions in sums and so on. 572 01:06:44.820 --> 01:06:48.059 Yeah, you know, doing this reduction over. 573 01:06:48.059 --> 01:06:58.170 A lot of variable size to raise that are all pasted together and the, it'd be like a segment and reduction would be the same sort of thing. It would add up each little subset. Okay. 574 01:06:58.170 --> 01:07:03.780 Sorting in segment. Okay. 575 01:07:03.780 --> 01:07:11.940 And divide and conquer. Okay, so that's the segmented scan is a useful parallel paradigm. 576 01:07:11.940 --> 01:07:15.090 Sorting is useful because. 577 01:07:17.664 --> 01:07:28.465 And a lot of programming, like, bucketing, for example, you've got data scattered, over the array, and you have to bring the data together in 1 place. The data is the same type. 578 01:07:29.005 --> 01:07:43.195 Like, if you're doing a histogram, you're summing up the frequency of occurrence of each letter of the alphabet in this text. So all of the age is scattered over the document. You got accounts and all the pieces scattered over the document and that's a random access issue. 579 01:07:43.195 --> 01:07:57.295 And random accesses can be slow on a parallel computer. They don't play well with the cache. What you're randomly reading on. Sorry started the cash. You've got to pull it out of the global memory, which might have maybe 200 cycle latency. 580 01:07:58.440 --> 01:08:02.699 So something else can start while you're doing that, but still. 581 01:08:02.699 --> 01:08:10.860 Well, 1 way to bring things together, for example, if you have a document and you want to histogram all the letters. 582 01:08:11.755 --> 01:08:25.824 You might just sort the document and sort the whole thing bring on. So, then all the Acer at the start all the bees, and then all the SES and so on, and then you would actually do a segment and then you'd find the or the ladder changes. That's a separate issue. 583 01:08:26.100 --> 01:08:30.689 Can be done and sort of do account. 584 01:08:30.689 --> 01:08:35.220 That sounds inefficient because there is that sort, but. 585 01:08:35.220 --> 01:08:49.704 The thing is, because you think that starts 2nd log in time, like quick. So that's only a CS 1 sort that takes that log in time in a case like this you deserve Radix sort, which would take linear time and reasonably fast, linear time. 586 01:08:50.244 --> 01:09:01.074 So, you could use the sort to do as this is 1 way to do and it's a serious way to do. Sometimes you sort to bring the common elements together and then count them in order. 587 01:09:01.380 --> 01:09:04.800 Because the alternatives might be worse. 588 01:09:05.395 --> 01:09:19.765 So, okay, well, the counting all the letters in a document and you've only got 26 letters so that's not bad. You just have a, you have here every accounts in your fast shared memory, but if you're doing something, maybe you're. 589 01:09:20.369 --> 01:09:26.220 Grabbing something where there's a 1Million keys, not just 26 keys and a 1Million won't fit. 590 01:09:26.220 --> 01:09:30.510 And your fast shared memories so there are sort might be the way to do it. 591 01:09:30.510 --> 01:09:33.989 Okay, so stop bidding and sorting. 592 01:09:33.989 --> 01:09:41.460 The Radix sort is goes back. 593 01:09:42.600 --> 01:09:46.560 A 100 years or more, I guess, and. 594 01:09:46.560 --> 01:09:59.369 It so actually was used with physical cards. There were things called show you what a punch card is. I just have fun. Have some of them. Let me see here. 595 01:09:59.369 --> 01:10:05.010 Either punch cards. 596 01:10:05.010 --> 01:10:09.689 If you have a program, each card has 1 line of. 597 01:10:09.689 --> 01:10:13.380 1 line of your program and. 598 01:10:13.380 --> 01:10:16.829 You can see the bits actually as a whole. 599 01:10:16.829 --> 01:10:29.039 And if you have data file or something, each card might be 1 person, it would have characteristics of that person and you would sort them and this was invented for the. 600 01:10:29.039 --> 01:10:37.800 1890 sends us, I believe it was all our cards and there were the size of what the dollar bill was back then. Okay. 601 01:10:37.800 --> 01:10:45.239 Any case so you Radix sort them there was a machine would sort of 1500 cards a minute. Yeah, that's a lot of cards. A 2nd. 602 01:10:45.239 --> 01:10:56.010 Okay, do a Radix sort the thing is the sword on the least significant tangent into 10 piles. We put them together. Then you saw it on the on the 2nd digit. 603 01:10:56.010 --> 01:11:03.630 The 10 stage yet, put them all together and sort on the 100 stage it and so on at the end of it, you've done a solid time 3 digit numbers. 604 01:11:03.630 --> 01:11:10.380 Okay, the map reduce I mentioned it before again, it goes back 60 years or more. 605 01:11:10.380 --> 01:11:20.939 Google spot re, popularized it. So the math part is we apply a function to each element of the array, write out a new array and then reduce is. 606 01:11:20.939 --> 01:11:29.310 Sum it up or segmented scan or whatever and the thing is, you do the map and reduces 1 step. You never actually create that intermediate, or right. 607 01:11:30.869 --> 01:11:37.079 Here's an example that they're doing a map and it's a segmented reduced so we got some input. 608 01:11:37.079 --> 01:11:40.619 We're applying the functions. 609 01:11:42.119 --> 01:11:51.840 Some function am, and then there's a key and we're grouping stuff. So key 1 key 2 key and the. 610 01:11:51.840 --> 01:11:57.869 Each record has a key in a value, but the written, the case, the random and not sorted, but. 611 01:11:57.869 --> 01:12:03.180 What we do is we could group them by key, or that would actually be some sort of. 612 01:12:03.180 --> 01:12:13.649 Storage and reduction actually hit that more later. So, the idea is, this would be a segmented reduction. We want to sum all of the values that have key 1. 613 01:12:13.649 --> 01:12:16.739 Some all the values that have key to and so on. 614 01:12:18.600 --> 01:12:24.359 So, however, you want to do the reduction, but then we do the mapping and the things that could sort of segment it. 615 01:12:25.135 --> 01:12:36.385 Okay, so this is, this is what the example here is. Excuse me? You've got some domain, some array, apply the function and get key value. 616 01:12:36.414 --> 01:12:40.135 So now you've got an array of key value pairs and you want to reduce. 617 01:12:40.380 --> 01:12:44.939 Segment and reduce effectively reduce all the values for each key. 618 01:12:44.939 --> 01:12:49.229 And it's a sort of thing that's more valuable again. Parallel programming. 619 01:12:50.430 --> 01:12:57.869 Sort and well, that's 1 way you might do it is sort them and so on. 620 01:12:57.869 --> 01:13:00.869 That, but the point is, you want. 621 01:13:00.869 --> 01:13:03.930 The value is for each key reduced. 622 01:13:07.229 --> 01:13:13.229 And find the biggest value for each key, or the sum of all the values, or whatever. 623 01:13:14.699 --> 01:13:20.550 And that's could be a scan down the sorted array perhaps, but segment it. So. 624 01:13:21.744 --> 01:13:33.654 And again, on a sequential machine, you could imagine link lists, perhaps pointer chasing and whatever, but that's going to be slow on a parallel thing. The other thing is, as I told you, I was grumbling a few classes later. 625 01:13:33.654 --> 01:13:40.585 1 of my programs I said was the smallest part of the whole program, which is true, but still, it's not bad. Okay. 626 01:13:42.390 --> 01:13:56.909 Colonel fusion is when you've got a couple of functions applied 1 after the other, like, map and reduce, you want to fuse. Now, the naive way is there separate kernels colonel, being a parallel program running. 627 01:13:56.909 --> 01:14:01.079 On the GPU I'm running on the creative could, of course. 628 01:14:01.079 --> 01:14:07.050 And so if you're doing a map and then a reduced, you don't write out the intermediate data, you. 629 01:14:07.050 --> 01:14:11.489 You fuse those 2 parallel kernels and you've got 1 colonel that does both things. 630 01:14:11.489 --> 01:14:19.619 In some of the theoretical computer science classes, we, they talk about issues. 631 01:14:19.619 --> 01:14:27.119 Involve composing functions so another terminology for this is the function composition. 632 01:14:27.119 --> 01:14:30.689 You guys, you're applying 1 function after another you have, you. 633 01:14:30.689 --> 01:14:37.614 Define the composition of those 2 functions so you have Eva algebra operating on functions. 634 01:14:37.975 --> 01:14:50.425 It combines 2 functions with the elements are functions and the operator's composition and you combine 2 functions to make a 3rd function. So, even algebra functions in a sense. Exactly. 635 01:14:50.425 --> 01:14:55.465 Actually, not even in a sense and so we're doing so, this has an actual use here. 636 01:14:55.920 --> 01:14:59.310 On the parallel computing we want to have the combos. 637 01:14:59.310 --> 01:15:03.569 Functions and execute the combo the reason. 638 01:15:03.569 --> 01:15:06.989 We do this is we've got bless data, Ohio. 639 01:15:06.989 --> 01:15:11.640 Less bandwidth. 640 01:15:11.640 --> 01:15:15.989 Silly example, you want to count how many even. 641 01:15:15.989 --> 01:15:23.970 Numbers here are in our array, so we have a predicate here returns a Boolean. 642 01:15:23.970 --> 01:15:29.100 Test if it's even or not. 643 01:15:31.199 --> 01:15:36.840 Okay, this is crappy code here. You don't need to have this complicated thing you just say. 644 01:15:38.609 --> 01:15:42.090 Well, you know, because you just say, and I present to. 645 01:15:42.090 --> 01:15:46.890 And that's error 1 you don't need to have these extra stages here. 646 01:15:46.890 --> 01:15:57.000 And then maybe negated or something if you want to 0 or 1 cents reversed, and you have to return the output to because the global functions have to be void. 647 01:15:57.000 --> 01:16:07.770 Okay, so we got this as a credit, then we want to scan and count. These are 2 separate kernels here 2, separate global functions. Well, of course, the efficient way to do is you combine them. 648 01:16:08.789 --> 01:16:12.180 And so it's so simple, you know, why. 649 01:16:12.180 --> 01:16:18.779 Why am I spending time on her spending time? Because interest they've actually got tools to make this work better. So. 650 01:16:18.779 --> 01:16:22.949 Fuse colonel colonel Fusion. 651 01:16:22.949 --> 01:16:33.180 Yeah, you see, so we're composing function. G. g applied to f, apply to an argument and the composed function. 652 01:16:33.180 --> 01:16:37.439 Silence. 653 01:16:37.439 --> 01:16:51.539 And I think too interesting here, but you get the idea. We have 2 separate kernels. Now you might imagine and optimize that. Compiler would do that for you. But I don't think it does it yet. 654 01:16:51.539 --> 01:16:57.449 So, skip through these fast, you get the concept, which is. 655 01:16:57.449 --> 01:17:01.409 You do it in 1 parallel frontal instead of 2. okay. 656 01:17:01.409 --> 01:17:05.399 Interesting backup slides. 657 01:17:05.399 --> 01:17:10.020 Again, we've got data and we've got flags. 658 01:17:10.020 --> 01:17:17.819 We'll show you what's happening in the 1st, few things here. We do a segmented scan of that. Now you wonder. 659 01:17:18.840 --> 01:17:28.585 What's the point your dad is just all ones all what? This is doing this is doing run length and end coding because so the data's just to tell me I raised. 660 01:17:28.585 --> 01:17:39.114 The interesting thing are the flags and the flags are the barriers between the different runs and a segmented scan of the data using the flags. The output is now. 661 01:17:40.260 --> 01:17:43.890 Segment is now the lengths of each 1. 662 01:17:43.890 --> 01:17:49.649 Well, the I know he will be the length of that run so it's 1 step along the encoding. 663 01:17:49.649 --> 01:17:59.460 So Here's another example, you can do some other funny things here. 664 01:18:01.590 --> 01:18:09.449 You put flags you could generate. Okay so the 1st thing, the interesting stuff was in the flags the. 665 01:18:09.449 --> 01:18:14.340 Data was I'm just dummy and the 2nd thing here. 666 01:18:14.340 --> 01:18:26.729 I just think what they're doing, but the interesting thing is in the step array, and from the step array, they may be generating. 667 01:18:27.869 --> 01:18:31.140 I have to think what they're doing. I'll look to the sides, so. 668 01:18:31.140 --> 01:18:45.869 I'll have to think what's happening here, but they generate the flag from the step Ryan and do something interesting. 669 01:18:45.869 --> 01:18:49.380 Something interesting with the flags of so. 670 01:18:51.180 --> 01:18:55.800 Well, this is an inclusive scan, so, and I don't know what's happening. 671 01:18:55.800 --> 01:18:59.760 Yeah, we were just singing closer scans on that, but it's. 672 01:19:01.770 --> 01:19:06.750 Counting up something in the array. Okay. 673 01:19:06.750 --> 01:19:11.430 So, I was finishing off Stanford lecture 7. 674 01:19:11.430 --> 01:19:14.850 Good time to stop now so. 675 01:19:16.680 --> 01:19:26.460 To get away, get lunch, I'll get lunch, but before I go, does anyone know what that lead? All? C. plus plus code fragment I type in the chat window. Does. 676 01:19:26.460 --> 01:19:33.180 Where brackets round? Parentheses curly braces. That is a legal C. plus plus cold fragment. 677 01:19:35.220 --> 01:19:39.420 Any idea no. 678 01:19:39.420 --> 01:19:45.270 Okay, and see you on. 679 01:19:47.789 --> 01:19:51.539 Thursday. 680 01:20:20.970 --> 01:20:31.229 Oh, I got an answer here. I didn't see, I don't know what's going on. It's not scrolling. It's yes, it's a Lambda function, build an array. No fault. No. 681 01:20:31.229 --> 01:20:35.489 Mark Lambda function, but what does it do. 682 01:20:36.689 --> 01:20:42.119 You're right markets, alarmed function it's alarmed of it's a personal legal Lambda function that does nothing. 683 01:20:42.119 --> 01:20:56.279 It does nothing Spanish, always inheriting data from the global environment. That's what the brackets do. It takes no arguments. That's what the parentheses are and it does nothing. And this body is nothing that's embraces. 684 01:20:56.279 --> 01:21:01.590 Okay, good. Bye. 685 01:21:05.460 --> 01:21:11.850 Which is the 2nd chair. 686 01:21:11.850 --> 01:21:17.399 Silence.