 Hello, we're back. So hopefully this break was not too long for anyone and was not too short for anyone. At least hopefully you had some time to go walk around some. There's a little poll here you can answer your current status if you would like. There were some comments up here. Is there anything that we need to go through? From what I saw it was mostly answered there. Yeah, and I'm pleasantly surprised that there are so many circles in the connected role. So actually it looks much better than I anticipated. So that's good. And remember, if it doesn't work, you can keep watching and listening now and get some help by tomorrow. We designed this so you have this time. For example, for example, me, my connection broke this morning, so I have some homework to do this evening. Yeah, it happens. Okay, I'll also point out that at the bottom of the page, there's already a feedback poll for day one. You can answer what you think about things here. Yeah, and well, keep thinking of that, but we'll have time to discuss all those later. So what's next is this tutorial using the cluster from the shell. And I will switch to my screen here. Oh, I need to share. Okay. Oh, yes, this is me. So. Yeah, so we are right down here. I will open the material. Okay. And can someone, oh, it is in the notes. Yeah, this is a sort of interesting lesson we've got here. So before the course, we were talking and realized this is an almost impossible challenge. Like there's whole day long or multi day long workshops or multi week courses on using shells and Linux and Unix efficiently. So we really need to be careful and clarify what it is we're trying to do here. So our goal is to provide enough background so that tomorrow when we start using the cluster. Things are not completely like, like, it's not impossibly difficult to get started, and you actually can come and sort of follow along. So that means you don't need to answer, you don't need to know everything, but if you can do the different exercises in here, then it'll be good. And in practice, this is probably partly a homework kind of thing because we just don't have time to do everything in 25 minutes. So let's get started. So where are we here and what do we do. So we're talking about how we're using the raw interface, the shell, the terminal, the command line interface, which we got connected to previously. So in this lesson, we're still just here on the login node. So we're not actually using the whole cluster, and you will see some important notes about that as we go down. You don't want to go starting trying to run all your stuff here and ignoring the cluster because, well, you will get a nice email from us saying please use the cluster don't run on the login node. There's some terminology here. So in practice, terminal shell and command line interface, as far as you need to know they mean the same thing. So they have slightly different like meanings in the whole thing, but it doesn't really matter. What does matter is that it is a command line interface and we need to use it. So why? So Table or Cmo, do any either of you have comments on why we use command line interfaces? Well, I would say that like, like if you think about you want to automate some stuff, you want to do something like you would normally do something like create a folder in your computer or open a new document or something. If you want to do it in a fashion that is like interchangeable across multiple systems, like multiple different kinds of systems, and you want to do it in a way that it can be done programmatically. So you want to program the thing instead of like, instead of like click here, click there, do this, do that, like instead of giving these instructions like you would maybe give like, okay, like there's a big X at the side of your window. You give it in a way that a computer can understand it, like these kinds of like creation things and stuff. This is the language to do that, like housekeeping, but for computers. So basically instructions for computers on how to do stuff. And this is the way of doing it. Maybe in our metaphor. So we were talking about cooking with the cooking metaphor to computing. So you could get this nice industrial kitchen and go there and cook a bunch of stuff yourself, but that will be slow. Instead, this course is about getting you manager training and that manager training will help you to script using the shell, a bunch of other cooks that will go use all the industrial kitchen cook your stuff and give it to you so you can inspect it and use it for the next things. And the only possible way to do that is with these kinds of interfaces. Okay, let's see. So this is a picture you probably saw something that looked like this later. This is what we need. So when you run things from the terminal, there's usually this dollar sign which represents that it's the terminal itself. There's some program name. Actually, I should make this a bit bigger shouldn't I. There's some program name, and then the program has different options. So for example with Python, the name of the thing we're running is Python. We give Python the script file we need to run. And then we can give it a bunch of different arguments that control what happens. This is something that you will see. You'll have my cat tries to go out. I don't think it can fit or will go but yeah. Okay. But yeah, so you'll see more about this during the rest of the course so realize this is what you're going to be seeing here. Next up is files and directories. So, okay, it's not actually going out it just in between the two windows. Yeah, I was kind of like, I was, I was kind of thinking that it's between the windows again, but I still got a little jump. Yeah. Okay. So files and directories and that's what we're really trying to cover here. So, um, yeah. Could I demo? Yeah, can you comment? Yeah. Yeah, okay. So I will switch to Cimo screen or Cimo just grab the screen to share from me. Yes, sure. So, so when we're talking about files and directories, you might be familiar with files and directories in this kind of like a way they are like organized in these file browsers and places like that, or in your Google Drive or whatever. But in a cluster, like, I'm now constantly in a file directory. But the default file directory is your home directory. So, so that if I type CD, I will always go to my home directory. I can always check my directory with, I don't know why it's called PWD, but like something working directory. I don't know what the P stands for. What is it? Print, maybe. Oh, yeah, that's true. Yeah, that makes sense. So it's usually something like home, home and something. And there's like a root, like slash, it's called a root, which where all the directories like go from. So it's like a tree. And at every branch of the tree, there's a slash. So this means that I'm at the folder home slash my username. And this is where you are. And in the folder, if I type LS, you can see that there's lots of, lots of my files like lots of crap here. I haven't cleansed it, but there's a lot of stuff here currently. And these are files and it might look different to you. I have a different coloring here, but there's files and folders here. Some of these are folders and some of these are files. So tomorrow we'll learn more about what the different storage places are that's available. So for example, you might need to change to your work directory, which is the large place that's designed for computing work. Would you like to demonstrate that? Yes. So, so in our cluster, the work directory is in this scratch file system. So it's like slash and scratch when we talk about scratch, we talk about this. And there, there's a folder called work. And there's my username. And this is my work directory. You don't see like, when I type CD and the name of the directory, nothing happens like it looks like nothing happened. But if I type now the PWD again, you'll notice that I changed directory. So CD is changed directory. And over here, there's different files here. And, and now I'm at the different directory. It's, it can get confusing, but it's also often good to run this PWD just check where you are, so that you know what directory you're in. Yeah. So now next up, we will talk about copying code to the cluster. So this is often something that takes a lot of time and can be difficult for a lot of people. You have stuff on your laptop, you have stuff on the cluster, you need to move stuff both ways. So yeah, we talk about this tomorrow, but we're going to show one strategy now, which is what we need to do the rest of the course. Arranging this course like a real project. We have this git version controller repository, which is basically a way to store stuff on the cloud and lets you synchronize and move things around. We can't go into that now, but maybe someone can paste the git intro. Yeah, in the, in the documentation, there's this, this magic line. So what this tells, like what we run here a command called it which will Wait, first, can you go to your home directory? Yes, sir. Yeah, let's do it there. Yeah. So what we're about to do will work for any cluster in the world, we've specifically made it using this Git repository so that it can be cloned to any computer. Yes. So okay, so yeah, he just did stuff. So, in your home directory, we copied this git clone command, and you don't really need to know what it means, but basically, it's taking from the GitHub service and now has made a new directory called HPC examples. Can you change to there and listen? You notice that I don't type the full path here, even though like I'm at the home directory, because I can go relatively to the current part where I am. So I can own, I can already type the HPC examples. And usually when you're running these terminals, you can use tab to autocomplete. So if you notice that something suddenly jumped out there, it meant that I pressed the tab character, so on the keyboard left side, and it will autocomplete words for you. Okay. So we have 10 minutes left. I propose we show the quick example of running a basic program, and then we can give people some time to play themselves. Does that sound good? Sounds good. Okay. So now Cmo has changed to the HPC examples directory, and we're going to use Python three to run a simple pie calculation script. So here we're running it on the login node of the cluster, which we've just told you you shouldn't do, but this takes only a second or so so it's reasonable to try for development purposes. So here we go. We told to use the Python program. We gave it the relative path to the Python file, and then one argument, which is the number of iterations. And this uses some simple stochastic algorithm to give a really bad and inefficient estimate of pie. And if the exercises you'll see more examples of using this with different arguments and things like that. I guess we should show how to edit a file at least. Can you show using the nano editor to open up the pie example? Yes. So if I type nano and name of the file. So nano is what's called a text editor. The name comes because there is a previous program named Pico. Okay, and now you can scroll through. Can you give an example of typing something, maybe add a comment somewhere? So I guess Cimo is using the arrow keys to scroll up and down. And then to save you can do control X and then push Y. So it's easy to save and exit with nano. And that's the reason we're talking about it now, but there's plenty of other editors to use later. And nano is usually already installed. So you can just type nano. And tomorrow we'll be talking a lot more about like remote connection to the data as well. So there are other ways of editing files in the cluster, but it's very important to get like this basic language so that you can do basic stuff in the cluster using the terminal. And moving files, copying files, editing files, opening files, these kinds of things are something you do all the time. So it's very important to get it into your system to like get familiar with this interface. Okay, so I propose we stop here. People can basically read what else is here. You can read faster than we can talk. We can keep answering your questions by the notes, which I will now go back and share. Yes. And maybe let's be back a couple minutes before the 25. So let's come back two minutes before. And yeah, so we know you don't, we don't, you don't have time to do everything here, but play around a little bit and do the rest tonight. Okay. And I would recommend going to check first the exercise and try to do the exercises. If you don't know what the exercise is talking about, scroll a bit up and check the contents there because that way it's good. A good way of like quickly skinning through the material like first start with the exercise and then then if you be lost then check the contents and then retry the exercise. Okay, great. Thanks a lot. See you soon. Okay. Hello, we're back. And there's some good comments and stuff here. I think most things are probably answered. There's a good question. How do I move a program from my local repository to your computer. So unfortunately that's a bit beyond the scope of what we can possibly cover right now. We talk a bit more about data transfer tomorrow, but we tried to just show you one really basic thing that lets you do the exercises for the rest of the day. Um, yeah. Okay, and we can keep answering questions about this shell stuff. And really even in the future, if you have questions about using the shell efficiently, don't be afraid to ask because it really is like learning both a whole language and culture at the same time. Sitting down and reading a book, I think doesn't work, but being immersed and asking people for advice does. So what comes next? Thank you.