Skip to content

Commit e6ac71d

Browse files
authored
Release candidate: v1.76.0 (#5013)
2 parents 3d8865c + 563893b commit e6ac71d

140 files changed

Lines changed: 1469 additions & 370 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/pr-precommit.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,21 @@ on:
2626
- main
2727
- develop
2828
- release-candidate
29+
- hotfix-*
2930

3031
jobs:
3132
pre-commit:
3233
runs-on: ubuntu-latest
3334
steps:
3435
- uses: actions/checkout@v4
36+
- name: Free Disk Space (Ubuntu)
37+
uses: jlumbroso/free-disk-space@main
38+
with:
39+
tool-cache: false
40+
android: true
41+
dotnet: true
42+
haskell: true
43+
large-packages: true
3544
- uses: actions/setup-python@v5
3645
with:
3746
# internal Python tests require Python 3.12
@@ -61,6 +70,14 @@ jobs:
6170
runs-on: ubuntu-latest
6271
steps:
6372
- uses: actions/checkout@v4
73+
- name: Free Disk Space (Ubuntu)
74+
uses: jlumbroso/free-disk-space@main
75+
with:
76+
tool-cache: false
77+
android: true
78+
dotnet: true
79+
haskell: true
80+
large-packages: true
6481
- uses: actions/setup-python@v5
6582
with:
6683
# the slurm-files Python requirements.txt requires updating

Makefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ MIN_GOLANG_VERSION=1.24 # for building gcluster
88
warn-go-version warn-terraform-version warn-packer-version \
99
test-engine validate_configs validate_golden_copy packer-check \
1010
terraform-format packer-format mypy \
11-
check-tflint check-pre-commit
11+
check-tflint check-pre-commit ci-tests
1212

1313
SHELL=/bin/bash -o pipefail
1414
ENG = ./cmd/... ./pkg/...
@@ -71,6 +71,7 @@ install-dev-deps: warn-terraform-version warn-packer-version check-pre-commit ch
7171
go install mvdan.cc/sh/v3/cmd/shfmt@latest
7272
go install golang.org/x/tools/cmd/goimports@latest
7373
go install honnef.co/go/tools/cmd/staticcheck@latest
74+
go install github.com/jstemmer/go-junit-report/v2@latest
7475
pip install -r community/modules/scheduler/schedmd-slurm-gcp-v6-controller/modules/slurm_files/scripts/requirements.txt
7576
pip install -r community/modules/scheduler/schedmd-slurm-gcp-v6-controller/modules/slurm_files/scripts/requirements-dev.txt
7677
pip install mypy==1.18.2
@@ -93,6 +94,9 @@ clean:
9394
done
9495

9596
# RULES SUPPORTING THE ABOVE
97+
ci-tests: warn-go-missing
98+
$(info **************** running gcluster unit tests for CI **************)
99+
go test -v $(ENG) | go-junit-report > test-results.xml
96100

97101
test-engine: warn-go-missing
98102
$(info **************** vetting go code **********************)

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ The Cluster Toolkit officially supports the following VM images:
119119

120120
* HPC Rocky Linux 8
121121
* Debian 11
122-
* Ubuntu 20.04 LTS
122+
* Ubuntu 22.04 LTS
123123

124124
For more information on these and other images, see
125125
[docs/vm-images.md](docs/vm-images.md).

cmd/root.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ HPC deployments on the Google Cloud Platform.`,
5353
logging.Fatal("cmd.Help function failed: %s", err)
5454
}
5555
},
56-
Version: "v1.75.1",
56+
Version: "v1.76.0",
5757
Annotations: annotation,
5858
}
5959
)

community/examples/hpc-slinky/hpc-slinky.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ deployment_groups:
4949
ip_cidr_range: 10.0.32.0/20
5050

5151
- id: node_pool_service_account
52-
source: community/modules/project/service-account
52+
source: modules/project/service-account
5353
settings:
5454
name: gke-np-sa
5555
project_roles:
@@ -61,7 +61,7 @@ deployment_groups:
6161
- artifactregistry.reader
6262

6363
- id: workload_service_account
64-
source: community/modules/project/service-account
64+
source: modules/project/service-account
6565
settings:
6666
name: gke-wl-sa
6767
project_roles:

community/examples/hpc-slurm-ubuntu2004.yaml renamed to community/examples/hpc-slurm-ubuntu2204.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
---
1616

17-
blueprint_name: hpc-slurm-ubuntu2004-v6
17+
blueprint_name: hpc-slurm-ubuntu2204-v6
1818

1919
vars:
2020
project_id: ## Set GCP Project ID Here ##
Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
The examples in this directory are used to show how enroot + pyxis can be used
2+
to launch containerized workloads via Slurm running on GKE.
3+
4+
Contents:
5+
6+
* `build-nccl-tests.sh`: A Slurm batch script for building the nccl-tests.
7+
* `run-nccl-tests-rdma.sh`: A Slurm batch script for running the nccl-tests for A3 Ultra, A4, A4X with RDMA.
8+
`all_gather_perf` benchmark.
9+
* `run-nccl-tests-tcpxo.sh`: A Slurm batch script for running the nccl-tests for A3 Mega with TCPXO.
10+
`all_gather_perf` benchmark.
11+
12+
# Running NCCL-Tests via Enroot/Pyxis
13+
14+
In general the workflow to deploy GPUDirect-RDMA-enabled workloads via enroot-pyxis is
15+
the following:
16+
17+
1. Convert your container into a squashfs based container image
18+
2. Set required environment variables
19+
3. Run your application workload
20+
21+
## TLDR
22+
23+
For an end-to-end example, copy the `build-nccl-tests.sh` and
24+
`run-nccl-tests-rdma.sh` or `run-nccl-tests-tcpxo.sh` to your login node.
25+
26+
And run the following:
27+
28+
```text
29+
BUILD_JOB=$(sbatch --parsable build-nccl-tests.sh) # takes ~4 minutes
30+
sbatch -d afterok:${BUILD_JOB} run-nccl-tests-rdma.sh # takes ~3 minutes
31+
```
32+
33+
The latter should result in a slurm-XX.out file that contains the result of the nccl
34+
`all_gather_perf` benchmark:
35+
36+
```text
37+
#
38+
# out-of-place in-place
39+
# size count type redop root time algbw busbw #wrong time algbw busbw #wrong
40+
# (B) (elements) (us) (GB/s) (GB/s) (us) (GB/s) (GB/s)
41+
268435456 4194304 float none -1 XXXXX XXX.XX XXX.XX N/A XXXXXX XXX.XX XXX.XX 0
42+
536870912 8388608 float none -1 XXXXX XXX.XX XXX.XX N/A XXXXXX XXX.XX XXX.XX 0
43+
1073741824 16777216 float none -1 XXXXX XXX.XX XXX.XX N/A XXXXXX XXX.XX XXX.XX 0
44+
2147483648 33554432 float none -1 XXXXX XXX.XX XXX.XX N/A XXXXXX XXX.XX XXX.XX 0
45+
4294967296 67108864 float none -1 XXXXX XXX.XX XXX.XX N/A XXXXXX XXX.XX XXX.XX 0
46+
8589934592 134217728 float none -1 XXXXX XXX.XX XXX.XX N/A XXXXXX XXX.XX XXX.XX 0
47+
# Out of bounds values : 0 OK
48+
# Avg bus bandwidth : XXX.XX
49+
#
50+
```
51+
52+
For more details, follow the remainder of this README.
53+
54+
## Detailed Instructions
55+
56+
All of the following should be done on the login node of your slurm cluster,
57+
and while somewhere on the shared Filestore filesystem (typically the user's
58+
home directory).
59+
60+
### Building NCCL-tests
61+
62+
See build-nccl-tests.sh for an example. Within it, you will see that first we'll
63+
create a squashfs version of the container using we want to launch using `enroot
64+
import`. We do this because otherwise we'd be pulling the (typically more than
65+
10GB) image multiple times from the source on each node, converting to sqsh each
66+
time, etc, which would make the job launch longer.
67+
68+
For building the nccl-tests binaries, we use `pyxis` to run the enroot container
69+
and build the nccl-tests within that container to ensure the resulting binaries
70+
are compatible with the container environment.
71+
72+
Both of the above (importing and building) are accomplished by running:
73+
74+
```text
75+
sbatch build-nccl-tests.sh
76+
```
77+
78+
### Running your application on a3-mega instances
79+
80+
For a complete example, run:
81+
82+
```text
83+
sbatch run-nccl-tests-tcpxo.sh
84+
```
85+
86+
### Running your application on a3-ultra instances
87+
88+
For a complete example, run:
89+
90+
```text
91+
sbatch run-nccl-tests-rdma.sh
92+
```
93+
94+
The output will appear in in a `slurm-<job#>.log` file. If the name of your a3-ultragpu
95+
partition is different than "gke", you will need to modify the `build-nccl-tests.sh`
96+
and `run-nccl-tests.sh` scripts's `#SBATCH --partition` setting. Alternatively, you
97+
can run `sbatch -p <your partition> <script>`.
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
#!/bin/bash
2+
# Copyright 2025 Google LLC
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
16+
#SBATCH --exclusive
17+
#SBATCH --ntasks=1
18+
#SBATCH --partition=gke
19+
#SBATCH --ntasks-per-node=1
20+
#SBATCH --gpus-per-node=8
21+
22+
# Usage: sbatch build-nccl-tests.sh
23+
24+
set -x
25+
26+
CONTAINER_IMAGE=./nvidia+pytorch+24.09-py3.sqsh
27+
28+
# Import the pytorch container to enroot if not already present.
29+
if [ ! -f ${CONTAINER_IMAGE} ]; then
30+
# This creates a file named "nvidia+pytorch+24.09-py3.sqsh", which
31+
# uses ~18 GB of disk space. This should be run on a filesystem that
32+
# can be seen by all worker nodes
33+
enroot import docker://nvcr.io#nvidia/pytorch:24.09-py3
34+
fi
35+
36+
# Install nccl-tests using openmpi from within pytorch container
37+
srun --container-mounts="$PWD:/nccl" \
38+
--container-image=${CONTAINER_IMAGE} \
39+
bash -c "
40+
cd /nccl &&
41+
git clone https://github.com/NVIDIA/nccl-tests.git &&
42+
cd /nccl/nccl-tests/ &&
43+
MPI=1 CC=mpicc CXX=mpicxx make -j
44+
"
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
#!/bin/bash
2+
# Copyright 2025 Google LLC
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
16+
#SBATCH --partition=gke
17+
#SBATCH --mem=0
18+
#SBATCH -N 2
19+
#SBATCH --gpus-per-node=8
20+
#SBATCH --ntasks-per-node=8
21+
#SBATCH --exclusive
22+
23+
# Usage: sbatch run-nccl-tests.sh
24+
25+
set -x
26+
# This should be set to the squashfs file that you created for your application
27+
CONTAINER_IMAGE=./nvidia+pytorch+24.09-py3.sqsh
28+
29+
# Set up NCCL Environment variables
30+
# The following two can be useful for debugging
31+
# export NCCL_DEBUG=INFO
32+
# export NCCL_DEBUG_SUBSYS=INIT,NET
33+
34+
# These parameters should not be modified
35+
source /usr/local/gib/scripts/set_nccl_env.sh
36+
export NCCL_NET=gIB
37+
38+
# Mount /var/tmp to allow the rest of the enroot container to be read-only, and
39+
# mount current $PWD to /nccl to for accessing nccl-tests binary
40+
CONTAINER_MOUNTS="/var/tmp:/var/tmp"
41+
42+
# Mount PWD to /nccl in the enroot container
43+
CONTAINER_MOUNTS=${CONTAINER_MOUNTS},"$PWD:/nccl"
44+
45+
# Mount required directories for gIB libnccl-net
46+
CONTAINER_MOUNTS=${CONTAINER_MOUNTS},"/usr/local/gib"
47+
48+
# Run the workload
49+
srun -l \
50+
-N "${SLURM_NNODES}" \
51+
--ntasks-per-node=8 \
52+
--mpi=pmi2 \
53+
--container-image="${CONTAINER_IMAGE}" \
54+
--container-mounts="${CONTAINER_MOUNTS}" \
55+
sh -c "export LD_LIBRARY_PATH=/usr/local/gib/lib64:/usr/lib/x86_64-linux-gnu:\$LD_LIBRARY_PATH;
56+
/nccl/nccl-tests/build/all_gather_perf -b 256M -e 8G -f 2 -g 1 -w 5 --iters 200;
57+
"
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
#!/bin/bash
2+
# Copyright 2025 Google LLC
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
16+
#SBATCH --partition=gke
17+
#SBATCH --mem=0
18+
#SBATCH -N 2
19+
#SBATCH --gpus-per-node=8
20+
#SBATCH --ntasks-per-node=8
21+
#SBATCH --exclusive
22+
23+
# Usage: sbatch run-nccl-tests.sh
24+
25+
set -x
26+
# This should be set to the squashfs file that you created for your application
27+
CONTAINER_IMAGE=./nvidia+pytorch+24.09-py3.sqsh
28+
29+
# Set up NCCL Environment variables
30+
# The following two can be useful for debugging
31+
# export NCCL_DEBUG=INFO
32+
# export NCCL_DEBUG_SUBSYS=INIT,NET
33+
34+
# These parameters should not be modified
35+
NCCL_LIB_DIR="/usr/local/nvidia/lib64" source /usr/local/nvidia/lib64/nccl-env-profile.sh
36+
export NCCL_FASTRAK_LLCM_DEVICE_DIRECTORY=/dev/aperture_devices
37+
38+
# Here we grab all the environment variables that need to be
39+
# passed down into the container. Slurm would otherwise only pass these env vars
40+
# to the job environment on the host.
41+
# shellcheck disable=SC2001
42+
HOST_VARS=$(sed 's/ \{1,\}/,/g' <<<"${!NCCL*}")
43+
44+
# Mount /var/tmp to allow the rest of the enroot container to be read-only, and
45+
# mount current $PWD to /nccl to for accessing nccl-tests binary
46+
CONTAINER_MOUNTS="/var/tmp:/var/tmp"
47+
48+
# Mount PWD to /nccl in the enroot container
49+
CONTAINER_MOUNTS=${CONTAINER_MOUNTS},"$PWD:/nccl"
50+
51+
# Mount required directories for GPUDirect-TCPXO functionality
52+
CONTAINER_MOUNTS=${CONTAINER_MOUNTS},"/usr/local/nvidia/lib64/"
53+
54+
# Run the workload
55+
srun -l \
56+
-N "${SLURM_NNODES}" \
57+
--mpi=pmi2 \
58+
--ntasks-per-node=8 \
59+
--container-image="${CONTAINER_IMAGE}" \
60+
--container-env="${HOST_VARS}" \
61+
--container-mounts="${CONTAINER_MOUNTS}" \
62+
sh -c "
63+
export LD_LIBRARY_PATH=/usr/local/nvidia/lib64:/usr/lib/x86_64-linux-gnu:\$LD_LIBRARY_PATH;
64+
/nccl/nccl-tests/build/all_gather_perf -b 8M -e 8G -f 2 -g 1 -w 5 --iters 200;
65+
"

0 commit comments

Comments
 (0)