Skip to content

Commit 9a1dd86

Browse files
authored
Add buildkite CI (#552)
1 parent a8f0cc3 commit 9a1dd86

File tree

1 file changed

+121
-0
lines changed

1 file changed

+121
-0
lines changed

.buildkite/pipeline.yml

Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
steps:
2+
- label: "Build OpenMPI -- CUDA"
3+
agents:
4+
queue: "juliagpu"
5+
cuda: "11.0"
6+
env:
7+
OPENMPI_VER: "4.0"
8+
OPENMPI_VER_FULL: "4.0.3"
9+
commands: |
10+
apt-get install --yes --no-install-recommends curl
11+
curl https://download.open-mpi.org/release/open-mpi/v$${OPENMPI_VER}/openmpi-$${OPENMPI_VER_FULL}.tar.gz --output openmpi.tar.gz
12+
tar -zxvf openmpi.tar.gz
13+
pushd openmpi-$${OPENMPI_VER_FULL}
14+
./configure --with-cuda --prefix=$$(realpath ../openmpi)
15+
make -j
16+
make install
17+
popd
18+
tar -zcvf openmpi.tar.gz openmpi/
19+
artifact_paths:
20+
- "openmpi.tar.gz"
21+
# TODO: Need to build UCX with ROCM support first
22+
# Spack for CI?
23+
# - label: "Build OpenMPI -- ROCM"
24+
# agents:
25+
# queue: "juliagpu"
26+
# rocm: "*" # todo fix ROCM version
27+
# env:
28+
# OPENMPI_VER: "4.0"
29+
# OPENMPI_VER_FULL: "4.0.3"
30+
# commands: |
31+
# apt-get install --yes --no-install-recommends curl
32+
# curl https://download.open-mpi.org/release/open-mpi/v$${OPENMPI_VER}/openmpi-$${OPENMPI_VER_FULL}.tar.gz --output openmpi.tar.gz
33+
# tar -zxvf openmpi.tar.gz
34+
# pushd openmpi-$${OPENMPI_VER_FULL}
35+
# ./configure --with-ucx --prefix=$$(realpath ../openmpi)
36+
# make -j
37+
# make install
38+
# popd
39+
# tar -zcvf openmpi.tar.gz openmpi/
40+
# artifact_paths:
41+
# - "openmpi.tar.gz"
42+
- wait: ~
43+
- label: "CUDA -- 1.6"
44+
plugins:
45+
- JuliaCI/julia#v1:
46+
version: "1.6"
47+
agents:
48+
queue: "juliagpu"
49+
cuda: "11.0"
50+
if: build.message !~ /\[skip tests\]/
51+
timeout_in_minutes: 60
52+
env:
53+
JULIA_MPI_TEST_ARRAYTYPE: Array
54+
JULIA_MPI_TEST_NPROCS: 2
55+
JULIA_MPI_PATH: "${BUILDKITE_BUILD_CHECKOUT_PATH}/openmpi"
56+
OMPI_ALLOW_RUN_AS_ROOT: 1
57+
OMPI_ALLOW_RUN_AS_ROOT_CONFIRM: 1
58+
OMPI_MCA_btl_vader_single_copy_mechanism: 'none' # https://github.com/open-mpi/ompi/issues/4948
59+
OPAL_PREFIX: "${BUILDKITE_BUILD_CHECKOUT_PATH}/openmpi" # Should we set this for the user?
60+
JULIA_CUDA_MEMORY_POOL: "none"
61+
commands: |
62+
echo "--- Configure MPI"
63+
buildkite-agent artifact download --step "Build OpenMPI -- CUDA" openmpi.tar.gz .
64+
mkdir -p $${JULIA_MPI_PATH}
65+
tar -zxvf openmpi.tar.gz --strip-components 1 -C $${JULIA_MPI_PATH}
66+
export PATH=$${JULIA_MPI_PATH}/bin:$${PATH}
67+
export LD_LIBRARY_PATH=$${JULIA_MPI_PATH}/lib:$${LD_LIBRARY_PATH}
68+
69+
echo "--- Setup Julia packages"
70+
julia --color=yes --project=test -e '
71+
using Pkg
72+
Pkg.develop(path="lib/MPIPreferences")
73+
using MPIPreferences
74+
MPIPreferences.use_system_binary(export_prefs=true)
75+
rm("test/Manifest.toml")'
76+
julia -e 'import Pkg; Pkg.develop(; path = joinpath(pwd(), "lib", "MPIPreferences"))'
77+
julia -e 'import Pkg; Pkg.develop(; path = pwd())'
78+
julia -e 'import Pkg; Pkg.precompile()'
79+
80+
echo "+++ Run tests"
81+
julia -e 'import Pkg; Pkg.test("MPI")'
82+
83+
- label: "CUDA -- 1.7"
84+
plugins:
85+
- JuliaCI/julia#v1:
86+
version: "1.7"
87+
agents:
88+
queue: "juliagpu"
89+
cuda: "11.0"
90+
if: build.message !~ /\[skip tests\]/
91+
timeout_in_minutes: 60
92+
env:
93+
JULIA_MPI_TEST_ARRAYTYPE: Array
94+
JULIA_MPI_TEST_NPROCS: 2
95+
JULIA_MPI_PATH: "${BUILDKITE_BUILD_CHECKOUT_PATH}/openmpi"
96+
OMPI_ALLOW_RUN_AS_ROOT: 1
97+
OMPI_ALLOW_RUN_AS_ROOT_CONFIRM: 1
98+
OMPI_MCA_btl_vader_single_copy_mechanism: 'none' # https://github.com/open-mpi/ompi/issues/4948
99+
OPAL_PREFIX: "${BUILDKITE_BUILD_CHECKOUT_PATH}/openmpi" # Should we set this for the user?
100+
JULIA_CUDA_MEMORY_POOL: "none"
101+
commands: |
102+
echo "--- Configure MPI"
103+
buildkite-agent artifact download --step "Build OpenMPI -- CUDA" openmpi.tar.gz .
104+
mkdir -p $${JULIA_MPI_PATH}
105+
tar -zxvf openmpi.tar.gz --strip-components 1 -C $${JULIA_MPI_PATH}
106+
export PATH=$${JULIA_MPI_PATH}/bin:$${PATH}
107+
export LD_LIBRARY_PATH=$${JULIA_MPI_PATH}/lib:$${LD_LIBRARY_PATH}
108+
109+
echo "--- Setup Julia packages"
110+
julia --color=yes --project=test -e '
111+
using Pkg
112+
Pkg.develop(path="lib/MPIPreferences")
113+
using MPIPreferences
114+
MPIPreferences.use_system_binary(export_prefs=true)
115+
rm("test/Manifest.toml")'
116+
julia -e 'import Pkg; Pkg.develop(; path = joinpath(pwd(), "lib", "MPIPreferences"))'
117+
julia -e 'import Pkg; Pkg.develop(; path = pwd())'
118+
julia -e 'import Pkg; Pkg.precompile()'
119+
120+
echo "+++ Run tests"
121+
julia -e 'import Pkg; Pkg.test("MPI")'

0 commit comments

Comments
 (0)