Skip to content

Commit 846e455

Browse files
committed
merge
2 parents 8ffc371 + 56195c9 commit 846e455

File tree

13 files changed

+157
-99
lines changed

13 files changed

+157
-99
lines changed

docs/access/mfa.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ Before starting, ensure that the following pre-requisites are satisfied
5050

5151
!!! warning
5252
If you try to SSH to CSCS systems without setting up MFA, you will be prompted with permission denied error, for example:
53-
```
54-
> ssh ela.cscs.ch
53+
```console
54+
$ ssh ela.cscs.ch
5555
[email protected]: Permission denied (publickey).
5656
Connection closed by UNKNOWN port 65535
5757
```

docs/clusters/clariden.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@ See the SLURM documentation for instructions on how to run jobs on the [Grace-Ho
8484

8585
??? example "how to check the number of nodes on the system"
8686
You can check the size of the system by running the following command in the terminal:
87-
```terminal
88-
> sinfo --format "| %20R | %10D | %10s | %10l | %10A |"
87+
```console
88+
$ sinfo --format "| %20R | %10D | %10s | %10l | %10A |"
8989
| PARTITION | NODES | JOB_SIZE | TIMELIMIT | NODES(A/I) |
9090
| debug | 32 | 1-2 | 30:00 | 3/29 |
9191
| normal | 1266 | 1-infinite | 1-00:00:00 | 812/371 |

docs/clusters/santis.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,8 @@ See the SLURM documentation for instructions on how to run jobs on the [Grace-Ho
9898

9999
??? example "how to check the number of nodes on the system"
100100
You can check the size of the system by running the following command in the terminal:
101-
```terminal
102-
> sinfo --format "| %20R | %10D | %10s | %10l | %10A |"
101+
```console
102+
$ sinfo --format "| %20R | %10D | %10s | %10l | %10A |"
103103
| PARTITION | NODES | JOB_SIZE | TIMELIMIT | NODES(A/I) |
104104
| debug | 32 | 1-2 | 30:00 | 3/29 |
105105
| normal | 1266 | 1-infinite | 1-00:00:00 | 812/371 |

docs/contributing/index.md

Lines changed: 61 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,20 +13,20 @@ We use the GitHub fork and pull request model for development:
1313
Clone your fork repository on your PC/laptop:
1414
```bash
1515
# clone your fork of the repository
16-
> git clone [email protected]:${githubusername}/cscs-docs.git
17-
> cd cscs-docs
18-
> git switch -c 'fix/ssh-alias'
16+
git clone [email protected]:${githubusername}/cscs-docs.git
17+
cd cscs-docs
18+
git switch -c 'fix/ssh-alias'
1919
# ... make your edits ...
2020
# add and commit your changes
21-
> git add <files>
22-
> git commit -m 'update the ssh docs with aliases for all user lab vclusters'
23-
> git push origin 'fix/ssh-alias'
21+
git add <files>
22+
git commit -m 'update the ssh docs with aliases for all user lab vclusters'
23+
git push origin 'fix/ssh-alias'
2424
```
2525
Then navigate to GitHub, and create a pull request.
2626

2727
The `serve` script in the root path of the repository can be used to view the docs locally:`
28-
```
29-
> ./serve
28+
```bash
29+
./serve
3030
...
3131
INFO - [08:33:34] Serving on http://127.0.0.1:8000/
3232
```
@@ -228,3 +228,56 @@ They stand out better from the main text, and can be collapsed by default if nee
228228
This note is collapsed, because it uses `???`.
229229

230230
If an admonition is collapsed by default, it should have a title.
231+
232+
### Code blocks
233+
234+
Use [code blocks](https://squidfunk.github.io/mkdocs-material/reference/code-blocks/) when you want to display monospace text in a programming language, terminal output, configuration files etc.
235+
The documentation uses [pygments](https://pygments.org) for highlighting.
236+
See [list of available lexers](https://pygments.org/docs/lexers/#) for the languages that you can use for code blocks.
237+
238+
Use [`console`](https://pygments.org/docs/lexers/#pygments.lexers.shell.BashSessionLexer) for interactive sessions with prompt-output pairs:
239+
240+
=== "Markdown"
241+
242+
````markdown
243+
```console title="Hello, world!"
244+
$ echo "Hello, world!"
245+
Hello, world!
246+
```
247+
````
248+
249+
=== "Rendered"
250+
251+
```console title="Hello, world!"
252+
$ echo "Hello, world!"
253+
Hello, world!
254+
```
255+
256+
!!! warning
257+
`terminal` is not a valid lexer, but MkDocs or pygments will not warn about using it as a language.
258+
The text will be rendered without highlighting.
259+
260+
!!! warning
261+
Use `$` as the prompt character, optionally preceded by text.
262+
`>` as the prompt character will not be highlighted correctly.
263+
264+
Note the use of `title=...`, which will give the code block a heading.
265+
266+
!!! tip
267+
Include a title whenever possible to describe what the code block does or is.
268+
269+
If you want to display commands without output that can easily be copied, use `bash` as the language:
270+
271+
=== "Markdown"
272+
273+
````markdown
274+
```bash title="Hello, world!"
275+
echo "Hello, world!"
276+
```
277+
````
278+
279+
=== "Rendered"
280+
281+
```bash title="Hello, world!"
282+
echo "Hello, world!"
283+
```

docs/guides/gb2025.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,12 @@ This confines system processes and operations to the first core of each of the f
4242

4343
The consequence of this setting is that only 71 cores per socket can be requested by an application (for a total of 284 cores instead of 288 cores per node).
4444

45-
!!! warning "Unable to allocate resources: Requested node configuration is not availabl"
45+
!!! warning "Unable to allocate resources: Requested node configuration is not available"
4646
If you try to use all 72 cores on each socket, SLURM will give a hard error, because only 71 are available:
4747

48-
```
48+
```console
4949
# try to run 4 ranks per node, with 72 cores each
50-
> srun -n4 -N1 -c72 --reservation=reshuffling ./build/affinity.mpi
50+
$ srun -n4 -N1 -c72 --reservation=reshuffling ./build/affinity.mpi
5151
srun: error: Unable to allocate resources: Requested node configuration is not available
5252
```
5353

