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

Add CI job to run unittests under MPI #1244

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all 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
54 changes: 52 additions & 2 deletions .github/workflows/tests_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ jobs:
tests:
runs-on: ${{ matrix.os }}
needs: [sdist, lint]
timeout-minutes: 30
timeout-minutes: 60
strategy:
matrix:
python-version: [3.6, 3.7, 3.8, 3.9]
Expand Down Expand Up @@ -124,10 +124,60 @@ jobs:
pip check
stestr run --slowest
shell: bash
tests-mpi:
runs-on: ${{ matrix.os }}
needs: [sdist, lint]
timeout-minutes: 120
strategy:
matrix:
python-version: [3.9]
os: ["ubuntu-latest"]
env:
AER_THRUST_BACKEND: OMP
QISKIT_TEST_CAPTURE_STREAMS: 1
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Pip cache
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-${{ matrix.python-version}}-pip-test-${{ hashFiles('setup.py','requirements-dev.txt','constraints.txt') }}
restore-keys: |
${{ runner.os }}-${{ matrix.python-version}}-pip-test-
${{ runner.os }}-${{ matrix.python-version}}-pip-
${{ runner.os }}-${{ matrix.python-version}}-
- name: Install Deps
run: |
python -m venv mpi_tests
mpi_tests/bin/python -m pip install -U -c constraints.txt -r requirements-dev.txt wheel git+https://github.com/Qiskit/qiskit-terra
shell: bash
- name: Install openblas and openmpi
run: |
set -e
sudo apt-get update
sudo apt-get install -y libopenblas-dev openmpi-bin libopenmpi-dev
shell: bash
- name: Install Aer
run: |
set -e
mpi_tests/bin/python setup.py bdist_wheel -- -DAER_MPI=True
mpi_tests/bin/pip install --find-links=dist qiskit-aer
- name: Run Tests
env:
QISKIT_SUPPRESS_PACKAGING_WARNINGS: Y
run: |
set -e
pip check
/usr/bin/mpirun.openmpi -host localhost:2 -np 2 mpi_tests/bin/python -m unittest discover ./test/terra
shell: bash
tests-json-input:
runs-on: ${{ matrix.os }}
needs: [sdist, lint]
timeout-minutes: 45
timeout-minutes: 60
strategy:
matrix:
python-version: [3.9]
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tests_mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ jobs:
tests:
runs-on: ${{ matrix.os }}
needs: [sdist, lint]
timeout-minutes: 40
timeout-minutes: 60
strategy:
matrix:
python-version: [3.6, 3.7, 3.8, 3.9]
Expand Down Expand Up @@ -130,7 +130,7 @@ jobs:
tests-json-input:
runs-on: ${{ matrix.os }}
needs: [sdist, lint]
timeout-minutes: 45
timeout-minutes: 60
strategy:
matrix:
python-version: [3.9]
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tests_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ jobs:
tests:
runs-on: ${{ matrix.os }}
needs: ["lint"]
timeout-minutes: 30
timeout-minutes: 60
strategy:
matrix:
python-version: [3.6, 3.7, 3.8, 3.9]
Expand Down Expand Up @@ -128,7 +128,7 @@ jobs:
tests-json-input:
runs-on: ${{ matrix.os }}
needs: ["lint"]
timeout-minutes: 45
timeout-minutes: 60
strategy:
matrix:
python-version: [3.9]
Expand Down