Skip to content

Commit

Permalink
add TODO
Browse files Browse the repository at this point in the history
  • Loading branch information
samumantha committed Sep 28, 2023
1 parent d6dddc6 commit 29ae65d
Show file tree
Hide file tree
Showing 10 changed files with 150 additions and 6 deletions.
2 changes: 2 additions & 0 deletions materials/csc.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@

Geoportti Research Infrastructure (RI) is a shared service for researchers, teachers and students using geospatial data and geocomputing tools. Geoportti RI helps the researchers in Finland to use, to refine, to preserve and to share their geospatial resources.

TODO: text fix, logo

## [Location Innovation Hub](https://locationinnovationhub.eu)

The Location Innovation Hub (LIH) is a centre of excellence in location information coordinated by the Finnish Geospatial Research Institute. Our services are produced in conjunction with a partner network. We help companies to grow their business with location information. We also serve the public sector.

TODO: text fix, logo
3 changes: 2 additions & 1 deletion materials/exercise_basics.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Exercise - basics

## Interactive
TODO: update to fit here; current texts from env eff course

## Interactive

# Batch job tutorial - Interactive jobs

Expand Down
1 change: 1 addition & 0 deletions materials/fair_share.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Fair share of use

TODO: fix texts and reorder
TODO: restaurant analogy?


Expand Down
2 changes: 2 additions & 0 deletions materials/htc.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# High Throughput Computing (HTC) and parallelization

TODO: fix texts and reorder

## Running things at same time

* within batch script
Expand Down
7 changes: 3 additions & 4 deletions materials/jobs.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

# Jobs

TODO: fix texts and reorder

![](./images/puhti_overview.png)

## Jobs and queueing
Expand Down Expand Up @@ -41,17 +43,14 @@ srun hostname # Print compute node name that has been allocat
* `scancel <jobid>`


# What if your job fails? Troubleshooting checklist 1/2
# What if your job fails? Troubleshooting checklist

1. Did the job run out of time?
2. Did the job run out of memory?
3. Did the job actually use the resources you specified?
- Problems in the batch job script can cause parameters to be ignored and default values are used instead
4. Did it fail immediately or did it run for some time?
- Jobs failing immediately are often due to something simple like typos, missing inputs, bad parameters, _etc_.

# What if your job fails? Troubleshooting checklist 2/2

5. Check the error file captured by the batch job script
6. Check any other error files and logs the your program may have produced
7. Error messaged can sometimes be long, cryptic and a bit intimidating, but ...
Expand Down
2 changes: 2 additions & 0 deletions materials/own_project.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Own project hints

TODO: fix texts and reorder

* keep scripts under version control (also simplifies collaboration and synchronising different computers, e.g. git(hub))
* on Puhti:
* scripts in `/projappl/project_200xxxx/your_groupname/`
Expand Down
1 change: 1 addition & 0 deletions materials/support.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# CSC support

TODO: clean up

