Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CUDA CI no longer has version tag #840

Merged
merged 8 commits into from
Jun 21, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 13 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,24 @@

- wait

- label: "Tests -- Julia 1.6"
- label: "Tests -- Julia {{matrix.version}}"
matrix:
setup:
version:
# - "1.6"
# - "1.7"
# - "1.8"
# - "1.9"
- "1.10"
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
6 changes: 6 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@ 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.
"""
end
vchuravy marked this conversation as resolved.
Show resolved Hide resolved
elseif backend_name == "AMDGPU"
Pkg.add("AMDGPU")
ENV["JULIA_MPI_TEST_ARRAYTYPE"] = "ROCArray"
Expand Down
Loading