Skip to content

Commit eb27647

Browse files
jgphpcmsimberg
andauthored
linaro/24.1.2 (#199)
* 24.1.2 * -bristen * docs --------- Co-authored-by: Mikael Simberg <[email protected]>
1 parent f3c350c commit eb27647

File tree

10 files changed

+21
-294
lines changed

10 files changed

+21
-294
lines changed

config.yaml

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -202,25 +202,30 @@ uenvs:
202202
eiger: [zen2]
203203
develop: False
204204
linaro-forge:
205-
"24.1.1":
205+
"24.1.2":
206206
recipes:
207-
zen2: "24.1.1"
208-
gh200: "24.1.1"
207+
zen2: "24.1.2"
208+
gh200: "24.1.2"
209209
deploy:
210210
eiger: [zen2]
211-
santis: [gh200]
211+
pilatus: [zen2]
212+
# bristen: [a100]
212213
daint: [gh200]
213-
# clariden ?
214+
santis: [gh200]
215+
clariden: [gh200]
214216
develop: False
215217
mount: "/user-tools"
216-
"24.1":
218+
"24.1.1":
217219
recipes:
218-
zen2: "24.1"
219-
gh200: "24.1"
220+
zen2: "24.1.1"
221+
gh200: "24.1.1"
220222
deploy:
221223
eiger: [zen2]
222-
santis: [gh200]
224+
pilatus: [zen2]
225+
# bristen: [a100]
223226
daint: [gh200]
227+
santis: [gh200]
228+
clariden: [gh200]
224229
develop: False
225230
mount: "/user-tools"
226231
mch:

docs/uenv-linaro-forge.md

Lines changed: 1 addition & 277 deletions
Original file line numberDiff line numberDiff line change
@@ -1,279 +1,3 @@
11
# Linaro Forge tools
22

3-
[Linaro Forge](https://www.linaroforge.com/downloadForge) is a suite of profiling
4-
and debugging tools. It includes Linaro DDT debugger and Linaro MAP profiler. These
5-
tools allow source-level debugging and profiling of Fortran, C, C++ and Python codes.
6-
They can be used for debugging and profiling serial, multi-threaded (OpenMP),
7-
multi-process (MPI) and accelerated (Cuda, OpenACC) programs running on research and
8-
production systems, including CSCS Alps system. They can be executed either as a
9-
graphical user interface or from the command-line.
10-
11-
## Quickstart guide
12-
13-
The name of the uenv image is `linaro-forge`, and the available versions on a
14-
cluster can be determined using the `uenv image find` command, for example:
15-
```
16-
> uenv image find linaro-forge
17-
uenv/version:tag uarch date id size
18-
linaro-forge/23.1.2:latest gh200 2024-04-10 ea67dbb33801c7c3 342MB
19-
```
20-
21-
The linaro tools are configured to be mounted in the `/user-tools` path so that
22-
they can be used alongside application and development uenv mounted at
23-
`user-environment`.
24-
25-
=== "sidecar"
26-
27-
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:
28-
29-
```bash
30-
uenv start --view=prgenv-gnu:default,forge prgenv-gnu/24.2,linaro-forge/23.1.2
31-
32-
# test that everything has been mounted correctly
33-
# (will give warnings if there are problems)
34-
uenv status
35-
36-
# check that ddt is in the path
37-
ddt --version
38-
```
39-
40-
=== "standalone"
41-
42-
When using the uenv with no other environment mounted, you will need to explicitly set the `/user-tools` mount point:
43-
44-
```bash
45-
uenv start linaro-forge/23.1.2:/user-tools
46-
47-
source /user-tools/activate
48-
49-
# check that ddt is in the path
50-
ddt --version
51-
```
52-
53-
The `/user-tools/activate` script will make the forge executables available in your environment.
54-
55-
## User guide
56-
57-
In order to debug your code on Alps, you need to:
58-
59-
1. pull the linaro-forge uenv on the target Alps vCluster
60-
- install the Linaro Forge client on your local system (desktop/laptop)
61-
- build an executable with debug flags
62-
- launch a job with the debugger on Alps
63-
- start debugging/profiling
64-
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
68-
available on the cluster. First, SSH into the target system, then use the
69-
`uenv image find` command to list the available versions on the system:
70-
71-
```
72-
> uenv image find linaro-forge
73-
uenv/version:tag uarch date id size
74-
linaro-forge/23.1.2:latest gh200 2024-04-10 ea67dbb33801c7c3 342MB
75-
```
76-
77-
In this example, there is a single version available. Next we pull the image so
78-
that it is available locally.
79-
80-
```
81-
> uenv image pull linaro-forge/23.1.2:latest
82-
```
83-
84-
It will take a few seconds to download the image. Once complete, check that it
85-
was downloaded using the `uenv image ls` command:
86-
87-
```
88-
> uenv image ls linaro-forge
89-
uenv/version:tag uarch date id size
90-
linaro-forge/23.1.2:latest gh200 2024-04-05 ea67dbb33801c7c3 342MB
91-
```
92-
93-
### Install and configure the client on your local machine
94-
95-
We recommend installing the [desktop client](https://www.linaroforge.com/downloadForge)
96-
on your local workstation/laptop.
97-
It can be downloaded for a selection of operating systems.
98-
99-
The client can be configured to connect with the debug jobs running on Alps, offering a
100-
better user experience compared to running with X11 forwarding.
101-
102-
Once installed, the client needs to be configured to connect to the vCluster on
103-
which you are working. First, start the client on your laptop:
104-
105-
=== "Linux"
106-
107-
The path will change if you have installed a different version, or if it has been installed in a non-standard installation location.
108-
109-
```bash
110-
$HOME/linaro/forge/23.0.1/bin/ddt
111-
```
112-
113-
=== "MacOS"
114-
115-
The path will change if you have installed a different version, or if it has been installed in a non-standard installation location.
116-
117-
```bash
118-
open /Applications/Linaro\ Forge\ Client\ 23.0.1.app/
119-
```
120-
121-
Next, configure a connection to the target system.
122-
Open the *Remote Launch* menu and click on *configure* then *Add*.
123-
Examples of the settings are below.
124-
125-
=== "Eiger"
126-
127-
| Field | Value |
128-
| ----------- | --------------------------------------- |
129-
| Connection | `eiger` |
130-
131-
| Remote Installation Directory | `uenv run linaro-forge/23.1.2:/user-tools -- /user-tools/env/forge/` |
132-
| Private Key | `$HOME/.ssh/cscs-key` |
133-
134-
=== "Todi"
135-
136-
| Field | Value |
137-
| ----------- | --------------------------------------- |
138-
| Connection | `todi` |
139-
140-
| Remote Installation Directory | `uenv run linaro-forge/23.1.2:/user-tools -- /user-tools/env/forge/` |
141-
142-
=== "Santis"
143-
144-
| Field | Value |
145-
| ----------- | --------------------------------------- |
146-
| Connection | `santis` |
147-
148-
| Remote Installation Directory | `uenv run linaro-forge/23.1.2:/user-tools -- /user-tools/env/forge/` |
149-
| Private Key | `$HOME/.ssh/cscs-key` |
150-
151-
152-
Some notes on the examples above:
153-
154-
* SSH Forwarding via `ela.cscs.ch` is used to access the cluster.
155-
* replace the username `bsmith` with your CSCS user name that you would normally use to open an SSH connection to CSCS.
156-
* `Remote Installation Path` is pointing to the install directotory of ddt inside the image
157-
* 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.
158-
159-
Once configured, test and save the configuration:
160-
161-
1. check whether the configuration is correct, click `Test Remote Launch`.
162-
2. Click on `ok` and `close` to save the configuration.
163-
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.
164-
165-
### Setup the user environment and build the executable
166-
167-
Once the uenv is loaded and activated, the program to debug must be compiled
168-
with the `-g` (for cpu) and `-G` (for gpu) debugging flags. For example, we can
169-
build a cuda test with a user environment:
170-
171-
```bash
172-
uenv start --view=default prgenv-gnu:24.2
173-
174-
nvcc -c -arch=sm_90 -g -G test_gpu.cu
175-
mpicxx -g test_cpu.cpp test_gpu.o -o myexe
176-
```
177-
178-
### Launch Linaro Forge
179-
180-
#### Linaro DDT
181-
182-
To use the DDT client with uenv, it must be launched in `Manual Launch` mode
183-
(assuming that it is connected to Alps via `Remote Launch`):
184-
185-
=== "on local machine"
186-
187-
Start DDT, and connect to the target cluster using the drop down menu for Remote Launch.
188-
189-
Click on Manual launch, set the number of processes to listen to,
190-
then wait for the slurm job to start (see the "on Alps" tab).
191-
192-
<img src="https://raw.githubusercontent.com/jgphpc/cornerstone-octree/ddt/scripts/img/ddt/0.png" width="600" />
193-
194-
=== "on Alps"
195-
196-
log into the system and launch with the srun command:
197-
198-
```bash
199-
# start a session with both the PE used to build your application
200-
# and the linaro-forge uenv mounted
201-
uenv start --view=prgenv-gnu:default,forge prgenv-gnu/24.2,linaro-forge/23.1.2
202-
203-
srun -N1 -n4 -t15 -pdebug \
204-
./cuda_visible_devices.sh ddt-client ./myexe
205-
```
206-
207-
##### Start debugging
208-
209-
By default, DDT will pause execution on the call to MPI_Init:
210-
<img src="https://raw.githubusercontent.com/jgphpc/cornerstone-octree/ddt/scripts/img/ddt/1.png" width="600" />
211-
212-
There are more than 1 mechanism for controlling program execution:
213-
214-
=== "Breakpoint"
215-
216-
Breakpoint(s) can be set by clicking in the margin to the left of the line number:
217-
218-
<img src="https://raw.githubusercontent.com/jgphpc/cornerstone-octree/ddt/scripts/img/ddt/3.png" width="600" />
219-
220-
=== "Stop at"
221-
222-
Execution can be paused in every CUDA kernel launch by activating the default:
223-
224-
<img src="https://raw.githubusercontent.com/jgphpc/cornerstone-octree/ddt/scripts/img/ddt/4.png" width="400" />
225-
226-
227-
This screenshot shows a debugging session on 128 gpus: ![DDTgpus](https://raw.githubusercontent.com/jgphpc/cornerstone-octree/ddt/scripts/img/ddt/5.png)
228-
229-
More information regarding how to use Linaro DDT be found in the Forge [User Guide](https://docs.linaroforge.com/latest/html/forge/index.html).
230-
231-
#### Linaro MAP
232-
233-
Linaro MAP can be used to profile an application either by the GUI or by the CLI. In the first case the user can set the profiling configuration using the GUI and then see the results. In the latter, the user can use the MAP executable to launch the application they want to profile which will generate a report file that can then be opened from the GUI.
234-
235-
##### Profile application
236-
237-
We'll focus here on the profiling using the CLI but the same configuration applies in the other case as well.
238-
239-
To debug an MPI application on Alps the following script is necessary:
240-
241-
```bash
242-
map -n <num_of_procs> --mpi=slurm --mpiargs="<slurm_arguments>" --profile <executable> <executable_arguments>
243-
```
244-
245-
This will generate a profile report in a binary file with suffix `.map`.
246-
247-
To open this file we can open the Linaro Forge Client on our local machine, navigate to the `linaro MAP` tab, connect to the corresponding `Remote` and then select `LOAD PROFILE DATA FILE` to locate the file.
248-
249-
After loading the report file we'll be in the home of Linaro MAP.
250-
251-
<img src="https://raw.githubusercontent.com/iomaganaris/alps-uenv/refs/heads/linaro_map_docs_archive/docs/images/map-home.png" width="800" />
252-
253-
More information regarding how to use Linaro MAP can be found in the Forge [User Guide](https://docs.linaroforge.com/latest/html/forge/index.html).
254-
255-
Linaro MAP also allows the generation of a high level Performance Report in HTML format that shows key metrics of the profiled application. To see this we can click in the toolbar `Reports > View HTML Performance Report in browser`. This will look like the following:
256-
257-
<img src="https://raw.githubusercontent.com/iomaganaris/alps-uenv/refs/heads/linaro_map_docs_archive/docs/images/perf-report.png" width="800" />
258-
259-
## Troubleshooting
260-
261-
Notes on using specific systems:
262-
263-
=== "santis,todi"
264-
265-
!!! warning
266-
267-
Some clusters are not connected directly to the internet, hence some environment variables need to be set so that the tool can connect to the license server.
268-
269-
```bash
270-
export https_proxy=proxy.cscs.ch:8080
271-
export http_proxy=proxy.cscs.ch:8080
272-
export no_proxy=".local, .cscs.ch, localhost, 148.187.0.0/16, 10.0.0.0/8, 172.16.0.0/12"
273-
```
274-
275-
???- note "default value of `http_proxy`"
276-
277-
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.
278-
279-
3+
Documentation has been moved to the [CSCS Documentation](https://eth-cscs.github.io/cscs-docs/software/devtools/)

recipes/linaro-forge/24.1/environments.yaml renamed to recipes/linaro-forge/24.1.2/environments.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ gcc-env:
44
spec: gcc
55
unify: true
66
specs:
7-
- [email protected] +accept-eula
7+
- [email protected].2 +accept-eula
88
views:
99
forge:
1010
link: roots

recipes/linaro-forge/24.1/post-install renamed to recipes/linaro-forge/24.1.2/post-install

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
forge_bin={{ env.mount }}/env/forge/bin
44
echo "export PATH=$forge_bin:\$PATH" >> {{ env.mount }}/activate
5-
echo "export UENV_DDT_VERSION=24.1" >> {{ env.mount }}/activate
5+
echo "export UENV_DDT_VERSION=24.1.2" >> {{ env.mount }}/activate
File renamed without changes.

recipes/linaro-forge/repo/packages/linaro-forge/package.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,8 @@ class LinaroForge(Package):
2222
maintainers("kenche-linaro")
2323

2424
if platform.machine() == "aarch64":
25-
version(
26-
"24.1.1", sha256="ad02a8912650bdca6f50de12c2b6fb471730a5f38f3c58fe91d48429337d3a10"
27-
)
25+
version("24.1.2", sha256="c3821b2e792d07b1b09f1ca81d1a27590b1bef62d5c48d6f7271debef62b6398")
26+
version("24.1.1", sha256="ad02a8912650bdca6f50de12c2b6fb471730a5f38f3c58fe91d48429337d3a10")
2827
version("24.1", sha256="e297d0c19c95d4db842187eb38882db094094ec667d854aaf396e11a81bffe0b")
2928
version(
3029
"24.0.6", sha256="a7f9f71e4352be3680854611fe433a9974fcb8a327ac65ca3bc950c956eac6e4"
@@ -97,9 +96,8 @@ class LinaroForge(Package):
9796
"22.0.4", sha256="f4cb5bcbaa67f9209299fe4653186a2829760b8b16a2883913aa43766375b04c"
9897
)
9998
elif platform.machine() == "x86_64":
100-
version(
101-
"24.1.1", sha256="b58b59f0b4ccf50eb48753d740172f71941b1fbe132dea96d35c6dad58cd9b96"
102-
)
99+
version("24.1.2", sha256="794fed7cb60dd96fd68f0f414f6a8d15920cd2bd5a8795978150ca27c55a547d")
100+
version("24.1.1", sha256="b58b59f0b4ccf50eb48753d740172f71941b1fbe132dea96d35c6dad58cd9b96")
103101
version("24.1", sha256="0b96878ab73c20b39c4730ed15f24ca86dc5985637ff5d8e68f55e1e802e5fe3")
104102
version(
105103
"24.0.6", sha256="eab198b964862b4664359ccbec1edb27c2dd3b9fa82bcb4e14fc616a2b0341da"

0 commit comments

Comments
 (0)