docs/guides/terminal.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ At CSCS the vast majority of users stick with the default `bash`: at the time of
1414

1515
Run the following command after logging in:
1616

17-
```terminal
17+
```console
1818
$ getent passwd | grep $USER
1919
bcumming:*:22008:1000:Benjamin Cumming, CSCS:/users/bcumming:/usr/local/bin/bash
2020
```

docs/software/container-engine.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,13 @@ Since the `ubuntu.toml` file is located in the [EDF search path][ref-ce-edf-sear
5050
The above terminal snippet demonstrates how to launch a containerized environment using Slurm with the `--environment` option.
5151
Click on the :fontawesome-solid-circle-plus: icon for information on each command.
5252

53-
```bash
54-
daint-ln002 > srun --environment=ubuntu --pty bash # (1)
53+
```console
54+
[daint-ln002]$ srun --environment=ubuntu --pty bash # (1)
5555

56-
nid005333 > pwd # (2)
56+
[nid005333]$ pwd # (2)
5757
/capstor/scratch/cscs/<username>
5858

59-
nid005333 > cat /etc/os-release # (3)
59+
[nid005333]$ cat /etc/os-release # (3)
6060
PRETTY_NAME="Ubuntu 24.04 LTS"
6161
NAME="Ubuntu"
6262
VERSION_ID="24.04"
@@ -71,8 +71,8 @@ Since the `ubuntu.toml` file is located in the [EDF search path][ref-ce-edf-sear
7171
UBUNTU_CODENAME=noble
7272
LOGO=ubuntu-logo
7373

74-
nid005333 > exit # (4)
75-
daint-ln002 >
74+
[nid005333]$ exit # (4)
75+
[daint-ln002]$
7676
```
7777

