forked from JuliaParallel/MPI.jl
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
buildkite: get CUDA working again (JuliaParallel#607)
* Use latest Open MPI * Use --with-cuda when building Open MPI * Add CUDA group to Buildkite * Disable ROCm for now * Disable soft-fail * Update badge * Move common test config to test/common.jl * add synchronize() function
- Loading branch information
1 parent
04cf5c4
commit f39af64
Showing
25 changed files
with
202 additions
and
363 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,163 +1,137 @@ | ||
steps: | ||
- label: "Build OpenMPI -- CUDA" | ||
agents: | ||
queue: "juliagpu" | ||
cuda: "11.0" | ||
env: | ||
OPENMPI_VER: "4.0" | ||
OPENMPI_VER_FULL: "4.0.3" | ||
UCX_VER: "1.12.1" | ||
CCACHE_DIR: "/root/ccache" | ||
commands: | | ||
echo "--- Install packages" | ||
apt-get install --yes --no-install-recommends curl ccache | ||
export PATH="/usr/lib/ccache/:$$PATH" | ||
- group: "CUDA" | ||
key: "cuda" | ||
steps: | ||
- label: "Build OpenMPI" | ||
key: "cuda-build-openmpi" | ||
agents: | ||
queue: "juliagpu" | ||
cuda: "11.0" | ||
env: | ||
OPENMPI_VER: "4.0" | ||
OPENMPI_VER_FULL: "4.0.3" | ||
UCX_VER: "1.12.1" | ||
CCACHE_DIR: "/root/ccache" | ||
commands: | | ||
echo "--- Install packages" | ||
apt-get install --yes --no-install-recommends curl ccache | ||
export PATH="/usr/lib/ccache/:$$PATH" | ||
echo "--- Build UCX" | ||
curl -L https://github.com/openucx/ucx/releases/download/v$${UCX_VER}/ucx-$${UCX_VER}.tar.gz --output ucx.tar.gz | ||
tar -zxf ucx.tar.gz | ||
pushd ucx-* | ||
./configure --with-cuda=/usr/local/cuda --enable-mt --prefix=$$(realpath ../mpi-prefix) | ||
make -j | ||
make install | ||
popd | ||
echo "--- Build UCX" | ||
curl -L https://github.com/openucx/ucx/releases/download/v$${UCX_VER}/ucx-$${UCX_VER}.tar.gz --output ucx.tar.gz | ||
tar -zxf ucx.tar.gz | ||
pushd ucx-* | ||
./configure --with-cuda=/usr/local/cuda --enable-mt --prefix=$$(realpath ../mpi-prefix) | ||
make -j | ||
make install | ||
popd | ||
echo "--- Build OpenMPI" | ||
curl -L https://download.open-mpi.org/release/open-mpi/v$${OPENMPI_VER}/openmpi-$${OPENMPI_VER_FULL}.tar.gz --output openmpi.tar.gz | ||
tar -zxf openmpi.tar.gz | ||
pushd openmpi-$${OPENMPI_VER_FULL} | ||
./configure --with-ucx=$$(realpath ../mpi-prefix) --prefix=$$(realpath ../mpi-prefix) | ||
make -j | ||
make install | ||
popd | ||
echo "--- Build OpenMPI" | ||
curl -L https://download.open-mpi.org/release/open-mpi/v$${OPENMPI_VER}/openmpi-$${OPENMPI_VER_FULL}.tar.gz --output openmpi.tar.gz | ||
tar -zxf openmpi.tar.gz | ||
pushd openmpi-$${OPENMPI_VER_FULL} | ||
./configure --with-ucx=$$(realpath ../mpi-prefix) --with-cuda=/usr/local/cuda --prefix=$$(realpath ../mpi-prefix) | ||
make -j | ||
make install | ||
popd | ||
echo "--- Package prefix" | ||
tar -zcf mpi-prefix.tar.gz mpi-prefix/ | ||
echo "--- Package prefix" | ||
tar -zcf mpi-prefix.tar.gz mpi-prefix/ | ||
echo "--- ccache stats" | ||
ccache -s | ||
artifact_paths: | ||
- "mpi-prefix.tar.gz" | ||
- label: "Build OpenMPI -- ROCM" | ||
agents: | ||
queue: "juliagpu" | ||
rocm: "*" # todo fix ROCM version | ||
env: | ||
OPENMPI_VER: "4.0" | ||
OPENMPI_VER_FULL: "4.0.3" | ||
UCX_VER: "1.12.1" | ||
CCACHE_DIR: "/root/ccache" | ||
commands: | | ||
echo "--- Install packages" | ||
apt-get install --yes --no-install-recommends curl ccache | ||
export PATH="/usr/lib/ccache/:$$PATH" | ||
echo "--- ccache stats" | ||
ccache -s | ||
artifact_paths: | ||
- "mpi-prefix.tar.gz" | ||
|
||
echo "--- Build UCX" | ||
curl -L https://github.com/openucx/ucx/releases/download/v$${UCX_VER}/ucx-$${UCX_VER}.tar.gz --output ucx.tar.gz | ||
tar -zxf ucx.tar.gz | ||
pushd ucx-* | ||
./configure --with-rocm --enable-mt --prefix=$$(realpath ../mpi-prefix) | ||
make -j | ||
make install | ||
popd | ||
- wait | ||
|
||
- label: "Tests -- Julia 1.6" | ||
plugins: | ||
- JuliaCI/julia#v1: | ||
version: "1.6" | ||
persist_depot_dirs: packages,artifacts,compiled | ||
agents: | ||
queue: "juliagpu" | ||
cuda: "11.0" | ||
if: build.message !~ /\[skip tests\]/ | ||
timeout_in_minutes: 60 | ||
env: | ||
JULIA_MPI_TEST_ARRAYTYPE: CuArray | ||
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 "--- Build OpenMPI" | ||
curl -L https://download.open-mpi.org/release/open-mpi/v$${OPENMPI_VER}/openmpi-$${OPENMPI_VER_FULL}.tar.gz --output openmpi.tar.gz | ||
tar -zxf openmpi.tar.gz | ||
pushd openmpi-* | ||
./configure --with-ucx=$$(realpath ../mpi-prefix) --prefix=$$(realpath ../mpi-prefix) | ||
make -j | ||
make install | ||
popd | ||
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 "--- Package prefix" | ||
tar -zcf mpi-prefix.tar.gz mpi-prefix/ | ||
echo "+++ Run tests" | ||
julia --color=yes --project=. -e ' | ||
import Pkg | ||
Pkg.test("MPI") | ||
' | ||
echo "--- ccache stats" | ||
ccache -s | ||
artifact_paths: | ||
- "mpi-prefix.tar.gz" | ||
- wait: ~ | ||
- label: "CUDA -- 1.6" | ||
plugins: | ||
- JuliaCI/julia#v1: | ||
version: "1.6" | ||
persist_depot_dirs: packages,artifacts,compiled | ||
agents: | ||
queue: "juliagpu" | ||
cuda: "11.0" | ||
if: build.message !~ /\[skip tests\]/ | ||
timeout_in_minutes: 60 | ||
env: | ||
JULIA_MPI_TEST_ARRAYTYPE: CuArray | ||
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" | ||
soft_fail: true | ||
commands: | | ||
echo "--- Configure MPI" | ||
buildkite-agent artifact download --step "Build OpenMPI -- CUDA" 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} | ||
- label: "Tests -- Julia 1.7" | ||
plugins: | ||
- JuliaCI/julia#v1: | ||
version: "1.7" | ||
persist_depot_dirs: packages,artifacts,compiled | ||
agents: | ||
queue: "juliagpu" | ||
cuda: "11.0" | ||
if: build.message !~ /\[skip tests\]/ | ||
timeout_in_minutes: 60 | ||
env: | ||
JULIA_MPI_TEST_ARRAYTYPE: CuArray | ||
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=test -e ' | ||
using Pkg | ||
Pkg.develop(path="lib/MPIPreferences") | ||
using MPIPreferences | ||
MPIPreferences.use_system_binary(export_prefs=true) | ||
rm("test/Manifest.toml")' | ||
julia -e 'import Pkg; Pkg.develop(; path = joinpath(pwd(), "lib", "MPIPreferences"))' | ||
julia -e 'import Pkg; Pkg.develop(; path = pwd())' | ||
julia -e 'import Pkg; Pkg.precompile()' | ||
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 -e 'import Pkg; Pkg.test("MPI")' | ||
- label: "CUDA -- 1.7" | ||
plugins: | ||
- JuliaCI/julia#v1: | ||
version: "1.7" | ||
persist_depot_dirs: packages,artifacts,compiled | ||
agents: | ||
queue: "juliagpu" | ||
cuda: "11.0" | ||
if: build.message !~ /\[skip tests\]/ | ||
timeout_in_minutes: 60 | ||
env: | ||
JULIA_MPI_TEST_ARRAYTYPE: CuArray | ||
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" | ||
soft_fail: true | ||
commands: | | ||
echo "--- Configure MPI" | ||
buildkite-agent artifact download --step "Build OpenMPI -- CUDA" 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=test -e ' | ||
using Pkg | ||
Pkg.develop(path="lib/MPIPreferences") | ||
using MPIPreferences | ||
MPIPreferences.use_system_binary(export_prefs=true) | ||
rm("test/Manifest.toml")' | ||
julia -e 'import Pkg; Pkg.develop(; path = joinpath(pwd(), "lib", "MPIPreferences"))' | ||
julia -e 'import Pkg; Pkg.develop(; path = pwd())' | ||
julia -e 'import Pkg; Pkg.precompile()' | ||
echo "+++ Run tests" | ||
julia -e 'import Pkg; Pkg.test("MPI")' | ||
echo "+++ Run tests" | ||
julia --color=yes --project=. -e ' | ||
import Pkg | ||
Pkg.test("MPI") | ||
' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
using Test | ||
using MPI | ||
|
||
if get(ENV,"JULIA_MPI_TEST_ARRAYTYPE","") == "CuArray" | ||
import CUDA | ||
ArrayType = CUDA.CuArray | ||
synchronize() = CUDA.synchronize() | ||
else | ||
ArrayType = Array | ||
synchronize() = nothing | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.