Skip to content

Add non-blocking wait #1165

Add non-blocking wait

Add non-blocking wait #1165

Workflow file for this run

name: Unit Tests
on:
pull_request:
paths:
- '.github/workflows/UnitTests.yml'
- 'bin/**'
- 'deps/**'
- 'src/**'
- 'test/**'
- 'lib/**'
push:
branches:
- master
- release-*
paths:
- '.github/workflows/UnitTests.yml'
- 'bin/**'
- 'deps/**'
- 'src/**'
- 'test/**'
- 'lib/**'
concurrency:
# Skip intermediate builds: always.
# Cancel intermediate builds: always.
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test-default:
timeout-minutes: 20
strategy:
matrix:
os:
- macos-latest
- ubuntu-latest
- windows-latest
julia_version:
- "1.6"
- "1"
- "nightly"
julia_arch: [x64, x86]
exclude:
- os: macos-latest
julia_arch: x86
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: julia-actions/setup-julia@latest
with:
arch: ${{ matrix.julia_arch }}
version: ${{ matrix.julia_version }}
- uses: julia-actions/cache@v1
- name: add MPIPreferences
shell: julia --color=yes --project=. {0}
run: |
using Pkg
Pkg.develop(path="lib/MPIPreferences")
- uses: julia-actions/julia-runtest@latest
test-openmpi-jll:
timeout-minutes: 20
strategy:
matrix:
os:
- macos-latest
- ubuntu-latest
julia_version:
- "1.6"
- "1"
- "nightly"
julia_arch: [x64, x86]
exclude:
- os: macos-latest
julia_arch: x86
fail-fast: false
env:
JULIA_MPI_TEST_BINARY: OpenMPI_jll
JULIA_MPI_TEST_ABI: OpenMPI
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: julia-actions/setup-julia@latest
with:
arch: ${{ matrix.julia_arch }}
version: ${{ matrix.julia_version }}
- uses: julia-actions/cache@v1
- name: add MPIPreferences
shell: julia --color=yes --project=. {0}
run: |
using Pkg
Pkg.develop(path="lib/MPIPreferences")
- name: use OpenMPI_jll
shell: julia --color=yes --project=test {0}
run: |
using Pkg
Pkg.develop(path="lib/MPIPreferences")
using MPIPreferences
MPIPreferences.use_jll_binary("OpenMPI_jll", export_prefs=true)
rm("test/Manifest.toml")
- uses: julia-actions/julia-runtest@latest
test-system-brew:
timeout-minutes: 20
strategy:
matrix:
mpi:
- mpich
- openmpi
julia_version:
- "1"
fail-fast: false
runs-on: macos-latest
env:
JULIA_MPI_TEST_BINARY: system
ZES_ENABLE_SYSMAN: 1 # https://github.com/open-mpi/ompi/issues/10142
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install MPI via homebrew
run: brew install $MPI
env:
MPI: ${{ matrix.mpi }}
- uses: julia-actions/setup-julia@latest
with:
version: ${{ matrix.julia_version }}
- uses: julia-actions/cache@v1
- name: add MPIPreferences
shell: julia --color=yes --project=. {0}
run: |
using Pkg
Pkg.develop(path="lib/MPIPreferences")
- name: use system MPI
shell: julia --color=yes --project=. {0}
run: |
using MPIPreferences
MPIPreferences.use_system_binary()
- uses: julia-actions/julia-runtest@latest
env:
# TODO: Only disable this test for MPICH. OpenMPI works fine.
JULIA_MPI_TEST_DISABLE_REDUCE_ON_APPLE: 1
test-system-apt:
timeout-minutes: 20
strategy:
matrix:
mpi:
- libmpich-dev
- libopenmpi-dev
julia_version:
- "1"
fail-fast: false
runs-on: ubuntu-20.04
env:
JULIA_MPI_TEST_BINARY: system
OMPI_MCA_btl_base_warn_component_unused: 0
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install MPI via apt
run: |
sudo apt-get update
sudo apt-get install $MPI
env:
MPI: ${{ matrix.mpi }}
- uses: julia-actions/setup-julia@latest
with:
version: ${{ matrix.julia_version }}
- uses: julia-actions/cache@v1
- name: add MPIPreferences
shell: julia --color=yes --project=. {0}
run: |
using Pkg
Pkg.develop(path="lib/MPIPreferences")
- name: use system MPI
shell: julia --color=yes --project=. {0}
run: |
using MPIPreferences
MPIPreferences.use_system_binary()
- uses: julia-actions/julia-runtest@latest
test-intel-linux:
timeout-minutes: 20
strategy:
matrix:
julia_version:
- "1"
fail-fast: false
runs-on: ubuntu-latest
env:
JULIA_MPI_TEST_BINARY: system
JULIA_MPI_TEST_ABI: MPICH
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Cache Intel MPI
id: cache-intelmpi
uses: actions/cache@v3
with:
path: l_mpi_2019.9.304.tgz
key: ${{ runner.os }}-intelmpi-2019.9.304
- name: Download Intel MPI
if: steps.cache-intelmpi.outputs.cache-hit != 'true'
run: wget https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/17263/l_mpi_2019.9.304.tgz
- name: Install Intel MPI
run: |
tar -xzf l_mpi_2019.9.304.tgz
pushd l_mpi_2019.9.304
cat << EOF > intel.conf
ACCEPT_EULA=accept
CONTINUE_WITH_OPTIONAL_ERROR=yes
PSET_INSTALL_DIR=${HOME}/intel
CONTINUE_WITH_INSTALLDIR_OVERWRITE=yes
PSET_MODE=install
ARCH_SELECTED=ALL
COMPONENTS=;intel-conda-index-tool__x86_64;intel-comp-l-all-vars__noarch;intel-comp-nomcu-vars__noarch;intel-imb__x86_64;intel-mpi-rt__x86_64;intel-mpi-sdk__x86_64;intel-mpi-doc__x86_64;intel-mpi-samples__x86_64;intel-mpi-installer-license__x86_64;intel-conda-impi_rt-linux-64-shadow-package__x86_64;intel-conda-impi-devel-linux-64-shadow-package__x86_64;intel-mpi-psxe__x86_64;intel-psxe-common__noarch;intel-compxe-pset
EOF
./install.sh --silent intel.conf
popd
- uses: julia-actions/setup-julia@latest
with:
version: ${{ matrix.julia_version }}
- uses: julia-actions/cache@v1
- name: add MPIPreferences
shell: julia --color=yes --project=. {0}
run: |
using Pkg
Pkg.develop(path="lib/MPIPreferences")
- name: use system MPI
run: |
source ${HOME}/intel/compilers_and_libraries/linux/mpi/intel64/bin/mpivars.sh release
julia --color=yes --project=. -e '
using MPIPreferences
MPIPreferences.use_system_binary()'
# we can't use the usual actions here as we need to ensure the environment variables are set
- name: "Run tests"
run: |
source ${HOME}/intel/compilers_and_libraries/linux/mpi/intel64/bin/mpivars.sh release
julia --color=yes --project -e 'using Pkg; Pkg.test()'
test-oneapi-linux:
timeout-minutes: 20
strategy:
matrix:
julia_version:
- "1"
fail-fast: false
runs-on: ubuntu-latest
env:
JULIA_MPI_TEST_BINARY: system
JULIA_MPI_TEST_ABI: MPICH
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Cache oneAPI MPI
id: cache-oneapi-mpi
uses: actions/cache@v3
with:
path: l_mpi_oneapi_p_2021.7.0.8711_offline.sh
key: ${{ runner.os }}-oneapi-mpi-2021.7.0.08711
- name: Download oneAPI MPI
if: steps.cache-oneapi-mpi.outputs.cache-hit != 'true'
run: wget https://registrationcenter-download.intel.com/akdlm/irc_nas/18926/l_mpi_oneapi_p_2021.7.0.8711_offline.sh
- name: Install oneAPI MPI
run: |
chmod +x l_mpi_oneapi_p_2021.7.0.8711_offline.sh
./l_mpi_oneapi_p_2021.7.0.8711_offline.sh \
-a \
--silent \
--eula accept \
--ignore-errors \
--install-dir ${HOME}/oneapi \
- uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.julia_version }}
- uses: julia-actions/cache@v1
- name: add MPIPreferences
shell: julia --color=yes --project=. {0}
run: |
using Pkg
Pkg.develop(path="lib/MPIPreferences")
- name: use system MPI
run: |
source ${HOME}/oneapi/setvars.sh
julia --color=yes --project=. -e '
using MPIPreferences
MPIPreferences.use_system_binary()'
# we can't use the usual actions here as we need to ensure the environment variables are set
- name: "Run tests"
run: |
source ${HOME}/oneapi/setvars.sh
julia --color=yes --project -e 'using Pkg; Pkg.test()'
test-system-msmpi:
timeout-minutes: 20
strategy:
matrix:
julia_version:
- "1"
fail-fast: false
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Download Microsoft MPI
run: (new-object net.webclient).DownloadFile("https://download.microsoft.com/download/a/5/2/a5207ca5-1203-491a-8fb8-906fd68ae623/msmpisetup.exe", "msmpisetup.exe")
shell: powershell
- name: Install Microsoft MPI
run: msmpisetup.exe -unattend -minimal
shell: cmd
- uses: julia-actions/setup-julia@latest
with:
version: ${{ matrix.julia_version }}
- uses: julia-actions/cache@v1
- name: add MPIPreferences
shell: julia --color=yes --project=. {0}
run: |
using Pkg
Pkg.develop(path="lib/MPIPreferences")
- name: add MPIPreferences, use system
shell: julia --color=yes --project=test {0}
run: |
using Pkg
Pkg.develop(path="lib/MPIPreferences")
using MPIPreferences
MPIPreferences.use_system_binary(;
export_prefs=true,
mpiexec="C:\\Program Files\\Microsoft MPI\\Bin\\mpiexec"
)
rm("test/Manifest.toml")
- uses: julia-actions/julia-runtest@latest
test-mpitrampoline-jll:
timeout-minutes: 20
strategy:
matrix:
os:
- macos-latest
- ubuntu-latest
mpi: [mpitrampoline]
julia_version:
- "1.6"
- "1"
- "nightly"
julia_arch:
- x64
- x86
exclude:
- os: macos-latest
julia_arch: x86
fail-fast: false
runs-on: ${{ matrix.os }}
env:
JULIA_MPI_TEST_BINARY: MPItrampoline_jll
JULIA_MPI_TEST_ABI: MPItrampoline
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: julia-actions/setup-julia@latest
with:
version: ${{ matrix.julia_version }}
- uses: julia-actions/cache@v1
- name: add MPIPreferences
shell: julia --color=yes --project=. {0}
run: |
using Pkg
Pkg.develop(path="lib/MPIPreferences")
- name: use MPItrampoline_jll
shell: julia --color=yes --project=test {0}
run: |
using Pkg
Pkg.develop(path="lib/MPIPreferences")
using MPIPreferences
MPIPreferences.use_jll_binary("MPItrampoline_jll", export_prefs=true)
rm("test/Manifest.toml")
- uses: julia-actions/julia-runtest@latest
test-mpitrampoline-system-apt:
timeout-minutes: 20
strategy:
matrix:
mpi:
- libmpich-dev
- libopenmpi-dev
julia_version:
- "1"
# We don't need to test all combinations
# - "1.7"
# - "nightly"
MPIWrapper:
- "2.10.3"
fail-fast: false
runs-on: ubuntu-20.04
env:
JULIA_MPI_TEST_BINARY: MPItrampoline_jll
JULIA_MPI_TEST_ABI: MPItrampoline
MPITRAMPOLINE_LIB: /usr/local/lib/libmpiwrapper.so
MPITRAMPOLINE_MPIEXEC: /usr/bin/mpiexec
OMPI_MCA_btl_base_warn_component_unused: 0
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install MPI via apt
run: |
sudo apt-get update
sudo apt-get install $MPI
env:
MPI: ${{ matrix.mpi }}
- name: Build MPIwrapper
run: |
wget https://github.com/eschnett/MPIwrapper/archive/refs/tags/v${MPIWrapper}.tar.gz
tar xzf v${MPIWrapper}.tar.gz
cd MPIwrapper-*
cmake -DMPIEXEC_EXECUTABLE=mpiexec -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=/usr/local .
cmake --build .
sudo cmake --install .
env:
MPIWrapper: ${{matrix.MPIWrapper}}
- uses: julia-actions/setup-julia@latest
with:
version: ${{ matrix.julia_version }}
- uses: julia-actions/cache@v1
- name: add MPIPreferences
shell: julia --color=yes --project=. {0}
run: |
using Pkg
Pkg.develop(path="lib/MPIPreferences")
- name: use MPItrampoline_jll
shell: julia --color=yes --project=test {0}
run: |
using Pkg
Pkg.develop(path="lib/MPIPreferences")
using MPIPreferences
MPIPreferences.use_jll_binary("MPItrampoline_jll", export_prefs=true)
rm("test/Manifest.toml")
- uses: julia-actions/julia-runtest@latest
test-mpitrampoline-intel-linux:
timeout-minutes: 20
strategy:
matrix:
julia_version:
- "1.6"
# We don't need to test all combinations
# - "1.7"
# - "nightly"
MPIWrapper:
- "2.10.3"
fail-fast: false
runs-on: ubuntu-latest
env:
JULIA_MPI_TEST_BINARY: MPItrampoline_jll
JULIA_MPI_TEST_ABI: MPItrampoline
MPITRAMPOLINE_LIB: /usr/local/lib/libmpiwrapper.so
MPITRAMPOLINE_MPIEXEC: /home/runner/intel/compilers_and_libraries_2020.4.304/linux/mpi/intel64/bin/mpiexec
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Cache Intel MPI
id: cache-intelmpi
uses: actions/cache@v3
with:
path: l_mpi_2019.9.304.tgz
key: ${{ runner.os }}-intelmpi-2019.9.304
- name: Download Intel MPI
if: steps.cache-intelmpi.outputs.cache-hit != 'true'
run: wget https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/17263/l_mpi_2019.9.304.tgz
- name: Install Intel MPI
run: |
tar -xzf l_mpi_2019.9.304.tgz
pushd l_mpi_2019.9.304
cat << EOF > intel.conf
ACCEPT_EULA=accept
CONTINUE_WITH_OPTIONAL_ERROR=yes
PSET_INSTALL_DIR=${HOME}/intel
CONTINUE_WITH_INSTALLDIR_OVERWRITE=yes
PSET_MODE=install
ARCH_SELECTED=ALL
COMPONENTS=;intel-conda-index-tool__x86_64;intel-comp-l-all-vars__noarch;intel-comp-nomcu-vars__noarch;intel-imb__x86_64;intel-mpi-rt__x86_64;intel-mpi-sdk__x86_64;intel-mpi-doc__x86_64;intel-mpi-samples__x86_64;intel-mpi-installer-license__x86_64;intel-conda-impi_rt-linux-64-shadow-package__x86_64;intel-conda-impi-devel-linux-64-shadow-package__x86_64;intel-mpi-psxe__x86_64;intel-psxe-common__noarch;intel-compxe-pset
EOF
./install.sh --silent intel.conf
popd
- name: Build MPIwrapper
run: |
source ${HOME}/intel/compilers_and_libraries/linux/mpi/intel64/bin/mpivars.sh release
wget https://github.com/eschnett/MPIwrapper/archive/refs/tags/v${MPIWrapper}.tar.gz
tar xzf v${MPIWrapper}.tar.gz
cd MPIwrapper-*
cmake \
-DMPIEXEC_EXECUTABLE=mpiexec \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_INSTALL_PREFIX=/usr/local \
.
cmake --build .
sudo cmake --install .
env:
MPIWrapper: ${{matrix.MPIWrapper}}
- uses: julia-actions/setup-julia@latest
with:
version: ${{ matrix.julia_version }}
# https://discourse.julialang.org/t/recommendation-cache-julia-artifacts-in-ci-services/35484
- name: Cache artifacts
uses: actions/cache@v3
env:
cache-name: cache-artifacts
with:
path: ~/.julia/artifacts
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
restore-keys: |
${{ runner.os }}-test-${{ env.cache-name }}-
${{ runner.os }}-test-
${{ runner.os }}-
- name: add MPIPreferences
shell: julia --color=yes --project=. {0}
run: |
using Pkg
Pkg.develop(path="lib/MPIPreferences")
- name: use MPItrampoline_jll
shell: julia --color=yes --project=test {0}
run: |
using Pkg
Pkg.develop(path="lib/MPIPreferences")
using MPIPreferences
MPIPreferences.use_jll_binary("MPItrampoline_jll", export_prefs=true)
rm("test/Manifest.toml")
# We can't use the usual actions here as we need to ensure the environment variables are set
- name: "Build package"
run: |
source ${HOME}/intel/compilers_and_libraries/linux/mpi/intel64/bin/mpivars.sh release
julia --color=yes --project -e 'using Pkg; Pkg.instantiate(verbose=true); Pkg.build(verbose=true)'
- name: "Run tests"
run: |
source ${HOME}/intel/compilers_and_libraries/linux/mpi/intel64/bin/mpivars.sh release
julia --color=yes --project -e 'using Pkg; Pkg.test()'
test-spack-mvapich:
timeout-minutes: 60
strategy:
matrix:
julia_version:
- "1"
fail-fast: false
runs-on: ubuntu-22.04
env:
JULIA_MPI_TEST_BINARY: system
JULIA_MPI_TEST_EXCLUDE: test_spawn.jl
MV2_SMP_USE_CMA: 0
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Cache MVAPICH
uses: actions/cache@v3
with:
path: |
.ci/mvapich/opt
.ci/mvapich/.spack-env
key: ${{ runner.os }}-mvapich-2.3.7
- name: Install MVAPICH dependencies
run: |
sudo apt-get update
sudo apt-get install libibverbs-dev libpciaccess-dev libxml2-dev pkgconf rdma-core zlib1g-dev
- name: Install MVAPICH via Spack
run: |
git clone -c feature.manyFiles=true --depth 1 https://github.com/spack/spack.git
spack/bin/spack -e .ci/mvapich concretize -f
spack/bin/spack -e .ci/mvapich install
- name: Set PATH and LD_LIBRARY_PATH
run: |
echo "PATH=$(realpath .ci/mvapich/.spack-env/view/bin):${PATH}" >> $GITHUB_ENV
echo "LD_LIBRARY_PATH=$(realpath .ci/mvapich/.spack-env/view/lib):${LD_LIBRARY_PATH}" >> $GITHUB_ENV
- uses: julia-actions/setup-julia@latest
with:
version: ${{ matrix.julia_version }}
- uses: julia-actions/cache@v1
- name: add MPIPreferences
shell: julia --color=yes --project=. {0}
run: |
using Pkg
Pkg.develop(path="lib/MPIPreferences")
Pkg.precompile()
- name: use system MPI
shell: julia --color=yes --project=. {0}
run: |
using MPIPreferences
MPIPreferences.use_system_binary()
- uses: julia-actions/julia-runtest@latest