owned this note
owned this note
Published
Linked with GitHub
# Geocomputing coffee
###### tags: `SwissGeocomputingCentre` `computing-coffee`
:::info
:bulb: **What is this geocomputing coffee about?**
- informal get-together over lunchtime with people interested in -- or curious about -- the geocomputing thematic
- exchange and learn about computational-related topics
- share your latest advances or discuss technical issues
:::
### :question: What would you like to discuss?
- create a small package and make it available on GitHub
- in Python
- in Julia
- Julia in the geosciences
- differentiable programming
- Python HPC workflow
- Python best practice
## Upcoming Meeting
:::warning
### :writing_hand: Register here
**If you are planning to attend** please add your name & email to the following list _(first you need to select the edit mode in the upper left corner of the window)_:
```
Ludovic Räss, ludovic.raess@unil.ch
Ayoub Fatihi, ayoub.fatihi@unil.ch
Jingyan Yu, jingyan.yu@unil.ch
William Halter, william.halter@unil.ch
```
:::
:::danger
### Optimal meeting day/time
- Next meeting
- Thursday 9.11 at 10h30 - 11h30 | xxxxxx
- Thursday 9.11 at 12h15 - 13h15 | xxxxxx
- Thursday 16.11 at 10h30 - 11h30 | xxx
- Thursday 16.11 at 12h00 - 13h00 | xxxx
- Preferred meeting time
- Thursdays at 10h30 - 11h30 | xxxxxx
- Thursdays at 12h15 - 13h15 | xxxxxxx
- Other suggestion
- else?
:::
> **TOPIC**: Git, GitHub, Remote-SSH via VS Code
### :computer: Hands-on
:::info
:bulb: Ideally, bring your laptop to follow along the GitHub demo in order to apply it live, or later, to your personal needs. If interested, having already a GitHub account could be a good starting point.
:::
- Cover the material of the following tutorial https://github.com/Unil-SGC/geocomputing-coffee/tree/main/1-git-demo in slow motion
- demo about the basics of using git, GitHub, and Julia
- syncing local and remote repos using git
- running interactively on Curnagl GPU node
---
_do not modify anything below this here_
## Meeting 26.10.23
:::warning
### :writing_hand: Register here
**If you are planning to attend** please add your name & email to the following list _(first you need to select the edit mode in the upper left corner of the window)_:
```
Ludovic Räss, ludovic.raess@unil.ch
Marj Tonini, marj.tonini@unil.ch
Tom Beucler, tom.beucler@unil.ch
Beatriz Quintal, beatriz.quintal@unil.ch
François Bavaud, francois.bavaud@unil.ch
Haokun Liu, haokun.liu@unil.ch
William Halter, william.halter@unil.ch
Stefan Schmalholz, stefan.schmalholz@unil.ch
Jingyan Yu, jingyan.yu@unil.ch
Edith Sotelo, edith.sotelogamboa@unil.ch
Ben Klein, benjaminzachary.klein@unil.ch
James Irving, james.irving@unil.ch
Marc-Henri Derron, marc-henri.derron@unil.ch
Milton Gomez, milton.gomez@unil.ch
Mattia Mazzucchelli, mattia.mazzucchelli@unil.ch
Anindita Samsu, anindita.samsu@unil.ch
Ayoub Fatihi, ayoub.fatihi@unil.ch
Ian Delaney, ianarburua.delaney@unil.ch
Luca Bütikofer, luca.butikofer@unil.ch
Flavio Calvo, flavio.calvo@unil.ch
Alessio Poloni, alessio.poloni@unil.ch
Emmanuel Jeanvoine, emmanuel.jeanvoine@unil.ch
Pau Wiersma, pau.wiersma@unil.ch
Fuxiao Jiang, fuxiao.jiang@unil.ch
Liudmila Khakimova, liudmila.khakimova@unil.ch
Zenan Huo, zenan.huo@unil.ch
György Hetényi, gyorgy.hetenyi@unil.ch
Alannah Brett, alannah.brett@unibe.ch
Antonin Chalé, antonin.chale@unil.ch
Christian Kaiser, christian.kaiser@unil.ch
```
:::
> **TOPIC**: Introducing the **geocomputing coffee** in FGSE
:::info
- Meeting time **12h10 - 13h15**
- Room **GEO 2138**
:::
### Schedule
| Time | Column 2 | Column 3 |
| -------- | -------- | -------- |
| 12h10 - 12h30 | [Welcome](#Welcome) - SGC (+ DCSR) intro | Marj, Ludovic, Flavio |
| 12h30 - 12h45 | Grabbing Lunch | |
| 12h45 - 13h20 | [Hands-on](#-Hands-on) - git/GitHub/Julia | Ludovic |
| 13h20 - 13h25 | Wrapping-up, what's up next? | Marj, Ludovic |
### Welcome
As a first get-together, the goal of this meeting is to:
- (Re)-introduce briefly the Swiss Geocomputing Centre (SGC)
- Website https://unil-sgc.github.io
- GitHub organisation https://github.com/Unil-SGC
- Discord chat server
- Introduce the activities we plan to offer within the SGC **geocomputing coffee**
- Provide a hands-on about version control and reproducible science using good-practices and tools for software carpentry.
### :computer: Hands-on
:::info
:bulb: Ideally, bring your laptop to follow along the GitHub demo in order to apply it live, or later, to your personal needs. If interested, having already a GitHub account could be a good starting point.
:::
- demo about the basics of using git, GitHub, and Julia
- syncing local and remote repos using git
- running interactively on Curnagl GPU node
#### Pre-requisite
1. Install VS Code (free editor): https://code.visualstudio.com
2. Install [Julia](https://julialang.org) (open source): [download](https://julialang.org/downloads/) | [juliaup](https://github.com/JuliaLang/juliaup)
3. Install VS Code extensions: [Julia extension](https://code.visualstudio.com/docs/languages/julia#_getting-started) | [Remote-SSH extension](https://code.visualstudio.com/blogs/2019/07/25/remote-ssh#_connect-using-remote-ssh)
4. Create a GitHub account: https://github.com
5. Have access to Curnagl
6. Set-up password-less ssh; see [Connexion with a key](https://wiki.unil.ch/ci/books/high-performance-computing-hpc/page/ssh-connection-to-dcsr-cluster)
8. Add an entry to the hostfile as
```sh=
Host curnagl
HostName curnagl.dcsr.unil.ch
User <username>
IdentityFile ~/.ssh/id_ed25519
```
#### Do it yourself
1. On github.com
- Create a repository on GitHub
2. On your local computer
- Clone it locally
- Launch Julia from VS Code
- Add a memcopy script `A = B + s * C`:
- using broadcasting
- using loops
- :point_right: you can find the script [:pencil: here](https://gist.github.com/luraess/7e7410ac4113b9fe9bb951510d0baf76)
- Report performance
- Commit and push the script (from your local computer)
3. On a remote server (here `curnagl`)
- Log into Curnagl and request an interactive node
```
Sinteractive
```
- Load the Julia and CUDA modules
```
module load gcc/10.4.0
module load julia
module load cuda
```
- navigate to your scratch space `cd /scratch/<username>`
- git clone the git repository you created and populated previously
```
git clone ...
```
- Create a new branch (here named `gpu-test`)
```
git checkout -b gpu-test
```
- Add CUDA package and a GPU kernel to perform memory copy:
```julia
function memcopy_gp!(A, B, C, s)
ix = (blockIdx().x-1) * blockDim().x + threadIdx().x
iy = (blockIdx().y-1) * blockDim().y + threadIdx().y
A[ix, iy] = B[ix, iy] + s * C[ix, iy]
return
end
CUDA.@sync @cuda blocks=$blocks threads=$threads memcopy_gp!($A, $B, $C, $s)
```
- Add remaining details to make it work
- Test it :rocket:
- Commit and push on using VS Code git capabilities
4. Verify that the changes synced on github.com and pull them locally