Skip to content

Commit 5cf57d8

Browse files
vchuravysimonbyrne
andauthored
Enable GPU CI (#557)
Co-authored-by: Simon Byrne <[email protected]>
1 parent 2b93e68 commit 5cf57d8

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

.buildkite/pipeline.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,15 @@ steps:
5050
if: build.message !~ /\[skip tests\]/
5151
timeout_in_minutes: 60
5252
env:
53-
JULIA_MPI_TEST_ARRAYTYPE: Array
53+
JULIA_MPI_TEST_ARRAYTYPE: CuArray
5454
JULIA_MPI_TEST_NPROCS: 2
5555
JULIA_MPI_PATH: "${BUILDKITE_BUILD_CHECKOUT_PATH}/openmpi"
5656
OMPI_ALLOW_RUN_AS_ROOT: 1
5757
OMPI_ALLOW_RUN_AS_ROOT_CONFIRM: 1
5858
OMPI_MCA_btl_vader_single_copy_mechanism: 'none' # https://github.com/open-mpi/ompi/issues/4948
5959
OPAL_PREFIX: "${BUILDKITE_BUILD_CHECKOUT_PATH}/openmpi" # Should we set this for the user?
6060
JULIA_CUDA_MEMORY_POOL: "none"
61+
soft_fail: true
6162
commands: |
6263
echo "--- Configure MPI"
6364
buildkite-agent artifact download --step "Build OpenMPI -- CUDA" openmpi.tar.gz .
@@ -90,14 +91,15 @@ steps:
9091
if: build.message !~ /\[skip tests\]/
9192
timeout_in_minutes: 60
9293
env:
93-
JULIA_MPI_TEST_ARRAYTYPE: Array
94+
JULIA_MPI_TEST_ARRAYTYPE: CuArray
9495
JULIA_MPI_TEST_NPROCS: 2
9596
JULIA_MPI_PATH: "${BUILDKITE_BUILD_CHECKOUT_PATH}/openmpi"
9697
OMPI_ALLOW_RUN_AS_ROOT: 1
9798
OMPI_ALLOW_RUN_AS_ROOT_CONFIRM: 1
9899
OMPI_MCA_btl_vader_single_copy_mechanism: 'none' # https://github.com/open-mpi/ompi/issues/4948
99100
OPAL_PREFIX: "${BUILDKITE_BUILD_CHECKOUT_PATH}/openmpi" # Should we set this for the user?
100101
JULIA_CUDA_MEMORY_POOL: "none"
102+
soft_fail: true
101103
commands: |
102104
echo "--- Configure MPI"
103105
buildkite-agent artifact download --step "Build OpenMPI -- CUDA" openmpi.tar.gz .

test/runtests.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ using MPIPreferences
66
using DoubleFloats
77
if get(ENV, "JULIA_MPI_TEST_ARRAYTYPE", "") == "CuArray"
88
import CUDA
9+
CUDA.version()
10+
CUDA.precompile_runtime()
911
ArrayType = CUDA.CuArray
1012
else
1113
ArrayType = Array

test/test_bcast.jl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,14 @@ MPI.Init()
1515
comm = MPI.COMM_WORLD
1616

1717
root = 0
18-
Random.seed!(17)
1918
matsize = (17,17)
2019

2120
for T in Base.uniontypes(MPI.MPIDatatype)
21+
# This test depends on the stability of the rng and we have observed with
22+
# CUDA.jl that it is not gurantueed that the same number of rand calls will
23+
# occur on each rank. (This is a hypothesis). To be sure we shall seed the rng
24+
# just before we call rand.
25+
Random.seed!(17)
2226
A = ArrayType(rand(T, matsize))
2327
B = MPI.Comm_rank(comm) == root ? A : similar(A)
2428
MPI.Bcast!(B, comm; root=root)

0 commit comments

Comments
 (0)