7878
1. Starting an interactive shell session within the Ubuntu 24.04 container deployed on a compute node using `srun --environment=ubuntu --pty bash`.

docs/software/prgenv/prgenv-gnu.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -81,22 +81,22 @@ There are three ways to access the software provided by prgenv-gnu, once it has
8181
The simplest way to get started is to use the `default` file system view, which automatically loads all of the packages when the uenv is started.
8282

8383
!!! example "test mpi compilers and python provided by prgenv-gnu/24.11"
84-
```bash
84+
```console
8585
# start using the default view
86-
> uenv start --view=default prgenv-gnu/24.11:v1
86+
$ uenv start --view=default prgenv-gnu/24.11:v1
8787

8888
# the python executable provided by the uenv is the default, and is a recent version
89-
> which python
89+
$ which python
9090
/user-environment/env/default/bin/python
91-
> python --version
91+
$ python --version
9292
Python 3.12.5
9393

9494
# the mpi compiler wrappers are also available
95-
> which mpicc
95+
$ which mpicc
9696
/user-environment/env/default/bin/mpicc
97-
> mpicc --version
97+
$ mpicc --version
9898
gcc (Spack GCC) 13.3.0
99-
> gcc --version # the compiler wrapper uses the gcc provided by the uenv
99+
$ gcc --version # the compiler wrapper uses the gcc provided by the uenv
100100
gcc (Spack GCC) 13.3.0
101101
```
102102

@@ -106,9 +106,9 @@ There are three ways to access the software provided by prgenv-gnu, once it has
106106
No modules are loaded when a uenv starts, and have to be loaded individually using `module load`.
107107

108108
!!! example "starting prgenv-gnu and listing the provided modules"
109-
```bash
110-
> uenv start prgenv-gnu/24.11:v1 --view=modules
111-
> module avail
109+
```console
110+
$ uenv start prgenv-gnu/24.11:v1 --view=modules
111+
$ module avail
112112
---------------------------- /user-environment/modules ----------------------------
113113
aws-ofi-nccl/git.v1.9.2-aws_1.9.2 lua/5.4.6
114114
boost/1.86.0 lz4/1.10.0

docs/software/prgenv/prgenv-nvfortran.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,9 @@ uenv image find prgenv-nvfortran/24.11:v1
9292

9393
The modules view will start the uenv, and make a set of modules available:
9494

95-
```
96-
> uenv start prgenv-nvfortran/24.11:v1 --view=nvfort,modules
97-
> module avail
95+
```console
96+
$ uenv start prgenv-nvfortran/24.11:v1 --view=nvfort,modules
97+
$ module avail
9898
---------------------------- /user-environment/modules ----------------------------
9999
aws-ofi-nccl/master libtree/3.1.1 ninja/1.12.1
100100
cmake/3.30.5 lua/5.4.6 nvhpc/24.11

docs/software/sciapps/quantumespresso.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,12 @@ To recompile QE after editing the source code re-run `spack -e $SCRATCH/qe-env i
147147
uenv start quantumespresso/v7.3.1
148148
MPICH_GPU_SUPPORT_ENABLED=1 srun [...] $SCRATCH/qe-env/view/bin/pw.x < pw.in
149149
```
150-
Note: The `pw.x` is linked to the uenv, it won't work without activating the uenv, also it will only work with the exact same version of the uenv. The physical installation path is in `$SCRATCH/spack`, deleting this directory will leave the anonymous spack environment created in 3. with dangling symlinks.
150+
151+
!!! warning
152+
The `pw.x` is linked to the uenv, it won't work without activating the uenv, also it will only work with the exact same version of the uenv.
153+
154+
!!! warning
155+
The physical installation path is in `$SCRATCH/spack`, deleting this directory will leave the anonymous spack environment created in 3. with dangling symlinks.
151156

152157

153158

0 commit comments

Comments
 (0)