Skip to content
This repository was archived by the owner on May 3, 2021. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
13a0ffa
Update allas-exercises.md
kkmattil Mar 19, 2021
037e7ec
First draft of Linux 101 exercises
mlehtiva Mar 23, 2021
1ae576c
Update README
mlehtiva Mar 23, 2021
d107e15
Add a test text file
mlehtiva Mar 23, 2021
40f1032
Testing...
mlehtiva Mar 23, 2021
28e9999
testing
mlehtiva Mar 23, 2021
fc3d720
Basic file editing draft
mlehtiva Mar 23, 2021
6de88d1
Merge pull request #37 from CSCfi/Linux101
mlehtiva Mar 23, 2021
79029c2
Fix the test file URL
mlehtiva Mar 23, 2021
50cf27a
Linux styling (#38)
attesillanpaa Mar 25, 2021
caea101
Kkmattil allas (#36)
kkmattil Mar 25, 2021
f4de0c7
fix title slide, some formatting (#39)
attesillanpaa Mar 25, 2021
67f3ca4
add moving files etc (#40)
attesillanpaa Mar 26, 2021
3263d11
Add GIS exercises
ktiits Mar 26, 2021
e505e58
Batch hands (#41)
attesillanpaa Mar 26, 2021
1a88283
Add some clarifications
mlehtiva Mar 29, 2021
ff144c4
Clean up the readme
mlehtiva Mar 29, 2021
4846af6
Add some clarifications!
mlehtiva Mar 29, 2021
83c5d9e
Corrected typos
amsaren Mar 29, 2021
8946a3f
Fix link to NoMachine tutorial
mlehtiva Mar 29, 2021
ce2ad0d
Edited slides
amsaren Mar 29, 2021
270af47
Merge branch 'master' of https://github.com/CSCfi/csc-env-eff
amsaren Mar 29, 2021
10a1d74
Formatting
amsaren Mar 29, 2021
0be76f0
Edits
amsaren Mar 29, 2021
1e6fe9e
Link change
ktiits Mar 30, 2021
6f1a03c
Changed docker example
amsaren Mar 30, 2021
f2c9dc5
Added clarifications
amsaren Mar 30, 2021
808baf0
add more tips (#42)
attesillanpaa Mar 30, 2021
6334fb1
trim last slides (#43)
attesillanpaa Mar 31, 2021
0776b0b
Ssh swap (#44)
attesillanpaa Mar 31, 2021
45737b5
Added images
amsaren Mar 31, 2021
72f48be
Merge branch 'master' of https://github.com/CSCfi/csc-env-eff
amsaren Mar 31, 2021
92baf77
Changed page size
amsaren Mar 31, 2021
197f24d
Changed page size
amsaren Mar 31, 2021
cd97da1
Added slides
amsaren Mar 31, 2021
2f0ca85
syntax (#46)
attesillanpaa Mar 31, 2021
a4c9cd9
final commit - work continues elsewhere
attesillanpaa Apr 1, 2021
5a30de0
Create allas-mini-turoial.md
kkmattil Apr 6, 2021
1165f74
Update and rename allas-mini-turoial.md to allas-mini-tutorial.md
kkmattil Apr 6, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# For future use
# Deprecated

May contain html version of the content at some point
Don't edit this repository. Work continued in https://github.com/csc-training/csc-env-eff
61 changes: 39 additions & 22 deletions hands-on/allas/allas-exercises.md
Original file line number Diff line number Diff line change
@@ -1,41 +1,55 @@
# Using Allas in CSC HPC environmnest
# Using Allas in CSC HPC environments

Before the actual exercise, open the view to the Allas service in your browser using the cPouta WWW-interface.

Open: https://pouta.csc.fi

And login with your account.

From the upper left corner, you find a project selection pop-up menu. If you have several projects available, select the
training project: **project_2002389**

Then from the menu in left side of the interface, select:

**Object Store -> Containers**

During the exercises, you can use this interface to get another view to the buckets and objects in Allas.
Note that you need to **reload** the view in order to see the changes.

=======


## A. Log in Puhti and use scratch

1. Login to puhti.csc.fi and move to scratch:

**Linux/mac**
```text
ssh [email protected] (replace XXXX with your user account)
ssh [email protected] (replace XXXX with your csc user account)
```

**Windows/PuTTY**

**host:* puhti.csc.fi

**login as:** XXXX (replace XXXX with your account number)
**login as:** XXXX (replace XXXX with your csc user account)


In Puhti check you environment with command:
In Puhti check your environment with command:
```text
csc-workspaces
```
Switch to the scratch directory of your project
```text
cd /scratch/project_2002389
cd /scratch/project_2002389 # note! replace the text here (and below) with your project
```
And create your own sub-directory, named after you training account:
And create your own sub-directory, named after your training account (if this directory does not yet exist):
```text
mkdir XXXX
```
(relace XXXX with your user account)
(replace XXXX with your user account)

Make the directory permissions such, that other group members can only read the contents but
not modify it
```text
chmod g-wx XXXX
```
move to the new directory.
move to the directory.
```text
cd XXXX
```
Expand All @@ -51,16 +65,18 @@ ls -ltr
tree pythium
```

## Using Allas
# Using Allas

Open connection to Allas:
```text
module load allas
allas-conf
```
If you have several Allas projects available, select the training project we are currently using.

### Upload case 1. rclone

Upload the data from Puhti to Allas with rclone. Use the command below (replace XXXX with your user account):
Upload the data from Puhti to Allas with `rclone`. Use the command below (replace XXXX with your user account):
```text
rclone -P copyto pythium allas:xxxx-genomes-rc/
```
Expand All @@ -78,12 +94,12 @@ rclone lsf allas:xxxx-genomes-rc/

Check how this looks like in the Pouta web interface. Open browser and go to: [https://pouta.csc.fi/](https://pouta.csc.fi/)

In Pouta interface, go to _object store_ section, list the buckets (that are here called as “Containers”).
In Pouta interface, go to _object store_ section, list the buckets (which are here called as “Containers”).
Locate your own _xxxx-genomes-rc_ directory and download one of the uploaded fasta files to your local computer.

### Upload case 2. a-put

Upload the pyhium directory from to Allas using following commands
Upload the pythium directory from Puhti to Allas using following commands
(replace XXXX with your user account)

A-put case 1: Store everything in one object:
Expand Down Expand Up @@ -139,7 +155,7 @@ Try opening the public link that a-flip produced, with your browser.
## Upload case 3. Allas-backup
Run commands:
```test
allas-backup help
allas-backup -help
allas-backup pythium
allas-backup list
```
Expand All @@ -152,7 +168,8 @@ The data in pythium directory is now stored in many ways to Allas so we can remo
rm -r pythium
exit
```
# C. Downloading data from Allas to Puhti
# Downloading data from Allas to Puhti


1. Login to puhti.csc.fi and move to scratch:

Expand All @@ -174,7 +191,7 @@ csc-workspaces
```
Go to your personal scratch directory of your project.
```text
cd /scratch/project_yourprojectnumber/trng_xxxx
cd /scratch/project_yourprojectnumber/xxxx
```
Set up Allas connection
```text
Expand Down Expand Up @@ -215,9 +232,9 @@ mkdir vexans
rclone copyto allas:xxxx-genomes-rc/pythium_vexans vexans/
ls -l vexans
```
example 3: copy just one object
### example 3: copy just one object
```text
rclone copyto allas:trng_xxxx-genomes-rc/pythium_vexans/pythium_vexans.fasta \ ./vexans.fasta
rclone copyto allas:trng_xxxx-genomes-rc/pythium_vexans/pythium_vexans.fasta ./vexans.fasta
ls -l
```

Expand Down
108 changes: 108 additions & 0 deletions hands-on/allas/allas-mini-tutorial.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
# Allas Mini tutorial

Open the view to the Allas service in your browser using the cPouta WWW-interface.

Open: https://pouta.csc.fi

And login with your account.

From the upper left corner, you find a project selection pop-up menu. If you have several projects available, select the
training project: **project_2002389**

Then from the menu in left side of the interface, select:

**Object Store -> Containers**

And create new container by pressin button: **+Container**

Keep the container _Not public_ and name it as 2002389_xxxx ( replace xxxx with your user account).

Open the new bucket (that is here calles as container) and upload one file from your computer.
Any file should do, but prefer a file that you can open in Puhti.

During the exercises, you can use this interface to get another view to the buckets and objects in Allas.
Note that you need to **reload** the view in order to see the changes.


## Log in Puhti and use scratch

1. Login to puhti.csc.fi and move to scratch:

**Linux/mac**
```text
ssh [email protected] (replace XXXX with your csc user account)
```

**Windows/PuTTY**

**host:* puhti.csc.fi

**login as:** XXXX (replace XXXX with your csc user account)


In Puhti check your environment with command:
```text
csc-workspaces
```
Switch to the scratch directory of your project
```text
cd /scratch/project_2002389 # note! replace the text here (and below) with your project
```
And create your own sub-directory, named after your training account (if this directory does not yet exist):
```text
mkdir XXXX
```
(replace XXXX with your user account)

move to the directory.
```text
cd XXXX
```

## Using Allas

Open connection to Allas.
```text
module load allas
allas-conf
```
If you have several Allas projects available, select the training project we are currently using.

Study what you have in allas with commands
```text
a-list
rclone lsd allas:

a-list 2002389_xxxx
rclone ls allas:2002389_xxxx
```

Download the file you just uploaded to Allas from your local computer.
You can do that in two ways (replace your-file-name with the name of the file you uploaded):
```text
a-get 2002389_xxxx/your-file-name
```
or
```
rclone copy allas:2002389_xxxx/your-file-name ./
```

Upload the file back to Allas.

Try commands:

```text
a-put your-file-name
a-put --nc -b 2002389_xxxx
```
Use use _a-put -h_ to fugure out the difference between the two commands above.

Then do the upload with rclone:
```text
rclone copy your-file-name allas:2002389_xxxx/
```
Locate the files you just uploaded in Pouta www-interface.




10 changes: 7 additions & 3 deletions hands-on/batch_jobs/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
# Batch jobs

## Tutorials
* [Batch job tutorial](batch_jobs_tutorial.md) on serial and parallel jobs.
* [Hands-on batch jobs in Puhti tutorial](https://docs.csc.fi/support/tutorials/cmdline-handson/)
* [Serial batch job tutorial](serial.md) start with this.
* [Parallel batch job tutorial](parallel.md) using MPI and/or OpenMP.
* [Interactive batch job tutorial](interactive.md) on Puhti.
* [Hands-on batch jobs in Puhti tutorial](https://docs.csc.fi/support/tutorials/cmdline-handson/) A longer set of jobs to run.

## Exercises
* [Retrieving bio data from repository](exercise_retrieving-bio-data.md) as an interactive job. (BIO)
* [Serial, array and parallel jobs with R + contours calculation from DEM with raster package (GIS) ](https://github.com/csc-training/geocomputing/tree/master/R/puhti)
* [Serial, array and parallel jobs with Python + NDVI calculation rasterio package (GIS) ](https://github.com/csc-training/geocomputing/tree/master/python/puhti)
* ...

31 changes: 31 additions & 0 deletions hands-on/batch_jobs/interactive.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Batch job tutorial - Interactive jobs

- In this tutorial we'll get familiar with the basic usage of the Slurm batch queue system at CSC
- The goal is to learn how to request resources that **match** the needs of a job
- A job consists of two parts: resource requests and the job step(s)
- Examples are done on Puhti

## Interactive jobs

- In an interactive batch job, an interactive shell session is launced on a computing node. For heavy interactive tasks one can request specific resources (time, memory, cores, disk).

- You can also use tools with graphical user interfaces in an interactive shell session. For such usage the [NoMachine](https://docs.csc.fi/support/tutorials/nomachine-usage/) remote desktop often provides an improved experience.

### A simple interactive job

- To start an interactive job using one core for ten minutes
```text
sinteractive --account myprojectname --time 00:10:00
```
- You should see that the command prompt (what's shown to the left to your cursor) has changed from _puhti-login1_ (or _puhti-login2_) to e.g. _r07c51_
- Once on the compute node, you can run commands directly from the command line without `srun`, e.g. launch the (default) Python interpreter:
```
module load python-env
python3
```
- Quit the Python interpreter with `quit()`
- This way you can work interactively for extended period, using lots of memory without creating load on the login nodes, which is forbidden in [the Usage Policy](https://docs.csc.fi/computing/overview/#usage-policy).
- Quit the interactive batch job with `exit`. Note, that above you asked only for 10 minutes of time. Once that is up, you will be automatically logged out from the compute node. From the command line prompt you can see whether you're in the compute node (e.g. _r07c51_) or back to the login node (e.g. _puhti-login2_). Giving `exit` in the login node, will log you out from Puhti.
- See the documetation at docs.csc.fi of [Interactive usage](https://docs.csc.fi/computing/running/interactive-usage/), for further information

## Additional material [FAQ on CSC batch jobs ](https://docs.csc.fi/support/faq/#batch-jobs) in Docs CSC
Loading