[`docs.csc.fi`](https://docs.csc.fi)

Expand Down
2 changes: 2 additions & 0 deletions materials/teachers_guide.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Teachers guide

TODO: write

Work in progress.
134 changes: 133 additions & 1 deletion materials/terminal.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,138 @@
# Terminal

TODO: Shorten and share with prerequisites
TODO: Check advanced

## Why use?

TODO: fill

## Basic Linux commands

> ‼️ To begin make sure you have a [user account at CSC](https://docs.csc.fi/accounts/how-to-create-new-user-account/) that is a member of a project which [has access to the Puhti service](https://docs.csc.fi/accounts/how-to-add-service-access-for-project/).
> ☝🏻 You should also have already [logged in to Puhti with SSH](https://csc-training.github.io/csc-env-eff/hands-on/connecting/ssh-puhti.html) or via the Puhti web interface (and opened a login node shell).
## Navigating folders

1. Now that you have logged in to Puhti, check which folder you are in by typing `pwd` and hitting `Enter`:

```bash
pwd
```

{:start="2"}
2. Check if there are any files:

```bash
ls
```

{:start="3"}
3. Make a directory and see if it appears:

```bash
mkdir YourNameTestFolder # replace YourName
ls
```

{:start="4"}
4. Go to that folder.

```bash
cd YourNameTestFolder # replace YourName
```

💡 Note: if you just type `cd` and the first letter of the folder name, then hit `tab` key, the terminal completes the name. Handy!

## Exploring files

1. Download a file into this new folder. Use the command `wget` for downloading from a URL:

```bash
wget https://github.com/csc-training/csc-env-eff/raw/master/_hands-on/linux_prerequisites/my-first-file.txt
```

{:start="2"}
2. Check what kind of file you got and what size it is using the `ls` command with some extra options:

```bash
ls -lth # options are l for long format, t for sorting by time and h for convenient size units. Anything that starts with a hashtag is a comment and is not executed
```

{:start="3"}
3. Use the `less` command to check out what the file looks like:

```bash
less my-first-file.txt
```

{:start="4"}
4. To exit the `less` preview of the file, hit `q`.

💡 Tip: Instead of `less` you can use `cat` which prints the content of the file(s) straight into the command line. For long texts `less` is recommended.

{:start="5"}
5. Make a copy of this file:

```bash
cp my-first-file.txt YourName-first-file.txt # replace YourName
ls -lth
less YourName-first-file.txt # replace YourName
```

{:start="6"}
6. Remove the file we originally downloaded (leave your own copy).

```bash
rm my-first-file.txt
ls
```

💡 Tip: If you don't want to have duplicate files you can use `mv` to 'move/rename' the file. Syntax is the same: `mv /path/to/source/oldname /path/to/destination/newname`.

## More information

- Learn [how to edit that file](https://csc-training.github.io/csc-env-eff/hands-on/linux_prerequisites/basic-file-editing.html) in the next tutorial!

💡 For more information of a given command line `command`: type `man command` or `command --help` where `command` is replaced with the one that you need help with.

💡 Tip: If you remember *a part of a command* that you have used recently you can search for it with the command `history | grep string`. This will show all your used commands that have included the string `string` (replace this with the pattern you are searching for).

## Basic file editing

> ‼️ To begin, make sure you have a [user account at CSC](https://docs.csc.fi/accounts/how-to-create-new-user-account/) that is a member of a project which [has access to the Puhti service](https://docs.csc.fi/accounts/how-to-add-service-access-for-project/).
> ☝🏻 You should also have already [logged in to Puhti with SSH](https://csc-training.github.io/csc-env-eff/hands-on/connecting/ssh-puhti.html).
> ☝🏻 Note: For graphical output to work you need to log in with `ssh -X [email protected]`. On Windows/macOS you also need to have an X server installed and running. [See details in the previous tutorial](https://csc-training.github.io/csc-env-eff/hands-on/connecting/ssh-puhti.html#remote-graphics). Another option is to use the Puhti web interface.
In the [previous tutorial](https://csc-training.github.io/csc-env-eff/hands-on/linux_prerequisites/basic-linux-commands.html) we downloaded a file called `my-first-file.txt`, made a copy of it named `YourName-first-file.txt`, and now we practice how to edit it!

💬 These exercises are done with the `nano` editor, but you can use your favorite editor too.

💡 Here's a [nano cheat sheet](https://www.nano-editor.org/dist/latest/cheatsheet.html)

## Processing text files

1. Open the file with `nano`:

```bash
nano YourName-first-file.txt # replace YourName
```

{:start="2"}
2. Edit the file. Type something there!
3. Exit `nano` with `Ctrl+X`, type `Y` to confirm saving and press enter to accept the filename.
4. Check that the modifications are actually there:

```bash
less YourName-first-file.txt # replace YourName
```

{:start="5"}
5. Exit the preview with `q`.

## Login with SSH

- SSH is a terminal program that gives you command-line access on the CSC supercomputer
Expand All @@ -25,4 +158,3 @@
- Follow these [detailed instructions to set them up](https://docs.csc.fi/support/tutorials/remote-dev/)
- Note that [Visual Studio Code](https://docs.csc.fi/computing/webinterface/vscode/) and [Jupyter Notebooks](https://docs.csc.fi/computing/webinterface/jupyter/) are also available through the Puhti web interface

## File editing
2 changes: 2 additions & 0 deletions materials/terminology.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Terminology

TODO: clean up and texts

- You can roughly think that one **node** is a single computer
- A node on a supercomputer contains:
- One or more central processing units (**CPUs**) with many **cores**
Expand Down

0 comments on commit 29ae65d

Please sign in to comment.