Skip to content

Commit

Permalink
Add Alps section (#185)
Browse files Browse the repository at this point in the history
* Add Alps section

* GitHub Action: Apply external link format

* Link to Alps section in news

* add: alps description, construction admonition

* GitHub Action: Apply external link format

* Small corrections & modify formatter script for download links

* GitHub Action: Apply external link format

* Modify date for blog post

* upd: uenv page

* upd: vClusters

* upd: Alps

* ref(alps): reintroduce listing

* Fix typos

---------

Co-authored-by: mjaehn <[email protected]>
Co-authored-by: Matthieu <[email protected]>
Co-authored-by: leclairm <[email protected]>
  • Loading branch information
4 people authored Aug 15, 2024
1 parent 9c99eb3 commit 3f0cb3b
Show file tree
Hide file tree
Showing 8 changed files with 250 additions and 3 deletions.
2 changes: 2 additions & 0 deletions docs/.pages
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ nav:
- tasks
- User Support:
- support
- Alps:
- alps
- Models:
- models
- Tools:
Expand Down
4 changes: 4 additions & 0 deletions docs/alps/.pages
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
nav:
- Alps Infrastructure: index.md
- Supported vClusters: vclusters.md
- User Environments: uenvs.md
40 changes: 40 additions & 0 deletions docs/alps/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
!!! construction "Page under construction"

Information in this page is not yet complete nor final. It will be updated following the progress of

- the Alps system deployment at CSCS
- C2SM's adaptation to this new system

# The Alps System

Alps is a distributed HPC infrastructure managed by CSCS. Contrary to traditional HPC, it is composed of several logical units called vClusters (versatile clusters). From the users perspective, they play the role of a traditional HPC machine, each vCluster being tailored to the needs of a specific community. This setup also enables geographical distribution of vClusters which facilitates geo-redundancy. The main physical piece of Alps is hosted at CSCS in Lugano and a detailed description can be found at [their website :material-open-in-new:](https://www.cscs.ch/computers/alps){:target="_blank"}.

## vClusters

The following vClusters are hosted at CSCS:

| vCluster | Activity | Share |
|----------|-------------------|------------------|
| Daint | User Lab | ~ 800 GH nodes |
| Clariden | Machine Learning | ~ 800 GH nodes |
| Santis | Weather & Climate | ~ 400 GH nodes |
| Tödi | Testing | few GH nodes |
| Eiger | | multi-core nodes |

*GH = Grace Hopper*

## File Systems

!!! note "TODO"

- [ ] `/users`, `/store` and `/scratch`
- [ ] reserved space per vClsuter vs shared space
- [ ] ...

## Introductory Workshop Material

As an introduction to the Alps infrastructure, the material of our [C2SM workshop "Switching to Alps"](../blog/posts/2024-07-02_switching_to_Alps.md) is available:

- [Recording :material-download:](https://polybox.ethz.ch/index.php/s/oSxyJgTjyvJKX8B){:target="_blank"}<br>
- [Slides presenting Alps, vClusters and Uenvs :material-download:](https://polybox.ethz.ch/index.php/s/jvtIYkBvHUSGZYD){:target="_blank"}<br>
- [Slides for the integration of Uenvs in `spack-c2sm` :material-download:](https://polybox.ethz.ch/index.php/s/SWbYrOVRIprke60){:target="_blank"}
82 changes: 82 additions & 0 deletions docs/alps/uenvs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
!!! construction "Page under construction"

Information in this page is not yet complete nor final. It will be updated following the progress of

- the Alps system deployment at CSCS
- C2SM's adaptation to this new system

# User Environments

Software stacks at CSCS are now accessible through the so-called User Environments (uenv). They replace the previous monolithic software stack containing everything from which one could load any module, with all the infinite potential conflicts it involves. User environments contain the minimal software stack required for a certain activity, say, building and running ICON. They are generated by `spack`, packed into single `squashfs` file and then mounted by the user. In a way, they can be considered as poor man's containers.

!!! success "Main Advantages of Uenvs"

To a large degree, we can consider that there is a separation of concerns between software stacks and the machine OS which enables the following:

- a much reduced maintenance of software stacks
- system-wide upgrades are limited to the low level OS, so should be way easier, when not transparent to the users
- upgrading to more recent software stacks or keeping old ones around (think compiler versions) is way easier
- users (for now C2SM) are able to build their own uenvs
- quicker access to software compared to classical multi-files directories

## CSCS documentation

A description of user environments and the `uenv` tool can be found in the [CSCS Knowledge Base :material-open-in-new:](https://confluence.cscs.ch/display/KB/UENV+user+environments){:target="_blank"}.

## Uenvs central Registry and C2SM uenvs

The user environments provided by CSCS are registered in a central database. In the long run we should be able to operate only with those but, at least for the initial period, there is also the need for uenvs provided by C2SM. These are accessed by their absolute path. All supported uenvs are documented in the corresponding vClsuter section of the [dedicated page](../vclusters/).

## The `uenv` command line tool

[Official documentation :material-open-in-new:](https://eth-cscs.github.io/uenv/){:target="_blank"}

It can be used to

- query images by metadata: tags, names, target architecture, etc ...
- mount images and work interactively
- run a single command with that uenv mounted
- access uenv modules

For now, `uenv` isn't available on Balfrin and requires (easy) [manual installation :material-open-in-new:](https://eth-cscs.github.io/uenv/#getting-uenv){:target="_blank"}.

!!! note "TODO: Quick start"

- [ ] `uenv image repo create`
- [ ] `uenv image find`
- [ ] `uenv image pull`
- [ ] `uenv start`
- [ ] `uenv run`

## `--uenv` SLURM plugin

CSCS developped the `--uenv` slurm plugin in order to mount uenvs at runtime. Either use the name of a uenv in your local repo or the full absolute path to the uenv.

```shell
sbatch --uenv uenv_name:/mount/point
sbatch --uenv /image/path:/mount/point
```

`:mount/point` can always be omitted and defaults to `:/user-environment`.

On Balfrin, the installed plugin version doesn't allow access via uenv names but `uenv image inspect` can be used to query the corresponding absolute path:

```shell
uenv image inspect prgenv-gnu --format="{sqfs}"
/bret/scratch/cscs/bcumming/.uenv-images/images/1736b4bb5ad9b3c5cae8878c71782a8bf2f2f739dbce8e039b629de418cb4dab/store.squashfs
```

## Mount points

Uenvs cannot be mounted *anywhere*. They are generated with a predefined installation path contained in it, where the user is supposed to mount them, at least if they are used as a spack instance (don't know for other usage). By default, it is `/user-environment` and another `/user-tools` also exists for *side* environments that would potentially need to be mounted simultaneously to a *main* one.

## `spack-c2sm` integration

User environments are used as a spack upstream with
```shell
source spack-c2sm/setup-env.sh /user-environment
```

!!! note "TODO"

- [ ] Update official `spack-c2sm` documentation
74 changes: 74 additions & 0 deletions docs/alps/vclusters.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
!!! construction "Page under construction"

Information in this page is not yet complete nor final. It will be updated following the progress of

- the Alps system deployment at CSCS
- C2SM's adaptation to this new system

# Supported vClusters

This page is hosting information about C2SM supported vClusters.

## Access

Connection to vClusters happens as for any other CSCS machine, e.g. `ssh santis.cscs.ch` with a `ProxyJump` on `ela.cscs.ch`.
A section in the `~/.ssh/config` could look as follows:

```config title="~/.ssh.config"
Host ela
Hostname ela.cscs.ch
User cscsusername
IdentityFile ~/.ssh/cscs-key
Host balfrin* daint* santis* todi*
Hostname %h.cscs.ch
User cscsusername
IdentityFile ~/.ssh/cscs-key
ProxyJump ela
```

This would allow standard connections like `ssh santis.cscs.ch` but also specifying the login node like `ssh santis-ln002.cscs.ch` if needed.

## Daint

Daint is the vCluster dedicated to the User Lab. It is deployed on ~800 Grace-Hopper nodes.

Even though Weather and Climate also has the dedicated vCluster Santis (see [below](#santis)), traditional projects will be running on Daint.

!!! warning "Hostname conflict"

For the duration of the overlap between the current expiring Piz Daint and its reincarnation as a vCluster, there will be two different host names. Most probably the current Piz Daint will continue being accessible at `daint.cscs.ch` while the vCluster hostname is not known yet.

### Uenvs

List of currently supported Uenvs on Daint:

| uenv | activity |
|-------------|-------------------------------|
| icon-vx:rcy | build and run icon |
| prepost-vx | pre and post processing tools |
| | |

### Storage

!!! note "TODO"

- [ ] Storage

## Santis

Santis is dedicated to Weather and Climate and is deployed on ~400 Grace-Hopper nodes. At least at the beginning, it will be hosting only [EXCLAIM :material-open-in-new:](https://c2sm.ethz.ch/research/exclaim.html){:target="_blank"} and related projects.

### Uenvs

| uenv | activity |
|-------------|-------------------------------|
| icon-vx:rcy | build and run icon |
| prepost-vx | pre and post processing tools |
| | |

### Storage

!!! note "TODO"

- [ ] Storage
12 changes: 12 additions & 0 deletions docs/blog/posts/2024-08-14_alps.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
date:
created: 2024-08-14
---

# New information about the Alps system available

Since the transition from Piz Daint to the new Alps infrastructure is already taking place,
we have added a new navigation section [Alps](../../alps/index.md) to collect all necessary information there.

Most importantly, C2SM users will find details about the new vClusters as well as how to
use User Environments (uenvs) in order to access the software stacks.
19 changes: 19 additions & 0 deletions docs/stylesheets/extra.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,22 @@
[data-md-color-scheme=c2sm-light] img[src$="#gh-dark-mode-only"] {
display: none; /* Hide dark images in light mode */
}

/* Admonition for pages under construction */
:root {
--md-admonition-icon--construction: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M22 20.59 20.59 22l-3.14-3.14c-.56.37-1.15.7-1.79.92-1.66.58-3.46.62-5.13.1-1.03-.3-1.97-.83-2.78-1.51l-3.19 3.19c-.56.59-1.53.59-2.12 0-.58-.56-.58-1.56 0-2.12l3.38-3.38 2.65-.52a6.1 6.1 0 0 0 2.81 1.96c1.16.35 2.44.34 3.59-.04.29-.09.57-.2.83-.34L7.6 9l-1.77 1.78L3 7.95 7.95 3l4.24 1.41L9 7.6l8.31 8.29c.19-.18.34-.36.49-.56 1.5-1.97 1.62-4.91.29-7.33C16.78 5.57 14.5 3.55 12 2c1.41.5 2.76 1.17 4 2.04 1.24.87 2.43 1.89 3.33 3.21.9 1.29 1.54 2.87 1.67 4.54.1 1.68-.34 3.44-1.3 4.86-.2.35-.46.63-.7.91l3 3.03Z"/></svg>')
}
.md-typeset .admonition.construction,
.md-typeset details.construction {
border-color: rgb(255, 145, 0);
}
.md-typeset .construction > .admonition-title,
.md-typeset .construction > summary {
background-color: rgba(255, 145, 0, 0.1);
}
.md-typeset .construction > .admonition-title::before,
.md-typeset .construction > summary::before {
background-color: rgb(255, 145, 0);
-webkit-mask-image: var(--md-admonition-icon--construction);
mask-image: var(--md-admonition-icon--construction);
}
20 changes: 17 additions & 3 deletions scripts/format_external_links.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,26 @@
import argparse

def modify_link(line):
pattern = r'\[([^\]]+)\]\((http[s]?://[^\s\)]+)\)'
replacement = r'[\1 :material-open-in-new:](\2){:target="_blank"}'
modified_line, num_subs = re.subn(pattern, replacement, line)
# Define patterns for general and download links
general_pattern = r'\[([^\]]+)\]\((http[s]?://[^\s\)]+)\)'
download_pattern = r'\[([^\]]+)\]\((https://polybox\.ethz\.ch/index\.php/s/[^\s\)]+)\)'

# Define replacements for general and download links
general_replacement = r'[\1 :material-open-in-new:](\2){:target="_blank"}'
download_replacement = r'[\1 :material-download:](\2){:target="_blank"}'

# Check if the line was already modified or doesn't need modification
if ':material-open-in-new:' in line and '{:target="_blank"}' in line:
return line, False
if ':material-download:' in line and '{:target="_blank"}' in line:
return line, False

# Apply the appropriate replacement based on the URL pattern
if re.search(download_pattern, line):
modified_line, num_subs = re.subn(download_pattern, download_replacement, line)
else:
modified_line, num_subs = re.subn(general_pattern, general_replacement, line)

return modified_line, num_subs > 0

def process_markdown_file(file_path):
Expand Down

0 comments on commit 3f0cb3b

Please sign in to comment.