Skip to content

Commit

Permalink
CUDA CI no longer has version tag (#840)
Browse files Browse the repository at this point in the history
  • Loading branch information
vchuravy authored Jun 21, 2024
1 parent 2f88c97 commit 690faae
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 50 deletions.
65 changes: 15 additions & 50 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
key: "cuda-build-openmpi"
agents:
queue: "juliagpu"
cuda: "11.0"
cuda: "*"
env:
OPENMPI_VER: "4.1"
OPENMPI_VER_FULL: "4.1.4"
Expand Down Expand Up @@ -44,61 +44,26 @@

- wait

- label: "Tests -- Julia 1.6"
- label: "Tests -- Julia {{matrix.version}}"
matrix:
setup:
version:
- "1.6"
- "1.7"
- "1.8"
- "1.9"
- "1.10"
concurrency: 1
concurrency_group: mpi_cuda
plugins:
- JuliaCI/julia#v1:
version: "1.6"
version: "{{matrix.version}}"
persist_depot_dirs: packages,artifacts,compiled
agents:
queue: "juliagpu"
cuda: "11.0"
cuda: "*"
if: build.message !~ /\[skip tests\]/
timeout_in_minutes: 60
env:
JULIA_MPI_TEST_NPROCS: 2
JULIA_MPI_PATH: "${BUILDKITE_BUILD_CHECKOUT_PATH}/openmpi"
OMPI_ALLOW_RUN_AS_ROOT: 1
OMPI_ALLOW_RUN_AS_ROOT_CONFIRM: 1
OMPI_MCA_btl_vader_single_copy_mechanism: 'none' # https://github.com/open-mpi/ompi/issues/4948
OPAL_PREFIX: "${BUILDKITE_BUILD_CHECKOUT_PATH}/openmpi" # Should we set this for the user?
JULIA_CUDA_MEMORY_POOL: "none"
commands: |
echo "--- Configure MPI"
buildkite-agent artifact download --step "cuda-build-openmpi" mpi-prefix.tar.gz .
mkdir -p $${JULIA_MPI_PATH}
tar -zxf mpi-prefix.tar.gz --strip-components 1 -C $${JULIA_MPI_PATH}
export PATH=$${JULIA_MPI_PATH}/bin:$${PATH}
export LD_LIBRARY_PATH=$${JULIA_MPI_PATH}/lib:$${LD_LIBRARY_PATH}
echo "--- Setup Julia packages"
julia --color=yes --project=. -e '
import Pkg
Pkg.develop(; path = joinpath(pwd(), "lib", "MPIPreferences"))
'
julia --color=yes --project=test -e '
using Pkg
Pkg.develop(path="lib/MPIPreferences")
using MPIPreferences
MPIPreferences.use_system_binary(export_prefs=true)
rm("test/Manifest.toml")
'
echo "+++ Run tests"
julia --color=yes --project=. -e '
import Pkg
Pkg.test("MPI"; test_args=["--backend=CUDA"])
'
- label: "Tests -- Julia latest"
plugins:
- JuliaCI/julia#v1:
version: "1"
persist_depot_dirs: packages,artifacts,compiled
agents:
queue: "juliagpu"
cuda: "11.0"
if: build.message !~ /\[skip tests\]/
timeout_in_minutes: 60
timeout_in_minutes: 90
env:
JULIA_MPI_TEST_NPROCS: 2
JULIA_MPI_PATH: "${BUILDKITE_BUILD_CHECKOUT_PATH}/openmpi"
Expand Down
3 changes: 3 additions & 0 deletions src/environment.jl
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,9 @@ provides a mechanism to check, so it will return `false` with other implementati
This can be overriden by setting the `JULIA_MPI_HAS_CUDA` environment variable to `true`
or `false`.
!!! note
For OpenMPI or OpenMPI-based implementations you first need to call [Init()](@ref).
"""
function has_cuda()
flag = get(ENV, "JULIA_MPI_HAS_CUDA", nothing)
Expand Down
5 changes: 5 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ using DoubleFloats
end
CUDA.precompile_runtime()
ArrayType = CUDA.CuArray

@info """
Running CUDA tests. Ensure that your MPI implementation is
CUDA-aware using `MPI.has_cuda` before reporting issues.
"""
elseif backend_name == "AMDGPU"
Pkg.add("AMDGPU")
ENV["JULIA_MPI_TEST_ARRAYTYPE"] = "ROCArray"
Expand Down

0 comments on commit 690faae

Please sign in to comment.