diff --git a/.azure-pipelines/azure-pipelines-linux.yml b/.azure-pipelines/azure-pipelines-linux.yml deleted file mode 100755 index d13d56b1..00000000 --- a/.azure-pipelines/azure-pipelines-linux.yml +++ /dev/null @@ -1,76 +0,0 @@ -# This file was generated automatically from conda-smithy. To update this configuration, -# update the conda-forge.yml and/or the recipe/meta.yaml. -# -*- mode: yaml -*- - -jobs: -- job: linux - pool: - vmImage: ubuntu-latest - strategy: - matrix: - linux_64_c_compiler_version10cuda_compiler_version11.2cxx_compiler_version10numpy1.20python3.9.____cpython: - CONFIG: linux_64_c_compiler_version10cuda_compiler_version11.2cxx_compiler_version10numpy1.20python3.9.____cpython - UPLOAD_PACKAGES: 'True' - DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cuda:11.2 - SHORT_CONFIG: linux_64_c_compiler_version10cuda_c_h2a2c77454b - timeoutInMinutes: 360 - - steps: - - script: | - rm -rf /opt/ghc - df -h - displayName: Manage disk space - - # configure qemu binfmt-misc running. This allows us to run docker containers - # embedded qemu-static - - script: | - docker run --rm --privileged multiarch/qemu-user-static:register --reset --credential yes - ls /proc/sys/fs/binfmt_misc/ - condition: not(startsWith(variables['CONFIG'], 'linux_64')) - displayName: Configure binfmt_misc - - - script: | - export CI=azure - export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME - export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) - export UPLOAD_ON_BRANCH="main" - if [[ "${BUILD_REASON:-}" == "PullRequest" ]]; then - export IS_PR_BUILD="True" - else - export IS_PR_BUILD="False" - fi - .scripts/run_docker_build.sh - displayName: Run docker build - env: - BINSTAR_TOKEN: $(BINSTAR_TOKEN) - FEEDSTOCK_TOKEN: $(FEEDSTOCK_TOKEN) - STAGING_BINSTAR_TOKEN: $(STAGING_BINSTAR_TOKEN) - - script: | - export CI=azure - export CI_RUN_ID=$(build.BuildNumber).$(system.JobAttempt) - export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) - export CONDA_BLD_DIR=build_artifacts - export ARTIFACT_STAGING_DIR="$(Build.ArtifactStagingDirectory)" - # Archive everything in CONDA_BLD_DIR except environments - export BLD_ARTIFACT_PREFIX=conda_artifacts - if [[ "$AGENT_JOBSTATUS" == "Failed" ]]; then - # Archive the CONDA_BLD_DIR environments only when the job fails - export ENV_ARTIFACT_PREFIX=conda_envs - fi - ./.scripts/create_conda_build_artifacts.sh - displayName: Prepare conda build artifacts - condition: succeededOrFailed() - - - task: PublishPipelineArtifact@1 - displayName: Store conda build artifacts - condition: not(eq(variables.BLD_ARTIFACT_PATH, '')) - inputs: - targetPath: $(BLD_ARTIFACT_PATH) - artifactName: $(BLD_ARTIFACT_NAME) - - - task: PublishPipelineArtifact@1 - displayName: Store conda build environment artifacts - condition: not(eq(variables.ENV_ARTIFACT_PATH, '')) - inputs: - targetPath: $(ENV_ARTIFACT_PATH) - artifactName: $(ENV_ARTIFACT_NAME) \ No newline at end of file diff --git a/.ci_support/linux_64_c_compiler_version10cuda_compiler_version11.2cxx_compiler_version10numpy1.20python3.9.____cpython.yaml b/.ci_support/linux_64_c_compiler_version11cuda_compilernvcccuda_compiler_version11.8cxx_compiler_version11python3.9.____cpython.yaml similarity index 72% rename from .ci_support/linux_64_c_compiler_version10cuda_compiler_version11.2cxx_compiler_version10numpy1.20python3.9.____cpython.yaml rename to .ci_support/linux_64_c_compiler_version11cuda_compilernvcccuda_compiler_version11.8cxx_compiler_version11python3.9.____cpython.yaml index d0649369..eac981d5 100644 --- a/.ci_support/linux_64_c_compiler_version10cuda_compiler_version11.2cxx_compiler_version10numpy1.20python3.9.____cpython.yaml +++ b/.ci_support/linux_64_c_compiler_version11cuda_compilernvcccuda_compiler_version11.8cxx_compiler_version11python3.9.____cpython.yaml @@ -1,7 +1,7 @@ c_compiler: - gcc c_compiler_version: -- '10' +- '11' cdt_name: - cos7 channel_sources: @@ -11,17 +11,21 @@ channel_targets: cuda_compiler: - nvcc cuda_compiler_version: -- '11.2' +- '11.8' +cudnn: +- '8' +cutensor: +- '1' cxx_compiler: - gxx cxx_compiler_version: -- '10' +- '11' docker_image: -- quay.io/condaforge/linux-anvil-cuda:11.2 -fftw: -- '3' -numpy: -- '1.20' +- quay.io/condaforge/linux-anvil-cuda:11.8 +github_actions_labels: +- cirun-openstack-gpu-large +nccl: +- '2' pin_run_as_build: python: min_pin: x.x @@ -33,8 +37,7 @@ target_platform: zip_keys: - - c_compiler_version - cxx_compiler_version + - cuda_compiler - cuda_compiler_version - cdt_name - docker_image -- - python - - numpy diff --git a/.ci_support/linux_64_c_compiler_version12cuda_compilercuda-nvcccuda_compiler_version12.0cxx_compiler_version12python3.9.____cpython.yaml b/.ci_support/linux_64_c_compiler_version12cuda_compilercuda-nvcccuda_compiler_version12.0cxx_compiler_version12python3.9.____cpython.yaml new file mode 100644 index 00000000..182fb545 --- /dev/null +++ b/.ci_support/linux_64_c_compiler_version12cuda_compilercuda-nvcccuda_compiler_version12.0cxx_compiler_version12python3.9.____cpython.yaml @@ -0,0 +1,43 @@ +c_compiler: +- gcc +c_compiler_version: +- '12' +cdt_name: +- cos7 +channel_sources: +- conda-forge +channel_targets: +- conda-forge main +cuda_compiler: +- cuda-nvcc +cuda_compiler_version: +- '12.0' +cudnn: +- '8' +cutensor: +- '1' +cxx_compiler: +- gxx +cxx_compiler_version: +- '12' +docker_image: +- quay.io/condaforge/linux-anvil-cos7-x86_64 +github_actions_labels: +- cirun-openstack-gpu-large +nccl: +- '2' +pin_run_as_build: + python: + min_pin: x.x + max_pin: x.x +python: +- 3.9.* *_cpython +target_platform: +- linux-64 +zip_keys: +- - c_compiler_version + - cxx_compiler_version + - cuda_compiler + - cuda_compiler_version + - cdt_name + - docker_image diff --git a/.ci_support/linux_aarch64_c_compiler_version11cuda_compilernvcccuda_compiler_version11.8cxx_compiler_version11python3.9.____cpython.yaml b/.ci_support/linux_aarch64_c_compiler_version11cuda_compilernvcccuda_compiler_version11.8cxx_compiler_version11python3.9.____cpython.yaml new file mode 100644 index 00000000..5873fbf7 --- /dev/null +++ b/.ci_support/linux_aarch64_c_compiler_version11cuda_compilernvcccuda_compiler_version11.8cxx_compiler_version11python3.9.____cpython.yaml @@ -0,0 +1,47 @@ +BUILD: +- aarch64-conda_cos7-linux-gnu +c_compiler: +- gcc +c_compiler_version: +- '11' +cdt_arch: +- aarch64 +cdt_name: +- cos7 +channel_sources: +- conda-forge +channel_targets: +- conda-forge main +cuda_compiler: +- nvcc +cuda_compiler_version: +- '11.8' +cudnn: +- '8' +cutensor: +- '1' +cxx_compiler: +- gxx +cxx_compiler_version: +- '11' +docker_image: +- quay.io/condaforge/linux-anvil-cuda:11.8 +github_actions_labels: +- cirun-openstack-cpu-large +nccl: +- '2' +pin_run_as_build: + python: + min_pin: x.x + max_pin: x.x +python: +- 3.9.* *_cpython +target_platform: +- linux-aarch64 +zip_keys: +- - c_compiler_version + - cxx_compiler_version + - cuda_compiler + - cuda_compiler_version + - cdt_name + - docker_image diff --git a/.ci_support/linux_aarch64_c_compiler_version12cuda_compilercuda-nvcccuda_compiler_version12.0cxx_compiler_version12python3.9.____cpython.yaml b/.ci_support/linux_aarch64_c_compiler_version12cuda_compilercuda-nvcccuda_compiler_version12.0cxx_compiler_version12python3.9.____cpython.yaml new file mode 100644 index 00000000..78a0eb6d --- /dev/null +++ b/.ci_support/linux_aarch64_c_compiler_version12cuda_compilercuda-nvcccuda_compiler_version12.0cxx_compiler_version12python3.9.____cpython.yaml @@ -0,0 +1,47 @@ +BUILD: +- aarch64-conda_cos7-linux-gnu +c_compiler: +- gcc +c_compiler_version: +- '12' +cdt_arch: +- aarch64 +cdt_name: +- cos7 +channel_sources: +- conda-forge +channel_targets: +- conda-forge main +cuda_compiler: +- cuda-nvcc +cuda_compiler_version: +- '12.0' +cudnn: +- '8' +cutensor: +- '1' +cxx_compiler: +- gxx +cxx_compiler_version: +- '12' +docker_image: +- quay.io/condaforge/linux-anvil-cos7-x86_64 +github_actions_labels: +- cirun-openstack-cpu-large +nccl: +- '2' +pin_run_as_build: + python: + min_pin: x.x + max_pin: x.x +python: +- 3.9.* *_cpython +target_platform: +- linux-aarch64 +zip_keys: +- - c_compiler_version + - cxx_compiler_version + - cuda_compiler + - cuda_compiler_version + - cdt_name + - docker_image diff --git a/.ci_support/linux_ppc64le_c_compiler_version11cuda_compilernvcccuda_compiler_version11.8cxx_compiler_version11python3.9.____cpython.yaml b/.ci_support/linux_ppc64le_c_compiler_version11cuda_compilernvcccuda_compiler_version11.8cxx_compiler_version11python3.9.____cpython.yaml new file mode 100644 index 00000000..4bd1f65e --- /dev/null +++ b/.ci_support/linux_ppc64le_c_compiler_version11cuda_compilernvcccuda_compiler_version11.8cxx_compiler_version11python3.9.____cpython.yaml @@ -0,0 +1,43 @@ +c_compiler: +- gcc +c_compiler_version: +- '11' +cdt_name: +- cos7 +channel_sources: +- conda-forge +channel_targets: +- conda-forge main +cuda_compiler: +- nvcc +cuda_compiler_version: +- '11.8' +cudnn: +- '8' +cutensor: +- '1' +cxx_compiler: +- gxx +cxx_compiler_version: +- '11' +docker_image: +- quay.io/condaforge/linux-anvil-cuda:11.8 +github_actions_labels: +- cirun-openstack-cpu-large +nccl: +- '2' +pin_run_as_build: + python: + min_pin: x.x + max_pin: x.x +python: +- 3.9.* *_cpython +target_platform: +- linux-ppc64le +zip_keys: +- - c_compiler_version + - cxx_compiler_version + - cuda_compiler + - cuda_compiler_version + - cdt_name + - docker_image diff --git a/.ci_support/linux_ppc64le_c_compiler_version12cuda_compilercuda-nvcccuda_compiler_version12.0cxx_compiler_version12python3.9.____cpython.yaml b/.ci_support/linux_ppc64le_c_compiler_version12cuda_compilercuda-nvcccuda_compiler_version12.0cxx_compiler_version12python3.9.____cpython.yaml new file mode 100644 index 00000000..b2385447 --- /dev/null +++ b/.ci_support/linux_ppc64le_c_compiler_version12cuda_compilercuda-nvcccuda_compiler_version12.0cxx_compiler_version12python3.9.____cpython.yaml @@ -0,0 +1,43 @@ +c_compiler: +- gcc +c_compiler_version: +- '12' +cdt_name: +- cos7 +channel_sources: +- conda-forge +channel_targets: +- conda-forge main +cuda_compiler: +- cuda-nvcc +cuda_compiler_version: +- '12.0' +cudnn: +- '8' +cutensor: +- '1' +cxx_compiler: +- gxx +cxx_compiler_version: +- '12' +docker_image: +- quay.io/condaforge/linux-anvil-cos7-x86_64 +github_actions_labels: +- cirun-openstack-cpu-large +nccl: +- '2' +pin_run_as_build: + python: + min_pin: x.x + max_pin: x.x +python: +- 3.9.* *_cpython +target_platform: +- linux-ppc64le +zip_keys: +- - c_compiler_version + - cxx_compiler_version + - cuda_compiler + - cuda_compiler_version + - cdt_name + - docker_image diff --git a/.ci_support/migrations/cuda118.yaml b/.ci_support/migrations/cuda118.yaml new file mode 100644 index 00000000..fdd298b9 --- /dev/null +++ b/.ci_support/migrations/cuda118.yaml @@ -0,0 +1,99 @@ +migrator_ts: 1692828152 +__migrator: + kind: + version + migration_number: + 1 + build_number: + 1 + paused: false + override_cbc_keys: + - cuda_compiler_stub + operation: key_add + check_solvable: false + primary_key: cuda_compiler_version + ordering: + cxx_compiler_version: + - 9 + - 8 + - 7 + c_compiler_version: + - 9 + - 8 + - 7 + fortran_compiler_version: + - 9 + - 8 + - 7 + docker_image: + # Native builds + - quay.io/condaforge/linux-anvil-comp7 # [os.environ.get("BUILD_PLATFORM") == "linux-64"] + - quay.io/condaforge/linux-anvil-aarch64 # [os.environ.get("BUILD_PLATFORM") == "linux-aarch64"] + - quay.io/condaforge/linux-anvil-ppc64le # [os.environ.get("BUILD_PLATFORM") == "linux-ppc64le"] + - quay.io/condaforge/linux-anvil-armv7l # [os.environ.get("BUILD_PLATFORM") == "linux-armv7l"] + + # Legacy CUDAs + - quay.io/condaforge/linux-anvil-cuda:9.2 # [linux64 and os.environ.get("BUILD_PLATFORM") == "linux-64"] + - quay.io/condaforge/linux-anvil-cuda:10.0 # [linux64 and os.environ.get("BUILD_PLATFORM") == "linux-64"] + - quay.io/condaforge/linux-anvil-cuda:10.1 # [linux64 and os.environ.get("BUILD_PLATFORM") == "linux-64"] + - quay.io/condaforge/linux-anvil-cuda:10.2 # [linux64 and os.environ.get("BUILD_PLATFORM") == "linux-64"] + - quay.io/condaforge/linux-anvil-cuda:11.0 # [linux64 and os.environ.get("BUILD_PLATFORM") == "linux-64"] + - quay.io/condaforge/linux-anvil-cuda:11.1 # [linux64 and os.environ.get("BUILD_PLATFORM") == "linux-64"] + + # CUDA 11.2 + - quay.io/condaforge/linux-anvil-cuda:11.2 # [linux64 and os.environ.get("BUILD_PLATFORM") == "linux-64"] + # CUDA 11.2 arch: native compilation (build == target) + - quay.io/condaforge/linux-anvil-ppc64le-cuda:11.2 # [ppc64le and os.environ.get("BUILD_PLATFORM") == "linux-ppc64le"] + - quay.io/condaforge/linux-anvil-aarch64-cuda:11.2 # [aarch64 and os.environ.get("BUILD_PLATFORM") == "linux-aarch64"] + # CUDA 11.2 arch: cross-compilation (build != target) + - quay.io/condaforge/linux-anvil-cuda:11.2 # [ppc64le and os.environ.get("BUILD_PLATFORM") == "linux-64"] + - quay.io/condaforge/linux-anvil-cuda:11.2 # [aarch64 and os.environ.get("BUILD_PLATFORM") == "linux-64"] + + # CUDA 11.8 + - quay.io/condaforge/linux-anvil-cuda:11.8 # [linux64 and os.environ.get("BUILD_PLATFORM") == "linux-64"] + # CUDA 11.8 arch: native compilation (build == target) + - quay.io/condaforge/linux-anvil-ppc64le-cuda:11.8 # [ppc64le and os.environ.get("BUILD_PLATFORM") == "linux-ppc64le"] + - quay.io/condaforge/linux-anvil-aarch64-cuda:11.8 # [aarch64 and os.environ.get("BUILD_PLATFORM") == "linux-aarch64"] + # CUDA 11.8 arch: cross-compilation (build != target) + - quay.io/condaforge/linux-anvil-cuda:11.8 # [ppc64le and os.environ.get("BUILD_PLATFORM") == "linux-64"] + - quay.io/condaforge/linux-anvil-cuda:11.8 # [aarch64 and os.environ.get("BUILD_PLATFORM") == "linux-64"] + + # Native CentOS 7 image + - quay.io/condaforge/linux-anvil-cos7-x86_64 # [linux64 and os.environ.get("BUILD_PLATFORM") == "linux-64"] + cuda_compiler_version: + - None + - 10.2 # [(linux64 or win) and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] + - 11.0 # [(linux64 or win) and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] + - 11.1 # [(linux64 or win) and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] + - 11.2 # [(linux or win) and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] + - 11.8 # [(linux or win) and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] + - 12.0 # [(linux or win) and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] + commit_message: | + Rebuild for CUDA 11.8 w/arch support + +cuda_compiler: # [(linux or win64) and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] + - nvcc # [(linux or win64) and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] + +cuda_compiler_version: # [(linux or win64) and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] + - 11.8 # [(linux or win64) and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] + +c_compiler_version: # [linux and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] + - 11 # [linux and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] + +cxx_compiler_version: # [linux and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] + - 11 # [linux and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] + +fortran_compiler_version: # [linux and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] + - 11 # [linux and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] + +cdt_name: # [linux and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] + - cos7 # [linux and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] + +docker_image: # [os.environ.get("BUILD_PLATFORM", "").startswith("linux-") and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] + - quay.io/condaforge/linux-anvil-cuda:11.8 # [linux64 and os.environ.get("BUILD_PLATFORM") == "linux-64"] + # case: native compilation (build == target) + - quay.io/condaforge/linux-anvil-ppc64le-cuda:11.8 # [ppc64le and os.environ.get("BUILD_PLATFORM") == "linux-ppc64le"] + - quay.io/condaforge/linux-anvil-aarch64-cuda:11.8 # [aarch64 and os.environ.get("BUILD_PLATFORM") == "linux-aarch64"] + # case: cross-compilation (build != target) + - quay.io/condaforge/linux-anvil-cuda:11.8 # [ppc64le and os.environ.get("BUILD_PLATFORM") == "linux-64"] + - quay.io/condaforge/linux-anvil-cuda:11.8 # [aarch64 and os.environ.get("BUILD_PLATFORM") == "linux-64"] diff --git a/.ci_support/migrations/cuda120.yaml b/.ci_support/migrations/cuda120.yaml new file mode 100644 index 00000000..49da33d7 --- /dev/null +++ b/.ci_support/migrations/cuda120.yaml @@ -0,0 +1,90 @@ +migrator_ts: 1682985063 +__migrator: + kind: + version + migration_number: + 2 + build_number: + 1 + paused: false + override_cbc_keys: + - cuda_compiler_stub + operation: key_add + check_solvable: false + primary_key: cuda_compiler_version + ordering: + cxx_compiler_version: + - 9 + - 8 + - 7 + c_compiler_version: + - 9 + - 8 + - 7 + fortran_compiler_version: + - 9 + - 8 + - 7 + docker_image: + - quay.io/condaforge/linux-anvil-comp7 # [os.environ.get("BUILD_PLATFORM") == "linux-64"] + - quay.io/condaforge/linux-anvil-aarch64 # [os.environ.get("BUILD_PLATFORM") == "linux-aarch64"] + - quay.io/condaforge/linux-anvil-ppc64le # [os.environ.get("BUILD_PLATFORM") == "linux-ppc64le"] + - quay.io/condaforge/linux-anvil-armv7l # [os.environ.get("BUILD_PLATFORM") == "linux-armv7l"] + - quay.io/condaforge/linux-anvil-cuda:9.2 # [linux64 and os.environ.get("BUILD_PLATFORM") == "linux-64"] + - quay.io/condaforge/linux-anvil-cuda:10.0 # [linux64 and os.environ.get("BUILD_PLATFORM") == "linux-64"] + - quay.io/condaforge/linux-anvil-cuda:10.1 # [linux64 and os.environ.get("BUILD_PLATFORM") == "linux-64"] + - quay.io/condaforge/linux-anvil-cuda:10.2 # [linux64 and os.environ.get("BUILD_PLATFORM") == "linux-64"] + - quay.io/condaforge/linux-anvil-cuda:11.0 # [linux64 and os.environ.get("BUILD_PLATFORM") == "linux-64"] + - quay.io/condaforge/linux-anvil-cuda:11.1 # [linux64 and os.environ.get("BUILD_PLATFORM") == "linux-64"] + - quay.io/condaforge/linux-anvil-cuda:11.2 # [linux64 and os.environ.get("BUILD_PLATFORM") == "linux-64"] + # case: native compilation (build == target) + - quay.io/condaforge/linux-anvil-ppc64le-cuda:11.2 # [ppc64le and os.environ.get("BUILD_PLATFORM") == "linux-ppc64le"] + - quay.io/condaforge/linux-anvil-aarch64-cuda:11.2 # [aarch64 and os.environ.get("BUILD_PLATFORM") == "linux-aarch64"] + # case: cross-compilation (build != target) + - quay.io/condaforge/linux-anvil-cuda:11.2 # [ppc64le and os.environ.get("BUILD_PLATFORM") == "linux-64"] + - quay.io/condaforge/linux-anvil-cuda:11.2 # [aarch64 and os.environ.get("BUILD_PLATFORM") == "linux-64"] + # case: non-CUDA builds + - quay.io/condaforge/linux-anvil-cos7-x86_64 # [linux64 and os.environ.get("BUILD_PLATFORM") == "linux-64"] + cuda_compiler_version: + - None + - 10.2 # [(linux64 or win) and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] + - 11.0 # [(linux64 or win) and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] + - 11.1 # [(linux64 or win) and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] + - 11.2 # [(linux or win) and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] + - 12.0 # [(linux or win) and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] + commit_message: | + Rebuild for CUDA 12 w/arch support + + The transition to CUDA 12 SDK includes new packages for all CUDA libraries and + build tools. Notably, the cudatoolkit package no longer exists, and packages + should depend directly on the specific CUDA libraries (libcublas, libcusolver, + etc) as needed. For an in-depth overview of the changes and to report problems + [see this issue]( https://github.com/conda-forge/conda-forge.github.io/issues/1963 ). + Please feel free to raise any issues encountered there. Thank you! :pray: + +cuda_compiler: # [linux and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] + - cuda-nvcc # [linux and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] + +cuda_compiler_version: # [linux and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] + - 12.0 # [linux and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] + +c_compiler_version: # [linux and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] + - 12 # [linux and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] + +cxx_compiler_version: # [linux and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] + - 12 # [linux and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] + +fortran_compiler_version: # [linux and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] + - 12 # [linux and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] + +cdt_name: # [linux and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] + - cos7 # [linux and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] + +docker_image: # [os.environ.get("BUILD_PLATFORM", "").startswith("linux-") and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] + - quay.io/condaforge/linux-anvil-cos7-x86_64 # [linux64 and os.environ.get("BUILD_PLATFORM") == "linux-64" and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] + # case: native compilation (build == target) + - quay.io/condaforge/linux-anvil-ppc64le # [ppc64le and os.environ.get("BUILD_PLATFORM") == "linux-ppc64le"] + - quay.io/condaforge/linux-anvil-aarch64 # [aarch64 and os.environ.get("BUILD_PLATFORM") == "linux-aarch64"] + # case: cross-compilation (build != target) + - quay.io/condaforge/linux-anvil-cos7-x86_64 # [ppc64le and os.environ.get("BUILD_PLATFORM") == "linux-64"] + - quay.io/condaforge/linux-anvil-cos7-x86_64 # [aarch64 and os.environ.get("BUILD_PLATFORM") == "linux-64"] diff --git a/.ci_support/migrations/python311.yaml b/.ci_support/migrations/python311.yaml deleted file mode 100644 index 2715ab28..00000000 --- a/.ci_support/migrations/python311.yaml +++ /dev/null @@ -1,37 +0,0 @@ -migrator_ts: 1666686085 -__migrator: - migration_number: 1 - operation: key_add - primary_key: python - ordering: - python: - - 3.6.* *_cpython - - 3.7.* *_cpython - - 3.8.* *_cpython - - 3.9.* *_cpython - - 3.10.* *_cpython - - 3.11.* *_cpython # new entry - - 3.6.* *_73_pypy - - 3.7.* *_73_pypy - - 3.8.* *_73_pypy - - 3.9.* *_73_pypy - paused: false - longterm: True - pr_limit: 30 - max_solver_attempts: 10 # this will make the bot retry "not solvable" stuff 10 times - exclude: - # this shouldn't attempt to modify the python feedstocks - - python - - pypy3.6 - - pypy-meta - - cross-python - - python_abi - exclude_pinned_pkgs: false - -python: - - 3.11.* *_cpython -# additional entries to add for zip_keys -numpy: - - 1.23 -python_impl: - - cpython diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 99ba51ba..146f0876 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1 +1 @@ -* @jaimergp @jchodera @mikemhenry @peastman \ No newline at end of file +* @asi1024 @emcastillo @jakirkham @kmaehashi @leofang @toslunar \ No newline at end of file diff --git a/.github/workflows/automerge.yml b/.github/workflows/automerge.yml index da1368a1..0535f6aa 100644 --- a/.github/workflows/automerge.yml +++ b/.github/workflows/automerge.yml @@ -9,8 +9,6 @@ jobs: runs-on: ubuntu-latest name: automerge steps: - - name: checkout - uses: actions/checkout@v3 - name: automerge-action id: automerge-action uses: conda-forge/automerge-action@main diff --git a/.github/workflows/conda-build.yml b/.github/workflows/conda-build.yml new file mode 100644 index 00000000..bf82517e --- /dev/null +++ b/.github/workflows/conda-build.yml @@ -0,0 +1,181 @@ +# This file was generated automatically from conda-smithy. To update this configuration, +# update the conda-forge.yml and/or the recipe/meta.yaml. +# -*- mode: yaml -*- + +name: Build conda package +on: ['pull_request'] +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} + cancel-in-progress: true + +jobs: + build: + name: ${{ matrix.CONFIG }} + runs-on: ${{ matrix.runs_on }} + timeout-minutes: 720 + strategy: + fail-fast: false + matrix: + include: + - CONFIG: linux_64_c_compiler_version11cuda_compilernvcccuda_compiler_version11.8cxx_compiler_version11python3.9.____cpython + SHORT_CONFIG: linux_64_c_compiler_version11cuda_c_hfa7a9894d1 + UPLOAD_PACKAGES: True + os: ubuntu + runs_on: ['cirun-openstack-gpu-large--${{ github.run_id }}-linux_64_c_compiler_version11cuda_c_hfa7a9894d1', 'linux', 'x64', 'self-hosted'] + DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cuda:11.8 + CONDA_FORGE_DOCKER_RUN_ARGS: "--gpus all" + - CONFIG: linux_64_c_compiler_version12cuda_compilercuda-nvcccuda_compiler_version12.0cxx_compiler_version12python3.9.____cpython + SHORT_CONFIG: linux_64_c_compiler_version12cuda_c_h625cfcfe2e + UPLOAD_PACKAGES: True + os: ubuntu + runs_on: ['cirun-openstack-gpu-large--${{ github.run_id }}-linux_64_c_compiler_version12cuda_c_h625cfcfe2e', 'linux', 'x64', 'self-hosted'] + DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64 + CONDA_FORGE_DOCKER_RUN_ARGS: "--gpus all" + - CONFIG: linux_aarch64_c_compiler_version11cuda_compilernvcccuda_compiler_version11.8cxx_compiler_version11python3.9.____cpython + SHORT_CONFIG: linux_aarch64_c_compiler_version11c_hcf4a71f7ac + UPLOAD_PACKAGES: True + os: ubuntu + runs_on: ['cirun-openstack-cpu-large--${{ github.run_id }}-linux_aarch64_c_compiler_version11c_hcf4a71f7ac', 'linux', 'x64', 'self-hosted'] + DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cuda:11.8 + - CONFIG: linux_aarch64_c_compiler_version12cuda_compilercuda-nvcccuda_compiler_version12.0cxx_compiler_version12python3.9.____cpython + SHORT_CONFIG: linux_aarch64_c_compiler_version12c_hd91e7292ec + UPLOAD_PACKAGES: True + os: ubuntu + runs_on: ['cirun-openstack-cpu-large--${{ github.run_id }}-linux_aarch64_c_compiler_version12c_hd91e7292ec', 'linux', 'x64', 'self-hosted'] + DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64 + - CONFIG: linux_ppc64le_c_compiler_version11cuda_compilernvcccuda_compiler_version11.8cxx_compiler_version11python3.9.____cpython + SHORT_CONFIG: linux_ppc64le_c_compiler_version11c_h98abef49c6 + UPLOAD_PACKAGES: True + os: ubuntu + runs_on: ['cirun-openstack-cpu-large--${{ github.run_id }}-linux_ppc64le_c_compiler_version11c_h98abef49c6', 'linux', 'x64', 'self-hosted'] + DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cuda:11.8 + - CONFIG: linux_ppc64le_c_compiler_version12cuda_compilercuda-nvcccuda_compiler_version12.0cxx_compiler_version12python3.9.____cpython + SHORT_CONFIG: linux_ppc64le_c_compiler_version12c_h9d041e80d9 + UPLOAD_PACKAGES: True + os: ubuntu + runs_on: ['cirun-openstack-cpu-large--${{ github.run_id }}-linux_ppc64le_c_compiler_version12c_h9d041e80d9', 'linux', 'x64', 'self-hosted'] + DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64 + steps: + + - name: Checkout code + uses: actions/checkout@v3 + + - name: Build on Linux + if: matrix.os == 'ubuntu' + env: + CONFIG: ${{ matrix.CONFIG }} + UPLOAD_PACKAGES: ${{ matrix.UPLOAD_PACKAGES }} + DOCKER_IMAGE: ${{ matrix.DOCKER_IMAGE }} + CI: github_actions + UPLOAD_ON_BRANCH: main + CONDA_FORGE_DOCKER_RUN_ARGS: "${{ matrix.CONDA_FORGE_DOCKER_RUN_ARGS }}" + BINSTAR_TOKEN: ${{ secrets.BINSTAR_TOKEN }} + FEEDSTOCK_TOKEN: ${{ secrets.FEEDSTOCK_TOKEN }} + STAGING_BINSTAR_TOKEN: ${{ secrets.STAGING_BINSTAR_TOKEN }} + shell: bash + run: | + echo "::group::Configure binfmt_misc" + docker run --rm --privileged multiarch/qemu-user-static:register --reset --credential yes + export FEEDSTOCK_NAME="$(basename $GITHUB_REPOSITORY)" + export GIT_BRANCH="$(basename $GITHUB_REF)" + if [[ "${GITHUB_EVENT_NAME}" == "pull_request" ]]; then + export IS_PR_BUILD="True" + else + export IS_PR_BUILD="False" + fi + echo "::endgroup::" + ./.scripts/run_docker_build.sh + + - name: Build on macOS + if: matrix.os == 'macos' + env: + CONFIG: ${{ matrix.CONFIG }} + UPLOAD_PACKAGES: ${{ matrix.UPLOAD_PACKAGES }} + CI: github_actions + UPLOAD_ON_BRANCH: main + BINSTAR_TOKEN: ${{ secrets.BINSTAR_TOKEN }} + FEEDSTOCK_TOKEN: ${{ secrets.FEEDSTOCK_TOKEN }} + STAGING_BINSTAR_TOKEN: ${{ secrets.STAGING_BINSTAR_TOKEN }} + shell: bash + run: | + export FEEDSTOCK_NAME="$(basename $GITHUB_REPOSITORY)" + export GIT_BRANCH="$(basename $GITHUB_REF)" + if [[ "${GITHUB_EVENT_NAME}" == "pull_request" ]]; then + export IS_PR_BUILD="True" + else + export IS_PR_BUILD="False" + fi + ./.scripts/run_osx_build.sh + + - name: Install Miniconda for windows + uses: conda-incubator/setup-miniconda@v2 + with: + miniforge-version: latest + miniforge-variant: Mambaforge + if: matrix.os == 'windows' + + - name: Build on windows + shell: cmd + run: | + call ".scripts\run_win_build.bat" + env: + PYTHONUNBUFFERED: 1 + CONFIG: ${{ matrix.CONFIG }} + CI: github_actions + UPLOAD_PACKAGES: ${{ matrix.UPLOAD_PACKAGES }} + UPLOAD_ON_BRANCH: main + BINSTAR_TOKEN: ${{ secrets.BINSTAR_TOKEN }} + FEEDSTOCK_TOKEN: ${{ secrets.FEEDSTOCK_TOKEN }} + STAGING_BINSTAR_TOKEN: ${{ secrets.STAGING_BINSTAR_TOKEN }} + if: matrix.os == 'windows' + - name: Prepare conda build artifacts + id: prepare-artifacts + shell: bash + if: ${{ always() }} + env: + CONFIG: ${{ matrix.CONFIG }} + SHORT_CONFIG: ${{ matrix.SHORT_CONFIG }} + OS: ${{ matrix.os }} + run: | + export CI=github_actions + export CI_RUN_ID=$GITHUB_RUN_ID + export FEEDSTOCK_NAME="$(basename $GITHUB_REPOSITORY)" + export ARTIFACT_STAGING_DIR="$GITHUB_WORKSPACE" + if [ $OS == "macos" ]; then + export CONDA_BLD_DIR="${MINIFORGE_HOME:-${HOME}/miniforge3}/conda-bld" + elif [ $OS == "windows" ]; then + export CONDA_BLD_DIR="${CONDA//\\//}/conda-bld" + else + export CONDA_BLD_DIR="build_artifacts" + fi + # Archive everything in CONDA_BLD_DIR except environments + # Archive the CONDA_BLD_DIR environments only when the job fails + # Use different prefix for successful and failed build artifacts + # so random failures don't prevent rebuilds from creating artifacts. + JOB_STATUS="${{ job.status }}" + if [ $JOB_STATUS == "failure" ]; then + export BLD_ARTIFACT_PREFIX="conda_artifacts" + export ENV_ARTIFACT_PREFIX="conda_envs" + else + export BLD_ARTIFACT_PREFIX="conda_pkgs" + fi + ./.scripts/create_conda_build_artifacts.sh + continue-on-error: true + + - name: Store conda build artifacts + uses: actions/upload-artifact@v3 + if: ${{ always() && steps.prepare-artifacts.outcome == 'success' }} + with: + name: ${{ steps.prepare-artifacts.outputs.BLD_ARTIFACT_NAME }} + path: ${{ steps.prepare-artifacts.outputs.BLD_ARTIFACT_PATH }} + retention-days: 14 + continue-on-error: true + + - name: Store conda build environment artifacts + uses: actions/upload-artifact@v3 + if: ${{ failure() && steps.prepare-artifacts.outcome == 'success' }} + with: + name: ${{ steps.prepare-artifacts.outputs.ENV_ARTIFACT_NAME }} + path: ${{ steps.prepare-artifacts.outputs.ENV_ARTIFACT_PATH }} + retention-days: 14 + continue-on-error: true \ No newline at end of file diff --git a/.scripts/build_steps.sh b/.scripts/build_steps.sh index 71a4242a..85e75053 100755 --- a/.scripts/build_steps.sh +++ b/.scripts/build_steps.sh @@ -31,11 +31,10 @@ pkgs_dirs: CONDARC - -mamba install --update-specs --yes --quiet --channel conda-forge \ - conda-build pip boa conda-forge-ci-setup=3 "py-lief<0.12" -mamba update --update-specs --yes --quiet --channel conda-forge \ - conda-build pip boa conda-forge-ci-setup=3 "py-lief<0.12" +mamba install --update-specs --yes --quiet --channel conda-forge --strict-channel-priority \ + pip mamba conda-build boa conda-forge-ci-setup=3 +mamba update --update-specs --yes --quiet --channel conda-forge --strict-channel-priority \ + pip mamba conda-build boa conda-forge-ci-setup=3 # set up the condarc setup_conda_rc "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}" @@ -45,7 +44,9 @@ source run_conda_forge_build_setup # make the build number clobber make_build_number "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}" - +if [[ "${HOST_PLATFORM}" != "${BUILD_PLATFORM}" ]] && [[ "${BUILD_WITH_CONDA_DEBUG:-0}" != 1 ]]; then + EXTRA_CB_OPTIONS="${EXTRA_CB_OPTIONS:-} --no-test" +fi ( endgroup "Configuring conda" ) 2> /dev/null diff --git a/.scripts/create_conda_build_artifacts.sh b/.scripts/create_conda_build_artifacts.sh index cba0faee..17ec0868 100755 --- a/.scripts/create_conda_build_artifacts.sh +++ b/.scripts/create_conda_build_artifacts.sh @@ -79,8 +79,8 @@ if [[ ! -z "$BLD_ARTIFACT_PREFIX" ]]; then echo "##vso[task.setVariable variable=BLD_ARTIFACT_NAME]$BLD_ARTIFACT_NAME" echo "##vso[task.setVariable variable=BLD_ARTIFACT_PATH]$BLD_ARTIFACT_PATH" elif [[ "$CI" == "github_actions" ]]; then - echo "::set-output name=BLD_ARTIFACT_NAME::$BLD_ARTIFACT_NAME" - echo "::set-output name=BLD_ARTIFACT_PATH::$BLD_ARTIFACT_PATH" + echo "BLD_ARTIFACT_NAME=$BLD_ARTIFACT_NAME" >> $GITHUB_OUTPUT + echo "BLD_ARTIFACT_PATH=$BLD_ARTIFACT_PATH" >> $GITHUB_OUTPUT fi fi @@ -107,7 +107,7 @@ if [[ ! -z "$ENV_ARTIFACT_PREFIX" ]]; then echo "##vso[task.setVariable variable=ENV_ARTIFACT_NAME]$ENV_ARTIFACT_NAME" echo "##vso[task.setVariable variable=ENV_ARTIFACT_PATH]$ENV_ARTIFACT_PATH" elif [[ "$CI" == "github_actions" ]]; then - echo "::set-output name=ENV_ARTIFACT_NAME::$ENV_ARTIFACT_NAME" - echo "::set-output name=ENV_ARTIFACT_PATH::$ENV_ARTIFACT_PATH" + echo "ENV_ARTIFACT_NAME=$ENV_ARTIFACT_NAME" >> $GITHUB_OUTPUT + echo "ENV_ARTIFACT_PATH=$ENV_ARTIFACT_PATH" >> $GITHUB_OUTPUT fi fi \ No newline at end of file diff --git a/.scripts/logging_utils.sh b/.scripts/logging_utils.sh index 57bc95c2..aff009f0 100644 --- a/.scripts/logging_utils.sh +++ b/.scripts/logging_utils.sh @@ -12,7 +12,7 @@ function startgroup { echo "##[group]$1";; travis ) echo "$1" - echo -en 'travis_fold:start:'"${1// /}"'\\r';; + echo -en 'travis_fold:start:'"${1// /}"'\r';; github_actions ) echo "::group::$1";; * ) @@ -28,7 +28,7 @@ function endgroup { azure ) echo "##[endgroup]";; travis ) - echo -en 'travis_fold:end:'"${1// /}"'\\r';; + echo -en 'travis_fold:end:'"${1// /}"'\r';; github_actions ) echo "::endgroup::";; esac diff --git a/README.md b/README.md index 5cdfd24b..56d55138 100644 --- a/README.md +++ b/README.md @@ -1,57 +1,24 @@ -About openmm -============ - -Home: http://openmm.org - -Package license: LGPL-3.0-or-later +About cupy-feedstock +==================== Feedstock license: [BSD-3-Clause](https://github.com/conda-forge/cf-autotick-bot-test-package-feedstock/blob/main/LICENSE.txt) -Summary: A high performance toolkit for molecular simulation. +Home: https://cupy.dev/ -Development: https://github.com/openmm/openmm +Package license: MIT -Documentation: http://docs.openmm.org +Summary: CuPy: NumPy & SciPy for GPU -OpenMM is a toolkit for molecular simulation. It can be used either as a -stand-alone application for running simulations, or as a library you call -from your own code. It provides a combination of extreme flexibility -(through custom forces and integrators), openness, and high performance -(especially on recent GPUs) that make it truly unique among simulation -codes. OpenMM is MIT licensed with some LGPL portions (CUDA and OpenCL -platforms). +Development: https://github.com/cupy/cupy/ + +Documentation: https://docs.cupy.dev/en/stable/ Current build status ==================== - - - - -
Azure -
- - - - - - - - - - - - -
VariantStatus
linux_64_c_compiler_version10cuda_compiler_version11.2cxx_compiler_version10numpy1.20python3.9.____cpython - - variant - -
-
-
Current release info @@ -59,53 +26,53 @@ Current release info | Name | Downloads | Version | Platforms | | --- | --- | --- | --- | -| [![Conda Recipe](https://img.shields.io/badge/recipe-openmm-green.svg)](https://anaconda.org/conda-forge/openmm) | [![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/openmm.svg)](https://anaconda.org/conda-forge/openmm) | [![Conda Version](https://img.shields.io/conda/vn/conda-forge/openmm.svg)](https://anaconda.org/conda-forge/openmm) | [![Conda Platforms](https://img.shields.io/conda/pn/conda-forge/openmm.svg)](https://anaconda.org/conda-forge/openmm) | +| [![Conda Recipe](https://img.shields.io/badge/recipe-cupy-green.svg)](https://anaconda.org/conda-forge/cupy) | [![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/cupy.svg)](https://anaconda.org/conda-forge/cupy) | [![Conda Version](https://img.shields.io/conda/vn/conda-forge/cupy.svg)](https://anaconda.org/conda-forge/cupy) | [![Conda Platforms](https://img.shields.io/conda/pn/conda-forge/cupy.svg)](https://anaconda.org/conda-forge/cupy) | -Installing openmm -================= +Installing cupy +=============== -Installing `openmm` from the `conda-forge` channel can be achieved by adding `conda-forge` to your channels with: +Installing `cupy` from the `conda-forge` channel can be achieved by adding `conda-forge` to your channels with: ``` conda config --add channels conda-forge conda config --set channel_priority strict ``` -Once the `conda-forge` channel has been enabled, `openmm` can be installed with `conda`: +Once the `conda-forge` channel has been enabled, `cupy` can be installed with `conda`: ``` -conda install openmm +conda install cupy ``` or with `mamba`: ``` -mamba install openmm +mamba install cupy ``` -It is possible to list all of the versions of `openmm` available on your platform with `conda`: +It is possible to list all of the versions of `cupy` available on your platform with `conda`: ``` -conda search openmm --channel conda-forge +conda search cupy --channel conda-forge ``` or with `mamba`: ``` -mamba search openmm --channel conda-forge +mamba search cupy --channel conda-forge ``` Alternatively, `mamba repoquery` may provide more information: ``` # Search all versions available on your platform: -mamba repoquery search openmm --channel conda-forge +mamba repoquery search cupy --channel conda-forge -# List packages depending on `openmm`: -mamba repoquery whoneeds openmm --channel conda-forge +# List packages depending on `cupy`: +mamba repoquery whoneeds cupy --channel conda-forge -# List dependencies of `openmm`: -mamba repoquery depends openmm --channel conda-forge +# List dependencies of `cupy`: +mamba repoquery depends cupy --channel conda-forge ``` @@ -150,17 +117,17 @@ Terminology produce the finished article (built conda distributions) -Updating openmm-feedstock -========================= +Updating cupy-feedstock +======================= -If you would like to improve the openmm recipe or build a new +If you would like to improve the cupy recipe or build a new package version, please fork this repository and submit a PR. Upon submission, your changes will be run on the appropriate platforms to give the reviewer an opportunity to confirm that the changes result in a successful build. Once merged, the recipe will be re-built and uploaded automatically to the `conda-forge` channel, whereupon the built conda packages will be available for everybody to install and use from the `conda-forge` channel. -Note that all branches in the conda-forge/openmm-feedstock are +Note that all branches in the conda-forge/cupy-feedstock are immediately built and any created packages are uploaded, so PRs should be based on branches in forks and branches in the main repository should only be used to build distinct package versions. @@ -175,8 +142,10 @@ In order to produce a uniquely identifiable distribution: Feedstock Maintainers ===================== -* [@jaimergp](https://github.com/jaimergp/) -* [@jchodera](https://github.com/jchodera/) -* [@mikemhenry](https://github.com/mikemhenry/) -* [@peastman](https://github.com/peastman/) +* [@asi1024](https://github.com/asi1024/) +* [@emcastillo](https://github.com/emcastillo/) +* [@jakirkham](https://github.com/jakirkham/) +* [@kmaehashi](https://github.com/kmaehashi/) +* [@leofang](https://github.com/leofang/) +* [@toslunar](https://github.com/toslunar/) diff --git a/azure-pipelines.yml b/azure-pipelines.yml deleted file mode 100644 index ad85a2cc..00000000 --- a/azure-pipelines.yml +++ /dev/null @@ -1,6 +0,0 @@ -# This file was generated automatically from conda-smithy. To update this configuration, -# update the conda-forge.yml and/or the recipe/meta.yaml. -# -*- mode: yaml -*- - -jobs: - - template: ./.azure-pipelines/azure-pipelines-linux.yml \ No newline at end of file diff --git a/conda-forge.yml b/conda-forge.yml index 8377488f..d44fd132 100644 --- a/conda-forge.yml +++ b/conda-forge.yml @@ -4,10 +4,23 @@ conda_forge_output_validation: true github: branch_name: main tooling_branch_name: main +os_version: + linux_64: cos7 + linux_aarch64: cos7 + linux_ppc64le: cos7 provider: - linux_ppc64le: travis -azure: - store_build_artifacts: true + linux: github_actions + linux_aarch64: github_actions + linux_ppc64le: github_actions conda_build: pkg_format: 2 upload_on_branch: main +github_actions: + self_hosted: true + timeout_minutes: 720 + triggers: [pull_request] + store_build_artifacts: true +build_platform: + linux_aarch64: linux_64 + linux_ppc64le: linux_64 +test: native diff --git a/recipe/activate.bat b/recipe/activate.bat new file mode 100755 index 00000000..611d7027 --- /dev/null +++ b/recipe/activate.bat @@ -0,0 +1,10 @@ +@echo off +if defined CONDA_BUILD_STATE ( + @echo on +) + +if defined CUDA_PATH ( + set "CONDA_CUPY_CUDA_PATH=%CUDA_PATH%" +) + +set "CUDA_PATH=%CONDA_PREFIX%" diff --git a/recipe/activate.sh b/recipe/activate.sh new file mode 100755 index 00000000..265ac99e --- /dev/null +++ b/recipe/activate.sh @@ -0,0 +1,8 @@ +#!/bin/bash + + +if [[ -n ${CUDA_PATH:+x} ]]; then + export CONDA_CUPY_CUDA_PATH=$CUDA_PATH +fi + +export CUDA_PATH=$CONDA_PREFIX diff --git a/recipe/build_openmm.sh b/recipe/build_openmm.sh deleted file mode 100644 index 1ad92c63..00000000 --- a/recipe/build_openmm.sh +++ /dev/null @@ -1,85 +0,0 @@ -#!/bin/bash - -set -ex - - -CMAKE_FLAGS="${CMAKE_ARGS} -DCMAKE_INSTALL_PREFIX=${PREFIX} -DCMAKE_BUILD_TYPE=Release" -if [[ "$with_test_suite" == "true" ]]; then - CMAKE_FLAGS+=" -DBUILD_TESTING=ON -DOPENMM_BUILD_OPENCL_TESTS=ON" -else - CMAKE_FLAGS+=" -DBUILD_TESTING=OFF" -fi - - -if [[ "$target_platform" == linux* ]]; then - # CFLAGS - # JRG: Had to add -ldl to prevent linking errors (dlopen, etc) - MINIMAL_CFLAGS+=" -O3 -ldl" - CFLAGS+=" $MINIMAL_CFLAGS" - CXXFLAGS+=" $MINIMAL_CFLAGS" - - # CUDA is enabled in these platforms - if [[ "$target_platform" == linux-64 || "$target_platform" == linux-ppc64le ]]; then - # # CUDA_HOME is defined by nvcc metapackage - CMAKE_FLAGS+=" -DCUDA_TOOLKIT_ROOT_DIR=${CUDA_HOME}" - # CUDA tests won't build, disable for now - # See https://github.com/openmm/openmm/issues/2258#issuecomment-462223634 - CMAKE_FLAGS+=" -DOPENMM_BUILD_CUDA_TESTS=OFF" - # shadow some CMAKE_ARGS bits that interfere with CUDA detection - CMAKE_FLAGS+=" -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=BOTH" - fi - - # OpenCL ICD - CMAKE_FLAGS+=" -DOPENCL_INCLUDE_DIR=${PREFIX}/include" - CMAKE_FLAGS+=" -DOPENCL_LIBRARY=${PREFIX}/lib/libOpenCL${SHLIB_EXT}" - -elif [[ "$target_platform" == osx* ]]; then - if [[ "$opencl_impl" == khronos ]]; then - CMAKE_FLAGS+=" -DOPENCL_INCLUDE_DIR=${PREFIX}/include" - CMAKE_FLAGS+=" -DOPENCL_LIBRARY=${PREFIX}/lib/libOpenCL${SHLIB_EXT}" - fi - # When using opencl_impl == apple, CMake will auto-locate it, so no need to provide the flags - # On Conda Forge, this will result in: - # /Applications/Xcode_12.app/Contents/Developer/Platforms/MacOSX.platform/Developer/... - # ...SDKs/MacOSX10.9.sdk/System/Library/Frameworks/OpenCL.framework - # On local builds, it might be: - # /System/Library/Frameworks/OpenCL.framework/OpenCL -fi - -# Set location for FFTW3 on both linux and mac -CMAKE_FLAGS+=" -DFFTW_INCLUDES=${PREFIX}/include/" -CMAKE_FLAGS+=" -DFFTW_LIBRARY=${PREFIX}/lib/libfftw3f${SHLIB_EXT}" -CMAKE_FLAGS+=" -DFFTW_THREADS_LIBRARY=${PREFIX}/lib/libfftw3f_threads${SHLIB_EXT}" -# Disambiguate swig location -CMAKE_FLAGS+=" -DSWIG_EXECUTABLE=$(which swig)" - -# Build in subdirectory and install. -mkdir -p build -cd build -cmake ${CMAKE_FLAGS} ${SRC_DIR} -make -j$CPU_COUNT -make -j$CPU_COUNT install PythonInstall - -# Put examples into an appropriate subdirectory. -mkdir -p ${PREFIX}/share/openmm/ -mv ${PREFIX}/examples ${PREFIX}/share/openmm/ - -# Fix some overlinking warnings/errors -for lib in ${PREFIX}/lib/plugins/*${SHLIB_EXT}; do - ln -s $lib ${PREFIX}/lib/$(basename $lib) || true -done - -if [[ "$with_test_suite" == "true" ]]; then - mkdir -p ${PREFIX}/share/openmm/tests/ - # BSD find vs GNU find: -executable is only available in GNU find - # +0111 is somehow equivalent in BSD, but that's not compatible in GNU - # so we use different commands for each... - if [[ "$target_platform" == osx* ]]; then - find . -name "Test*" -perm +0111 -type f \ - -exec python $RECIPE_DIR/patch_osx_tests.py "{}" \; \ - -exec cp "{}" $PREFIX/share/openmm/tests/ \; - else - find . -name "Test*" -executable -type f -exec cp "{}" $PREFIX/share/openmm/tests/ \; - fi - cp -r python/tests $PREFIX/share/openmm/tests/python -fi diff --git a/recipe/conda_build_config.yaml b/recipe/conda_build_config.yaml new file mode 100644 index 00000000..f3a2c0de --- /dev/null +++ b/recipe/conda_build_config.yaml @@ -0,0 +1,9 @@ +c_compiler: # [win] + - vs2017 # [win] +cxx_compiler: # [win] + - vs2017 # [win] + +github_actions_labels: + - hosted # [not linux] + - cirun-openstack-gpu-large # [linux and x86_64] + - cirun-openstack-cpu-large # [linux and not x86_64] diff --git a/recipe/deactivate.bat b/recipe/deactivate.bat new file mode 100755 index 00000000..dd9bd2e5 --- /dev/null +++ b/recipe/deactivate.bat @@ -0,0 +1,11 @@ +@echo off +if defined CONDA_BUILD_STATE ( + @echo on +) + +if not "%CONDA_CUPY_CUDA_PATH%"=="" ( + set "CUDA_PATH=%CONDA_CUPY_CUDA_PATH%" + set "CONDA_CUPY_CUDA_PATH=" +) else ( + set CUDA_PATH="" +) diff --git a/recipe/deactivate.sh b/recipe/deactivate.sh new file mode 100755 index 00000000..2128f20a --- /dev/null +++ b/recipe/deactivate.sh @@ -0,0 +1,9 @@ +#!/bin/bash + + +if [[ -n ${CONDA_CUPY_CUDA_PATH:+x} ]]; then + export CUDA_PATH=$CONDA_CUPY_CUDA_PATH + unset CONDA_CUPY_CUDA_PATH +else + unset CUDA_PATH +fi diff --git a/recipe/meta.yaml b/recipe/meta.yaml old mode 100644 new mode 100755 index 6e8b223f..722d08c0 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -1,124 +1,200 @@ -{% set name = "openmm" %} -{% set version = "7.7.0" %} -{% set build = 1 %} -{% set with_test_suite = "false" %} -{% set with_test_suite = "true" %} # [(osx and arm64)] +{% set name = "cupy" %} +{% set version = "12.2.0" %} +{% set sha256 = "f95ffd0afeacb617b048fe028ede07b97dc9e95aca1610a022b1f3d20a9a027e" %} + +{% set target_name = "x86_64-linux" %} # [linux64] +{% set target_name = "ppc64le-linux" %} # [ppc64le] +{% set target_name = "sbsa-linux" %} # [aarch64] +{% set target_name = "x64" %} # [win] + +{% if cuda_compiler_version in (None, "None", True, False) %} +{% set cuda_major = 0 %} +{% else %} +{% set cuda_major = environ.get("cuda_compiler_version", "11.8").split(".")[0] | int %} +{% endif %} package: - name: {{ name }} + name: {{ name|lower }} version: {{ version }} source: - git_url: https://github.com/openmm/{{ name }}.git - git_rev: "7.7.0" + - url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/{{ name }}-{{ version }}.tar.gz + sha256: {{ sha256 }} + patches: + - support_new_cuda_layout.diff # [(linux and (cuda_compiler_version or "").startswith("12")) or (build_platform != target_platform)] + - support_nvtx3_win.diff # [win64] build: - number: {{ build }} - string: "py{{ PY_VER.replace('.', '') }}h{{ PKG_HASH }}_{{ build }}_{{ opencl_impl }}" # [osx] - track_features: # make Apple OpenCL low priority - - openmm_opencl_apple # [osx and (opencl_impl == 'apple')] - skip: true # [win or osx or cuda_compiler_version != '11.2' or py != 39] - script_env: - - CONFIG - - CUDA_HOME # [ppc64le] - missing_dso_whitelist: - - "*/libcuda.*" # [linux64 or ppc64le] - - "*/libOpenCL.*" # [unix] - - "*/nvcuda.dll" # [win] + number: 2 + # TODO: turn on win64 + CUDA 12 once it's ready + skip: true # [cuda_compiler_version not in ("11.8", "12.0") or (cuda_compiler_version == "12.0" and win64)] + skip: true # [win] + skip: true # [py != 39] script: - - env with_test_suite={{ with_test_suite }} bash {{ RECIPE_DIR }}/build_openmm.sh # [unix] - - set with_test_suite={{ with_test_suite }} && {{ RECIPE_DIR }}\build_openmm.bat # [win] + # CuPy default detects CUDA from nvcc, but on Conda-Forge's dockers nvcc lives in a different place... + # With conda-forge/nvcc-feedstock#58, CUDA_PATH is set correctly + - export NVCC="$(which nvcc)" # [linux] + {% if cuda_major >= 12 %} + - export CUPY_NUM_BUILD_JOBS=1 # [(aarch64 or ppc64le) and (build_platform == target_platform)] + - export CUDA_PATH=$PREFIX/targets/{{ target_name }} # [linux] + {% endif %} + - echo "nvcc is $NVCC, CUDA path is $CUDA_PATH" # [linux] + - for /f "tokens=* usebackq" %%f in (`where nvcc`) do (set "dummy=%%f" && call set "NVCC=%%dummy:\=\\%%") # [win] + # we use this WAR until we figure out how to proceed with conda-forge/nvcc-feedstock#88 + - set "NVCC=%NVCC% --use-local-env" # [win64] + - echo "nvcc is %NVCC%, CUDA path is %CUDA_PATH%" # [win] + - export CUSPARSELT_PATH="${PREFIX}" # [(linux64 or aarch64 or win) and (cuda_compiler_version or "").startswith("11")] + # Workaround __ieee128 error; see https://github.com/LLNL/blt/issues/341 + - export NVCC="$NVCC -Xcompiler -mno-float128" # [ppc64le] + + - {{ PYTHON }} -m pip install . --no-deps -vv + - if errorlevel 1 exit 1 # [win] + + # copy activate/deactivate scripts + - mkdir -p "${PREFIX}/etc/conda/activate.d" # [linux] + - cp "${RECIPE_DIR}/activate.sh" "${PREFIX}/etc/conda/activate.d/cupy_activate.sh" # [linux] + - mkdir -p "${PREFIX}/etc/conda/deactivate.d" # [linux] + - cp "${RECIPE_DIR}/deactivate.sh" "${PREFIX}/etc/conda/deactivate.d/cupy_deactivate.sh" # [linux] + - if not exist %PREFIX%\etc\conda\activate.d mkdir %PREFIX%\etc\conda\activate.d # [win] + - copy %RECIPE_DIR%\activate.bat %PREFIX%\etc\conda\activate.d\cupy_activate.bat # [win] + - if not exist %PREFIX%\etc\conda\deactivate.d mkdir %PREFIX%\etc\conda\deactivate.d # [win] + - copy %RECIPE_DIR%\deactivate.bat %PREFIX%\etc\conda\deactivate.d\cupy_deactivate.bat # [win] + + # enable CuPy's preload mechanism + - mkdir -p "${SP_DIR}/cupy/.data/" # [linux] + - cp ${RECIPE_DIR}/preload_config/linux64_cuda{{ cuda_major }}_wheel.json ${SP_DIR}/cupy/.data/_wheel.json # [linux] + - if not exist %SP_DIR%\cupy\.data mkdir %SP_DIR%\cupy\.data # [win] + - copy %RECIPE_DIR%\preload_config\win64_cuda{{ cuda_major }}_wheel.json %SP_DIR%\cupy\.data\_wheel.json # [win] + + # cupy/cupy#7578 + - if not exist %SP_DIR%\cupy\.data\_depends.json exit 1 # [win] + missing_dso_whitelist: + - '*/libcuda.*' # [linux] + - '*/nvcuda.dll' # [win] + ignore_run_exports: + # optional dependencies + - cudnn # [not ((aarch64 or ppc64le) and (cuda_compiler_version or "").startswith("12"))] + - nccl # [linux] + - cutensor + - cusparselt # [(linux64 or aarch64 or win) and (cuda_compiler_version or "").startswith("11")] requirements: build: - - python # [build_platform != target_platform] - - cross-python_{{ target_platform }} # [build_platform != target_platform] - - cython # [build_platform != target_platform] - - numpy # [build_platform != target_platform] - - swig # [build_platform != target_platform] - - {{ compiler('c') }} - - {{ compiler('cxx') }} - - {{ compiler('cuda') }} # [linux64 or ppc64le or win] - - {{ cdt('mesa-libgl-devel') }} # [linux] - - cmake - - make # [unix] - - jom # [win] - # needed for Python wrappers - - doxygen -{% if with_test_suite == 'true' %} - - conda-build # [osx] - - m2-findutils # [win] - - m2-coreutils # [win] -{% endif %} + - {{ compiler("c") }} + - {{ compiler("cxx") }} + - {{ compiler("cuda") }} + #- cuda-nvcc + - sysroot_{{ target_platform }} 2.17 # [linux] + - cross-python_{{ target_platform }} # [build_platform != target_platform] + - python # [build_platform != target_platform] + - cython >=0.29.22,<3 # [build_platform != target_platform] + # TODO: clean up + {% if cuda_major >= 12 %} + - cuda-driver-dev # [build_platform != target_platform] + - cuda-cudart-dev # [build_platform != target_platform] + - cuda-nvrtc-dev # [build_platform != target_platform] + - cuda-nvtx-dev # [build_platform != target_platform] + - cuda-profiler-api # [build_platform != target_platform] + - cuda-cccl_{{ build_platform }} # [build_platform != target_platform] + - libcublas-dev # [build_platform != target_platform] + - libcufft-dev # [build_platform != target_platform] + - libcurand-dev # [build_platform != target_platform] + - libcusolver-dev # [build_platform != target_platform] + - libcusparse-dev # [build_platform != target_platform] + {% endif %} + # optional dependencies for CUDA 11.2+ + - cudnn >=8.0.*,<9 # [build_platform != target_platform and (not ((aarch64 or ppc64le) and (cuda_compiler_version or "").startswith("12")))] + - nccl >=2.8,<3 # [build_platform != target_platform] + - cutensor >=1.4,<2 # [build_platform != target_platform] + - cusparselt 0.2.0.* # [(linux64 or aarch64 or win) and (cuda_compiler_version or "").startswith("11")] host: - python - - fftw - - swig - - pthread-stubs - - lxml - - numpy - - cython - # OpenCL ICD - - ocl-icd # [linux] - - khronos-opencl-icd-loader # [win or (osx and opencl_impl == 'khronos')] + - pip + - setuptools + - cython >=0.29.22,<3 + - fastrlock >=0.5 + - cuda-version {{ cuda_compiler_version }} + - nvtx-c # [win64] + # TODO: clean up + {% if cuda_major >= 12 %} + - cuda-driver-dev + - cuda-cudart-dev + - cuda-nvrtc-dev + - cuda-nvtx-dev + - cuda-profiler-api + - cuda-cccl_{{ target_platform }} + - libcublas-dev + - libcufft-dev + - libcurand-dev + - libcusolver-dev + - libcusparse-dev + {% endif %} + # optional dependencies + # TODO: see https://github.com/conda-forge/cudnn-feedstock/issues/58 + - cudnn >=8.0.*,<9 # [not ((aarch64 or ppc64le) and (cuda_compiler_version or "").startswith("12"))] + - nccl >=2.8,<3 # [linux] + - cutensor >=1.4,<2 + - cusparselt 0.2.0.* # [(linux64 or aarch64 or win) and (cuda_compiler_version or "").startswith("11")] run: - python - - fftw - - numpy - # OpenCL ICD - - ocl-icd # [linux] - - ocl-icd-system # [linux] - - khronos-opencl-icd-loader # [win or (osx and opencl_impl == 'khronos')] - - ocl_icd_wrapper_apple # [osx and opencl_impl == 'khronos'] + - {{ pin_compatible('fastrlock', max_pin='x.x') }} + - numpy >=1.21,<2 + - cuda-version >={{ cuda_major }}.0,<{{ cuda_major+1 }} # [(cuda_compiler_version or "").startswith("12")] + - cuda-version >={{ cuda_major }}.2,<{{ cuda_major+1 }} # [(cuda_compiler_version or "").startswith("11")] run_constrained: - - khronos-opencl-icd-loader ==9999999999 # [osx and opencl_impl == 'apple'] - - ocl_icd_wrapper_apple ==9999999999 # [osx and opencl_impl == 'apple'] - - python <3.9.9 # [py == 39 and win] + # Only GLIBC_2.17 or older symbols present + - __glibc >=2.17 # [linux] + - scipy >=1.7,<2 + - optuna >=3,<4 + # TODO: Waiting for `aarch64` & `ppc64le` CUDA 12 support + - {{ pin_compatible('cudnn') }} # [not ((aarch64 or ppc64le) and (cuda_compiler_version or "").startswith("12"))] + - {{ pin_compatible('nccl') }} # [linux] + - {{ pin_compatible('cutensor', lower_bound='1.4') }} + - {{ pin_compatible('cusparselt', max_pin='x.x') }} # [(linux64 or aarch64 or win) and (cuda_compiler_version or "").startswith("11")] test: requires: - - git - - pocl # [linux] -{% if with_test_suite == 'true' %} - - pytest - - pytest-xdist -{% endif %} - files: - - test_openmm.sh # [unix] - - test_openmm.bat # [win] - imports: - - openmm - commands: - - env with_test_suite={{ with_test_suite }} bash test_openmm.sh # [unix] - - set with_test_suite={{ with_test_suite }} && .\test_openmm.bat # [win] + # need the libcuda stub for import test + # - cuda-driver-dev # [(cuda_compiler_version or "").startswith("12")] + - pytest >=7.2 + - hypothesis >=6.37.2,<6.55.0 + - setuptools + - {{ compiler("c") }} + - {{ compiler("cxx") }} + - {{ compiler("cuda") }} # tests need nvcc + - cupy + - cudnn + - numpy 1.24.* + - scipy 1.10.* + - cython >=0.29.22,<3 + - optuna >=2.0 + {% if cuda_major == 12 %} + - cuda-cudart-dev + - libcufft-static + - libcufft-dev + {% endif %} + source_files: + - tests + - setup.cfg about: - home: http://openmm.org - license: LGPL-3.0-or-later - license_family: LGPL - license_file: - - docs-source/licenses/Licenses.txt - - docs-source/licenses/LGPL.txt - - docs-source/licenses/GPL.txt - summary: A high performance toolkit for molecular simulation. - - description: | - OpenMM is a toolkit for molecular simulation. It can be used either as a - stand-alone application for running simulations, or as a library you call - from your own code. It provides a combination of extreme flexibility - (through custom forces and integrators), openness, and high performance - (especially on recent GPUs) that make it truly unique among simulation - codes. OpenMM is MIT licensed with some LGPL portions (CUDA and OpenCL - platforms). - doc_url: http://docs.openmm.org - dev_url: https://github.com/openmm/openmm + home: https://cupy.dev/ + license: MIT + license_family: MIT + license_file: LICENSE + summary: | + CuPy: NumPy & SciPy for GPU + dev_url: https://github.com/cupy/cupy/ + doc_url: https://docs.cupy.dev/en/stable/ extra: recipe-maintainers: - - mikemhenry - - jchodera - - jaimergp - - peastman + - jakirkham + - leofang + - kmaehashi + - asi1024 + - emcastillo + - toslunar diff --git a/recipe/preload_config/linux64_cuda10.2_wheel.json b/recipe/preload_config/linux64_cuda10.2_wheel.json new file mode 100644 index 00000000..9928a42e --- /dev/null +++ b/recipe/preload_config/linux64_cuda10.2_wheel.json @@ -0,0 +1,7 @@ +{ + "packaging": "conda", + "cuda": "10.2", + "cudnn": {}, + "nccl": {}, + "cutensor": {} +} diff --git a/recipe/preload_config/linux64_cuda11.0_wheel.json b/recipe/preload_config/linux64_cuda11.0_wheel.json new file mode 100644 index 00000000..5583026f --- /dev/null +++ b/recipe/preload_config/linux64_cuda11.0_wheel.json @@ -0,0 +1,7 @@ +{ + "packaging": "conda", + "cuda": "11.0", + "cudnn": {}, + "nccl": {}, + "cutensor": {} +} diff --git a/recipe/preload_config/linux64_cuda11.1_wheel.json b/recipe/preload_config/linux64_cuda11.1_wheel.json new file mode 100644 index 00000000..76bfae87 --- /dev/null +++ b/recipe/preload_config/linux64_cuda11.1_wheel.json @@ -0,0 +1,7 @@ +{ + "packaging": "conda", + "cuda": "11.1", + "cudnn": {}, + "nccl": {}, + "cutensor": {} +} diff --git a/recipe/preload_config/linux64_cuda11.2_wheel.json b/recipe/preload_config/linux64_cuda11.2_wheel.json new file mode 100644 index 00000000..d8d7d96b --- /dev/null +++ b/recipe/preload_config/linux64_cuda11.2_wheel.json @@ -0,0 +1,7 @@ +{ + "packaging": "conda", + "cuda": "11.2", + "cudnn": {}, + "nccl": {}, + "cutensor": {} +} diff --git a/recipe/preload_config/linux64_cuda11_wheel.json b/recipe/preload_config/linux64_cuda11_wheel.json new file mode 100644 index 00000000..fcaa624a --- /dev/null +++ b/recipe/preload_config/linux64_cuda11_wheel.json @@ -0,0 +1,7 @@ +{ + "packaging": "conda", + "cuda": "11.x", + "cudnn": {}, + "nccl": {}, + "cutensor": {} +} diff --git a/recipe/preload_config/linux64_cuda12_wheel.json b/recipe/preload_config/linux64_cuda12_wheel.json new file mode 100644 index 00000000..07c010aa --- /dev/null +++ b/recipe/preload_config/linux64_cuda12_wheel.json @@ -0,0 +1,7 @@ +{ + "packaging": "conda", + "cuda": "12.x", + "cudnn": {}, + "nccl": {}, + "cutensor": {} +} diff --git a/recipe/preload_config/win64_cuda10.2_wheel.json b/recipe/preload_config/win64_cuda10.2_wheel.json new file mode 100644 index 00000000..467e72f4 --- /dev/null +++ b/recipe/preload_config/win64_cuda10.2_wheel.json @@ -0,0 +1,6 @@ +{ + "packaging": "conda", + "cuda": "10.2", + "cudnn": {}, + "cutensor": {} +} diff --git a/recipe/preload_config/win64_cuda11.0_wheel.json b/recipe/preload_config/win64_cuda11.0_wheel.json new file mode 100644 index 00000000..5ec38c63 --- /dev/null +++ b/recipe/preload_config/win64_cuda11.0_wheel.json @@ -0,0 +1,6 @@ +{ + "packaging": "conda", + "cuda": "11.0", + "cudnn": {}, + "cutensor": {} +} diff --git a/recipe/preload_config/win64_cuda11.1_wheel.json b/recipe/preload_config/win64_cuda11.1_wheel.json new file mode 100644 index 00000000..21b92276 --- /dev/null +++ b/recipe/preload_config/win64_cuda11.1_wheel.json @@ -0,0 +1,6 @@ +{ + "packaging": "conda", + "cuda": "11.1", + "cudnn": {}, + "cutensor": {} +} diff --git a/recipe/preload_config/win64_cuda11.2_wheel.json b/recipe/preload_config/win64_cuda11.2_wheel.json new file mode 100644 index 00000000..1426948a --- /dev/null +++ b/recipe/preload_config/win64_cuda11.2_wheel.json @@ -0,0 +1,6 @@ +{ + "packaging": "conda", + "cuda": "11.2", + "cudnn": {}, + "cutensor": {} +} diff --git a/recipe/preload_config/win64_cuda11_wheel.json b/recipe/preload_config/win64_cuda11_wheel.json new file mode 100644 index 00000000..e177e630 --- /dev/null +++ b/recipe/preload_config/win64_cuda11_wheel.json @@ -0,0 +1,6 @@ +{ + "packaging": "conda", + "cuda": "11.x", + "cudnn": {}, + "cutensor": {} +} diff --git a/recipe/preload_config/win64_cuda12_wheel.json b/recipe/preload_config/win64_cuda12_wheel.json new file mode 100644 index 00000000..d17337d7 --- /dev/null +++ b/recipe/preload_config/win64_cuda12_wheel.json @@ -0,0 +1,6 @@ +{ + "packaging": "conda", + "cuda": "12.x", + "cudnn": {}, + "cutensor": {} +} diff --git a/recipe/run_test.py b/recipe/run_test.py new file mode 100644 index 00000000..b791f9dd --- /dev/null +++ b/recipe/run_test.py @@ -0,0 +1,88 @@ +# Configure CuPy to use 1 GPU for testing +import ctypes +import os +import platform +import site +import sys +os.environ["CUPY_TEST_GPU_LIMIT"] = "1" + +def get_target_name(): + plat = platform.processor() + if plat == "aarch64": + out = "sbsa-linux" + else: + out = f"{plat}-linux" + return out + +# Check CUDA_PATH is set +cuda_path = os.environ.get('CUDA_PATH') +assert cuda_path is not None +print("CUDA_PATH:", cuda_path) + +# check _wheel.json exists +# note that we don't rely on cupy.__file__ because we cannot import CuPy on Windows +pypaths = site.getsitepackages() +for cp in pypaths: + config_json = os.path.join(cp, 'cupy/.data/_wheel.json') + if not os.path.isfile(config_json): + continue + else: + print("_wheel.json is found:", config_json) + break +else: + raise RuntimeError('_wheel.json is not found in the package') + +# # dlopen the driver stub so that CuPy can be imported later +# # Note: This would make the actual tests fail on GPU CI! +# if sys.platform.startswith('linux') and '12' in os.environ.get('CONDA_OVERRIDE_CUDA', ''): +# try: +# stub = f"{os.environ['BUILD_PREFIX']}/targets/{get_target_name()}/lib/stubs/libcuda.so" +# stub = ctypes.CDLL(stub) +# except Exception as e: +# print(f"{stub=} was not loaded:") +# raise + +# TODO: do we not ship a stub on Windows? +try: + import cupy +except Exception as e: + if sys.platform.startswith('win32'): + print("No driver available on Windows. Exiting...") + sys.exit(0) + raise e +else: + print("import ok") + # sys.exit(0) + +# Ensure CuPy picks up the correct CUDA_VERSION +from cupy.cuda import driver +ver = driver.get_build_version() +cuda_ver = os.environ.get('cuda_compiler_version').split('.') +cuda_ver = int(cuda_ver[0]) * 1000 + int(cuda_ver[1]) * 10 +if ver != cuda_ver: + raise ValueError('CUDA version {0} != cuda_compiler_version {1}'.format( + ver, cuda_ver)) +else: + print('CUDA version {0} == cuda_compiler_version {1}'.format(ver, cuda_ver)) + +try: + # Print CuPy runtime info + # this line would fail if there is no GPU + cupy.show_config() +except Exception as e: + print('Got an error: \n%s' % str(e)) + print("No GPU available. Exiting without running CuPy's tests.") + sys.exit(0) + +## Run CuPy's test suite +if sys.platform.startswith("linux"): + gcc = os.path.join(os.environ["PREFIX"], "bin", "gcc") + if "CC" in os.environ and not os.path.exists(gcc): + os.symlink(os.environ["CC"], gcc) + + gxx = os.path.join(os.environ["PREFIX"], "bin", "g++") + if "CXX" in os.environ and not os.path.exists(gxx): + os.symlink(os.environ["CXX"], gxx) + +import pytest +sys.exit(pytest.main(["tests/cupy_tests", "-m", "not slow"])) diff --git a/recipe/support_new_cuda_layout.diff b/recipe/support_new_cuda_layout.diff new file mode 100644 index 00000000..4179d91b --- /dev/null +++ b/recipe/support_new_cuda_layout.diff @@ -0,0 +1,152 @@ +diff --git a/install/cupy_builder/cupy_setup_build.py b/install/cupy_builder/cupy_setup_build.py +index 8023e46ad..4349ebe05 100644 +--- a/install/cupy_builder/cupy_setup_build.py ++++ b/install/cupy_builder/cupy_setup_build.py +@@ -5,6 +5,7 @@ from distutils import ccompiler + from distutils import sysconfig + import os + import shutil ++import subprocess + import sys + + import setuptools +@@ -294,16 +295,36 @@ def make_extensions(ctx: Context, compiler, use_cython): + # deprecated since ROCm 4.2.0 + settings['define_macros'].append(('__HIP_PLATFORM_HCC__', '1')) + +- available_modules = [] +- if no_cuda: +- available_modules = [m['name'] for m in MODULES] +- else: +- available_modules, settings = preconfigure_modules( +- ctx, MODULES, compiler, settings) +- required_modules = get_required_modules(MODULES) +- if not (set(required_modules) <= set(available_modules)): +- raise Exception('Your CUDA environment is invalid. ' +- 'Please check above error log.') ++ try: ++ host_compiler = compiler ++ if os.environ.get('CONDA_BUILD_CROSS_COMPILATION'): ++ os.symlink(f'{os.environ["BUILD_PREFIX"]}/x86_64-conda-linux-gnu/bin/x86_64-conda-linux-gnu-ld', ++ f'{os.environ["BUILD_PREFIX"]}/bin/ld') ++ if os.environ.get('CONDA_BUILD_CROSS_COMPILATION') or os.environ.get('CONDA_OVERRIDE_CUDA', '0').startswith('12'): ++ # If cross-compiling, we need build_and_run() & build_shlib() to use the compiler ++ # on the build platform to generate stub files that are executable in the build ++ # environment, not the target environment. ++ compiler = ccompiler.new_compiler() ++ compiler.compiler = [os.environ['CC_FOR_BUILD'],] ++ compiler.compiler_cxx = [os.environ['CXX_FOR_BUILD'],] ++ compiler.compiler_so = [os.environ['CC_FOR_BUILD'],] ++ compiler.linker_exe = [os.environ['CC_FOR_BUILD'], f'-B{os.environ["BUILD_PREFIX"]}/bin'] ++ compiler.linker_so = [os.environ['CC_FOR_BUILD'], f'-B{os.environ["BUILD_PREFIX"]}/bin', '-shared'] ++ ++ available_modules = [] ++ if no_cuda: ++ available_modules = [m['name'] for m in MODULES] ++ else: ++ available_modules, settings = preconfigure_modules( ++ ctx, MODULES, compiler, settings) ++ required_modules = get_required_modules(MODULES) ++ if not (set(required_modules) <= set(available_modules)): ++ raise Exception('Your CUDA environment is invalid. ' ++ 'Please check above error log.') ++ finally: ++ compiler = host_compiler ++ if os.environ.get('CONDA_BUILD_CROSS_COMPILATION'): ++ os.remove(f'{os.environ["BUILD_PREFIX"]}/bin/ld') + + ret = [] + for module in MODULES: +diff --git a/install/cupy_builder/install_build.py b/install/cupy_builder/install_build.py +index d0317e324..759d27157 100644 +--- a/install/cupy_builder/install_build.py ++++ b/install/cupy_builder/install_build.py +@@ -1,7 +1,9 @@ + # mypy: ignore-errors + + import contextlib ++import logging + import os ++import platform + import re + import shlex + import shutil +@@ -16,6 +18,9 @@ from cupy_builder import _environment + from cupy_builder._context import Context + + ++if os.environ.get('CONDA_BUILD', '0') == '1': ++ logging.basicConfig(level=logging.DEBUG) ++ + PLATFORM_LINUX = sys.platform.startswith('linux') + PLATFORM_WIN32 = sys.platform.startswith('win32') + +@@ -689,9 +694,59 @@ def get_cusparselt_version(formatted=False): + return _cusparselt_version + + ++def conda_get_target_name(): ++ out = None ++ if PLATFORM_LINUX: ++ plat = platform.processor() ++ if plat == "aarch64": ++ out = "sbsa-linux" ++ else: ++ out = f"{plat}-linux" ++ else: ++ raise NotImplementedError ++ logging.debug(f"{out=}") ++ return out ++ ++ ++def conda_update_dirs(include_dirs, library_dirs): ++ # Note: These hacks are needed for the dependency detection stage to function, ++ # because we create a fresh compiler instance that does not honor CFLAGS etc set ++ # in the conda-build environment. ++ include_dirs = list(include_dirs) ++ library_dirs = list(library_dirs) ++ ++ if os.environ.get('CONDA_BUILD_CROSS_COMPILATION'): ++ # If we're cross compiling, we need to generate stub files that are ++ # executable in the build environment, not the target environment. ++ # This assumes, however, that the build/host environments see the same ++ # CUDA Toolkit. ++ if os.environ.get('CONDA_OVERRIDE_CUDA', '0').startswith('12'): ++ include_dirs.insert(0, f'{os.environ["BUILD_PREFIX"]}/targets/x86_64-linux/include') ++ library_dirs.insert(0, f'{os.environ["BUILD_PREFIX"]}/targets/x86_64-linux/lib') ++ library_dirs.insert(0, f'{os.environ["BUILD_PREFIX"]}/lib/stubs') ++ elif os.environ.get('CONDA_OVERRIDE_CUDA', '0').startswith('11'): ++ include_dirs.append('/usr/local/cuda/include') ++ library_dirs.append('/usr/local/cuda/lib64/stubs') ++ ++ # for optional dependencies ++ include_dirs.append(f'{os.environ["BUILD_PREFIX"]}/include') ++ library_dirs.append(f'{os.environ["BUILD_PREFIX"]}/lib') ++ ++ if os.environ.get('CONDA_OVERRIDE_CUDA', '0').startswith('12'): ++ include_dirs.append(f'{os.environ["BUILD_PREFIX"]}/targets/{conda_get_target_name()}/include') # for crt headers ++ library_dirs.append(f'{os.environ["PREFIX"]}/lib/stubs') ++ # for optional dependencies ++ include_dirs.append(f'{os.environ["PREFIX"]}/include') ++ library_dirs.append(f'{os.environ["PREFIX"]}/lib') ++ ++ return include_dirs, library_dirs ++ ++ + def build_shlib(compiler, source, libraries=(), + include_dirs=(), library_dirs=(), define_macros=None, + extra_compile_args=()): ++ include_dirs, library_dirs = conda_update_dirs(include_dirs, library_dirs) ++ + with _tempdir() as temp_dir: + fname = os.path.join(temp_dir, 'a.cpp') + with open(fname, 'w') as f: +@@ -717,6 +772,8 @@ def build_shlib(compiler, source, libraries=(), + def build_and_run(compiler, source, libraries=(), + include_dirs=(), library_dirs=(), define_macros=None, + extra_compile_args=()): ++ include_dirs, library_dirs = conda_update_dirs(include_dirs, library_dirs) ++ + with _tempdir() as temp_dir: + fname = os.path.join(temp_dir, 'a.cpp') + with open(fname, 'w') as f: diff --git a/recipe/support_nvtx3_win.diff b/recipe/support_nvtx3_win.diff new file mode 100644 index 00000000..fae5e035 --- /dev/null +++ b/recipe/support_nvtx3_win.diff @@ -0,0 +1,12 @@ +diff --git a/install/cupy_builder/_environment.py b/install/cupy_builder/_environment.py +index 914b62c00..6363c6b91 100644 +--- a/install/cupy_builder/_environment.py ++++ b/install/cupy_builder/_environment.py +@@ -33,5 +33,7 @@ def get_nvtx_path() -> Optional[str]: + nvtx = candidates[-1] + print(f'Using NVTX at: {nvtx}') + return nvtx ++ if os.environ.get('CONDA_BUILD', '0') == '1': ++ return os.environ['PREFIX'] + print('NVTX could not be found') + return None diff --git a/recipe/test_openmm.sh b/recipe/test_openmm.sh deleted file mode 100644 index 10bfb773..00000000 --- a/recipe/test_openmm.sh +++ /dev/null @@ -1,91 +0,0 @@ -#!/bin/bash -set -ex -with_cuda="no" - -# Existence tests -test -f $PREFIX/lib/libOpenMM$SHLIB_EXT -test -f $PREFIX/lib/plugins/libOpenMMCPU$SHLIB_EXT -test -f $PREFIX/lib/plugins/libOpenMMPME$SHLIB_EXT -test -f $PREFIX/lib/plugins/libOpenMMOpenCL$SHLIB_EXT -if [[ "$target_platform" == linux-64 || "$target_platform" == linux-ppc64le ]]; then - with_cuda="yes" - test -f $PREFIX/lib/plugins/libOpenMMCUDA$SHLIB_EXT - test -f $PREFIX/lib/plugins/libOpenMMCudaCompiler$SHLIB_EXT -fi - -## Do they work properly? -# Debug silent errors in plugin loading -python -c "import openmm as mm; print('---Loaded---', *mm.pluginLoadedLibNames, '---Failed---', *mm.Platform.getPluginLoadFailures(), sep='\n')" -# Check that hardcoded library path was correctly replaced by conda-build -python -c "import os, openmm.version as v; print(v.openmm_library_path); assert os.path.isdir(v.openmm_library_path), 'Directory does not exist'" - -# Check all platforms -if [[ "$target_platform" == linux-ppc64le || "$target_platform" == linux-aarch64 ]]; then - python -m openmm.testInstallation || true # OpenCL will fail but that's ok -else - python -m openmm.testInstallation -fi -if [[ $with_cuda == yes ]]; then - # Linux64 / PPC see all 4 platforms, but CUDA is not usable because there's no GPU there - n_platforms=4 -else - # MacOS / ARM only see 3 because CUDA is not available there - n_platforms=3 -fi -python -c "from openmm import Platform as P; n = P.getNumPlatforms(); assert n == $n_platforms, f'n_platforms ({n}) != $n_platforms'" - -# Run a small MD -cd ${PREFIX}/share/openmm/examples -python benchmark.py --test=rf --seconds=10 --platform=Reference -python benchmark.py --test=rf --seconds=10 --platform=CPU -if [[ -z ${CI-} ]]; then # Run only outside CI, assuming there will be a GPU there - python benchmark.py --test=rf --seconds=10 --platform=OpenCL - if [[ $with_cuda == yes ]]; then - python benchmark.py --test=rf --seconds=10 --platform=CUDA - fi -fi - -# Check version metadata looks ok, only for final releases, RCs are not checked! -if [[ ${PKG_VERSION} != *"rc"* && ${PKG_VERSION} != *"beta"* ]]; then - python -c "from openmm import Platform; v = Platform.getOpenMMVersion(); assert \"$PKG_VERSION\" in (v, v+'.0'), v + \"!=$PKG_VERSION\"" - git_revision=$(git ls-remote https://github.com/openmm/openmm.git $PKG_VERSION | awk '{ print $1}') - python -c "from openmm.version import git_revision; r = git_revision; assert r == \"$git_revision\", r + \"!=$git_revision\"" -else - echo "!!! WARNING !!!" - echo "This is a release candidate build ($PKG_VERSION). Please check versions and git hashes manually!" -fi - -if [[ $with_test_suite == "true" ]]; then - cd $PREFIX/share/openmm/tests - set +ex - - # C++ tests - summary=""; exitcode=0; count=0; - for f in Test*; do - if [[ -n ${CI-} && ( $f == *Cuda* || $f == *OpenCL* ) ]]; then continue; fi - ((count+=1)) - echo -e "\n#$count: $f" - # Retry three times so stochastic tests have a chance - attempts=0 - while true; do - ./${f} - thisexitcode=$? - ((attempts+=1)) - if [[ $thisexitcode == 0 || $attempts == 3 ]]; then break; fi - done - if [[ $thisexitcode != 0 ]]; then summary+="\n#$count ${f}"; fi - ((exitcode+=$thisexitcode)) - done - if [[ $exitcode != 0 ]]; then - echo "------------" - echo "Failed tests" - echo "------------" - echo -e "${summary}" - exit $exitcode - fi - - # Python tests - set -ex - cd python - python -m pytest -v -n $CPU_COUNT -fi