Skip to content

Commit 211fa82

Browse files
authored
linaro-forge 23.1.2 (#71)
* update linaro-forge to 23.1.2 * deploy it on eiger and santis * update docs to reflect new uenv features (uenv image pull, etc)
1 parent 3bc6865 commit 211fa82

File tree

13 files changed

+260
-80
lines changed

13 files changed

+260
-80
lines changed

Diff for: README.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
1-
# Spack stacks
1+
# Alps Uenv Recipes
2+
3+
This repository manages the recipes for uenv on CSCS' Alps clusters, and the definition of the CI/CD pipeline that deploys them.
4+
5+
See the [documenation](https://eth-cscs.github.io/alps-uenv/) for an overview of the uenv, and a packaging guide.

Diff for: config.yaml

+6-5
Original file line numberDiff line numberDiff line change
@@ -71,14 +71,15 @@ uenvs:
7171
eiger: [zen2]
7272
develop: False
7373
linaro-forge:
74-
"23.0.3":
74+
"23.1.2":
7575
recipes:
76-
zen2: "23.0.3"
77-
zen3: "23.0.3"
78-
a100: "23.0.3"
76+
zen2: "23.1.2"
77+
zen3: "23.1.2"
78+
a100: "23.1.2"
79+
gh200: "23.1.2"
7980
deploy:
8081
eiger: [zen2]
81-
clariden: [a100]
82+
santis: [gh200]
8283
develop: False
8384
mount: "/user-tools"
8485
mch:

Diff for: docs/uenv-linaro-forge.md

+162-73
Original file line numberDiff line numberDiff line change
@@ -1,124 +1,213 @@
11
# Linaro Forge (DDT) debugger
22

3-
- https://www.linaroforge.com/downloadForge
4-
5-
Linaro Forge (formerly known as DDT) allows source-level debugging of Fortran,
3+
[Linaro Forge](https://www.linaroforge.com/downloadForge) (formerly known as DDT) allows source-level debugging of Fortran,
64
C, C++ and Python codes. It can be used for debugging serial, multi-threaded
75
(OpenMP), multi-process (MPI) and accelerated (Cuda, OpenACC) programs running
86
on research and production systems, including CSCS Alps system. It can be
97
executed either as a graphical user interface or from the command-line.
108

11-
## Using the debugger
9+
## Usage notes
10+
11+
The uenv is named `linaro-forge`, and the available versions on a cluster can be determined using the `uenv image find` command, for example:
12+
```
13+
> uenv image find linaro-forge
14+
uenv/version:tag uarch date id size
15+
linaro-forge/23.1.2:latest gh200 2024-04-10 ea67dbb33801c7c3 342MB
16+
```
17+
18+
19+
The linaro tools are configured to be mounted in the `/user-tools` path so that they can be used alongside application and development uenv mounted at `user-environment`.
20+
21+
=== "sidecar"
22+
23+
When using alongside another uenv, start a uenv session with both uenv with `linaro-forge` after the main uenv, to mount the images at the respective `/user-environment` and `/user-tools` locations:
24+
25+
```bash
26+
uenv start prgenv-gnu/24.2:v3 linaro-forge/32.1.2
27+
28+
# test that everything has been mounted correctly
29+
# (will give warnings if there are problems)
30+
uenv status
31+
32+
uenv view prgenv-gnu:default
33+
source /user-tools/acvitave
34+
35+
# check that ddt is in the path
36+
ddt --version
37+
```
38+
39+
The `/user-tools/activate` script will make the forge executables available in your environment, and **must be run after** any other uenv view command.
40+
41+
=== "standalone"
42+
43+
When using the uenv with no other environment mounted, you will need to explicitly set the `/user-tools` mount point:
44+
45+
```bash
46+
uenv start linaro-forge/32.1.2:/user-tools
47+
48+
source /user-tools/acvitave
49+
50+
# check that ddt is in the path
51+
ddt --version
52+
```
53+
54+
The `/user-tools/activate` script will make the forge executables available in your environment.
55+
56+
## Getting Started
1257

1358
In order to debug your code on Alps, you need to:
1459

15-
- install the Forge/DDT client on your laptop,
16-
- setup the user environment on Alps,
17-
- build an executable with debug flags on Alps,
60+
1. pull the linaro-forge uenv on the target Alps vCluster
61+
- install the Forge/DDT client on your laptop
62+
- build an executable with debug flags
1863
- launch a job with the debugger on Alps.
1964

65+
### Pull the Linaro Forge uenv on the Alps cluster
66+
67+
The first step is to download the latest version of linaro-forge that is available on the cluster.
68+
First, SSH into the target system, then use the `uenv image find` command to list the available versions on the system:
69+
70+
```
71+
> uenv image find linaro-forge
72+
uenv/version:tag uarch date id size
73+
linaro-forge/23.1.2:latest gh200 2024-04-10 ea67dbb33801c7c3 342MB
74+
```
75+
76+
In this example, there is a single version available. Next we pull the image so that it is available locally.
77+
```
78+
> uenv image pull linaro-forge/23.1.2:latest
79+
```
80+
81+
It will take a few seconds to download the image. Once complete, check that it was downloaded using the `uenv image ls` command:
82+
83+
```
84+
> uenv image ls linaro-forge
85+
uenv/version:tag uarch date id size
86+
linaro-forge/23.1.2:latest gh200 2024-04-05 ea67dbb33801c7c3 342MB
87+
```
2088

2189
### Install the client on your laptop
2290

23-
We recommend to download and install the [desktop client](https://www.linaroforge.com/downloadForge) on your local workstation/laptop. It will connect with the debug jobs running on Alps, offering a better user experience compared to opening ddt with X11 forwarding. The client can be downloaded for a selection of operating systems.
91+
We recommend installing the [desktop client](https://www.linaroforge.com/downloadForge) on your local workstation/laptop.
92+
It can be configured to connect with the debug jobs running on Alps, offering a better user experience compared running remotely with X11 forwarding.
93+
The client can be downloaded for a selection of operating systems, via the link above.
2494

25-
Once installed, the client needs to be configured to connect to your preferred vcluster. For this, launch the client:
95+
Once installed, the client needs to be configured to connect to the vCluster on which you are working.
96+
First, start the client on your laptop.
2697

27-
- mac: open /Applications/Linaro\ Forge\ Client\ 23.0.1.app/
28-
- linux: $HOME/linaro/forge/23.0.1/bin/ddt
98+
=== "Linux"
2999

30-
and setup the connection:
100+
The path will change if you have installed a different version, or if it has been installed in a non-standard installation location.
31101

32-
```
33-
- open the 'Remote Launch' menu and click on 'configure' then 'Add' and set the fields, for example:
34-
- Connection Name: alps
102+
```bash
103+
$HOME/linaro/forge/23.0.1/bin/ddt
104+
```
35105

36-
37-
# Note that the clariden vlcuster name can be replaced with another vcluster name
106+
=== "MacOS"
38107

39-
- Remote install dir: uenv run IMG -- DDTDIR
40-
# here we tell the client to use the ddt installed in the uenv image
41-
```
108+
The path will change if you have installed a different version, or if it has been installed in a non-standard installation location.
42109

43-
where you can replace `IMG` and `DDTDIR` with for example:
110+
```bash
111+
open /Applications/Linaro\ Forge\ Client\ 23.0.1.app/
112+
```
44113

45-
- `IMG`: full path to the uenv file and mount point, for example:
46-
- _/scratch/e1000/your-cscs-username-here/linaro-forge-23.0.3.squashfs:/user-tools_
47-
- `DDTDIR`: full path to the tool, for example:
48-
- _/user-tools/linux-sles15-zen2/gcc-11.3.0/linaro-forge-23.0.3-3z4k6ijkcxcgqymv6mapv6xaela7m2q5/_
114+
Next, configure a connection to the target system.
115+
Open the *Remote Launch* menu and click on *configure* then *Add*. Examples of the settings are below.
49116

50-
and
117+
=== "Eiger"
51118

52-
```
53-
- Remote Script:
119+
| Field | Value |
120+
| ----------- | --------------------------------------- |
121+
| Connection | `eiger` |
122+
123+
| Remote Installation Directory | `uenv run linaro-forge/23.1.2:/user-tools -- /user-tools/env/forge/` |
124+
| Private Key | `$HOME/.ssh/cscs-key` |
54125

55-
- Private Key: _path-to-your-home_/.ssh/cscs-key
126+
=== "Santis"
56127

57-
- Proxy through login node: yes (check the box)
58-
```
128+
| Field | Value |
129+
| ----------- | --------------------------------------- |
130+
| Connection | `santis` |
131+
132+
| Remote Installation Directory | `uenv run linaro-forge/23.1.2:/user-tools -- /user-tools/env/forge/` |
133+
| Private Key | `$HOME/.ssh/cscs-key` |
59134

60-
Click `Test Remote Launch`. If the client can connect, you are ready to debug:
61-
click on `ok` and `close` (to save the configuration). You can now connect by going to `Remote Launch` and choose the `Alps` entry. If the client fails to connect, look at the message, check your ssh configuration and make sure you can ssh without the client.
62135

63-
### Setup the environment
136+
Some notes on the examples above:
64137

65-
`linaro-forge-23.0.3.squashfs` provides the latest version of Linaro Forge (23.0.3).
138+
* SSH Forwarding via `ela.scscs.ch` is used to access the cluster.
139+
* the replace the username `bsmith` with your CSCS user name that you would normally use to open an SSH connection to CSCS.
140+
* the Remote Installation Path is a little bit more complicated than
141+
* the private keys should be the ones generated for CSCS MFA, and this field does not need to be set if you have added the key to your SSH agent.
66142

67-
- On Alps:
68-
```bash
69-
uenv start ./linaro-forge-23.0.3.squashfs
70-
uenv modules use
71-
module load linaro-forge
72-
ddt --version
73-
# Version: 23.0.3
74-
```
143+
Once configured, test and save the configuration:
144+
145+
1. check whether the concfiguration is correct, click `Test Remote Launch`.
146+
2. Click on `ok` and `close` to save the configuration.
147+
3. You can now connect by going to `Remote Launch` and choose the `Alps` entry. If the client fails to connect, look at the message, check your ssh configuration and make sure you can ssh without the client.
148+
149+
### Setup the environment
75150

76151
### Build with debug flags
77152

78153
Once the uenv is loaded and activated, the program to debug must be compiled with the `-g` (for cpu) and `-G` (for gpu) debugging flags. For example, let's build a cuda code with a user environment:
79154

80-
- on Alps:
81155
```bash
82-
uenv start store.squashfs
83-
uenv modules use
84-
module load gcc cray-mpich cuda
85-
git clone -b ddt https://github.com/jgphpc/octree-miniapp \
86-
octree-miniapp.git
156+
uenv start prgenv-gnu:24.2:v2
157+
uenv view default
158+
159+
# download the source code
160+
git clone https://github.com/sekelle/octree-miniapp.git
161+
cd o
162+
163+
164+
# build the application
87165
make -C octree-miniapp.git/
88166
```
89167

90168
### Launch the code with the debugger
91169

92-
Given the unusual way of loading the uenv, the DDT client must be launched in `Manual Launch` mode (assuming that it is connected to Alps via `Remote Launch`):
170+
To use the DDT client with uenv, it must be launched in `Manual Launch` mode (assuming that it is connected to Alps via `Remote Launch`):
93171

94-
- on the client:
95-
```
96-
- open the 'Manual Launch' menu and
97-
- set the fields, for example:
98-
- Number of processes: 12
99-
- CUDA: yes (check the box for gpu exeutables)
100-
```
101-
Listen and wait
172+
??? note
102173

103-
You can then launch ddt with the srun command (or a Slurm jobscript):
174+
the steps below do not manually launch - instead they directly launch using `ddt --connect srun ...` on the target cluster.
104175

105-
- on Alps:
106-
```bash
107-
unset CUDA_VISIBLE_DEVICES
108-
srun --uenv=$UENV_SQFS,TOOL_SQFS \
109-
-l -N3 -n12 -t10 -pnvgpu \
110-
./octree-miniapp.git/cuda_visible_devices.sh \
111-
$DDT_CLIENT
112-
./octree-miniapp.git/neighbor_search.exe 120000
113-
```
176+
=== "on laptop"
177+
178+
Start DDT, and connect to the target cluster using the drop down menu for Remote Launch.
179+
180+
Then wait for the job to start (see the "on Alps" tab).
181+
182+
=== "on Alps"
183+
184+
log into the system and launch with the srun command:
185+
186+
```bash
187+
# start a session with both the PE used to build your application
188+
# and the linaro-forge uenv mounted
189+
uenv start prgenv-gnu/24.2 linaro-forge/23.1.2
190+
ddt --connect srun -n2 -N2 ./a.out
191+
```
192+
193+
Notes on using specific systems:
194+
195+
=== "santis"
196+
197+
!!! warning
198+
199+
Because Santis is not connected to the internet, some environment variables need to be set so that it can connect to the license server.
114200

115-
where for example:
201+
```bash
202+
export https_proxy=proxy.cscs.ch:8080
203+
export http_proxy=proxy.cscs.ch:8080
204+
export no_proxy=".local, .cscs.ch, localhost, 148.187.0.0/16, 10.0.0.0/8, 172.16.0.0/12"
205+
```
116206

117-
- UENV_SQFS=$PWD/store.squashfs:/user-environment
118-
- TOOL_SQFS=$PWD/linaro-forge-23.0.3.squashfs:/user-tools
119-
- DDT_CLIENT=/user-tools/linux-sles15-zen2/gcc-11.3.0/linaro-forge-23.0.3-3z4k6ijkcxcgqymv6mapv6xaela7m2q5/bin/ddt-client
207+
???- note "default value of `http_proxy`"
120208

209+
By default the `https_proxy` and `http_proxy` variables are set to `http://proxy.cscs.ch:8080`, as the transport is required for some other services to work. You will have to set them for a debugging session.
121210

122211
This screenshot shows a debugging session on 12 gpus:
123212

124-
![DDT](https://raw.githubusercontent.com/jgphpc/octree-miniapp/ddt/img/ddt.png)
213+
![DDT](https://raw.githubusercontent.com/jgphpc/octree-miniapp/ddt/img/ddt.png)

Diff for: mkdocs.yml

+3
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ nav:
55
- 'gromacs': uenv-gromacs.md
66
- 'quantum-espresso': uenv-qe.md
77
- 'cp2k': uenv-cp2k.md
8+
- 'linaro-forge': uenv-linaro-forge.md
89
theme:
910
name: material
1011
features:
@@ -21,6 +22,8 @@ markdown_extensions:
2122
anchor_linenums: true
2223
line_spans: __span
2324
pygments_lang_class: true
25+
- pymdownx.tabbed:
26+
alternate_style: true
2427
- tables
2528
- toc:
2629
permalink: true

Diff for: recipes/linaro-forge/23.0.3/environments.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ linaro:
66
spec: gcc
77
unify: true
88
specs:
9-
- linaro-forge +accept-eula
9+
- linaro-forge@23.0.3 +accept-eula

Diff for: recipes/linaro-forge/23.0.3/repo

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../repo

Diff for: recipes/linaro-forge/23.1.2/compilers.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
bootstrap:
2+
spec: gcc@12
3+
gcc:
4+
specs:
5+
- gcc@12

Diff for: recipes/linaro-forge/23.1.2/config.yaml

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
name: linaro
2+
store: /user-tools
3+
spack:
4+
repo: https://github.com/spack/spack.git
5+
commit: releases/v0.21
6+
modules: True

Diff for: recipes/linaro-forge/23.1.2/environments.yaml

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
linaro:
2+
compiler:
3+
- toolchain: gcc
4+
spec: gcc
5+
unify: true
6+
specs:
7+
- [email protected] +accept-eula
8+
views:
9+
forge:
10+
link: roots

Diff for: recipes/linaro-forge/23.1.2/modules.yaml

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
modules:
2+
# Paths to check when creating modules for all module sets
3+
prefix_inspections:
4+
bin:
5+
- PATH
6+
lib:
7+
- LD_LIBRARY_PATH
8+
lib64:
9+
- LD_LIBRARY_PATH
10+
11+
default:
12+
arch_folder: false
13+
# Where to install modules
14+
roots:
15+
tcl: /user-environment/modules
16+
tcl:
17+
all:
18+
autoload: none
19+
hash_length: 0
20+
exclude_implicits: true
21+
exclude: ['%[email protected]', 'gcc %[email protected]']
22+
projections:
23+
all: '{name}/{version}'

Diff for: recipes/linaro-forge/23.1.2/post-install

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/bash
2+
3+
#forge_bin=$(spack -C {{ env.config }} location -i linaro-forge)/bin
4+
#ln -s $forge_bin {{ env.mount }}/bin
5+
forge_bin={{ env.mount }}/env/forge/bin
6+
echo "export PATH=$forge_bin:$PATH" >> {{ env.mount }}/activate
7+
echo "export UENV_DDT_VERSION=23.1.2" >> {{ env.mount }}/activate

0 commit comments

Comments
 (0)