From efda2eadb501e1cafc55888cbecaee1bb48c9ed3 Mon Sep 17 00:00:00 2001 From: Jun Doi Date: Thu, 4 Jul 2024 14:32:34 +0900 Subject: [PATCH] Fixes for recent CI failures (#2186) * trying to fix CI failure * change CUDA rpm to use RHEL8 * CentOS issue * fix sed * fix sed * fix sed, merge fix for CUDA 12.5 * fix sed * use scipy 1.13.1 to ignore neko error * use scipy 1.13.1 to ignore neko error * use scipy 1.13.1 to ignore neko error * use scipy 1.13.1 to ignore neko error * use scipy 1.13.1 to ignore neko error --- .github/workflows/build.yml | 4 ++-- .github/workflows/deploy.yml | 10 +++++----- .github/workflows/neko.yml | 7 +++++-- pyproject.toml | 4 ++-- requirements-dev.txt | 2 +- src/simulators/statevector/chunk/thrust_kernels.hpp | 2 +- 6 files changed, 16 insertions(+), 13 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8c1592f79b..40c9cb4e5f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -186,7 +186,7 @@ jobs: python -m pip install cibuildwheel==2.17.0 - name: Build wheels env: - CIBW_BEFORE_ALL: "yum install -y yum-utils wget && wget -q https://developer.download.nvidia.com/compute/cuda/11.8.0/local_installers/cuda-repo-rhel7-11-8-local-11.8.0_520.61.05-1.x86_64.rpm && rpm -i cuda-repo-rhel7-11-8-local-11.8.0_520.61.05-1.x86_64.rpm && yum clean all && yum -y install cuda && yum -y install openblas-devel && yum-config-manager --add-repo https://developer.download.nvidia.com/compute/cuda/repos/rhel7/x86_64/cuda-rhel7.repo && yum clean all" + CIBW_BEFORE_ALL: "sed -i -e 's/^mirrorlist/#mirrorlist/' -e 's/^#baseurl/baseurl/' -e 's/mirror.centos.org/vault.centos.org/' /etc/yum.repos.d/*.repo && yum install -y yum-utils wget && wget -q https://developer.download.nvidia.com/compute/cuda/11.8.0/local_installers/cuda-repo-rhel7-11-8-local-11.8.0_520.61.05-1.x86_64.rpm && rpm -i cuda-repo-rhel7-11-8-local-11.8.0_520.61.05-1.x86_64.rpm && yum clean all && yum -y install cuda && yum -y install openblas-devel && yum-config-manager --add-repo https://developer.download.nvidia.com/compute/cuda/repos/rhel7/x86_64/cuda-rhel7.repo && yum clean all" CIBW_BEFORE_BUILD : "pip cache purge && pip install nvidia-cuda-runtime-cu11 nvidia-cublas-cu11 nvidia-cusolver-cu11 nvidia-cusparse-cu11 cuquantum-cu11" CIBW_SKIP: "*-manylinux_i686 pp* cp36* cp37* cp38* cp39* cp310* cp311* *musllinux*" CIBW_ENVIRONMENT: QISKIT_AER_PACKAGE_NAME=qiskit-aer-gpu-cu11 QISKIT_AER_CUDA_MAJOR=11 CMAKE_VERBOSE_MAKEFILE=true AER_THRUST_BACKEND=CUDA CUDACXX=/usr/local/cuda/bin/nvcc AER_CUDA_ARCH="7.0 7.2 7.5 8.0 8.6 8.7" AER_PYTHON_CUDA_ROOT=/opt/_internal AER_CIBUILD=true @@ -219,7 +219,7 @@ jobs: python -m pip install cibuildwheel==2.17.0 - name: Build wheels env: - CIBW_BEFORE_ALL: "yum install -y yum-utils wget && wget -q https://developer.download.nvidia.com/compute/cuda/12.4.0/local_installers/cuda-repo-rhel7-12-4-local-12.4.0_550.54.14-1.x86_64.rpm && rpm -i cuda-repo-rhel7-12-4-local-12.4.0_550.54.14-1.x86_64.rpm && yum clean all && yum -y install nvidia-driver-latest-dkms && yum -y install cuda-toolkit-12-4 && yum -y install openblas-devel && yum clean all" + CIBW_BEFORE_ALL: "sed -i -e 's/^mirrorlist/#mirrorlist/' -e 's/^#baseurl/baseurl/' -e 's/mirror.centos.org/vault.centos.org/' /etc/yum.repos.d/*.repo && yum install -y yum-utils wget && wget -q https://developer.download.nvidia.com/compute/cuda/12.5.1/local_installers/cuda-repo-rhel8-12-5-local-12.5.1_555.42.06-1.x86_64.rpm && rpm -i cuda-repo-rhel8-12-5-local-12.5.1_555.42.06-1.x86_64.rpm && yum clean all && yum -y install cuda-toolkit-12-5 && yum -y install openblas-devel && yum clean all" CIBW_BEFORE_BUILD : "pip cache purge && pip install nvidia-cuda-runtime-cu12 nvidia-nvjitlink-cu12 nvidia-cublas-cu12 nvidia-cusolver-cu12 nvidia-cusparse-cu12 cuquantum-cu12" CIBW_SKIP: "*-manylinux_i686 pp* cp36* cp37* cp38* cp39* cp310* cp311* *musllinux*" CIBW_ENVIRONMENT: QISKIT_AER_PACKAGE_NAME=qiskit-aer-gpu QISKIT_AER_CUDA_MAJOR=12 CMAKE_VERBOSE_MAKEFILE=true AER_THRUST_BACKEND=CUDA CUDACXX=/usr/local/cuda/bin/nvcc AER_CUDA_ARCH="7.0 7.2 7.5 8.0 8.6 8.7 8.9 9.0" AER_PYTHON_CUDA_ROOT=/opt/_internal AER_CIBUILD=true diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 0ee7be6403..d1b675a0f3 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -58,7 +58,7 @@ jobs: run: | python -m cibuildwheel --output-dir wheelhouse env: - CIBW_BEFORE_ALL_LINUX: "yum install -y https://dl.fedoraproject.org/pub/epel/7/aarch64/Packages/e/epel-release-7-12.noarch.rpm && yum install -y openblas-devel" + CIBW_BEFORE_ALL_LINUX: "sed -i -e 's/^mirrorlist/#mirrorlist/' -e 's/^#baseurl/baseurl/' -e 's/mirror.centos.org/vault.centos.org/' /etc/yum.repos.d/*.repo && yum install -y https://dl.fedoraproject.org/pub/epel/7/aarch64/Packages/e/epel-release-7-12.noarch.rpm && yum install -y openblas-devel" CIBW_ARCHS_LINUX: aarch64 CIBW_TEST_SKIP: "cp38* cp39* cp310* cp311*" - uses: actions/upload-artifact@v4 @@ -148,7 +148,7 @@ jobs: python -m pip install cibuildwheel==2.16.2 - name: Build wheels env: - CIBW_BEFORE_ALL: "pip cache purge && yum install -y yum-utils wget && wget -q https://developer.download.nvidia.com/compute/cuda/11.8.0/local_installers/cuda-repo-rhel7-11-8-local-11.8.0_520.61.05-1.x86_64.rpm && rpm -i cuda-repo-rhel7-11-8-local-11.8.0_520.61.05-1.x86_64.rpm && yum clean all && yum -y install cuda && yum -y install openblas-devel && yum-config-manager --add-repo https://developer.download.nvidia.com/compute/cuda/repos/rhel7/x86_64/cuda-rhel7.repo && yum clean all" + CIBW_BEFORE_ALL: "sed -i -e 's/^mirrorlist/#mirrorlist/' -e 's/^#baseurl/baseurl/' -e 's/mirror.centos.org/vault.centos.org/' /etc/yum.repos.d/*.repo && yum install -y yum-utils wget && wget -q https://developer.download.nvidia.com/compute/cuda/11.8.0/local_installers/cuda-repo-rhel7-11-8-local-11.8.0_520.61.05-1.x86_64.rpm && rpm -i cuda-repo-rhel7-11-8-local-11.8.0_520.61.05-1.x86_64.rpm && yum clean all && yum -y install cuda && yum -y install openblas-devel && yum-config-manager --add-repo https://developer.download.nvidia.com/compute/cuda/repos/rhel7/x86_64/cuda-rhel7.repo && yum clean all" CIBW_BEFORE_BUILD : "pip install nvidia-cuda-runtime-cu11 nvidia-cublas-cu11 nvidia-cusolver-cu11 nvidia-cusparse-cu11 cuquantum-cu11" CIBW_SKIP: "*-manylinux_i686 pp* cp36* cp37* *musllinux*" CIBW_TEST_SKIP: "*" @@ -192,7 +192,7 @@ jobs: python -m pip install cibuildwheel==2.16.2 - name: Build wheels env: - CIBW_BEFORE_ALL: "pip cache purge && yum install -y yum-utils wget && wget -q https://developer.download.nvidia.com/compute/cuda/12.4.0/local_installers/cuda-repo-rhel7-12-4-local-12.4.0_550.54.14-1.x86_64.rpm && rpm -i cuda-repo-rhel7-12-4-local-12.4.0_550.54.14-1.x86_64.rpm && yum clean all && yum -y install nvidia-driver-latest-dkms && yum -y install cuda-toolkit-12-4 && yum -y install openblas-devel && yum clean all" + CIBW_BEFORE_ALL: "sed -i -e 's/^mirrorlist/#mirrorlist/' -e 's/^#baseurl/baseurl/' -e 's/mirror.centos.org/vault.centos.org/' /etc/yum.repos.d/*.repo && yum install -y yum-utils wget && wget -q https://developer.download.nvidia.com/compute/cuda/12.5.1/local_installers/cuda-repo-rhel8-12-5-local-12.5.1_555.42.06-1.x86_64.rpm && rpm -i cuda-repo-rhel8-12-5-local-12.5.1_555.42.06-1.x86_64.rpm && yum clean all && yum -y install cuda-toolkit-12-5 && yum -y install openblas-devel && yum clean all" CIBW_BEFORE_BUILD : "pip install nvidia-cuda-runtime-cu12 nvidia-nvjitlink-cu12 nvidia-cublas-cu12 nvidia-cusolver-cu12 nvidia-cusparse-cu12 cuquantum-cu12" CIBW_SKIP: "*-manylinux_i686 pp* cp36* cp37* *musllinux*" CIBW_TEST_SKIP: "*" @@ -235,7 +235,7 @@ jobs: env: CIBW_ARCHS_LINUX: s390x CIBW_TEST_SKIP: "cp*" - CIBW_BEFORE_ALL: "yum install -y epel-release && yum install -y openblas-devel" + CIBW_BEFORE_ALL: "sed -i -e 's/^mirrorlist/#mirrorlist/' -e 's/^#baseurl/baseurl/' -e 's/mirror.centos.org/vault.centos.org/' /etc/yum.repos.d/*.repo && yum install -y epel-release && yum install -y openblas-devel" - uses: actions/upload-artifact@v4 with: path: ./wheelhouse/*.whl @@ -271,7 +271,7 @@ jobs: env: CIBW_ARCHS_LINUX: ppc64le CIBW_TEST_SKIP: "cp*" - CIBW_BEFORE_ALL: "yum install -y epel-release && yum install -y openblas-devel" + CIBW_BEFORE_ALL: "sed -i -e 's/^mirrorlist/#mirrorlist/' -e 's/^#baseurl/baseurl/' -e 's/mirror.centos.org/vault.centos.org/' /etc/yum.repos.d/*.repo && yum install -y epel-release && yum install -y openblas-devel" - uses: actions/upload-artifact@v4 with: path: ./wheelhouse/*.whl diff --git a/.github/workflows/neko.yml b/.github/workflows/neko.yml index 5e1f3dbd42..92d0b2169f 100644 --- a/.github/workflows/neko.yml +++ b/.github/workflows/neko.yml @@ -5,7 +5,8 @@ on: branches: ['main', 'stable/*'] concurrency: group: ${{ github.repository }}-${{ github.ref }}-${{ github.head_ref }}-${{ github.workflow }} - cancel-in-progress: true + # Only cancel in PR mode. In push mode, don't cancel so we don't see spurious test "failures". + cancel-in-progress: ${{ github.event_name == 'pull_request' }} jobs: neko: name: Qiskit Neko Integration Tests @@ -15,5 +16,7 @@ jobs: with: test_selection: backend repo_install_command: | + pip install scipy==1.13.1 pip install conan - pip install . + pip uninstall -y qiskit qiskit-terra qiskit-aer + pip install -c constraints.txt . diff --git a/pyproject.toml b/pyproject.toml index b3c0cf01e3..3c928d538a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -22,14 +22,14 @@ test-command = "python {project}/tools/verify_wheels.py" before-test = "pip install --only-binary=numpy,scipy numpy scipy" [tool.cibuildwheel.linux] -before-all = "yum install -y openblas-devel" +before-all = "sed -i -e 's/^mirrorlist/#mirrorlist/' -e 's/^#baseurl/baseurl/' -e 's/mirror.centos.org/vault.centos.org/' /etc/yum.repos.d/*.repo && yum install -y openblas-devel" [tool.cibuildwheel.windows] environment = { CMAKE_GENERATOR = "Visual Studio 16 2019"} [[tool.cibuildwheel.overrides]] select = "cp3{8,9,10,11,12}-manylinux_i686" -before-all = "yum install -y wget && bash {project}/tools/install_openblas_i686.sh && bash {project}/tools/install_rust.sh" +before-all = "sed -i -e 's/^mirrorlist/#mirrorlist/' -e 's/^#baseurl/baseurl/' -e 's/mirror.centos.org/vault.centos.org/' /etc/yum.repos.d/*.repo && yum install -y wget && bash {project}/tools/install_openblas_i686.sh && bash {project}/tools/install_rust.sh" [tool.black] line-length = 100 diff --git a/requirements-dev.txt b/requirements-dev.txt index 6de7eefe03..1dd45fcbab 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -3,7 +3,7 @@ cmake!=3.17.1,!=3.17.0 conan<2.0.0 scikit-build>=0.11.0 asv -cvxpy>=1.0.0,<1.1.15;platform_system != 'Windows' and python_version < '3.11' +cvxpy pylint black[jupyter]~=24.1 clang-format~=15.0.7 diff --git a/src/simulators/statevector/chunk/thrust_kernels.hpp b/src/simulators/statevector/chunk/thrust_kernels.hpp index 1d08973f7a..fb62331159 100644 --- a/src/simulators/statevector/chunk/thrust_kernels.hpp +++ b/src/simulators/statevector/chunk/thrust_kernels.hpp @@ -352,7 +352,7 @@ struct complex_less { typedef thrust::complex first_argument_type; typedef thrust::complex second_argument_type; typedef bool result_type; - __thrust_exec_check_disable__ __host__ __device__ bool + __host__ __device__ bool operator()(const thrust::complex &lhs, const thrust::complex &rhs) const { return lhs.real() < rhs.real();